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 GetWorkgroupOutput {
    /// <p>The returned workgroup object.</p>
    pub workgroup: ::std::option::Option<crate::types::Workgroup>,
    _request_id: Option<String>,
}
impl GetWorkgroupOutput {
    /// <p>The returned workgroup object.</p>
    pub fn workgroup(&self) -> ::std::option::Option<&crate::types::Workgroup> {
        self.workgroup.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetWorkgroupOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetWorkgroupOutput {
    /// Creates a new builder-style object to manufacture [`GetWorkgroupOutput`](crate::operation::get_workgroup::GetWorkgroupOutput).
    pub fn builder() -> crate::operation::get_workgroup::builders::GetWorkgroupOutputBuilder {
        crate::operation::get_workgroup::builders::GetWorkgroupOutputBuilder::default()
    }
}

/// A builder for [`GetWorkgroupOutput`](crate::operation::get_workgroup::GetWorkgroupOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetWorkgroupOutputBuilder {
    pub(crate) workgroup: ::std::option::Option<crate::types::Workgroup>,
    _request_id: Option<String>,
}
impl GetWorkgroupOutputBuilder {
    /// <p>The returned workgroup object.</p>
    /// This field is required.
    pub fn workgroup(mut self, input: crate::types::Workgroup) -> Self {
        self.workgroup = ::std::option::Option::Some(input);
        self
    }
    /// <p>The returned workgroup object.</p>
    pub fn set_workgroup(mut self, input: ::std::option::Option<crate::types::Workgroup>) -> Self {
        self.workgroup = input;
        self
    }
    /// <p>The returned workgroup object.</p>
    pub fn get_workgroup(&self) -> &::std::option::Option<crate::types::Workgroup> {
        &self.workgroup
    }
    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 [`GetWorkgroupOutput`](crate::operation::get_workgroup::GetWorkgroupOutput).
    pub fn build(self) -> crate::operation::get_workgroup::GetWorkgroupOutput {
        crate::operation::get_workgroup::GetWorkgroupOutput {
            workgroup: self.workgroup,
            _request_id: self._request_id,
        }
    }
}