aws-sdk-sagemakeredge 0.24.0

AWS SDK for Amazon Sagemaker Edge Manager
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Information about the result of a deployment on an edge device that is registered with SageMaker Edge Manager.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeploymentResult {
    /// <p>The name and unique ID of the deployment.</p>
    #[doc(hidden)]
    pub deployment_name: std::option::Option<std::string::String>,
    /// <p>Returns the bucket error code.</p>
    #[doc(hidden)]
    pub deployment_status: std::option::Option<std::string::String>,
    /// <p>Returns the detailed error message.</p>
    #[doc(hidden)]
    pub deployment_status_message: std::option::Option<std::string::String>,
    /// <p>The timestamp of when the deployment was started on the agent.</p>
    #[doc(hidden)]
    pub deployment_start_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The timestamp of when the deployment was ended, and the agent got the deployment results.</p>
    #[doc(hidden)]
    pub deployment_end_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Returns a list of models deployed on the agent.</p>
    #[doc(hidden)]
    pub deployment_models: std::option::Option<std::vec::Vec<crate::model::DeploymentModel>>,
}
impl DeploymentResult {
    /// <p>The name and unique ID of the deployment.</p>
    pub fn deployment_name(&self) -> std::option::Option<&str> {
        self.deployment_name.as_deref()
    }
    /// <p>Returns the bucket error code.</p>
    pub fn deployment_status(&self) -> std::option::Option<&str> {
        self.deployment_status.as_deref()
    }
    /// <p>Returns the detailed error message.</p>
    pub fn deployment_status_message(&self) -> std::option::Option<&str> {
        self.deployment_status_message.as_deref()
    }
    /// <p>The timestamp of when the deployment was started on the agent.</p>
    pub fn deployment_start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.deployment_start_time.as_ref()
    }
    /// <p>The timestamp of when the deployment was ended, and the agent got the deployment results.</p>
    pub fn deployment_end_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.deployment_end_time.as_ref()
    }
    /// <p>Returns a list of models deployed on the agent.</p>
    pub fn deployment_models(&self) -> std::option::Option<&[crate::model::DeploymentModel]> {
        self.deployment_models.as_deref()
    }
}
/// See [`DeploymentResult`](crate::model::DeploymentResult).
pub mod deployment_result {

    /// A builder for [`DeploymentResult`](crate::model::DeploymentResult).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) deployment_name: std::option::Option<std::string::String>,
        pub(crate) deployment_status: std::option::Option<std::string::String>,
        pub(crate) deployment_status_message: std::option::Option<std::string::String>,
        pub(crate) deployment_start_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) deployment_end_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) deployment_models:
            std::option::Option<std::vec::Vec<crate::model::DeploymentModel>>,
    }
    impl Builder {
        /// <p>The name and unique ID of the deployment.</p>
        pub fn deployment_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.deployment_name = Some(input.into());
            self
        }
        /// <p>The name and unique ID of the deployment.</p>
        pub fn set_deployment_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.deployment_name = input;
            self
        }
        /// <p>Returns the bucket error code.</p>
        pub fn deployment_status(mut self, input: impl Into<std::string::String>) -> Self {
            self.deployment_status = Some(input.into());
            self
        }
        /// <p>Returns the bucket error code.</p>
        pub fn set_deployment_status(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.deployment_status = input;
            self
        }
        /// <p>Returns the detailed error message.</p>
        pub fn deployment_status_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.deployment_status_message = Some(input.into());
            self
        }
        /// <p>Returns the detailed error message.</p>
        pub fn set_deployment_status_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.deployment_status_message = input;
            self
        }
        /// <p>The timestamp of when the deployment was started on the agent.</p>
        pub fn deployment_start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.deployment_start_time = Some(input);
            self
        }
        /// <p>The timestamp of when the deployment was started on the agent.</p>
        pub fn set_deployment_start_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.deployment_start_time = input;
            self
        }
        /// <p>The timestamp of when the deployment was ended, and the agent got the deployment results.</p>
        pub fn deployment_end_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.deployment_end_time = Some(input);
            self
        }
        /// <p>The timestamp of when the deployment was ended, and the agent got the deployment results.</p>
        pub fn set_deployment_end_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.deployment_end_time = input;
            self
        }
        /// Appends an item to `deployment_models`.
        ///
        /// To override the contents of this collection use [`set_deployment_models`](Self::set_deployment_models).
        ///
        /// <p>Returns a list of models deployed on the agent.</p>
        pub fn deployment_models(mut self, input: crate::model::DeploymentModel) -> Self {
            let mut v = self.deployment_models.unwrap_or_default();
            v.push(input);
            self.deployment_models = Some(v);
            self
        }
        /// <p>Returns a list of models deployed on the agent.</p>
        pub fn set_deployment_models(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::DeploymentModel>>,
        ) -> Self {
            self.deployment_models = input;
            self
        }
        /// Consumes the builder and constructs a [`DeploymentResult`](crate::model::DeploymentResult).
        pub fn build(self) -> crate::model::DeploymentResult {
            crate::model::DeploymentResult {
                deployment_name: self.deployment_name,
                deployment_status: self.deployment_status,
                deployment_status_message: self.deployment_status_message,
                deployment_start_time: self.deployment_start_time,
                deployment_end_time: self.deployment_end_time,
                deployment_models: self.deployment_models,
            }
        }
    }
}
impl DeploymentResult {
    /// Creates a new builder-style object to manufacture [`DeploymentResult`](crate::model::DeploymentResult).
    pub fn builder() -> crate::model::deployment_result::Builder {
        crate::model::deployment_result::Builder::default()
    }
}

