aws-sdk-ecs 1.128.0

AWS SDK for Amazon EC2 Container Service
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 ContinueServiceDeploymentInput {
    /// <p>The ARN of the service deployment to continue or roll back.</p>
    pub service_deployment_arn: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the paused lifecycle hook to act on. You can find the <code>hookId</code> by calling <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeServiceDeployments.html">DescribeServiceDeployments</a> and inspecting the <code>lifecycleHookDetails</code> field of the service deployment.</p>
    pub hook_id: ::std::option::Option<::std::string::String>,
    /// <p>The action to take on the paused lifecycle hook. Valid values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>CONTINUE</code> - Proceeds the deployment to the next lifecycle stage.</p></li>
    /// <li>
    /// <p><code>ROLLBACK</code> - Rolls back the deployment to the previous service revision.</p></li>
    /// </ul>
    /// <p>If no value is specified, the default action is <code>CONTINUE</code>.</p>
    pub action: ::std::option::Option<crate::types::DeploymentLifecycleHookAction>,
}
impl ContinueServiceDeploymentInput {
    /// <p>The ARN of the service deployment to continue or roll back.</p>
    pub fn service_deployment_arn(&self) -> ::std::option::Option<&str> {
        self.service_deployment_arn.as_deref()
    }
    /// <p>The ID of the paused lifecycle hook to act on. You can find the <code>hookId</code> by calling <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeServiceDeployments.html">DescribeServiceDeployments</a> and inspecting the <code>lifecycleHookDetails</code> field of the service deployment.</p>
    pub fn hook_id(&self) -> ::std::option::Option<&str> {
        self.hook_id.as_deref()
    }
    /// <p>The action to take on the paused lifecycle hook. Valid values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>CONTINUE</code> - Proceeds the deployment to the next lifecycle stage.</p></li>
    /// <li>
    /// <p><code>ROLLBACK</code> - Rolls back the deployment to the previous service revision.</p></li>
    /// </ul>
    /// <p>If no value is specified, the default action is <code>CONTINUE</code>.</p>
    pub fn action(&self) -> ::std::option::Option<&crate::types::DeploymentLifecycleHookAction> {
        self.action.as_ref()
    }
}
impl ContinueServiceDeploymentInput {
    /// Creates a new builder-style object to manufacture [`ContinueServiceDeploymentInput`](crate::operation::continue_service_deployment::ContinueServiceDeploymentInput).
    pub fn builder() -> crate::operation::continue_service_deployment::builders::ContinueServiceDeploymentInputBuilder {
        crate::operation::continue_service_deployment::builders::ContinueServiceDeploymentInputBuilder::default()
    }
}

/// A builder for [`ContinueServiceDeploymentInput`](crate::operation::continue_service_deployment::ContinueServiceDeploymentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ContinueServiceDeploymentInputBuilder {
    pub(crate) service_deployment_arn: ::std::option::Option<::std::string::String>,
    pub(crate) hook_id: ::std::option::Option<::std::string::String>,
    pub(crate) action: ::std::option::Option<crate::types::DeploymentLifecycleHookAction>,
}
impl ContinueServiceDeploymentInputBuilder {
    /// <p>The ARN of the service deployment to continue or roll back.</p>
    /// This field is required.
    pub fn service_deployment_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.service_deployment_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the service deployment to continue or roll back.</p>
    pub fn set_service_deployment_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.service_deployment_arn = input;
        self
    }
    /// <p>The ARN of the service deployment to continue or roll back.</p>
    pub fn get_service_deployment_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.service_deployment_arn
    }
    /// <p>The ID of the paused lifecycle hook to act on. You can find the <code>hookId</code> by calling <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeServiceDeployments.html">DescribeServiceDeployments</a> and inspecting the <code>lifecycleHookDetails</code> field of the service deployment.</p>
    /// This field is required.
    pub fn hook_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.hook_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the paused lifecycle hook to act on. You can find the <code>hookId</code> by calling <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeServiceDeployments.html">DescribeServiceDeployments</a> and inspecting the <code>lifecycleHookDetails</code> field of the service deployment.</p>
    pub fn set_hook_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.hook_id = input;
        self
    }
    /// <p>The ID of the paused lifecycle hook to act on. You can find the <code>hookId</code> by calling <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeServiceDeployments.html">DescribeServiceDeployments</a> and inspecting the <code>lifecycleHookDetails</code> field of the service deployment.</p>
    pub fn get_hook_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.hook_id
    }
    /// <p>The action to take on the paused lifecycle hook. Valid values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>CONTINUE</code> - Proceeds the deployment to the next lifecycle stage.</p></li>
    /// <li>
    /// <p><code>ROLLBACK</code> - Rolls back the deployment to the previous service revision.</p></li>
    /// </ul>
    /// <p>If no value is specified, the default action is <code>CONTINUE</code>.</p>
    pub fn action(mut self, input: crate::types::DeploymentLifecycleHookAction) -> Self {
        self.action = ::std::option::Option::Some(input);
        self
    }
    /// <p>The action to take on the paused lifecycle hook. Valid values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>CONTINUE</code> - Proceeds the deployment to the next lifecycle stage.</p></li>
    /// <li>
    /// <p><code>ROLLBACK</code> - Rolls back the deployment to the previous service revision.</p></li>
    /// </ul>
    /// <p>If no value is specified, the default action is <code>CONTINUE</code>.</p>
    pub fn set_action(mut self, input: ::std::option::Option<crate::types::DeploymentLifecycleHookAction>) -> Self {
        self.action = input;
        self
    }
    /// <p>The action to take on the paused lifecycle hook. Valid values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>CONTINUE</code> - Proceeds the deployment to the next lifecycle stage.</p></li>
    /// <li>
    /// <p><code>ROLLBACK</code> - Rolls back the deployment to the previous service revision.</p></li>
    /// </ul>
    /// <p>If no value is specified, the default action is <code>CONTINUE</code>.</p>
    pub fn get_action(&self) -> &::std::option::Option<crate::types::DeploymentLifecycleHookAction> {
        &self.action
    }
    /// Consumes the builder and constructs a [`ContinueServiceDeploymentInput`](crate::operation::continue_service_deployment::ContinueServiceDeploymentInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::continue_service_deployment::ContinueServiceDeploymentInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::continue_service_deployment::ContinueServiceDeploymentInput {
            service_deployment_arn: self.service_deployment_arn,
            hook_id: self.hook_id,
            action: self.action,
        })
    }
}