aws-sdk-ebs 0.24.0

AWS SDK for Amazon Elastic Block Store
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// When writing a match expression against `ValidationExceptionReason`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let validationexceptionreason = unimplemented!();
/// match validationexceptionreason {
///     ValidationExceptionReason::ConflictingBlockUpdate => { /* ... */ },
///     ValidationExceptionReason::InvalidBlock => { /* ... */ },
///     ValidationExceptionReason::InvalidBlockToken => { /* ... */ },
///     ValidationExceptionReason::InvalidContentEncoding => { /* ... */ },
///     ValidationExceptionReason::InvalidCustomerKey => { /* ... */ },
///     ValidationExceptionReason::InvalidDependencyRequest => { /* ... */ },
///     ValidationExceptionReason::InvalidPageToken => { /* ... */ },
///     ValidationExceptionReason::InvalidParameterValue => { /* ... */ },
///     ValidationExceptionReason::InvalidSnapshotId => { /* ... */ },
///     ValidationExceptionReason::InvalidTag => { /* ... */ },
///     ValidationExceptionReason::InvalidVolumeSize => { /* ... */ },
///     ValidationExceptionReason::UnrelatedSnapshots => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `validationexceptionreason` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ValidationExceptionReason::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ValidationExceptionReason::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ValidationExceptionReason::NewFeature` is defined.
/// Specifically, when `validationexceptionreason` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ValidationExceptionReason::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum ValidationExceptionReason {
    #[allow(missing_docs)] // documentation missing in model
    ConflictingBlockUpdate,
    #[allow(missing_docs)] // documentation missing in model
    InvalidBlock,
    #[allow(missing_docs)] // documentation missing in model
    InvalidBlockToken,
    #[allow(missing_docs)] // documentation missing in model
    InvalidContentEncoding,
    #[allow(missing_docs)] // documentation missing in model
    InvalidCustomerKey,
    #[allow(missing_docs)] // documentation missing in model
    InvalidDependencyRequest,
    #[allow(missing_docs)] // documentation missing in model
    InvalidPageToken,
    #[allow(missing_docs)] // documentation missing in model
    InvalidParameterValue,
    #[allow(missing_docs)] // documentation missing in model
    InvalidSnapshotId,
    #[allow(missing_docs)] // documentation missing in model
    InvalidTag,
    #[allow(missing_docs)] // documentation missing in model
    InvalidVolumeSize,
    #[allow(missing_docs)] // documentation missing in model
    UnrelatedSnapshots,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ValidationExceptionReason {
    fn from(s: &str) -> Self {
        match s {
            "CONFLICTING_BLOCK_UPDATE" => ValidationExceptionReason::ConflictingBlockUpdate,
            "INVALID_BLOCK" => ValidationExceptionReason::InvalidBlock,
            "INVALID_BLOCK_TOKEN" => ValidationExceptionReason::InvalidBlockToken,
            "INVALID_CONTENT_ENCODING" => ValidationExceptionReason::InvalidContentEncoding,
            "INVALID_CUSTOMER_KEY" => ValidationExceptionReason::InvalidCustomerKey,
            "INVALID_DEPENDENCY_REQUEST" => ValidationExceptionReason::InvalidDependencyRequest,
            "INVALID_PAGE_TOKEN" => ValidationExceptionReason::InvalidPageToken,
            "INVALID_PARAMETER_VALUE" => ValidationExceptionReason::InvalidParameterValue,
            "INVALID_SNAPSHOT_ID" => ValidationExceptionReason::InvalidSnapshotId,
            "INVALID_TAG" => ValidationExceptionReason::InvalidTag,
            "INVALID_VOLUME_SIZE" => ValidationExceptionReason::InvalidVolumeSize,
            "UNRELATED_SNAPSHOTS" => ValidationExceptionReason::UnrelatedSnapshots,
            other => ValidationExceptionReason::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for ValidationExceptionReason {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ValidationExceptionReason::from(s))
    }
}
impl ValidationExceptionReason {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ValidationExceptionReason::ConflictingBlockUpdate => "CONFLICTING_BLOCK_UPDATE",
            ValidationExceptionReason::InvalidBlock => "INVALID_BLOCK",
            ValidationExceptionReason::InvalidBlockToken => "INVALID_BLOCK_TOKEN",
            ValidationExceptionReason::InvalidContentEncoding => "INVALID_CONTENT_ENCODING",
            ValidationExceptionReason::InvalidCustomerKey => "INVALID_CUSTOMER_KEY",
            ValidationExceptionReason::InvalidDependencyRequest => "INVALID_DEPENDENCY_REQUEST",
            ValidationExceptionReason::InvalidPageToken => "INVALID_PAGE_TOKEN",
            ValidationExceptionReason::InvalidParameterValue => "INVALID_PARAMETER_VALUE",
            ValidationExceptionReason::InvalidSnapshotId => "INVALID_SNAPSHOT_ID",
            ValidationExceptionReason::InvalidTag => "INVALID_TAG",
            ValidationExceptionReason::InvalidVolumeSize => "INVALID_VOLUME_SIZE",
            ValidationExceptionReason::UnrelatedSnapshots => "UNRELATED_SNAPSHOTS",
            ValidationExceptionReason::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "CONFLICTING_BLOCK_UPDATE",
            "INVALID_BLOCK",
            "INVALID_BLOCK_TOKEN",
            "INVALID_CONTENT_ENCODING",
            "INVALID_CUSTOMER_KEY",
            "INVALID_DEPENDENCY_REQUEST",
            "INVALID_PAGE_TOKEN",
            "INVALID_PARAMETER_VALUE",
            "INVALID_SNAPSHOT_ID",
            "INVALID_TAG",
            "INVALID_VOLUME_SIZE",
            "UNRELATED_SNAPSHOTS",
        ]
    }
}
impl AsRef<str> for ValidationExceptionReason {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `ServiceQuotaExceededExceptionReason`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let servicequotaexceededexceptionreason = unimplemented!();
/// match servicequotaexceededexceptionreason {
///     ServiceQuotaExceededExceptionReason::DependencyServiceQuotaExceeded => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `servicequotaexceededexceptionreason` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ServiceQuotaExceededExceptionReason::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ServiceQuotaExceededExceptionReason::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ServiceQuotaExceededExceptionReason::NewFeature` is defined.
/// Specifically, when `servicequotaexceededexceptionreason` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ServiceQuotaExceededExceptionReason::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum ServiceQuotaExceededExceptionReason {
    #[allow(missing_docs)] // documentation missing in model
    DependencyServiceQuotaExceeded,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ServiceQuotaExceededExceptionReason {
    fn from(s: &str) -> Self {
        match s {
            "DEPENDENCY_SERVICE_QUOTA_EXCEEDED" => {
                ServiceQuotaExceededExceptionReason::DependencyServiceQuotaExceeded
            }
            other => ServiceQuotaExceededExceptionReason::Unknown(
                crate::types::UnknownVariantValue(other.to_owned()),
            ),
        }
    }
}
impl std::str::FromStr for ServiceQuotaExceededExceptionReason {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ServiceQuotaExceededExceptionReason::from(s))
    }
}
impl ServiceQuotaExceededExceptionReason {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ServiceQuotaExceededExceptionReason::DependencyServiceQuotaExceeded => {
                "DEPENDENCY_SERVICE_QUOTA_EXCEEDED"
            }
            ServiceQuotaExceededExceptionReason::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["DEPENDENCY_SERVICE_QUOTA_EXCEEDED"]
    }
}
impl AsRef<str> for ServiceQuotaExceededExceptionReason {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `ResourceNotFoundExceptionReason`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let resourcenotfoundexceptionreason = unimplemented!();
/// match resourcenotfoundexceptionreason {
///     ResourceNotFoundExceptionReason::DependencyResourceNotFound => { /* ... */ },
///     ResourceNotFoundExceptionReason::SnapshotNotFound => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `resourcenotfoundexceptionreason` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ResourceNotFoundExceptionReason::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ResourceNotFoundExceptionReason::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ResourceNotFoundExceptionReason::NewFeature` is defined.
/// Specifically, when `resourcenotfoundexceptionreason` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ResourceNotFoundExceptionReason::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum ResourceNotFoundExceptionReason {
    #[allow(missing_docs)] // documentation missing in model
    DependencyResourceNotFound,
    #[allow(missing_docs)] // documentation missing in model
    SnapshotNotFound,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ResourceNotFoundExceptionReason {
    fn from(s: &str) -> Self {
        match s {
            "DEPENDENCY_RESOURCE_NOT_FOUND" => {
                ResourceNotFoundExceptionReason::DependencyResourceNotFound
            }
            "SNAPSHOT_NOT_FOUND" => ResourceNotFoundExceptionReason::SnapshotNotFound,
            other => ResourceNotFoundExceptionReason::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for ResourceNotFoundExceptionReason {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ResourceNotFoundExceptionReason::from(s))
    }
}
impl ResourceNotFoundExceptionReason {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ResourceNotFoundExceptionReason::DependencyResourceNotFound => {
                "DEPENDENCY_RESOURCE_NOT_FOUND"
            }
            ResourceNotFoundExceptionReason::SnapshotNotFound => "SNAPSHOT_NOT_FOUND",
            ResourceNotFoundExceptionReason::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["DEPENDENCY_RESOURCE_NOT_FOUND", "SNAPSHOT_NOT_FOUND"]
    }
}
impl AsRef<str> for ResourceNotFoundExceptionReason {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `RequestThrottledExceptionReason`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let requestthrottledexceptionreason = unimplemented!();
/// match requestthrottledexceptionreason {
///     RequestThrottledExceptionReason::AccountThrottled => { /* ... */ },
///     RequestThrottledExceptionReason::DependencyRequestThrottled => { /* ... */ },
///     RequestThrottledExceptionReason::ResourceLevelThrottle => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `requestthrottledexceptionreason` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `RequestThrottledExceptionReason::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `RequestThrottledExceptionReason::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `RequestThrottledExceptionReason::NewFeature` is defined.
/// Specifically, when `requestthrottledexceptionreason` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `RequestThrottledExceptionReason::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum RequestThrottledExceptionReason {
    #[allow(missing_docs)] // documentation missing in model
    AccountThrottled,
    #[allow(missing_docs)] // documentation missing in model
    DependencyRequestThrottled,
    #[allow(missing_docs)] // documentation missing in model
    ResourceLevelThrottle,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for RequestThrottledExceptionReason {
    fn from(s: &str) -> Self {
        match s {
            "ACCOUNT_THROTTLED" => RequestThrottledExceptionReason::AccountThrottled,
            "DEPENDENCY_REQUEST_THROTTLED" => {
                RequestThrottledExceptionReason::DependencyRequestThrottled
            }
            "RESOURCE_LEVEL_THROTTLE" => RequestThrottledExceptionReason::ResourceLevelThrottle,
            other => RequestThrottledExceptionReason::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for RequestThrottledExceptionReason {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(RequestThrottledExceptionReason::from(s))
    }
}
impl RequestThrottledExceptionReason {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            RequestThrottledExceptionReason::AccountThrottled => "ACCOUNT_THROTTLED",
            RequestThrottledExceptionReason::DependencyRequestThrottled => {
                "DEPENDENCY_REQUEST_THROTTLED"
            }
            RequestThrottledExceptionReason::ResourceLevelThrottle => "RESOURCE_LEVEL_THROTTLE",
            RequestThrottledExceptionReason::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "ACCOUNT_THROTTLED",
            "DEPENDENCY_REQUEST_THROTTLED",
            "RESOURCE_LEVEL_THROTTLE",
        ]
    }
}
impl AsRef<str> for RequestThrottledExceptionReason {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `AccessDeniedExceptionReason`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let accessdeniedexceptionreason = unimplemented!();
/// match accessdeniedexceptionreason {
///     AccessDeniedExceptionReason::DependencyAccessDenied => { /* ... */ },
///     AccessDeniedExceptionReason::UnauthorizedAccount => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `accessdeniedexceptionreason` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AccessDeniedExceptionReason::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AccessDeniedExceptionReason::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AccessDeniedExceptionReason::NewFeature` is defined.
/// Specifically, when `accessdeniedexceptionreason` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AccessDeniedExceptionReason::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum AccessDeniedExceptionReason {
    #[allow(missing_docs)] // documentation missing in model
    DependencyAccessDenied,
    #[allow(missing_docs)] // documentation missing in model
    UnauthorizedAccount,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AccessDeniedExceptionReason {
    fn from(s: &str) -> Self {
        match s {
            "DEPENDENCY_ACCESS_DENIED" => AccessDeniedExceptionReason::DependencyAccessDenied,
            "UNAUTHORIZED_ACCOUNT" => AccessDeniedExceptionReason::UnauthorizedAccount,
            other => AccessDeniedExceptionReason::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for AccessDeniedExceptionReason {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AccessDeniedExceptionReason::from(s))
    }
}
impl AccessDeniedExceptionReason {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AccessDeniedExceptionReason::DependencyAccessDenied => "DEPENDENCY_ACCESS_DENIED",
            AccessDeniedExceptionReason::UnauthorizedAccount => "UNAUTHORIZED_ACCOUNT",
            AccessDeniedExceptionReason::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["DEPENDENCY_ACCESS_DENIED", "UNAUTHORIZED_ACCOUNT"]
    }
}
impl AsRef<str> for AccessDeniedExceptionReason {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Describes a tag.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Tag {
    /// <p>The key of the tag.</p>
    #[doc(hidden)]
    pub key: std::option::Option<std::string::String>,
    /// <p>The value of the tag.</p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
}
impl Tag {
    /// <p>The key of the tag.</p>
    pub fn key(&self) -> std::option::Option<&str> {
        self.key.as_deref()
    }
    /// <p>The value of the tag.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
/// See [`Tag`](crate::model::Tag).
pub mod tag {

