aws_sdk_s3/operation/create_bucket/
_create_bucket_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateBucketOutput {
6 pub location: ::std::option::Option<::std::string::String>,
8 pub bucket_arn: ::std::option::Option<::std::string::String>,
12 _extended_request_id: Option<String>,
13 _request_id: Option<String>,
14}
15impl CreateBucketOutput {
16 pub fn location(&self) -> ::std::option::Option<&str> {
18 self.location.as_deref()
19 }
20 pub fn bucket_arn(&self) -> ::std::option::Option<&str> {
24 self.bucket_arn.as_deref()
25 }
26}
27impl crate::s3_request_id::RequestIdExt for CreateBucketOutput {
28 fn extended_request_id(&self) -> Option<&str> {
29 self._extended_request_id.as_deref()
30 }
31}
32impl ::aws_types::request_id::RequestId for CreateBucketOutput {
33 fn request_id(&self) -> Option<&str> {
34 self._request_id.as_deref()
35 }
36}
37impl CreateBucketOutput {
38 pub fn builder() -> crate::operation::create_bucket::builders::CreateBucketOutputBuilder {
40 crate::operation::create_bucket::builders::CreateBucketOutputBuilder::default()
41 }
42}
43
44#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
46#[non_exhaustive]
47pub struct CreateBucketOutputBuilder {
48 pub(crate) location: ::std::option::Option<::std::string::String>,
49 pub(crate) bucket_arn: ::std::option::Option<::std::string::String>,
50 _extended_request_id: Option<String>,
51 _request_id: Option<String>,
52}
53impl CreateBucketOutputBuilder {
54 pub fn location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
56 self.location = ::std::option::Option::Some(input.into());
57 self
58 }
59 pub fn set_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
61 self.location = input;
62 self
63 }
64 pub fn get_location(&self) -> &::std::option::Option<::std::string::String> {
66 &self.location
67 }
68 pub fn bucket_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
72 self.bucket_arn = ::std::option::Option::Some(input.into());
73 self
74 }
75 pub fn set_bucket_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79 self.bucket_arn = input;
80 self
81 }
82 pub fn get_bucket_arn(&self) -> &::std::option::Option<::std::string::String> {
86 &self.bucket_arn
87 }
88 pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
89 self._extended_request_id = Some(extended_request_id.into());
90 self
91 }
92
93 pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
94 self._extended_request_id = extended_request_id;
95 self
96 }
97 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
98 self._request_id = Some(request_id.into());
99 self
100 }
101
102 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
103 self._request_id = request_id;
104 self
105 }
106 pub fn build(self) -> crate::operation::create_bucket::CreateBucketOutput {
108 crate::operation::create_bucket::CreateBucketOutput {
109 location: self.location,
110 bucket_arn: self.bucket_arn,
111 _extended_request_id: self._extended_request_id,
112 _request_id: self._request_id,
113 }
114 }
115}