aws-sdk-redshiftserverless 1.99.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 GetReservationOutput {
    /// <p>The returned reservation object.</p>
    pub reservation: ::std::option::Option<crate::types::Reservation>,
    _request_id: Option<String>,
}
impl GetReservationOutput {
    /// <p>The returned reservation object.</p>
    pub fn reservation(&self) -> ::std::option::Option<&crate::types::Reservation> {
        self.reservation.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetReservationOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetReservationOutput {
    /// Creates a new builder-style object to manufacture [`GetReservationOutput`](crate::operation::get_reservation::GetReservationOutput).
    pub fn builder() -> crate::operation::get_reservation::builders::GetReservationOutputBuilder {
        crate::operation::get_reservation::builders::GetReservationOutputBuilder::default()
    }
}

/// A builder for [`GetReservationOutput`](crate::operation::get_reservation::GetReservationOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetReservationOutputBuilder {
    pub(crate) reservation: ::std::option::Option<crate::types::Reservation>,
    _request_id: Option<String>,
}
impl GetReservationOutputBuilder {
    /// <p>The returned reservation object.</p>
    /// This field is required.
    pub fn reservation(mut self, input: crate::types::Reservation) -> Self {
        self.reservation = ::std::option::Option::Some(input);
        self
    }
    /// <p>The returned reservation object.</p>
    pub fn set_reservation(mut self, input: ::std::option::Option<crate::types::Reservation>) -> Self {
        self.reservation = input;
        self
    }
    /// <p>The returned reservation object.</p>
    pub fn get_reservation(&self) -> &::std::option::Option<crate::types::Reservation> {
        &self.reservation
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetReservationOutput`](crate::operation::get_reservation::GetReservationOutput).
    pub fn build(self) -> crate::operation::get_reservation::GetReservationOutput {
        crate::operation::get_reservation::GetReservationOutput {
            reservation: self.reservation,
            _request_id: self._request_id,
        }
    }
}