aws-sdk-redshiftserverless 1.101.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 GetWorkgroupInput {
    /// <p>The name of the workgroup to return information for.</p>
    pub workgroup_name: ::std::option::Option<::std::string::String>,
}
impl GetWorkgroupInput {
    /// <p>The name of the workgroup to return information for.</p>
    pub fn workgroup_name(&self) -> ::std::option::Option<&str> {
        self.workgroup_name.as_deref()
    }
}
impl GetWorkgroupInput {
    /// Creates a new builder-style object to manufacture [`GetWorkgroupInput`](crate::operation::get_workgroup::GetWorkgroupInput).
    pub fn builder() -> crate::operation::get_workgroup::builders::GetWorkgroupInputBuilder {
        crate::operation::get_workgroup::builders::GetWorkgroupInputBuilder::default()
    }
}

/// A builder for [`GetWorkgroupInput`](crate::operation::get_workgroup::GetWorkgroupInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetWorkgroupInputBuilder {
    pub(crate) workgroup_name: ::std::option::Option<::std::string::String>,
}
impl GetWorkgroupInputBuilder {
    /// <p>The name of the workgroup to return information for.</p>
    /// This field is required.
    pub fn workgroup_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.workgroup_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the workgroup to return information for.</p>
    pub fn set_workgroup_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.workgroup_name = input;
        self
    }
    /// <p>The name of the workgroup to return information for.</p>
    pub fn get_workgroup_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.workgroup_name
    }
    /// Consumes the builder and constructs a [`GetWorkgroupInput`](crate::operation::get_workgroup::GetWorkgroupInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_workgroup::GetWorkgroupInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_workgroup::GetWorkgroupInput {
            workgroup_name: self.workgroup_name,
        })
    }
}