aws-sdk-computeoptimizerautomation 1.9.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 DeleteAutomationRuleInput {
    /// <p>The ARN of the rule to delete.</p>
    pub rule_arn: ::std::option::Option<::std::string::String>,
    /// <p>The revision number of the rule to delete.</p>
    pub rule_revision: ::std::option::Option<i64>,
    /// <p>A unique identifier to ensure idempotency of the request.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl DeleteAutomationRuleInput {
    /// <p>The ARN of the rule to delete.</p>
    pub fn rule_arn(&self) -> ::std::option::Option<&str> {
        self.rule_arn.as_deref()
    }
    /// <p>The revision number of the rule to delete.</p>
    pub fn rule_revision(&self) -> ::std::option::Option<i64> {
        self.rule_revision
    }
    /// <p>A unique identifier to ensure idempotency of the request.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl DeleteAutomationRuleInput {
    /// Creates a new builder-style object to manufacture [`DeleteAutomationRuleInput`](crate::operation::delete_automation_rule::DeleteAutomationRuleInput).
    pub fn builder() -> crate::operation::delete_automation_rule::builders::DeleteAutomationRuleInputBuilder {
        crate::operation::delete_automation_rule::builders::DeleteAutomationRuleInputBuilder::default()
    }
}

/// A builder for [`DeleteAutomationRuleInput`](crate::operation::delete_automation_rule::DeleteAutomationRuleInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteAutomationRuleInputBuilder {
    pub(crate) rule_arn: ::std::option::Option<::std::string::String>,
    pub(crate) rule_revision: ::std::option::Option<i64>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl DeleteAutomationRuleInputBuilder {
    /// <p>The ARN of the rule to delete.</p>
    /// This field is required.
    pub fn rule_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.rule_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the rule to delete.</p>
    pub fn set_rule_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.rule_arn = input;
        self
    }
    /// <p>The ARN of the rule to delete.</p>
    pub fn get_rule_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.rule_arn
    }
    /// <p>The revision number of the rule to delete.</p>
    /// This field is required.
    pub fn rule_revision(mut self, input: i64) -> Self {
        self.rule_revision = ::std::option::Option::Some(input);
        self
    }
    /// <p>The revision number of the rule to delete.</p>
    pub fn set_rule_revision(mut self, input: ::std::option::Option<i64>) -> Self {
        self.rule_revision = input;
        self
    }
    /// <p>The revision number of the rule to delete.</p>
    pub fn get_rule_revision(&self) -> &::std::option::Option<i64> {
        &self.rule_revision
    }
    /// <p>A unique identifier to ensure idempotency of the request.</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 identifier to ensure idempotency of the request.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>A unique identifier to ensure idempotency of the request.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Consumes the builder and constructs a [`DeleteAutomationRuleInput`](crate::operation::delete_automation_rule::DeleteAutomationRuleInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_automation_rule::DeleteAutomationRuleInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::delete_automation_rule::DeleteAutomationRuleInput {
            rule_arn: self.rule_arn,
            rule_revision: self.rule_revision,
            client_token: self.client_token,
        })
    }
}