/// <p></p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeploymentModel {
    /// <p>The unique handle of the model.</p>
    #[doc(hidden)]
    pub model_handle: std::option::Option<std::string::String>,
    /// <p>The name of the model.</p>
    #[doc(hidden)]
    pub model_name: std::option::Option<std::string::String>,
    /// <p>The version of the model.</p>
    #[doc(hidden)]
    pub model_version: std::option::Option<std::string::String>,
    /// <p>The desired state of the model.</p>
    #[doc(hidden)]
    pub desired_state: std::option::Option<crate::model::ModelState>,
    /// <p>Returns the current state of the model.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::ModelState>,
    /// <p>Returns the deployment status of the model.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::DeploymentStatus>,
    /// <p>Returns the error message for the deployment status result.</p>
    #[doc(hidden)]
    pub status_reason: std::option::Option<std::string::String>,
    /// <p>Returns the error message if there is a rollback.</p>
    #[doc(hidden)]
    pub rollback_failure_reason: std::option::Option<std::string::String>,
}
impl DeploymentModel {
    /// <p>The unique handle of the model.</p>
    pub fn model_handle(&self) -> std::option::Option<&str> {
        self.model_handle.as_deref()
    }
    /// <p>The name of the model.</p>
    pub fn model_name(&self) -> std::option::Option<&str> {
        self.model_name.as_deref()
    }
    /// <p>The version of the model.</p>
    pub fn model_version(&self) -> std::option::Option<&str> {
        self.model_version.as_deref()
    }
    /// <p>The desired state of the model.</p>
    pub fn desired_state(&self) -> std::option::Option<&crate::model::ModelState> {
        self.desired_state.as_ref()
    }
    /// <p>Returns the current state of the model.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::ModelState> {
        self.state.as_ref()
    }
    /// <p>Returns the deployment status of the model.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::DeploymentStatus> {
        self.status.as_ref()
    }
    /// <p>Returns the error message for the deployment status result.</p>
    pub fn status_reason(&self) -> std::option::Option<&str> {
        self.status_reason.as_deref()
    }
    /// <p>Returns the error message if there is a rollback.</p>
    pub fn rollback_failure_reason(&self) -> std::option::Option<&str> {
        self.rollback_failure_reason.as_deref()
    }
}
/// See [`DeploymentModel`](crate::model::DeploymentModel).
pub mod deployment_model {

