3 3 | /// <p>In terms of implementation, a Bucket is a resource.</p>
|
4 4 | #[non_exhaustive]
|
5 5 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 6 | pub struct Bucket {
|
7 7 | /// <p>The name of the bucket.</p>
|
8 8 | pub name: ::std::option::Option<::std::string::String>,
|
9 9 | /// <p>Date the bucket was created. This date can change when making changes to your bucket, such as editing its bucket policy.</p>
|
10 10 | pub creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
|
11 11 | /// <p><code>BucketRegion</code> indicates the Amazon Web Services region where the bucket is located. If the request contains at least one valid parameter, it is included in the response.</p>
|
12 12 | pub bucket_region: ::std::option::Option<::std::string::String>,
|
13 - | /// <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>
|
14 - | /// <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>
|
15 - | /// </note>
|
16 - | pub bucket_arn: ::std::option::Option<::std::string::String>,
|
17 13 | }
|
18 14 | impl Bucket {
|
19 15 | /// <p>The name of the bucket.</p>
|
20 16 | pub fn name(&self) -> ::std::option::Option<&str> {
|
21 17 | self.name.as_deref()
|
22 18 | }
|
23 19 | /// <p>Date the bucket was created. This date can change when making changes to your bucket, such as editing its bucket policy.</p>
|
24 20 | pub fn creation_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
25 21 | self.creation_date.as_ref()
|
26 22 | }
|
27 23 | /// <p><code>BucketRegion</code> indicates the Amazon Web Services region where the bucket is located. If the request contains at least one valid parameter, it is included in the response.</p>
|
28 24 | pub fn bucket_region(&self) -> ::std::option::Option<&str> {
|
29 25 | self.bucket_region.as_deref()
|
30 26 | }
|
31 - | /// <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>
|
32 - | /// <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>
|
33 - | /// </note>
|
34 - | pub fn bucket_arn(&self) -> ::std::option::Option<&str> {
|
35 - | self.bucket_arn.as_deref()
|
36 - | }
|
37 27 | }
|
38 28 | impl Bucket {
|
39 29 | /// Creates a new builder-style object to manufacture [`Bucket`](crate::types::Bucket).
|
40 30 | pub fn builder() -> crate::types::builders::BucketBuilder {
|
41 31 | crate::types::builders::BucketBuilder::default()
|
42 32 | }
|
43 33 | }
|
44 34 |
|
45 35 | /// A builder for [`Bucket`](crate::types::Bucket).
|
46 36 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
47 37 | #[non_exhaustive]
|
48 38 | pub struct BucketBuilder {
|
49 39 | pub(crate) name: ::std::option::Option<::std::string::String>,
|
50 40 | pub(crate) creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
|
51 41 | pub(crate) bucket_region: ::std::option::Option<::std::string::String>,
|
52 - | pub(crate) bucket_arn: ::std::option::Option<::std::string::String>,
|
53 42 | }
|
54 43 | impl BucketBuilder {
|
55 44 | /// <p>The name of the bucket.</p>
|
56 45 | pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
57 46 | self.name = ::std::option::Option::Some(input.into());
|
58 47 | self
|
59 48 | }
|
60 49 | /// <p>The name of the bucket.</p>
|
61 50 | pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
62 51 | self.name = input;
|
63 52 | self
|
64 53 | }
|
65 54 | /// <p>The name of the bucket.</p>
|
66 55 | pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
|
67 56 | &self.name
|
68 57 | }
|
69 58 | /// <p>Date the bucket was created. This date can change when making changes to your bucket, such as editing its bucket policy.</p>
|
70 59 | pub fn creation_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
71 60 | self.creation_date = ::std::option::Option::Some(input);
|
72 61 | self
|
73 62 | }
|
74 63 | /// <p>Date the bucket was created. This date can change when making changes to your bucket, such as editing its bucket policy.</p>
|
75 64 | pub fn set_creation_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
76 65 | self.creation_date = input;
|
77 66 | self
|
78 67 | }
|
79 68 | /// <p>Date the bucket was created. This date can change when making changes to your bucket, such as editing its bucket policy.</p>
|
80 69 | pub fn get_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
81 70 | &self.creation_date
|
82 71 | }
|
83 72 | /// <p><code>BucketRegion</code> indicates the Amazon Web Services region where the bucket is located. If the request contains at least one valid parameter, it is included in the response.</p>
|
84 73 | pub fn bucket_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
85 74 | self.bucket_region = ::std::option::Option::Some(input.into());
|
86 75 | self
|
87 76 | }
|
88 77 | /// <p><code>BucketRegion</code> indicates the Amazon Web Services region where the bucket is located. If the request contains at least one valid parameter, it is included in the response.</p>
|
89 78 | pub fn set_bucket_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
90 79 | self.bucket_region = input;
|
91 80 | self
|
92 81 | }
|
93 82 | /// <p><code>BucketRegion</code> indicates the Amazon Web Services region where the bucket is located. If the request contains at least one valid parameter, it is included in the response.</p>
|
94 83 | pub fn get_bucket_region(&self) -> &::std::option::Option<::std::string::String> {
|
95 84 | &self.bucket_region
|
96 85 | }
|
97 - | /// <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>
|
98 - | /// <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>
|
99 - | /// </note>
|
100 - | pub fn bucket_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
101 - | self.bucket_arn = ::std::option::Option::Some(input.into());
|
102 - | self
|
103 - | }
|
104 - | /// <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>
|
105 - | /// <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>
|
106 - | /// </note>
|
107 - | pub fn set_bucket_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
108 - | self.bucket_arn = input;
|
109 - | self
|
110 - | }
|
111 - | /// <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>
|
112 - | /// <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>
|
113 - | /// </note>
|
114 - | pub fn get_bucket_arn(&self) -> &::std::option::Option<::std::string::String> {
|
115 - | &self.bucket_arn
|
116 - | }
|
117 86 | /// Consumes the builder and constructs a [`Bucket`](crate::types::Bucket).
|
118 87 | pub fn build(self) -> crate::types::Bucket {
|
119 88 | crate::types::Bucket {
|
120 89 | name: self.name,
|
121 90 | creation_date: self.creation_date,
|
122 91 | bucket_region: self.bucket_region,
|
123 - | bucket_arn: self.bucket_arn,
|
124 92 | }
|
125 93 | }
|
126 94 | }
|