aws_sdk_ssooidc/operation/register_client/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::register_client::_register_client_output::RegisterClientOutputBuilder;
3
4pub use crate::operation::register_client::_register_client_input::RegisterClientInputBuilder;
5
6impl crate::operation::register_client::builders::RegisterClientInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(self, client: &crate::Client) -> ::std::result::Result<
9 crate::operation::register_client::RegisterClientOutput,
10 ::aws_smithy_runtime_api::client::result::SdkError<
11 crate::operation::register_client::RegisterClientError,
12 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse
13 >
14 > {
15 let mut fluent_builder = client.register_client();
16 fluent_builder.inner = self;
17 fluent_builder.send().await
18 }
19 }
20/// Fluent builder constructing a request to `RegisterClient`.
21///
22/// <p>Registers a public client with IAM Identity Center. This allows clients to perform authorization using the authorization code grant with Proof Key for Code Exchange (PKCE) or the device code grant.</p>
23#[derive(::std::clone::Clone, ::std::fmt::Debug)]
24pub struct RegisterClientFluentBuilder {
25 handle: ::std::sync::Arc<crate::client::Handle>,
26 inner: crate::operation::register_client::builders::RegisterClientInputBuilder,
27config_override: ::std::option::Option<crate::config::Builder>,
28 }
29impl
30 crate::client::customize::internal::CustomizableSend<
31 crate::operation::register_client::RegisterClientOutput,
32 crate::operation::register_client::RegisterClientError,
33 > for RegisterClientFluentBuilder
34 {
35 fn send(
36 self,
37 config_override: crate::config::Builder,
38 ) -> crate::client::customize::internal::BoxFuture<
39 crate::client::customize::internal::SendResult<
40 crate::operation::register_client::RegisterClientOutput,
41 crate::operation::register_client::RegisterClientError,
42 >,
43 > {
44 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
45 }
46 }
47impl RegisterClientFluentBuilder {
48 /// Creates a new `RegisterClientFluentBuilder`.
49 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
50 Self {
51 handle,
52 inner: ::std::default::Default::default(),
53 config_override: ::std::option::Option::None,
54 }
55 }
56 /// Access the RegisterClient as a reference.
57 pub fn as_input(&self) -> &crate::operation::register_client::builders::RegisterClientInputBuilder {
58 &self.inner
59 }
60 /// Sends the request and returns the response.
61 ///
62 /// If an error occurs, an `SdkError` will be returned with additional details that
63 /// can be matched against.
64 ///
65 /// By default, any retryable failures will be retried twice. Retry behavior
66 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
67 /// set when configuring the client. Note: retries are enabled by default when using
68 /// `aws_config::load_from_env()` or when using `BehaviorVersion::v2025_01_17()` or later.
69 pub async fn send(self) -> ::std::result::Result<crate::operation::register_client::RegisterClientOutput, ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::register_client::RegisterClientError, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse>> {
70 let input = self.inner.build().map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
71 let runtime_plugins = crate::operation::register_client::RegisterClient::operation_runtime_plugins(
72 self.handle.runtime_plugins.clone(),
73 &self.handle.conf,
74 self.config_override,
75 );
76 crate::operation::register_client::RegisterClient::orchestrate(&runtime_plugins, input).await
77 }
78
79 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
80 pub fn customize(
81 self,
82 ) -> crate::client::customize::CustomizableOperation<crate::operation::register_client::RegisterClientOutput, crate::operation::register_client::RegisterClientError, Self> {
83 crate::client::customize::CustomizableOperation::new(self)
84 }
85 pub(crate) fn config_override(
86 mut self,
87 config_override: impl ::std::convert::Into<crate::config::Builder>,
88 ) -> Self {
89 self.set_config_override(::std::option::Option::Some(config_override.into()));
90 self
91 }
92
93 pub(crate) fn set_config_override(
94 &mut self,
95 config_override: ::std::option::Option<crate::config::Builder>,
96 ) -> &mut Self {
97 self.config_override = config_override;
98 self
99 }
100 /// <p>The friendly name of the client.</p>
101 pub fn client_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102 self.inner = self.inner.client_name(input.into());
103 self
104 }
105 /// <p>The friendly name of the client.</p>
106 pub fn set_client_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107 self.inner = self.inner.set_client_name(input);
108 self
109 }
110 /// <p>The friendly name of the client.</p>
111 pub fn get_client_name(&self) -> &::std::option::Option<::std::string::String> {
112 self.inner.get_client_name()
113 }
114 /// <p>The type of client. The service supports only <code>public</code> as a client type. Anything other than public will be rejected by the service.</p>
115 pub fn client_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116 self.inner = self.inner.client_type(input.into());
117 self
118 }
119 /// <p>The type of client. The service supports only <code>public</code> as a client type. Anything other than public will be rejected by the service.</p>
120 pub fn set_client_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.inner = self.inner.set_client_type(input);
122 self
123 }
124 /// <p>The type of client. The service supports only <code>public</code> as a client type. Anything other than public will be rejected by the service.</p>
125 pub fn get_client_type(&self) -> &::std::option::Option<::std::string::String> {
126 self.inner.get_client_type()
127 }
128 ///
129 /// Appends an item to `scopes`.
130 ///
131 /// To override the contents of this collection use [`set_scopes`](Self::set_scopes).
132 ///
133 /// <p>The list of scopes that are defined by the client. Upon authorization, this list is used to restrict permissions when granting an access token.</p>
134 pub fn scopes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
135 self.inner = self.inner.scopes(input.into());
136 self
137 }
138 /// <p>The list of scopes that are defined by the client. Upon authorization, this list is used to restrict permissions when granting an access token.</p>
139 pub fn set_scopes(mut self, input: ::std::option::Option<::std::vec::Vec::<::std::string::String>>) -> Self {
140 self.inner = self.inner.set_scopes(input);
141 self
142 }
143 /// <p>The list of scopes that are defined by the client. Upon authorization, this list is used to restrict permissions when granting an access token.</p>
144 pub fn get_scopes(&self) -> &::std::option::Option<::std::vec::Vec::<::std::string::String>> {
145 self.inner.get_scopes()
146 }
147 ///
148 /// Appends an item to `redirectUris`.
149 ///
150 /// To override the contents of this collection use [`set_redirect_uris`](Self::set_redirect_uris).
151 ///
152 /// <p>The list of redirect URI that are defined by the client. At completion of authorization, this list is used to restrict what locations the user agent can be redirected back to.</p>
153 pub fn redirect_uris(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154 self.inner = self.inner.redirect_uris(input.into());
155 self
156 }
157 /// <p>The list of redirect URI that are defined by the client. At completion of authorization, this list is used to restrict what locations the user agent can be redirected back to.</p>
158 pub fn set_redirect_uris(mut self, input: ::std::option::Option<::std::vec::Vec::<::std::string::String>>) -> Self {
159 self.inner = self.inner.set_redirect_uris(input);
160 self
161 }
162 /// <p>The list of redirect URI that are defined by the client. At completion of authorization, this list is used to restrict what locations the user agent can be redirected back to.</p>
163 pub fn get_redirect_uris(&self) -> &::std::option::Option<::std::vec::Vec::<::std::string::String>> {
164 self.inner.get_redirect_uris()
165 }
166 ///
167 /// Appends an item to `grantTypes`.
168 ///
169 /// To override the contents of this collection use [`set_grant_types`](Self::set_grant_types).
170 ///
171 /// <p>The list of OAuth 2.0 grant types that are defined by the client. This list is used to restrict the token granting flows available to the client. Supports the following OAuth 2.0 grant types: Authorization Code, Device Code, and Refresh Token.</p>
172 /// <p>* Authorization Code - <code>authorization_code</code></p>
173 /// <p>* Device Code - <code>urn:ietf:params:oauth:grant-type:device_code</code></p>
174 /// <p>* Refresh Token - <code>refresh_token</code></p>
175 pub fn grant_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
176 self.inner = self.inner.grant_types(input.into());
177 self
178 }
179 /// <p>The list of OAuth 2.0 grant types that are defined by the client. This list is used to restrict the token granting flows available to the client. Supports the following OAuth 2.0 grant types: Authorization Code, Device Code, and Refresh Token.</p>
180 /// <p>* Authorization Code - <code>authorization_code</code></p>
181 /// <p>* Device Code - <code>urn:ietf:params:oauth:grant-type:device_code</code></p>
182 /// <p>* Refresh Token - <code>refresh_token</code></p>
183 pub fn set_grant_types(mut self, input: ::std::option::Option<::std::vec::Vec::<::std::string::String>>) -> Self {
184 self.inner = self.inner.set_grant_types(input);
185 self
186 }
187 /// <p>The list of OAuth 2.0 grant types that are defined by the client. This list is used to restrict the token granting flows available to the client. Supports the following OAuth 2.0 grant types: Authorization Code, Device Code, and Refresh Token.</p>
188 /// <p>* Authorization Code - <code>authorization_code</code></p>
189 /// <p>* Device Code - <code>urn:ietf:params:oauth:grant-type:device_code</code></p>
190 /// <p>* Refresh Token - <code>refresh_token</code></p>
191 pub fn get_grant_types(&self) -> &::std::option::Option<::std::vec::Vec::<::std::string::String>> {
192 self.inner.get_grant_types()
193 }
194 /// <p>The IAM Identity Center Issuer URL associated with an instance of IAM Identity Center. This value is needed for user access to resources through the client.</p>
195 pub fn issuer_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
196 self.inner = self.inner.issuer_url(input.into());
197 self
198 }
199 /// <p>The IAM Identity Center Issuer URL associated with an instance of IAM Identity Center. This value is needed for user access to resources through the client.</p>
200 pub fn set_issuer_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
201 self.inner = self.inner.set_issuer_url(input);
202 self
203 }
204 /// <p>The IAM Identity Center Issuer URL associated with an instance of IAM Identity Center. This value is needed for user access to resources through the client.</p>
205 pub fn get_issuer_url(&self) -> &::std::option::Option<::std::string::String> {
206 self.inner.get_issuer_url()
207 }
208 /// <p>This IAM Identity Center application ARN is used to define administrator-managed configuration for public client access to resources. At authorization, the scopes, grants, and redirect URI available to this client will be restricted by this application resource.</p>
209 pub fn entitled_application_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
210 self.inner = self.inner.entitled_application_arn(input.into());
211 self
212 }
213 /// <p>This IAM Identity Center application ARN is used to define administrator-managed configuration for public client access to resources. At authorization, the scopes, grants, and redirect URI available to this client will be restricted by this application resource.</p>
214 pub fn set_entitled_application_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
215 self.inner = self.inner.set_entitled_application_arn(input);
216 self
217 }
218 /// <p>This IAM Identity Center application ARN is used to define administrator-managed configuration for public client access to resources. At authorization, the scopes, grants, and redirect URI available to this client will be restricted by this application resource.</p>
219 pub fn get_entitled_application_arn(&self) -> &::std::option::Option<::std::string::String> {
220 self.inner.get_entitled_application_arn()
221 }
222}
223