aws-sdk-lightsail 1.105.0

AWS SDK for Amazon Lightsail
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 GetRelationalDatabaseInput {
    /// <p>The name of the database that you are looking up.</p>
    pub relational_database_name: ::std::option::Option<::std::string::String>,
}
impl GetRelationalDatabaseInput {
    /// <p>The name of the database that you are looking up.</p>
    pub fn relational_database_name(&self) -> ::std::option::Option<&str> {
        self.relational_database_name.as_deref()
    }
}
impl GetRelationalDatabaseInput {
    /// Creates a new builder-style object to manufacture [`GetRelationalDatabaseInput`](crate::operation::get_relational_database::GetRelationalDatabaseInput).
    pub fn builder() -> crate::operation::get_relational_database::builders::GetRelationalDatabaseInputBuilder {
        crate::operation::get_relational_database::builders::GetRelationalDatabaseInputBuilder::default()
    }
}

/// A builder for [`GetRelationalDatabaseInput`](crate::operation::get_relational_database::GetRelationalDatabaseInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetRelationalDatabaseInputBuilder {
    pub(crate) relational_database_name: ::std::option::Option<::std::string::String>,
}
impl GetRelationalDatabaseInputBuilder {
    /// <p>The name of the database that you are looking up.</p>
    /// This field is required.
    pub fn relational_database_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.relational_database_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the database that you are looking up.</p>
    pub fn set_relational_database_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.relational_database_name = input;
        self
    }
    /// <p>The name of the database that you are looking up.</p>
    pub fn get_relational_database_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.relational_database_name
    }
    /// Consumes the builder and constructs a [`GetRelationalDatabaseInput`](crate::operation::get_relational_database::GetRelationalDatabaseInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_relational_database::GetRelationalDatabaseInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::get_relational_database::GetRelationalDatabaseInput {
            relational_database_name: self.relational_database_name,
        })
    }
}