1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetBucketVersioningOutput {
6/// <p>The versioning state of the bucket.</p>
7pub status: ::std::option::Option<crate::types::BucketVersioningStatus>,
8/// <p>Specifies whether MFA delete is enabled in the bucket versioning configuration. This element is only returned if the bucket has been configured with MFA delete. If the bucket has never been so configured, this element is not returned.</p>
9pub mfa_delete: ::std::option::Option<crate::types::MfaDeleteStatus>,
10 _extended_request_id: Option<String>,
11 _request_id: Option<String>,
12}
13impl GetBucketVersioningOutput {
14/// <p>The versioning state of the bucket.</p>
15pub fn status(&self) -> ::std::option::Option<&crate::types::BucketVersioningStatus> {
16self.status.as_ref()
17 }
18/// <p>Specifies whether MFA delete is enabled in the bucket versioning configuration. This element is only returned if the bucket has been configured with MFA delete. If the bucket has never been so configured, this element is not returned.</p>
19pub fn mfa_delete(&self) -> ::std::option::Option<&crate::types::MfaDeleteStatus> {
20self.mfa_delete.as_ref()
21 }
22}
23impl crate::s3_request_id::RequestIdExt for GetBucketVersioningOutput {
24fn extended_request_id(&self) -> Option<&str> {
25self._extended_request_id.as_deref()
26 }
27}
28impl ::aws_types::request_id::RequestId for GetBucketVersioningOutput {
29fn request_id(&self) -> Option<&str> {
30self._request_id.as_deref()
31 }
32}
33impl GetBucketVersioningOutput {
34/// Creates a new builder-style object to manufacture [`GetBucketVersioningOutput`](crate::operation::get_bucket_versioning::GetBucketVersioningOutput).
35pub fn builder() -> crate::operation::get_bucket_versioning::builders::GetBucketVersioningOutputBuilder {
36crate::operation::get_bucket_versioning::builders::GetBucketVersioningOutputBuilder::default()
37 }
38}
3940/// A builder for [`GetBucketVersioningOutput`](crate::operation::get_bucket_versioning::GetBucketVersioningOutput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct GetBucketVersioningOutputBuilder {
44pub(crate) status: ::std::option::Option<crate::types::BucketVersioningStatus>,
45pub(crate) mfa_delete: ::std::option::Option<crate::types::MfaDeleteStatus>,
46 _extended_request_id: Option<String>,
47 _request_id: Option<String>,
48}
49impl GetBucketVersioningOutputBuilder {
50/// <p>The versioning state of the bucket.</p>
51pub fn status(mut self, input: crate::types::BucketVersioningStatus) -> Self {
52self.status = ::std::option::Option::Some(input);
53self
54}
55/// <p>The versioning state of the bucket.</p>
56pub fn set_status(mut self, input: ::std::option::Option<crate::types::BucketVersioningStatus>) -> Self {
57self.status = input;
58self
59}
60/// <p>The versioning state of the bucket.</p>
61pub fn get_status(&self) -> &::std::option::Option<crate::types::BucketVersioningStatus> {
62&self.status
63 }
64/// <p>Specifies whether MFA delete is enabled in the bucket versioning configuration. This element is only returned if the bucket has been configured with MFA delete. If the bucket has never been so configured, this element is not returned.</p>
65pub fn mfa_delete(mut self, input: crate::types::MfaDeleteStatus) -> Self {
66self.mfa_delete = ::std::option::Option::Some(input);
67self
68}
69/// <p>Specifies whether MFA delete is enabled in the bucket versioning configuration. This element is only returned if the bucket has been configured with MFA delete. If the bucket has never been so configured, this element is not returned.</p>
70pub fn set_mfa_delete(mut self, input: ::std::option::Option<crate::types::MfaDeleteStatus>) -> Self {
71self.mfa_delete = input;
72self
73}
74/// <p>Specifies whether MFA delete is enabled in the bucket versioning configuration. This element is only returned if the bucket has been configured with MFA delete. If the bucket has never been so configured, this element is not returned.</p>
75pub fn get_mfa_delete(&self) -> &::std::option::Option<crate::types::MfaDeleteStatus> {
76&self.mfa_delete
77 }
78pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
79self._extended_request_id = Some(extended_request_id.into());
80self
81}
8283pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
84self._extended_request_id = extended_request_id;
85self
86}
87pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
88self._request_id = Some(request_id.into());
89self
90}
9192pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
93self._request_id = request_id;
94self
95}
96/// Consumes the builder and constructs a [`GetBucketVersioningOutput`](crate::operation::get_bucket_versioning::GetBucketVersioningOutput).
97pub fn build(self) -> crate::operation::get_bucket_versioning::GetBucketVersioningOutput {
98crate::operation::get_bucket_versioning::GetBucketVersioningOutput {
99 status: self.status,
100 mfa_delete: self.mfa_delete,
101 _extended_request_id: self._extended_request_id,
102 _request_id: self._request_id,
103 }
104 }
105}