    /// A builder for [`DeploymentModel`](crate::model::DeploymentModel).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) model_handle: std::option::Option<std::string::String>,
        pub(crate) model_name: std::option::Option<std::string::String>,
        pub(crate) model_version: std::option::Option<std::string::String>,
        pub(crate) desired_state: std::option::Option<crate::model::ModelState>,
        pub(crate) state: std::option::Option<crate::model::ModelState>,
        pub(crate) status: std::option::Option<crate::model::DeploymentStatus>,
        pub(crate) status_reason: std::option::Option<std::string::String>,
        pub(crate) rollback_failure_reason: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The unique handle of the model.</p>
        pub fn model_handle(mut self, input: impl Into<std::string::String>) -> Self {
            self.model_handle = Some(input.into());
            self
        }
        /// <p>The unique handle of the model.</p>
        pub fn set_model_handle(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.model_handle = input;
            self
        }
        /// <p>The name of the model.</p>
        pub fn model_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.model_name = Some(input.into());
            self
        }
        /// <p>The name of the model.</p>
        pub fn set_model_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.model_name = input;
            self
        }
        /// <p>The version of the model.</p>
        pub fn model_version(mut self, input: impl Into<std::string::String>) -> Self {
            self.model_version = Some(input.into());
            self
        }
        /// <p>The version of the model.</p>
        pub fn set_model_version(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.model_version = input;
            self
        }
        /// <p>The desired state of the model.</p>
        pub fn desired_state(mut self, input: crate::model::ModelState) -> Self {
            self.desired_state = Some(input);
            self
        }
        /// <p>The desired state of the model.</p>
        pub fn set_desired_state(
            mut self,
            input: std::option::Option<crate::model::ModelState>,
        ) -> Self {
            self.desired_state = input;
            self
        }
        /// <p>Returns the current state of the model.</p>
        pub fn state(mut self, input: crate::model::ModelState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>Returns the current state of the model.</p>
        pub fn set_state(mut self, input: std::option::Option<crate::model::ModelState>) -> Self {
            self.state = input;
            self
        }
        /// <p>Returns the deployment status of the model.</p>
        pub fn status(mut self, input: crate::model::DeploymentStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>Returns the deployment status of the model.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::DeploymentStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// <p>Returns the error message for the deployment status result.</p>
        pub fn status_reason(mut self, input: impl Into<std::string::String>) -> Self {
            self.status_reason = Some(input.into());
            self
        }
        /// <p>Returns the error message for the deployment status result.</p>
        pub fn set_status_reason(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.status_reason = input;
            self
        }
        /// <p>Returns the error message if there is a rollback.</p>
        pub fn rollback_failure_reason(mut self, input: impl Into<std::string::String>) -> Self {
            self.rollback_failure_reason = Some(input.into());
            self
        }
        /// <p>Returns the error message if there is a rollback.</p>
        pub fn set_rollback_failure_reason(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.rollback_failure_reason = input;
            self
        }
        /// Consumes the builder and constructs a [`DeploymentModel`](crate::model::DeploymentModel).
        pub fn build(self) -> crate::model::DeploymentModel {
            crate::model::DeploymentModel {
                model_handle: self.model_handle,
                model_name: self.model_name,
                model_version: self.model_version,
                desired_state: self.desired_state,
                state: self.state,
                status: self.status,
                status_reason: self.status_reason,
                rollback_failure_reason: self.rollback_failure_reason,
            }
        }
    }
}
impl DeploymentModel {
    /// Creates a new builder-style object to manufacture [`DeploymentModel`](crate::model::DeploymentModel).
    pub fn builder() -> crate::model::deployment_model::Builder {
        crate::model::deployment_model::Builder::default()
    }
}

