aws-sdk-deadline 1.42.0

AWS SDK for AWSDeadlineCloud
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)]
pub struct UpdateBudgetInput {
    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>The farm ID of the budget to update.</p>
    pub farm_id: ::std::option::Option<::std::string::String>,
    /// <p>The budget ID to update.</p>
    pub budget_id: ::std::option::Option<::std::string::String>,
    /// <p>The display name of the budget to update.</p><important>
    /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
    /// </important>
    pub display_name: ::std::option::Option<::std::string::String>,
    /// <p>The description of the budget to update.</p><important>
    /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
    /// </important>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>Updates the status of the budget.</p>
    /// <ul>
    /// <li>
    /// <p><code>ACTIVE</code>–The budget is being evaluated.</p></li>
    /// <li>
    /// <p><code>INACTIVE</code>–The budget is inactive. This can include Expired, Canceled, or deleted Deleted statuses.</p></li>
    /// </ul>
    pub status: ::std::option::Option<crate::types::BudgetStatus>,
    /// <p>The dollar limit to update on the budget. Based on consumed usage.</p>
    pub approximate_dollar_limit: ::std::option::Option<f32>,
    /// <p>The budget actions to add. Budget actions specify what happens when the budget runs out.</p>
    pub actions_to_add: ::std::option::Option<::std::vec::Vec<crate::types::BudgetActionToAdd>>,
    /// <p>The budget actions to remove from the budget.</p>
    pub actions_to_remove: ::std::option::Option<::std::vec::Vec<crate::types::BudgetActionToRemove>>,
    /// <p>The schedule to update.</p>
    pub schedule: ::std::option::Option<crate::types::BudgetSchedule>,
}
impl UpdateBudgetInput {
    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>The farm ID of the budget to update.</p>
    pub fn farm_id(&self) -> ::std::option::Option<&str> {
        self.farm_id.as_deref()
    }
    /// <p>The budget ID to update.</p>
    pub fn budget_id(&self) -> ::std::option::Option<&str> {
        self.budget_id.as_deref()
    }
    /// <p>The display name of the budget to update.</p><important>
    /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
    /// </important>
    pub fn display_name(&self) -> ::std::option::Option<&str> {
        self.display_name.as_deref()
    }
    /// <p>The description of the budget to update.</p><important>
    /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
    /// </important>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Updates the status of the budget.</p>
    /// <ul>
    /// <li>
    /// <p><code>ACTIVE</code>–The budget is being evaluated.</p></li>
    /// <li>
    /// <p><code>INACTIVE</code>–The budget is inactive. This can include Expired, Canceled, or deleted Deleted statuses.</p></li>
    /// </ul>
    pub fn status(&self) -> ::std::option::Option<&crate::types::BudgetStatus> {
        self.status.as_ref()
    }
    /// <p>The dollar limit to update on the budget. Based on consumed usage.</p>
    pub fn approximate_dollar_limit(&self) -> ::std::option::Option<f32> {
        self.approximate_dollar_limit
    }
    /// <p>The budget actions to add. Budget actions specify what happens when the budget runs out.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.actions_to_add.is_none()`.
    pub fn actions_to_add(&self) -> &[crate::types::BudgetActionToAdd] {
        self.actions_to_add.as_deref().unwrap_or_default()
    }
    /// <p>The budget actions to remove from the budget.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.actions_to_remove.is_none()`.
    pub fn actions_to_remove(&self) -> &[crate::types::BudgetActionToRemove] {
        self.actions_to_remove.as_deref().unwrap_or_default()
    }
    /// <p>The schedule to update.</p>
    pub fn schedule(&self) -> ::std::option::Option<&crate::types::BudgetSchedule> {
        self.schedule.as_ref()
    }
}
impl ::std::fmt::Debug for UpdateBudgetInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateBudgetInput");
        formatter.field("client_token", &self.client_token);
        formatter.field("farm_id", &self.farm_id);
        formatter.field("budget_id", &self.budget_id);
        formatter.field("display_name", &self.display_name);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("status", &self.status);
        formatter.field("approximate_dollar_limit", &self.approximate_dollar_limit);
        formatter.field("actions_to_add", &self.actions_to_add);
        formatter.field("actions_to_remove", &self.actions_to_remove);
        formatter.field("schedule", &self.schedule);
        formatter.finish()
    }
}
impl UpdateBudgetInput {
    /// Creates a new builder-style object to manufacture [`UpdateBudgetInput`](crate::operation::update_budget::UpdateBudgetInput).
    pub fn builder() -> crate::operation::update_budget::builders::UpdateBudgetInputBuilder {
        crate::operation::update_budget::builders::UpdateBudgetInputBuilder::default()
    }
}

