aws-sdk-docdb 1.106.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>DeleteDBCluster</code>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteDbClusterInput {
    /// <p>The cluster identifier for the cluster to be deleted. This parameter isn't case sensitive.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must match an existing <code>DBClusterIdentifier</code>.</p></li>
    /// </ul>
    pub db_cluster_identifier: ::std::option::Option<::std::string::String>,
    /// <p>Determines whether a final cluster snapshot is created before the cluster is deleted. If <code>true</code> is specified, no cluster snapshot is created. If <code>false</code> is specified, a cluster snapshot is created before the DB cluster is deleted.</p><note>
    /// <p>If <code>SkipFinalSnapshot</code> is <code>false</code>, you must specify a <code>FinalDBSnapshotIdentifier</code> parameter.</p>
    /// </note>
    /// <p>Default: <code>false</code></p>
    pub skip_final_snapshot: ::std::option::Option<bool>,
    /// <p>The cluster snapshot identifier of the new cluster snapshot created when <code>SkipFinalSnapshot</code> is set to <code>false</code>.</p><note>
    /// <p>Specifying this parameter and also setting the <code>SkipFinalShapshot</code> parameter to <code>true</code> results in an error.</p>
    /// </note>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must be from 1 to 255 letters, numbers, or hyphens.</p></li>
    /// <li>
    /// <p>The first character must be a letter.</p></li>
    /// <li>
    /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
    /// </ul>
    pub final_db_snapshot_identifier: ::std::option::Option<::std::string::String>,
}
impl DeleteDbClusterInput {
    /// <p>The cluster identifier for the cluster to be deleted. This parameter isn't case sensitive.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must match an existing <code>DBClusterIdentifier</code>.</p></li>
    /// </ul>
    pub fn db_cluster_identifier(&self) -> ::std::option::Option<&str> {
        self.db_cluster_identifier.as_deref()
    }
    /// <p>Determines whether a final cluster snapshot is created before the cluster is deleted. If <code>true</code> is specified, no cluster snapshot is created. If <code>false</code> is specified, a cluster snapshot is created before the DB cluster is deleted.</p><note>
    /// <p>If <code>SkipFinalSnapshot</code> is <code>false</code>, you must specify a <code>FinalDBSnapshotIdentifier</code> parameter.</p>
    /// </note>
    /// <p>Default: <code>false</code></p>
    pub fn skip_final_snapshot(&self) -> ::std::option::Option<bool> {
        self.skip_final_snapshot
    }
    /// <p>The cluster snapshot identifier of the new cluster snapshot created when <code>SkipFinalSnapshot</code> is set to <code>false</code>.</p><note>
    /// <p>Specifying this parameter and also setting the <code>SkipFinalShapshot</code> parameter to <code>true</code> results in an error.</p>
    /// </note>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must be from 1 to 255 letters, numbers, or hyphens.</p></li>
    /// <li>
    /// <p>The first character must be a letter.</p></li>
    /// <li>
    /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
    /// </ul>
    pub fn final_db_snapshot_identifier(&self) -> ::std::option::Option<&str> {
        self.final_db_snapshot_identifier.as_deref()
    }
}
impl DeleteDbClusterInput {
    /// Creates a new builder-style object to manufacture [`DeleteDbClusterInput`](crate::operation::delete_db_cluster::DeleteDbClusterInput).
    pub fn builder() -> crate::operation::delete_db_cluster::builders::DeleteDbClusterInputBuilder {
        crate::operation::delete_db_cluster::builders::DeleteDbClusterInputBuilder::default()
    }
}

