aws_sdk_ssoadmin/operation/create_trusted_token_issuer/_create_trusted_token_issuer_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 CreateTrustedTokenIssuerInput {
6 /// <p>Specifies the ARN of the instance of IAM Identity Center to contain the new trusted token issuer configuration.</p>
7 pub instance_arn: ::std::option::Option<::std::string::String>,
8 /// <p>Specifies the name of the new trusted token issuer configuration.</p>
9 pub name: ::std::option::Option<::std::string::String>,
10 /// <p>Specifies the type of the new trusted token issuer.</p>
11 pub trusted_token_issuer_type: ::std::option::Option<crate::types::TrustedTokenIssuerType>,
12 /// <p>Specifies settings that apply to the new trusted token issuer configuration. The settings that are available depend on what <code>TrustedTokenIssuerType</code> you specify.</p>
13 pub trusted_token_issuer_configuration: ::std::option::Option<crate::types::TrustedTokenIssuerConfiguration>,
14 /// <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>
15 /// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
16 /// <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>
17 pub client_token: ::std::option::Option<::std::string::String>,
18 /// <p>Specifies tags to be attached to the new trusted token issuer configuration.</p>
19 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
20}
21impl CreateTrustedTokenIssuerInput {
22 /// <p>Specifies the ARN of the instance of IAM Identity Center to contain the new trusted token issuer configuration.</p>
23 pub fn instance_arn(&self) -> ::std::option::Option<&str> {
24 self.instance_arn.as_deref()
25 }
26 /// <p>Specifies the name of the new trusted token issuer configuration.</p>
27 pub fn name(&self) -> ::std::option::Option<&str> {
28 self.name.as_deref()
29 }
30 /// <p>Specifies the type of the new trusted token issuer.</p>
31 pub fn trusted_token_issuer_type(&self) -> ::std::option::Option<&crate::types::TrustedTokenIssuerType> {
32 self.trusted_token_issuer_type.as_ref()
33 }
34 /// <p>Specifies settings that apply to the new trusted token issuer configuration. The settings that are available depend on what <code>TrustedTokenIssuerType</code> you specify.</p>
35 pub fn trusted_token_issuer_configuration(&self) -> ::std::option::Option<&crate::types::TrustedTokenIssuerConfiguration> {
36 self.trusted_token_issuer_configuration.as_ref()
37 }
38 /// <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>
39 /// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
40 /// <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>
41 pub fn client_token(&self) -> ::std::option::Option<&str> {
42 self.client_token.as_deref()
43 }
44 /// <p>Specifies tags to be attached to the new trusted token issuer configuration.</p>
45 ///
46 /// 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()`.
47 pub fn tags(&self) -> &[crate::types::Tag] {
48 self.tags.as_deref().unwrap_or_default()
49 }
50}
51impl CreateTrustedTokenIssuerInput {
52 /// Creates a new builder-style object to manufacture [`CreateTrustedTokenIssuerInput`](crate::operation::create_trusted_token_issuer::CreateTrustedTokenIssuerInput).
53 pub fn builder() -> crate::operation::create_trusted_token_issuer::builders::CreateTrustedTokenIssuerInputBuilder {
54 crate::operation::create_trusted_token_issuer::builders::CreateTrustedTokenIssuerInputBuilder::default()
55 }
56}
57
58/// A builder for [`CreateTrustedTokenIssuerInput`](crate::operation::create_trusted_token_issuer::CreateTrustedTokenIssuerInput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct CreateTrustedTokenIssuerInputBuilder {
62 pub(crate) instance_arn: ::std::option::Option<::std::string::String>,
63 pub(crate) name: ::std::option::Option<::std::string::String>,
64 pub(crate) trusted_token_issuer_type: ::std::option::Option<crate::types::TrustedTokenIssuerType>,
65 pub(crate) trusted_token_issuer_configuration: ::std::option::Option<crate::types::TrustedTokenIssuerConfiguration>,
66 pub(crate) client_token: ::std::option::Option<::std::string::String>,
67 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
68}
69impl CreateTrustedTokenIssuerInputBuilder {
70 /// <p>Specifies the ARN of the instance of IAM Identity Center to contain the new trusted token issuer configuration.</p>
71 /// This field is required.
72 pub fn instance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73 self.instance_arn = ::std::option::Option::Some(input.into());
74 self
75 }
76 /// <p>Specifies the ARN of the instance of IAM Identity Center to contain the new trusted token issuer configuration.</p>
77 pub fn set_instance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78 self.instance_arn = input;
79 self
80 }
81 /// <p>Specifies the ARN of the instance of IAM Identity Center to contain the new trusted token issuer configuration.</p>
82 pub fn get_instance_arn(&self) -> &::std::option::Option<::std::string::String> {
83 &self.instance_arn
84 }
85 /// <p>Specifies the name of the new trusted token issuer configuration.</p>
86 /// This field is required.
87 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88 self.name = ::std::option::Option::Some(input.into());
89 self
90 }
91 /// <p>Specifies the name of the new trusted token issuer configuration.</p>
92 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93 self.name = input;
94 self
95 }
96 /// <p>Specifies the name of the new trusted token issuer configuration.</p>
97 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
98 &self.name
99 }
100 /// <p>Specifies the type of the new trusted token issuer.</p>
101 /// This field is required.
102 pub fn trusted_token_issuer_type(mut self, input: crate::types::TrustedTokenIssuerType) -> Self {
103 self.trusted_token_issuer_type = ::std::option::Option::Some(input);
104 self
105 }
106 /// <p>Specifies the type of the new trusted token issuer.</p>
107 pub fn set_trusted_token_issuer_type(mut self, input: ::std::option::Option<crate::types::TrustedTokenIssuerType>) -> Self {
108 self.trusted_token_issuer_type = input;
109 self
110 }
111 /// <p>Specifies the type of the new trusted token issuer.</p>
112 pub fn get_trusted_token_issuer_type(&self) -> &::std::option::Option<crate::types::TrustedTokenIssuerType> {
113 &self.trusted_token_issuer_type
114 }
115 /// <p>Specifies settings that apply to the new trusted token issuer configuration. The settings that are available depend on what <code>TrustedTokenIssuerType</code> you specify.</p>
116 /// This field is required.
117 pub fn trusted_token_issuer_configuration(mut self, input: crate::types::TrustedTokenIssuerConfiguration) -> Self {
118 self.trusted_token_issuer_configuration = ::std::option::Option::Some(input);
119 self
120 }
121 /// <p>Specifies settings that apply to the new trusted token issuer configuration. The settings that are available depend on what <code>TrustedTokenIssuerType</code> you specify.</p>
122 pub fn set_trusted_token_issuer_configuration(mut self, input: ::std::option::Option<crate::types::TrustedTokenIssuerConfiguration>) -> Self {
123 self.trusted_token_issuer_configuration = input;
124 self
125 }
126 /// <p>Specifies settings that apply to the new trusted token issuer configuration. The settings that are available depend on what <code>TrustedTokenIssuerType</code> you specify.</p>
127 pub fn get_trusted_token_issuer_configuration(&self) -> &::std::option::Option<crate::types::TrustedTokenIssuerConfiguration> {
128 &self.trusted_token_issuer_configuration
129 }
130 /// <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>
131 /// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
132 /// <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>
133 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134 self.client_token = ::std::option::Option::Some(input.into());
135 self
136 }
137 /// <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>
138 /// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
139 /// <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>
140 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141 self.client_token = input;
142 self
143 }
144 /// <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>
145 /// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
146 /// <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>
147 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
148 &self.client_token
149 }
150 /// Appends an item to `tags`.
151 ///
152 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
153 ///
154 /// <p>Specifies tags to be attached to the new trusted token issuer configuration.</p>
155 pub fn tags(mut self, input: crate::types::Tag) -> Self {
156 let mut v = self.tags.unwrap_or_default();
157 v.push(input);
158 self.tags = ::std::option::Option::Some(v);
159 self
160 }
161 /// <p>Specifies tags to be attached to the new trusted token issuer configuration.</p>
162 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
163 self.tags = input;
164 self
165 }
166 /// <p>Specifies tags to be attached to the new trusted token issuer configuration.</p>
167 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
168 &self.tags
169 }
170 /// Consumes the builder and constructs a [`CreateTrustedTokenIssuerInput`](crate::operation::create_trusted_token_issuer::CreateTrustedTokenIssuerInput).
171 pub fn build(
172 self,
173 ) -> ::std::result::Result<
174 crate::operation::create_trusted_token_issuer::CreateTrustedTokenIssuerInput,
175 ::aws_smithy_types::error::operation::BuildError,
176 > {
177 ::std::result::Result::Ok(crate::operation::create_trusted_token_issuer::CreateTrustedTokenIssuerInput {
178 instance_arn: self.instance_arn,
179 name: self.name,
180 trusted_token_issuer_type: self.trusted_token_issuer_type,
181 trusted_token_issuer_configuration: self.trusted_token_issuer_configuration,
182 client_token: self.client_token,
183 tags: self.tags,
184 })
185 }
186}