aws_sdk_sso/operation/get_role_credentials/
_get_role_credentials_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct GetRoleCredentialsOutput {
6    /// <p>The credentials for the role that is assigned to the user.</p>
7    pub role_credentials: ::std::option::Option<crate::types::RoleCredentials>,
8    _request_id: Option<String>,
9}
10impl GetRoleCredentialsOutput {
11    /// <p>The credentials for the role that is assigned to the user.</p>
12    pub fn role_credentials(&self) -> ::std::option::Option<&crate::types::RoleCredentials> {
13        self.role_credentials.as_ref()
14    }
15}
16impl ::std::fmt::Debug for GetRoleCredentialsOutput {
17    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18        let mut formatter = f.debug_struct("GetRoleCredentialsOutput");
19        formatter.field("role_credentials", &"*** Sensitive Data Redacted ***");
20        formatter.field("_request_id", &self._request_id);
21        formatter.finish()
22    }
23}
24impl ::aws_types::request_id::RequestId for GetRoleCredentialsOutput {
25    fn request_id(&self) -> Option<&str> {
26        self._request_id.as_deref()
27    }
28}
29impl GetRoleCredentialsOutput {
30    /// Creates a new builder-style object to manufacture [`GetRoleCredentialsOutput`](crate::operation::get_role_credentials::GetRoleCredentialsOutput).
31    pub fn builder() -> crate::operation::get_role_credentials::builders::GetRoleCredentialsOutputBuilder {
32        crate::operation::get_role_credentials::builders::GetRoleCredentialsOutputBuilder::default()
33    }
34}
35
36/// A builder for [`GetRoleCredentialsOutput`](crate::operation::get_role_credentials::GetRoleCredentialsOutput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
38#[non_exhaustive]
39pub struct GetRoleCredentialsOutputBuilder {
40    pub(crate) role_credentials: ::std::option::Option<crate::types::RoleCredentials>,
41    _request_id: Option<String>,
42}
43impl GetRoleCredentialsOutputBuilder {
44    /// <p>The credentials for the role that is assigned to the user.</p>
45    pub fn role_credentials(mut self, input: crate::types::RoleCredentials) -> Self {
46        self.role_credentials = ::std::option::Option::Some(input);
47        self
48    }
49    /// <p>The credentials for the role that is assigned to the user.</p>
50    pub fn set_role_credentials(mut self, input: ::std::option::Option<crate::types::RoleCredentials>) -> Self {
51        self.role_credentials = input;
52        self
53    }
54    /// <p>The credentials for the role that is assigned to the user.</p>
55    pub fn get_role_credentials(&self) -> &::std::option::Option<crate::types::RoleCredentials> {
56        &self.role_credentials
57    }
58    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
59        self._request_id = Some(request_id.into());
60        self
61    }
62
63    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
64        self._request_id = request_id;
65        self
66    }
67    /// Consumes the builder and constructs a [`GetRoleCredentialsOutput`](crate::operation::get_role_credentials::GetRoleCredentialsOutput).
68    pub fn build(self) -> crate::operation::get_role_credentials::GetRoleCredentialsOutput {
69        crate::operation::get_role_credentials::GetRoleCredentialsOutput {
70            role_credentials: self.role_credentials,
71            _request_id: self._request_id,
72        }
73    }
74}
75impl ::std::fmt::Debug for GetRoleCredentialsOutputBuilder {
76    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
77        let mut formatter = f.debug_struct("GetRoleCredentialsOutputBuilder");
78        formatter.field("role_credentials", &"*** Sensitive Data Redacted ***");
79        formatter.field("_request_id", &self._request_id);
80        formatter.finish()
81    }
82}