aws-sdk-redshift 1.106.0

AWS SDK for Amazon Redshift
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 DeregisterNamespaceInput {
    /// <p>The unique identifier of the cluster or serverless namespace that you want to deregister.</p>
    pub namespace_identifier: ::std::option::Option<crate::types::NamespaceIdentifierUnion>,
    /// <p>An array containing the ID of the consumer account that you want to deregister the cluster or serverless namespace from.</p>
    pub consumer_identifiers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DeregisterNamespaceInput {
    /// <p>The unique identifier of the cluster or serverless namespace that you want to deregister.</p>
    pub fn namespace_identifier(&self) -> ::std::option::Option<&crate::types::NamespaceIdentifierUnion> {
        self.namespace_identifier.as_ref()
    }
    /// <p>An array containing the ID of the consumer account that you want to deregister the cluster or serverless namespace from.</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 `.consumer_identifiers.is_none()`.
    pub fn consumer_identifiers(&self) -> &[::std::string::String] {
        self.consumer_identifiers.as_deref().unwrap_or_default()
    }
}
impl DeregisterNamespaceInput {
    /// Creates a new builder-style object to manufacture [`DeregisterNamespaceInput`](crate::operation::deregister_namespace::DeregisterNamespaceInput).
    pub fn builder() -> crate::operation::deregister_namespace::builders::DeregisterNamespaceInputBuilder {
        crate::operation::deregister_namespace::builders::DeregisterNamespaceInputBuilder::default()
    }
}

/// A builder for [`DeregisterNamespaceInput`](crate::operation::deregister_namespace::DeregisterNamespaceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeregisterNamespaceInputBuilder {
    pub(crate) namespace_identifier: ::std::option::Option<crate::types::NamespaceIdentifierUnion>,
    pub(crate) consumer_identifiers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DeregisterNamespaceInputBuilder {
    /// <p>The unique identifier of the cluster or serverless namespace that you want to deregister.</p>
    /// This field is required.
    pub fn namespace_identifier(mut self, input: crate::types::NamespaceIdentifierUnion) -> Self {
        self.namespace_identifier = ::std::option::Option::Some(input);
        self
    }
    /// <p>The unique identifier of the cluster or serverless namespace that you want to deregister.</p>
    pub fn set_namespace_identifier(mut self, input: ::std::option::Option<crate::types::NamespaceIdentifierUnion>) -> Self {
        self.namespace_identifier = input;
        self
    }
    /// <p>The unique identifier of the cluster or serverless namespace that you want to deregister.</p>
    pub fn get_namespace_identifier(&self) -> &::std::option::Option<crate::types::NamespaceIdentifierUnion> {
        &self.namespace_identifier
    }
    /// Appends an item to `consumer_identifiers`.
    ///
    /// To override the contents of this collection use [`set_consumer_identifiers`](Self::set_consumer_identifiers).
    ///
    /// <p>An array containing the ID of the consumer account that you want to deregister the cluster or serverless namespace from.</p>
    pub fn consumer_identifiers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.consumer_identifiers.unwrap_or_default();
        v.push(input.into());
        self.consumer_identifiers = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array containing the ID of the consumer account that you want to deregister the cluster or serverless namespace from.</p>
    pub fn set_consumer_identifiers(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.consumer_identifiers = input;
        self
    }
    /// <p>An array containing the ID of the consumer account that you want to deregister the cluster or serverless namespace from.</p>
    pub fn get_consumer_identifiers(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.consumer_identifiers
    }
    /// Consumes the builder and constructs a [`DeregisterNamespaceInput`](crate::operation::deregister_namespace::DeregisterNamespaceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::deregister_namespace::DeregisterNamespaceInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::deregister_namespace::DeregisterNamespaceInput {
            namespace_identifier: self.namespace_identifier,
            consumer_identifiers: self.consumer_identifiers,
        })
    }
}