aws-sdk-redshiftserverless 1.106.0

AWS SDK for Redshift Serverless
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 GetReservationInput {
    /// <p>The ID of the reservation to retrieve.</p>
    pub reservation_id: ::std::option::Option<::std::string::String>,
}
impl GetReservationInput {
    /// <p>The ID of the reservation to retrieve.</p>
    pub fn reservation_id(&self) -> ::std::option::Option<&str> {
        self.reservation_id.as_deref()
    }
}
impl GetReservationInput {
    /// Creates a new builder-style object to manufacture [`GetReservationInput`](crate::operation::get_reservation::GetReservationInput).
    pub fn builder() -> crate::operation::get_reservation::builders::GetReservationInputBuilder {
        crate::operation::get_reservation::builders::GetReservationInputBuilder::default()
    }
}

/// A builder for [`GetReservationInput`](crate::operation::get_reservation::GetReservationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetReservationInputBuilder {
    pub(crate) reservation_id: ::std::option::Option<::std::string::String>,
}
impl GetReservationInputBuilder {
    /// <p>The ID of the reservation to retrieve.</p>
    /// This field is required.
    pub fn reservation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.reservation_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the reservation to retrieve.</p>
    pub fn set_reservation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.reservation_id = input;
        self
    }
    /// <p>The ID of the reservation to retrieve.</p>
    pub fn get_reservation_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.reservation_id
    }
    /// Consumes the builder and constructs a [`GetReservationInput`](crate::operation::get_reservation::GetReservationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_reservation::GetReservationInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_reservation::GetReservationInput {
            reservation_id: self.reservation_id,
        })
    }
}