aws-sdk-rds 1.131.0

AWS SDK for Amazon Relational Database Service
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 DeleteDbSnapshotInput {
    /// <p>The DB snapshot identifier.</p>
    /// <p>Constraints: Must be the name of an existing DB snapshot in the <code>available</code> state.</p>
    pub db_snapshot_identifier: ::std::option::Option<::std::string::String>,
}
impl DeleteDbSnapshotInput {
    /// <p>The DB snapshot identifier.</p>
    /// <p>Constraints: Must be the name of an existing DB snapshot in the <code>available</code> state.</p>
    pub fn db_snapshot_identifier(&self) -> ::std::option::Option<&str> {
        self.db_snapshot_identifier.as_deref()
    }
}
impl DeleteDbSnapshotInput {
    /// Creates a new builder-style object to manufacture [`DeleteDbSnapshotInput`](crate::operation::delete_db_snapshot::DeleteDbSnapshotInput).
    pub fn builder() -> crate::operation::delete_db_snapshot::builders::DeleteDbSnapshotInputBuilder {
        crate::operation::delete_db_snapshot::builders::DeleteDbSnapshotInputBuilder::default()
    }
}

/// A builder for [`DeleteDbSnapshotInput`](crate::operation::delete_db_snapshot::DeleteDbSnapshotInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteDbSnapshotInputBuilder {
    pub(crate) db_snapshot_identifier: ::std::option::Option<::std::string::String>,
}
impl DeleteDbSnapshotInputBuilder {
    /// <p>The DB snapshot identifier.</p>
    /// <p>Constraints: Must be the name of an existing DB snapshot in the <code>available</code> state.</p>
    /// This field is required.
    pub fn db_snapshot_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.db_snapshot_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The DB snapshot identifier.</p>
    /// <p>Constraints: Must be the name of an existing DB snapshot in the <code>available</code> state.</p>
    pub fn set_db_snapshot_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.db_snapshot_identifier = input;
        self
    }
    /// <p>The DB snapshot identifier.</p>
    /// <p>Constraints: Must be the name of an existing DB snapshot in the <code>available</code> state.</p>
    pub fn get_db_snapshot_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.db_snapshot_identifier
    }
    /// Consumes the builder and constructs a [`DeleteDbSnapshotInput`](crate::operation::delete_db_snapshot::DeleteDbSnapshotInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_db_snapshot::DeleteDbSnapshotInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_db_snapshot::DeleteDbSnapshotInput {
            db_snapshot_identifier: self.db_snapshot_identifier,
        })
    }
}