aws-sdk-quicksight 1.135.0

AWS SDK for Amazon QuickSight
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 UpdateKeyRegistrationInput {
    /// <p>The ID of the Amazon Web Services account that contains the customer managed key registration that you want to update.</p>
    pub aws_account_id: ::std::option::Option<::std::string::String>,
    /// <p>A list of <code>RegisteredCustomerManagedKey</code> objects to be updated to the Quick Sight account.</p>
    pub key_registration: ::std::option::Option<::std::vec::Vec<crate::types::RegisteredCustomerManagedKey>>,
}
impl UpdateKeyRegistrationInput {
    /// <p>The ID of the Amazon Web Services account that contains the customer managed key registration that you want to update.</p>
    pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
        self.aws_account_id.as_deref()
    }
    /// <p>A list of <code>RegisteredCustomerManagedKey</code> objects to be updated to the Quick Sight account.</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 `.key_registration.is_none()`.
    pub fn key_registration(&self) -> &[crate::types::RegisteredCustomerManagedKey] {
        self.key_registration.as_deref().unwrap_or_default()
    }
}
impl UpdateKeyRegistrationInput {
    /// Creates a new builder-style object to manufacture [`UpdateKeyRegistrationInput`](crate::operation::update_key_registration::UpdateKeyRegistrationInput).
    pub fn builder() -> crate::operation::update_key_registration::builders::UpdateKeyRegistrationInputBuilder {
        crate::operation::update_key_registration::builders::UpdateKeyRegistrationInputBuilder::default()
    }
}

/// A builder for [`UpdateKeyRegistrationInput`](crate::operation::update_key_registration::UpdateKeyRegistrationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateKeyRegistrationInputBuilder {
    pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
    pub(crate) key_registration: ::std::option::Option<::std::vec::Vec<crate::types::RegisteredCustomerManagedKey>>,
}
impl UpdateKeyRegistrationInputBuilder {
    /// <p>The ID of the Amazon Web Services account that contains the customer managed key registration that you want to update.</p>
    /// This field is required.
    pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.aws_account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Amazon Web Services account that contains the customer managed key registration that you want to update.</p>
    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.aws_account_id = input;
        self
    }
    /// <p>The ID of the Amazon Web Services account that contains the customer managed key registration that you want to update.</p>
    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.aws_account_id
    }
    /// Appends an item to `key_registration`.
    ///
    /// To override the contents of this collection use [`set_key_registration`](Self::set_key_registration).
    ///
    /// <p>A list of <code>RegisteredCustomerManagedKey</code> objects to be updated to the Quick Sight account.</p>
    pub fn key_registration(mut self, input: crate::types::RegisteredCustomerManagedKey) -> Self {
        let mut v = self.key_registration.unwrap_or_default();
        v.push(input);
        self.key_registration = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of <code>RegisteredCustomerManagedKey</code> objects to be updated to the Quick Sight account.</p>
    pub fn set_key_registration(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RegisteredCustomerManagedKey>>) -> Self {
        self.key_registration = input;
        self
    }
    /// <p>A list of <code>RegisteredCustomerManagedKey</code> objects to be updated to the Quick Sight account.</p>
    pub fn get_key_registration(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RegisteredCustomerManagedKey>> {
        &self.key_registration
    }
    /// Consumes the builder and constructs a [`UpdateKeyRegistrationInput`](crate::operation::update_key_registration::UpdateKeyRegistrationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_key_registration::UpdateKeyRegistrationInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_key_registration::UpdateKeyRegistrationInput {
            aws_account_id: self.aws_account_id,
            key_registration: self.key_registration,
        })
    }
}