1 - | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 - |
|
3 - | /// <p>The journal table configuration for the S3 Metadata configuration.</p>
|
4 - | #[non_exhaustive]
|
5 - | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 - | pub struct JournalTableConfigurationResult {
|
7 - | /// <p>The status of the journal table. The status values are:</p>
|
8 - | /// <ul>
|
9 - | /// <li>
|
10 - | /// <p><code>CREATING</code> - The journal table is in the process of being created in the specified table bucket.</p></li>
|
11 - | /// <li>
|
12 - | /// <p><code>ACTIVE</code> - The journal table has been created successfully, and records are being delivered to the table.</p></li>
|
13 - | /// <li>
|
14 - | /// <p><code>FAILED</code> - Amazon S3 is unable to create the journal table, or Amazon S3 is unable to deliver records.</p></li>
|
15 - | /// </ul>
|
16 - | pub table_status: ::std::string::String,
|
17 - | /// <p>If an S3 Metadata V1 <code>CreateBucketMetadataTableConfiguration</code> or V2 <code>CreateBucketMetadataConfiguration</code> request succeeds, but S3 Metadata was unable to create the table, this structure contains the error code and error message.</p><note>
|
18 - | /// <p>If you created your S3 Metadata configuration before July 15, 2025, we recommend that you delete and re-create your configuration by using <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataConfiguration.html">CreateBucketMetadataConfiguration</a> so that you can expire journal table records and create a live inventory table.</p>
|
19 - | /// </note>
|
20 - | pub error: ::std::option::Option<crate::types::ErrorDetails>,
|
21 - | /// <p>The name of the journal table.</p>
|
22 - | pub table_name: ::std::string::String,
|
23 - | /// <p>The Amazon Resource Name (ARN) for the journal table.</p>
|
24 - | pub table_arn: ::std::option::Option<::std::string::String>,
|
25 - | /// <p>The journal table record expiration settings for the journal table.</p>
|
26 - | pub record_expiration: ::std::option::Option<crate::types::RecordExpiration>,
|
27 - | }
|
28 - | impl JournalTableConfigurationResult {
|
29 - | /// <p>The status of the journal table. The status values are:</p>
|
30 - | /// <ul>
|
31 - | /// <li>
|
32 - | /// <p><code>CREATING</code> - The journal table is in the process of being created in the specified table bucket.</p></li>
|
33 - | /// <li>
|
34 - | /// <p><code>ACTIVE</code> - The journal table has been created successfully, and records are being delivered to the table.</p></li>
|
35 - | /// <li>
|
36 - | /// <p><code>FAILED</code> - Amazon S3 is unable to create the journal table, or Amazon S3 is unable to deliver records.</p></li>
|
37 - | /// </ul>
|
38 - | pub fn table_status(&self) -> &str {
|
39 - | use std::ops::Deref;
|
40 - | self.table_status.deref()
|
41 - | }
|
42 - | /// <p>If an S3 Metadata V1 <code>CreateBucketMetadataTableConfiguration</code> or V2 <code>CreateBucketMetadataConfiguration</code> request succeeds, but S3 Metadata was unable to create the table, this structure contains the error code and error message.</p><note>
|
43 - | /// <p>If you created your S3 Metadata configuration before July 15, 2025, we recommend that you delete and re-create your configuration by using <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataConfiguration.html">CreateBucketMetadataConfiguration</a> so that you can expire journal table records and create a live inventory table.</p>
|
44 - | /// </note>
|
45 - | pub fn error(&self) -> ::std::option::Option<&crate::types::ErrorDetails> {
|
46 - | self.error.as_ref()
|
47 - | }
|
48 - | /// <p>The name of the journal table.</p>
|
49 - | pub fn table_name(&self) -> &str {
|
50 - | use std::ops::Deref;
|
51 - | self.table_name.deref()
|
52 - | }
|
53 - | /// <p>The Amazon Resource Name (ARN) for the journal table.</p>
|
54 - | pub fn table_arn(&self) -> ::std::option::Option<&str> {
|
55 - | self.table_arn.as_deref()
|
56 - | }
|
57 - | /// <p>The journal table record expiration settings for the journal table.</p>
|
58 - | pub fn record_expiration(&self) -> ::std::option::Option<&crate::types::RecordExpiration> {
|
59 - | self.record_expiration.as_ref()
|
60 - | }
|
61 - | }
|
62 - | impl JournalTableConfigurationResult {
|
63 - | /// Creates a new builder-style object to manufacture [`JournalTableConfigurationResult`](crate::types::JournalTableConfigurationResult).
|
64 - | pub fn builder() -> crate::types::builders::JournalTableConfigurationResultBuilder {
|
65 - | crate::types::builders::JournalTableConfigurationResultBuilder::default()
|
66 - | }
|
67 - | }
|
68 - |
|
69 - | /// A builder for [`JournalTableConfigurationResult`](crate::types::JournalTableConfigurationResult).
|
70 - | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
71 - | #[non_exhaustive]
|
72 - | pub struct JournalTableConfigurationResultBuilder {
|
73 - | pub(crate) table_status: ::std::option::Option<::std::string::String>,
|
74 - | pub(crate) error: ::std::option::Option<crate::types::ErrorDetails>,
|
75 - | pub(crate) table_name: ::std::option::Option<::std::string::String>,
|
76 - | pub(crate) table_arn: ::std::option::Option<::std::string::String>,
|
77 - | pub(crate) record_expiration: ::std::option::Option<crate::types::RecordExpiration>,
|
78 - | }
|
79 - | impl JournalTableConfigurationResultBuilder {
|
80 - | /// <p>The status of the journal table. The status values are:</p>
|
81 - | /// <ul>
|
82 - | /// <li>
|
83 - | /// <p><code>CREATING</code> - The journal table is in the process of being created in the specified table bucket.</p></li>
|
84 - | /// <li>
|
85 - | /// <p><code>ACTIVE</code> - The journal table has been created successfully, and records are being delivered to the table.</p></li>
|
86 - | /// <li>
|
87 - | /// <p><code>FAILED</code> - Amazon S3 is unable to create the journal table, or Amazon S3 is unable to deliver records.</p></li>
|
88 - | /// </ul>
|
89 - | /// This field is required.
|
90 - | pub fn table_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
91 - | self.table_status = ::std::option::Option::Some(input.into());
|
92 - | self
|
93 - | }
|
94 - | /// <p>The status of the journal table. The status values are:</p>
|
95 - | /// <ul>
|
96 - | /// <li>
|
97 - | /// <p><code>CREATING</code> - The journal table is in the process of being created in the specified table bucket.</p></li>
|
98 - | /// <li>
|
99 - | /// <p><code>ACTIVE</code> - The journal table has been created successfully, and records are being delivered to the table.</p></li>
|
100 - | /// <li>
|
101 - | /// <p><code>FAILED</code> - Amazon S3 is unable to create the journal table, or Amazon S3 is unable to deliver records.</p></li>
|
102 - | /// </ul>
|
103 - | pub fn set_table_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
104 - | self.table_status = input;
|
105 - | self
|
106 - | }
|
107 - | /// <p>The status of the journal table. The status values are:</p>
|
108 - | /// <ul>
|
109 - | /// <li>
|
110 - | /// <p><code>CREATING</code> - The journal table is in the process of being created in the specified table bucket.</p></li>
|
111 - | /// <li>
|
112 - | /// <p><code>ACTIVE</code> - The journal table has been created successfully, and records are being delivered to the table.</p></li>
|
113 - | /// <li>
|
114 - | /// <p><code>FAILED</code> - Amazon S3 is unable to create the journal table, or Amazon S3 is unable to deliver records.</p></li>
|
115 - | /// </ul>
|
116 - | pub fn get_table_status(&self) -> &::std::option::Option<::std::string::String> {
|
117 - | &self.table_status
|
118 - | }
|
119 - | /// <p>If an S3 Metadata V1 <code>CreateBucketMetadataTableConfiguration</code> or V2 <code>CreateBucketMetadataConfiguration</code> request succeeds, but S3 Metadata was unable to create the table, this structure contains the error code and error message.</p><note>
|
120 - | /// <p>If you created your S3 Metadata configuration before July 15, 2025, we recommend that you delete and re-create your configuration by using <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataConfiguration.html">CreateBucketMetadataConfiguration</a> so that you can expire journal table records and create a live inventory table.</p>
|
121 - | /// </note>
|
122 - | pub fn error(mut self, input: crate::types::ErrorDetails) -> Self {
|
123 - | self.error = ::std::option::Option::Some(input);
|
124 - | self
|
125 - | }
|
126 - | /// <p>If an S3 Metadata V1 <code>CreateBucketMetadataTableConfiguration</code> or V2 <code>CreateBucketMetadataConfiguration</code> request succeeds, but S3 Metadata was unable to create the table, this structure contains the error code and error message.</p><note>
|
127 - | /// <p>If you created your S3 Metadata configuration before July 15, 2025, we recommend that you delete and re-create your configuration by using <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataConfiguration.html">CreateBucketMetadataConfiguration</a> so that you can expire journal table records and create a live inventory table.</p>
|
128 - | /// </note>
|
129 - | pub fn set_error(mut self, input: ::std::option::Option<crate::types::ErrorDetails>) -> Self {
|
130 - | self.error = input;
|
131 - | self
|
132 - | }
|
133 - | /// <p>If an S3 Metadata V1 <code>CreateBucketMetadataTableConfiguration</code> or V2 <code>CreateBucketMetadataConfiguration</code> request succeeds, but S3 Metadata was unable to create the table, this structure contains the error code and error message.</p><note>
|
134 - | /// <p>If you created your S3 Metadata configuration before July 15, 2025, we recommend that you delete and re-create your configuration by using <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataConfiguration.html">CreateBucketMetadataConfiguration</a> so that you can expire journal table records and create a live inventory table.</p>
|
135 - | /// </note>
|
136 - | pub fn get_error(&self) -> &::std::option::Option<crate::types::ErrorDetails> {
|
137 - | &self.error
|
138 - | }
|
139 - | /// <p>The name of the journal table.</p>
|
140 - | /// This field is required.
|
141 - | pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
142 - | self.table_name = ::std::option::Option::Some(input.into());
|
143 - | self
|
144 - | }
|
145 - | /// <p>The name of the journal table.</p>
|
146 - | pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
147 - | self.table_name = input;
|
148 - | self
|
149 - | }
|
150 - | /// <p>The name of the journal table.</p>
|
151 - | pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
|
152 - | &self.table_name
|
153 - | }
|
154 - | /// <p>The Amazon Resource Name (ARN) for the journal table.</p>
|
155 - | pub fn table_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
156 - | self.table_arn = ::std::option::Option::Some(input.into());
|
157 - | self
|
158 - | }
|
159 - | /// <p>The Amazon Resource Name (ARN) for the journal table.</p>
|
160 - | pub fn set_table_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
161 - | self.table_arn = input;
|
162 - | self
|
163 - | }
|
164 - | /// <p>The Amazon Resource Name (ARN) for the journal table.</p>
|
165 - | pub fn get_table_arn(&self) -> &::std::option::Option<::std::string::String> {
|
166 - | &self.table_arn
|
167 - | }
|
168 - | /// <p>The journal table record expiration settings for the journal table.</p>
|
169 - | /// This field is required.
|
170 - | pub fn record_expiration(mut self, input: crate::types::RecordExpiration) -> Self {
|
171 - | self.record_expiration = ::std::option::Option::Some(input);
|
172 - | self
|
173 - | }
|
174 - | /// <p>The journal table record expiration settings for the journal table.</p>
|
175 - | pub fn set_record_expiration(mut self, input: ::std::option::Option<crate::types::RecordExpiration>) -> Self {
|
176 - | self.record_expiration = input;
|
177 - | self
|
178 - | }
|
179 - | /// <p>The journal table record expiration settings for the journal table.</p>
|
180 - | pub fn get_record_expiration(&self) -> &::std::option::Option<crate::types::RecordExpiration> {
|
181 - | &self.record_expiration
|
182 - | }
|
183 - | /// Consumes the builder and constructs a [`JournalTableConfigurationResult`](crate::types::JournalTableConfigurationResult).
|
184 - | /// This method will fail if any of the following fields are not set:
|
185 - | /// - [`table_status`](crate::types::builders::JournalTableConfigurationResultBuilder::table_status)
|
186 - | /// - [`table_name`](crate::types::builders::JournalTableConfigurationResultBuilder::table_name)
|
187 - | pub fn build(self) -> ::std::result::Result<crate::types::JournalTableConfigurationResult, ::aws_smithy_types::error::operation::BuildError> {
|
188 - | ::std::result::Result::Ok(crate::types::JournalTableConfigurationResult {
|
189 - | table_status: self.table_status.ok_or_else(|| {
|
190 - | ::aws_smithy_types::error::operation::BuildError::missing_field(
|
191 - | "table_status",
|
192 - | "table_status was not specified but it is required when building JournalTableConfigurationResult",
|
193 - | )
|
194 - | })?,
|
195 - | error: self.error,
|
196 - | table_name: self.table_name.ok_or_else(|| {
|
197 - | ::aws_smithy_types::error::operation::BuildError::missing_field(
|
198 - | "table_name",
|
199 - | "table_name was not specified but it is required when building JournalTableConfigurationResult",
|
200 - | )
|
201 - | })?,
|
202 - | table_arn: self.table_arn,
|
203 - | record_expiration: self.record_expiration,
|
204 - | })
|
205 - | }
|
206 - | }
|