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.

/// <p></p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteClusterInput {
    /// <p>The identifier of the cluster to be deleted.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must contain lowercase characters.</p></li>
    /// <li>
    /// <p>Must contain from 1 to 63 alphanumeric characters or hyphens.</p></li>
    /// <li>
    /// <p>First character must be a letter.</p></li>
    /// <li>
    /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
    /// </ul>
    pub cluster_identifier: ::std::option::Option<::std::string::String>,
    /// <p>Determines whether a final snapshot of the cluster is created before Amazon Redshift deletes the cluster. If <code>true</code>, a final cluster snapshot is not created. If <code>false</code>, a final cluster snapshot is created before the cluster is deleted.</p><note>
    /// <p>The <i>FinalClusterSnapshotIdentifier</i> parameter must be specified if <i>SkipFinalClusterSnapshot</i> is <code>false</code>.</p>
    /// </note>
    /// <p>Default: <code>false</code></p>
    pub skip_final_cluster_snapshot: ::std::option::Option<bool>,
    /// <p>The identifier of the final snapshot that is to be created immediately before deleting the cluster. If this parameter is provided, <i>SkipFinalClusterSnapshot</i> must be <code>false</code>.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must be 1 to 255 alphanumeric characters.</p></li>
    /// <li>
    /// <p>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_cluster_snapshot_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The number of days that a manual snapshot is retained. If the value is -1, the manual snapshot is retained indefinitely.</p>
    /// <p>The value must be either -1 or an integer between 1 and 3,653.</p>
    /// <p>The default value is -1.</p>
    pub final_cluster_snapshot_retention_period: ::std::option::Option<i32>,
}
impl DeleteClusterInput {
    /// <p>The identifier of the cluster to be deleted.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must contain lowercase characters.</p></li>
    /// <li>
    /// <p>Must contain from 1 to 63 alphanumeric characters or hyphens.</p></li>
    /// <li>
    /// <p>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 cluster_identifier(&self) -> ::std::option::Option<&str> {
        self.cluster_identifier.as_deref()
    }
    /// <p>Determines whether a final snapshot of the cluster is created before Amazon Redshift deletes the cluster. If <code>true</code>, a final cluster snapshot is not created. If <code>false</code>, a final cluster snapshot is created before the cluster is deleted.</p><note>
    /// <p>The <i>FinalClusterSnapshotIdentifier</i> parameter must be specified if <i>SkipFinalClusterSnapshot</i> is <code>false</code>.</p>
    /// </note>
    /// <p>Default: <code>false</code></p>
    pub fn skip_final_cluster_snapshot(&self) -> ::std::option::Option<bool> {
        self.skip_final_cluster_snapshot
    }
    /// <p>The identifier of the final snapshot that is to be created immediately before deleting the cluster. If this parameter is provided, <i>SkipFinalClusterSnapshot</i> must be <code>false</code>.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must be 1 to 255 alphanumeric characters.</p></li>
    /// <li>
    /// <p>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_cluster_snapshot_identifier(&self) -> ::std::option::Option<&str> {
        self.final_cluster_snapshot_identifier.as_deref()
    }
    /// <p>The number of days that a manual snapshot is retained. If the value is -1, the manual snapshot is retained indefinitely.</p>
    /// <p>The value must be either -1 or an integer between 1 and 3,653.</p>
    /// <p>The default value is -1.</p>
    pub fn final_cluster_snapshot_retention_period(&self) -> ::std::option::Option<i32> {
        self.final_cluster_snapshot_retention_period
    }
}
impl DeleteClusterInput {
    /// Creates a new builder-style object to manufacture [`DeleteClusterInput`](crate::operation::delete_cluster::DeleteClusterInput).
    pub fn builder() -> crate::operation::delete_cluster::builders::DeleteClusterInputBuilder {
        crate::operation::delete_cluster::builders::DeleteClusterInputBuilder::default()
    }
}

