aws-sdk-s3 1.126.0

AWS SDK for Amazon Simple Storage Service
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 HeadBucketOutput {
    /// <p>The Amazon Resource Name (ARN) of the S3 bucket. ARNs uniquely identify Amazon Web Services resources across all of Amazon Web Services.</p><note>
    /// <p>This parameter is only supported for S3 directory buckets. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-tagging.html">Using tags with directory buckets</a>.</p>
    /// </note>
    pub bucket_arn: ::std::option::Option<::std::string::String>,
    /// <p>The type of location where the bucket is created.</p><note>
    /// <p>This functionality is only supported by directory buckets.</p>
    /// </note>
    pub bucket_location_type: ::std::option::Option<crate::types::LocationType>,
    /// <p>The name of the location where the bucket will be created.</p>
    /// <p>For directory buckets, the Zone ID of the Availability Zone or the Local Zone where the bucket is created. An example Zone ID value for an Availability Zone is <code>usw2-az1</code>.</p><note>
    /// <p>This functionality is only supported by directory buckets.</p>
    /// </note>
    pub bucket_location_name: ::std::option::Option<::std::string::String>,
    /// <p>The Region that the bucket is located.</p>
    pub bucket_region: ::std::option::Option<::std::string::String>,
    /// <p>Indicates whether the bucket name used in the request is an access point alias.</p><note>
    /// <p>For directory buckets, the value of this field is <code>false</code>.</p>
    /// </note>
    pub access_point_alias: ::std::option::Option<bool>,
    _extended_request_id: Option<String>,
    _request_id: Option<String>,
}
impl HeadBucketOutput {
    /// <p>The Amazon Resource Name (ARN) of the S3 bucket. ARNs uniquely identify Amazon Web Services resources across all of Amazon Web Services.</p><note>
    /// <p>This parameter is only supported for S3 directory buckets. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-tagging.html">Using tags with directory buckets</a>.</p>
    /// </note>
    pub fn bucket_arn(&self) -> ::std::option::Option<&str> {
        self.bucket_arn.as_deref()
    }
    /// <p>The type of location where the bucket is created.</p><note>
    /// <p>This functionality is only supported by directory buckets.</p>
    /// </note>
    pub fn bucket_location_type(&self) -> ::std::option::Option<&crate::types::LocationType> {
        self.bucket_location_type.as_ref()
    }
    /// <p>The name of the location where the bucket will be created.</p>
    /// <p>For directory buckets, the Zone ID of the Availability Zone or the Local Zone where the bucket is created. An example Zone ID value for an Availability Zone is <code>usw2-az1</code>.</p><note>
    /// <p>This functionality is only supported by directory buckets.</p>
    /// </note>
    pub fn bucket_location_name(&self) -> ::std::option::Option<&str> {
        self.bucket_location_name.as_deref()
    }
    /// <p>The Region that the bucket is located.</p>
    pub fn bucket_region(&self) -> ::std::option::Option<&str> {
        self.bucket_region.as_deref()
    }
    /// <p>Indicates whether the bucket name used in the request is an access point alias.</p><note>
    /// <p>For directory buckets, the value of this field is <code>false</code>.</p>
    /// </note>
    pub fn access_point_alias(&self) -> ::std::option::Option<bool> {
        self.access_point_alias
    }
}
impl crate::s3_request_id::RequestIdExt for HeadBucketOutput {
    fn extended_request_id(&self) -> Option<&str> {
        self._extended_request_id.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for HeadBucketOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl HeadBucketOutput {
    /// Creates a new builder-style object to manufacture [`HeadBucketOutput`](crate::operation::head_bucket::HeadBucketOutput).
    pub fn builder() -> crate::operation::head_bucket::builders::HeadBucketOutputBuilder {
        crate::operation::head_bucket::builders::HeadBucketOutputBuilder::default()
    }
}

/// A builder for [`HeadBucketOutput`](crate::operation::head_bucket::HeadBucketOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct HeadBucketOutputBuilder {
    pub(crate) bucket_arn: ::std::option::Option<::std::string::String>,
    pub(crate) bucket_location_type: ::std::option::Option<crate::types::LocationType>,
    pub(crate) bucket_location_name: ::std::option::Option<::std::string::String>,
    pub(crate) bucket_region: ::std::option::Option<::std::string::String>,
    pub(crate) access_point_alias: ::std::option::Option<bool>,
    _extended_request_id: Option<String>,
    _request_id: Option<String>,
}
impl HeadBucketOutputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the S3 bucket. ARNs uniquely identify Amazon Web Services resources across all of Amazon Web Services.</p><note>
    /// <p>This parameter is only supported for S3 directory buckets. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-tagging.html">Using tags with directory buckets</a>.</p>
    /// </note>
    pub fn bucket_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.bucket_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the S3 bucket. ARNs uniquely identify Amazon Web Services resources across all of Amazon Web Services.</p><note>
    /// <p>This parameter is only supported for S3 directory buckets. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-tagging.html">Using tags with directory buckets</a>.</p>
    /// </note>
    pub fn set_bucket_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.bucket_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the S3 bucket. ARNs uniquely identify Amazon Web Services resources across all of Amazon Web Services.</p><note>
    /// <p>This parameter is only supported for S3 directory buckets. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-tagging.html">Using tags with directory buckets</a>.</p>
    /// </note>
    pub fn get_bucket_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.bucket_arn
    }
    /// <p>The type of location where the bucket is created.</p><note>
    /// <p>This functionality is only supported by directory buckets.</p>
    /// </note>
    pub fn bucket_location_type(mut self, input: crate::types::LocationType) -> Self {
        self.bucket_location_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of location where the bucket is created.</p><note>
    /// <p>This functionality is only supported by directory buckets.</p>
    /// </note>
    pub fn set_bucket_location_type(mut self, input: ::std::option::Option<crate::types::LocationType>) -> Self {
        self.bucket_location_type = input;
        self
    }
    /// <p>The type of location where the bucket is created.</p><note>
    /// <p>This functionality is only supported by directory buckets.</p>
    /// </note>
    pub fn get_bucket_location_type(&self) -> &::std::option::Option<crate::types::LocationType> {
        &self.bucket_location_type
    }
    /// <p>The name of the location where the bucket will be created.</p>
    /// <p>For directory buckets, the Zone ID of the Availability Zone or the Local Zone where the bucket is created. An example Zone ID value for an Availability Zone is <code>usw2-az1</code>.</p><note>
    /// <p>This functionality is only supported by directory buckets.</p>
    /// </note>
    pub fn bucket_location_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.bucket_location_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the location where the bucket will be created.</p>
    /// <p>For directory buckets, the Zone ID of the Availability Zone or the Local Zone where the bucket is created. An example Zone ID value for an Availability Zone is <code>usw2-az1</code>.</p><note>
    /// <p>This functionality is only supported by directory buckets.</p>
    /// </note>
    pub fn set_bucket_location_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.bucket_location_name = input;
        self
    }
    /// <p>The name of the location where the bucket will be created.</p>
    /// <p>For directory buckets, the Zone ID of the Availability Zone or the Local Zone where the bucket is created. An example Zone ID value for an Availability Zone is <code>usw2-az1</code>.</p><note>
    /// <p>This functionality is only supported by directory buckets.</p>
    /// </note>
    pub fn get_bucket_location_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.bucket_location_name
    }
    /// <p>The Region that the bucket is located.</p>
    pub fn bucket_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.bucket_region = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Region that the bucket is located.</p>
    pub fn set_bucket_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.bucket_region = input;
        self
    }
    /// <p>The Region that the bucket is located.</p>
    pub fn get_bucket_region(&self) -> &::std::option::Option<::std::string::String> {
        &self.bucket_region
    }
    /// <p>Indicates whether the bucket name used in the request is an access point alias.</p><note>
    /// <p>For directory buckets, the value of this field is <code>false</code>.</p>
    /// </note>
    pub fn access_point_alias(mut self, input: bool) -> Self {
        self.access_point_alias = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the bucket name used in the request is an access point alias.</p><note>
    /// <p>For directory buckets, the value of this field is <code>false</code>.</p>
    /// </note>
    pub fn set_access_point_alias(mut self, input: ::std::option::Option<bool>) -> Self {
        self.access_point_alias = input;
        self
    }
    /// <p>Indicates whether the bucket name used in the request is an access point alias.</p><note>
    /// <p>For directory buckets, the value of this field is <code>false</code>.</p>
    /// </note>
    pub fn get_access_point_alias(&self) -> &::std::option::Option<bool> {
        &self.access_point_alias
    }
    pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
        self._extended_request_id = Some(extended_request_id.into());
        self
    }

    pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
        self._extended_request_id = extended_request_id;
        self
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`HeadBucketOutput`](crate::operation::head_bucket::HeadBucketOutput).
    pub fn build(self) -> crate::operation::head_bucket::HeadBucketOutput {
        crate::operation::head_bucket::HeadBucketOutput {
            bucket_arn: self.bucket_arn,
            bucket_location_type: self.bucket_location_type,
            bucket_location_name: self.bucket_location_name,
            bucket_region: self.bucket_region,
            access_point_alias: self.access_point_alias,
            _extended_request_id: self._extended_request_id,
            _request_id: self._request_id,
        }
    }
}