1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_graphql_api::_update_graphql_api_output::UpdateGraphqlApiOutputBuilder;

pub use crate::operation::update_graphql_api::_update_graphql_api_input::UpdateGraphqlApiInputBuilder;

impl UpdateGraphqlApiInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::update_graphql_api::UpdateGraphqlApiOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_graphql_api::UpdateGraphqlApiError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_graphql_api();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateGraphqlApi`.
///
/// <p>Updates a <code>GraphqlApi</code> object.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateGraphqlApiFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_graphql_api::builders::UpdateGraphqlApiInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_graphql_api::UpdateGraphqlApiOutput,
        crate::operation::update_graphql_api::UpdateGraphqlApiError,
    > for UpdateGraphqlApiFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_graphql_api::UpdateGraphqlApiOutput,
            crate::operation::update_graphql_api::UpdateGraphqlApiError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateGraphqlApiFluentBuilder {
    /// Creates a new `UpdateGraphqlApi`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the UpdateGraphqlApi as a reference.
    pub fn as_input(&self) -> &crate::operation::update_graphql_api::builders::UpdateGraphqlApiInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_graphql_api::UpdateGraphqlApiOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_graphql_api::UpdateGraphqlApiError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::update_graphql_api::UpdateGraphqlApi::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_graphql_api::UpdateGraphqlApi::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::update_graphql_api::UpdateGraphqlApiOutput,
        crate::operation::update_graphql_api::UpdateGraphqlApiError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl Into<crate::config::Builder>) -> Self {
        self.set_config_override(Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// <p>The API ID.</p>
    pub fn api_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.api_id(input.into());
        self
    }
    /// <p>The API ID.</p>
    pub fn set_api_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_api_id(input);
        self
    }
    /// <p>The API ID.</p>
    pub fn get_api_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_api_id()
    }
    /// <p>The new name for the <code>GraphqlApi</code> object.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.name(input.into());
        self
    }
    /// <p>The new name for the <code>GraphqlApi</code> object.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_name(input);
        self
    }
    /// <p>The new name for the <code>GraphqlApi</code> object.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_name()
    }
    /// <p>The Amazon CloudWatch Logs configuration for the <code>GraphqlApi</code> object.</p>
    pub fn log_config(mut self, input: crate::types::LogConfig) -> Self {
        self.inner = self.inner.log_config(input);
        self
    }
    /// <p>The Amazon CloudWatch Logs configuration for the <code>GraphqlApi</code> object.</p>
    pub fn set_log_config(mut self, input: ::std::option::Option<crate::types::LogConfig>) -> Self {
        self.inner = self.inner.set_log_config(input);
        self
    }
    /// <p>The Amazon CloudWatch Logs configuration for the <code>GraphqlApi</code> object.</p>
    pub fn get_log_config(&self) -> &::std::option::Option<crate::types::LogConfig> {
        self.inner.get_log_config()
    }
    /// <p>The new authentication type for the <code>GraphqlApi</code> object.</p>
    pub fn authentication_type(mut self, input: crate::types::AuthenticationType) -> Self {
        self.inner = self.inner.authentication_type(input);
        self
    }
    /// <p>The new authentication type for the <code>GraphqlApi</code> object.</p>
    pub fn set_authentication_type(mut self, input: ::std::option::Option<crate::types::AuthenticationType>) -> Self {
        self.inner = self.inner.set_authentication_type(input);
        self
    }
    /// <p>The new authentication type for the <code>GraphqlApi</code> object.</p>
    pub fn get_authentication_type(&self) -> &::std::option::Option<crate::types::AuthenticationType> {
        self.inner.get_authentication_type()
    }
    /// <p>The new Amazon Cognito user pool configuration for the <code>~GraphqlApi</code> object.</p>
    pub fn user_pool_config(mut self, input: crate::types::UserPoolConfig) -> Self {
        self.inner = self.inner.user_pool_config(input);
        self
    }
    /// <p>The new Amazon Cognito user pool configuration for the <code>~GraphqlApi</code> object.</p>
    pub fn set_user_pool_config(mut self, input: ::std::option::Option<crate::types::UserPoolConfig>) -> Self {
        self.inner = self.inner.set_user_pool_config(input);
        self
    }
    /// <p>The new Amazon Cognito user pool configuration for the <code>~GraphqlApi</code> object.</p>
    pub fn get_user_pool_config(&self) -> &::std::option::Option<crate::types::UserPoolConfig> {
        self.inner.get_user_pool_config()
    }
    /// <p>The OpenID Connect configuration for the <code>GraphqlApi</code> object.</p>
    pub fn open_id_connect_config(mut self, input: crate::types::OpenIdConnectConfig) -> Self {
        self.inner = self.inner.open_id_connect_config(input);
        self
    }
    /// <p>The OpenID Connect configuration for the <code>GraphqlApi</code> object.</p>
    pub fn set_open_id_connect_config(mut self, input: ::std::option::Option<crate::types::OpenIdConnectConfig>) -> Self {
        self.inner = self.inner.set_open_id_connect_config(input);
        self
    }
    /// <p>The OpenID Connect configuration for the <code>GraphqlApi</code> object.</p>
    pub fn get_open_id_connect_config(&self) -> &::std::option::Option<crate::types::OpenIdConnectConfig> {
        self.inner.get_open_id_connect_config()
    }
    /// Appends an item to `additionalAuthenticationProviders`.
    ///
    /// To override the contents of this collection use [`set_additional_authentication_providers`](Self::set_additional_authentication_providers).
    ///
    /// <p>A list of additional authentication providers for the <code>GraphqlApi</code> API.</p>
    pub fn additional_authentication_providers(mut self, input: crate::types::AdditionalAuthenticationProvider) -> Self {
        self.inner = self.inner.additional_authentication_providers(input);
        self
    }
    /// <p>A list of additional authentication providers for the <code>GraphqlApi</code> API.</p>
    pub fn set_additional_authentication_providers(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::AdditionalAuthenticationProvider>>,
    ) -> Self {
        self.inner = self.inner.set_additional_authentication_providers(input);
        self
    }
    /// <p>A list of additional authentication providers for the <code>GraphqlApi</code> API.</p>
    pub fn get_additional_authentication_providers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AdditionalAuthenticationProvider>> {
        self.inner.get_additional_authentication_providers()
    }
    /// <p>A flag indicating whether to use X-Ray tracing for the <code>GraphqlApi</code>.</p>
    pub fn xray_enabled(mut self, input: bool) -> Self {
        self.inner = self.inner.xray_enabled(input);
        self
    }
    /// <p>A flag indicating whether to use X-Ray tracing for the <code>GraphqlApi</code>.</p>
    pub fn set_xray_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_xray_enabled(input);
        self
    }
    /// <p>A flag indicating whether to use X-Ray tracing for the <code>GraphqlApi</code>.</p>
    pub fn get_xray_enabled(&self) -> &::std::option::Option<bool> {
        self.inner.get_xray_enabled()
    }
    /// <p>Configuration for Lambda function authorization.</p>
    pub fn lambda_authorizer_config(mut self, input: crate::types::LambdaAuthorizerConfig) -> Self {
        self.inner = self.inner.lambda_authorizer_config(input);
        self
    }
    /// <p>Configuration for Lambda function authorization.</p>
    pub fn set_lambda_authorizer_config(mut self, input: ::std::option::Option<crate::types::LambdaAuthorizerConfig>) -> Self {
        self.inner = self.inner.set_lambda_authorizer_config(input);
        self
    }
    /// <p>Configuration for Lambda function authorization.</p>
    pub fn get_lambda_authorizer_config(&self) -> &::std::option::Option<crate::types::LambdaAuthorizerConfig> {
        self.inner.get_lambda_authorizer_config()
    }
    /// <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>
    pub fn merged_api_execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.merged_api_execution_role_arn(input.into());
        self
    }
    /// <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>
    pub fn set_merged_api_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_merged_api_execution_role_arn(input);
        self
    }
    /// <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>
    pub fn get_merged_api_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_merged_api_execution_role_arn()
    }
    /// <p>The owner contact information for an API resource.</p>
    /// <p>This field accepts any string input with a length of 0 - 256 characters.</p>
    pub fn owner_contact(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.owner_contact(input.into());
        self
    }
    /// <p>The owner contact information for an API resource.</p>
    /// <p>This field accepts any string input with a length of 0 - 256 characters.</p>
    pub fn set_owner_contact(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_owner_contact(input);
        self
    }
    /// <p>The owner contact information for an API resource.</p>
    /// <p>This field accepts any string input with a length of 0 - 256 characters.</p>
    pub fn get_owner_contact(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_owner_contact()
    }
    /// <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>
    /// <p>For more information about introspection, see <a href="https://graphql.org/learn/introspection/">GraphQL introspection</a>.</p>
    pub fn introspection_config(mut self, input: crate::types::GraphQlApiIntrospectionConfig) -> Self {
        self.inner = self.inner.introspection_config(input);
        self
    }
    /// <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>
    /// <p>For more information about introspection, see <a href="https://graphql.org/learn/introspection/">GraphQL introspection</a>.</p>
    pub fn set_introspection_config(mut self, input: ::std::option::Option<crate::types::GraphQlApiIntrospectionConfig>) -> Self {
        self.inner = self.inner.set_introspection_config(input);
        self
    }
    /// <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>
    /// <p>For more information about introspection, see <a href="https://graphql.org/learn/introspection/">GraphQL introspection</a>.</p>
    pub fn get_introspection_config(&self) -> &::std::option::Option<crate::types::GraphQlApiIntrospectionConfig> {
        self.inner.get_introspection_config()
    }
    /// <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>
    /// <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>
    pub fn query_depth_limit(mut self, input: i32) -> Self {
        self.inner = self.inner.query_depth_limit(input);
        self
    }
    /// <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>
    /// <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>
    pub fn set_query_depth_limit(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_query_depth_limit(input);
        self
    }
    /// <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>
    /// <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>
    pub fn get_query_depth_limit(&self) -> &::std::option::Option<i32> {
        self.inner.get_query_depth_limit()
    }
    /// <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>
    pub fn resolver_count_limit(mut self, input: i32) -> Self {
        self.inner = self.inner.resolver_count_limit(input);
        self
    }
    /// <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>
    pub fn set_resolver_count_limit(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_resolver_count_limit(input);
        self
    }
    /// <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>
    pub fn get_resolver_count_limit(&self) -> &::std::option::Option<i32> {
        self.inner.get_resolver_count_limit()
    }
}