aws_sdk_s3/operation/create_bucket/_create_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 CreateBucketOutput {
6 /// <p>A forward slash followed by the name of the bucket for all account regional namespace buckets and all global general purpose buckets created in us-east-1. For example, <code>/amzn-s3-demo-bucket</code>. For global general purpose buckets created in other Amazon Web Services Regions, the Location field is the global endpoint URL. For example, <code>http://amzn-s3-demo-bucket.s3.amazonaws.com/</code>.</p>
7 pub location: ::std::option::Option<::std::string::String>,
8 /// <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>
9 /// <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>
10 /// </note>
11 pub bucket_arn: ::std::option::Option<::std::string::String>,
12 _extended_request_id: Option<String>,
13 _request_id: Option<String>,
14}
15impl CreateBucketOutput {
16 /// <p>A forward slash followed by the name of the bucket for all account regional namespace buckets and all global general purpose buckets created in us-east-1. For example, <code>/amzn-s3-demo-bucket</code>. For global general purpose buckets created in other Amazon Web Services Regions, the Location field is the global endpoint URL. For example, <code>http://amzn-s3-demo-bucket.s3.amazonaws.com/</code>.</p>
17 pub fn location(&self) -> ::std::option::Option<&str> {
18 self.location.as_deref()
19 }
20 /// <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>
21 /// <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>
22 /// </note>
23 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 /// Creates a new builder-style object to manufacture [`CreateBucketOutput`](crate::operation::create_bucket::CreateBucketOutput).
39 pub fn builder() -> crate::operation::create_bucket::builders::CreateBucketOutputBuilder {
40 crate::operation::create_bucket::builders::CreateBucketOutputBuilder::default()
41 }
42}
43
44/// A builder for [`CreateBucketOutput`](crate::operation::create_bucket::CreateBucketOutput).
45#[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 /// <p>A forward slash followed by the name of the bucket for all account regional namespace buckets and all global general purpose buckets created in us-east-1. For example, <code>/amzn-s3-demo-bucket</code>. For global general purpose buckets created in other Amazon Web Services Regions, the Location field is the global endpoint URL. For example, <code>http://amzn-s3-demo-bucket.s3.amazonaws.com/</code>.</p>
55 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 /// <p>A forward slash followed by the name of the bucket for all account regional namespace buckets and all global general purpose buckets created in us-east-1. For example, <code>/amzn-s3-demo-bucket</code>. For global general purpose buckets created in other Amazon Web Services Regions, the Location field is the global endpoint URL. For example, <code>http://amzn-s3-demo-bucket.s3.amazonaws.com/</code>.</p>
60 pub fn set_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
61 self.location = input;
62 self
63 }
64 /// <p>A forward slash followed by the name of the bucket for all account regional namespace buckets and all global general purpose buckets created in us-east-1. For example, <code>/amzn-s3-demo-bucket</code>. For global general purpose buckets created in other Amazon Web Services Regions, the Location field is the global endpoint URL. For example, <code>http://amzn-s3-demo-bucket.s3.amazonaws.com/</code>.</p>
65 pub fn get_location(&self) -> &::std::option::Option<::std::string::String> {
66 &self.location
67 }
68 /// <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>
69 /// <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>
70 /// </note>
71 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 /// <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>
76 /// <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>
77 /// </note>
78 pub fn set_bucket_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79 self.bucket_arn = input;
80 self
81 }
82 /// <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>
83 /// <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>
84 /// </note>
85 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 /// Consumes the builder and constructs a [`CreateBucketOutput`](crate::operation::create_bucket::CreateBucketOutput).
107 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}