aws-sdk-imagebuilder 1.111.0

AWS SDK for EC2 Image Builder
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 CancelLifecycleExecutionInput {
    /// <p>Identifies the specific runtime instance of the image lifecycle to cancel.</p>
    pub lifecycle_execution_id: ::std::option::Option<::std::string::String>,
    /// <p>Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a> in the <i>Amazon EC2 API Reference</i>.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl CancelLifecycleExecutionInput {
    /// <p>Identifies the specific runtime instance of the image lifecycle to cancel.</p>
    pub fn lifecycle_execution_id(&self) -> ::std::option::Option<&str> {
        self.lifecycle_execution_id.as_deref()
    }
    /// <p>Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a> in the <i>Amazon EC2 API Reference</i>.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl CancelLifecycleExecutionInput {
    /// Creates a new builder-style object to manufacture [`CancelLifecycleExecutionInput`](crate::operation::cancel_lifecycle_execution::CancelLifecycleExecutionInput).
    pub fn builder() -> crate::operation::cancel_lifecycle_execution::builders::CancelLifecycleExecutionInputBuilder {
        crate::operation::cancel_lifecycle_execution::builders::CancelLifecycleExecutionInputBuilder::default()
    }
}

/// A builder for [`CancelLifecycleExecutionInput`](crate::operation::cancel_lifecycle_execution::CancelLifecycleExecutionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CancelLifecycleExecutionInputBuilder {
    pub(crate) lifecycle_execution_id: ::std::option::Option<::std::string::String>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl CancelLifecycleExecutionInputBuilder {
    /// <p>Identifies the specific runtime instance of the image lifecycle to cancel.</p>
    /// This field is required.
    pub fn lifecycle_execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.lifecycle_execution_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Identifies the specific runtime instance of the image lifecycle to cancel.</p>
    pub fn set_lifecycle_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.lifecycle_execution_id = input;
        self
    }
    /// <p>Identifies the specific runtime instance of the image lifecycle to cancel.</p>
    pub fn get_lifecycle_execution_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.lifecycle_execution_id
    }
    /// <p>Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a> in the <i>Amazon EC2 API Reference</i>.</p>
    /// This field is required.
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a> in the <i>Amazon EC2 API Reference</i>.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a> in the <i>Amazon EC2 API Reference</i>.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Consumes the builder and constructs a [`CancelLifecycleExecutionInput`](crate::operation::cancel_lifecycle_execution::CancelLifecycleExecutionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::cancel_lifecycle_execution::CancelLifecycleExecutionInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::cancel_lifecycle_execution::CancelLifecycleExecutionInput {
            lifecycle_execution_id: self.lifecycle_execution_id,
            client_token: self.client_token,
        })
    }
}