1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// 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 GetBucketLocationOutput {
    /// <p>Specifies the Region where the bucket resides. For a list of all the Amazon S3 supported location constraints by Region, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a>. Buckets in Region <code>us-east-1</code> have a LocationConstraint of <code>null</code>.</p>
    pub location_constraint: ::std::option::Option<crate::types::BucketLocationConstraint>,
    _extended_request_id: Option<String>,
    _request_id: Option<String>,
}
impl GetBucketLocationOutput {
    /// <p>Specifies the Region where the bucket resides. For a list of all the Amazon S3 supported location constraints by Region, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a>. Buckets in Region <code>us-east-1</code> have a LocationConstraint of <code>null</code>.</p>
    pub fn location_constraint(&self) -> ::std::option::Option<&crate::types::BucketLocationConstraint> {
        self.location_constraint.as_ref()
    }
}
impl crate::s3_request_id::RequestIdExt for GetBucketLocationOutput {
    fn extended_request_id(&self) -> Option<&str> {
        self._extended_request_id.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for GetBucketLocationOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetBucketLocationOutput {
    /// Creates a new builder-style object to manufacture [`GetBucketLocationOutput`](crate::operation::get_bucket_location::GetBucketLocationOutput).
    pub fn builder() -> crate::operation::get_bucket_location::builders::GetBucketLocationOutputBuilder {
        crate::operation::get_bucket_location::builders::GetBucketLocationOutputBuilder::default()
    }
}

/// A builder for [`GetBucketLocationOutput`](crate::operation::get_bucket_location::GetBucketLocationOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetBucketLocationOutputBuilder {
    pub(crate) location_constraint: ::std::option::Option<crate::types::BucketLocationConstraint>,
    _extended_request_id: Option<String>,
    _request_id: Option<String>,
}
impl GetBucketLocationOutputBuilder {
    /// <p>Specifies the Region where the bucket resides. For a list of all the Amazon S3 supported location constraints by Region, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a>. Buckets in Region <code>us-east-1</code> have a LocationConstraint of <code>null</code>.</p>
    pub fn location_constraint(mut self, input: crate::types::BucketLocationConstraint) -> Self {
        self.location_constraint = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the Region where the bucket resides. For a list of all the Amazon S3 supported location constraints by Region, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a>. Buckets in Region <code>us-east-1</code> have a LocationConstraint of <code>null</code>.</p>
    pub fn set_location_constraint(mut self, input: ::std::option::Option<crate::types::BucketLocationConstraint>) -> Self {
        self.location_constraint = input;
        self
    }
    /// <p>Specifies the Region where the bucket resides. For a list of all the Amazon S3 supported location constraints by Region, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a>. Buckets in Region <code>us-east-1</code> have a LocationConstraint of <code>null</code>.</p>
    pub fn get_location_constraint(&self) -> &::std::option::Option<crate::types::BucketLocationConstraint> {
        &self.location_constraint
    }
    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 [`GetBucketLocationOutput`](crate::operation::get_bucket_location::GetBucketLocationOutput).
    pub fn build(self) -> crate::operation::get_bucket_location::GetBucketLocationOutput {
        crate::operation::get_bucket_location::GetBucketLocationOutput {
            location_constraint: self.location_constraint,
            _extended_request_id: self._extended_request_id,
            _request_id: self._request_id,
        }
    }
}