aws-sdk-greengrass 0.25.0

AWS SDK for AWS Greengrass
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 GetAssociatedRoleOutput {
    /// The time when the role was associated with the group.
    #[doc(hidden)]
    pub associated_at: std::option::Option<std::string::String>,
    /// The ARN of the role that is associated with the group.
    #[doc(hidden)]
    pub role_arn: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl GetAssociatedRoleOutput {
    /// The time when the role was associated with the group.
    pub fn associated_at(&self) -> std::option::Option<&str> {
        self.associated_at.as_deref()
    }
    /// The ARN of the role that is associated with the group.
    pub fn role_arn(&self) -> std::option::Option<&str> {
        self.role_arn.as_deref()
    }
}
impl aws_http::request_id::RequestId for GetAssociatedRoleOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetAssociatedRoleOutput {
    /// Creates a new builder-style object to manufacture [`GetAssociatedRoleOutput`](crate::operation::get_associated_role::GetAssociatedRoleOutput).
    pub fn builder(
    ) -> crate::operation::get_associated_role::builders::GetAssociatedRoleOutputBuilder {
        crate::operation::get_associated_role::builders::GetAssociatedRoleOutputBuilder::default()
    }
}

/// A builder for [`GetAssociatedRoleOutput`](crate::operation::get_associated_role::GetAssociatedRoleOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct GetAssociatedRoleOutputBuilder {
    pub(crate) associated_at: std::option::Option<std::string::String>,
    pub(crate) role_arn: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl GetAssociatedRoleOutputBuilder {
    /// The time when the role was associated with the group.
    pub fn associated_at(mut self, input: impl Into<std::string::String>) -> Self {
        self.associated_at = Some(input.into());
        self
    }
    /// The time when the role was associated with the group.
    pub fn set_associated_at(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.associated_at = input;
        self
    }
    /// The ARN of the role that is associated with the group.
    pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.role_arn = Some(input.into());
        self
    }
    /// The ARN of the role that is associated with the group.
    pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.role_arn = input;
        self
    }
    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 [`GetAssociatedRoleOutput`](crate::operation::get_associated_role::GetAssociatedRoleOutput).
    pub fn build(self) -> crate::operation::get_associated_role::GetAssociatedRoleOutput {
        crate::operation::get_associated_role::GetAssociatedRoleOutput {
            associated_at: self.associated_at,
            role_arn: self.role_arn,
            _request_id: self._request_id,
        }
    }
}