aws-sdk-appconfig 1.98.0

AWS SDK for Amazon AppConfig
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StopDeploymentInput {
    /// <p>The application ID.</p>
    pub application_id: ::std::option::Option<::std::string::String>,
    /// <p>The environment ID.</p>
    pub environment_id: ::std::option::Option<::std::string::String>,
    /// <p>The sequence number of the deployment.</p>
    pub deployment_number: ::std::option::Option<i32>,
    /// <p>A Boolean that enables AppConfig to rollback a <code>COMPLETED</code> deployment to the previous configuration version. This action moves the deployment to a status of <code>REVERTED</code>.</p>
    pub allow_revert: ::std::option::Option<bool>,
}
impl StopDeploymentInput {
    /// <p>The application ID.</p>
    pub fn application_id(&self) -> ::std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The environment ID.</p>
    pub fn environment_id(&self) -> ::std::option::Option<&str> {
        self.environment_id.as_deref()
    }
    /// <p>The sequence number of the deployment.</p>
    pub fn deployment_number(&self) -> ::std::option::Option<i32> {
        self.deployment_number
    }
    /// <p>A Boolean that enables AppConfig to rollback a <code>COMPLETED</code> deployment to the previous configuration version. This action moves the deployment to a status of <code>REVERTED</code>.</p>
    pub fn allow_revert(&self) -> ::std::option::Option<bool> {
        self.allow_revert
    }
}
impl StopDeploymentInput {
    /// Creates a new builder-style object to manufacture [`StopDeploymentInput`](crate::operation::stop_deployment::StopDeploymentInput).
    pub fn builder() -> crate::operation::stop_deployment::builders::StopDeploymentInputBuilder {
        crate::operation::stop_deployment::builders::StopDeploymentInputBuilder::default()
    }
}

/// A builder for [`StopDeploymentInput`](crate::operation::stop_deployment::StopDeploymentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StopDeploymentInputBuilder {
    pub(crate) application_id: ::std::option::Option<::std::string::String>,
    pub(crate) environment_id: ::std::option::Option<::std::string::String>,
    pub(crate) deployment_number: ::std::option::Option<i32>,
    pub(crate) allow_revert: ::std::option::Option<bool>,
}
impl StopDeploymentInputBuilder {
    /// <p>The application ID.</p>
    /// This field is required.
    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.application_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The application ID.</p>
    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.application_id = input;
        self
    }
    /// <p>The application ID.</p>
    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.application_id
    }
    /// <p>The environment ID.</p>
    /// This field is required.
    pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.environment_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The environment ID.</p>
    pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.environment_id = input;
        self
    }
    /// <p>The environment ID.</p>
    pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.environment_id
    }
    /// <p>The sequence number of the deployment.</p>
    /// This field is required.
    pub fn deployment_number(mut self, input: i32) -> Self {
        self.deployment_number = ::std::option::Option::Some(input);
        self
    }
    /// <p>The sequence number of the deployment.</p>
    pub fn set_deployment_number(mut self, input: ::std::option::Option<i32>) -> Self {
        self.deployment_number = input;
        self
    }
    /// <p>The sequence number of the deployment.</p>
    pub fn get_deployment_number(&self) -> &::std::option::Option<i32> {
        &self.deployment_number
    }
    /// <p>A Boolean that enables AppConfig to rollback a <code>COMPLETED</code> deployment to the previous configuration version. This action moves the deployment to a status of <code>REVERTED</code>.</p>
    pub fn allow_revert(mut self, input: bool) -> Self {
        self.allow_revert = ::std::option::Option::Some(input);
        self
    }
    /// <p>A Boolean that enables AppConfig to rollback a <code>COMPLETED</code> deployment to the previous configuration version. This action moves the deployment to a status of <code>REVERTED</code>.</p>
    pub fn set_allow_revert(mut self, input: ::std::option::Option<bool>) -> Self {
        self.allow_revert = input;
        self
    }
    /// <p>A Boolean that enables AppConfig to rollback a <code>COMPLETED</code> deployment to the previous configuration version. This action moves the deployment to a status of <code>REVERTED</code>.</p>
    pub fn get_allow_revert(&self) -> &::std::option::Option<bool> {
        &self.allow_revert
    }
    /// Consumes the builder and constructs a [`StopDeploymentInput`](crate::operation::stop_deployment::StopDeploymentInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::stop_deployment::StopDeploymentInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::stop_deployment::StopDeploymentInput {
            application_id: self.application_id,
            environment_id: self.environment_id,
            deployment_number: self.deployment_number,
            allow_revert: self.allow_revert,
        })
    }
}