aws-sdk-s3control 1.118.0

AWS SDK for AWS S3 Control
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PutBucketVersioningInput {
    /// <p>The Amazon Web Services account ID of the S3 on Outposts bucket.</p>
    pub account_id: ::std::option::Option<::std::string::String>,
    /// <p>The S3 on Outposts bucket to set the versioning state for.</p>
    pub bucket: ::std::option::Option<::std::string::String>,
    /// <p>The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.</p>
    pub mfa: ::std::option::Option<::std::string::String>,
    /// <p>The root-level tag for the <code>VersioningConfiguration</code> parameters.</p>
    pub versioning_configuration: ::std::option::Option<crate::types::VersioningConfiguration>,
}
impl PutBucketVersioningInput {
    /// <p>The Amazon Web Services account ID of the S3 on Outposts bucket.</p>
    pub fn account_id(&self) -> ::std::option::Option<&str> {
        self.account_id.as_deref()
    }
    /// <p>The S3 on Outposts bucket to set the versioning state for.</p>
    pub fn bucket(&self) -> ::std::option::Option<&str> {
        self.bucket.as_deref()
    }
    /// <p>The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.</p>
    pub fn mfa(&self) -> ::std::option::Option<&str> {
        self.mfa.as_deref()
    }
    /// <p>The root-level tag for the <code>VersioningConfiguration</code> parameters.</p>
    pub fn versioning_configuration(&self) -> ::std::option::Option<&crate::types::VersioningConfiguration> {
        self.versioning_configuration.as_ref()
    }
}
impl PutBucketVersioningInput {
    /// Creates a new builder-style object to manufacture [`PutBucketVersioningInput`](crate::operation::put_bucket_versioning::PutBucketVersioningInput).
    pub fn builder() -> crate::operation::put_bucket_versioning::builders::PutBucketVersioningInputBuilder {
        crate::operation::put_bucket_versioning::builders::PutBucketVersioningInputBuilder::default()
    }
}

/// A builder for [`PutBucketVersioningInput`](crate::operation::put_bucket_versioning::PutBucketVersioningInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutBucketVersioningInputBuilder {
    pub(crate) account_id: ::std::option::Option<::std::string::String>,
    pub(crate) bucket: ::std::option::Option<::std::string::String>,
    pub(crate) mfa: ::std::option::Option<::std::string::String>,
    pub(crate) versioning_configuration: ::std::option::Option<crate::types::VersioningConfiguration>,
}
impl PutBucketVersioningInputBuilder {
    /// <p>The Amazon Web Services account ID of the S3 on Outposts bucket.</p>
    /// This field is required.
    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services account ID of the S3 on Outposts bucket.</p>
    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.account_id = input;
        self
    }
    /// <p>The Amazon Web Services account ID of the S3 on Outposts bucket.</p>
    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.account_id
    }
    /// <p>The S3 on Outposts bucket to set the versioning state for.</p>
    /// This field is required.
    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.bucket = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The S3 on Outposts bucket to set the versioning state for.</p>
    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.bucket = input;
        self
    }
    /// <p>The S3 on Outposts bucket to set the versioning state for.</p>
    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
        &self.bucket
    }
    /// <p>The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.</p>
    pub fn mfa(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.mfa = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.</p>
    pub fn set_mfa(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.mfa = input;
        self
    }
    /// <p>The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.</p>
    pub fn get_mfa(&self) -> &::std::option::Option<::std::string::String> {
        &self.mfa
    }
    /// <p>The root-level tag for the <code>VersioningConfiguration</code> parameters.</p>
    /// This field is required.
    pub fn versioning_configuration(mut self, input: crate::types::VersioningConfiguration) -> Self {
        self.versioning_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The root-level tag for the <code>VersioningConfiguration</code> parameters.</p>
    pub fn set_versioning_configuration(mut self, input: ::std::option::Option<crate::types::VersioningConfiguration>) -> Self {
        self.versioning_configuration = input;
        self
    }
    /// <p>The root-level tag for the <code>VersioningConfiguration</code> parameters.</p>
    pub fn get_versioning_configuration(&self) -> &::std::option::Option<crate::types::VersioningConfiguration> {
        &self.versioning_configuration
    }
    /// Consumes the builder and constructs a [`PutBucketVersioningInput`](crate::operation::put_bucket_versioning::PutBucketVersioningInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::put_bucket_versioning::PutBucketVersioningInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::put_bucket_versioning::PutBucketVersioningInput {
            account_id: self.account_id,
            bucket: self.bucket,
            mfa: self.mfa,
            versioning_configuration: self.versioning_configuration,
        })
    }
}