aws-sdk-computeoptimizerautomation 1.7.0

AWS SDK for Compute Optimizer Automation
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 RollbackAutomationEventInput {
    /// <p>The ID of the automation event to roll back.</p>
    pub event_id: ::std::option::Option<::std::string::String>,
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Must be 1-64 characters long and contain only alphanumeric characters, underscores, and hyphens.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl RollbackAutomationEventInput {
    /// <p>The ID of the automation event to roll back.</p>
    pub fn event_id(&self) -> ::std::option::Option<&str> {
        self.event_id.as_deref()
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Must be 1-64 characters long and contain only alphanumeric characters, underscores, and hyphens.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl RollbackAutomationEventInput {
    /// Creates a new builder-style object to manufacture [`RollbackAutomationEventInput`](crate::operation::rollback_automation_event::RollbackAutomationEventInput).
    pub fn builder() -> crate::operation::rollback_automation_event::builders::RollbackAutomationEventInputBuilder {
        crate::operation::rollback_automation_event::builders::RollbackAutomationEventInputBuilder::default()
    }
}

/// A builder for [`RollbackAutomationEventInput`](crate::operation::rollback_automation_event::RollbackAutomationEventInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RollbackAutomationEventInputBuilder {
    pub(crate) event_id: ::std::option::Option<::std::string::String>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl RollbackAutomationEventInputBuilder {
    /// <p>The ID of the automation event to roll back.</p>
    /// This field is required.
    pub fn event_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.event_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the automation event to roll back.</p>
    pub fn set_event_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.event_id = input;
        self
    }
    /// <p>The ID of the automation event to roll back.</p>
    pub fn get_event_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.event_id
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Must be 1-64 characters long and contain only alphanumeric characters, underscores, and hyphens.</p>
    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>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Must be 1-64 characters long and contain only alphanumeric characters, underscores, and hyphens.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Must be 1-64 characters long and contain only alphanumeric characters, underscores, and hyphens.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Consumes the builder and constructs a [`RollbackAutomationEventInput`](crate::operation::rollback_automation_event::RollbackAutomationEventInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::rollback_automation_event::RollbackAutomationEventInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::rollback_automation_event::RollbackAutomationEventInput {
            event_id: self.event_id,
            client_token: self.client_token,
        })
    }
}