aws-sdk-redshift 1.106.0

AWS SDK for Amazon Redshift
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 ModifyUsageLimitInput {
    /// <p>The identifier of the usage limit to modify.</p>
    pub usage_limit_id: ::std::option::Option<::std::string::String>,
    /// <p>The new limit amount. For more information about this parameter, see <code>UsageLimit</code>.</p>
    pub amount: ::std::option::Option<i64>,
    /// <p>The new action that Amazon Redshift takes when the limit is reached. For more information about this parameter, see <code>UsageLimit</code>.</p>
    pub breach_action: ::std::option::Option<crate::types::UsageLimitBreachAction>,
}
impl ModifyUsageLimitInput {
    /// <p>The identifier of the usage limit to modify.</p>
    pub fn usage_limit_id(&self) -> ::std::option::Option<&str> {
        self.usage_limit_id.as_deref()
    }
    /// <p>The new limit amount. For more information about this parameter, see <code>UsageLimit</code>.</p>
    pub fn amount(&self) -> ::std::option::Option<i64> {
        self.amount
    }
    /// <p>The new action that Amazon Redshift takes when the limit is reached. For more information about this parameter, see <code>UsageLimit</code>.</p>
    pub fn breach_action(&self) -> ::std::option::Option<&crate::types::UsageLimitBreachAction> {
        self.breach_action.as_ref()
    }
}
impl ModifyUsageLimitInput {
    /// Creates a new builder-style object to manufacture [`ModifyUsageLimitInput`](crate::operation::modify_usage_limit::ModifyUsageLimitInput).
    pub fn builder() -> crate::operation::modify_usage_limit::builders::ModifyUsageLimitInputBuilder {
        crate::operation::modify_usage_limit::builders::ModifyUsageLimitInputBuilder::default()
    }
}

/// A builder for [`ModifyUsageLimitInput`](crate::operation::modify_usage_limit::ModifyUsageLimitInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ModifyUsageLimitInputBuilder {
    pub(crate) usage_limit_id: ::std::option::Option<::std::string::String>,
    pub(crate) amount: ::std::option::Option<i64>,
    pub(crate) breach_action: ::std::option::Option<crate::types::UsageLimitBreachAction>,
}
impl ModifyUsageLimitInputBuilder {
    /// <p>The identifier of the usage limit to modify.</p>
    /// This field is required.
    pub fn usage_limit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.usage_limit_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the usage limit to modify.</p>
    pub fn set_usage_limit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.usage_limit_id = input;
        self
    }
    /// <p>The identifier of the usage limit to modify.</p>
    pub fn get_usage_limit_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.usage_limit_id
    }
    /// <p>The new limit amount. For more information about this parameter, see <code>UsageLimit</code>.</p>
    pub fn amount(mut self, input: i64) -> Self {
        self.amount = ::std::option::Option::Some(input);
        self
    }
    /// <p>The new limit amount. For more information about this parameter, see <code>UsageLimit</code>.</p>
    pub fn set_amount(mut self, input: ::std::option::Option<i64>) -> Self {
        self.amount = input;
        self
    }
    /// <p>The new limit amount. For more information about this parameter, see <code>UsageLimit</code>.</p>
    pub fn get_amount(&self) -> &::std::option::Option<i64> {
        &self.amount
    }
    /// <p>The new action that Amazon Redshift takes when the limit is reached. For more information about this parameter, see <code>UsageLimit</code>.</p>
    pub fn breach_action(mut self, input: crate::types::UsageLimitBreachAction) -> Self {
        self.breach_action = ::std::option::Option::Some(input);
        self
    }
    /// <p>The new action that Amazon Redshift takes when the limit is reached. For more information about this parameter, see <code>UsageLimit</code>.</p>
    pub fn set_breach_action(mut self, input: ::std::option::Option<crate::types::UsageLimitBreachAction>) -> Self {
        self.breach_action = input;
        self
    }
    /// <p>The new action that Amazon Redshift takes when the limit is reached. For more information about this parameter, see <code>UsageLimit</code>.</p>
    pub fn get_breach_action(&self) -> &::std::option::Option<crate::types::UsageLimitBreachAction> {
        &self.breach_action
    }
    /// Consumes the builder and constructs a [`ModifyUsageLimitInput`](crate::operation::modify_usage_limit::ModifyUsageLimitInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::modify_usage_limit::ModifyUsageLimitInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::modify_usage_limit::ModifyUsageLimitInput {
            usage_limit_id: self.usage_limit_id,
            amount: self.amount,
            breach_action: self.breach_action,
        })
    }
}