aws-sdk-billing 1.53.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 DisassociateSourceViewsInput {
    /// <p>The Amazon Resource Name (ARN) of the billing view to disassociate source views from.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>A list of ARNs of the source billing views to disassociate.</p>
    pub source_views: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DisassociateSourceViewsInput {
    /// <p>The Amazon Resource Name (ARN) of the billing view to disassociate source views from.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>A list of ARNs of the source billing views to disassociate.</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 `.source_views.is_none()`.
    pub fn source_views(&self) -> &[::std::string::String] {
        self.source_views.as_deref().unwrap_or_default()
    }
}
impl DisassociateSourceViewsInput {
    /// Creates a new builder-style object to manufacture [`DisassociateSourceViewsInput`](crate::operation::disassociate_source_views::DisassociateSourceViewsInput).
    pub fn builder() -> crate::operation::disassociate_source_views::builders::DisassociateSourceViewsInputBuilder {
        crate::operation::disassociate_source_views::builders::DisassociateSourceViewsInputBuilder::default()
    }
}

/// A builder for [`DisassociateSourceViewsInput`](crate::operation::disassociate_source_views::DisassociateSourceViewsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DisassociateSourceViewsInputBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) source_views: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DisassociateSourceViewsInputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the billing view to disassociate source views from.</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) of the billing view to disassociate source views from.</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) of the billing view to disassociate source views from.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// Appends an item to `source_views`.
    ///
    /// To override the contents of this collection use [`set_source_views`](Self::set_source_views).
    ///
    /// <p>A list of ARNs of the source billing views to disassociate.</p>
    pub fn source_views(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.source_views.unwrap_or_default();
        v.push(input.into());
        self.source_views = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of ARNs of the source billing views to disassociate.</p>
    pub fn set_source_views(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.source_views = input;
        self
    }
    /// <p>A list of ARNs of the source billing views to disassociate.</p>
    pub fn get_source_views(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.source_views
    }
    /// Consumes the builder and constructs a [`DisassociateSourceViewsInput`](crate::operation::disassociate_source_views::DisassociateSourceViewsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::disassociate_source_views::DisassociateSourceViewsInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::disassociate_source_views::DisassociateSourceViewsInput {
            arn: self.arn,
            source_views: self.source_views,
        })
    }
}