/// A builder for [`UpdateBudgetInput`](crate::operation::update_budget::UpdateBudgetInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateBudgetInputBuilder {
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) farm_id: ::std::option::Option<::std::string::String>,
    pub(crate) budget_id: ::std::option::Option<::std::string::String>,
    pub(crate) display_name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::BudgetStatus>,
    pub(crate) approximate_dollar_limit: ::std::option::Option<f32>,
    pub(crate) actions_to_add: ::std::option::Option<::std::vec::Vec<crate::types::BudgetActionToAdd>>,
    pub(crate) actions_to_remove: ::std::option::Option<::std::vec::Vec<crate::types::BudgetActionToRemove>>,
    pub(crate) schedule: ::std::option::Option<crate::types::BudgetSchedule>,
}
impl UpdateBudgetInputBuilder {
    /// <p>The unique token which the server uses to recognize retries of the same 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>The unique token which the server uses to recognize retries of the same request.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// <p>The farm ID of the budget to update.</p>
    /// This field is required.
    pub fn farm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.farm_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The farm ID of the budget to update.</p>
    pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.farm_id = input;
        self
    }
    /// <p>The farm ID of the budget to update.</p>
    pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.farm_id
    }
    /// <p>The budget ID to update.</p>
    /// This field is required.
    pub fn budget_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.budget_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The budget ID to update.</p>
    pub fn set_budget_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.budget_id = input;
        self
    }
    /// <p>The budget ID to update.</p>
    pub fn get_budget_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.budget_id
    }
    /// <p>The display name of the budget to update.</p><important>
    /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
    /// </important>
    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.display_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The display name of the budget to update.</p><important>
    /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
    /// </important>
    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.display_name = input;
        self
    }
    /// <p>The display name of the budget to update.</p><important>
    /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
    /// </important>
    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.display_name
    }
    /// <p>The description of the budget to update.</p><important>
    /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
    /// </important>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the budget to update.</p><important>
    /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
    /// </important>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the budget to update.</p><important>
    /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
    /// </important>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>Updates the status of the budget.</p>
    /// <ul>
    /// <li>
    /// <p><code>ACTIVE</code>–The budget is being evaluated.</p></li>
    /// <li>
    /// <p><code>INACTIVE</code>–The budget is inactive. This can include Expired, Canceled, or deleted Deleted statuses.</p></li>
    /// </ul>
    pub fn status(mut self, input: crate::types::BudgetStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>Updates the status of the budget.</p>
    /// <ul>
    /// <li>
    /// <p><code>ACTIVE</code>–The budget is being evaluated.</p></li>
    /// <li>
    /// <p><code>INACTIVE</code>–The budget is inactive. This can include Expired, Canceled, or deleted Deleted statuses.</p></li>
    /// </ul>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::BudgetStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>Updates the status of the budget.</p>
    /// <ul>
    /// <li>
    /// <p><code>ACTIVE</code>–The budget is being evaluated.</p></li>
    /// <li>
    /// <p><code>INACTIVE</code>–The budget is inactive. This can include Expired, Canceled, or deleted Deleted statuses.</p></li>
    /// </ul>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::BudgetStatus> {
        &self.status
    }
    /// <p>The dollar limit to update on the budget. Based on consumed usage.</p>
    pub fn approximate_dollar_limit(mut self, input: f32) -> Self {
        self.approximate_dollar_limit = ::std::option::Option::Some(input);
        self
    }
    /// <p>The dollar limit to update on the budget. Based on consumed usage.</p>
    pub fn set_approximate_dollar_limit(mut self, input: ::std::option::Option<f32>) -> Self {
        self.approximate_dollar_limit = input;
        self
    }
    /// <p>The dollar limit to update on the budget. Based on consumed usage.</p>
    pub fn get_approximate_dollar_limit(&self) -> &::std::option::Option<f32> {
        &self.approximate_dollar_limit
    }
    /// Appends an item to `actions_to_add`.
    ///
    /// To override the contents of this collection use [`set_actions_to_add`](Self::set_actions_to_add).
    ///
    /// <p>The budget actions to add. Budget actions specify what happens when the budget runs out.</p>
    pub fn actions_to_add(mut self, input: crate::types::BudgetActionToAdd) -> Self {
        let mut v = self.actions_to_add.unwrap_or_default();
        v.push(input);
        self.actions_to_add = ::std::option::Option::Some(v);
        self
    }
    /// <p>The budget actions to add. Budget actions specify what happens when the budget runs out.</p>
    pub fn set_actions_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BudgetActionToAdd>>) -> Self {
        self.actions_to_add = input;
        self
    }
    /// <p>The budget actions to add. Budget actions specify what happens when the budget runs out.</p>
    pub fn get_actions_to_add(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BudgetActionToAdd>> {
        &self.actions_to_add
    }
    /// Appends an item to `actions_to_remove`.
    ///
    /// To override the contents of this collection use [`set_actions_to_remove`](Self::set_actions_to_remove).
    ///
    /// <p>The budget actions to remove from the budget.</p>
    pub fn actions_to_remove(mut self, input: crate::types::BudgetActionToRemove) -> Self {
        let mut v = self.actions_to_remove.unwrap_or_default();
        v.push(input);
        self.actions_to_remove = ::std::option::Option::Some(v);
        self
    }
    /// <p>The budget actions to remove from the budget.</p>
    pub fn set_actions_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BudgetActionToRemove>>) -> Self {
        self.actions_to_remove = input;
        self
    }
    /// <p>The budget actions to remove from the budget.</p>
    pub fn get_actions_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BudgetActionToRemove>> {
        &self.actions_to_remove
    }
    /// <p>The schedule to update.</p>
    pub fn schedule(mut self, input: crate::types::BudgetSchedule) -> Self {
        self.schedule = ::std::option::Option::Some(input);
        self
    }
    /// <p>The schedule to update.</p>
    pub fn set_schedule(mut self, input: ::std::option::Option<crate::types::BudgetSchedule>) -> Self {
        self.schedule = input;
        self
    }
    /// <p>The schedule to update.</p>
    pub fn get_schedule(&self) -> &::std::option::Option<crate::types::BudgetSchedule> {
        &self.schedule
    }
    /// Consumes the builder and constructs a [`UpdateBudgetInput`](crate::operation::update_budget::UpdateBudgetInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_budget::UpdateBudgetInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_budget::UpdateBudgetInput {
            client_token: self.client_token,
            farm_id: self.farm_id,
            budget_id: self.budget_id,
            display_name: self.display_name,
            description: self.description,
            status: self.status,
            approximate_dollar_limit: self.approximate_dollar_limit,
            actions_to_add: self.actions_to_add,
            actions_to_remove: self.actions_to_remove,
            schedule: self.schedule,
        })
    }
}
impl ::std::fmt::Debug for UpdateBudgetInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateBudgetInputBuilder");
        formatter.field("client_token", &self.client_token);
        formatter.field("farm_id", &self.farm_id);
        formatter.field("budget_id", &self.budget_id);
        formatter.field("display_name", &self.display_name);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("status", &self.status);
        formatter.field("approximate_dollar_limit", &self.approximate_dollar_limit);
        formatter.field("actions_to_add", &self.actions_to_add);
        formatter.field("actions_to_remove", &self.actions_to_remove);
        formatter.field("schedule", &self.schedule);
        formatter.finish()
    }
}