aws-sdk-docdb 1.105.0

AWS SDK for Amazon DocumentDB with MongoDB compatibility
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Represents the input to <code>CreateGlobalCluster</code>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateGlobalClusterInput {
    /// <p>The cluster identifier of the new global cluster.</p>
    pub global_cluster_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) to use as the primary cluster of the global cluster. This parameter is optional.</p>
    pub source_db_cluster_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The name of the database engine to be used for this cluster.</p>
    pub engine: ::std::option::Option<::std::string::String>,
    /// <p>The engine version of the global cluster.</p>
    pub engine_version: ::std::option::Option<::std::string::String>,
    /// <p>The deletion protection setting for the new global cluster. The global cluster can't be deleted when deletion protection is enabled.</p>
    pub deletion_protection: ::std::option::Option<bool>,
    /// <p>The name for your database of up to 64 alpha-numeric characters. If you do not provide a name, Amazon DocumentDB will not create a database in the global cluster you are creating.</p>
    pub database_name: ::std::option::Option<::std::string::String>,
    /// <p>The storage encryption setting for the new global cluster.</p>
    pub storage_encrypted: ::std::option::Option<bool>,
}
impl CreateGlobalClusterInput {
    /// <p>The cluster identifier of the new global cluster.</p>
    pub fn global_cluster_identifier(&self) -> ::std::option::Option<&str> {
        self.global_cluster_identifier.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) to use as the primary cluster of the global cluster. This parameter is optional.</p>
    pub fn source_db_cluster_identifier(&self) -> ::std::option::Option<&str> {
        self.source_db_cluster_identifier.as_deref()
    }
    /// <p>The name of the database engine to be used for this cluster.</p>
    pub fn engine(&self) -> ::std::option::Option<&str> {
        self.engine.as_deref()
    }
    /// <p>The engine version of the global cluster.</p>
    pub fn engine_version(&self) -> ::std::option::Option<&str> {
        self.engine_version.as_deref()
    }
    /// <p>The deletion protection setting for the new global cluster. The global cluster can't be deleted when deletion protection is enabled.</p>
    pub fn deletion_protection(&self) -> ::std::option::Option<bool> {
        self.deletion_protection
    }
    /// <p>The name for your database of up to 64 alpha-numeric characters. If you do not provide a name, Amazon DocumentDB will not create a database in the global cluster you are creating.</p>
    pub fn database_name(&self) -> ::std::option::Option<&str> {
        self.database_name.as_deref()
    }
    /// <p>The storage encryption setting for the new global cluster.</p>
    pub fn storage_encrypted(&self) -> ::std::option::Option<bool> {
        self.storage_encrypted
    }
}
impl CreateGlobalClusterInput {
    /// Creates a new builder-style object to manufacture [`CreateGlobalClusterInput`](crate::operation::create_global_cluster::CreateGlobalClusterInput).
    pub fn builder() -> crate::operation::create_global_cluster::builders::CreateGlobalClusterInputBuilder {
        crate::operation::create_global_cluster::builders::CreateGlobalClusterInputBuilder::default()
    }
}

/// A builder for [`CreateGlobalClusterInput`](crate::operation::create_global_cluster::CreateGlobalClusterInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateGlobalClusterInputBuilder {
    pub(crate) global_cluster_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) source_db_cluster_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) engine: ::std::option::Option<::std::string::String>,
    pub(crate) engine_version: ::std::option::Option<::std::string::String>,
    pub(crate) deletion_protection: ::std::option::Option<bool>,
    pub(crate) database_name: ::std::option::Option<::std::string::String>,
    pub(crate) storage_encrypted: ::std::option::Option<bool>,
}
impl CreateGlobalClusterInputBuilder {
    /// <p>The cluster identifier of the new global cluster.</p>
    /// This field is required.
    pub fn global_cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.global_cluster_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The cluster identifier of the new global cluster.</p>
    pub fn set_global_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.global_cluster_identifier = input;
        self
    }
    /// <p>The cluster identifier of the new global cluster.</p>
    pub fn get_global_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.global_cluster_identifier
    }
    /// <p>The Amazon Resource Name (ARN) to use as the primary cluster of the global cluster. This parameter is optional.</p>
    pub fn source_db_cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_db_cluster_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) to use as the primary cluster of the global cluster. This parameter is optional.</p>
    pub fn set_source_db_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_db_cluster_identifier = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) to use as the primary cluster of the global cluster. This parameter is optional.</p>
    pub fn get_source_db_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_db_cluster_identifier
    }
    /// <p>The name of the database engine to be used for this cluster.</p>
    pub fn engine(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.engine = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the database engine to be used for this cluster.</p>
    pub fn set_engine(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.engine = input;
        self
    }
    /// <p>The name of the database engine to be used for this cluster.</p>
    pub fn get_engine(&self) -> &::std::option::Option<::std::string::String> {
        &self.engine
    }
    /// <p>The engine version of the global cluster.</p>
    pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.engine_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The engine version of the global cluster.</p>
    pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.engine_version = input;
        self
    }
    /// <p>The engine version of the global cluster.</p>
    pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.engine_version
    }
    /// <p>The deletion protection setting for the new global cluster. The global cluster can't be deleted when deletion protection is enabled.</p>
    pub fn deletion_protection(mut self, input: bool) -> Self {
        self.deletion_protection = ::std::option::Option::Some(input);
        self
    }
    /// <p>The deletion protection setting for the new global cluster. The global cluster can't be deleted when deletion protection is enabled.</p>
    pub fn set_deletion_protection(mut self, input: ::std::option::Option<bool>) -> Self {
        self.deletion_protection = input;
        self
    }
    /// <p>The deletion protection setting for the new global cluster. The global cluster can't be deleted when deletion protection is enabled.</p>
    pub fn get_deletion_protection(&self) -> &::std::option::Option<bool> {
        &self.deletion_protection
    }
    /// <p>The name for your database of up to 64 alpha-numeric characters. If you do not provide a name, Amazon DocumentDB will not create a database in the global cluster you are creating.</p>
    pub fn database_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.database_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name for your database of up to 64 alpha-numeric characters. If you do not provide a name, Amazon DocumentDB will not create a database in the global cluster you are creating.</p>
    pub fn set_database_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.database_name = input;
        self
    }
    /// <p>The name for your database of up to 64 alpha-numeric characters. If you do not provide a name, Amazon DocumentDB will not create a database in the global cluster you are creating.</p>
    pub fn get_database_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.database_name
    }
    /// <p>The storage encryption setting for the new global cluster.</p>
    pub fn storage_encrypted(mut self, input: bool) -> Self {
        self.storage_encrypted = ::std::option::Option::Some(input);
        self
    }
    /// <p>The storage encryption setting for the new global cluster.</p>
    pub fn set_storage_encrypted(mut self, input: ::std::option::Option<bool>) -> Self {
        self.storage_encrypted = input;
        self
    }
    /// <p>The storage encryption setting for the new global cluster.</p>
    pub fn get_storage_encrypted(&self) -> &::std::option::Option<bool> {
        &self.storage_encrypted
    }
    /// Consumes the builder and constructs a [`CreateGlobalClusterInput`](crate::operation::create_global_cluster::CreateGlobalClusterInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_global_cluster::CreateGlobalClusterInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::create_global_cluster::CreateGlobalClusterInput {
            global_cluster_identifier: self.global_cluster_identifier,
            source_db_cluster_identifier: self.source_db_cluster_identifier,
            engine: self.engine,
            engine_version: self.engine_version,
            deletion_protection: self.deletion_protection,
            database_name: self.database_name,
            storage_encrypted: self.storage_encrypted,
        })
    }
}