/// A builder for [`DeleteDbClusterInput`](crate::operation::delete_db_cluster::DeleteDbClusterInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteDbClusterInputBuilder {
    pub(crate) db_cluster_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) skip_final_snapshot: ::std::option::Option<bool>,
    pub(crate) final_db_snapshot_identifier: ::std::option::Option<::std::string::String>,
}
impl DeleteDbClusterInputBuilder {
    /// <p>The cluster identifier for the cluster to be deleted. This parameter isn't case sensitive.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must match an existing <code>DBClusterIdentifier</code>.</p></li>
    /// </ul>
    /// This field is required.
    pub fn db_cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.db_cluster_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The cluster identifier for the cluster to be deleted. This parameter isn't case sensitive.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must match an existing <code>DBClusterIdentifier</code>.</p></li>
    /// </ul>
    pub fn set_db_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.db_cluster_identifier = input;
        self
    }
    /// <p>The cluster identifier for the cluster to be deleted. This parameter isn't case sensitive.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must match an existing <code>DBClusterIdentifier</code>.</p></li>
    /// </ul>
    pub fn get_db_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.db_cluster_identifier
    }
    /// <p>Determines whether a final cluster snapshot is created before the cluster is deleted. If <code>true</code> is specified, no cluster snapshot is created. If <code>false</code> is specified, a cluster snapshot is created before the DB cluster is deleted.</p><note>
    /// <p>If <code>SkipFinalSnapshot</code> is <code>false</code>, you must specify a <code>FinalDBSnapshotIdentifier</code> parameter.</p>
    /// </note>
    /// <p>Default: <code>false</code></p>
    pub fn skip_final_snapshot(mut self, input: bool) -> Self {
        self.skip_final_snapshot = ::std::option::Option::Some(input);
        self
    }
    /// <p>Determines whether a final cluster snapshot is created before the cluster is deleted. If <code>true</code> is specified, no cluster snapshot is created. If <code>false</code> is specified, a cluster snapshot is created before the DB cluster is deleted.</p><note>
    /// <p>If <code>SkipFinalSnapshot</code> is <code>false</code>, you must specify a <code>FinalDBSnapshotIdentifier</code> parameter.</p>
    /// </note>
    /// <p>Default: <code>false</code></p>
    pub fn set_skip_final_snapshot(mut self, input: ::std::option::Option<bool>) -> Self {
        self.skip_final_snapshot = input;
        self
    }
    /// <p>Determines whether a final cluster snapshot is created before the cluster is deleted. If <code>true</code> is specified, no cluster snapshot is created. If <code>false</code> is specified, a cluster snapshot is created before the DB cluster is deleted.</p><note>
    /// <p>If <code>SkipFinalSnapshot</code> is <code>false</code>, you must specify a <code>FinalDBSnapshotIdentifier</code> parameter.</p>
    /// </note>
    /// <p>Default: <code>false</code></p>
    pub fn get_skip_final_snapshot(&self) -> &::std::option::Option<bool> {
        &self.skip_final_snapshot
    }
    /// <p>The cluster snapshot identifier of the new cluster snapshot created when <code>SkipFinalSnapshot</code> is set to <code>false</code>.</p><note>
    /// <p>Specifying this parameter and also setting the <code>SkipFinalShapshot</code> parameter to <code>true</code> results in an error.</p>
    /// </note>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must be from 1 to 255 letters, numbers, or hyphens.</p></li>
    /// <li>
    /// <p>The first character must be a letter.</p></li>
    /// <li>
    /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
    /// </ul>
    pub fn final_db_snapshot_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.final_db_snapshot_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The cluster snapshot identifier of the new cluster snapshot created when <code>SkipFinalSnapshot</code> is set to <code>false</code>.</p><note>
    /// <p>Specifying this parameter and also setting the <code>SkipFinalShapshot</code> parameter to <code>true</code> results in an error.</p>
    /// </note>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must be from 1 to 255 letters, numbers, or hyphens.</p></li>
    /// <li>
    /// <p>The first character must be a letter.</p></li>
    /// <li>
    /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
    /// </ul>
    pub fn set_final_db_snapshot_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.final_db_snapshot_identifier = input;
        self
    }
    /// <p>The cluster snapshot identifier of the new cluster snapshot created when <code>SkipFinalSnapshot</code> is set to <code>false</code>.</p><note>
    /// <p>Specifying this parameter and also setting the <code>SkipFinalShapshot</code> parameter to <code>true</code> results in an error.</p>
    /// </note>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must be from 1 to 255 letters, numbers, or hyphens.</p></li>
    /// <li>
    /// <p>The first character must be a letter.</p></li>
    /// <li>
    /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
    /// </ul>
    pub fn get_final_db_snapshot_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.final_db_snapshot_identifier
    }
    /// Consumes the builder and constructs a [`DeleteDbClusterInput`](crate::operation::delete_db_cluster::DeleteDbClusterInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_db_cluster::DeleteDbClusterInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_db_cluster::DeleteDbClusterInput {
            db_cluster_identifier: self.db_cluster_identifier,
            skip_final_snapshot: self.skip_final_snapshot,
            final_db_snapshot_identifier: self.final_db_snapshot_identifier,
        })
    }
}