AWS SDK

AWS SDK

rev. 54a52cba1f1ff5fc52d06b3721da33bf6bc3bfda

Files changed:

tmp-codegen-diff/aws-sdk/sdk/s3/src/types/_inventory_configuration.rs

@@ -1,1 +33,33 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
    3         -
/// <p>Specifies the S3 Inventory configuration for an Amazon S3 bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETInventoryConfig.html">GET Bucket inventory</a> in the <i>Amazon S3 API Reference</i>.</p>
           3  +
/// <p>Specifies the inventory configuration for an Amazon S3 bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETInventoryConfig.html">GET Bucket inventory</a> in the <i>Amazon S3 API Reference</i>.</p>
    4      4   
#[non_exhaustive]
    5      5   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6      6   
pub struct InventoryConfiguration {
    7      7   
    /// <p>Contains information about where to publish the inventory results.</p>
    8      8   
    pub destination: ::std::option::Option<crate::types::InventoryDestination>,
    9      9   
    /// <p>Specifies whether the inventory is enabled or disabled. If set to <code>True</code>, an inventory list is generated. If set to <code>False</code>, no inventory list is generated.</p>
   10     10   
    pub is_enabled: bool,
   11     11   
    /// <p>Specifies an inventory filter. The inventory only includes objects that meet the filter's criteria.</p>
   12     12   
    pub filter: ::std::option::Option<crate::types::InventoryFilter>,
   13     13   
    /// <p>The ID used to identify the inventory configuration.</p>

tmp-codegen-diff/aws-sdk/sdk/s3/src/types/_inventory_configuration_state.rs

@@ -1,0 +108,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// When writing a match expression against `InventoryConfigurationState`, it is important to ensure
    4         -
/// your code is forward-compatible. That is, if a match arm handles a case for a
    5         -
/// feature that is supported by the service but has not been represented as an enum
    6         -
/// variant in a current version of SDK, your code should continue to work when you
    7         -
/// upgrade SDK to a future version in which the enum does include a variant for that
    8         -
/// feature.
    9         -
///
   10         -
/// Here is an example of how you can make a match expression forward-compatible:
   11         -
///
   12         -
/// ```text
   13         -
/// # let inventoryconfigurationstate = unimplemented!();
   14         -
/// match inventoryconfigurationstate {
   15         -
///     InventoryConfigurationState::Disabled => { /* ... */ },
   16         -
///     InventoryConfigurationState::Enabled => { /* ... */ },
   17         -
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
   18         -
///     _ => { /* ... */ },
   19         -
/// }
   20         -
/// ```
   21         -
/// The above code demonstrates that when `inventoryconfigurationstate` represents
   22         -
/// `NewFeature`, the execution path will lead to the second last match arm,
   23         -
/// even though the enum does not contain a variant `InventoryConfigurationState::NewFeature`
   24         -
/// in the current version of SDK. The reason is that the variable `other`,
   25         -
/// created by the `@` operator, is bound to
   26         -
/// `InventoryConfigurationState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
   27         -
/// and calling `as_str` on it yields `"NewFeature"`.
   28         -
/// This match expression is forward-compatible when executed with a newer
   29         -
/// version of SDK where the variant `InventoryConfigurationState::NewFeature` is defined.
   30         -
/// Specifically, when `inventoryconfigurationstate` represents `NewFeature`,
   31         -
/// the execution path will hit the second last match arm as before by virtue of
   32         -
/// calling `as_str` on `InventoryConfigurationState::NewFeature` also yielding `"NewFeature"`.
   33         -
///
   34         -
/// Explicitly matching on the `Unknown` variant should
   35         -
/// be avoided for two reasons:
   36         -
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
   37         -
/// - It might inadvertently shadow other intended match arms.
   38         -
///
   39         -
#[allow(missing_docs)] // documentation missing in model
   40         -
#[non_exhaustive]
   41         -
#[derive(
   42         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash,
   43         -
)]
   44         -
pub enum InventoryConfigurationState {
   45         -
    #[allow(missing_docs)] // documentation missing in model
   46         -
    Disabled,
   47         -
    #[allow(missing_docs)] // documentation missing in model
   48         -
    Enabled,
   49         -
    /// `Unknown` contains new variants that have been added since this code was generated.
   50         -
    #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")]
   51         -
    Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue),
   52         -
}
   53         -
impl ::std::convert::From<&str> for InventoryConfigurationState {
   54         -
    fn from(s: &str) -> Self {
   55         -
        match s {
   56         -
            "DISABLED" => InventoryConfigurationState::Disabled,
   57         -
            "ENABLED" => InventoryConfigurationState::Enabled,
   58         -
            other => InventoryConfigurationState::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())),
   59         -
        }
   60         -
    }
   61         -
}
   62         -
impl ::std::str::FromStr for InventoryConfigurationState {
   63         -
    type Err = ::std::convert::Infallible;
   64         -
   65         -
    fn from_str(s: &str) -> ::std::result::Result<Self, <Self as ::std::str::FromStr>::Err> {
   66         -
        ::std::result::Result::Ok(InventoryConfigurationState::from(s))
   67         -
    }
   68         -
}
   69         -
impl InventoryConfigurationState {
   70         -
    /// Returns the `&str` value of the enum member.
   71         -
    pub fn as_str(&self) -> &str {
   72         -
        match self {
   73         -
            InventoryConfigurationState::Disabled => "DISABLED",
   74         -
            InventoryConfigurationState::Enabled => "ENABLED",
   75         -
            InventoryConfigurationState::Unknown(value) => value.as_str(),
   76         -
        }
   77         -
    }
   78         -
    /// Returns all the `&str` representations of the enum members.
   79         -
    pub const fn values() -> &'static [&'static str] {
   80         -
        &["DISABLED", "ENABLED"]
   81         -
    }
   82         -
}
   83         -
impl ::std::convert::AsRef<str> for InventoryConfigurationState {
   84         -
    fn as_ref(&self) -> &str {
   85         -
        self.as_str()
   86         -
    }
   87         -
}
   88         -
impl InventoryConfigurationState {
   89         -
    /// Parses the enum value while disallowing unknown variants.
   90         -
    ///
   91         -
    /// Unknown variants will result in an error.
   92         -
    pub fn try_parse(value: &str) -> ::std::result::Result<Self, crate::error::UnknownVariantError> {
   93         -
        match Self::from(value) {
   94         -
            #[allow(deprecated)]
   95         -
            Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)),
   96         -
            known => Ok(known),
   97         -
        }
   98         -
    }
   99         -
}
  100         -
