aws_sdk_mq/operation/describe_user/
_describe_user_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeUserOutput {
6 pub broker_id: ::std::option::Option<::std::string::String>,
8 pub console_access: ::std::option::Option<bool>,
10 pub groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
12 pub pending: ::std::option::Option<crate::types::UserPendingChanges>,
14 pub username: ::std::option::Option<::std::string::String>,
16 pub replication_user: ::std::option::Option<bool>,
18 _request_id: Option<String>,
19}
20impl DescribeUserOutput {
21 pub fn broker_id(&self) -> ::std::option::Option<&str> {
23 self.broker_id.as_deref()
24 }
25 pub fn console_access(&self) -> ::std::option::Option<bool> {
27 self.console_access
28 }
29 pub fn groups(&self) -> &[::std::string::String] {
33 self.groups.as_deref().unwrap_or_default()
34 }
35 pub fn pending(&self) -> ::std::option::Option<&crate::types::UserPendingChanges> {
37 self.pending.as_ref()
38 }
39 pub fn username(&self) -> ::std::option::Option<&str> {
41 self.username.as_deref()
42 }
43 pub fn replication_user(&self) -> ::std::option::Option<bool> {
45 self.replication_user
46 }
47}
48impl ::aws_types::request_id::RequestId for DescribeUserOutput {
49 fn request_id(&self) -> Option<&str> {
50 self._request_id.as_deref()
51 }
52}
53impl DescribeUserOutput {
54 pub fn builder() -> crate::operation::describe_user::builders::DescribeUserOutputBuilder {
56 crate::operation::describe_user::builders::DescribeUserOutputBuilder::default()
57 }
58}
59
60#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
62#[non_exhaustive]
63pub struct DescribeUserOutputBuilder {
64 pub(crate) broker_id: ::std::option::Option<::std::string::String>,
65 pub(crate) console_access: ::std::option::Option<bool>,
66 pub(crate) groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
67 pub(crate) pending: ::std::option::Option<crate::types::UserPendingChanges>,
68 pub(crate) username: ::std::option::Option<::std::string::String>,
69 pub(crate) replication_user: ::std::option::Option<bool>,
70 _request_id: Option<String>,
71}
72impl DescribeUserOutputBuilder {
73 pub fn broker_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75 self.broker_id = ::std::option::Option::Some(input.into());
76 self
77 }
78 pub fn set_broker_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80 self.broker_id = input;
81 self
82 }
83 pub fn get_broker_id(&self) -> &::std::option::Option<::std::string::String> {
85 &self.broker_id
86 }
87 pub fn console_access(mut self, input: bool) -> Self {
89 self.console_access = ::std::option::Option::Some(input);
90 self
91 }
92 pub fn set_console_access(mut self, input: ::std::option::Option<bool>) -> Self {
94 self.console_access = input;
95 self
96 }
97 pub fn get_console_access(&self) -> &::std::option::Option<bool> {
99 &self.console_access
100 }
101 pub fn groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107 let mut v = self.groups.unwrap_or_default();
108 v.push(input.into());
109 self.groups = ::std::option::Option::Some(v);
110 self
111 }
112 pub fn set_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
114 self.groups = input;
115 self
116 }
117 pub fn get_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
119 &self.groups
120 }
121 pub fn pending(mut self, input: crate::types::UserPendingChanges) -> Self {
123 self.pending = ::std::option::Option::Some(input);
124 self
125 }
126 pub fn set_pending(mut self, input: ::std::option::Option<crate::types::UserPendingChanges>) -> Self {
128 self.pending = input;
129 self
130 }
131 pub fn get_pending(&self) -> &::std::option::Option<crate::types::UserPendingChanges> {
133 &self.pending
134 }
135 pub fn username(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137 self.username = ::std::option::Option::Some(input.into());
138 self
139 }
140 pub fn set_username(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
142 self.username = input;
143 self
144 }
145 pub fn get_username(&self) -> &::std::option::Option<::std::string::String> {
147 &self.username
148 }
149 pub fn replication_user(mut self, input: bool) -> Self {
151 self.replication_user = ::std::option::Option::Some(input);
152 self
153 }
154 pub fn set_replication_user(mut self, input: ::std::option::Option<bool>) -> Self {
156 self.replication_user = input;
157 self
158 }
159 pub fn get_replication_user(&self) -> &::std::option::Option<bool> {
161 &self.replication_user
162 }
163 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
164 self._request_id = Some(request_id.into());
165 self
166 }
167
168 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
169 self._request_id = request_id;
170 self
171 }
172 pub fn build(self) -> crate::operation::describe_user::DescribeUserOutput {
174 crate::operation::describe_user::DescribeUserOutput {
175 broker_id: self.broker_id,
176 console_access: self.console_access,
177 groups: self.groups,
178 pending: self.pending,
179 username: self.username,
180 replication_user: self.replication_user,
181 _request_id: self._request_id,
182 }
183 }
184}