/// When writing a match expression against `DeploymentStatus`, 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 deploymentstatus = unimplemented!();
/// match deploymentstatus {
///     DeploymentStatus::Fail => { /* ... */ },
///     DeploymentStatus::Success => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `deploymentstatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DeploymentStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DeploymentStatus::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 `DeploymentStatus::NewFeature` is defined.
/// Specifically, when `deploymentstatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DeploymentStatus::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 DeploymentStatus {
    #[allow(missing_docs)] // documentation missing in model
    Fail,
    #[allow(missing_docs)] // documentation missing in model
    Success,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DeploymentStatus {
    fn from(s: &str) -> Self {
        match s {
            "FAIL" => DeploymentStatus::Fail,
            "SUCCESS" => DeploymentStatus::Success,
            other => DeploymentStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for DeploymentStatus {
    type Err = std::convert::Infallible;

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

/// When writing a match expression against `ModelState`, 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 modelstate = unimplemented!();
/// match modelstate {
///     ModelState::Deploy => { /* ... */ },
///     ModelState::Undeploy => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `modelstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ModelState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ModelState::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 `ModelState::NewFeature` is defined.
/// Specifically, when `modelstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ModelState::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 ModelState {
    #[allow(missing_docs)] // documentation missing in model
    Deploy,
    #[allow(missing_docs)] // documentation missing in model
    Undeploy,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ModelState {
    fn from(s: &str) -> Self {
        match s {
            "DEPLOY" => ModelState::Deploy,
            "UNDEPLOY" => ModelState::Undeploy,
            other => ModelState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ModelState {
    type Err = std::convert::Infallible;

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

/// <p>Information about a model deployed on an edge device that is registered with SageMaker Edge Manager.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Model {
    /// <p>The name of the model.</p>
    #[doc(hidden)]
    pub model_name: std::option::Option<std::string::String>,
    /// <p>The version of the model.</p>
    #[doc(hidden)]
    pub model_version: std::option::Option<std::string::String>,
    /// <p>The timestamp of the last data sample taken.</p>
    #[doc(hidden)]
    pub latest_sample_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The timestamp of the last inference that was made.</p>
    #[doc(hidden)]
    pub latest_inference: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Information required for model metrics.</p>
    #[doc(hidden)]
    pub model_metrics: std::option::Option<std::vec::Vec<crate::model::EdgeMetric>>,
}
impl Model {
    /// <p>The name of the model.</p>
    pub fn model_name(&self) -> std::option::Option<&str> {
        self.model_name.as_deref()
    }
    /// <p>The version of the model.</p>
    pub fn model_version(&self) -> std::option::Option<&str> {
        self.model_version.as_deref()
    }
    /// <p>The timestamp of the last data sample taken.</p>
    pub fn latest_sample_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.latest_sample_time.as_ref()
    }
    /// <p>The timestamp of the last inference that was made.</p>
    pub fn latest_inference(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.latest_inference.as_ref()
    }
    /// <p>Information required for model metrics.</p>
    pub fn model_metrics(&self) -> std::option::Option<&[crate::model::EdgeMetric]> {
        self.model_metrics.as_deref()
    }
}
/// See [`Model`](crate::model::Model).
pub mod model {

    /// A builder for [`Model`](crate::model::Model).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) model_name: std::option::Option<std::string::String>,
        pub(crate) model_version: std::option::Option<std::string::String>,
        pub(crate) latest_sample_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) latest_inference: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) model_metrics: std::option::Option<std::vec::Vec<crate::model::EdgeMetric>>,
    }
    impl Builder {
        /// <p>The name of the model.</p>
        pub fn model_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.model_name = Some(input.into());
            self
        }
        /// <p>The name of the model.</p>
        pub fn set_model_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.model_name = input;
            self
        }
        /// <p>The version of the model.</p>
        pub fn model_version(mut self, input: impl Into<std::string::String>) -> Self {
            self.model_version = Some(input.into());
            self
        }
        /// <p>The version of the model.</p>
        pub fn set_model_version(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.model_version = input;
            self
        }
        /// <p>The timestamp of the last data sample taken.</p>
        pub fn latest_sample_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.latest_sample_time = Some(input);
            self
        }
        /// <p>The timestamp of the last data sample taken.</p>
        pub fn set_latest_sample_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.latest_sample_time = input;
            self
        }
        /// <p>The timestamp of the last inference that was made.</p>
        pub fn latest_inference(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.latest_inference = Some(input);
            self
        }
        /// <p>The timestamp of the last inference that was made.</p>
        pub fn set_latest_inference(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.latest_inference = input;
            self
        }
        /// Appends an item to `model_metrics`.
        ///
        /// To override the contents of this collection use [`set_model_metrics`](Self::set_model_metrics).
        ///
        /// <p>Information required for model metrics.</p>
        pub fn model_metrics(mut self, input: crate::model::EdgeMetric) -> Self {
            let mut v = self.model_metrics.unwrap_or_default();
            v.push(input);
            self.model_metrics = Some(v);
            self
        }
        /// <p>Information required for model metrics.</p>
        pub fn set_model_metrics(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::EdgeMetric>>,
        ) -> Self {
            self.model_metrics = input;
            self
        }
        /// Consumes the builder and constructs a [`Model`](crate::model::Model).
        pub fn build(self) -> crate::model::Model {
            crate::model::Model {
                model_name: self.model_name,
                model_version: self.model_version,
                latest_sample_time: self.latest_sample_time,
                latest_inference: self.latest_inference,
                model_metrics: self.model_metrics,
            }
        }
    }
}
impl Model {
    /// Creates a new builder-style object to manufacture [`Model`](crate::model::Model).
    pub fn builder() -> crate::model::model::Builder {
        crate::model::model::Builder::default()
    }
}

