aws_sdk_quicksight/operation/register_user/
_register_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, ::std::fmt::Debug)]
5pub struct RegisterUserOutput {
6    /// <p>The user's user name.</p>
7    pub user: ::std::option::Option<crate::types::User>,
8    /// <p>The URL the user visits to complete registration and provide a password. This is returned only for users with an identity type of <code>QUICKSIGHT</code>.</p>
9    pub user_invitation_url: ::std::option::Option<::std::string::String>,
10    /// <p>The Amazon Web Services request ID for this operation.</p>
11    pub request_id: ::std::option::Option<::std::string::String>,
12    /// <p>The HTTP status of the request.</p>
13    pub status: i32,
14    _request_id: Option<String>,
15}
16impl RegisterUserOutput {
17    /// <p>The user's user name.</p>
18    pub fn user(&self) -> ::std::option::Option<&crate::types::User> {
19        self.user.as_ref()
20    }
21    /// <p>The URL the user visits to complete registration and provide a password. This is returned only for users with an identity type of <code>QUICKSIGHT</code>.</p>
22    pub fn user_invitation_url(&self) -> ::std::option::Option<&str> {
23        self.user_invitation_url.as_deref()
24    }
25    /// <p>The Amazon Web Services request ID for this operation.</p>
26    pub fn request_id(&self) -> ::std::option::Option<&str> {
27        self.request_id.as_deref()
28    }
29    /// <p>The HTTP status of the request.</p>
30    pub fn status(&self) -> i32 {
31        self.status
32    }
33}
34impl ::aws_types::request_id::RequestId for RegisterUserOutput {
35    fn request_id(&self) -> Option<&str> {
36        self._request_id.as_deref()
37    }
38}
39impl RegisterUserOutput {
40    /// Creates a new builder-style object to manufacture [`RegisterUserOutput`](crate::operation::register_user::RegisterUserOutput).
41    pub fn builder() -> crate::operation::register_user::builders::RegisterUserOutputBuilder {
42        crate::operation::register_user::builders::RegisterUserOutputBuilder::default()
43    }
44}
45
46/// A builder for [`RegisterUserOutput`](crate::operation::register_user::RegisterUserOutput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct RegisterUserOutputBuilder {
50    pub(crate) user: ::std::option::Option<crate::types::User>,
51    pub(crate) user_invitation_url: ::std::option::Option<::std::string::String>,
52    pub(crate) request_id: ::std::option::Option<::std::string::String>,
53    pub(crate) status: ::std::option::Option<i32>,
54    _request_id: Option<String>,
55}
56impl RegisterUserOutputBuilder {
57    /// <p>The user's user name.</p>
58    pub fn user(mut self, input: crate::types::User) -> Self {
59        self.user = ::std::option::Option::Some(input);
60        self
61    }
62    /// <p>The user's user name.</p>
63    pub fn set_user(mut self, input: ::std::option::Option<crate::types::User>) -> Self {
64        self.user = input;
65        self
66    }
67    /// <p>The user's user name.</p>
68    pub fn get_user(&self) -> &::std::option::Option<crate::types::User> {
69        &self.user
70    }
71    /// <p>The URL the user visits to complete registration and provide a password. This is returned only for users with an identity type of <code>QUICKSIGHT</code>.</p>
72    pub fn user_invitation_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.user_invitation_url = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>The URL the user visits to complete registration and provide a password. This is returned only for users with an identity type of <code>QUICKSIGHT</code>.</p>
77    pub fn set_user_invitation_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.user_invitation_url = input;
79        self
80    }
81    /// <p>The URL the user visits to complete registration and provide a password. This is returned only for users with an identity type of <code>QUICKSIGHT</code>.</p>
82    pub fn get_user_invitation_url(&self) -> &::std::option::Option<::std::string::String> {
83        &self.user_invitation_url
84    }
85    /// <p>The Amazon Web Services request ID for this operation.</p>
86    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.request_id = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// <p>The Amazon Web Services request ID for this operation.</p>
91    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.request_id = input;
93        self
94    }
95    /// <p>The Amazon Web Services request ID for this operation.</p>
96    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
97        &self.request_id
98    }
99    /// <p>The HTTP status of the request.</p>
100    pub fn status(mut self, input: i32) -> Self {
101        self.status = ::std::option::Option::Some(input);
102        self
103    }
104    /// <p>The HTTP status of the request.</p>
105    pub fn set_status(mut self, input: ::std::option::Option<i32>) -> Self {
106        self.status = input;
107        self
108    }
109    /// <p>The HTTP status of the request.</p>
110    pub fn get_status(&self) -> &::std::option::Option<i32> {
111        &self.status
112    }
113    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
114        self._request_id = Some(request_id.into());
115        self
116    }
117
118    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
119        self._request_id = request_id;
120        self
121    }
122    /// Consumes the builder and constructs a [`RegisterUserOutput`](crate::operation::register_user::RegisterUserOutput).
123    pub fn build(self) -> crate::operation::register_user::RegisterUserOutput {
124        crate::operation::register_user::RegisterUserOutput {
125            user: self.user,
126            user_invitation_url: self.user_invitation_url,
127            request_id: self.request_id,
128            status: self.status.unwrap_or_default(),
129            _request_id: self._request_id,
130        }
131    }
132}