aws_sdk_ssoadmin/operation/create_application/
_create_application_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, ::std::fmt::Debug)]
5pub struct CreateApplicationInput {
6    /// <p>The ARN of the instance of IAM Identity Center under which the operation will run. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
7    pub instance_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The ARN of the application provider under which the operation will run.</p>
9    pub application_provider_arn: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the .</p>
11    pub name: ::std::option::Option<::std::string::String>,
12    /// <p>The description of the .</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>A structure that describes the options for the portal associated with an application.</p>
15    pub portal_options: ::std::option::Option<crate::types::PortalOptions>,
16    /// <p>Specifies tags to be attached to the application.</p>
17    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
18    /// <p>Specifies whether the application is enabled or disabled.</p>
19    pub status: ::std::option::Option<crate::types::ApplicationStatus>,
20    /// <p>Specifies a unique, case-sensitive ID that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value</a>.</p>
21    /// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
22    /// <p>If you retry the operation with the same <code>ClientToken</code>, but with different parameters, the retry fails with an <code>IdempotentParameterMismatch</code> error.</p>
23    pub client_token: ::std::option::Option<::std::string::String>,
24}
25impl CreateApplicationInput {
26    /// <p>The ARN of the instance of IAM Identity Center under which the operation will run. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
27    pub fn instance_arn(&self) -> ::std::option::Option<&str> {
28        self.instance_arn.as_deref()
29    }
30    /// <p>The ARN of the application provider under which the operation will run.</p>
31    pub fn application_provider_arn(&self) -> ::std::option::Option<&str> {
32        self.application_provider_arn.as_deref()
33    }
34    /// <p>The name of the .</p>
35    pub fn name(&self) -> ::std::option::Option<&str> {
36        self.name.as_deref()
37    }
38    /// <p>The description of the .</p>
39    pub fn description(&self) -> ::std::option::Option<&str> {
40        self.description.as_deref()
41    }
42    /// <p>A structure that describes the options for the portal associated with an application.</p>
43    pub fn portal_options(&self) -> ::std::option::Option<&crate::types::PortalOptions> {
44        self.portal_options.as_ref()
45    }
46    /// <p>Specifies tags to be attached to the application.</p>
47    ///
48    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
49    pub fn tags(&self) -> &[crate::types::Tag] {
50        self.tags.as_deref().unwrap_or_default()
51    }
52    /// <p>Specifies whether the application is enabled or disabled.</p>
53    pub fn status(&self) -> ::std::option::Option<&crate::types::ApplicationStatus> {
54        self.status.as_ref()
55    }
56    /// <p>Specifies a unique, case-sensitive ID that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value</a>.</p>
57    /// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
58    /// <p>If you retry the operation with the same <code>ClientToken</code>, but with different parameters, the retry fails with an <code>IdempotentParameterMismatch</code> error.</p>
59    pub fn client_token(&self) -> ::std::option::Option<&str> {
60        self.client_token.as_deref()
61    }
62}
63impl CreateApplicationInput {
64    /// Creates a new builder-style object to manufacture [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
65    pub fn builder() -> crate::operation::create_application::builders::CreateApplicationInputBuilder {
66        crate::operation::create_application::builders::CreateApplicationInputBuilder::default()
67    }
68}
69
70/// A builder for [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
71#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
72#[non_exhaustive]
73pub struct CreateApplicationInputBuilder {
74    pub(crate) instance_arn: ::std::option::Option<::std::string::String>,
75    pub(crate) application_provider_arn: ::std::option::Option<::std::string::String>,
76    pub(crate) name: ::std::option::Option<::std::string::String>,
77    pub(crate) description: ::std::option::Option<::std::string::String>,
78    pub(crate) portal_options: ::std::option::Option<crate::types::PortalOptions>,
79    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
80    pub(crate) status: ::std::option::Option<crate::types::ApplicationStatus>,
81    pub(crate) client_token: ::std::option::Option<::std::string::String>,
82}
83impl CreateApplicationInputBuilder {
84    /// <p>The ARN of the instance of IAM Identity Center under which the operation will run. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
85    /// This field is required.
86    pub fn instance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.instance_arn = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// <p>The ARN of the instance of IAM Identity Center under which the operation will run. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
91    pub fn set_instance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.instance_arn = input;
93        self
94    }
95    /// <p>The ARN of the instance of IAM Identity Center under which the operation will run. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
96    pub fn get_instance_arn(&self) -> &::std::option::Option<::std::string::String> {
97        &self.instance_arn
98    }
99    /// <p>The ARN of the application provider under which the operation will run.</p>
100    /// This field is required.
101    pub fn application_provider_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.application_provider_arn = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>The ARN of the application provider under which the operation will run.</p>
106    pub fn set_application_provider_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.application_provider_arn = input;
108        self
109    }
110    /// <p>The ARN of the application provider under which the operation will run.</p>
111    pub fn get_application_provider_arn(&self) -> &::std::option::Option<::std::string::String> {
112        &self.application_provider_arn
113    }
114    /// <p>The name of the .</p>
115    /// This field is required.
116    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117        self.name = ::std::option::Option::Some(input.into());
118        self
119    }
120    /// <p>The name of the .</p>
121    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.name = input;
123        self
124    }
125    /// <p>The name of the .</p>
126    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
127        &self.name
128    }
129    /// <p>The description of the .</p>
130    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131        self.description = ::std::option::Option::Some(input.into());
132        self
133    }
134    /// <p>The description of the .</p>
135    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136        self.description = input;
137        self
138    }
139    /// <p>The description of the .</p>
140    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
141        &self.description
142    }
143    /// <p>A structure that describes the options for the portal associated with an application.</p>
144    pub fn portal_options(mut self, input: crate::types::PortalOptions) -> Self {
145        self.portal_options = ::std::option::Option::Some(input);
146        self
147    }
148    /// <p>A structure that describes the options for the portal associated with an application.</p>
149    pub fn set_portal_options(mut self, input: ::std::option::Option<crate::types::PortalOptions>) -> Self {
150        self.portal_options = input;
151        self
152    }
153    /// <p>A structure that describes the options for the portal associated with an application.</p>
154    pub fn get_portal_options(&self) -> &::std::option::Option<crate::types::PortalOptions> {
155        &self.portal_options
156    }
157    /// Appends an item to `tags`.
158    ///
159    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
160    ///
161    /// <p>Specifies tags to be attached to the application.</p>
162    pub fn tags(mut self, input: crate::types::Tag) -> Self {
163        let mut v = self.tags.unwrap_or_default();
164        v.push(input);
165        self.tags = ::std::option::Option::Some(v);
166        self
167    }
168    /// <p>Specifies tags to be attached to the application.</p>
169    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
170        self.tags = input;
171        self
172    }
173    /// <p>Specifies tags to be attached to the application.</p>
174    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
175        &self.tags
176    }
177    /// <p>Specifies whether the application is enabled or disabled.</p>
178    pub fn status(mut self, input: crate::types::ApplicationStatus) -> Self {
179        self.status = ::std::option::Option::Some(input);
180        self
181    }
182    /// <p>Specifies whether the application is enabled or disabled.</p>
183    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ApplicationStatus>) -> Self {
184        self.status = input;
185        self
186    }
187    /// <p>Specifies whether the application is enabled or disabled.</p>
188    pub fn get_status(&self) -> &::std::option::Option<crate::types::ApplicationStatus> {
189        &self.status
190    }
191    /// <p>Specifies a unique, case-sensitive ID that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value</a>.</p>
192    /// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
193    /// <p>If you retry the operation with the same <code>ClientToken</code>, but with different parameters, the retry fails with an <code>IdempotentParameterMismatch</code> error.</p>
194    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
195        self.client_token = ::std::option::Option::Some(input.into());
196        self
197    }
198    /// <p>Specifies a unique, case-sensitive ID that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value</a>.</p>
199    /// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
200    /// <p>If you retry the operation with the same <code>ClientToken</code>, but with different parameters, the retry fails with an <code>IdempotentParameterMismatch</code> error.</p>
201    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
202        self.client_token = input;
203        self
204    }
205    /// <p>Specifies a unique, case-sensitive ID that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value</a>.</p>
206    /// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
207    /// <p>If you retry the operation with the same <code>ClientToken</code>, but with different parameters, the retry fails with an <code>IdempotentParameterMismatch</code> error.</p>
208    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
209        &self.client_token
210    }
211    /// Consumes the builder and constructs a [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
212    pub fn build(
213        self,
214    ) -> ::std::result::Result<crate::operation::create_application::CreateApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
215        ::std::result::Result::Ok(crate::operation::create_application::CreateApplicationInput {
216            instance_arn: self.instance_arn,
217            application_provider_arn: self.application_provider_arn,
218            name: self.name,
219            description: self.description,
220            portal_options: self.portal_options,
221            tags: self.tags,
222            status: self.status,
223            client_token: self.client_token,
224        })
225    }
226}