aws-sdk-computeoptimizerautomation 1.3.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 UpdateEnrollmentConfigurationInput {
    /// <p>The desired enrollment status.</p>
    /// <ul>
    /// <li>
    /// <p>Active - Enables the Automation feature for your account.</p></li>
    /// <li>
    /// <p>Inactive - Disables the Automation feature for your account and stops all of your automation rules. If you opt in again later, all rules will be inactive, and you must enable the rules you want to run. You must wait at least 24 hours after opting out to opt in again.</p></li>
    /// </ul><note>
    /// <p>The <code>Pending</code> and <code>Failed</code> options cannot be used to update the enrollment status of an account. They are returned in the response of a request to update the enrollment status of an account.</p>
    /// <p>If you are a member account, your account must be disassociated from your organization’s management account before you can disable Automation. Contact your administrator to make this change.</p>
    /// </note>
    pub status: ::std::option::Option<crate::types::EnrollmentStatus>,
    /// <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 UpdateEnrollmentConfigurationInput {
    /// <p>The desired enrollment status.</p>
    /// <ul>
    /// <li>
    /// <p>Active - Enables the Automation feature for your account.</p></li>
    /// <li>
    /// <p>Inactive - Disables the Automation feature for your account and stops all of your automation rules. If you opt in again later, all rules will be inactive, and you must enable the rules you want to run. You must wait at least 24 hours after opting out to opt in again.</p></li>
    /// </ul><note>
    /// <p>The <code>Pending</code> and <code>Failed</code> options cannot be used to update the enrollment status of an account. They are returned in the response of a request to update the enrollment status of an account.</p>
    /// <p>If you are a member account, your account must be disassociated from your organization’s management account before you can disable Automation. Contact your administrator to make this change.</p>
    /// </note>
    pub fn status(&self) -> ::std::option::Option<&crate::types::EnrollmentStatus> {
        self.status.as_ref()
    }
    /// <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 UpdateEnrollmentConfigurationInput {
    /// Creates a new builder-style object to manufacture [`UpdateEnrollmentConfigurationInput`](crate::operation::update_enrollment_configuration::UpdateEnrollmentConfigurationInput).
    pub fn builder() -> crate::operation::update_enrollment_configuration::builders::UpdateEnrollmentConfigurationInputBuilder {
        crate::operation::update_enrollment_configuration::builders::UpdateEnrollmentConfigurationInputBuilder::default()
    }
}

/// A builder for [`UpdateEnrollmentConfigurationInput`](crate::operation::update_enrollment_configuration::UpdateEnrollmentConfigurationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateEnrollmentConfigurationInputBuilder {
    pub(crate) status: ::std::option::Option<crate::types::EnrollmentStatus>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl UpdateEnrollmentConfigurationInputBuilder {
    /// <p>The desired enrollment status.</p>
    /// <ul>
    /// <li>
    /// <p>Active - Enables the Automation feature for your account.</p></li>
    /// <li>
    /// <p>Inactive - Disables the Automation feature for your account and stops all of your automation rules. If you opt in again later, all rules will be inactive, and you must enable the rules you want to run. You must wait at least 24 hours after opting out to opt in again.</p></li>
    /// </ul><note>
    /// <p>The <code>Pending</code> and <code>Failed</code> options cannot be used to update the enrollment status of an account. They are returned in the response of a request to update the enrollment status of an account.</p>
    /// <p>If you are a member account, your account must be disassociated from your organization’s management account before you can disable Automation. Contact your administrator to make this change.</p>
    /// </note>
    /// This field is required.
    pub fn status(mut self, input: crate::types::EnrollmentStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The desired enrollment status.</p>
    /// <ul>
    /// <li>
    /// <p>Active - Enables the Automation feature for your account.</p></li>
    /// <li>
    /// <p>Inactive - Disables the Automation feature for your account and stops all of your automation rules. If you opt in again later, all rules will be inactive, and you must enable the rules you want to run. You must wait at least 24 hours after opting out to opt in again.</p></li>
    /// </ul><note>
    /// <p>The <code>Pending</code> and <code>Failed</code> options cannot be used to update the enrollment status of an account. They are returned in the response of a request to update the enrollment status of an account.</p>
    /// <p>If you are a member account, your account must be disassociated from your organization’s management account before you can disable Automation. Contact your administrator to make this change.</p>
    /// </note>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::EnrollmentStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The desired enrollment status.</p>
    /// <ul>
    /// <li>
    /// <p>Active - Enables the Automation feature for your account.</p></li>
    /// <li>
    /// <p>Inactive - Disables the Automation feature for your account and stops all of your automation rules. If you opt in again later, all rules will be inactive, and you must enable the rules you want to run. You must wait at least 24 hours after opting out to opt in again.</p></li>
    /// </ul><note>
    /// <p>The <code>Pending</code> and <code>Failed</code> options cannot be used to update the enrollment status of an account. They are returned in the response of a request to update the enrollment status of an account.</p>
    /// <p>If you are a member account, your account must be disassociated from your organization’s management account before you can disable Automation. Contact your administrator to make this change.</p>
    /// </note>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::EnrollmentStatus> {
        &self.status
    }
    /// <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 [`UpdateEnrollmentConfigurationInput`](crate::operation::update_enrollment_configuration::UpdateEnrollmentConfigurationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_enrollment_configuration::UpdateEnrollmentConfigurationInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::update_enrollment_configuration::UpdateEnrollmentConfigurationInput {
            status: self.status,
            client_token: self.client_token,
        })
    }
}