aws_sdk_s3/operation/head_bucket/
_head_bucket_output.rs

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 HeadBucketOutput {
6    /// <p>The type of location where the bucket is created.</p><note>
7    /// <p>This functionality is only supported by directory buckets.</p>
8    /// </note>
9    pub bucket_location_type: ::std::option::Option<crate::types::LocationType>,
10    /// <p>The name of the location where the bucket will be created.</p>
11    /// <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>
12    /// <p>This functionality is only supported by directory buckets.</p>
13    /// </note>
14    pub bucket_location_name: ::std::option::Option<::std::string::String>,
15    /// <p>The Region that the bucket is located.</p>
16    pub bucket_region: ::std::option::Option<::std::string::String>,
17    /// <p>Indicates whether the bucket name used in the request is an access point alias.</p><note>
18    /// <p>For directory buckets, the value of this field is <code>false</code>.</p>
19    /// </note>
20    pub access_point_alias: ::std::option::Option<bool>,
21    _extended_request_id: Option<String>,
22    _request_id: Option<String>,
23}
24impl HeadBucketOutput {
25    /// <p>The type of location where the bucket is created.</p><note>
26    /// <p>This functionality is only supported by directory buckets.</p>
27    /// </note>
28    pub fn bucket_location_type(&self) -> ::std::option::Option<&crate::types::LocationType> {
29        self.bucket_location_type.as_ref()
30    }
31    /// <p>The name of the location where the bucket will be created.</p>
32    /// <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>
33    /// <p>This functionality is only supported by directory buckets.</p>
34    /// </note>
35    pub fn bucket_location_name(&self) -> ::std::option::Option<&str> {
36        self.bucket_location_name.as_deref()
37    }
38    /// <p>The Region that the bucket is located.</p>
39    pub fn bucket_region(&self) -> ::std::option::Option<&str> {
40        self.bucket_region.as_deref()
41    }
42    /// <p>Indicates whether the bucket name used in the request is an access point alias.</p><note>
43    /// <p>For directory buckets, the value of this field is <code>false</code>.</p>
44    /// </note>
45    pub fn access_point_alias(&self) -> ::std::option::Option<bool> {
46        self.access_point_alias
47    }
48}
49impl crate::s3_request_id::RequestIdExt for HeadBucketOutput {
50    fn extended_request_id(&self) -> Option<&str> {
51        self._extended_request_id.as_deref()
52    }
53}
54impl ::aws_types::request_id::RequestId for HeadBucketOutput {
55    fn request_id(&self) -> Option<&str> {
56        self._request_id.as_deref()
57    }
58}
59impl HeadBucketOutput {
60    /// Creates a new builder-style object to manufacture [`HeadBucketOutput`](crate::operation::head_bucket::HeadBucketOutput).
61    pub fn builder() -> crate::operation::head_bucket::builders::HeadBucketOutputBuilder {
62        crate::operation::head_bucket::builders::HeadBucketOutputBuilder::default()
63    }
64}
65
66/// A builder for [`HeadBucketOutput`](crate::operation::head_bucket::HeadBucketOutput).
67#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
68#[non_exhaustive]
69pub struct HeadBucketOutputBuilder {
70    pub(crate) bucket_location_type: ::std::option::Option<crate::types::LocationType>,
71    pub(crate) bucket_location_name: ::std::option::Option<::std::string::String>,
72    pub(crate) bucket_region: ::std::option::Option<::std::string::String>,
73    pub(crate) access_point_alias: ::std::option::Option<bool>,
74    _extended_request_id: Option<String>,
75    _request_id: Option<String>,
76}
77impl HeadBucketOutputBuilder {
78    /// <p>The type of location where the bucket is created.</p><note>
79    /// <p>This functionality is only supported by directory buckets.</p>
80    /// </note>
81    pub fn bucket_location_type(mut self, input: crate::types::LocationType) -> Self {
82        self.bucket_location_type = ::std::option::Option::Some(input);
83        self
84    }
85    /// <p>The type of location where the bucket is created.</p><note>
86    /// <p>This functionality is only supported by directory buckets.</p>
87    /// </note>
88    pub fn set_bucket_location_type(mut self, input: ::std::option::Option<crate::types::LocationType>) -> Self {
89        self.bucket_location_type = input;
90        self
91    }
92    /// <p>The type of location where the bucket is created.</p><note>
93    /// <p>This functionality is only supported by directory buckets.</p>
94    /// </note>
95    pub fn get_bucket_location_type(&self) -> &::std::option::Option<crate::types::LocationType> {
96        &self.bucket_location_type
97    }
98    /// <p>The name of the location where the bucket will be created.</p>
99    /// <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>
100    /// <p>This functionality is only supported by directory buckets.</p>
101    /// </note>
102    pub fn bucket_location_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103        self.bucket_location_name = ::std::option::Option::Some(input.into());
104        self
105    }
106    /// <p>The name of the location where the bucket will be created.</p>
107    /// <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>
108    /// <p>This functionality is only supported by directory buckets.</p>
109    /// </note>
110    pub fn set_bucket_location_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
111        self.bucket_location_name = input;
112        self
113    }
114    /// <p>The name of the location where the bucket will be created.</p>
115    /// <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>
116    /// <p>This functionality is only supported by directory buckets.</p>
117    /// </note>
118    pub fn get_bucket_location_name(&self) -> &::std::option::Option<::std::string::String> {
119        &self.bucket_location_name
120    }
121    /// <p>The Region that the bucket is located.</p>
122    pub fn bucket_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123        self.bucket_region = ::std::option::Option::Some(input.into());
124        self
125    }
126    /// <p>The Region that the bucket is located.</p>
127    pub fn set_bucket_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128        self.bucket_region = input;
129        self
130    }
131    /// <p>The Region that the bucket is located.</p>
132    pub fn get_bucket_region(&self) -> &::std::option::Option<::std::string::String> {
133        &self.bucket_region
134    }
135    /// <p>Indicates whether the bucket name used in the request is an access point alias.</p><note>
136    /// <p>For directory buckets, the value of this field is <code>false</code>.</p>
137    /// </note>
138    pub fn access_point_alias(mut self, input: bool) -> Self {
139        self.access_point_alias = ::std::option::Option::Some(input);
140        self
141    }
142    /// <p>Indicates whether the bucket name used in the request is an access point alias.</p><note>
143    /// <p>For directory buckets, the value of this field is <code>false</code>.</p>
144    /// </note>
145    pub fn set_access_point_alias(mut self, input: ::std::option::Option<bool>) -> Self {
146        self.access_point_alias = input;
147        self
148    }
149    /// <p>Indicates whether the bucket name used in the request is an access point alias.</p><note>
150    /// <p>For directory buckets, the value of this field is <code>false</code>.</p>
151    /// </note>
152    pub fn get_access_point_alias(&self) -> &::std::option::Option<bool> {
153        &self.access_point_alias
154    }
155    pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
156        self._extended_request_id = Some(extended_request_id.into());
157        self
158    }
159
160    pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
161        self._extended_request_id = extended_request_id;
162        self
163    }
164    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
165        self._request_id = Some(request_id.into());
166        self
167    }
168
169    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
170        self._request_id = request_id;
171        self
172    }
173    /// Consumes the builder and constructs a [`HeadBucketOutput`](crate::operation::head_bucket::HeadBucketOutput).
174    pub fn build(self) -> crate::operation::head_bucket::HeadBucketOutput {
175        crate::operation::head_bucket::HeadBucketOutput {
176            bucket_location_type: self.bucket_location_type,
177            bucket_location_name: self.bucket_location_name,
178            bucket_region: self.bucket_region,
179            access_point_alias: self.access_point_alias,
180            _extended_request_id: self._extended_request_id,
181            _request_id: self._request_id,
182        }
183    }
184}