aws-sdk-billing 1.26.0

AWS SDK for AWS Billing
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 UpdateBillingViewInput {
    /// <p>The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The name of the billing view.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The description of the billing view.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>See <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html">Expression</a>. Billing view only supports <code>LINKED_ACCOUNT</code> and <code>Tags</code>.</p>
    pub data_filter_expression: ::std::option::Option<crate::types::Expression>,
}
impl UpdateBillingViewInput {
    /// <p>The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The name of the billing view.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The description of the billing view.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>See <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html">Expression</a>. Billing view only supports <code>LINKED_ACCOUNT</code> and <code>Tags</code>.</p>
    pub fn data_filter_expression(&self) -> ::std::option::Option<&crate::types::Expression> {
        self.data_filter_expression.as_ref()
    }
}
impl ::std::fmt::Debug for UpdateBillingViewInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateBillingViewInput");
        formatter.field("arn", &self.arn);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("data_filter_expression", &self.data_filter_expression);
        formatter.finish()
    }
}
impl UpdateBillingViewInput {
    /// Creates a new builder-style object to manufacture [`UpdateBillingViewInput`](crate::operation::update_billing_view::UpdateBillingViewInput).
    pub fn builder() -> crate::operation::update_billing_view::builders::UpdateBillingViewInputBuilder {
        crate::operation::update_billing_view::builders::UpdateBillingViewInputBuilder::default()
    }
}

/// A builder for [`UpdateBillingViewInput`](crate::operation::update_billing_view::UpdateBillingViewInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateBillingViewInputBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) data_filter_expression: ::std::option::Option<crate::types::Expression>,
}
impl UpdateBillingViewInputBuilder {
    /// <p>The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.</p>
    /// This field is required.
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The name of the billing view.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the billing view.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the billing view.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The description of the billing view.</p>
    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 billing view.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the billing view.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>See <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html">Expression</a>. Billing view only supports <code>LINKED_ACCOUNT</code> and <code>Tags</code>.</p>
    pub fn data_filter_expression(mut self, input: crate::types::Expression) -> Self {
        self.data_filter_expression = ::std::option::Option::Some(input);
        self
    }
    /// <p>See <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html">Expression</a>. Billing view only supports <code>LINKED_ACCOUNT</code> and <code>Tags</code>.</p>
    pub fn set_data_filter_expression(mut self, input: ::std::option::Option<crate::types::Expression>) -> Self {
        self.data_filter_expression = input;
        self
    }
    /// <p>See <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html">Expression</a>. Billing view only supports <code>LINKED_ACCOUNT</code> and <code>Tags</code>.</p>
    pub fn get_data_filter_expression(&self) -> &::std::option::Option<crate::types::Expression> {
        &self.data_filter_expression
    }
    /// Consumes the builder and constructs a [`UpdateBillingViewInput`](crate::operation::update_billing_view::UpdateBillingViewInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_billing_view::UpdateBillingViewInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_billing_view::UpdateBillingViewInput {
            arn: self.arn,
            name: self.name,
            description: self.description,
            data_filter_expression: self.data_filter_expression,
        })
    }
}
impl ::std::fmt::Debug for UpdateBillingViewInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateBillingViewInputBuilder");
        formatter.field("arn", &self.arn);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("data_filter_expression", &self.data_filter_expression);
        formatter.finish()
    }
}