aws_sdk_nimble/operation/create_studio/
_create_studio_input.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 CreateStudioInput {
6    /// <p>The IAM role that studio admins will assume when logging in to the Nimble Studio portal.</p>
7    pub admin_role_arn: ::std::option::Option<::std::string::String>,
8    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
9    pub client_token: ::std::option::Option<::std::string::String>,
10    /// <p>A friendly name for the studio.</p>
11    pub display_name: ::std::option::Option<::std::string::String>,
12    /// <p>The studio encryption configuration.</p>
13    pub studio_encryption_configuration: ::std::option::Option<crate::types::StudioEncryptionConfiguration>,
14    /// <p>The studio name that is used in the URL of the Nimble Studio portal when accessed by Nimble Studio users.</p>
15    pub studio_name: ::std::option::Option<::std::string::String>,
16    /// <p>A collection of labels, in the form of key-value pairs, that apply to this resource.</p>
17    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
18    /// <p>The IAM role that studio users will assume when logging in to the Nimble Studio portal.</p>
19    pub user_role_arn: ::std::option::Option<::std::string::String>,
20}
21impl CreateStudioInput {
22    /// <p>The IAM role that studio admins will assume when logging in to the Nimble Studio portal.</p>
23    pub fn admin_role_arn(&self) -> ::std::option::Option<&str> {
24        self.admin_role_arn.as_deref()
25    }
26    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
27    pub fn client_token(&self) -> ::std::option::Option<&str> {
28        self.client_token.as_deref()
29    }
30    /// <p>A friendly name for the studio.</p>
31    pub fn display_name(&self) -> ::std::option::Option<&str> {
32        self.display_name.as_deref()
33    }
34    /// <p>The studio encryption configuration.</p>
35    pub fn studio_encryption_configuration(&self) -> ::std::option::Option<&crate::types::StudioEncryptionConfiguration> {
36        self.studio_encryption_configuration.as_ref()
37    }
38    /// <p>The studio name that is used in the URL of the Nimble Studio portal when accessed by Nimble Studio users.</p>
39    pub fn studio_name(&self) -> ::std::option::Option<&str> {
40        self.studio_name.as_deref()
41    }
42    /// <p>A collection of labels, in the form of key-value pairs, that apply to this resource.</p>
43    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
44        self.tags.as_ref()
45    }
46    /// <p>The IAM role that studio users will assume when logging in to the Nimble Studio portal.</p>
47    pub fn user_role_arn(&self) -> ::std::option::Option<&str> {
48        self.user_role_arn.as_deref()
49    }
50}
51impl ::std::fmt::Debug for CreateStudioInput {
52    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
53        let mut formatter = f.debug_struct("CreateStudioInput");
54        formatter.field("admin_role_arn", &self.admin_role_arn);
55        formatter.field("client_token", &self.client_token);
56        formatter.field("display_name", &"*** Sensitive Data Redacted ***");
57        formatter.field("studio_encryption_configuration", &self.studio_encryption_configuration);
58        formatter.field("studio_name", &self.studio_name);
59        formatter.field("tags", &self.tags);
60        formatter.field("user_role_arn", &self.user_role_arn);
61        formatter.finish()
62    }
63}
64impl CreateStudioInput {
65    /// Creates a new builder-style object to manufacture [`CreateStudioInput`](crate::operation::create_studio::CreateStudioInput).
66    pub fn builder() -> crate::operation::create_studio::builders::CreateStudioInputBuilder {
67        crate::operation::create_studio::builders::CreateStudioInputBuilder::default()
68    }
69}
70
71/// A builder for [`CreateStudioInput`](crate::operation::create_studio::CreateStudioInput).
72#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
73#[non_exhaustive]
74pub struct CreateStudioInputBuilder {
75    pub(crate) admin_role_arn: ::std::option::Option<::std::string::String>,
76    pub(crate) client_token: ::std::option::Option<::std::string::String>,
77    pub(crate) display_name: ::std::option::Option<::std::string::String>,
78    pub(crate) studio_encryption_configuration: ::std::option::Option<crate::types::StudioEncryptionConfiguration>,
79    pub(crate) studio_name: ::std::option::Option<::std::string::String>,
80    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
81    pub(crate) user_role_arn: ::std::option::Option<::std::string::String>,
82}
83impl CreateStudioInputBuilder {
84    /// <p>The IAM role that studio admins will assume when logging in to the Nimble Studio portal.</p>
85    /// This field is required.
86    pub fn admin_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.admin_role_arn = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// <p>The IAM role that studio admins will assume when logging in to the Nimble Studio portal.</p>
91    pub fn set_admin_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.admin_role_arn = input;
93        self
94    }
95    /// <p>The IAM role that studio admins will assume when logging in to the Nimble Studio portal.</p>
96    pub fn get_admin_role_arn(&self) -> &::std::option::Option<::std::string::String> {
97        &self.admin_role_arn
98    }
99    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
100    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101        self.client_token = ::std::option::Option::Some(input.into());
102        self
103    }
104    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
105    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106        self.client_token = input;
107        self
108    }
109    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
110    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
111        &self.client_token
112    }
113    /// <p>A friendly name for the studio.</p>
114    /// This field is required.
115    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.display_name = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>A friendly name for the studio.</p>
120    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.display_name = input;
122        self
123    }
124    /// <p>A friendly name for the studio.</p>
125    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
126        &self.display_name
127    }
128    /// <p>The studio encryption configuration.</p>
129    pub fn studio_encryption_configuration(mut self, input: crate::types::StudioEncryptionConfiguration) -> Self {
130        self.studio_encryption_configuration = ::std::option::Option::Some(input);
131        self
132    }
133    /// <p>The studio encryption configuration.</p>
134    pub fn set_studio_encryption_configuration(mut self, input: ::std::option::Option<crate::types::StudioEncryptionConfiguration>) -> Self {
135        self.studio_encryption_configuration = input;
136        self
137    }
138    /// <p>The studio encryption configuration.</p>
139    pub fn get_studio_encryption_configuration(&self) -> &::std::option::Option<crate::types::StudioEncryptionConfiguration> {
140        &self.studio_encryption_configuration
141    }
142    /// <p>The studio name that is used in the URL of the Nimble Studio portal when accessed by Nimble Studio users.</p>
143    /// This field is required.
144    pub fn studio_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145        self.studio_name = ::std::option::Option::Some(input.into());
146        self
147    }
148    /// <p>The studio name that is used in the URL of the Nimble Studio portal when accessed by Nimble Studio users.</p>
149    pub fn set_studio_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.studio_name = input;
151        self
152    }
153    /// <p>The studio name that is used in the URL of the Nimble Studio portal when accessed by Nimble Studio users.</p>
154    pub fn get_studio_name(&self) -> &::std::option::Option<::std::string::String> {
155        &self.studio_name
156    }
157    /// Adds a key-value pair to `tags`.
158    ///
159    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
160    ///
161    /// <p>A collection of labels, in the form of key-value pairs, that apply to this resource.</p>
162    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
163        let mut hash_map = self.tags.unwrap_or_default();
164        hash_map.insert(k.into(), v.into());
165        self.tags = ::std::option::Option::Some(hash_map);
166        self
167    }
168    /// <p>A collection of labels, in the form of key-value pairs, that apply to this resource.</p>
169    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
170        self.tags = input;
171        self
172    }
173    /// <p>A collection of labels, in the form of key-value pairs, that apply to this resource.</p>
174    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
175        &self.tags
176    }
177    /// <p>The IAM role that studio users will assume when logging in to the Nimble Studio portal.</p>
178    /// This field is required.
179    pub fn user_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
180        self.user_role_arn = ::std::option::Option::Some(input.into());
181        self
182    }
183    /// <p>The IAM role that studio users will assume when logging in to the Nimble Studio portal.</p>
184    pub fn set_user_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
185        self.user_role_arn = input;
186        self
187    }
188    /// <p>The IAM role that studio users will assume when logging in to the Nimble Studio portal.</p>
189    pub fn get_user_role_arn(&self) -> &::std::option::Option<::std::string::String> {
190        &self.user_role_arn
191    }
192    /// Consumes the builder and constructs a [`CreateStudioInput`](crate::operation::create_studio::CreateStudioInput).
193    pub fn build(
194        self,
195    ) -> ::std::result::Result<crate::operation::create_studio::CreateStudioInput, ::aws_smithy_types::error::operation::BuildError> {
196        ::std::result::Result::Ok(crate::operation::create_studio::CreateStudioInput {
197            admin_role_arn: self.admin_role_arn,
198            client_token: self.client_token,
199            display_name: self.display_name,
200            studio_encryption_configuration: self.studio_encryption_configuration,
201            studio_name: self.studio_name,
202            tags: self.tags,
203            user_role_arn: self.user_role_arn,
204        })
205    }
206}
207impl ::std::fmt::Debug for CreateStudioInputBuilder {
208    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
209        let mut formatter = f.debug_struct("CreateStudioInputBuilder");
210        formatter.field("admin_role_arn", &self.admin_role_arn);
211        formatter.field("client_token", &self.client_token);
212        formatter.field("display_name", &"*** Sensitive Data Redacted ***");
213        formatter.field("studio_encryption_configuration", &self.studio_encryption_configuration);
214        formatter.field("studio_name", &self.studio_name);
215        formatter.field("tags", &self.tags);
216        formatter.field("user_role_arn", &self.user_role_arn);
217        formatter.finish()
218    }
219}