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