aws_sdk_s3/operation/head_bucket/
_head_bucket_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct HeadBucketOutput {
6 pub bucket_location_type: ::std::option::Option<crate::types::LocationType>,
10 pub bucket_location_name: ::std::option::Option<::std::string::String>,
15 pub bucket_region: ::std::option::Option<::std::string::String>,
17 pub access_point_alias: ::std::option::Option<bool>,
21 _extended_request_id: Option<String>,
22 _request_id: Option<String>,
23}
24impl HeadBucketOutput {
25 pub fn bucket_location_type(&self) -> ::std::option::Option<&crate::types::LocationType> {
29 self.bucket_location_type.as_ref()
30 }
31 pub fn bucket_location_name(&self) -> ::std::option::Option<&str> {
36 self.bucket_location_name.as_deref()
37 }
38 pub fn bucket_region(&self) -> ::std::option::Option<&str> {
40 self.bucket_region.as_deref()
41 }
42 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 pub fn builder() -> crate::operation::head_bucket::builders::HeadBucketOutputBuilder {
62 crate::operation::head_bucket::builders::HeadBucketOutputBuilder::default()
63 }
64}
65
66#[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 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 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 pub fn get_bucket_location_type(&self) -> &::std::option::Option<crate::types::LocationType> {
96 &self.bucket_location_type
97 }
98 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 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 pub fn get_bucket_location_name(&self) -> &::std::option::Option<::std::string::String> {
119 &self.bucket_location_name
120 }
121 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 pub fn set_bucket_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128 self.bucket_region = input;
129 self
130 }
131 pub fn get_bucket_region(&self) -> &::std::option::Option<::std::string::String> {
133 &self.bucket_region
134 }
135 pub fn access_point_alias(mut self, input: bool) -> Self {
139 self.access_point_alias = ::std::option::Option::Some(input);
140 self
141 }
142 pub fn set_access_point_alias(mut self, input: ::std::option::Option<bool>) -> Self {
146 self.access_point_alias = input;
147 self
148 }
149 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 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}