/// <p>Information required for edge device metrics.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EdgeMetric {
    /// <p>The dimension of metrics published.</p>
    #[doc(hidden)]
    pub dimension: std::option::Option<std::string::String>,
    /// <p>Returns the name of the metric.</p>
    #[doc(hidden)]
    pub metric_name: std::option::Option<std::string::String>,
    /// <p>Returns the value of the metric.</p>
    #[doc(hidden)]
    pub value: f64,
    /// <p>Timestamp of when the metric was requested.</p>
    #[doc(hidden)]
    pub timestamp: std::option::Option<aws_smithy_types::DateTime>,
}
impl EdgeMetric {
    /// <p>The dimension of metrics published.</p>
    pub fn dimension(&self) -> std::option::Option<&str> {
        self.dimension.as_deref()
    }
    /// <p>Returns the name of the metric.</p>
    pub fn metric_name(&self) -> std::option::Option<&str> {
        self.metric_name.as_deref()
    }
    /// <p>Returns the value of the metric.</p>
    pub fn value(&self) -> f64 {
        self.value
    }
    /// <p>Timestamp of when the metric was requested.</p>
    pub fn timestamp(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.timestamp.as_ref()
    }
}
/// See [`EdgeMetric`](crate::model::EdgeMetric).
pub mod edge_metric {

    /// A builder for [`EdgeMetric`](crate::model::EdgeMetric).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) dimension: std::option::Option<std::string::String>,
        pub(crate) metric_name: std::option::Option<std::string::String>,
        pub(crate) value: std::option::Option<f64>,
        pub(crate) timestamp: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The dimension of metrics published.</p>
        pub fn dimension(mut self, input: impl Into<std::string::String>) -> Self {
            self.dimension = Some(input.into());
            self
        }
        /// <p>The dimension of metrics published.</p>
        pub fn set_dimension(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.dimension = input;
            self
        }
        /// <p>Returns the name of the metric.</p>
        pub fn metric_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.metric_name = Some(input.into());
            self
        }
        /// <p>Returns the name of the metric.</p>
        pub fn set_metric_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.metric_name = input;
            self
        }
        /// <p>Returns the value of the metric.</p>
        pub fn value(mut self, input: f64) -> Self {
            self.value = Some(input);
            self
        }
        /// <p>Returns the value of the metric.</p>
        pub fn set_value(mut self, input: std::option::Option<f64>) -> Self {
            self.value = input;
            self
        }
        /// <p>Timestamp of when the metric was requested.</p>
        pub fn timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.timestamp = Some(input);
            self
        }
        /// <p>Timestamp of when the metric was requested.</p>
        pub fn set_timestamp(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.timestamp = input;
            self
        }
        /// Consumes the builder and constructs a [`EdgeMetric`](crate::model::EdgeMetric).
        pub fn build(self) -> crate::model::EdgeMetric {
            crate::model::EdgeMetric {
                dimension: self.dimension,
                metric_name: self.metric_name,
                value: self.value.unwrap_or_default(),
                timestamp: self.timestamp,
            }
        }
    }
}
impl EdgeMetric {
    /// Creates a new builder-style object to manufacture [`EdgeMetric`](crate::model::EdgeMetric).
    pub fn builder() -> crate::model::edge_metric::Builder {
        crate::model::edge_metric::Builder::default()
    }
}

