aws-sdk-billing 1.50.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, ::std::fmt::Debug)]
pub struct UpdateBillingViewOutput {
    /// <p>The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.</p>
    pub arn: ::std::string::String,
    /// <p>The time when the billing view was last updated.</p>
    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl UpdateBillingViewOutput {
    /// <p>The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.</p>
    pub fn arn(&self) -> &str {
        use std::ops::Deref;
        self.arn.deref()
    }
    /// <p>The time when the billing view was last updated.</p>
    pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.updated_at.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for UpdateBillingViewOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl UpdateBillingViewOutput {
    /// Creates a new builder-style object to manufacture [`UpdateBillingViewOutput`](crate::operation::update_billing_view::UpdateBillingViewOutput).
    pub fn builder() -> crate::operation::update_billing_view::builders::UpdateBillingViewOutputBuilder {
        crate::operation::update_billing_view::builders::UpdateBillingViewOutputBuilder::default()
    }
}

/// A builder for [`UpdateBillingViewOutput`](crate::operation::update_billing_view::UpdateBillingViewOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateBillingViewOutputBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl UpdateBillingViewOutputBuilder {
    /// <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 time when the billing view was last updated.</p>
    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.updated_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time when the billing view was last updated.</p>
    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.updated_at = input;
        self
    }
    /// <p>The time when the billing view was last updated.</p>
    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.updated_at
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`UpdateBillingViewOutput`](crate::operation::update_billing_view::UpdateBillingViewOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`arn`](crate::operation::update_billing_view::builders::UpdateBillingViewOutputBuilder::arn)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_billing_view::UpdateBillingViewOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_billing_view::UpdateBillingViewOutput {
            arn: self.arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "arn",
                    "arn was not specified but it is required when building UpdateBillingViewOutput",
                )
            })?,
            updated_at: self.updated_at,
            _request_id: self._request_id,
        })
    }
}