    /// A builder for [`Tag`](crate::model::Tag).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) key: std::option::Option<std::string::String>,
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The key of the tag.</p>
        pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
            self.key = Some(input.into());
            self
        }
        /// <p>The key of the tag.</p>
        pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key = input;
            self
        }
        /// <p>The value of the tag.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The value of the tag.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`Tag`](crate::model::Tag).
        pub fn build(self) -> crate::model::Tag {
            crate::model::Tag {
                key: self.key,
                value: self.value,
            }
        }
    }
}
impl Tag {
    /// Creates a new builder-style object to manufacture [`Tag`](crate::model::Tag).
    pub fn builder() -> crate::model::tag::Builder {
        crate::model::tag::Builder::default()
    }
}

/// When writing a match expression against `Status`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let status = unimplemented!();
/// match status {
///     Status::Completed => { /* ... */ },
///     Status::Error => { /* ... */ },
///     Status::Pending => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `status` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `Status::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `Status::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `Status::NewFeature` is defined.
/// Specifically, when `status` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `Status::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum Status {
    #[allow(missing_docs)] // documentation missing in model
    Completed,
    #[allow(missing_docs)] // documentation missing in model
    Error,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Status {
    fn from(s: &str) -> Self {
        match s {
            "completed" => Status::Completed,
            "error" => Status::Error,
            "pending" => Status::Pending,
            other => Status::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for Status {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Status::from(s))
    }
}
impl Status {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Status::Completed => "completed",
            Status::Error => "error",
            Status::Pending => "pending",
            Status::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["completed", "error", "pending"]
    }
}
impl AsRef<str> for Status {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `ChecksumAlgorithm`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let checksumalgorithm = unimplemented!();
/// match checksumalgorithm {
///     ChecksumAlgorithm::ChecksumAlgorithmSha256 => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `checksumalgorithm` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ChecksumAlgorithm::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ChecksumAlgorithm::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ChecksumAlgorithm::NewFeature` is defined.
/// Specifically, when `checksumalgorithm` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ChecksumAlgorithm::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum ChecksumAlgorithm {
    #[allow(missing_docs)] // documentation missing in model
    ChecksumAlgorithmSha256,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ChecksumAlgorithm {
    fn from(s: &str) -> Self {
        match s {
            "SHA256" => ChecksumAlgorithm::ChecksumAlgorithmSha256,
            other => {
                ChecksumAlgorithm::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for ChecksumAlgorithm {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ChecksumAlgorithm::from(s))
    }
}
impl ChecksumAlgorithm {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ChecksumAlgorithm::ChecksumAlgorithmSha256 => "SHA256",
            ChecksumAlgorithm::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["SHA256"]
    }
}
impl AsRef<str> for ChecksumAlgorithm {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>A block of data in an Amazon Elastic Block Store snapshot.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Block {
    /// <p>The block index.</p>
    #[doc(hidden)]
    pub block_index: std::option::Option<i32>,
    /// <p>The block token for the block index.</p>
    #[doc(hidden)]
    pub block_token: std::option::Option<std::string::String>,
}
impl Block {
    /// <p>The block index.</p>
    pub fn block_index(&self) -> std::option::Option<i32> {
        self.block_index
    }
    /// <p>The block token for the block index.</p>
    pub fn block_token(&self) -> std::option::Option<&str> {
        self.block_token.as_deref()
    }
}
/// See [`Block`](crate::model::Block).
pub mod block {

    /// A builder for [`Block`](crate::model::Block).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) block_index: std::option::Option<i32>,
        pub(crate) block_token: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The block index.</p>
        pub fn block_index(mut self, input: i32) -> Self {
            self.block_index = Some(input);
            self
        }
        /// <p>The block index.</p>
        pub fn set_block_index(mut self, input: std::option::Option<i32>) -> Self {
            self.block_index = input;
            self
        }
        /// <p>The block token for the block index.</p>
        pub fn block_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.block_token = Some(input.into());
            self
        }
        /// <p>The block token for the block index.</p>
        pub fn set_block_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.block_token = input;
            self
        }
        /// Consumes the builder and constructs a [`Block`](crate::model::Block).
        pub fn build(self) -> crate::model::Block {
            crate::model::Block {
                block_index: self.block_index,
                block_token: self.block_token,
            }
        }
    }
}
impl Block {
    /// Creates a new builder-style object to manufacture [`Block`](crate::model::Block).
    pub fn builder() -> crate::model::block::Builder {
        crate::model::block::Builder::default()
    }
}

/// <p>A block of data in an Amazon Elastic Block Store snapshot that is different from another snapshot of the same volume/snapshot lineage.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ChangedBlock {
    /// <p>The block index.</p>
    #[doc(hidden)]
    pub block_index: std::option::Option<i32>,
    /// <p>The block token for the block index of the <code>FirstSnapshotId</code> specified in the <code>ListChangedBlocks</code> operation. This value is absent if the first snapshot does not have the changed block that is on the second snapshot.</p>
    #[doc(hidden)]
    pub first_block_token: std::option::Option<std::string::String>,
    /// <p>The block token for the block index of the <code>SecondSnapshotId</code> specified in the <code>ListChangedBlocks</code> operation.</p>
    #[doc(hidden)]
    pub second_block_token: std::option::Option<std::string::String>,
}
impl ChangedBlock {
    /// <p>The block index.</p>
    pub fn block_index(&self) -> std::option::Option<i32> {
        self.block_index
    }
    /// <p>The block token for the block index of the <code>FirstSnapshotId</code> specified in the <code>ListChangedBlocks</code> operation. This value is absent if the first snapshot does not have the changed block that is on the second snapshot.</p>
    pub fn first_block_token(&self) -> std::option::Option<&str> {
        self.first_block_token.as_deref()
    }
    /// <p>The block token for the block index of the <code>SecondSnapshotId</code> specified in the <code>ListChangedBlocks</code> operation.</p>
    pub fn second_block_token(&self) -> std::option::Option<&str> {
        self.second_block_token.as_deref()
    }
}
impl std::fmt::Debug for ChangedBlock {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("ChangedBlock");
        formatter.field("block_index", &"*** Sensitive Data Redacted ***");
        formatter.field("first_block_token", &"*** Sensitive Data Redacted ***");
        formatter.field("second_block_token", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
/// See [`ChangedBlock`](crate::model::ChangedBlock).
pub mod changed_block {

    /// A builder for [`ChangedBlock`](crate::model::ChangedBlock).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
    pub struct Builder {
        pub(crate) block_index: std::option::Option<i32>,
        pub(crate) first_block_token: std::option::Option<std::string::String>,
        pub(crate) second_block_token: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The block index.</p>
        pub fn block_index(mut self, input: i32) -> Self {
            self.block_index = Some(input);
            self
        }
        /// <p>The block index.</p>
        pub fn set_block_index(mut self, input: std::option::Option<i32>) -> Self {
            self.block_index = input;
            self
        }
        /// <p>The block token for the block index of the <code>FirstSnapshotId</code> specified in the <code>ListChangedBlocks</code> operation. This value is absent if the first snapshot does not have the changed block that is on the second snapshot.</p>
        pub fn first_block_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.first_block_token = Some(input.into());
            self
        }
        /// <p>The block token for the block index of the <code>FirstSnapshotId</code> specified in the <code>ListChangedBlocks</code> operation. This value is absent if the first snapshot does not have the changed block that is on the second snapshot.</p>
        pub fn set_first_block_token(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.first_block_token = input;
            self
        }
        /// <p>The block token for the block index of the <code>SecondSnapshotId</code> specified in the <code>ListChangedBlocks</code> operation.</p>
        pub fn second_block_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.second_block_token = Some(input.into());
            self
        }
        /// <p>The block token for the block index of the <code>SecondSnapshotId</code> specified in the <code>ListChangedBlocks</code> operation.</p>
        pub fn set_second_block_token(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.second_block_token = input;
            self
        }
        /// Consumes the builder and constructs a [`ChangedBlock`](crate::model::ChangedBlock).
        pub fn build(self) -> crate::model::ChangedBlock {
            crate::model::ChangedBlock {
                block_index: self.block_index,
                first_block_token: self.first_block_token,
                second_block_token: self.second_block_token,
            }
        }
    }
    impl std::fmt::Debug for Builder {
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
            let mut formatter = f.debug_struct("Builder");
            formatter.field("block_index", &"*** Sensitive Data Redacted ***");
            formatter.field("first_block_token", &"*** Sensitive Data Redacted ***");
            formatter.field("second_block_token", &"*** Sensitive Data Redacted ***");
            formatter.finish()
        }
    }
}
impl ChangedBlock {
    /// Creates a new builder-style object to manufacture [`ChangedBlock`](crate::model::ChangedBlock).
    pub fn builder() -> crate::model::changed_block::Builder {
        crate::model::changed_block::Builder::default()
    }
}

/// When writing a match expression against `ChecksumAggregationMethod`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let checksumaggregationmethod = unimplemented!();
/// match checksumaggregationmethod {
///     ChecksumAggregationMethod::ChecksumAggregationLinear => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `checksumaggregationmethod` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ChecksumAggregationMethod::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ChecksumAggregationMethod::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ChecksumAggregationMethod::NewFeature` is defined.
/// Specifically, when `checksumaggregationmethod` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ChecksumAggregationMethod::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum ChecksumAggregationMethod {
    #[allow(missing_docs)] // documentation missing in model
    ChecksumAggregationLinear,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ChecksumAggregationMethod {
    fn from(s: &str) -> Self {
        match s {
            "LINEAR" => ChecksumAggregationMethod::ChecksumAggregationLinear,
            other => ChecksumAggregationMethod::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for ChecksumAggregationMethod {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ChecksumAggregationMethod::from(s))
    }
}
impl ChecksumAggregationMethod {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ChecksumAggregationMethod::ChecksumAggregationLinear => "LINEAR",
            ChecksumAggregationMethod::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["LINEAR"]
    }
}
impl AsRef<str> for ChecksumAggregationMethod {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}