/// <p>Information about a deployment on an edge device that is registered with SageMaker Edge Manager.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EdgeDeployment {
    /// <p>The name and unique ID of the deployment.</p>
    #[doc(hidden)]
    pub deployment_name: std::option::Option<std::string::String>,
    /// <p>The type of the deployment.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<crate::model::DeploymentType>,
    /// <p>Determines whether to rollback to previous configuration if deployment fails.</p>
    #[doc(hidden)]
    pub failure_handling_policy: std::option::Option<crate::model::FailureHandlingPolicy>,
    /// <p>Returns a list of Definition objects.</p>
    #[doc(hidden)]
    pub definitions: std::option::Option<std::vec::Vec<crate::model::Definition>>,
}
impl EdgeDeployment {
    /// <p>The name and unique ID of the deployment.</p>
    pub fn deployment_name(&self) -> std::option::Option<&str> {
        self.deployment_name.as_deref()
    }
    /// <p>The type of the deployment.</p>
    pub fn r#type(&self) -> std::option::Option<&crate::model::DeploymentType> {
        self.r#type.as_ref()
    }
    /// <p>Determines whether to rollback to previous configuration if deployment fails.</p>
    pub fn failure_handling_policy(
        &self,
    ) -> std::option::Option<&crate::model::FailureHandlingPolicy> {
        self.failure_handling_policy.as_ref()
    }
    /// <p>Returns a list of Definition objects.</p>
    pub fn definitions(&self) -> std::option::Option<&[crate::model::Definition]> {
        self.definitions.as_deref()
    }
}
/// See [`EdgeDeployment`](crate::model::EdgeDeployment).
pub mod edge_deployment {

