aws_sdk_deadline/operation/assume_queue_role_for_user/
_assume_queue_role_for_user_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 AssumeQueueRoleForUserOutput {
6    /// <p>The credentials for the queue role that a user has access to.</p>
7    pub credentials: ::std::option::Option<crate::types::AwsCredentials>,
8    _request_id: Option<String>,
9}
10impl AssumeQueueRoleForUserOutput {
11    /// <p>The credentials for the queue role that a user has access to.</p>
12    pub fn credentials(&self) -> ::std::option::Option<&crate::types::AwsCredentials> {
13        self.credentials.as_ref()
14    }
15}
16impl ::std::fmt::Debug for AssumeQueueRoleForUserOutput {
17    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18        let mut formatter = f.debug_struct("AssumeQueueRoleForUserOutput");
19        formatter.field("credentials", &"*** Sensitive Data Redacted ***");
20        formatter.field("_request_id", &self._request_id);
21        formatter.finish()
22    }
23}
24impl ::aws_types::request_id::RequestId for AssumeQueueRoleForUserOutput {
25    fn request_id(&self) -> Option<&str> {
26        self._request_id.as_deref()
27    }
28}
29impl AssumeQueueRoleForUserOutput {
30    /// Creates a new builder-style object to manufacture [`AssumeQueueRoleForUserOutput`](crate::operation::assume_queue_role_for_user::AssumeQueueRoleForUserOutput).
31    pub fn builder() -> crate::operation::assume_queue_role_for_user::builders::AssumeQueueRoleForUserOutputBuilder {
32        crate::operation::assume_queue_role_for_user::builders::AssumeQueueRoleForUserOutputBuilder::default()
33    }
34}
35
36/// A builder for [`AssumeQueueRoleForUserOutput`](crate::operation::assume_queue_role_for_user::AssumeQueueRoleForUserOutput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
38#[non_exhaustive]
39pub struct AssumeQueueRoleForUserOutputBuilder {
40    pub(crate) credentials: ::std::option::Option<crate::types::AwsCredentials>,
41    _request_id: Option<String>,
42}
43impl AssumeQueueRoleForUserOutputBuilder {
44    /// <p>The credentials for the queue role that a user has access to.</p>
45    /// This field is required.
46    pub fn credentials(mut self, input: crate::types::AwsCredentials) -> Self {
47        self.credentials = ::std::option::Option::Some(input);
48        self
49    }
50    /// <p>The credentials for the queue role that a user has access to.</p>
51    pub fn set_credentials(mut self, input: ::std::option::Option<crate::types::AwsCredentials>) -> Self {
52        self.credentials = input;
53        self
54    }
55    /// <p>The credentials for the queue role that a user has access to.</p>
56    pub fn get_credentials(&self) -> &::std::option::Option<crate::types::AwsCredentials> {
57        &self.credentials
58    }
59    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
60        self._request_id = Some(request_id.into());
61        self
62    }
63
64    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
65        self._request_id = request_id;
66        self
67    }
68    /// Consumes the builder and constructs a [`AssumeQueueRoleForUserOutput`](crate::operation::assume_queue_role_for_user::AssumeQueueRoleForUserOutput).
69    pub fn build(self) -> crate::operation::assume_queue_role_for_user::AssumeQueueRoleForUserOutput {
70        crate::operation::assume_queue_role_for_user::AssumeQueueRoleForUserOutput {
71            credentials: self.credentials,
72            _request_id: self._request_id,
73        }
74    }
75}
76impl ::std::fmt::Debug for AssumeQueueRoleForUserOutputBuilder {
77    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
78        let mut formatter = f.debug_struct("AssumeQueueRoleForUserOutputBuilder");
79        formatter.field("credentials", &"*** Sensitive Data Redacted ***");
80        formatter.field("_request_id", &self._request_id);
81        formatter.finish()
82    }
83}