aws_sdk_appsync/operation/update_graphql_api/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_graphql_api::_update_graphql_api_output::UpdateGraphqlApiOutputBuilder;
3
4pub use crate::operation::update_graphql_api::_update_graphql_api_input::UpdateGraphqlApiInputBuilder;
5
6impl crate::operation::update_graphql_api::builders::UpdateGraphqlApiInputBuilder {
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::update_graphql_api::UpdateGraphqlApiOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_graphql_api::UpdateGraphqlApiError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_graphql_api();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateGraphqlApi`.
24///
25/// <p>Updates a <code>GraphqlApi</code> object.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateGraphqlApiFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_graphql_api::builders::UpdateGraphqlApiInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_graphql_api::UpdateGraphqlApiOutput,
35        crate::operation::update_graphql_api::UpdateGraphqlApiError,
36    > for UpdateGraphqlApiFluentBuilder
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::update_graphql_api::UpdateGraphqlApiOutput,
44            crate::operation::update_graphql_api::UpdateGraphqlApiError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateGraphqlApiFluentBuilder {
51    /// Creates a new `UpdateGraphqlApiFluentBuilder`.
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 UpdateGraphqlApi as a reference.
60    pub fn as_input(&self) -> &crate::operation::update_graphql_api::builders::UpdateGraphqlApiInputBuilder {
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::update_graphql_api::UpdateGraphqlApiOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::update_graphql_api::UpdateGraphqlApiError,
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::update_graphql_api::UpdateGraphqlApi::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::update_graphql_api::UpdateGraphqlApi::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::update_graphql_api::UpdateGraphqlApiOutput,
97        crate::operation::update_graphql_api::UpdateGraphqlApiError,
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 API ID.</p>
112    pub fn api_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.api_id(input.into());
114        self
115    }
116    /// <p>The API ID.</p>
117    pub fn set_api_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_api_id(input);
119        self
120    }
121    /// <p>The API ID.</p>
122    pub fn get_api_id(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_api_id()
124    }
125    /// <p>The new name for the <code>GraphqlApi</code> object.</p>
126    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.name(input.into());
128        self
129    }
130    /// <p>The new name for the <code>GraphqlApi</code> object.</p>
131    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_name(input);
133        self
134    }
135    /// <p>The new name for the <code>GraphqlApi</code> object.</p>
136    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_name()
138    }
139    /// <p>The Amazon CloudWatch Logs configuration for the <code>GraphqlApi</code> object.</p>
140    pub fn log_config(mut self, input: crate::types::LogConfig) -> Self {
141        self.inner = self.inner.log_config(input);
142        self
143    }
144    /// <p>The Amazon CloudWatch Logs configuration for the <code>GraphqlApi</code> object.</p>
145    pub fn set_log_config(mut self, input: ::std::option::Option<crate::types::LogConfig>) -> Self {
146        self.inner = self.inner.set_log_config(input);
147        self
148    }
149    /// <p>The Amazon CloudWatch Logs configuration for the <code>GraphqlApi</code> object.</p>
150    pub fn get_log_config(&self) -> &::std::option::Option<crate::types::LogConfig> {
151        self.inner.get_log_config()
152    }
153    /// <p>The new authentication type for the <code>GraphqlApi</code> object.</p>
154    pub fn authentication_type(mut self, input: crate::types::AuthenticationType) -> Self {
155        self.inner = self.inner.authentication_type(input);
156        self
157    }
158    /// <p>The new authentication type for the <code>GraphqlApi</code> object.</p>
159    pub fn set_authentication_type(mut self, input: ::std::option::Option<crate::types::AuthenticationType>) -> Self {
160        self.inner = self.inner.set_authentication_type(input);
161        self
162    }
163    /// <p>The new authentication type for the <code>GraphqlApi</code> object.</p>
164    pub fn get_authentication_type(&self) -> &::std::option::Option<crate::types::AuthenticationType> {
165        self.inner.get_authentication_type()
166    }
167    /// <p>The new Amazon Cognito user pool configuration for the <code>~GraphqlApi</code> object.</p>
168    pub fn user_pool_config(mut self, input: crate::types::UserPoolConfig) -> Self {
169        self.inner = self.inner.user_pool_config(input);
170        self
171    }
172    /// <p>The new Amazon Cognito user pool configuration for the <code>~GraphqlApi</code> object.</p>
173    pub fn set_user_pool_config(mut self, input: ::std::option::Option<crate::types::UserPoolConfig>) -> Self {
174        self.inner = self.inner.set_user_pool_config(input);
175        self
176    }
177    /// <p>The new Amazon Cognito user pool configuration for the <code>~GraphqlApi</code> object.</p>
178    pub fn get_user_pool_config(&self) -> &::std::option::Option<crate::types::UserPoolConfig> {
179        self.inner.get_user_pool_config()
180    }
181    /// <p>The OpenID Connect configuration for the <code>GraphqlApi</code> object.</p>
182    pub fn open_id_connect_config(mut self, input: crate::types::OpenIdConnectConfig) -> Self {
183        self.inner = self.inner.open_id_connect_config(input);
184        self
185    }
186    /// <p>The OpenID Connect configuration for the <code>GraphqlApi</code> object.</p>
187    pub fn set_open_id_connect_config(mut self, input: ::std::option::Option<crate::types::OpenIdConnectConfig>) -> Self {
188        self.inner = self.inner.set_open_id_connect_config(input);
189        self
190    }
191    /// <p>The OpenID Connect configuration for the <code>GraphqlApi</code> object.</p>
192    pub fn get_open_id_connect_config(&self) -> &::std::option::Option<crate::types::OpenIdConnectConfig> {
193        self.inner.get_open_id_connect_config()
194    }
195    ///
196    /// Appends an item to `additionalAuthenticationProviders`.
197    ///
198    /// To override the contents of this collection use [`set_additional_authentication_providers`](Self::set_additional_authentication_providers).
199    ///
200    /// <p>A list of additional authentication providers for the <code>GraphqlApi</code> API.</p>
201    pub fn additional_authentication_providers(mut self, input: crate::types::AdditionalAuthenticationProvider) -> Self {
202        self.inner = self.inner.additional_authentication_providers(input);
203        self
204    }
205    /// <p>A list of additional authentication providers for the <code>GraphqlApi</code> API.</p>
206    pub fn set_additional_authentication_providers(
207        mut self,
208        input: ::std::option::Option<::std::vec::Vec<crate::types::AdditionalAuthenticationProvider>>,
209    ) -> Self {
210        self.inner = self.inner.set_additional_authentication_providers(input);
211        self
212    }
213    /// <p>A list of additional authentication providers for the <code>GraphqlApi</code> API.</p>
214    pub fn get_additional_authentication_providers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AdditionalAuthenticationProvider>> {
215        self.inner.get_additional_authentication_providers()
216    }
217    /// <p>A flag indicating whether to use X-Ray tracing for the <code>GraphqlApi</code>.</p>
218    pub fn xray_enabled(mut self, input: bool) -> Self {
219        self.inner = self.inner.xray_enabled(input);
220        self
221    }
222    /// <p>A flag indicating whether to use X-Ray tracing for the <code>GraphqlApi</code>.</p>
223    pub fn set_xray_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
224        self.inner = self.inner.set_xray_enabled(input);
225        self
226    }
227    /// <p>A flag indicating whether to use X-Ray tracing for the <code>GraphqlApi</code>.</p>
228    pub fn get_xray_enabled(&self) -> &::std::option::Option<bool> {
229        self.inner.get_xray_enabled()
230    }
231    /// <p>Configuration for Lambda function authorization.</p>
232    pub fn lambda_authorizer_config(mut self, input: crate::types::LambdaAuthorizerConfig) -> Self {
233        self.inner = self.inner.lambda_authorizer_config(input);
234        self
235    }
236    /// <p>Configuration for Lambda function authorization.</p>
237    pub fn set_lambda_authorizer_config(mut self, input: ::std::option::Option<crate::types::LambdaAuthorizerConfig>) -> Self {
238        self.inner = self.inner.set_lambda_authorizer_config(input);
239        self
240    }
241    /// <p>Configuration for Lambda function authorization.</p>
242    pub fn get_lambda_authorizer_config(&self) -> &::std::option::Option<crate::types::LambdaAuthorizerConfig> {
243        self.inner.get_lambda_authorizer_config()
244    }
245    /// <p>The Identity and Access Management service role ARN for a merged API. The AppSync service assumes this role on behalf of the Merged API to validate access to source APIs at runtime and to prompt the <code>AUTO_MERGE</code> to update the merged API endpoint with the source API changes automatically.</p>
246    pub fn merged_api_execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
247        self.inner = self.inner.merged_api_execution_role_arn(input.into());
248        self
249    }
250    /// <p>The Identity and Access Management service role ARN for a merged API. The AppSync service assumes this role on behalf of the Merged API to validate access to source APIs at runtime and to prompt the <code>AUTO_MERGE</code> to update the merged API endpoint with the source API changes automatically.</p>
251    pub fn set_merged_api_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
252        self.inner = self.inner.set_merged_api_execution_role_arn(input);
253        self
254    }
255    /// <p>The Identity and Access Management service role ARN for a merged API. The AppSync service assumes this role on behalf of the Merged API to validate access to source APIs at runtime and to prompt the <code>AUTO_MERGE</code> to update the merged API endpoint with the source API changes automatically.</p>
256    pub fn get_merged_api_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
257        self.inner.get_merged_api_execution_role_arn()
258    }
259    /// <p>The owner contact information for an API resource.</p>
260    /// <p>This field accepts any string input with a length of 0 - 256 characters.</p>
261    pub fn owner_contact(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
262        self.inner = self.inner.owner_contact(input.into());
263        self
264    }
265    /// <p>The owner contact information for an API resource.</p>
266    /// <p>This field accepts any string input with a length of 0 - 256 characters.</p>
267    pub fn set_owner_contact(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
268        self.inner = self.inner.set_owner_contact(input);
269        self
270    }
271    /// <p>The owner contact information for an API resource.</p>
272    /// <p>This field accepts any string input with a length of 0 - 256 characters.</p>
273    pub fn get_owner_contact(&self) -> &::std::option::Option<::std::string::String> {
274        self.inner.get_owner_contact()
275    }
276    /// <p>Sets the value of the GraphQL API to enable (<code>ENABLED</code>) or disable (<code>DISABLED</code>) introspection. If no value is provided, the introspection configuration will be set to <code>ENABLED</code> by default. This field will produce an error if the operation attempts to use the introspection feature while this field is disabled.</p>
277    /// <p>For more information about introspection, see <a href="https://graphql.org/learn/introspection/">GraphQL introspection</a>.</p>
278    pub fn introspection_config(mut self, input: crate::types::GraphQlApiIntrospectionConfig) -> Self {
279        self.inner = self.inner.introspection_config(input);
280        self
281    }
282    /// <p>Sets the value of the GraphQL API to enable (<code>ENABLED</code>) or disable (<code>DISABLED</code>) introspection. If no value is provided, the introspection configuration will be set to <code>ENABLED</code> by default. This field will produce an error if the operation attempts to use the introspection feature while this field is disabled.</p>
283    /// <p>For more information about introspection, see <a href="https://graphql.org/learn/introspection/">GraphQL introspection</a>.</p>
284    pub fn set_introspection_config(mut self, input: ::std::option::Option<crate::types::GraphQlApiIntrospectionConfig>) -> Self {
285        self.inner = self.inner.set_introspection_config(input);
286        self
287    }
288    /// <p>Sets the value of the GraphQL API to enable (<code>ENABLED</code>) or disable (<code>DISABLED</code>) introspection. If no value is provided, the introspection configuration will be set to <code>ENABLED</code> by default. This field will produce an error if the operation attempts to use the introspection feature while this field is disabled.</p>
289    /// <p>For more information about introspection, see <a href="https://graphql.org/learn/introspection/">GraphQL introspection</a>.</p>
290    pub fn get_introspection_config(&self) -> &::std::option::Option<crate::types::GraphQlApiIntrospectionConfig> {
291        self.inner.get_introspection_config()
292    }
293    /// <p>The maximum depth a query can have in a single request. Depth refers to the amount of nested levels allowed in the body of query. The default value is <code>0</code> (or unspecified), which indicates there's no depth limit. If you set a limit, it can be between <code>1</code> and <code>75</code> nested levels. This field will produce a limit error if the operation falls out of bounds.</p>
294    /// <p>Note that fields can still be set to nullable or non-nullable. If a non-nullable field produces an error, the error will be thrown upwards to the first nullable field available.</p>
295    pub fn query_depth_limit(mut self, input: i32) -> Self {
296        self.inner = self.inner.query_depth_limit(input);
297        self
298    }
299    /// <p>The maximum depth a query can have in a single request. Depth refers to the amount of nested levels allowed in the body of query. The default value is <code>0</code> (or unspecified), which indicates there's no depth limit. If you set a limit, it can be between <code>1</code> and <code>75</code> nested levels. This field will produce a limit error if the operation falls out of bounds.</p>
300    /// <p>Note that fields can still be set to nullable or non-nullable. If a non-nullable field produces an error, the error will be thrown upwards to the first nullable field available.</p>
301    pub fn set_query_depth_limit(mut self, input: ::std::option::Option<i32>) -> Self {
302        self.inner = self.inner.set_query_depth_limit(input);
303        self
304    }
305    /// <p>The maximum depth a query can have in a single request. Depth refers to the amount of nested levels allowed in the body of query. The default value is <code>0</code> (or unspecified), which indicates there's no depth limit. If you set a limit, it can be between <code>1</code> and <code>75</code> nested levels. This field will produce a limit error if the operation falls out of bounds.</p>
306    /// <p>Note that fields can still be set to nullable or non-nullable. If a non-nullable field produces an error, the error will be thrown upwards to the first nullable field available.</p>
307    pub fn get_query_depth_limit(&self) -> &::std::option::Option<i32> {
308        self.inner.get_query_depth_limit()
309    }
310    /// <p>The maximum number of resolvers that can be invoked in a single request. The default value is <code>0</code> (or unspecified), which will set the limit to <code>10000</code>. When specified, the limit value can be between <code>1</code> and <code>10000</code>. This field will produce a limit error if the operation falls out of bounds.</p>
311    pub fn resolver_count_limit(mut self, input: i32) -> Self {
312        self.inner = self.inner.resolver_count_limit(input);
313        self
314    }
315    /// <p>The maximum number of resolvers that can be invoked in a single request. The default value is <code>0</code> (or unspecified), which will set the limit to <code>10000</code>. When specified, the limit value can be between <code>1</code> and <code>10000</code>. This field will produce a limit error if the operation falls out of bounds.</p>
316    pub fn set_resolver_count_limit(mut self, input: ::std::option::Option<i32>) -> Self {
317        self.inner = self.inner.set_resolver_count_limit(input);
318        self
319    }
320    /// <p>The maximum number of resolvers that can be invoked in a single request. The default value is <code>0</code> (or unspecified), which will set the limit to <code>10000</code>. When specified, the limit value can be between <code>1</code> and <code>10000</code>. This field will produce a limit error if the operation falls out of bounds.</p>
321    pub fn get_resolver_count_limit(&self) -> &::std::option::Option<i32> {
322        self.inner.get_resolver_count_limit()
323    }
324    /// <p>The <code>enhancedMetricsConfig</code> object.</p>
325    pub fn enhanced_metrics_config(mut self, input: crate::types::EnhancedMetricsConfig) -> Self {
326        self.inner = self.inner.enhanced_metrics_config(input);
327        self
328    }
329    /// <p>The <code>enhancedMetricsConfig</code> object.</p>
330    pub fn set_enhanced_metrics_config(mut self, input: ::std::option::Option<crate::types::EnhancedMetricsConfig>) -> Self {
331        self.inner = self.inner.set_enhanced_metrics_config(input);
332        self
333    }
334    /// <p>The <code>enhancedMetricsConfig</code> object.</p>
335    pub fn get_enhanced_metrics_config(&self) -> &::std::option::Option<crate::types::EnhancedMetricsConfig> {
336        self.inner.get_enhanced_metrics_config()
337    }
338}