    /// A builder for [`EdgeDeployment`](crate::model::EdgeDeployment).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) deployment_name: std::option::Option<std::string::String>,
        pub(crate) r#type: std::option::Option<crate::model::DeploymentType>,
        pub(crate) failure_handling_policy:
            std::option::Option<crate::model::FailureHandlingPolicy>,
        pub(crate) definitions: std::option::Option<std::vec::Vec<crate::model::Definition>>,
    }
    impl Builder {
        /// <p>The name and unique ID of the deployment.</p>
        pub fn deployment_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.deployment_name = Some(input.into());
            self
        }
        /// <p>The name and unique ID of the deployment.</p>
        pub fn set_deployment_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.deployment_name = input;
            self
        }
        /// <p>The type of the deployment.</p>
        pub fn r#type(mut self, input: crate::model::DeploymentType) -> Self {
            self.r#type = Some(input);
            self
        }
        /// <p>The type of the deployment.</p>
        pub fn set_type(
            mut self,
            input: std::option::Option<crate::model::DeploymentType>,
        ) -> Self {
            self.r#type = input;
            self
        }
        /// <p>Determines whether to rollback to previous configuration if deployment fails.</p>
        pub fn failure_handling_policy(
            mut self,
            input: crate::model::FailureHandlingPolicy,
        ) -> Self {
            self.failure_handling_policy = Some(input);
            self
        }
        /// <p>Determines whether to rollback to previous configuration if deployment fails.</p>
        pub fn set_failure_handling_policy(
            mut self,
            input: std::option::Option<crate::model::FailureHandlingPolicy>,
        ) -> Self {
            self.failure_handling_policy = input;
            self
        }
        /// Appends an item to `definitions`.
        ///
        /// To override the contents of this collection use [`set_definitions`](Self::set_definitions).
        ///
        /// <p>Returns a list of Definition objects.</p>
        pub fn definitions(mut self, input: crate::model::Definition) -> Self {
            let mut v = self.definitions.unwrap_or_default();
            v.push(input);
            self.definitions = Some(v);
            self
        }
        /// <p>Returns a list of Definition objects.</p>
        pub fn set_definitions(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Definition>>,
        ) -> Self {
            self.definitions = input;
            self
        }
        /// Consumes the builder and constructs a [`EdgeDeployment`](crate::model::EdgeDeployment).
        pub fn build(self) -> crate::model::EdgeDeployment {
            crate::model::EdgeDeployment {
                deployment_name: self.deployment_name,
                r#type: self.r#type,
                failure_handling_policy: self.failure_handling_policy,
                definitions: self.definitions,
            }
        }
    }
}
impl EdgeDeployment {
    /// Creates a new builder-style object to manufacture [`EdgeDeployment`](crate::model::EdgeDeployment).
    pub fn builder() -> crate::model::edge_deployment::Builder {
        crate::model::edge_deployment::Builder::default()
    }
}

/// <p></p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Definition {
    /// <p>The unique model handle.</p>
    #[doc(hidden)]
    pub model_handle: std::option::Option<std::string::String>,
    /// <p>The absolute S3 location of the model.</p>
    #[doc(hidden)]
    pub s3_url: std::option::Option<std::string::String>,
    /// <p>The checksum information of the model.</p>
    #[doc(hidden)]
    pub checksum: std::option::Option<crate::model::Checksum>,
    /// <p>The desired state of the model.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::ModelState>,
}
impl Definition {
    /// <p>The unique model handle.</p>
    pub fn model_handle(&self) -> std::option::Option<&str> {
        self.model_handle.as_deref()
    }
    /// <p>The absolute S3 location of the model.</p>
    pub fn s3_url(&self) -> std::option::Option<&str> {
        self.s3_url.as_deref()
    }
    /// <p>The checksum information of the model.</p>
    pub fn checksum(&self) -> std::option::Option<&crate::model::Checksum> {
        self.checksum.as_ref()
    }
    /// <p>The desired state of the model.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::ModelState> {
        self.state.as_ref()
    }
}
/// See [`Definition`](crate::model::Definition).
pub mod definition {

    /// A builder for [`Definition`](crate::model::Definition).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) model_handle: std::option::Option<std::string::String>,
        pub(crate) s3_url: std::option::Option<std::string::String>,
        pub(crate) checksum: std::option::Option<crate::model::Checksum>,
        pub(crate) state: std::option::Option<crate::model::ModelState>,
    }
    impl Builder {
        /// <p>The unique model handle.</p>
        pub fn model_handle(mut self, input: impl Into<std::string::String>) -> Self {
            self.model_handle = Some(input.into());
            self
        }
        /// <p>The unique model handle.</p>
        pub fn set_model_handle(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.model_handle = input;
            self
        }
        /// <p>The absolute S3 location of the model.</p>
        pub fn s3_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.s3_url = Some(input.into());
            self
        }
        /// <p>The absolute S3 location of the model.</p>
        pub fn set_s3_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.s3_url = input;
            self
        }
        /// <p>The checksum information of the model.</p>
        pub fn checksum(mut self, input: crate::model::Checksum) -> Self {
            self.checksum = Some(input);
            self
        }
        /// <p>The checksum information of the model.</p>
        pub fn set_checksum(mut self, input: std::option::Option<crate::model::Checksum>) -> Self {
            self.checksum = input;
            self
        }
        /// <p>The desired state of the model.</p>
        pub fn state(mut self, input: crate::model::ModelState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The desired state of the model.</p>
        pub fn set_state(mut self, input: std::option::Option<crate::model::ModelState>) -> Self {
            self.state = input;
            self
        }
        /// Consumes the builder and constructs a [`Definition`](crate::model::Definition).
        pub fn build(self) -> crate::model::Definition {
            crate::model::Definition {
                model_handle: self.model_handle,
                s3_url: self.s3_url,
                checksum: self.checksum,
                state: self.state,
            }
        }
    }
}
impl Definition {
    /// Creates a new builder-style object to manufacture [`Definition`](crate::model::Definition).
    pub fn builder() -> crate::model::definition::Builder {
        crate::model::definition::Builder::default()
    }
}

