aws_sdk_quicksight/operation/create_namespace/
_create_namespace_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 CreateNamespaceOutput {
6    /// <p>The ARN of the Amazon QuickSight namespace you created.</p>
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the new namespace that you created.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The Amazon Web Services Region; that you want to use for the free SPICE capacity for the new namespace. This is set to the region that you run CreateNamespace in.</p>
11    pub capacity_region: ::std::option::Option<::std::string::String>,
12    /// <p>The status of the creation of the namespace. This is an asynchronous process. A status of <code>CREATED</code> means that your namespace is ready to use. If an error occurs, it indicates if the process is <code>retryable</code> or <code>non-retryable</code>. In the case of a non-retryable error, refer to the error message for follow-up tasks.</p>
13    pub creation_status: ::std::option::Option<crate::types::NamespaceStatus>,
14    /// <p>Specifies the type of your user identity directory. Currently, this supports users with an identity type of <code>QUICKSIGHT</code>.</p>
15    pub identity_store: ::std::option::Option<crate::types::IdentityStore>,
16    /// <p>The Amazon Web Services request ID for this operation.</p>
17    pub request_id: ::std::option::Option<::std::string::String>,
18    /// <p>The HTTP status of the request.</p>
19    pub status: i32,
20    _request_id: Option<String>,
21}
22impl CreateNamespaceOutput {
23    /// <p>The ARN of the Amazon QuickSight namespace you created.</p>
24    pub fn arn(&self) -> ::std::option::Option<&str> {
25        self.arn.as_deref()
26    }
27    /// <p>The name of the new namespace that you created.</p>
28    pub fn name(&self) -> ::std::option::Option<&str> {
29        self.name.as_deref()
30    }
31    /// <p>The Amazon Web Services Region; that you want to use for the free SPICE capacity for the new namespace. This is set to the region that you run CreateNamespace in.</p>
32    pub fn capacity_region(&self) -> ::std::option::Option<&str> {
33        self.capacity_region.as_deref()
34    }
35    /// <p>The status of the creation of the namespace. This is an asynchronous process. A status of <code>CREATED</code> means that your namespace is ready to use. If an error occurs, it indicates if the process is <code>retryable</code> or <code>non-retryable</code>. In the case of a non-retryable error, refer to the error message for follow-up tasks.</p>
36    pub fn creation_status(&self) -> ::std::option::Option<&crate::types::NamespaceStatus> {
37        self.creation_status.as_ref()
38    }
39    /// <p>Specifies the type of your user identity directory. Currently, this supports users with an identity type of <code>QUICKSIGHT</code>.</p>
40    pub fn identity_store(&self) -> ::std::option::Option<&crate::types::IdentityStore> {
41        self.identity_store.as_ref()
42    }
43    /// <p>The Amazon Web Services request ID for this operation.</p>
44    pub fn request_id(&self) -> ::std::option::Option<&str> {
45        self.request_id.as_deref()
46    }
47    /// <p>The HTTP status of the request.</p>
48    pub fn status(&self) -> i32 {
49        self.status
50    }
51}
52impl ::aws_types::request_id::RequestId for CreateNamespaceOutput {
53    fn request_id(&self) -> Option<&str> {
54        self._request_id.as_deref()
55    }
56}
57impl CreateNamespaceOutput {
58    /// Creates a new builder-style object to manufacture [`CreateNamespaceOutput`](crate::operation::create_namespace::CreateNamespaceOutput).
59    pub fn builder() -> crate::operation::create_namespace::builders::CreateNamespaceOutputBuilder {
60        crate::operation::create_namespace::builders::CreateNamespaceOutputBuilder::default()
61    }
62}
63
64/// A builder for [`CreateNamespaceOutput`](crate::operation::create_namespace::CreateNamespaceOutput).
65#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
66#[non_exhaustive]
67pub struct CreateNamespaceOutputBuilder {
68    pub(crate) arn: ::std::option::Option<::std::string::String>,
69    pub(crate) name: ::std::option::Option<::std::string::String>,
70    pub(crate) capacity_region: ::std::option::Option<::std::string::String>,
71    pub(crate) creation_status: ::std::option::Option<crate::types::NamespaceStatus>,
72    pub(crate) identity_store: ::std::option::Option<crate::types::IdentityStore>,
73    pub(crate) request_id: ::std::option::Option<::std::string::String>,
74    pub(crate) status: ::std::option::Option<i32>,
75    _request_id: Option<String>,
76}
77impl CreateNamespaceOutputBuilder {
78    /// <p>The ARN of the Amazon QuickSight namespace you created.</p>
79    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80        self.arn = ::std::option::Option::Some(input.into());
81        self
82    }
83    /// <p>The ARN of the Amazon QuickSight namespace you created.</p>
84    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85        self.arn = input;
86        self
87    }
88    /// <p>The ARN of the Amazon QuickSight namespace you created.</p>
89    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
90        &self.arn
91    }
92    /// <p>The name of the new namespace that you created.</p>
93    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94        self.name = ::std::option::Option::Some(input.into());
95        self
96    }
97    /// <p>The name of the new namespace that you created.</p>
98    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99        self.name = input;
100        self
101    }
102    /// <p>The name of the new namespace that you created.</p>
103    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
104        &self.name
105    }
106    /// <p>The Amazon Web Services Region; that you want to use for the free SPICE capacity for the new namespace. This is set to the region that you run CreateNamespace in.</p>
107    pub fn capacity_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108        self.capacity_region = ::std::option::Option::Some(input.into());
109        self
110    }
111    /// <p>The Amazon Web Services Region; that you want to use for the free SPICE capacity for the new namespace. This is set to the region that you run CreateNamespace in.</p>
112    pub fn set_capacity_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113        self.capacity_region = input;
114        self
115    }
116    /// <p>The Amazon Web Services Region; that you want to use for the free SPICE capacity for the new namespace. This is set to the region that you run CreateNamespace in.</p>
117    pub fn get_capacity_region(&self) -> &::std::option::Option<::std::string::String> {
118        &self.capacity_region
119    }
120    /// <p>The status of the creation of the namespace. This is an asynchronous process. A status of <code>CREATED</code> means that your namespace is ready to use. If an error occurs, it indicates if the process is <code>retryable</code> or <code>non-retryable</code>. In the case of a non-retryable error, refer to the error message for follow-up tasks.</p>
121    pub fn creation_status(mut self, input: crate::types::NamespaceStatus) -> Self {
122        self.creation_status = ::std::option::Option::Some(input);
123        self
124    }
125    /// <p>The status of the creation of the namespace. This is an asynchronous process. A status of <code>CREATED</code> means that your namespace is ready to use. If an error occurs, it indicates if the process is <code>retryable</code> or <code>non-retryable</code>. In the case of a non-retryable error, refer to the error message for follow-up tasks.</p>
126    pub fn set_creation_status(mut self, input: ::std::option::Option<crate::types::NamespaceStatus>) -> Self {
127        self.creation_status = input;
128        self
129    }
130    /// <p>The status of the creation of the namespace. This is an asynchronous process. A status of <code>CREATED</code> means that your namespace is ready to use. If an error occurs, it indicates if the process is <code>retryable</code> or <code>non-retryable</code>. In the case of a non-retryable error, refer to the error message for follow-up tasks.</p>
131    pub fn get_creation_status(&self) -> &::std::option::Option<crate::types::NamespaceStatus> {
132        &self.creation_status
133    }
134    /// <p>Specifies the type of your user identity directory. Currently, this supports users with an identity type of <code>QUICKSIGHT</code>.</p>
135    pub fn identity_store(mut self, input: crate::types::IdentityStore) -> Self {
136        self.identity_store = ::std::option::Option::Some(input);
137        self
138    }
139    /// <p>Specifies the type of your user identity directory. Currently, this supports users with an identity type of <code>QUICKSIGHT</code>.</p>
140    pub fn set_identity_store(mut self, input: ::std::option::Option<crate::types::IdentityStore>) -> Self {
141        self.identity_store = input;
142        self
143    }
144    /// <p>Specifies the type of your user identity directory. Currently, this supports users with an identity type of <code>QUICKSIGHT</code>.</p>
145    pub fn get_identity_store(&self) -> &::std::option::Option<crate::types::IdentityStore> {
146        &self.identity_store
147    }
148    /// <p>The Amazon Web Services request ID for this operation.</p>
149    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150        self.request_id = ::std::option::Option::Some(input.into());
151        self
152    }
153    /// <p>The Amazon Web Services request ID for this operation.</p>
154    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155        self.request_id = input;
156        self
157    }
158    /// <p>The Amazon Web Services request ID for this operation.</p>
159    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
160        &self.request_id
161    }
162    /// <p>The HTTP status of the request.</p>
163    pub fn status(mut self, input: i32) -> Self {
164        self.status = ::std::option::Option::Some(input);
165        self
166    }
167    /// <p>The HTTP status of the request.</p>
168    pub fn set_status(mut self, input: ::std::option::Option<i32>) -> Self {
169        self.status = input;
170        self
171    }
172    /// <p>The HTTP status of the request.</p>
173    pub fn get_status(&self) -> &::std::option::Option<i32> {
174        &self.status
175    }
176    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
177        self._request_id = Some(request_id.into());
178        self
179    }
180
181    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
182        self._request_id = request_id;
183        self
184    }
185    /// Consumes the builder and constructs a [`CreateNamespaceOutput`](crate::operation::create_namespace::CreateNamespaceOutput).
186    pub fn build(self) -> crate::operation::create_namespace::CreateNamespaceOutput {
187        crate::operation::create_namespace::CreateNamespaceOutput {
188            arn: self.arn,
189            name: self.name,
190            capacity_region: self.capacity_region,
191            creation_status: self.creation_status,
192            identity_store: self.identity_store,
193            request_id: self.request_id,
194            status: self.status.unwrap_or_default(),
195            _request_id: self._request_id,
196        }
197    }
198}