impl ::std::fmt::Display for InventoryConfigurationState {
  101         -
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
  102         -
        match self {
  103         -
            InventoryConfigurationState::Disabled => write!(f, "DISABLED"),
  104         -
            InventoryConfigurationState::Enabled => write!(f, "ENABLED"),
  105         -
            InventoryConfigurationState::Unknown(value) => write!(f, "{value}"),
  106         -
        }
  107         -
    }
  108         -
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/types/_inventory_destination.rs

@@ -1,1 +33,33 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
    3         -
/// <p>Specifies the S3 Inventory configuration for an Amazon S3 bucket.</p>
           3  +
/// <p>Specifies the inventory configuration for an Amazon S3 bucket.</p>
    4      4   
#[non_exhaustive]
    5      5   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6      6   
pub struct InventoryDestination {
    7      7   
    /// <p>Contains the bucket name, file format, bucket owner (optional), and prefix (optional) where inventory results are published.</p>
    8      8   
    pub s3_bucket_destination: ::std::option::Option<crate::types::InventoryS3BucketDestination>,
    9      9   
}
   10     10   
impl InventoryDestination {
   11     11   
    /// <p>Contains the bucket name, file format, bucket owner (optional), and prefix (optional) where inventory results are published.</p>
   12     12   
    pub fn s3_bucket_destination(&self) -> ::std::option::Option<&crate::types::InventoryS3BucketDestination> {
   13     13   
        self.s3_bucket_destination.as_ref()

tmp-codegen-diff/aws-sdk/sdk/s3/src/types/_inventory_encryption.rs

@@ -1,1 +33,33 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
    3         -
/// <p>Contains the type of server-side encryption used to encrypt the S3 Inventory results.</p>
           3  +
/// <p>Contains the type of server-side encryption used to encrypt the inventory results.</p>
    4      4   
#[non_exhaustive]
    5      5   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6      6   
pub struct InventoryEncryption {
    7      7   
    /// <p>Specifies the use of SSE-S3 to encrypt delivered inventory reports.</p>
    8      8   
    pub sses3: ::std::option::Option<crate::types::Sses3>,
    9      9   
    /// <p>Specifies the use of SSE-KMS to encrypt delivered inventory reports.</p>
   10     10   
    pub ssekms: ::std::option::Option<crate::types::Ssekms>,
   11     11   
}
   12     12   
impl InventoryEncryption {
   13     13   
    /// <p>Specifies the use of SSE-S3 to encrypt delivered inventory reports.</p>

tmp-codegen-diff/aws-sdk/sdk/s3/src/types/_inventory_filter.rs

@@ -1,1 +33,33 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
    3         -
/// <p>Specifies an S3 Inventory filter. The inventory only includes objects that meet the filter's criteria.</p>
           3  +
/// <p>Specifies an inventory filter. The inventory only includes objects that meet the filter's criteria.</p>
    4      4   
#[non_exhaustive]
    5      5   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6      6   
pub struct InventoryFilter {
    7      7   
    /// <p>The prefix that an object must have to be included in the inventory results.</p>
    8      8   
    pub prefix: ::std::string::String,
    9      9   
}
   10     10   
impl InventoryFilter {
   11     11   
    /// <p>The prefix that an object must have to be included in the inventory results.</p>
   12     12   
    pub fn prefix(&self) -> &str {
   13     13   
        use std::ops::Deref;

tmp-codegen-diff/aws-sdk/sdk/s3/src/types/_inventory_s3_bucket_destination.rs

@@ -1,1 +33,33 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
    3         -
/// <p>Contains the bucket name, file format, bucket owner (optional), and prefix (optional) where S3 Inventory results are published.</p>
           3  +
/// <p>Contains the bucket name, file format, bucket owner (optional), and prefix (optional) where inventory results are published.</p>
    4      4   
#[non_exhaustive]
    5      5   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6      6   
pub struct InventoryS3BucketDestination {
    7      7   
    /// <p>The account ID that owns the destination S3 bucket. If no account ID is provided, the owner is not validated before exporting data.</p><note>
    8      8   
    /// <p>Although this value is optional, we strongly recommend that you set it to help prevent problems if the destination bucket ownership changes.</p>
    9      9   
    /// </note>
   10     10   
    pub account_id: ::std::option::Option<::std::string::String>,
   11     11   
    /// <p>The Amazon Resource Name (ARN) of the bucket where inventory results will be published.</p>
   12     12   
    pub bucket: ::std::string::String,
   13     13   
    /// <p>Specifies the output format of the inventory results.</p>

tmp-codegen-diff/aws-sdk/sdk/s3/src/types/_inventory_schedule.rs

@@ -1,1 +33,33 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
    3         -
/// <p>Specifies the schedule for generating S3 Inventory results.</p>
           3  +
/// <p>Specifies the schedule for generating inventory results.</p>
    4      4   
#[non_exhaustive]
    5      5   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6      6   
pub struct InventorySchedule {
    7      7   
    /// <p>Specifies how frequently inventory results are produced.</p>
    8      8   
    pub frequency: crate::types::InventoryFrequency,
    9      9   
}
   10     10   
impl InventorySchedule {
   11     11   
    /// <p>Specifies how frequently inventory results are produced.</p>
   12     12   
    pub fn frequency(&self) -> &crate::types::InventoryFrequency {
   13     13   
        &self.frequency

tmp-codegen-diff/aws-sdk/sdk/s3/src/types/_inventory_table_configuration.rs

@@ -1,0 +80,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>The inventory table configuration for an S3 Metadata configuration.</p>
    4         -
#[non_exhaustive]
    5         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6         -
pub struct InventoryTableConfiguration {
    7         -
    /// <p>The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.</p>
    8         -
    pub configuration_state: crate::types::InventoryConfigurationState,
    9         -
    /// <p>The encryption configuration for the inventory table.</p>
   10         -
    pub encryption_configuration: ::std::option::Option<crate::types::MetadataTableEncryptionConfiguration>,
   11         -
}
   12         -
impl InventoryTableConfiguration {
   13         -
    /// <p>The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.</p>
   14         -
    pub fn configuration_state(&self) -> &crate::types::InventoryConfigurationState {
   15         -
        &self.configuration_state
   16         -
    }
   17         -
    /// <p>The encryption configuration for the inventory table.</p>
   18         -
    pub fn encryption_configuration(&self) -> ::std::option::Option<&crate::types::MetadataTableEncryptionConfiguration> {
   19         -
        self.encryption_configuration.as_ref()
   20         -
    }
   21         -
}
   22         -
impl InventoryTableConfiguration {
   23         -
    /// Creates a new builder-style object to manufacture [`InventoryTableConfiguration`](crate::types::InventoryTableConfiguration).
   24         -
    pub fn builder() -> crate::types::builders::InventoryTableConfigurationBuilder {
   25         -
        crate::types::builders::InventoryTableConfigurationBuilder::default()
   26         -
    }
   27         -
}
   28         -
   29         -
/// A builder for [`InventoryTableConfiguration`](crate::types::InventoryTableConfiguration).
   30         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   31         -
#[non_exhaustive]
   32         -
pub struct InventoryTableConfigurationBuilder {
   33         -
    pub(crate) configuration_state: ::std::option::Option<crate::types::InventoryConfigurationState>,
   34         -
    pub(crate) encryption_configuration: ::std::option::Option<crate::types::MetadataTableEncryptionConfiguration>,
   35         -
}
   36         -
impl InventoryTableConfigurationBuilder {
   37         -
    /// <p>The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.</p>
   38         -
    /// This field is required.
   39         -
    pub fn configuration_state(mut self, input: crate::types::InventoryConfigurationState) -> Self {
   40         -
        self.configuration_state = ::std::option::Option::Some(input);
   41         -
        self
   42         -
    }
   43         -
    /// <p>The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.</p>
   44         -
    pub fn set_configuration_state(mut self, input: ::std::option::Option<crate::types::InventoryConfigurationState>) -> Self {
   45         -
        self.configuration_state = input;
   46         -
        self
   47         -
    }
   48         -
    /// <p>The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.</p>
   49         -
    pub fn get_configuration_state(&self) -> &::std::option::Option<crate::types::InventoryConfigurationState> {
   50         -
        &self.configuration_state
   51         -
    }
   52         -
    /// <p>The encryption configuration for the inventory table.</p>
   53         -
    pub fn encryption_configuration(mut self, input: crate::types::MetadataTableEncryptionConfiguration) -> Self {
   54         -
        self.encryption_configuration = ::std::option::Option::Some(input);
   55         -
        self
   56         -
    }
   57         -
    /// <p>The encryption configuration for the inventory table.</p>
   58         -
    pub fn set_encryption_configuration(mut self, input: ::std::option::Option<crate::types::MetadataTableEncryptionConfiguration>) -> Self {
   59         -
        self.encryption_configuration = input;
   60         -
        self
   61         -
    }
   62         -
    /// <p>The encryption configuration for the inventory table.</p>
   63         -
    pub fn get_encryption_configuration(&self) -> &::std::option::Option<crate::types::MetadataTableEncryptionConfiguration> {
   64         -
        &self.encryption_configuration
   65         -
    }
   66         -
    /// Consumes the builder and constructs a [`InventoryTableConfiguration`](crate::types::InventoryTableConfiguration).
   67         -
    /// This method will fail if any of the following fields are not set:
   68         -
    /// - [`configuration_state`](crate::types::builders::InventoryTableConfigurationBuilder::configuration_state)
   69         -
    pub fn build(self) -> ::std::result::Result<crate::types::InventoryTableConfiguration, ::aws_smithy_types::error::operation::BuildError> {
   70         -
        ::std::result::Result::Ok(crate::types::InventoryTableConfiguration {
   71         -
            configuration_state: self.configuration_state.ok_or_else(|| {
   72         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
   73         -
                    "configuration_state",
   74         -
                    "configuration_state was not specified but it is required when building InventoryTableConfiguration",
   75         -
                )
   76         -
            })?,
   77         -
            encryption_configuration: self.encryption_configuration,
   78         -
        })
   79         -
    }
   80         -
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/types/_inventory_table_configuration_result.rs

@@ -1,0 +206,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>The inventory table configuration for an S3 Metadata configuration.</p>
    4         -
#[non_exhaustive]
    5         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6         -
pub struct InventoryTableConfigurationResult {
    7         -
    /// <p>The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.</p>
    8         -
    pub configuration_state: crate::types::InventoryConfigurationState,
    9         -
    /// <p>The status of the inventory table. The status values are:</p>
   10         -
    /// <ul>
   11         -
    /// <li>
   12         -
    /// <p><code>CREATING</code> - The inventory table is in the process of being created in the specified Amazon Web Services managed table bucket.</p></li>
   13         -
    /// <li>
   14         -
    /// <p><code>BACKFILLING</code> - The inventory table is in the process of being backfilled. When you enable the inventory table for your metadata configuration, the table goes through a process known as backfilling, during which Amazon S3 scans your general purpose bucket to retrieve the initial metadata for all objects in the bucket. Depending on the number of objects in your bucket, this process can take several hours. When the backfilling process is finished, the status of your inventory table changes from <code>BACKFILLING</code> to <code>ACTIVE</code>. After backfilling is completed, updates to your objects are reflected in the inventory table within one hour.</p></li>
   15         -
    /// <li>
   16         -
    /// <p><code>ACTIVE</code> - The inventory table has been created successfully, and records are being delivered to the table.</p></li>
   17         -
    /// <li>
   18         -
    /// <p><code>FAILED</code> - Amazon S3 is unable to create the inventory table, or Amazon S3 is unable to deliver records.</p></li>
   19         -
    /// </ul>
   20         -
    pub table_status: ::std::option::Option<::std::string::String>,
   21         -
    /// <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>
   22         -
    /// <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>
   23         -
    /// </note>
   24         -
    pub error: ::std::option::Option<crate::types::ErrorDetails>,
   25         -
    /// <p>The name of the inventory table.</p>
   26         -
    pub table_name: ::std::option::Option<::std::string::String>,
   27         -
    /// <p>The Amazon Resource Name (ARN) for the inventory table.</p>
   28         -
    pub table_arn: ::std::option::Option<::std::string::String>,
   29         -
}
   30         -
impl InventoryTableConfigurationResult {
   31         -
    /// <p>The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.</p>
   32         -
    pub fn configuration_state(&self) -> &crate::types::InventoryConfigurationState {
   33         -
        &self.configuration_state
   34         -
    }
   35         -
    /// <p>The status of the inventory table. The status values are:</p>
   36         -
    /// <ul>
   37         -
    /// <li>
   38         -
    /// <p><code>CREATING</code> - The inventory table is in the process of being created in the specified Amazon Web Services managed table bucket.</p></li>
   39         -
    /// <li>
   40         -
    /// <p><code>BACKFILLING</code> - The inventory table is in the process of being backfilled. When you enable the inventory table for your metadata configuration, the table goes through a process known as backfilling, during which Amazon S3 scans your general purpose bucket to retrieve the initial metadata for all objects in the bucket. Depending on the number of objects in your bucket, this process can take several hours. When the backfilling process is finished, the status of your inventory table changes from <code>BACKFILLING</code> to <code>ACTIVE</code>. After backfilling is completed, updates to your objects are reflected in the inventory table within one hour.</p></li>
   41         -
    /// <li>
   42         -
    /// <p><code>ACTIVE</code> - The inventory table has been created successfully, and records are being delivered to the table.</p></li>
   43         -
    /// <li>
   44         -
    /// <p><code>FAILED</code> - Amazon S3 is unable to create the inventory table, or Amazon S3 is unable to deliver records.</p></li>
   45         -
    /// </ul>
   46         -
    pub fn table_status(&self) -> ::std::option::Option<&str> {
   47         -
        self.table_status.as_deref()
   48         -
    }
   49         -
    /// <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>
   50         -
    /// <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>
   51         -
    /// </note>
   52         -
    pub fn error(&self) -> ::std::option::Option<&crate::types::ErrorDetails> {
   53         -
        self.error.as_ref()
   54         -
    }
   55         -
    /// <p>The name of the inventory table.</p>
   56         -
    pub fn table_name(&self) -> ::std::option::Option<&str> {
   57         -
        self.table_name.as_deref()
   58         -
    }
   59         -
    /// <p>The Amazon Resource Name (ARN) for the inventory table.</p>
   60         -
    pub fn table_arn(&self) -> ::std::option::Option<&str> {
   61         -
        self.table_arn.as_deref()
   62         -
    }
   63         -
}
   64         -
impl InventoryTableConfigurationResult {
   65         -
    /// Creates a new builder-style object to manufacture [`InventoryTableConfigurationResult`](crate::types::InventoryTableConfigurationResult).
   66         -
    pub fn builder() -> crate::types::builders::InventoryTableConfigurationResultBuilder {
   67         -
        crate::types::builders::InventoryTableConfigurationResultBuilder::default()
   68         -
    }
   69         -
}
   70         -
   71         -
/// A builder for [`InventoryTableConfigurationResult`](crate::types::InventoryTableConfigurationResult).
   72         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   73         -
#[non_exhaustive]
   74         -
pub struct InventoryTableConfigurationResultBuilder {
   75         -
    pub(crate) configuration_state: ::std::option::Option<crate::types::InventoryConfigurationState>,
   76         -
    pub(crate) table_status: ::std::option::Option<::std::string::String>,
   77         -
    pub(crate) error: ::std::option::Option<crate::types::ErrorDetails>,
   78         -
    pub(crate) table_name: ::std::option::Option<::std::string::String>,
   79         -
    pub(crate) table_arn: ::std::option::Option<::std::string::String>,
   80         -
}
   81         -
impl InventoryTableConfigurationResultBuilder {
   82         -
    /// <p>The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.</p>
   83         -
    /// This field is required.
   84         -
    pub fn configuration_state(mut self, input: crate::types::InventoryConfigurationState) -> Self {
   85         -
        self.configuration_state = ::std::option::Option::Some(input);
   86         -
        self
   87         -
    }
   88         -
    /// <p>The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.</p>
   89         -
    pub fn set_configuration_state(mut self, input: ::std::option::Option<crate::types::InventoryConfigurationState>) -> Self {
   90         -
        self.configuration_state = input;
   91         -
        self
   92         -
    }
   93         -
    /// <p>The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.</p>
   94         -
    pub fn get_configuration_state(&self) -> &::std::option::Option<crate::types::InventoryConfigurationState> {
   95         -
        &self.configuration_state
   96         -
    }
   97         -
    /// <p>The status of the inventory table. The status values are:</p>
   98         -
    /// <ul>
   99         -
    /// <li>
  100         -
    /// <p><code>CREATING</code> - The inventory table is in the process of being created in the specified Amazon Web Services managed table bucket.</p></li>
  101         -
    /// <li>
  102         -
    /// <p><code>BACKFILLING</code> - The inventory table is in the process of being backfilled. When you enable the inventory table for your metadata configuration, the table goes through a process known as backfilling, during which Amazon S3 scans your general purpose bucket to retrieve the initial metadata for all objects in the bucket. Depending on the number of objects in your bucket, this process can take several hours. When the backfilling process is finished, the status of your inventory table changes from <code>BACKFILLING</code> to <code>ACTIVE</code>. After backfilling is completed, updates to your objects are reflected in the inventory table within one hour.</p></li>
  103         -
    /// <li>
  104         -
    /// <p><code>ACTIVE</code> - The inventory table has been created successfully, and records are being delivered to the table.</p></li>
  105         -
    /// <li>
  106         -
    /// <p><code>FAILED</code> - Amazon S3 is unable to create the inventory table, or Amazon S3 is unable to deliver records.</p></li>
  107         -
    /// </ul>
  108         -
    pub fn table_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  109         -
        self.table_status = ::std::option::Option::Some(input.into());
  110         -
        self
  111         -
    }
  112         -
    /// <p>The status of the inventory table. The status values are:</p>
  113         -
    /// <ul>
  114         -
    /// <li>
  115         -
    /// <p><code>CREATING</code> - The inventory table is in the process of being created in the specified Amazon Web Services managed table bucket.</p></li>
  116         -
    /// <li>
  117         -
    /// <p><code>BACKFILLING</code> - The inventory table is in the process of being backfilled. When you enable the inventory table for your metadata configuration, the table goes through a process known as backfilling, during which Amazon S3 scans your general purpose bucket to retrieve the initial metadata for all objects in the bucket. Depending on the number of objects in your bucket, this process can take several hours. When the backfilling process is finished, the status of your inventory table changes from <code>BACKFILLING</code> to <code>ACTIVE</code>. After backfilling is completed, updates to your objects are reflected in the inventory table within one hour.</p></li>
  118         -
    /// <li>
  119         -
    /// <p><code>ACTIVE</code> - The inventory table has been created successfully, and records are being delivered to the table.</p></li>
  120         -
    /// <li>
  121         -
    /// <p><code>FAILED</code> - Amazon S3 is unable to create the inventory table, or Amazon S3 is unable to deliver records.</p></li>
  122         -
    /// </ul>
  123         -
    pub fn set_table_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  124         -
        self.table_status = input;
  125         -
        self
  126         -
    }
  127         -
    /// <p>The status of the inventory table. The status values are:</p>
  128         -
    /// <ul>
  129         -
    /// <li>
  130         -
    /// <p><code>CREATING</code> - The inventory table is in the process of being created in the specified Amazon Web Services managed table bucket.</p></li>
  131         -
    /// <li>
  132         -
    /// <p><code>BACKFILLING</code> - The inventory table is in the process of being backfilled. When you enable the inventory table for your metadata configuration, the table goes through a process known as backfilling, during which Amazon S3 scans your general purpose bucket to retrieve the initial metadata for all objects in the bucket. Depending on the number of objects in your bucket, this process can take several hours. When the backfilling process is finished, the status of your inventory table changes from <code>BACKFILLING</code> to <code>ACTIVE</code>. After backfilling is completed, updates to your objects are reflected in the inventory table within one hour.</p></li>
  133         -
    /// <li>
  134         -
    /// <p><code>ACTIVE</code> - The inventory table has been created successfully, and records are being delivered to the table.</p></li>
  135         -
    /// <li>
  136         -
    /// <p><code>FAILED</code> - Amazon S3 is unable to create the inventory table, or Amazon S3 is unable to deliver records.</p></li>
  137         -
    /// </ul>
  138         -
    pub fn get_table_status(&self) -> &::std::option::Option<::std::string::String> {
  139         -
        &self.table_status
  140         -
    }
  141         -
    /// <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>
  142         -
    /// <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>
  143         -
    /// </note>
  144         -
    pub fn error(mut self, input: crate::types::ErrorDetails) -> Self {
  145         -
        self.error = ::std::option::Option::Some(input);
  146         -
        self
  147         -
    }
  148         -
    /// <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>
  149         -
    /// <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>
  150         -
    /// </note>
  151         -
    pub fn set_error(mut self, input: ::std::option::Option<crate::types::ErrorDetails>) -> Self {
  152         -
        self.error = input;
  153         -
        self
  154         -
    }
  155         -
    /// <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>
  156         -
    /// <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>
  157         -
    /// </note>
  158         -
    pub fn get_error(&self) -> &::std::option::Option<crate::types::ErrorDetails> {
  159         -
        &self.error
  160         -
    }
  161         -
    /// <p>The name of the inventory table.</p>
  162         -
    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  163         -
        self.table_name = ::std::option::Option::Some(input.into());
  164         -
        self
  165         -
    }
  166         -
    /// <p>The name of the inventory table.</p>
  167         -
    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  168         -
        self.table_name = input;
  169         -
        self
  170         -
    }
  171         -
    /// <p>The name of the inventory table.</p>
  172         -
    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
  173         -
        &self.table_name
  174         -
    }
  175         -
    /// <p>The Amazon Resource Name (ARN) for the inventory table.</p>
  176         -
    pub fn table_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  177         -
        self.table_arn = ::std::option::Option::Some(input.into());
  178         -
        self
  179         -
    }
  180         -
    /// <p>The Amazon Resource Name (ARN) for the inventory table.</p>
  181         -
    pub fn set_table_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  182         -
        self.table_arn = input;
  183         -
        self
  184         -
    }
  185         -
    /// <p>The Amazon Resource Name (ARN) for the inventory table.</p>
  186         -
    pub fn get_table_arn(&self) -> &::std::option::Option<::std::string::String> {
  187         -
        &self.table_arn
  188         -
    }
  189         -
    /// Consumes the builder and constructs a [`InventoryTableConfigurationResult`](crate::types::InventoryTableConfigurationResult).
  190         -
    /// This method will fail if any of the following fields are not set:
  191         -
    /// - [`configuration_state`](crate::types::builders::InventoryTableConfigurationResultBuilder::configuration_state)
  192         -
    pub fn build(self) -> ::std::result::Result<crate::types::InventoryTableConfigurationResult, ::aws_smithy_types::error::operation::BuildError> {
  193         -
        ::std::result::Result::Ok(crate::types::InventoryTableConfigurationResult {
  194         -
            configuration_state: self.configuration_state.ok_or_else(|| {
  195         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  196         -
                    "configuration_state",
  197         -
                    "configuration_state was not specified but it is required when building InventoryTableConfigurationResult",
  198         -
                )
  199         -
            })?,
  200         -
            table_status: self.table_status,
  201         -
            error: self.error,
  202         -
            table_name: self.table_name,
  203         -
            table_arn: self.table_arn,
  204         -
        })
  205         -
    }
  206         -
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/types/_inventory_table_configuration_updates.rs

@@ -1,0 +80,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>The specified updates to the S3 Metadata inventory table configuration.</p>
    4         -
#[non_exhaustive]
    5         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6         -
pub struct InventoryTableConfigurationUpdates {
    7         -
    /// <p>The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.</p>
    8         -
    pub configuration_state: crate::types::InventoryConfigurationState,
    9         -
    /// <p>The encryption configuration for the inventory table.</p>
   10         -
    pub encryption_configuration: ::std::option::Option<crate::types::MetadataTableEncryptionConfiguration>,
   11         -
}
   12         -
impl InventoryTableConfigurationUpdates {
   13         -
    /// <p>The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.</p>
   14         -
    pub fn configuration_state(&self) -> &crate::types::InventoryConfigurationState {
   15         -
        &self.configuration_state
   16         -
    }
   17         -
    /// <p>The encryption configuration for the inventory table.</p>
   18         -
    pub fn encryption_configuration(&self) -> ::std::option::Option<&crate::types::MetadataTableEncryptionConfiguration> {
   19         -
        self.encryption_configuration.as_ref()
   20         -
    }
   21         -
}
   22         -
impl InventoryTableConfigurationUpdates {
   23         -
    /// Creates a new builder-style object to manufacture [`InventoryTableConfigurationUpdates`](crate::types::InventoryTableConfigurationUpdates).
   24         -
    pub fn builder() -> crate::types::builders::InventoryTableConfigurationUpdatesBuilder {
   25         -
        crate::types::builders::InventoryTableConfigurationUpdatesBuilder::default()
   26         -
    }
   27         -
}
   28         -
   29         -
/// A builder for [`InventoryTableConfigurationUpdates`](crate::types::InventoryTableConfigurationUpdates).
   30         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   31         -
#[non_exhaustive]
   32         -
pub struct InventoryTableConfigurationUpdatesBuilder {
   33         -
    pub(crate) configuration_state: ::std::option::Option<crate::types::InventoryConfigurationState>,
   34         -
    pub(crate) encryption_configuration: ::std::option::Option<crate::types::MetadataTableEncryptionConfiguration>,
   35         -
}
   36         -
impl InventoryTableConfigurationUpdatesBuilder {
   37         -
    /// <p>The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.</p>
   38         -
    /// This field is required.
   39         -
    pub fn configuration_state(mut self, input: crate::types::InventoryConfigurationState) -> Self {
   40         -
        self.configuration_state = ::std::option::Option::Some(input);
   41         -
        self
   42         -
    }
   43         -
    /// <p>The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.</p>
   44         -
    pub fn set_configuration_state(mut self, input: ::std::option::Option<crate::types::InventoryConfigurationState>) -> Self {
   45         -
        self.configuration_state = input;
   46         -
        self
   47         -
    }
   48         -
    /// <p>The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.</p>
   49         -
    pub fn get_configuration_state(&self) -> &::std::option::Option<crate::types::InventoryConfigurationState> {
   50         -
        &self.configuration_state
   51         -
    }
   52         -
    /// <p>The encryption configuration for the inventory table.</p>
   53         -
    pub fn encryption_configuration(mut self, input: crate::types::MetadataTableEncryptionConfiguration) -> Self {
   54         -
        self.encryption_configuration = ::std::option::Option::Some(input);
   55         -
        self
   56         -
    }
   57         -
    /// <p>The encryption configuration for the inventory table.</p>
   58         -
    pub fn set_encryption_configuration(mut self, input: ::std::option::Option<crate::types::MetadataTableEncryptionConfiguration>) -> Self {
   59         -
        self.encryption_configuration = input;
   60         -
        self
   61         -
    }
   62         -
    /// <p>The encryption configuration for the inventory table.</p>
   63         -
    pub fn get_encryption_configuration(&self) -> &::std::option::Option<crate::types::MetadataTableEncryptionConfiguration> {
   64         -
        &self.encryption_configuration
   65         -
    }
   66         -
    /// Consumes the builder and constructs a [`InventoryTableConfigurationUpdates`](crate::types::InventoryTableConfigurationUpdates).
   67         -
    /// This method will fail if any of the following fields are not set:
   68         -
    /// - [`configuration_state`](crate::types::builders::InventoryTableConfigurationUpdatesBuilder::configuration_state)
   69         -
    pub fn build(self) -> ::std::result::Result<crate::types::InventoryTableConfigurationUpdates, ::aws_smithy_types::error::operation::BuildError> {
   70         -
        ::std::result::Result::Ok(crate::types::InventoryTableConfigurationUpdates {
   71         -
            configuration_state: self.configuration_state.ok_or_else(|| {
   72         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
   73         -
                    "configuration_state",
   74         -
                    "configuration_state was not specified but it is required when building InventoryTableConfigurationUpdates",
   75         -
                )
   76         -
            })?,
   77         -
            encryption_configuration: self.encryption_configuration,
   78         -
        })
   79         -
    }
   80         -
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/types/_journal_table_configuration.rs

@@ -1,0 +73,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>The journal table configuration for an S3 Metadata configuration.</p>
    4         -
#[non_exhaustive]
    5         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6         -
pub struct JournalTableConfiguration {
    7         -
    /// <p>The journal table record expiration settings for the journal table.</p>
    8         -
    pub record_expiration: ::std::option::Option<crate::types::RecordExpiration>,
    9         -
    /// <p>The encryption configuration for the journal table.</p>
   10         -
    pub encryption_configuration: ::std::option::Option<crate::types::MetadataTableEncryptionConfiguration>,
   11         -
}
   12         -
impl JournalTableConfiguration {
   13         -
    /// <p>The journal table record expiration settings for the journal table.</p>
   14         -
    pub fn record_expiration(&self) -> ::std::option::Option<&crate::types::RecordExpiration> {
   15         -
        self.record_expiration.as_ref()
   16         -
    }
   17         -
    /// <p>The encryption configuration for the journal table.</p>
   18         -
    pub fn encryption_configuration(&self) -> ::std::option::Option<&crate::types::MetadataTableEncryptionConfiguration> {
   19         -
        self.encryption_configuration.as_ref()
   20         -
    }
   21         -
}
   22         -
impl JournalTableConfiguration {
   23         -
    /// Creates a new builder-style object to manufacture [`JournalTableConfiguration`](crate::types::JournalTableConfiguration).
   24         -
    pub fn builder() -> crate::types::builders::JournalTableConfigurationBuilder {
   25         -
        crate::types::builders::JournalTableConfigurationBuilder::default()
   26         -
    }
   27         -
}
   28         -
   29         -
/// A builder for [`JournalTableConfiguration`](crate::types::JournalTableConfiguration).
   30         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   31         -
#[non_exhaustive]
   32         -
pub struct JournalTableConfigurationBuilder {
   33         -
    pub(crate) record_expiration: ::std::option::Option<crate::types::RecordExpiration>,
   34         -
    pub(crate) encryption_configuration: ::std::option::Option<crate::types::MetadataTableEncryptionConfiguration>,
   35         -
}
   36         -
impl JournalTableConfigurationBuilder {
   37         -
    /// <p>The journal table record expiration settings for the journal table.</p>
   38         -
    /// This field is required.
   39         -
    pub fn record_expiration(mut self, input: crate::types::RecordExpiration) -> Self {
   40         -
        self.record_expiration = ::std::option::Option::Some(input);
   41         -
        self
   42         -
    }
   43         -
    /// <p>The journal table record expiration settings for the journal table.</p>
   44         -
    pub fn set_record_expiration(mut self, input: ::std::option::Option<crate::types::RecordExpiration>) -> Self {
   45         -
        self.record_expiration = input;
   46         -
        self
   47         -
    }
   48         -
    /// <p>The journal table record expiration settings for the journal table.</p>
   49         -
    pub fn get_record_expiration(&self) -> &::std::option::Option<crate::types::RecordExpiration> {
   50         -
        &self.record_expiration
   51         -
    }
   52         -
    /// <p>The encryption configuration for the journal table.</p>
   53         -
    pub fn encryption_configuration(mut self, input: crate::types::MetadataTableEncryptionConfiguration) -> Self {
   54         -
        self.encryption_configuration = ::std::option::Option::Some(input);
   55         -
        self
   56         -
    }
   57         -
    /// <p>The encryption configuration for the journal table.</p>
   58         -
    pub fn set_encryption_configuration(mut self, input: ::std::option::Option<crate::types::MetadataTableEncryptionConfiguration>) -> Self {
   59         -
        self.encryption_configuration = input;
   60         -
        self
   61         -
    }
   62         -
    /// <p>The encryption configuration for the journal table.</p>
   63         -
    pub fn get_encryption_configuration(&self) -> &::std::option::Option<crate::types::MetadataTableEncryptionConfiguration> {
   64         -
        &self.encryption_configuration
   65         -
    }
   66         -
    /// Consumes the builder and constructs a [`JournalTableConfiguration`](crate::types::JournalTableConfiguration).
   67         -
    pub fn build(self) -> crate::types::JournalTableConfiguration {
   68         -
        crate::types::JournalTableConfiguration {
   69         -
            record_expiration: self.record_expiration,
   70         -
            encryption_configuration: self.encryption_configuration,
   71         -
        }
   72         -
    }
   73         -
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/types/_journal_table_configuration_result.rs

@@ -1,0 +206,0 @@
    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         -
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/types/_journal_table_configuration_updates.rs

@@ -1,0 +51,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>The specified updates to the S3 Metadata journal table configuration.</p>
    4         -
#[non_exhaustive]
    5         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6         -
pub struct JournalTableConfigurationUpdates {
    7         -
    /// <p>The journal table record expiration settings for the journal table.</p>
    8         -
    pub record_expiration: ::std::option::Option<crate::types::RecordExpiration>,
    9         -
}
   10         -
impl JournalTableConfigurationUpdates {
   11         -
    /// <p>The journal table record expiration settings for the journal table.</p>
   12         -
    pub fn record_expiration(&self) -> ::std::option::Option<&crate::types::RecordExpiration> {
   13         -
        self.record_expiration.as_ref()
   14         -
    }
   15         -
}
   16         -
impl JournalTableConfigurationUpdates {
   17         -
    /// Creates a new builder-style object to manufacture [`JournalTableConfigurationUpdates`](crate::types::JournalTableConfigurationUpdates).
   18         -
    pub fn builder() -> crate::types::builders::JournalTableConfigurationUpdatesBuilder {
   19         -
        crate::types::builders::JournalTableConfigurationUpdatesBuilder::default()
   20         -
    }
   21         -
}
   22         -
   23         -
/// A builder for [`JournalTableConfigurationUpdates`](crate::types::JournalTableConfigurationUpdates).
   24         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   25         -
#[non_exhaustive]
   26         -
pub struct JournalTableConfigurationUpdatesBuilder {
   27         -
    pub(crate) record_expiration: ::std::option::Option<crate::types::RecordExpiration>,
   28         -
}
   29         -
impl JournalTableConfigurationUpdatesBuilder {
   30         -
    /// <p>The journal table record expiration settings for the journal table.</p>
   31         -
    /// This field is required.
   32         -
    pub fn record_expiration(mut self, input: crate::types::RecordExpiration) -> Self {
   33         -
        self.record_expiration = ::std::option::Option::Some(input);
   34         -
        self
   35         -
    }
   36         -
    /// <p>The journal table record expiration settings for the journal table.</p>
   37         -
    pub fn set_record_expiration(mut self, input: ::std::option::Option<crate::types::RecordExpiration>) -> Self {
   38         -
        self.record_expiration = input;
   39         -
        self
   40         -
    }
   41         -
    /// <p>The journal table record expiration settings for the journal table.</p>
   42         -
    pub fn get_record_expiration(&self) -> &::std::option::Option<crate::types::RecordExpiration> {
   43         -
        &self.record_expiration
   44         -
    }
   45         -
    /// Consumes the builder and constructs a [`JournalTableConfigurationUpdates`](crate::types::JournalTableConfigurationUpdates).
   46         -
    pub fn build(self) -> crate::types::JournalTableConfigurationUpdates {
   47         -
        crate::types::JournalTableConfigurationUpdates {
   48         -
            record_expiration: self.record_expiration,
   49         -
        }
   50         -
    }
   51         -
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/types/_json_input.rs

@@ -1,0 +48,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Specifies JSON as object's input serialization format.</p>
    4         -
#[non_exhaustive]
    5         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6         -
pub struct JsonInput {
    7         -
    /// <p>The type of JSON. Valid values: Document, Lines.</p>
    8         -
    pub r#type: ::std::option::Option<crate::types::JsonType>,
    9         -
}
   10         -
impl JsonInput {
   11         -
    /// <p>The type of JSON. Valid values: Document, Lines.</p>
   12         -
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::JsonType> {
   13         -
        self.r#type.as_ref()
   14         -
    }
   15         -
}
   16         -
impl JsonInput {
   17         -
    /// Creates a new builder-style object to manufacture [`JsonInput`](crate::types::JsonInput).
   18         -
    pub fn builder() -> crate::types::builders::JsonInputBuilder {
   19         -
        crate::types::builders::JsonInputBuilder::default()
   20         -
    }
   21         -
}
   22         -
   23         -
/// A builder for [`JsonInput`](crate::types::JsonInput).
   24         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   25         -
#[non_exhaustive]
   26         -
pub struct JsonInputBuilder {
   27         -
    pub(crate) r#type: ::std::option::Option<crate::types::JsonType>,
   28         -
}
   29         -
impl JsonInputBuilder {
   30         -
    /// <p>The type of JSON. Valid values: Document, Lines.</p>
   31         -
    pub fn r#type(mut self, input: crate::types::JsonType) -> Self {
   32         -
        self.r#type = ::std::option::Option::Some(input);
   33         -
        self
   34         -
    }
   35         -
    /// <p>The type of JSON. Valid values: Document, Lines.</p>
   36         -
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::JsonType>) -> Self {
   37         -
        self.r#type = input;
   38         -
        self
   39         -
    }
   40         -
    /// <p>The type of JSON. Valid values: Document, Lines.</p>
   41         -
    pub fn get_type(&self) -> &::std::option::Option<crate::types::JsonType> {
   42         -
        &self.r#type
   43         -
    }
   44         -
    /// Consumes the builder and constructs a [`JsonInput`](crate::types::JsonInput).
   45         -
    pub fn build(self) -> crate::types::JsonInput {
   46         -
        crate::types::JsonInput { r#type: self.r#type }
   47         -
    }
   48         -
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/types/_json_output.rs

@@ -1,0 +50,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Specifies JSON as request's output serialization format.</p>
    4         -
#[non_exhaustive]
    5         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6         -
pub struct JsonOutput {
    7         -
    /// <p>The value used to separate individual records in the output. If no value is specified, Amazon S3 uses a newline character ('\n').</p>
    8         -
    pub record_delimiter: ::std::option::Option<::std::string::String>,
    9         -
}
   10         -
impl JsonOutput {
   11         -
    /// <p>The value used to separate individual records in the output. If no value is specified, Amazon S3 uses a newline character ('\n').</p>
   12         -
    pub fn record_delimiter(&self) -> ::std::option::Option<&str> {
   13         -
        self.record_delimiter.as_deref()
   14         -
    }
   15         -
}
   16         -
impl JsonOutput {
   17         -
    /// Creates a new builder-style object to manufacture [`JsonOutput`](crate::types::JsonOutput).
   18         -
    pub fn builder() -> crate::types::builders::JsonOutputBuilder {
   19         -
        crate::types::builders::JsonOutputBuilder::default()
   20         -
    }
   21         -
}
   22         -
   23         -
/// A builder for [`JsonOutput`](crate::types::JsonOutput).
   24         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   25         -
#[non_exhaustive]
   26         -
pub struct JsonOutputBuilder {
   27         -
    pub(crate) record_delimiter: ::std::option::Option<::std::string::String>,
   28         -
}
   29         -
impl JsonOutputBuilder {
   30         -
    /// <p>The value used to separate individual records in the output. If no value is specified, Amazon S3 uses a newline character ('\n').</p>
   31         -
    pub fn record_delimiter(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
   32         -
        self.record_delimiter = ::std::option::Option::Some(input.into());
   33         -
        self
   34         -
    }
   35         -
    /// <p>The value used to separate individual records in the output. If no value is specified, Amazon S3 uses a newline character ('\n').</p>
   36         -
    pub fn set_record_delimiter(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
   37         -
        self.record_delimiter = input;
   38         -
        self
   39         -
    }
   40         -
    /// <p>The value used to separate individual records in the output. If no value is specified, Amazon S3 uses a newline character ('\n').</p>
   41         -
    pub fn get_record_delimiter(&self) -> &::std::option::Option<::std::string::String> {
   42         -
        &self.record_delimiter
   43         -
    }
   44         -
    /// Consumes the builder and constructs a [`JsonOutput`](crate::types::JsonOutput).
   45         -
    pub fn build(self) -> crate::types::JsonOutput {
   46         -
        crate::types::JsonOutput {
   47         -
            record_delimiter: self.record_delimiter,
   48         -
        }
   49         -
    }
   50         -
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/types/_json_type.rs

@@ -1,0 +108,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// When writing a match expression against `JsonType`, it is important to ensure
    4         -
/// your code is forward-compatible. That is, if a match arm handles a case for a
    5         -
/// feature that is supported by the service but has not been represented as an enum
    6         -
/// variant in a current version of SDK, your code should continue to work when you
    7         -
/// upgrade SDK to a future version in which the enum does include a variant for that
    8         -
/// feature.
    9         -
///
   10         -
/// Here is an example of how you can make a match expression forward-compatible:
   11         -
///
   12         -
/// ```text
   13         -
/// # let jsontype = unimplemented!();
   14         -
/// match jsontype {
   15         -
///     JsonType::Document => { /* ... */ },
   16         -
///     JsonType::Lines => { /* ... */ },
   17         -
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
   18         -
///     _ => { /* ... */ },
   19         -
/// }
   20         -
/// ```
   21         -
/// The above code demonstrates that when `jsontype` represents
   22         -
/// `NewFeature`, the execution path will lead to the second last match arm,
   23         -
/// even though the enum does not contain a variant `JsonType::NewFeature`
   24         -
/// in the current version of SDK. The reason is that the variable `other`,
   25         -
/// created by the `@` operator, is bound to
   26         -
/// `JsonType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
   27         -
/// and calling `as_str` on it yields `"NewFeature"`.
   28         -
/// This match expression is forward-compatible when executed with a newer
   29         -
/// version of SDK where the variant `JsonType::NewFeature` is defined.
   30         -
/// Specifically, when `jsontype` represents `NewFeature`,
   31         -
/// the execution path will hit the second last match arm as before by virtue of
   32         -
/// calling `as_str` on `JsonType::NewFeature` also yielding `"NewFeature"`.
   33         -
///
   34         -
/// Explicitly matching on the `Unknown` variant should
   35         -
/// be avoided for two reasons:
   36         -
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
   37         -
/// - It might inadvertently shadow other intended match arms.
   38         -
///
   39         -
#[allow(missing_docs)] // documentation missing in model
   40         -
#[non_exhaustive]
   41         -
#[derive(
   42         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash,
   43         -
)]
   44         -
pub enum JsonType {
   45         -
    #[allow(missing_docs)] // documentation missing in model
   46         -
    Document,
   47         -
    #[allow(missing_docs)] // documentation missing in model
   48         -
    Lines,
   49         -
    /// `Unknown` contains new variants that have been added since this code was generated.
   50         -
    #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")]
   51         -
    Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue),
   52         -
}
   53         -
impl ::std::convert::From<&str> for JsonType {
   54         -
    fn from(s: &str) -> Self {
   55         -
        match s {
   56         -
            "DOCUMENT" => JsonType::Document,
   57         -
            "LINES" => JsonType::Lines,
   58         -
            other => JsonType::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())),
   59         -
        }
   60         -
    }
   61         -
}
   62         -