/// <p>Information about the checksum of a model deployed on a device.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Checksum {
    /// <p>The type of the checksum.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<crate::model::ChecksumType>,
    /// <p>The checksum of the model.</p>
    #[doc(hidden)]
    pub sum: std::option::Option<std::string::String>,
}
impl Checksum {
    /// <p>The type of the checksum.</p>
    pub fn r#type(&self) -> std::option::Option<&crate::model::ChecksumType> {
        self.r#type.as_ref()
    }
    /// <p>The checksum of the model.</p>
    pub fn sum(&self) -> std::option::Option<&str> {
        self.sum.as_deref()
    }
}
/// See [`Checksum`](crate::model::Checksum).
pub mod checksum {

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

/// When writing a match expression against `ChecksumType`, 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 checksumtype = unimplemented!();
/// match checksumtype {
///     ChecksumType::Sha1 => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `checksumtype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ChecksumType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ChecksumType::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 `ChecksumType::NewFeature` is defined.
/// Specifically, when `checksumtype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ChecksumType::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 ChecksumType {
    #[allow(missing_docs)] // documentation missing in model
    Sha1,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ChecksumType {
    fn from(s: &str) -> Self {
        match s {
            "SHA1" => ChecksumType::Sha1,
            other => ChecksumType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ChecksumType {
    type Err = std::convert::Infallible;

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

/// When writing a match expression against `FailureHandlingPolicy`, 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 failurehandlingpolicy = unimplemented!();
/// match failurehandlingpolicy {
///     FailureHandlingPolicy::DoNothing => { /* ... */ },
///     FailureHandlingPolicy::RollbackOnFailure => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `failurehandlingpolicy` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `FailureHandlingPolicy::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `FailureHandlingPolicy::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 `FailureHandlingPolicy::NewFeature` is defined.
/// Specifically, when `failurehandlingpolicy` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `FailureHandlingPolicy::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 FailureHandlingPolicy {
    #[allow(missing_docs)] // documentation missing in model
    DoNothing,
    #[allow(missing_docs)] // documentation missing in model
    RollbackOnFailure,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for FailureHandlingPolicy {
    fn from(s: &str) -> Self {
        match s {
            "DO_NOTHING" => FailureHandlingPolicy::DoNothing,
            "ROLLBACK_ON_FAILURE" => FailureHandlingPolicy::RollbackOnFailure,
            other => {
                FailureHandlingPolicy::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for FailureHandlingPolicy {
    type Err = std::convert::Infallible;

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

/// When writing a match expression against `DeploymentType`, 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 deploymenttype = unimplemented!();
/// match deploymenttype {
///     DeploymentType::Model => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `deploymenttype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DeploymentType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DeploymentType::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 `DeploymentType::NewFeature` is defined.
/// Specifically, when `deploymenttype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DeploymentType::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 DeploymentType {
    #[allow(missing_docs)] // documentation missing in model
    Model,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DeploymentType {
    fn from(s: &str) -> Self {
        match s {
            "Model" => DeploymentType::Model,
            other => DeploymentType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for DeploymentType {
    type Err = std::convert::Infallible;

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