aws_sdk_appfabric/operation/create_app_authorization/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_app_authorization::_create_app_authorization_output::CreateAppAuthorizationOutputBuilder;
3
4pub use crate::operation::create_app_authorization::_create_app_authorization_input::CreateAppAuthorizationInputBuilder;
5
6impl crate::operation::create_app_authorization::builders::CreateAppAuthorizationInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::create_app_authorization::CreateAppAuthorizationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_app_authorization::CreateAppAuthorizationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_app_authorization();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateAppAuthorization`.
24///
25/// <p>Creates an app authorization within an app bundle, which allows AppFabric to connect to an application.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateAppAuthorizationFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::create_app_authorization::builders::CreateAppAuthorizationInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::create_app_authorization::CreateAppAuthorizationOutput,
35        crate::operation::create_app_authorization::CreateAppAuthorizationError,
36    > for CreateAppAuthorizationFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::create_app_authorization::CreateAppAuthorizationOutput,
44            crate::operation::create_app_authorization::CreateAppAuthorizationError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl CreateAppAuthorizationFluentBuilder {
51    /// Creates a new `CreateAppAuthorizationFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the CreateAppAuthorization as a reference.
60    pub fn as_input(&self) -> &crate::operation::create_app_authorization::builders::CreateAppAuthorizationInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::create_app_authorization::CreateAppAuthorizationOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::create_app_authorization::CreateAppAuthorizationError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::create_app_authorization::CreateAppAuthorization::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::create_app_authorization::CreateAppAuthorization::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::create_app_authorization::CreateAppAuthorizationOutput,
97        crate::operation::create_app_authorization::CreateAppAuthorizationError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    /// <p>The Amazon Resource Name (ARN) or Universal Unique Identifier (UUID) of the app bundle to use for the request.</p>
112    pub fn app_bundle_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.app_bundle_identifier(input.into());
114        self
115    }
116    /// <p>The Amazon Resource Name (ARN) or Universal Unique Identifier (UUID) of the app bundle to use for the request.</p>
117    pub fn set_app_bundle_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_app_bundle_identifier(input);
119        self
120    }
121    /// <p>The Amazon Resource Name (ARN) or Universal Unique Identifier (UUID) of the app bundle to use for the request.</p>
122    pub fn get_app_bundle_identifier(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_app_bundle_identifier()
124    }
125    /// <p>The name of the application.</p>
126    /// <p>Valid values are:</p>
127    /// <ul>
128    /// <li>
129    /// <p><code>SLACK</code></p></li>
130    /// <li>
131    /// <p><code>ASANA</code></p></li>
132    /// <li>
133    /// <p><code>JIRA</code></p></li>
134    /// <li>
135    /// <p><code>M365</code></p></li>
136    /// <li>
137    /// <p><code>M365AUDITLOGS</code></p></li>
138    /// <li>
139    /// <p><code>ZOOM</code></p></li>
140    /// <li>
141    /// <p><code>ZENDESK</code></p></li>
142    /// <li>
143    /// <p><code>OKTA</code></p></li>
144    /// <li>
145    /// <p><code>GOOGLE</code></p></li>
146    /// <li>
147    /// <p><code>DROPBOX</code></p></li>
148    /// <li>
149    /// <p><code>SMARTSHEET</code></p></li>
150    /// <li>
151    /// <p><code>CISCO</code></p></li>
152    /// </ul>
153    pub fn app(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154        self.inner = self.inner.app(input.into());
155        self
156    }
157    /// <p>The name of the application.</p>
158    /// <p>Valid values are:</p>
159    /// <ul>
160    /// <li>
161    /// <p><code>SLACK</code></p></li>
162    /// <li>
163    /// <p><code>ASANA</code></p></li>
164    /// <li>
165    /// <p><code>JIRA</code></p></li>
166    /// <li>
167    /// <p><code>M365</code></p></li>
168    /// <li>
169    /// <p><code>M365AUDITLOGS</code></p></li>
170    /// <li>
171    /// <p><code>ZOOM</code></p></li>
172    /// <li>
173    /// <p><code>ZENDESK</code></p></li>
174    /// <li>
175    /// <p><code>OKTA</code></p></li>
176    /// <li>
177    /// <p><code>GOOGLE</code></p></li>
178    /// <li>
179    /// <p><code>DROPBOX</code></p></li>
180    /// <li>
181    /// <p><code>SMARTSHEET</code></p></li>
182    /// <li>
183    /// <p><code>CISCO</code></p></li>
184    /// </ul>
185    pub fn set_app(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
186        self.inner = self.inner.set_app(input);
187        self
188    }
189    /// <p>The name of the application.</p>
190    /// <p>Valid values are:</p>
191    /// <ul>
192    /// <li>
193    /// <p><code>SLACK</code></p></li>
194    /// <li>
195    /// <p><code>ASANA</code></p></li>
196    /// <li>
197    /// <p><code>JIRA</code></p></li>
198    /// <li>
199    /// <p><code>M365</code></p></li>
200    /// <li>
201    /// <p><code>M365AUDITLOGS</code></p></li>
202    /// <li>
203    /// <p><code>ZOOM</code></p></li>
204    /// <li>
205    /// <p><code>ZENDESK</code></p></li>
206    /// <li>
207    /// <p><code>OKTA</code></p></li>
208    /// <li>
209    /// <p><code>GOOGLE</code></p></li>
210    /// <li>
211    /// <p><code>DROPBOX</code></p></li>
212    /// <li>
213    /// <p><code>SMARTSHEET</code></p></li>
214    /// <li>
215    /// <p><code>CISCO</code></p></li>
216    /// </ul>
217    pub fn get_app(&self) -> &::std::option::Option<::std::string::String> {
218        self.inner.get_app()
219    }
220    /// <p>Contains credentials for the application, such as an API key or OAuth2 client ID and secret.</p>
221    /// <p>Specify credentials that match the authorization type for your request. For example, if the authorization type for your request is OAuth2 (<code>oauth2</code>), then you should provide only the OAuth2 credentials.</p>
222    pub fn credential(mut self, input: crate::types::Credential) -> Self {
223        self.inner = self.inner.credential(input);
224        self
225    }
226    /// <p>Contains credentials for the application, such as an API key or OAuth2 client ID and secret.</p>
227    /// <p>Specify credentials that match the authorization type for your request. For example, if the authorization type for your request is OAuth2 (<code>oauth2</code>), then you should provide only the OAuth2 credentials.</p>
228    pub fn set_credential(mut self, input: ::std::option::Option<crate::types::Credential>) -> Self {
229        self.inner = self.inner.set_credential(input);
230        self
231    }
232    /// <p>Contains credentials for the application, such as an API key or OAuth2 client ID and secret.</p>
233    /// <p>Specify credentials that match the authorization type for your request. For example, if the authorization type for your request is OAuth2 (<code>oauth2</code>), then you should provide only the OAuth2 credentials.</p>
234    pub fn get_credential(&self) -> &::std::option::Option<crate::types::Credential> {
235        self.inner.get_credential()
236    }
237    /// <p>Contains information about an application tenant, such as the application display name and identifier.</p>
238    pub fn tenant(mut self, input: crate::types::Tenant) -> Self {
239        self.inner = self.inner.tenant(input);
240        self
241    }
242    /// <p>Contains information about an application tenant, such as the application display name and identifier.</p>
243    pub fn set_tenant(mut self, input: ::std::option::Option<crate::types::Tenant>) -> Self {
244        self.inner = self.inner.set_tenant(input);
245        self
246    }
247    /// <p>Contains information about an application tenant, such as the application display name and identifier.</p>
248    pub fn get_tenant(&self) -> &::std::option::Option<crate::types::Tenant> {
249        self.inner.get_tenant()
250    }
251    /// <p>The authorization type for the app authorization.</p>
252    pub fn auth_type(mut self, input: crate::types::AuthType) -> Self {
253        self.inner = self.inner.auth_type(input);
254        self
255    }
256    /// <p>The authorization type for the app authorization.</p>
257    pub fn set_auth_type(mut self, input: ::std::option::Option<crate::types::AuthType>) -> Self {
258        self.inner = self.inner.set_auth_type(input);
259        self
260    }
261    /// <p>The authorization type for the app authorization.</p>
262    pub fn get_auth_type(&self) -> &::std::option::Option<crate::types::AuthType> {
263        self.inner.get_auth_type()
264    }
265    /// <p>Specifies a unique, case-sensitive identifier 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>
266    /// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
267    /// <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>
268    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
269        self.inner = self.inner.client_token(input.into());
270        self
271    }
272    /// <p>Specifies a unique, case-sensitive identifier 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>
273    /// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
274    /// <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>
275    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
276        self.inner = self.inner.set_client_token(input);
277        self
278    }
279    /// <p>Specifies a unique, case-sensitive identifier 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>
280    /// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
281    /// <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>
282    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
283        self.inner.get_client_token()
284    }
285    ///
286    /// Appends an item to `tags`.
287    ///
288    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
289    ///
290    /// <p>A map of the key-value pairs of the tag or tags to assign to the resource.</p>
291    pub fn tags(mut self, input: crate::types::Tag) -> Self {
292        self.inner = self.inner.tags(input);
293        self
294    }
295    /// <p>A map of the key-value pairs of the tag or tags to assign to the resource.</p>
296    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
297        self.inner = self.inner.set_tags(input);
298        self
299    }
300    /// <p>A map of the key-value pairs of the tag or tags to assign to the resource.</p>
301    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
302        self.inner.get_tags()
303    }
304}