impl ::std::str::FromStr for JsonType {
   63         -
    type Err = ::std::convert::Infallible;
   64         -
   65         -
    fn from_str(s: &str) -> ::std::result::Result<Self, <Self as ::std::str::FromStr>::Err> {
   66         -
        ::std::result::Result::Ok(JsonType::from(s))
   67         -
    }
   68         -
}
   69         -
impl JsonType {
   70         -
    /// Returns the `&str` value of the enum member.
   71         -
    pub fn as_str(&self) -> &str {
   72         -
        match self {
   73         -
            JsonType::Document => "DOCUMENT",
   74         -
            JsonType::Lines => "LINES",
   75         -
            JsonType::Unknown(value) => value.as_str(),
   76         -
        }
   77         -
    }
   78         -
    /// Returns all the `&str` representations of the enum members.
   79         -
    pub const fn values() -> &'static [&'static str] {
   80         -
        &["DOCUMENT", "LINES"]
   81         -
    }
   82         -
}
   83         -
impl ::std::convert::AsRef<str> for JsonType {
   84         -
    fn as_ref(&self) -> &str {
   85         -
        self.as_str()
   86         -
    }
   87         -
}
   88         -
impl JsonType {
   89         -
    /// Parses the enum value while disallowing unknown variants.
   90         -
    ///
   91         -
    /// Unknown variants will result in an error.
   92         -
    pub fn try_parse(value: &str) -> ::std::result::Result<Self, crate::error::UnknownVariantError> {
   93         -
        match Self::from(value) {
   94         -
            #[allow(deprecated)]
   95         -
            Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)),
   96         -
            known => Ok(known),
   97         -
        }
   98         -
    }
   99         -
}
  100         -
impl ::std::fmt::Display for JsonType {
  101         -
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
  102         -
        match self {
  103         -
            JsonType::Document => write!(f, "DOCUMENT"),
  104         -
            JsonType::Lines => write!(f, "LINES"),
  105         -
            JsonType::Unknown(value) => write!(f, "{value}"),
  106         -
        }
  107         -
    }
  108         -
}