/// A builder for [`DeleteClusterInput`](crate::operation::delete_cluster::DeleteClusterInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteClusterInputBuilder {
    pub(crate) cluster_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) skip_final_cluster_snapshot: ::std::option::Option<bool>,
    pub(crate) final_cluster_snapshot_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) final_cluster_snapshot_retention_period: ::std::option::Option<i32>,
}
impl DeleteClusterInputBuilder {
    /// <p>The identifier of the cluster to be deleted.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must contain lowercase characters.</p></li>
    /// <li>
    /// <p>Must contain from 1 to 63 alphanumeric characters or hyphens.</p></li>
    /// <li>
    /// <p>First character must be a letter.</p></li>
    /// <li>
    /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
    /// </ul>
    /// This field is required.
    pub fn cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cluster_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the cluster to be deleted.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must contain lowercase characters.</p></li>
    /// <li>
    /// <p>Must contain from 1 to 63 alphanumeric characters or hyphens.</p></li>
    /// <li>
    /// <p>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_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cluster_identifier = input;
        self
    }
    /// <p>The identifier of the cluster to be deleted.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must contain lowercase characters.</p></li>
    /// <li>
    /// <p>Must contain from 1 to 63 alphanumeric characters or hyphens.</p></li>
    /// <li>
    /// <p>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_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.cluster_identifier
    }
    /// <p>Determines whether a final snapshot of the cluster is created before Amazon Redshift deletes the cluster. If <code>true</code>, a final cluster snapshot is not created. If <code>false</code>, a final cluster snapshot is created before the cluster is deleted.</p><note>
    /// <p>The <i>FinalClusterSnapshotIdentifier</i> parameter must be specified if <i>SkipFinalClusterSnapshot</i> is <code>false</code>.</p>
    /// </note>
    /// <p>Default: <code>false</code></p>
    pub fn skip_final_cluster_snapshot(mut self, input: bool) -> Self {
        self.skip_final_cluster_snapshot = ::std::option::Option::Some(input);
        self
    }
    /// <p>Determines whether a final snapshot of the cluster is created before Amazon Redshift deletes the cluster. If <code>true</code>, a final cluster snapshot is not created. If <code>false</code>, a final cluster snapshot is created before the cluster is deleted.</p><note>
    /// <p>The <i>FinalClusterSnapshotIdentifier</i> parameter must be specified if <i>SkipFinalClusterSnapshot</i> is <code>false</code>.</p>
    /// </note>
    /// <p>Default: <code>false</code></p>
    pub fn set_skip_final_cluster_snapshot(mut self, input: ::std::option::Option<bool>) -> Self {
        self.skip_final_cluster_snapshot = input;
        self
    }
    /// <p>Determines whether a final snapshot of the cluster is created before Amazon Redshift deletes the cluster. If <code>true</code>, a final cluster snapshot is not created. If <code>false</code>, a final cluster snapshot is created before the cluster is deleted.</p><note>
    /// <p>The <i>FinalClusterSnapshotIdentifier</i> parameter must be specified if <i>SkipFinalClusterSnapshot</i> is <code>false</code>.</p>
    /// </note>
    /// <p>Default: <code>false</code></p>
    pub fn get_skip_final_cluster_snapshot(&self) -> &::std::option::Option<bool> {
        &self.skip_final_cluster_snapshot
    }
    /// <p>The identifier of the final snapshot that is to be created immediately before deleting the cluster. If this parameter is provided, <i>SkipFinalClusterSnapshot</i> must be <code>false</code>.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must be 1 to 255 alphanumeric characters.</p></li>
    /// <li>
    /// <p>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_cluster_snapshot_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.final_cluster_snapshot_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the final snapshot that is to be created immediately before deleting the cluster. If this parameter is provided, <i>SkipFinalClusterSnapshot</i> must be <code>false</code>.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must be 1 to 255 alphanumeric characters.</p></li>
    /// <li>
    /// <p>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_cluster_snapshot_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.final_cluster_snapshot_identifier = input;
        self
    }
    /// <p>The identifier of the final snapshot that is to be created immediately before deleting the cluster. If this parameter is provided, <i>SkipFinalClusterSnapshot</i> must be <code>false</code>.</p>
    /// <p>Constraints:</p>
    /// <ul>
    /// <li>
    /// <p>Must be 1 to 255 alphanumeric characters.</p></li>
    /// <li>
    /// <p>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_cluster_snapshot_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.final_cluster_snapshot_identifier
    }
    /// <p>The number of days that a manual snapshot is retained. If the value is -1, the manual snapshot is retained indefinitely.</p>
    /// <p>The value must be either -1 or an integer between 1 and 3,653.</p>
    /// <p>The default value is -1.</p>
    pub fn final_cluster_snapshot_retention_period(mut self, input: i32) -> Self {
        self.final_cluster_snapshot_retention_period = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of days that a manual snapshot is retained. If the value is -1, the manual snapshot is retained indefinitely.</p>
    /// <p>The value must be either -1 or an integer between 1 and 3,653.</p>
    /// <p>The default value is -1.</p>
    pub fn set_final_cluster_snapshot_retention_period(mut self, input: ::std::option::Option<i32>) -> Self {
        self.final_cluster_snapshot_retention_period = input;
        self
    }
    /// <p>The number of days that a manual snapshot is retained. If the value is -1, the manual snapshot is retained indefinitely.</p>
    /// <p>The value must be either -1 or an integer between 1 and 3,653.</p>
    /// <p>The default value is -1.</p>
    pub fn get_final_cluster_snapshot_retention_period(&self) -> &::std::option::Option<i32> {
        &self.final_cluster_snapshot_retention_period
    }
    /// Consumes the builder and constructs a [`DeleteClusterInput`](crate::operation::delete_cluster::DeleteClusterInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_cluster::DeleteClusterInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_cluster::DeleteClusterInput {
            cluster_identifier: self.cluster_identifier,
            skip_final_cluster_snapshot: self.skip_final_cluster_snapshot,
            final_cluster_snapshot_identifier: self.final_cluster_snapshot_identifier,
            final_cluster_snapshot_retention_period: self.final_cluster_snapshot_retention_period,
        })
    }
}