rusoto_appsync/
generated.rs

1// =================================================================
2//
3//                           * WARNING *
4//
5//                    This file is generated!
6//
7//  Changes made to this file will be overwritten. If changes are
8//  required to the generated code, the service_crategen project
9//  must be updated to generate the changes.
10//
11// =================================================================
12
13use std::error::Error;
14use std::fmt;
15
16use async_trait::async_trait;
17use rusoto_core::credential::ProvideAwsCredentials;
18use rusoto_core::region;
19use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
20use rusoto_core::{Client, RusotoError};
21
22use rusoto_core::param::{Params, ServiceParams};
23use rusoto_core::proto;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27use serde_json;
28/// <p>Describes an additional authentication provider.</p>
29#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
30pub struct AdditionalAuthenticationProvider {
31    /// <p>The authentication type: API key, AWS IAM, OIDC, or Amazon Cognito user pools.</p>
32    #[serde(rename = "authenticationType")]
33    #[serde(skip_serializing_if = "Option::is_none")]
34    pub authentication_type: Option<String>,
35    /// <p>The OpenID Connect configuration.</p>
36    #[serde(rename = "openIDConnectConfig")]
37    #[serde(skip_serializing_if = "Option::is_none")]
38    pub open_id_connect_config: Option<OpenIDConnectConfig>,
39    /// <p>The Amazon Cognito user pool configuration.</p>
40    #[serde(rename = "userPoolConfig")]
41    #[serde(skip_serializing_if = "Option::is_none")]
42    pub user_pool_config: Option<CognitoUserPoolConfig>,
43}
44
45/// <p>The <code>ApiCache</code> object.</p>
46#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
47#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
48pub struct ApiCache {
49    /// <p><p>Caching behavior.</p> <ul> <li> <p> <b>FULL<em>REQUEST</em>CACHING</b>: All requests are fully cached.</p> </li> <li> <p> <b>PER<em>RESOLVER</em>CACHING</b>: Individual resolvers that you specify are cached.</p> </li> </ul></p>
50    #[serde(rename = "apiCachingBehavior")]
51    #[serde(skip_serializing_if = "Option::is_none")]
52    pub api_caching_behavior: Option<String>,
53    /// <p>At rest encryption flag for cache. This setting cannot be updated after creation.</p>
54    #[serde(rename = "atRestEncryptionEnabled")]
55    #[serde(skip_serializing_if = "Option::is_none")]
56    pub at_rest_encryption_enabled: Option<bool>,
57    /// <p><p>The cache instance status.</p> <ul> <li> <p> <b>AVAILABLE</b>: The instance is available for use.</p> </li> <li> <p> <b>CREATING</b>: The instance is currently creating.</p> </li> <li> <p> <b>DELETING</b>: The instance is currently deleting.</p> </li> <li> <p> <b>MODIFYING</b>: The instance is currently modifying.</p> </li> <li> <p> <b>FAILED</b>: The instance has failed creation.</p> </li> </ul></p>
58    #[serde(rename = "status")]
59    #[serde(skip_serializing_if = "Option::is_none")]
60    pub status: Option<String>,
61    /// <p>Transit encryption flag when connecting to cache. This setting cannot be updated after creation.</p>
62    #[serde(rename = "transitEncryptionEnabled")]
63    #[serde(skip_serializing_if = "Option::is_none")]
64    pub transit_encryption_enabled: Option<bool>,
65    /// <p>TTL in seconds for cache entries.</p> <p>Valid values are between 1 and 3600 seconds.</p>
66    #[serde(rename = "ttl")]
67    #[serde(skip_serializing_if = "Option::is_none")]
68    pub ttl: Option<i64>,
69    /// <p><p>The cache instance type. Valid values are </p> <ul> <li> <p> <code>SMALL</code> </p> </li> <li> <p> <code>MEDIUM</code> </p> </li> <li> <p> <code>LARGE</code> </p> </li> <li> <p> <code>XLARGE</code> </p> </li> <li> <p> <code>LARGE<em>2X</code> </p> </li> <li> <p> <code>LARGE</em>4X</code> </p> </li> <li> <p> <code>LARGE<em>8X</code> (not available in all regions)</p> </li> <li> <p> <code>LARGE</em>12X</code> </p> </li> </ul> <p>Historically, instance types were identified by an EC2-style value. As of July 2020, this is deprecated, and the generic identifiers above should be used.</p> <p>The following legacy instance types are available, but their use is discouraged:</p> <ul> <li> <p> <b>T2<em>SMALL</b>: A t2.small instance type.</p> </li> <li> <p> <b>T2</em>MEDIUM</b>: A t2.medium instance type.</p> </li> <li> <p> <b>R4<em>LARGE</b>: A r4.large instance type.</p> </li> <li> <p> <b>R4</em>XLARGE</b>: A r4.xlarge instance type.</p> </li> <li> <p> <b>R4<em>2XLARGE</b>: A r4.2xlarge instance type.</p> </li> <li> <p> <b>R4</em>4XLARGE</b>: A r4.4xlarge instance type.</p> </li> <li> <p> <b>R4_8XLARGE</b>: A r4.8xlarge instance type.</p> </li> </ul></p>
70    #[serde(rename = "type")]
71    #[serde(skip_serializing_if = "Option::is_none")]
72    pub type_: Option<String>,
73}
74
75/// <p><p>Describes an API key.</p> <p>Customers invoke AWS AppSync GraphQL API operations with API keys as an identity mechanism. There are two key versions:</p> <p> <b>da1</b>: This version was introduced at launch in November 2017. These keys always expire after 7 days. Key expiration is managed by Amazon DynamoDB TTL. The keys ceased to be valid after February 21, 2018 and should not be used after that date.</p> <ul> <li> <p> <code>ListApiKeys</code> returns the expiration time in milliseconds.</p> </li> <li> <p> <code>CreateApiKey</code> returns the expiration time in milliseconds.</p> </li> <li> <p> <code>UpdateApiKey</code> is not available for this key version.</p> </li> <li> <p> <code>DeleteApiKey</code> deletes the item from the table.</p> </li> <li> <p>Expiration is stored in Amazon DynamoDB as milliseconds. This results in a bug where keys are not automatically deleted because DynamoDB expects the TTL to be stored in seconds. As a one-time action, we will delete these keys from the table after February 21, 2018.</p> </li> </ul> <p> <b>da2</b>: This version was introduced in February 2018 when AppSync added support to extend key expiration.</p> <ul> <li> <p> <code>ListApiKeys</code> returns the expiration time and deletion time in seconds.</p> </li> <li> <p> <code>CreateApiKey</code> returns the expiration time and deletion time in seconds and accepts a user-provided expiration time in seconds.</p> </li> <li> <p> <code>UpdateApiKey</code> returns the expiration time and and deletion time in seconds and accepts a user-provided expiration time in seconds. Expired API keys are kept for 60 days after the expiration time. Key expiration time can be updated while the key is not deleted. </p> </li> <li> <p> <code>DeleteApiKey</code> deletes the item from the table.</p> </li> <li> <p>Expiration is stored in Amazon DynamoDB as seconds. After the expiration time, using the key to authenticate will fail. But the key can be reinstated before deletion.</p> </li> <li> <p>Deletion is stored in Amazon DynamoDB as seconds. The key will be deleted after deletion time. </p> </li> </ul></p>
76#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
77#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
78pub struct ApiKey {
79    /// <p>The time after which the API key is deleted. The date is represented as seconds since the epoch, rounded down to the nearest hour.</p>
80    #[serde(rename = "deletes")]
81    #[serde(skip_serializing_if = "Option::is_none")]
82    pub deletes: Option<i64>,
83    /// <p>A description of the purpose of the API key.</p>
84    #[serde(rename = "description")]
85    #[serde(skip_serializing_if = "Option::is_none")]
86    pub description: Option<String>,
87    /// <p>The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.</p>
88    #[serde(rename = "expires")]
89    #[serde(skip_serializing_if = "Option::is_none")]
90    pub expires: Option<i64>,
91    /// <p>The API key ID.</p>
92    #[serde(rename = "id")]
93    #[serde(skip_serializing_if = "Option::is_none")]
94    pub id: Option<String>,
95}
96
97/// <p>The authorization config in case the HTTP endpoint requires authorization.</p>
98#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
99pub struct AuthorizationConfig {
100    /// <p><p>The authorization type required by the HTTP endpoint.</p> <ul> <li> <p> <b>AWS_IAM</b>: The authorization type is Sigv4.</p> </li> </ul></p>
101    #[serde(rename = "authorizationType")]
102    pub authorization_type: String,
103    /// <p>The AWS IAM settings.</p>
104    #[serde(rename = "awsIamConfig")]
105    #[serde(skip_serializing_if = "Option::is_none")]
106    pub aws_iam_config: Option<AwsIamConfig>,
107}
108
109/// <p>The AWS IAM configuration.</p>
110#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
111pub struct AwsIamConfig {
112    /// <p>The signing region for AWS IAM authorization.</p>
113    #[serde(rename = "signingRegion")]
114    #[serde(skip_serializing_if = "Option::is_none")]
115    pub signing_region: Option<String>,
116    /// <p>The signing service name for AWS IAM authorization.</p>
117    #[serde(rename = "signingServiceName")]
118    #[serde(skip_serializing_if = "Option::is_none")]
119    pub signing_service_name: Option<String>,
120}
121
122/// <p>The caching configuration for a resolver that has caching enabled.</p>
123#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
124pub struct CachingConfig {
125    /// <p>The caching keys for a resolver that has caching enabled.</p> <p>Valid values are entries from the <code>$context.arguments</code>, <code>$context.source</code>, and <code>$context.identity</code> maps.</p>
126    #[serde(rename = "cachingKeys")]
127    #[serde(skip_serializing_if = "Option::is_none")]
128    pub caching_keys: Option<Vec<String>>,
129    /// <p>The TTL in seconds for a resolver that has caching enabled.</p> <p>Valid values are between 1 and 3600 seconds.</p>
130    #[serde(rename = "ttl")]
131    #[serde(skip_serializing_if = "Option::is_none")]
132    pub ttl: Option<i64>,
133}
134
135/// <p>Describes an Amazon Cognito user pool configuration.</p>
136#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
137pub struct CognitoUserPoolConfig {
138    /// <p>A regular expression for validating the incoming Amazon Cognito user pool app client ID.</p>
139    #[serde(rename = "appIdClientRegex")]
140    #[serde(skip_serializing_if = "Option::is_none")]
141    pub app_id_client_regex: Option<String>,
142    /// <p>The AWS Region in which the user pool was created.</p>
143    #[serde(rename = "awsRegion")]
144    pub aws_region: String,
145    /// <p>The user pool ID.</p>
146    #[serde(rename = "userPoolId")]
147    pub user_pool_id: String,
148}
149
150/// <p>Represents the input of a <code>CreateApiCache</code> operation.</p>
151#[derive(Clone, Debug, Default, PartialEq, Serialize)]
152#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
153pub struct CreateApiCacheRequest {
154    /// <p><p>Caching behavior.</p> <ul> <li> <p> <b>FULL<em>REQUEST</em>CACHING</b>: All requests are fully cached.</p> </li> <li> <p> <b>PER<em>RESOLVER</em>CACHING</b>: Individual resolvers that you specify are cached.</p> </li> </ul></p>
155    #[serde(rename = "apiCachingBehavior")]
156    pub api_caching_behavior: String,
157    /// <p>The GraphQL API Id.</p>
158    #[serde(rename = "apiId")]
159    pub api_id: String,
160    /// <p>At rest encryption flag for cache. This setting cannot be updated after creation.</p>
161    #[serde(rename = "atRestEncryptionEnabled")]
162    #[serde(skip_serializing_if = "Option::is_none")]
163    pub at_rest_encryption_enabled: Option<bool>,
164    /// <p>Transit encryption flag when connecting to cache. This setting cannot be updated after creation.</p>
165    #[serde(rename = "transitEncryptionEnabled")]
166    #[serde(skip_serializing_if = "Option::is_none")]
167    pub transit_encryption_enabled: Option<bool>,
168    /// <p>TTL in seconds for cache entries.</p> <p>Valid values are between 1 and 3600 seconds.</p>
169    #[serde(rename = "ttl")]
170    pub ttl: i64,
171    /// <p><p>The cache instance type. Valid values are </p> <ul> <li> <p> <code>SMALL</code> </p> </li> <li> <p> <code>MEDIUM</code> </p> </li> <li> <p> <code>LARGE</code> </p> </li> <li> <p> <code>XLARGE</code> </p> </li> <li> <p> <code>LARGE<em>2X</code> </p> </li> <li> <p> <code>LARGE</em>4X</code> </p> </li> <li> <p> <code>LARGE<em>8X</code> (not available in all regions)</p> </li> <li> <p> <code>LARGE</em>12X</code> </p> </li> </ul> <p>Historically, instance types were identified by an EC2-style value. As of July 2020, this is deprecated, and the generic identifiers above should be used.</p> <p>The following legacy instance types are available, but their use is discouraged:</p> <ul> <li> <p> <b>T2<em>SMALL</b>: A t2.small instance type.</p> </li> <li> <p> <b>T2</em>MEDIUM</b>: A t2.medium instance type.</p> </li> <li> <p> <b>R4<em>LARGE</b>: A r4.large instance type.</p> </li> <li> <p> <b>R4</em>XLARGE</b>: A r4.xlarge instance type.</p> </li> <li> <p> <b>R4<em>2XLARGE</b>: A r4.2xlarge instance type.</p> </li> <li> <p> <b>R4</em>4XLARGE</b>: A r4.4xlarge instance type.</p> </li> <li> <p> <b>R4_8XLARGE</b>: A r4.8xlarge instance type.</p> </li> </ul></p>
172    #[serde(rename = "type")]
173    pub type_: String,
174}
175
176/// <p>Represents the output of a <code>CreateApiCache</code> operation.</p>
177#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
178#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
179pub struct CreateApiCacheResponse {
180    /// <p>The <code>ApiCache</code> object.</p>
181    #[serde(rename = "apiCache")]
182    #[serde(skip_serializing_if = "Option::is_none")]
183    pub api_cache: Option<ApiCache>,
184}
185
186#[derive(Clone, Debug, Default, PartialEq, Serialize)]
187#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
188pub struct CreateApiKeyRequest {
189    /// <p>The ID for your GraphQL API.</p>
190    #[serde(rename = "apiId")]
191    pub api_id: String,
192    /// <p>A description of the purpose of the API key.</p>
193    #[serde(rename = "description")]
194    #[serde(skip_serializing_if = "Option::is_none")]
195    pub description: Option<String>,
196    /// <p>The time from creation time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour. The default value for this parameter is 7 days from creation time. For more information, see .</p>
197    #[serde(rename = "expires")]
198    #[serde(skip_serializing_if = "Option::is_none")]
199    pub expires: Option<i64>,
200}
201
202#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
203#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
204pub struct CreateApiKeyResponse {
205    /// <p>The API key.</p>
206    #[serde(rename = "apiKey")]
207    #[serde(skip_serializing_if = "Option::is_none")]
208    pub api_key: Option<ApiKey>,
209}
210
211#[derive(Clone, Debug, Default, PartialEq, Serialize)]
212#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
213pub struct CreateDataSourceRequest {
214    /// <p>The API ID for the GraphQL API for the <code>DataSource</code>.</p>
215    #[serde(rename = "apiId")]
216    pub api_id: String,
217    /// <p>A description of the <code>DataSource</code>.</p>
218    #[serde(rename = "description")]
219    #[serde(skip_serializing_if = "Option::is_none")]
220    pub description: Option<String>,
221    /// <p>Amazon DynamoDB settings.</p>
222    #[serde(rename = "dynamodbConfig")]
223    #[serde(skip_serializing_if = "Option::is_none")]
224    pub dynamodb_config: Option<DynamodbDataSourceConfig>,
225    /// <p>Amazon Elasticsearch Service settings.</p>
226    #[serde(rename = "elasticsearchConfig")]
227    #[serde(skip_serializing_if = "Option::is_none")]
228    pub elasticsearch_config: Option<ElasticsearchDataSourceConfig>,
229    /// <p>HTTP endpoint settings.</p>
230    #[serde(rename = "httpConfig")]
231    #[serde(skip_serializing_if = "Option::is_none")]
232    pub http_config: Option<HttpDataSourceConfig>,
233    /// <p>AWS Lambda settings.</p>
234    #[serde(rename = "lambdaConfig")]
235    #[serde(skip_serializing_if = "Option::is_none")]
236    pub lambda_config: Option<LambdaDataSourceConfig>,
237    /// <p>A user-supplied name for the <code>DataSource</code>.</p>
238    #[serde(rename = "name")]
239    pub name: String,
240    /// <p>Relational database settings.</p>
241    #[serde(rename = "relationalDatabaseConfig")]
242    #[serde(skip_serializing_if = "Option::is_none")]
243    pub relational_database_config: Option<RelationalDatabaseDataSourceConfig>,
244    /// <p>The AWS IAM service role ARN for the data source. The system assumes this role when accessing the data source.</p>
245    #[serde(rename = "serviceRoleArn")]
246    #[serde(skip_serializing_if = "Option::is_none")]
247    pub service_role_arn: Option<String>,
248    /// <p>The type of the <code>DataSource</code>.</p>
249    #[serde(rename = "type")]
250    pub type_: String,
251}
252
253#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
254#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
255pub struct CreateDataSourceResponse {
256    /// <p>The <code>DataSource</code> object.</p>
257    #[serde(rename = "dataSource")]
258    #[serde(skip_serializing_if = "Option::is_none")]
259    pub data_source: Option<DataSource>,
260}
261
262#[derive(Clone, Debug, Default, PartialEq, Serialize)]
263#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
264pub struct CreateFunctionRequest {
265    /// <p>The GraphQL API ID.</p>
266    #[serde(rename = "apiId")]
267    pub api_id: String,
268    /// <p>The <code>Function</code> <code>DataSource</code> name.</p>
269    #[serde(rename = "dataSourceName")]
270    pub data_source_name: String,
271    /// <p>The <code>Function</code> description.</p>
272    #[serde(rename = "description")]
273    #[serde(skip_serializing_if = "Option::is_none")]
274    pub description: Option<String>,
275    /// <p>The <code>version</code> of the request mapping template. Currently the supported value is 2018-05-29. </p>
276    #[serde(rename = "functionVersion")]
277    pub function_version: String,
278    /// <p>The <code>Function</code> name. The function name does not have to be unique.</p>
279    #[serde(rename = "name")]
280    pub name: String,
281    /// <p>The <code>Function</code> request mapping template. Functions support only the 2018-05-29 version of the request mapping template.</p>
282    #[serde(rename = "requestMappingTemplate")]
283    #[serde(skip_serializing_if = "Option::is_none")]
284    pub request_mapping_template: Option<String>,
285    /// <p>The <code>Function</code> response mapping template. </p>
286    #[serde(rename = "responseMappingTemplate")]
287    #[serde(skip_serializing_if = "Option::is_none")]
288    pub response_mapping_template: Option<String>,
289    #[serde(rename = "syncConfig")]
290    #[serde(skip_serializing_if = "Option::is_none")]
291    pub sync_config: Option<SyncConfig>,
292}
293
294#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
295#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
296pub struct CreateFunctionResponse {
297    /// <p>The <code>Function</code> object.</p>
298    #[serde(rename = "functionConfiguration")]
299    #[serde(skip_serializing_if = "Option::is_none")]
300    pub function_configuration: Option<FunctionConfiguration>,
301}
302
303#[derive(Clone, Debug, Default, PartialEq, Serialize)]
304#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
305pub struct CreateGraphqlApiRequest {
306    /// <p>A list of additional authentication providers for the <code>GraphqlApi</code> API.</p>
307    #[serde(rename = "additionalAuthenticationProviders")]
308    #[serde(skip_serializing_if = "Option::is_none")]
309    pub additional_authentication_providers: Option<Vec<AdditionalAuthenticationProvider>>,
310    /// <p>The authentication type: API key, AWS IAM, OIDC, or Amazon Cognito user pools.</p>
311    #[serde(rename = "authenticationType")]
312    pub authentication_type: String,
313    /// <p>The Amazon CloudWatch Logs configuration.</p>
314    #[serde(rename = "logConfig")]
315    #[serde(skip_serializing_if = "Option::is_none")]
316    pub log_config: Option<LogConfig>,
317    /// <p>A user-supplied name for the <code>GraphqlApi</code>.</p>
318    #[serde(rename = "name")]
319    pub name: String,
320    /// <p>The OpenID Connect configuration.</p>
321    #[serde(rename = "openIDConnectConfig")]
322    #[serde(skip_serializing_if = "Option::is_none")]
323    pub open_id_connect_config: Option<OpenIDConnectConfig>,
324    /// <p>A <code>TagMap</code> object.</p>
325    #[serde(rename = "tags")]
326    #[serde(skip_serializing_if = "Option::is_none")]
327    pub tags: Option<::std::collections::HashMap<String, String>>,
328    /// <p>The Amazon Cognito user pool configuration.</p>
329    #[serde(rename = "userPoolConfig")]
330    #[serde(skip_serializing_if = "Option::is_none")]
331    pub user_pool_config: Option<UserPoolConfig>,
332    /// <p>A flag indicating whether to enable X-Ray tracing for the <code>GraphqlApi</code>.</p>
333    #[serde(rename = "xrayEnabled")]
334    #[serde(skip_serializing_if = "Option::is_none")]
335    pub xray_enabled: Option<bool>,
336}
337
338#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
339#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
340pub struct CreateGraphqlApiResponse {
341    /// <p>The <code>GraphqlApi</code>.</p>
342    #[serde(rename = "graphqlApi")]
343    #[serde(skip_serializing_if = "Option::is_none")]
344    pub graphql_api: Option<GraphqlApi>,
345}
346
347#[derive(Clone, Debug, Default, PartialEq, Serialize)]
348#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
349pub struct CreateResolverRequest {
350    /// <p>The ID for the GraphQL API for which the resolver is being created.</p>
351    #[serde(rename = "apiId")]
352    pub api_id: String,
353    /// <p>The caching configuration for the resolver.</p>
354    #[serde(rename = "cachingConfig")]
355    #[serde(skip_serializing_if = "Option::is_none")]
356    pub caching_config: Option<CachingConfig>,
357    /// <p>The name of the data source for which the resolver is being created.</p>
358    #[serde(rename = "dataSourceName")]
359    #[serde(skip_serializing_if = "Option::is_none")]
360    pub data_source_name: Option<String>,
361    /// <p>The name of the field to attach the resolver to.</p>
362    #[serde(rename = "fieldName")]
363    pub field_name: String,
364    /// <p><p>The resolver type.</p> <ul> <li> <p> <b>UNIT</b>: A UNIT resolver type. A UNIT resolver is the default resolver type. A UNIT resolver enables you to execute a GraphQL query against a single data source.</p> </li> <li> <p> <b>PIPELINE</b>: A PIPELINE resolver type. A PIPELINE resolver enables you to execute a series of <code>Function</code> in a serial manner. You can use a pipeline resolver to execute a GraphQL query against multiple data sources.</p> </li> </ul></p>
365    #[serde(rename = "kind")]
366    #[serde(skip_serializing_if = "Option::is_none")]
367    pub kind: Option<String>,
368    /// <p>The <code>PipelineConfig</code>.</p>
369    #[serde(rename = "pipelineConfig")]
370    #[serde(skip_serializing_if = "Option::is_none")]
371    pub pipeline_config: Option<PipelineConfig>,
372    /// <p>The mapping template to be used for requests.</p> <p>A resolver uses a request mapping template to convert a GraphQL expression into a format that a data source can understand. Mapping templates are written in Apache Velocity Template Language (VTL).</p> <p>VTL request mapping templates are optional when using a Lambda data source. For all other data sources, VTL request and response mapping templates are required.</p>
373    #[serde(rename = "requestMappingTemplate")]
374    #[serde(skip_serializing_if = "Option::is_none")]
375    pub request_mapping_template: Option<String>,
376    /// <p>The mapping template to be used for responses from the data source.</p>
377    #[serde(rename = "responseMappingTemplate")]
378    #[serde(skip_serializing_if = "Option::is_none")]
379    pub response_mapping_template: Option<String>,
380    /// <p>The <code>SyncConfig</code> for a resolver attached to a versioned datasource.</p>
381    #[serde(rename = "syncConfig")]
382    #[serde(skip_serializing_if = "Option::is_none")]
383    pub sync_config: Option<SyncConfig>,
384    /// <p>The name of the <code>Type</code>.</p>
385    #[serde(rename = "typeName")]
386    pub type_name: String,
387}
388
389#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
390#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
391pub struct CreateResolverResponse {
392    /// <p>The <code>Resolver</code> object.</p>
393    #[serde(rename = "resolver")]
394    #[serde(skip_serializing_if = "Option::is_none")]
395    pub resolver: Option<Resolver>,
396}
397
398#[derive(Clone, Debug, Default, PartialEq, Serialize)]
399#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
400pub struct CreateTypeRequest {
401    /// <p>The API ID.</p>
402    #[serde(rename = "apiId")]
403    pub api_id: String,
404    /// <p>The type definition, in GraphQL Schema Definition Language (SDL) format.</p> <p>For more information, see the <a href="http://graphql.org/learn/schema/">GraphQL SDL documentation</a>.</p>
405    #[serde(rename = "definition")]
406    pub definition: String,
407    /// <p>The type format: SDL or JSON.</p>
408    #[serde(rename = "format")]
409    pub format: String,
410}
411
412#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
413#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
414pub struct CreateTypeResponse {
415    /// <p>The <code>Type</code> object.</p>
416    #[serde(rename = "type")]
417    #[serde(skip_serializing_if = "Option::is_none")]
418    pub type_: Option<Type>,
419}
420
421/// <p>Describes a data source.</p>
422#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
423#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
424pub struct DataSource {
425    /// <p>The data source ARN.</p>
426    #[serde(rename = "dataSourceArn")]
427    #[serde(skip_serializing_if = "Option::is_none")]
428    pub data_source_arn: Option<String>,
429    /// <p>The description of the data source.</p>
430    #[serde(rename = "description")]
431    #[serde(skip_serializing_if = "Option::is_none")]
432    pub description: Option<String>,
433    /// <p>Amazon DynamoDB settings.</p>
434    #[serde(rename = "dynamodbConfig")]
435    #[serde(skip_serializing_if = "Option::is_none")]
436    pub dynamodb_config: Option<DynamodbDataSourceConfig>,
437    /// <p>Amazon Elasticsearch Service settings.</p>
438    #[serde(rename = "elasticsearchConfig")]
439    #[serde(skip_serializing_if = "Option::is_none")]
440    pub elasticsearch_config: Option<ElasticsearchDataSourceConfig>,
441    /// <p>HTTP endpoint settings.</p>
442    #[serde(rename = "httpConfig")]
443    #[serde(skip_serializing_if = "Option::is_none")]
444    pub http_config: Option<HttpDataSourceConfig>,
445    /// <p>AWS Lambda settings.</p>
446    #[serde(rename = "lambdaConfig")]
447    #[serde(skip_serializing_if = "Option::is_none")]
448    pub lambda_config: Option<LambdaDataSourceConfig>,
449    /// <p>The name of the data source.</p>
450    #[serde(rename = "name")]
451    #[serde(skip_serializing_if = "Option::is_none")]
452    pub name: Option<String>,
453    /// <p>Relational database settings.</p>
454    #[serde(rename = "relationalDatabaseConfig")]
455    #[serde(skip_serializing_if = "Option::is_none")]
456    pub relational_database_config: Option<RelationalDatabaseDataSourceConfig>,
457    /// <p>The AWS IAM service role ARN for the data source. The system assumes this role when accessing the data source.</p>
458    #[serde(rename = "serviceRoleArn")]
459    #[serde(skip_serializing_if = "Option::is_none")]
460    pub service_role_arn: Option<String>,
461    /// <p><p>The type of the data source.</p> <ul> <li> <p> <b>AMAZON<em>DYNAMODB</b>: The data source is an Amazon DynamoDB table.</p> </li> <li> <p> <b>AMAZON</em>ELASTICSEARCH</b>: The data source is an Amazon Elasticsearch Service domain.</p> </li> <li> <p> <b>AWS<em>LAMBDA</b>: The data source is an AWS Lambda function.</p> </li> <li> <p> <b>NONE</b>: There is no data source. This type is used when you wish to invoke a GraphQL operation without connecting to a data source, such as performing data transformation with resolvers or triggering a subscription to be invoked from a mutation.</p> </li> <li> <p> <b>HTTP</b>: The data source is an HTTP endpoint.</p> </li> <li> <p> <b>RELATIONAL</em>DATABASE</b>: The data source is a relational database.</p> </li> </ul></p>
462    #[serde(rename = "type")]
463    #[serde(skip_serializing_if = "Option::is_none")]
464    pub type_: Option<String>,
465}
466
467/// <p>Represents the input of a <code>DeleteApiCache</code> operation.</p>
468#[derive(Clone, Debug, Default, PartialEq, Serialize)]
469#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
470pub struct DeleteApiCacheRequest {
471    /// <p>The API ID.</p>
472    #[serde(rename = "apiId")]
473    pub api_id: String,
474}
475
476/// <p>Represents the output of a <code>DeleteApiCache</code> operation.</p>
477#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
478#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
479pub struct DeleteApiCacheResponse {}
480
481#[derive(Clone, Debug, Default, PartialEq, Serialize)]
482#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
483pub struct DeleteApiKeyRequest {
484    /// <p>The API ID.</p>
485    #[serde(rename = "apiId")]
486    pub api_id: String,
487    /// <p>The ID for the API key.</p>
488    #[serde(rename = "id")]
489    pub id: String,
490}
491
492#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
493#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
494pub struct DeleteApiKeyResponse {}
495
496#[derive(Clone, Debug, Default, PartialEq, Serialize)]
497#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
498pub struct DeleteDataSourceRequest {
499    /// <p>The API ID.</p>
500    #[serde(rename = "apiId")]
501    pub api_id: String,
502    /// <p>The name of the data source.</p>
503    #[serde(rename = "name")]
504    pub name: String,
505}
506
507#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
508#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
509pub struct DeleteDataSourceResponse {}
510
511#[derive(Clone, Debug, Default, PartialEq, Serialize)]
512#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
513pub struct DeleteFunctionRequest {
514    /// <p>The GraphQL API ID.</p>
515    #[serde(rename = "apiId")]
516    pub api_id: String,
517    /// <p>The <code>Function</code> ID.</p>
518    #[serde(rename = "functionId")]
519    pub function_id: String,
520}
521
522#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
523#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
524pub struct DeleteFunctionResponse {}
525
526#[derive(Clone, Debug, Default, PartialEq, Serialize)]
527#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
528pub struct DeleteGraphqlApiRequest {
529    /// <p>The API ID.</p>
530    #[serde(rename = "apiId")]
531    pub api_id: String,
532}
533
534#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
535#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
536pub struct DeleteGraphqlApiResponse {}
537
538#[derive(Clone, Debug, Default, PartialEq, Serialize)]
539#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
540pub struct DeleteResolverRequest {
541    /// <p>The API ID.</p>
542    #[serde(rename = "apiId")]
543    pub api_id: String,
544    /// <p>The resolver field name.</p>
545    #[serde(rename = "fieldName")]
546    pub field_name: String,
547    /// <p>The name of the resolver type.</p>
548    #[serde(rename = "typeName")]
549    pub type_name: String,
550}
551
552#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
553#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
554pub struct DeleteResolverResponse {}
555
556#[derive(Clone, Debug, Default, PartialEq, Serialize)]
557#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
558pub struct DeleteTypeRequest {
559    /// <p>The API ID.</p>
560    #[serde(rename = "apiId")]
561    pub api_id: String,
562    /// <p>The type name.</p>
563    #[serde(rename = "typeName")]
564    pub type_name: String,
565}
566
567#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
568#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
569pub struct DeleteTypeResponse {}
570
571/// <p>Describes a Delta Sync configuration.</p>
572#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
573pub struct DeltaSyncConfig {
574    /// <p>The number of minutes an Item is stored in the datasource.</p>
575    #[serde(rename = "baseTableTTL")]
576    #[serde(skip_serializing_if = "Option::is_none")]
577    pub base_table_ttl: Option<i64>,
578    /// <p>The Delta Sync table name.</p>
579    #[serde(rename = "deltaSyncTableName")]
580    #[serde(skip_serializing_if = "Option::is_none")]
581    pub delta_sync_table_name: Option<String>,
582    /// <p>The number of minutes a Delta Sync log entry is stored in the Delta Sync table.</p>
583    #[serde(rename = "deltaSyncTableTTL")]
584    #[serde(skip_serializing_if = "Option::is_none")]
585    pub delta_sync_table_ttl: Option<i64>,
586}
587
588/// <p>Describes an Amazon DynamoDB data source configuration.</p>
589#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
590pub struct DynamodbDataSourceConfig {
591    /// <p>The AWS Region.</p>
592    #[serde(rename = "awsRegion")]
593    pub aws_region: String,
594    /// <p>The <code>DeltaSyncConfig</code> for a versioned datasource.</p>
595    #[serde(rename = "deltaSyncConfig")]
596    #[serde(skip_serializing_if = "Option::is_none")]
597    pub delta_sync_config: Option<DeltaSyncConfig>,
598    /// <p>The table name.</p>
599    #[serde(rename = "tableName")]
600    pub table_name: String,
601    /// <p>Set to TRUE to use Amazon Cognito credentials with this data source.</p>
602    #[serde(rename = "useCallerCredentials")]
603    #[serde(skip_serializing_if = "Option::is_none")]
604    pub use_caller_credentials: Option<bool>,
605    /// <p>Set to TRUE to use Conflict Detection and Resolution with this data source.</p>
606    #[serde(rename = "versioned")]
607    #[serde(skip_serializing_if = "Option::is_none")]
608    pub versioned: Option<bool>,
609}
610
611/// <p>Describes an Elasticsearch data source configuration.</p>
612#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
613pub struct ElasticsearchDataSourceConfig {
614    /// <p>The AWS Region.</p>
615    #[serde(rename = "awsRegion")]
616    pub aws_region: String,
617    /// <p>The endpoint.</p>
618    #[serde(rename = "endpoint")]
619    pub endpoint: String,
620}
621
622/// <p>Represents the input of a <code>FlushApiCache</code> operation.</p>
623#[derive(Clone, Debug, Default, PartialEq, Serialize)]
624#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
625pub struct FlushApiCacheRequest {
626    /// <p>The API ID.</p>
627    #[serde(rename = "apiId")]
628    pub api_id: String,
629}
630
631/// <p>Represents the output of a <code>FlushApiCache</code> operation.</p>
632#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
633#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
634pub struct FlushApiCacheResponse {}
635
636/// <p>A function is a reusable entity. Multiple functions can be used to compose the resolver logic.</p>
637#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
638#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
639pub struct FunctionConfiguration {
640    /// <p>The name of the <code>DataSource</code>.</p>
641    #[serde(rename = "dataSourceName")]
642    #[serde(skip_serializing_if = "Option::is_none")]
643    pub data_source_name: Option<String>,
644    /// <p>The <code>Function</code> description.</p>
645    #[serde(rename = "description")]
646    #[serde(skip_serializing_if = "Option::is_none")]
647    pub description: Option<String>,
648    /// <p>The ARN of the <code>Function</code> object.</p>
649    #[serde(rename = "functionArn")]
650    #[serde(skip_serializing_if = "Option::is_none")]
651    pub function_arn: Option<String>,
652    /// <p>A unique ID representing the <code>Function</code> object.</p>
653    #[serde(rename = "functionId")]
654    #[serde(skip_serializing_if = "Option::is_none")]
655    pub function_id: Option<String>,
656    /// <p>The version of the request mapping template. Currently only the 2018-05-29 version of the template is supported.</p>
657    #[serde(rename = "functionVersion")]
658    #[serde(skip_serializing_if = "Option::is_none")]
659    pub function_version: Option<String>,
660    /// <p>The name of the <code>Function</code> object.</p>
661    #[serde(rename = "name")]
662    #[serde(skip_serializing_if = "Option::is_none")]
663    pub name: Option<String>,
664    /// <p>The <code>Function</code> request mapping template. Functions support only the 2018-05-29 version of the request mapping template.</p>
665    #[serde(rename = "requestMappingTemplate")]
666    #[serde(skip_serializing_if = "Option::is_none")]
667    pub request_mapping_template: Option<String>,
668    /// <p>The <code>Function</code> response mapping template.</p>
669    #[serde(rename = "responseMappingTemplate")]
670    #[serde(skip_serializing_if = "Option::is_none")]
671    pub response_mapping_template: Option<String>,
672    #[serde(rename = "syncConfig")]
673    #[serde(skip_serializing_if = "Option::is_none")]
674    pub sync_config: Option<SyncConfig>,
675}
676
677/// <p>Represents the input of a <code>GetApiCache</code> operation.</p>
678#[derive(Clone, Debug, Default, PartialEq, Serialize)]
679#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
680pub struct GetApiCacheRequest {
681    /// <p>The API ID.</p>
682    #[serde(rename = "apiId")]
683    pub api_id: String,
684}
685
686/// <p>Represents the output of a <code>GetApiCache</code> operation.</p>
687#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
688#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
689pub struct GetApiCacheResponse {
690    /// <p>The <code>ApiCache</code> object.</p>
691    #[serde(rename = "apiCache")]
692    #[serde(skip_serializing_if = "Option::is_none")]
693    pub api_cache: Option<ApiCache>,
694}
695
696#[derive(Clone, Debug, Default, PartialEq, Serialize)]
697#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
698pub struct GetDataSourceRequest {
699    /// <p>The API ID.</p>
700    #[serde(rename = "apiId")]
701    pub api_id: String,
702    /// <p>The name of the data source.</p>
703    #[serde(rename = "name")]
704    pub name: String,
705}
706
707#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
708#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
709pub struct GetDataSourceResponse {
710    /// <p>The <code>DataSource</code> object.</p>
711    #[serde(rename = "dataSource")]
712    #[serde(skip_serializing_if = "Option::is_none")]
713    pub data_source: Option<DataSource>,
714}
715
716#[derive(Clone, Debug, Default, PartialEq, Serialize)]
717#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
718pub struct GetFunctionRequest {
719    /// <p>The GraphQL API ID.</p>
720    #[serde(rename = "apiId")]
721    pub api_id: String,
722    /// <p>The <code>Function</code> ID.</p>
723    #[serde(rename = "functionId")]
724    pub function_id: String,
725}
726
727#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
728#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
729pub struct GetFunctionResponse {
730    /// <p>The <code>Function</code> object.</p>
731    #[serde(rename = "functionConfiguration")]
732    #[serde(skip_serializing_if = "Option::is_none")]
733    pub function_configuration: Option<FunctionConfiguration>,
734}
735
736#[derive(Clone, Debug, Default, PartialEq, Serialize)]
737#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
738pub struct GetGraphqlApiRequest {
739    /// <p>The API ID for the GraphQL API.</p>
740    #[serde(rename = "apiId")]
741    pub api_id: String,
742}
743
744#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
745#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
746pub struct GetGraphqlApiResponse {
747    /// <p>The <code>GraphqlApi</code> object.</p>
748    #[serde(rename = "graphqlApi")]
749    #[serde(skip_serializing_if = "Option::is_none")]
750    pub graphql_api: Option<GraphqlApi>,
751}
752
753#[derive(Clone, Debug, Default, PartialEq, Serialize)]
754#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
755pub struct GetIntrospectionSchemaRequest {
756    /// <p>The API ID.</p>
757    #[serde(rename = "apiId")]
758    pub api_id: String,
759    /// <p>The schema format: SDL or JSON.</p>
760    #[serde(rename = "format")]
761    pub format: String,
762    /// <p>A flag that specifies whether the schema introspection should contain directives.</p>
763    #[serde(rename = "includeDirectives")]
764    #[serde(skip_serializing_if = "Option::is_none")]
765    pub include_directives: Option<bool>,
766}
767
768#[derive(Clone, Debug, Default, PartialEq)]
769pub struct GetIntrospectionSchemaResponse {
770    /// <p>The schema, in GraphQL Schema Definition Language (SDL) format.</p> <p>For more information, see the <a href="http://graphql.org/learn/schema/">GraphQL SDL documentation</a>.</p>
771    pub schema: Option<bytes::Bytes>,
772}
773
774#[derive(Clone, Debug, Default, PartialEq, Serialize)]
775#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
776pub struct GetResolverRequest {
777    /// <p>The API ID.</p>
778    #[serde(rename = "apiId")]
779    pub api_id: String,
780    /// <p>The resolver field name.</p>
781    #[serde(rename = "fieldName")]
782    pub field_name: String,
783    /// <p>The resolver type name.</p>
784    #[serde(rename = "typeName")]
785    pub type_name: String,
786}
787
788#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
789#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
790pub struct GetResolverResponse {
791    /// <p>The <code>Resolver</code> object.</p>
792    #[serde(rename = "resolver")]
793    #[serde(skip_serializing_if = "Option::is_none")]
794    pub resolver: Option<Resolver>,
795}
796
797#[derive(Clone, Debug, Default, PartialEq, Serialize)]
798#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
799pub struct GetSchemaCreationStatusRequest {
800    /// <p>The API ID.</p>
801    #[serde(rename = "apiId")]
802    pub api_id: String,
803}
804
805#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
806#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
807pub struct GetSchemaCreationStatusResponse {
808    /// <p>Detailed information about the status of the schema creation operation.</p>
809    #[serde(rename = "details")]
810    #[serde(skip_serializing_if = "Option::is_none")]
811    pub details: Option<String>,
812    /// <p>The current state of the schema (PROCESSING, FAILED, SUCCESS, or NOT_APPLICABLE). When the schema is in the ACTIVE state, you can add data.</p>
813    #[serde(rename = "status")]
814    #[serde(skip_serializing_if = "Option::is_none")]
815    pub status: Option<String>,
816}
817
818#[derive(Clone, Debug, Default, PartialEq, Serialize)]
819#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
820pub struct GetTypeRequest {
821    /// <p>The API ID.</p>
822    #[serde(rename = "apiId")]
823    pub api_id: String,
824    /// <p>The type format: SDL or JSON.</p>
825    #[serde(rename = "format")]
826    pub format: String,
827    /// <p>The type name.</p>
828    #[serde(rename = "typeName")]
829    pub type_name: String,
830}
831
832#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
833#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
834pub struct GetTypeResponse {
835    /// <p>The <code>Type</code> object.</p>
836    #[serde(rename = "type")]
837    #[serde(skip_serializing_if = "Option::is_none")]
838    pub type_: Option<Type>,
839}
840
841/// <p>Describes a GraphQL API.</p>
842#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
843#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
844pub struct GraphqlApi {
845    /// <p>A list of additional authentication providers for the <code>GraphqlApi</code> API.</p>
846    #[serde(rename = "additionalAuthenticationProviders")]
847    #[serde(skip_serializing_if = "Option::is_none")]
848    pub additional_authentication_providers: Option<Vec<AdditionalAuthenticationProvider>>,
849    /// <p>The API ID.</p>
850    #[serde(rename = "apiId")]
851    #[serde(skip_serializing_if = "Option::is_none")]
852    pub api_id: Option<String>,
853    /// <p>The ARN.</p>
854    #[serde(rename = "arn")]
855    #[serde(skip_serializing_if = "Option::is_none")]
856    pub arn: Option<String>,
857    /// <p>The authentication type.</p>
858    #[serde(rename = "authenticationType")]
859    #[serde(skip_serializing_if = "Option::is_none")]
860    pub authentication_type: Option<String>,
861    /// <p>The Amazon CloudWatch Logs configuration.</p>
862    #[serde(rename = "logConfig")]
863    #[serde(skip_serializing_if = "Option::is_none")]
864    pub log_config: Option<LogConfig>,
865    /// <p>The API name.</p>
866    #[serde(rename = "name")]
867    #[serde(skip_serializing_if = "Option::is_none")]
868    pub name: Option<String>,
869    /// <p>The OpenID Connect configuration.</p>
870    #[serde(rename = "openIDConnectConfig")]
871    #[serde(skip_serializing_if = "Option::is_none")]
872    pub open_id_connect_config: Option<OpenIDConnectConfig>,
873    /// <p>The tags.</p>
874    #[serde(rename = "tags")]
875    #[serde(skip_serializing_if = "Option::is_none")]
876    pub tags: Option<::std::collections::HashMap<String, String>>,
877    /// <p>The URIs.</p>
878    #[serde(rename = "uris")]
879    #[serde(skip_serializing_if = "Option::is_none")]
880    pub uris: Option<::std::collections::HashMap<String, String>>,
881    /// <p>The Amazon Cognito user pool configuration.</p>
882    #[serde(rename = "userPoolConfig")]
883    #[serde(skip_serializing_if = "Option::is_none")]
884    pub user_pool_config: Option<UserPoolConfig>,
885    /// <p>The ARN of the AWS Web Application Firewall (WAF) ACL associated with this <code>GraphqlApi</code>, if one exists.</p>
886    #[serde(rename = "wafWebAclArn")]
887    #[serde(skip_serializing_if = "Option::is_none")]
888    pub waf_web_acl_arn: Option<String>,
889    /// <p>A flag representing whether X-Ray tracing is enabled for this <code>GraphqlApi</code>.</p>
890    #[serde(rename = "xrayEnabled")]
891    #[serde(skip_serializing_if = "Option::is_none")]
892    pub xray_enabled: Option<bool>,
893}
894
895/// <p>Describes an HTTP data source configuration.</p>
896#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
897pub struct HttpDataSourceConfig {
898    /// <p>The authorization config in case the HTTP endpoint requires authorization.</p>
899    #[serde(rename = "authorizationConfig")]
900    #[serde(skip_serializing_if = "Option::is_none")]
901    pub authorization_config: Option<AuthorizationConfig>,
902    /// <p>The HTTP URL endpoint. You can either specify the domain name or IP, and port combination, and the URL scheme must be HTTP or HTTPS. If the port is not specified, AWS AppSync uses the default port 80 for the HTTP endpoint and port 443 for HTTPS endpoints.</p>
903    #[serde(rename = "endpoint")]
904    #[serde(skip_serializing_if = "Option::is_none")]
905    pub endpoint: Option<String>,
906}
907
908/// <p>The <code>LambdaConflictHandlerConfig</code> object when configuring LAMBDA as the Conflict Handler.</p>
909#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
910pub struct LambdaConflictHandlerConfig {
911    /// <p>The Arn for the Lambda function to use as the Conflict Handler.</p>
912    #[serde(rename = "lambdaConflictHandlerArn")]
913    #[serde(skip_serializing_if = "Option::is_none")]
914    pub lambda_conflict_handler_arn: Option<String>,
915}
916
917/// <p>Describes an AWS Lambda data source configuration.</p>
918#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
919pub struct LambdaDataSourceConfig {
920    /// <p>The ARN for the Lambda function.</p>
921    #[serde(rename = "lambdaFunctionArn")]
922    pub lambda_function_arn: String,
923}
924
925#[derive(Clone, Debug, Default, PartialEq, Serialize)]
926#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
927pub struct ListApiKeysRequest {
928    /// <p>The API ID.</p>
929    #[serde(rename = "apiId")]
930    pub api_id: String,
931    /// <p>The maximum number of results you want the request to return.</p>
932    #[serde(rename = "maxResults")]
933    #[serde(skip_serializing_if = "Option::is_none")]
934    pub max_results: Option<i64>,
935    /// <p>An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.</p>
936    #[serde(rename = "nextToken")]
937    #[serde(skip_serializing_if = "Option::is_none")]
938    pub next_token: Option<String>,
939}
940
941#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
942#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
943pub struct ListApiKeysResponse {
944    /// <p>The <code>ApiKey</code> objects.</p>
945    #[serde(rename = "apiKeys")]
946    #[serde(skip_serializing_if = "Option::is_none")]
947    pub api_keys: Option<Vec<ApiKey>>,
948    /// <p>An identifier to be passed in the next request to this operation to return the next set of items in the list.</p>
949    #[serde(rename = "nextToken")]
950    #[serde(skip_serializing_if = "Option::is_none")]
951    pub next_token: Option<String>,
952}
953
954#[derive(Clone, Debug, Default, PartialEq, Serialize)]
955#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
956pub struct ListDataSourcesRequest {
957    /// <p>The API ID.</p>
958    #[serde(rename = "apiId")]
959    pub api_id: String,
960    /// <p>The maximum number of results you want the request to return.</p>
961    #[serde(rename = "maxResults")]
962    #[serde(skip_serializing_if = "Option::is_none")]
963    pub max_results: Option<i64>,
964    /// <p>An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list. </p>
965    #[serde(rename = "nextToken")]
966    #[serde(skip_serializing_if = "Option::is_none")]
967    pub next_token: Option<String>,
968}
969
970#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
971#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
972pub struct ListDataSourcesResponse {
973    /// <p>The <code>DataSource</code> objects.</p>
974    #[serde(rename = "dataSources")]
975    #[serde(skip_serializing_if = "Option::is_none")]
976    pub data_sources: Option<Vec<DataSource>>,
977    /// <p>An identifier to be passed in the next request to this operation to return the next set of items in the list.</p>
978    #[serde(rename = "nextToken")]
979    #[serde(skip_serializing_if = "Option::is_none")]
980    pub next_token: Option<String>,
981}
982
983#[derive(Clone, Debug, Default, PartialEq, Serialize)]
984#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
985pub struct ListFunctionsRequest {
986    /// <p>The GraphQL API ID.</p>
987    #[serde(rename = "apiId")]
988    pub api_id: String,
989    /// <p>The maximum number of results you want the request to return.</p>
990    #[serde(rename = "maxResults")]
991    #[serde(skip_serializing_if = "Option::is_none")]
992    pub max_results: Option<i64>,
993    /// <p>An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.</p>
994    #[serde(rename = "nextToken")]
995    #[serde(skip_serializing_if = "Option::is_none")]
996    pub next_token: Option<String>,
997}
998
999#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1000#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1001pub struct ListFunctionsResponse {
1002    /// <p>A list of <code>Function</code> objects.</p>
1003    #[serde(rename = "functions")]
1004    #[serde(skip_serializing_if = "Option::is_none")]
1005    pub functions: Option<Vec<FunctionConfiguration>>,
1006    /// <p>An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.</p>
1007    #[serde(rename = "nextToken")]
1008    #[serde(skip_serializing_if = "Option::is_none")]
1009    pub next_token: Option<String>,
1010}
1011
1012#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1013#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1014pub struct ListGraphqlApisRequest {
1015    /// <p>The maximum number of results you want the request to return.</p>
1016    #[serde(rename = "maxResults")]
1017    #[serde(skip_serializing_if = "Option::is_none")]
1018    pub max_results: Option<i64>,
1019    /// <p>An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list. </p>
1020    #[serde(rename = "nextToken")]
1021    #[serde(skip_serializing_if = "Option::is_none")]
1022    pub next_token: Option<String>,
1023}
1024
1025#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1026#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1027pub struct ListGraphqlApisResponse {
1028    /// <p>The <code>GraphqlApi</code> objects.</p>
1029    #[serde(rename = "graphqlApis")]
1030    #[serde(skip_serializing_if = "Option::is_none")]
1031    pub graphql_apis: Option<Vec<GraphqlApi>>,
1032    /// <p>An identifier to be passed in the next request to this operation to return the next set of items in the list.</p>
1033    #[serde(rename = "nextToken")]
1034    #[serde(skip_serializing_if = "Option::is_none")]
1035    pub next_token: Option<String>,
1036}
1037
1038#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1039#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1040pub struct ListResolversByFunctionRequest {
1041    /// <p>The API ID.</p>
1042    #[serde(rename = "apiId")]
1043    pub api_id: String,
1044    /// <p>The Function ID.</p>
1045    #[serde(rename = "functionId")]
1046    pub function_id: String,
1047    /// <p>The maximum number of results you want the request to return.</p>
1048    #[serde(rename = "maxResults")]
1049    #[serde(skip_serializing_if = "Option::is_none")]
1050    pub max_results: Option<i64>,
1051    /// <p>An identifier that was returned from the previous call to this operation, which you can use to return the next set of items in the list.</p>
1052    #[serde(rename = "nextToken")]
1053    #[serde(skip_serializing_if = "Option::is_none")]
1054    pub next_token: Option<String>,
1055}
1056
1057#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1058#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1059pub struct ListResolversByFunctionResponse {
1060    /// <p>An identifier that can be used to return the next set of items in the list.</p>
1061    #[serde(rename = "nextToken")]
1062    #[serde(skip_serializing_if = "Option::is_none")]
1063    pub next_token: Option<String>,
1064    /// <p>The list of resolvers.</p>
1065    #[serde(rename = "resolvers")]
1066    #[serde(skip_serializing_if = "Option::is_none")]
1067    pub resolvers: Option<Vec<Resolver>>,
1068}
1069
1070#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1071#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1072pub struct ListResolversRequest {
1073    /// <p>The API ID.</p>
1074    #[serde(rename = "apiId")]
1075    pub api_id: String,
1076    /// <p>The maximum number of results you want the request to return.</p>
1077    #[serde(rename = "maxResults")]
1078    #[serde(skip_serializing_if = "Option::is_none")]
1079    pub max_results: Option<i64>,
1080    /// <p>An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list. </p>
1081    #[serde(rename = "nextToken")]
1082    #[serde(skip_serializing_if = "Option::is_none")]
1083    pub next_token: Option<String>,
1084    /// <p>The type name.</p>
1085    #[serde(rename = "typeName")]
1086    pub type_name: String,
1087}
1088
1089#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1090#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1091pub struct ListResolversResponse {
1092    /// <p>An identifier to be passed in the next request to this operation to return the next set of items in the list.</p>
1093    #[serde(rename = "nextToken")]
1094    #[serde(skip_serializing_if = "Option::is_none")]
1095    pub next_token: Option<String>,
1096    /// <p>The <code>Resolver</code> objects.</p>
1097    #[serde(rename = "resolvers")]
1098    #[serde(skip_serializing_if = "Option::is_none")]
1099    pub resolvers: Option<Vec<Resolver>>,
1100}
1101
1102#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1103#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1104pub struct ListTagsForResourceRequest {
1105    /// <p>The <code>GraphqlApi</code> ARN.</p>
1106    #[serde(rename = "resourceArn")]
1107    pub resource_arn: String,
1108}
1109
1110#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1111#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1112pub struct ListTagsForResourceResponse {
1113    /// <p>A <code>TagMap</code> object.</p>
1114    #[serde(rename = "tags")]
1115    #[serde(skip_serializing_if = "Option::is_none")]
1116    pub tags: Option<::std::collections::HashMap<String, String>>,
1117}
1118
1119#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1120#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1121pub struct ListTypesRequest {
1122    /// <p>The API ID.</p>
1123    #[serde(rename = "apiId")]
1124    pub api_id: String,
1125    /// <p>The type format: SDL or JSON.</p>
1126    #[serde(rename = "format")]
1127    pub format: String,
1128    /// <p>The maximum number of results you want the request to return.</p>
1129    #[serde(rename = "maxResults")]
1130    #[serde(skip_serializing_if = "Option::is_none")]
1131    pub max_results: Option<i64>,
1132    /// <p>An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list. </p>
1133    #[serde(rename = "nextToken")]
1134    #[serde(skip_serializing_if = "Option::is_none")]
1135    pub next_token: Option<String>,
1136}
1137
1138#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1139#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1140pub struct ListTypesResponse {
1141    /// <p>An identifier to be passed in the next request to this operation to return the next set of items in the list.</p>
1142    #[serde(rename = "nextToken")]
1143    #[serde(skip_serializing_if = "Option::is_none")]
1144    pub next_token: Option<String>,
1145    /// <p>The <code>Type</code> objects.</p>
1146    #[serde(rename = "types")]
1147    #[serde(skip_serializing_if = "Option::is_none")]
1148    pub types: Option<Vec<Type>>,
1149}
1150
1151/// <p>The CloudWatch Logs configuration.</p>
1152#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1153pub struct LogConfig {
1154    /// <p>The service role that AWS AppSync will assume to publish to Amazon CloudWatch logs in your account. </p>
1155    #[serde(rename = "cloudWatchLogsRoleArn")]
1156    pub cloud_watch_logs_role_arn: String,
1157    /// <p>Set to TRUE to exclude sections that contain information such as headers, context, and evaluated mapping templates, regardless of logging level.</p>
1158    #[serde(rename = "excludeVerboseContent")]
1159    #[serde(skip_serializing_if = "Option::is_none")]
1160    pub exclude_verbose_content: Option<bool>,
1161    /// <p><p>The field logging level. Values can be NONE, ERROR, or ALL. </p> <ul> <li> <p> <b>NONE</b>: No field-level logs are captured.</p> </li> <li> <p> <b>ERROR</b>: Logs the following information only for the fields that are in error:</p> <ul> <li> <p>The error section in the server response.</p> </li> <li> <p>Field-level errors.</p> </li> <li> <p>The generated request/response functions that got resolved for error fields.</p> </li> </ul> </li> <li> <p> <b>ALL</b>: The following information is logged for all fields in the query:</p> <ul> <li> <p>Field-level tracing information.</p> </li> <li> <p>The generated request/response functions that got resolved for each field.</p> </li> </ul> </li> </ul></p>
1162    #[serde(rename = "fieldLogLevel")]
1163    pub field_log_level: String,
1164}
1165
1166/// <p>Describes an OpenID Connect configuration.</p>
1167#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1168pub struct OpenIDConnectConfig {
1169    /// <p>The number of milliseconds a token is valid after being authenticated.</p>
1170    #[serde(rename = "authTTL")]
1171    #[serde(skip_serializing_if = "Option::is_none")]
1172    pub auth_ttl: Option<i64>,
1173    /// <p>The client identifier of the Relying party at the OpenID identity provider. This identifier is typically obtained when the Relying party is registered with the OpenID identity provider. You can specify a regular expression so the AWS AppSync can validate against multiple client identifiers at a time.</p>
1174    #[serde(rename = "clientId")]
1175    #[serde(skip_serializing_if = "Option::is_none")]
1176    pub client_id: Option<String>,
1177    /// <p>The number of milliseconds a token is valid after being issued to a user.</p>
1178    #[serde(rename = "iatTTL")]
1179    #[serde(skip_serializing_if = "Option::is_none")]
1180    pub iat_ttl: Option<i64>,
1181    /// <p>The issuer for the OpenID Connect configuration. The issuer returned by discovery must exactly match the value of <code>iss</code> in the ID token.</p>
1182    #[serde(rename = "issuer")]
1183    pub issuer: String,
1184}
1185
1186/// <p>The pipeline configuration for a resolver of kind <code>PIPELINE</code>.</p>
1187#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1188pub struct PipelineConfig {
1189    /// <p>A list of <code>Function</code> objects.</p>
1190    #[serde(rename = "functions")]
1191    #[serde(skip_serializing_if = "Option::is_none")]
1192    pub functions: Option<Vec<String>>,
1193}
1194
1195/// <p>The Amazon RDS HTTP endpoint configuration.</p>
1196#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1197pub struct RdsHttpEndpointConfig {
1198    /// <p>AWS Region for RDS HTTP endpoint.</p>
1199    #[serde(rename = "awsRegion")]
1200    #[serde(skip_serializing_if = "Option::is_none")]
1201    pub aws_region: Option<String>,
1202    /// <p>AWS secret store ARN for database credentials.</p>
1203    #[serde(rename = "awsSecretStoreArn")]
1204    #[serde(skip_serializing_if = "Option::is_none")]
1205    pub aws_secret_store_arn: Option<String>,
1206    /// <p>Logical database name.</p>
1207    #[serde(rename = "databaseName")]
1208    #[serde(skip_serializing_if = "Option::is_none")]
1209    pub database_name: Option<String>,
1210    /// <p>Amazon RDS cluster ARN.</p>
1211    #[serde(rename = "dbClusterIdentifier")]
1212    #[serde(skip_serializing_if = "Option::is_none")]
1213    pub db_cluster_identifier: Option<String>,
1214    /// <p>Logical schema name.</p>
1215    #[serde(rename = "schema")]
1216    #[serde(skip_serializing_if = "Option::is_none")]
1217    pub schema: Option<String>,
1218}
1219
1220/// <p>Describes a relational database data source configuration.</p>
1221#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1222pub struct RelationalDatabaseDataSourceConfig {
1223    /// <p>Amazon RDS HTTP endpoint settings.</p>
1224    #[serde(rename = "rdsHttpEndpointConfig")]
1225    #[serde(skip_serializing_if = "Option::is_none")]
1226    pub rds_http_endpoint_config: Option<RdsHttpEndpointConfig>,
1227    /// <p><p>Source type for the relational database.</p> <ul> <li> <p> <b>RDS<em>HTTP</em>ENDPOINT</b>: The relational database source type is an Amazon RDS HTTP endpoint.</p> </li> </ul></p>
1228    #[serde(rename = "relationalDatabaseSourceType")]
1229    #[serde(skip_serializing_if = "Option::is_none")]
1230    pub relational_database_source_type: Option<String>,
1231}
1232
1233/// <p>Describes a resolver.</p>
1234#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1235#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1236pub struct Resolver {
1237    /// <p>The caching configuration for the resolver.</p>
1238    #[serde(rename = "cachingConfig")]
1239    #[serde(skip_serializing_if = "Option::is_none")]
1240    pub caching_config: Option<CachingConfig>,
1241    /// <p>The resolver data source name.</p>
1242    #[serde(rename = "dataSourceName")]
1243    #[serde(skip_serializing_if = "Option::is_none")]
1244    pub data_source_name: Option<String>,
1245    /// <p>The resolver field name.</p>
1246    #[serde(rename = "fieldName")]
1247    #[serde(skip_serializing_if = "Option::is_none")]
1248    pub field_name: Option<String>,
1249    /// <p><p>The resolver type.</p> <ul> <li> <p> <b>UNIT</b>: A UNIT resolver type. A UNIT resolver is the default resolver type. A UNIT resolver enables you to execute a GraphQL query against a single data source.</p> </li> <li> <p> <b>PIPELINE</b>: A PIPELINE resolver type. A PIPELINE resolver enables you to execute a series of <code>Function</code> in a serial manner. You can use a pipeline resolver to execute a GraphQL query against multiple data sources.</p> </li> </ul></p>
1250    #[serde(rename = "kind")]
1251    #[serde(skip_serializing_if = "Option::is_none")]
1252    pub kind: Option<String>,
1253    /// <p>The <code>PipelineConfig</code>.</p>
1254    #[serde(rename = "pipelineConfig")]
1255    #[serde(skip_serializing_if = "Option::is_none")]
1256    pub pipeline_config: Option<PipelineConfig>,
1257    /// <p>The request mapping template.</p>
1258    #[serde(rename = "requestMappingTemplate")]
1259    #[serde(skip_serializing_if = "Option::is_none")]
1260    pub request_mapping_template: Option<String>,
1261    /// <p>The resolver ARN.</p>
1262    #[serde(rename = "resolverArn")]
1263    #[serde(skip_serializing_if = "Option::is_none")]
1264    pub resolver_arn: Option<String>,
1265    /// <p>The response mapping template.</p>
1266    #[serde(rename = "responseMappingTemplate")]
1267    #[serde(skip_serializing_if = "Option::is_none")]
1268    pub response_mapping_template: Option<String>,
1269    /// <p>The <code>SyncConfig</code> for a resolver attached to a versioned datasource.</p>
1270    #[serde(rename = "syncConfig")]
1271    #[serde(skip_serializing_if = "Option::is_none")]
1272    pub sync_config: Option<SyncConfig>,
1273    /// <p>The resolver type name.</p>
1274    #[serde(rename = "typeName")]
1275    #[serde(skip_serializing_if = "Option::is_none")]
1276    pub type_name: Option<String>,
1277}
1278
1279#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1280#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1281pub struct StartSchemaCreationRequest {
1282    /// <p>The API ID.</p>
1283    #[serde(rename = "apiId")]
1284    pub api_id: String,
1285    /// <p>The schema definition, in GraphQL schema language format.</p>
1286    #[serde(rename = "definition")]
1287    #[serde(
1288        deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
1289        serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
1290        default
1291    )]
1292    pub definition: bytes::Bytes,
1293}
1294
1295#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1296#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1297pub struct StartSchemaCreationResponse {
1298    /// <p>The current state of the schema (PROCESSING, FAILED, SUCCESS, or NOT_APPLICABLE). When the schema is in the ACTIVE state, you can add data.</p>
1299    #[serde(rename = "status")]
1300    #[serde(skip_serializing_if = "Option::is_none")]
1301    pub status: Option<String>,
1302}
1303
1304/// <p>Describes a Sync configuration for a resolver.</p> <p>Contains information on which Conflict Detection as well as Resolution strategy should be performed when the resolver is invoked.</p>
1305#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1306pub struct SyncConfig {
1307    /// <p><p>The Conflict Detection strategy to use.</p> <ul> <li> <p> <b>VERSION</b>: Detect conflicts based on object versions for this resolver.</p> </li> <li> <p> <b>NONE</b>: Do not detect conflicts when executing this resolver.</p> </li> </ul></p>
1308    #[serde(rename = "conflictDetection")]
1309    #[serde(skip_serializing_if = "Option::is_none")]
1310    pub conflict_detection: Option<String>,
1311    /// <p><p>The Conflict Resolution strategy to perform in the event of a conflict.</p> <ul> <li> <p> <b>OPTIMISTIC_CONCURRENCY</b>: Resolve conflicts by rejecting mutations when versions do not match the latest version at the server.</p> </li> <li> <p> <b>AUTOMERGE</b>: Resolve conflicts with the Automerge conflict resolution strategy.</p> </li> <li> <p> <b>LAMBDA</b>: Resolve conflicts with a Lambda function supplied in the LambdaConflictHandlerConfig.</p> </li> </ul></p>
1312    #[serde(rename = "conflictHandler")]
1313    #[serde(skip_serializing_if = "Option::is_none")]
1314    pub conflict_handler: Option<String>,
1315    /// <p>The <code>LambdaConflictHandlerConfig</code> when configuring LAMBDA as the Conflict Handler.</p>
1316    #[serde(rename = "lambdaConflictHandlerConfig")]
1317    #[serde(skip_serializing_if = "Option::is_none")]
1318    pub lambda_conflict_handler_config: Option<LambdaConflictHandlerConfig>,
1319}
1320
1321#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1322#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1323pub struct TagResourceRequest {
1324    /// <p>The <code>GraphqlApi</code> ARN.</p>
1325    #[serde(rename = "resourceArn")]
1326    pub resource_arn: String,
1327    /// <p>A <code>TagMap</code> object.</p>
1328    #[serde(rename = "tags")]
1329    pub tags: ::std::collections::HashMap<String, String>,
1330}
1331
1332#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1333#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1334pub struct TagResourceResponse {}
1335
1336/// <p>Describes a type.</p>
1337#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1338#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1339pub struct Type {
1340    /// <p>The type ARN.</p>
1341    #[serde(rename = "arn")]
1342    #[serde(skip_serializing_if = "Option::is_none")]
1343    pub arn: Option<String>,
1344    /// <p>The type definition.</p>
1345    #[serde(rename = "definition")]
1346    #[serde(skip_serializing_if = "Option::is_none")]
1347    pub definition: Option<String>,
1348    /// <p>The type description.</p>
1349    #[serde(rename = "description")]
1350    #[serde(skip_serializing_if = "Option::is_none")]
1351    pub description: Option<String>,
1352    /// <p>The type format: SDL or JSON.</p>
1353    #[serde(rename = "format")]
1354    #[serde(skip_serializing_if = "Option::is_none")]
1355    pub format: Option<String>,
1356    /// <p>The type name.</p>
1357    #[serde(rename = "name")]
1358    #[serde(skip_serializing_if = "Option::is_none")]
1359    pub name: Option<String>,
1360}
1361
1362#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1363#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1364pub struct UntagResourceRequest {
1365    /// <p>The <code>GraphqlApi</code> ARN.</p>
1366    #[serde(rename = "resourceArn")]
1367    pub resource_arn: String,
1368    /// <p>A list of <code>TagKey</code> objects.</p>
1369    #[serde(rename = "tagKeys")]
1370    pub tag_keys: Vec<String>,
1371}
1372
1373#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1374#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1375pub struct UntagResourceResponse {}
1376
1377/// <p>Represents the input of a <code>UpdateApiCache</code> operation.</p>
1378#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1379#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1380pub struct UpdateApiCacheRequest {
1381    /// <p><p>Caching behavior.</p> <ul> <li> <p> <b>FULL<em>REQUEST</em>CACHING</b>: All requests are fully cached.</p> </li> <li> <p> <b>PER<em>RESOLVER</em>CACHING</b>: Individual resolvers that you specify are cached.</p> </li> </ul></p>
1382    #[serde(rename = "apiCachingBehavior")]
1383    pub api_caching_behavior: String,
1384    /// <p>The GraphQL API Id.</p>
1385    #[serde(rename = "apiId")]
1386    pub api_id: String,
1387    /// <p>TTL in seconds for cache entries.</p> <p>Valid values are between 1 and 3600 seconds.</p>
1388    #[serde(rename = "ttl")]
1389    pub ttl: i64,
1390    /// <p><p>The cache instance type. Valid values are </p> <ul> <li> <p> <code>SMALL</code> </p> </li> <li> <p> <code>MEDIUM</code> </p> </li> <li> <p> <code>LARGE</code> </p> </li> <li> <p> <code>XLARGE</code> </p> </li> <li> <p> <code>LARGE<em>2X</code> </p> </li> <li> <p> <code>LARGE</em>4X</code> </p> </li> <li> <p> <code>LARGE<em>8X</code> (not available in all regions)</p> </li> <li> <p> <code>LARGE</em>12X</code> </p> </li> </ul> <p>Historically, instance types were identified by an EC2-style value. As of July 2020, this is deprecated, and the generic identifiers above should be used.</p> <p>The following legacy instance types are available, but their use is discouraged:</p> <ul> <li> <p> <b>T2<em>SMALL</b>: A t2.small instance type.</p> </li> <li> <p> <b>T2</em>MEDIUM</b>: A t2.medium instance type.</p> </li> <li> <p> <b>R4<em>LARGE</b>: A r4.large instance type.</p> </li> <li> <p> <b>R4</em>XLARGE</b>: A r4.xlarge instance type.</p> </li> <li> <p> <b>R4<em>2XLARGE</b>: A r4.2xlarge instance type.</p> </li> <li> <p> <b>R4</em>4XLARGE</b>: A r4.4xlarge instance type.</p> </li> <li> <p> <b>R4_8XLARGE</b>: A r4.8xlarge instance type.</p> </li> </ul></p>
1391    #[serde(rename = "type")]
1392    pub type_: String,
1393}
1394
1395/// <p>Represents the output of a <code>UpdateApiCache</code> operation.</p>
1396#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1397#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1398pub struct UpdateApiCacheResponse {
1399    /// <p>The <code>ApiCache</code> object.</p>
1400    #[serde(rename = "apiCache")]
1401    #[serde(skip_serializing_if = "Option::is_none")]
1402    pub api_cache: Option<ApiCache>,
1403}
1404
1405#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1406#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1407pub struct UpdateApiKeyRequest {
1408    /// <p>The ID for the GraphQL API.</p>
1409    #[serde(rename = "apiId")]
1410    pub api_id: String,
1411    /// <p>A description of the purpose of the API key.</p>
1412    #[serde(rename = "description")]
1413    #[serde(skip_serializing_if = "Option::is_none")]
1414    pub description: Option<String>,
1415    /// <p>The time from update time after which the API key expires. The date is represented as seconds since the epoch. For more information, see .</p>
1416    #[serde(rename = "expires")]
1417    #[serde(skip_serializing_if = "Option::is_none")]
1418    pub expires: Option<i64>,
1419    /// <p>The API key ID.</p>
1420    #[serde(rename = "id")]
1421    pub id: String,
1422}
1423
1424#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1425#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1426pub struct UpdateApiKeyResponse {
1427    /// <p>The API key.</p>
1428    #[serde(rename = "apiKey")]
1429    #[serde(skip_serializing_if = "Option::is_none")]
1430    pub api_key: Option<ApiKey>,
1431}
1432
1433#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1434#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1435pub struct UpdateDataSourceRequest {
1436    /// <p>The API ID.</p>
1437    #[serde(rename = "apiId")]
1438    pub api_id: String,
1439    /// <p>The new description for the data source.</p>
1440    #[serde(rename = "description")]
1441    #[serde(skip_serializing_if = "Option::is_none")]
1442    pub description: Option<String>,
1443    /// <p>The new Amazon DynamoDB configuration.</p>
1444    #[serde(rename = "dynamodbConfig")]
1445    #[serde(skip_serializing_if = "Option::is_none")]
1446    pub dynamodb_config: Option<DynamodbDataSourceConfig>,
1447    /// <p>The new Elasticsearch Service configuration.</p>
1448    #[serde(rename = "elasticsearchConfig")]
1449    #[serde(skip_serializing_if = "Option::is_none")]
1450    pub elasticsearch_config: Option<ElasticsearchDataSourceConfig>,
1451    /// <p>The new HTTP endpoint configuration.</p>
1452    #[serde(rename = "httpConfig")]
1453    #[serde(skip_serializing_if = "Option::is_none")]
1454    pub http_config: Option<HttpDataSourceConfig>,
1455    /// <p>The new AWS Lambda configuration.</p>
1456    #[serde(rename = "lambdaConfig")]
1457    #[serde(skip_serializing_if = "Option::is_none")]
1458    pub lambda_config: Option<LambdaDataSourceConfig>,
1459    /// <p>The new name for the data source.</p>
1460    #[serde(rename = "name")]
1461    pub name: String,
1462    /// <p>The new relational database configuration.</p>
1463    #[serde(rename = "relationalDatabaseConfig")]
1464    #[serde(skip_serializing_if = "Option::is_none")]
1465    pub relational_database_config: Option<RelationalDatabaseDataSourceConfig>,
1466    /// <p>The new service role ARN for the data source.</p>
1467    #[serde(rename = "serviceRoleArn")]
1468    #[serde(skip_serializing_if = "Option::is_none")]
1469    pub service_role_arn: Option<String>,
1470    /// <p>The new data source type.</p>
1471    #[serde(rename = "type")]
1472    pub type_: String,
1473}
1474
1475#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1476#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1477pub struct UpdateDataSourceResponse {
1478    /// <p>The updated <code>DataSource</code> object.</p>
1479    #[serde(rename = "dataSource")]
1480    #[serde(skip_serializing_if = "Option::is_none")]
1481    pub data_source: Option<DataSource>,
1482}
1483
1484#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1485#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1486pub struct UpdateFunctionRequest {
1487    /// <p>The GraphQL API ID.</p>
1488    #[serde(rename = "apiId")]
1489    pub api_id: String,
1490    /// <p>The <code>Function</code> <code>DataSource</code> name.</p>
1491    #[serde(rename = "dataSourceName")]
1492    pub data_source_name: String,
1493    /// <p>The <code>Function</code> description.</p>
1494    #[serde(rename = "description")]
1495    #[serde(skip_serializing_if = "Option::is_none")]
1496    pub description: Option<String>,
1497    /// <p>The function ID.</p>
1498    #[serde(rename = "functionId")]
1499    pub function_id: String,
1500    /// <p>The <code>version</code> of the request mapping template. Currently the supported value is 2018-05-29. </p>
1501    #[serde(rename = "functionVersion")]
1502    pub function_version: String,
1503    /// <p>The <code>Function</code> name.</p>
1504    #[serde(rename = "name")]
1505    pub name: String,
1506    /// <p>The <code>Function</code> request mapping template. Functions support only the 2018-05-29 version of the request mapping template.</p>
1507    #[serde(rename = "requestMappingTemplate")]
1508    #[serde(skip_serializing_if = "Option::is_none")]
1509    pub request_mapping_template: Option<String>,
1510    /// <p>The <code>Function</code> request mapping template. </p>
1511    #[serde(rename = "responseMappingTemplate")]
1512    #[serde(skip_serializing_if = "Option::is_none")]
1513    pub response_mapping_template: Option<String>,
1514    #[serde(rename = "syncConfig")]
1515    #[serde(skip_serializing_if = "Option::is_none")]
1516    pub sync_config: Option<SyncConfig>,
1517}
1518
1519#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1520#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1521pub struct UpdateFunctionResponse {
1522    /// <p>The <code>Function</code> object.</p>
1523    #[serde(rename = "functionConfiguration")]
1524    #[serde(skip_serializing_if = "Option::is_none")]
1525    pub function_configuration: Option<FunctionConfiguration>,
1526}
1527
1528#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1529#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1530pub struct UpdateGraphqlApiRequest {
1531    /// <p>A list of additional authentication providers for the <code>GraphqlApi</code> API.</p>
1532    #[serde(rename = "additionalAuthenticationProviders")]
1533    #[serde(skip_serializing_if = "Option::is_none")]
1534    pub additional_authentication_providers: Option<Vec<AdditionalAuthenticationProvider>>,
1535    /// <p>The API ID.</p>
1536    #[serde(rename = "apiId")]
1537    pub api_id: String,
1538    /// <p>The new authentication type for the <code>GraphqlApi</code> object.</p>
1539    #[serde(rename = "authenticationType")]
1540    #[serde(skip_serializing_if = "Option::is_none")]
1541    pub authentication_type: Option<String>,
1542    /// <p>The Amazon CloudWatch Logs configuration for the <code>GraphqlApi</code> object.</p>
1543    #[serde(rename = "logConfig")]
1544    #[serde(skip_serializing_if = "Option::is_none")]
1545    pub log_config: Option<LogConfig>,
1546    /// <p>The new name for the <code>GraphqlApi</code> object.</p>
1547    #[serde(rename = "name")]
1548    pub name: String,
1549    /// <p>The OpenID Connect configuration for the <code>GraphqlApi</code> object.</p>
1550    #[serde(rename = "openIDConnectConfig")]
1551    #[serde(skip_serializing_if = "Option::is_none")]
1552    pub open_id_connect_config: Option<OpenIDConnectConfig>,
1553    /// <p>The new Amazon Cognito user pool configuration for the <code>GraphqlApi</code> object.</p>
1554    #[serde(rename = "userPoolConfig")]
1555    #[serde(skip_serializing_if = "Option::is_none")]
1556    pub user_pool_config: Option<UserPoolConfig>,
1557    /// <p>A flag indicating whether to enable X-Ray tracing for the <code>GraphqlApi</code>.</p>
1558    #[serde(rename = "xrayEnabled")]
1559    #[serde(skip_serializing_if = "Option::is_none")]
1560    pub xray_enabled: Option<bool>,
1561}
1562
1563#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1564#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1565pub struct UpdateGraphqlApiResponse {
1566    /// <p>The updated <code>GraphqlApi</code> object.</p>
1567    #[serde(rename = "graphqlApi")]
1568    #[serde(skip_serializing_if = "Option::is_none")]
1569    pub graphql_api: Option<GraphqlApi>,
1570}
1571
1572#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1573#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1574pub struct UpdateResolverRequest {
1575    /// <p>The API ID.</p>
1576    #[serde(rename = "apiId")]
1577    pub api_id: String,
1578    /// <p>The caching configuration for the resolver.</p>
1579    #[serde(rename = "cachingConfig")]
1580    #[serde(skip_serializing_if = "Option::is_none")]
1581    pub caching_config: Option<CachingConfig>,
1582    /// <p>The new data source name.</p>
1583    #[serde(rename = "dataSourceName")]
1584    #[serde(skip_serializing_if = "Option::is_none")]
1585    pub data_source_name: Option<String>,
1586    /// <p>The new field name.</p>
1587    #[serde(rename = "fieldName")]
1588    pub field_name: String,
1589    /// <p><p>The resolver type.</p> <ul> <li> <p> <b>UNIT</b>: A UNIT resolver type. A UNIT resolver is the default resolver type. A UNIT resolver enables you to execute a GraphQL query against a single data source.</p> </li> <li> <p> <b>PIPELINE</b>: A PIPELINE resolver type. A PIPELINE resolver enables you to execute a series of <code>Function</code> in a serial manner. You can use a pipeline resolver to execute a GraphQL query against multiple data sources.</p> </li> </ul></p>
1590    #[serde(rename = "kind")]
1591    #[serde(skip_serializing_if = "Option::is_none")]
1592    pub kind: Option<String>,
1593    /// <p>The <code>PipelineConfig</code>.</p>
1594    #[serde(rename = "pipelineConfig")]
1595    #[serde(skip_serializing_if = "Option::is_none")]
1596    pub pipeline_config: Option<PipelineConfig>,
1597    /// <p>The new request mapping template.</p> <p>A resolver uses a request mapping template to convert a GraphQL expression into a format that a data source can understand. Mapping templates are written in Apache Velocity Template Language (VTL).</p> <p>VTL request mapping templates are optional when using a Lambda data source. For all other data sources, VTL request and response mapping templates are required.</p>
1598    #[serde(rename = "requestMappingTemplate")]
1599    #[serde(skip_serializing_if = "Option::is_none")]
1600    pub request_mapping_template: Option<String>,
1601    /// <p>The new response mapping template.</p>
1602    #[serde(rename = "responseMappingTemplate")]
1603    #[serde(skip_serializing_if = "Option::is_none")]
1604    pub response_mapping_template: Option<String>,
1605    /// <p>The <code>SyncConfig</code> for a resolver attached to a versioned datasource.</p>
1606    #[serde(rename = "syncConfig")]
1607    #[serde(skip_serializing_if = "Option::is_none")]
1608    pub sync_config: Option<SyncConfig>,
1609    /// <p>The new type name.</p>
1610    #[serde(rename = "typeName")]
1611    pub type_name: String,
1612}
1613
1614#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1615#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1616pub struct UpdateResolverResponse {
1617    /// <p>The updated <code>Resolver</code> object.</p>
1618    #[serde(rename = "resolver")]
1619    #[serde(skip_serializing_if = "Option::is_none")]
1620    pub resolver: Option<Resolver>,
1621}
1622
1623#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1624#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1625pub struct UpdateTypeRequest {
1626    /// <p>The API ID.</p>
1627    #[serde(rename = "apiId")]
1628    pub api_id: String,
1629    /// <p>The new definition.</p>
1630    #[serde(rename = "definition")]
1631    #[serde(skip_serializing_if = "Option::is_none")]
1632    pub definition: Option<String>,
1633    /// <p>The new type format: SDL or JSON.</p>
1634    #[serde(rename = "format")]
1635    pub format: String,
1636    /// <p>The new type name.</p>
1637    #[serde(rename = "typeName")]
1638    pub type_name: String,
1639}
1640
1641#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1642#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1643pub struct UpdateTypeResponse {
1644    /// <p>The updated <code>Type</code> object.</p>
1645    #[serde(rename = "type")]
1646    #[serde(skip_serializing_if = "Option::is_none")]
1647    pub type_: Option<Type>,
1648}
1649
1650/// <p>Describes an Amazon Cognito user pool configuration.</p>
1651#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1652pub struct UserPoolConfig {
1653    /// <p>A regular expression for validating the incoming Amazon Cognito user pool app client ID.</p>
1654    #[serde(rename = "appIdClientRegex")]
1655    #[serde(skip_serializing_if = "Option::is_none")]
1656    pub app_id_client_regex: Option<String>,
1657    /// <p>The AWS Region in which the user pool was created.</p>
1658    #[serde(rename = "awsRegion")]
1659    pub aws_region: String,
1660    /// <p>The action that you want your GraphQL API to take when a request that uses Amazon Cognito user pool authentication doesn't match the Amazon Cognito user pool configuration.</p>
1661    #[serde(rename = "defaultAction")]
1662    pub default_action: String,
1663    /// <p>The user pool ID.</p>
1664    #[serde(rename = "userPoolId")]
1665    pub user_pool_id: String,
1666}
1667
1668/// Errors returned by CreateApiCache
1669#[derive(Debug, PartialEq)]
1670pub enum CreateApiCacheError {
1671    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
1672    BadRequest(String),
1673    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
1674    ConcurrentModification(String),
1675    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
1676    InternalFailure(String),
1677    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
1678    NotFound(String),
1679    /// <p>You are not authorized to perform this operation.</p>
1680    Unauthorized(String),
1681}
1682
1683impl CreateApiCacheError {
1684    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateApiCacheError> {
1685        if let Some(err) = proto::json::Error::parse_rest(&res) {
1686            match err.typ.as_str() {
1687                "BadRequestException" => {
1688                    return RusotoError::Service(CreateApiCacheError::BadRequest(err.msg))
1689                }
1690                "ConcurrentModificationException" => {
1691                    return RusotoError::Service(CreateApiCacheError::ConcurrentModification(
1692                        err.msg,
1693                    ))
1694                }
1695                "InternalFailureException" => {
1696                    return RusotoError::Service(CreateApiCacheError::InternalFailure(err.msg))
1697                }
1698                "NotFoundException" => {
1699                    return RusotoError::Service(CreateApiCacheError::NotFound(err.msg))
1700                }
1701                "UnauthorizedException" => {
1702                    return RusotoError::Service(CreateApiCacheError::Unauthorized(err.msg))
1703                }
1704                "ValidationException" => return RusotoError::Validation(err.msg),
1705                _ => {}
1706            }
1707        }
1708        RusotoError::Unknown(res)
1709    }
1710}
1711impl fmt::Display for CreateApiCacheError {
1712    #[allow(unused_variables)]
1713    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1714        match *self {
1715            CreateApiCacheError::BadRequest(ref cause) => write!(f, "{}", cause),
1716            CreateApiCacheError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
1717            CreateApiCacheError::InternalFailure(ref cause) => write!(f, "{}", cause),
1718            CreateApiCacheError::NotFound(ref cause) => write!(f, "{}", cause),
1719            CreateApiCacheError::Unauthorized(ref cause) => write!(f, "{}", cause),
1720        }
1721    }
1722}
1723impl Error for CreateApiCacheError {}
1724/// Errors returned by CreateApiKey
1725#[derive(Debug, PartialEq)]
1726pub enum CreateApiKeyError {
1727    /// <p>The API key exceeded a limit. Try your request again.</p>
1728    ApiKeyLimitExceeded(String),
1729    /// <p>The API key expiration must be set to a value between 1 and 365 days from creation (for <code>CreateApiKey</code>) or from update (for <code>UpdateApiKey</code>).</p>
1730    ApiKeyValidityOutOfBounds(String),
1731    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
1732    BadRequest(String),
1733    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
1734    InternalFailure(String),
1735    /// <p>The request exceeded a limit. Try your request again.</p>
1736    LimitExceeded(String),
1737    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
1738    NotFound(String),
1739    /// <p>You are not authorized to perform this operation.</p>
1740    Unauthorized(String),
1741}
1742
1743impl CreateApiKeyError {
1744    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateApiKeyError> {
1745        if let Some(err) = proto::json::Error::parse_rest(&res) {
1746            match err.typ.as_str() {
1747                "ApiKeyLimitExceededException" => {
1748                    return RusotoError::Service(CreateApiKeyError::ApiKeyLimitExceeded(err.msg))
1749                }
1750                "ApiKeyValidityOutOfBoundsException" => {
1751                    return RusotoError::Service(CreateApiKeyError::ApiKeyValidityOutOfBounds(
1752                        err.msg,
1753                    ))
1754                }
1755                "BadRequestException" => {
1756                    return RusotoError::Service(CreateApiKeyError::BadRequest(err.msg))
1757                }
1758                "InternalFailureException" => {
1759                    return RusotoError::Service(CreateApiKeyError::InternalFailure(err.msg))
1760                }
1761                "LimitExceededException" => {
1762                    return RusotoError::Service(CreateApiKeyError::LimitExceeded(err.msg))
1763                }
1764                "NotFoundException" => {
1765                    return RusotoError::Service(CreateApiKeyError::NotFound(err.msg))
1766                }
1767                "UnauthorizedException" => {
1768                    return RusotoError::Service(CreateApiKeyError::Unauthorized(err.msg))
1769                }
1770                "ValidationException" => return RusotoError::Validation(err.msg),
1771                _ => {}
1772            }
1773        }
1774        RusotoError::Unknown(res)
1775    }
1776}
1777impl fmt::Display for CreateApiKeyError {
1778    #[allow(unused_variables)]
1779    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1780        match *self {
1781            CreateApiKeyError::ApiKeyLimitExceeded(ref cause) => write!(f, "{}", cause),
1782            CreateApiKeyError::ApiKeyValidityOutOfBounds(ref cause) => write!(f, "{}", cause),
1783            CreateApiKeyError::BadRequest(ref cause) => write!(f, "{}", cause),
1784            CreateApiKeyError::InternalFailure(ref cause) => write!(f, "{}", cause),
1785            CreateApiKeyError::LimitExceeded(ref cause) => write!(f, "{}", cause),
1786            CreateApiKeyError::NotFound(ref cause) => write!(f, "{}", cause),
1787            CreateApiKeyError::Unauthorized(ref cause) => write!(f, "{}", cause),
1788        }
1789    }
1790}
1791impl Error for CreateApiKeyError {}
1792/// Errors returned by CreateDataSource
1793#[derive(Debug, PartialEq)]
1794pub enum CreateDataSourceError {
1795    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
1796    BadRequest(String),
1797    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
1798    ConcurrentModification(String),
1799    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
1800    InternalFailure(String),
1801    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
1802    NotFound(String),
1803    /// <p>You are not authorized to perform this operation.</p>
1804    Unauthorized(String),
1805}
1806
1807impl CreateDataSourceError {
1808    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDataSourceError> {
1809        if let Some(err) = proto::json::Error::parse_rest(&res) {
1810            match err.typ.as_str() {
1811                "BadRequestException" => {
1812                    return RusotoError::Service(CreateDataSourceError::BadRequest(err.msg))
1813                }
1814                "ConcurrentModificationException" => {
1815                    return RusotoError::Service(CreateDataSourceError::ConcurrentModification(
1816                        err.msg,
1817                    ))
1818                }
1819                "InternalFailureException" => {
1820                    return RusotoError::Service(CreateDataSourceError::InternalFailure(err.msg))
1821                }
1822                "NotFoundException" => {
1823                    return RusotoError::Service(CreateDataSourceError::NotFound(err.msg))
1824                }
1825                "UnauthorizedException" => {
1826                    return RusotoError::Service(CreateDataSourceError::Unauthorized(err.msg))
1827                }
1828                "ValidationException" => return RusotoError::Validation(err.msg),
1829                _ => {}
1830            }
1831        }
1832        RusotoError::Unknown(res)
1833    }
1834}
1835impl fmt::Display for CreateDataSourceError {
1836    #[allow(unused_variables)]
1837    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1838        match *self {
1839            CreateDataSourceError::BadRequest(ref cause) => write!(f, "{}", cause),
1840            CreateDataSourceError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
1841            CreateDataSourceError::InternalFailure(ref cause) => write!(f, "{}", cause),
1842            CreateDataSourceError::NotFound(ref cause) => write!(f, "{}", cause),
1843            CreateDataSourceError::Unauthorized(ref cause) => write!(f, "{}", cause),
1844        }
1845    }
1846}
1847impl Error for CreateDataSourceError {}
1848/// Errors returned by CreateFunction
1849#[derive(Debug, PartialEq)]
1850pub enum CreateFunctionError {
1851    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
1852    ConcurrentModification(String),
1853    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
1854    InternalFailure(String),
1855    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
1856    NotFound(String),
1857    /// <p>You are not authorized to perform this operation.</p>
1858    Unauthorized(String),
1859}
1860
1861impl CreateFunctionError {
1862    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateFunctionError> {
1863        if let Some(err) = proto::json::Error::parse_rest(&res) {
1864            match err.typ.as_str() {
1865                "ConcurrentModificationException" => {
1866                    return RusotoError::Service(CreateFunctionError::ConcurrentModification(
1867                        err.msg,
1868                    ))
1869                }
1870                "InternalFailureException" => {
1871                    return RusotoError::Service(CreateFunctionError::InternalFailure(err.msg))
1872                }
1873                "NotFoundException" => {
1874                    return RusotoError::Service(CreateFunctionError::NotFound(err.msg))
1875                }
1876                "UnauthorizedException" => {
1877                    return RusotoError::Service(CreateFunctionError::Unauthorized(err.msg))
1878                }
1879                "ValidationException" => return RusotoError::Validation(err.msg),
1880                _ => {}
1881            }
1882        }
1883        RusotoError::Unknown(res)
1884    }
1885}
1886impl fmt::Display for CreateFunctionError {
1887    #[allow(unused_variables)]
1888    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1889        match *self {
1890            CreateFunctionError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
1891            CreateFunctionError::InternalFailure(ref cause) => write!(f, "{}", cause),
1892            CreateFunctionError::NotFound(ref cause) => write!(f, "{}", cause),
1893            CreateFunctionError::Unauthorized(ref cause) => write!(f, "{}", cause),
1894        }
1895    }
1896}
1897impl Error for CreateFunctionError {}
1898/// Errors returned by CreateGraphqlApi
1899#[derive(Debug, PartialEq)]
1900pub enum CreateGraphqlApiError {
1901    /// <p>The GraphQL API exceeded a limit. Try your request again.</p>
1902    ApiLimitExceeded(String),
1903    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
1904    BadRequest(String),
1905    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
1906    ConcurrentModification(String),
1907    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
1908    InternalFailure(String),
1909    /// <p>The request exceeded a limit. Try your request again.</p>
1910    LimitExceeded(String),
1911    /// <p>You are not authorized to perform this operation.</p>
1912    Unauthorized(String),
1913}
1914
1915impl CreateGraphqlApiError {
1916    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateGraphqlApiError> {
1917        if let Some(err) = proto::json::Error::parse_rest(&res) {
1918            match err.typ.as_str() {
1919                "ApiLimitExceededException" => {
1920                    return RusotoError::Service(CreateGraphqlApiError::ApiLimitExceeded(err.msg))
1921                }
1922                "BadRequestException" => {
1923                    return RusotoError::Service(CreateGraphqlApiError::BadRequest(err.msg))
1924                }
1925                "ConcurrentModificationException" => {
1926                    return RusotoError::Service(CreateGraphqlApiError::ConcurrentModification(
1927                        err.msg,
1928                    ))
1929                }
1930                "InternalFailureException" => {
1931                    return RusotoError::Service(CreateGraphqlApiError::InternalFailure(err.msg))
1932                }
1933                "LimitExceededException" => {
1934                    return RusotoError::Service(CreateGraphqlApiError::LimitExceeded(err.msg))
1935                }
1936                "UnauthorizedException" => {
1937                    return RusotoError::Service(CreateGraphqlApiError::Unauthorized(err.msg))
1938                }
1939                "ValidationException" => return RusotoError::Validation(err.msg),
1940                _ => {}
1941            }
1942        }
1943        RusotoError::Unknown(res)
1944    }
1945}
1946impl fmt::Display for CreateGraphqlApiError {
1947    #[allow(unused_variables)]
1948    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1949        match *self {
1950            CreateGraphqlApiError::ApiLimitExceeded(ref cause) => write!(f, "{}", cause),
1951            CreateGraphqlApiError::BadRequest(ref cause) => write!(f, "{}", cause),
1952            CreateGraphqlApiError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
1953            CreateGraphqlApiError::InternalFailure(ref cause) => write!(f, "{}", cause),
1954            CreateGraphqlApiError::LimitExceeded(ref cause) => write!(f, "{}", cause),
1955            CreateGraphqlApiError::Unauthorized(ref cause) => write!(f, "{}", cause),
1956        }
1957    }
1958}
1959impl Error for CreateGraphqlApiError {}
1960/// Errors returned by CreateResolver
1961#[derive(Debug, PartialEq)]
1962pub enum CreateResolverError {
1963    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
1964    ConcurrentModification(String),
1965    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
1966    InternalFailure(String),
1967    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
1968    NotFound(String),
1969    /// <p>You are not authorized to perform this operation.</p>
1970    Unauthorized(String),
1971}
1972
1973impl CreateResolverError {
1974    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateResolverError> {
1975        if let Some(err) = proto::json::Error::parse_rest(&res) {
1976            match err.typ.as_str() {
1977                "ConcurrentModificationException" => {
1978                    return RusotoError::Service(CreateResolverError::ConcurrentModification(
1979                        err.msg,
1980                    ))
1981                }
1982                "InternalFailureException" => {
1983                    return RusotoError::Service(CreateResolverError::InternalFailure(err.msg))
1984                }
1985                "NotFoundException" => {
1986                    return RusotoError::Service(CreateResolverError::NotFound(err.msg))
1987                }
1988                "UnauthorizedException" => {
1989                    return RusotoError::Service(CreateResolverError::Unauthorized(err.msg))
1990                }
1991                "ValidationException" => return RusotoError::Validation(err.msg),
1992                _ => {}
1993            }
1994        }
1995        RusotoError::Unknown(res)
1996    }
1997}
1998impl fmt::Display for CreateResolverError {
1999    #[allow(unused_variables)]
2000    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2001        match *self {
2002            CreateResolverError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
2003            CreateResolverError::InternalFailure(ref cause) => write!(f, "{}", cause),
2004            CreateResolverError::NotFound(ref cause) => write!(f, "{}", cause),
2005            CreateResolverError::Unauthorized(ref cause) => write!(f, "{}", cause),
2006        }
2007    }
2008}
2009impl Error for CreateResolverError {}
2010/// Errors returned by CreateType
2011#[derive(Debug, PartialEq)]
2012pub enum CreateTypeError {
2013    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
2014    BadRequest(String),
2015    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
2016    ConcurrentModification(String),
2017    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
2018    InternalFailure(String),
2019    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
2020    NotFound(String),
2021    /// <p>You are not authorized to perform this operation.</p>
2022    Unauthorized(String),
2023}
2024
2025impl CreateTypeError {
2026    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateTypeError> {
2027        if let Some(err) = proto::json::Error::parse_rest(&res) {
2028            match err.typ.as_str() {
2029                "BadRequestException" => {
2030                    return RusotoError::Service(CreateTypeError::BadRequest(err.msg))
2031                }
2032                "ConcurrentModificationException" => {
2033                    return RusotoError::Service(CreateTypeError::ConcurrentModification(err.msg))
2034                }
2035                "InternalFailureException" => {
2036                    return RusotoError::Service(CreateTypeError::InternalFailure(err.msg))
2037                }
2038                "NotFoundException" => {
2039                    return RusotoError::Service(CreateTypeError::NotFound(err.msg))
2040                }
2041                "UnauthorizedException" => {
2042                    return RusotoError::Service(CreateTypeError::Unauthorized(err.msg))
2043                }
2044                "ValidationException" => return RusotoError::Validation(err.msg),
2045                _ => {}
2046            }
2047        }
2048        RusotoError::Unknown(res)
2049    }
2050}
2051impl fmt::Display for CreateTypeError {
2052    #[allow(unused_variables)]
2053    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2054        match *self {
2055            CreateTypeError::BadRequest(ref cause) => write!(f, "{}", cause),
2056            CreateTypeError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
2057            CreateTypeError::InternalFailure(ref cause) => write!(f, "{}", cause),
2058            CreateTypeError::NotFound(ref cause) => write!(f, "{}", cause),
2059            CreateTypeError::Unauthorized(ref cause) => write!(f, "{}", cause),
2060        }
2061    }
2062}
2063impl Error for CreateTypeError {}
2064/// Errors returned by DeleteApiCache
2065#[derive(Debug, PartialEq)]
2066pub enum DeleteApiCacheError {
2067    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
2068    BadRequest(String),
2069    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
2070    ConcurrentModification(String),
2071    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
2072    InternalFailure(String),
2073    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
2074    NotFound(String),
2075    /// <p>You are not authorized to perform this operation.</p>
2076    Unauthorized(String),
2077}
2078
2079impl DeleteApiCacheError {
2080    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteApiCacheError> {
2081        if let Some(err) = proto::json::Error::parse_rest(&res) {
2082            match err.typ.as_str() {
2083                "BadRequestException" => {
2084                    return RusotoError::Service(DeleteApiCacheError::BadRequest(err.msg))
2085                }
2086                "ConcurrentModificationException" => {
2087                    return RusotoError::Service(DeleteApiCacheError::ConcurrentModification(
2088                        err.msg,
2089                    ))
2090                }
2091                "InternalFailureException" => {
2092                    return RusotoError::Service(DeleteApiCacheError::InternalFailure(err.msg))
2093                }
2094                "NotFoundException" => {
2095                    return RusotoError::Service(DeleteApiCacheError::NotFound(err.msg))
2096                }
2097                "UnauthorizedException" => {
2098                    return RusotoError::Service(DeleteApiCacheError::Unauthorized(err.msg))
2099                }
2100                "ValidationException" => return RusotoError::Validation(err.msg),
2101                _ => {}
2102            }
2103        }
2104        RusotoError::Unknown(res)
2105    }
2106}
2107impl fmt::Display for DeleteApiCacheError {
2108    #[allow(unused_variables)]
2109    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2110        match *self {
2111            DeleteApiCacheError::BadRequest(ref cause) => write!(f, "{}", cause),
2112            DeleteApiCacheError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
2113            DeleteApiCacheError::InternalFailure(ref cause) => write!(f, "{}", cause),
2114            DeleteApiCacheError::NotFound(ref cause) => write!(f, "{}", cause),
2115            DeleteApiCacheError::Unauthorized(ref cause) => write!(f, "{}", cause),
2116        }
2117    }
2118}
2119impl Error for DeleteApiCacheError {}
2120/// Errors returned by DeleteApiKey
2121#[derive(Debug, PartialEq)]
2122pub enum DeleteApiKeyError {
2123    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
2124    BadRequest(String),
2125    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
2126    InternalFailure(String),
2127    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
2128    NotFound(String),
2129    /// <p>You are not authorized to perform this operation.</p>
2130    Unauthorized(String),
2131}
2132
2133impl DeleteApiKeyError {
2134    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteApiKeyError> {
2135        if let Some(err) = proto::json::Error::parse_rest(&res) {
2136            match err.typ.as_str() {
2137                "BadRequestException" => {
2138                    return RusotoError::Service(DeleteApiKeyError::BadRequest(err.msg))
2139                }
2140                "InternalFailureException" => {
2141                    return RusotoError::Service(DeleteApiKeyError::InternalFailure(err.msg))
2142                }
2143                "NotFoundException" => {
2144                    return RusotoError::Service(DeleteApiKeyError::NotFound(err.msg))
2145                }
2146                "UnauthorizedException" => {
2147                    return RusotoError::Service(DeleteApiKeyError::Unauthorized(err.msg))
2148                }
2149                "ValidationException" => return RusotoError::Validation(err.msg),
2150                _ => {}
2151            }
2152        }
2153        RusotoError::Unknown(res)
2154    }
2155}
2156impl fmt::Display for DeleteApiKeyError {
2157    #[allow(unused_variables)]
2158    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2159        match *self {
2160            DeleteApiKeyError::BadRequest(ref cause) => write!(f, "{}", cause),
2161            DeleteApiKeyError::InternalFailure(ref cause) => write!(f, "{}", cause),
2162            DeleteApiKeyError::NotFound(ref cause) => write!(f, "{}", cause),
2163            DeleteApiKeyError::Unauthorized(ref cause) => write!(f, "{}", cause),
2164        }
2165    }
2166}
2167impl Error for DeleteApiKeyError {}
2168/// Errors returned by DeleteDataSource
2169#[derive(Debug, PartialEq)]
2170pub enum DeleteDataSourceError {
2171    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
2172    BadRequest(String),
2173    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
2174    ConcurrentModification(String),
2175    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
2176    InternalFailure(String),
2177    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
2178    NotFound(String),
2179    /// <p>You are not authorized to perform this operation.</p>
2180    Unauthorized(String),
2181}
2182
2183impl DeleteDataSourceError {
2184    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDataSourceError> {
2185        if let Some(err) = proto::json::Error::parse_rest(&res) {
2186            match err.typ.as_str() {
2187                "BadRequestException" => {
2188                    return RusotoError::Service(DeleteDataSourceError::BadRequest(err.msg))
2189                }
2190                "ConcurrentModificationException" => {
2191                    return RusotoError::Service(DeleteDataSourceError::ConcurrentModification(
2192                        err.msg,
2193                    ))
2194                }
2195                "InternalFailureException" => {
2196                    return RusotoError::Service(DeleteDataSourceError::InternalFailure(err.msg))
2197                }
2198                "NotFoundException" => {
2199                    return RusotoError::Service(DeleteDataSourceError::NotFound(err.msg))
2200                }
2201                "UnauthorizedException" => {
2202                    return RusotoError::Service(DeleteDataSourceError::Unauthorized(err.msg))
2203                }
2204                "ValidationException" => return RusotoError::Validation(err.msg),
2205                _ => {}
2206            }
2207        }
2208        RusotoError::Unknown(res)
2209    }
2210}
2211impl fmt::Display for DeleteDataSourceError {
2212    #[allow(unused_variables)]
2213    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2214        match *self {
2215            DeleteDataSourceError::BadRequest(ref cause) => write!(f, "{}", cause),
2216            DeleteDataSourceError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
2217            DeleteDataSourceError::InternalFailure(ref cause) => write!(f, "{}", cause),
2218            DeleteDataSourceError::NotFound(ref cause) => write!(f, "{}", cause),
2219            DeleteDataSourceError::Unauthorized(ref cause) => write!(f, "{}", cause),
2220        }
2221    }
2222}
2223impl Error for DeleteDataSourceError {}
2224/// Errors returned by DeleteFunction
2225#[derive(Debug, PartialEq)]
2226pub enum DeleteFunctionError {
2227    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
2228    ConcurrentModification(String),
2229    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
2230    InternalFailure(String),
2231    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
2232    NotFound(String),
2233    /// <p>You are not authorized to perform this operation.</p>
2234    Unauthorized(String),
2235}
2236
2237impl DeleteFunctionError {
2238    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteFunctionError> {
2239        if let Some(err) = proto::json::Error::parse_rest(&res) {
2240            match err.typ.as_str() {
2241                "ConcurrentModificationException" => {
2242                    return RusotoError::Service(DeleteFunctionError::ConcurrentModification(
2243                        err.msg,
2244                    ))
2245                }
2246                "InternalFailureException" => {
2247                    return RusotoError::Service(DeleteFunctionError::InternalFailure(err.msg))
2248                }
2249                "NotFoundException" => {
2250                    return RusotoError::Service(DeleteFunctionError::NotFound(err.msg))
2251                }
2252                "UnauthorizedException" => {
2253                    return RusotoError::Service(DeleteFunctionError::Unauthorized(err.msg))
2254                }
2255                "ValidationException" => return RusotoError::Validation(err.msg),
2256                _ => {}
2257            }
2258        }
2259        RusotoError::Unknown(res)
2260    }
2261}
2262impl fmt::Display for DeleteFunctionError {
2263    #[allow(unused_variables)]
2264    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2265        match *self {
2266            DeleteFunctionError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
2267            DeleteFunctionError::InternalFailure(ref cause) => write!(f, "{}", cause),
2268            DeleteFunctionError::NotFound(ref cause) => write!(f, "{}", cause),
2269            DeleteFunctionError::Unauthorized(ref cause) => write!(f, "{}", cause),
2270        }
2271    }
2272}
2273impl Error for DeleteFunctionError {}
2274/// Errors returned by DeleteGraphqlApi
2275#[derive(Debug, PartialEq)]
2276pub enum DeleteGraphqlApiError {
2277    /// <p>You do not have access to perform this operation on this resource.</p>
2278    AccessDenied(String),
2279    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
2280    BadRequest(String),
2281    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
2282    ConcurrentModification(String),
2283    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
2284    InternalFailure(String),
2285    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
2286    NotFound(String),
2287    /// <p>You are not authorized to perform this operation.</p>
2288    Unauthorized(String),
2289}
2290
2291impl DeleteGraphqlApiError {
2292    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteGraphqlApiError> {
2293        if let Some(err) = proto::json::Error::parse_rest(&res) {
2294            match err.typ.as_str() {
2295                "AccessDeniedException" => {
2296                    return RusotoError::Service(DeleteGraphqlApiError::AccessDenied(err.msg))
2297                }
2298                "BadRequestException" => {
2299                    return RusotoError::Service(DeleteGraphqlApiError::BadRequest(err.msg))
2300                }
2301                "ConcurrentModificationException" => {
2302                    return RusotoError::Service(DeleteGraphqlApiError::ConcurrentModification(
2303                        err.msg,
2304                    ))
2305                }
2306                "InternalFailureException" => {
2307                    return RusotoError::Service(DeleteGraphqlApiError::InternalFailure(err.msg))
2308                }
2309                "NotFoundException" => {
2310                    return RusotoError::Service(DeleteGraphqlApiError::NotFound(err.msg))
2311                }
2312                "UnauthorizedException" => {
2313                    return RusotoError::Service(DeleteGraphqlApiError::Unauthorized(err.msg))
2314                }
2315                "ValidationException" => return RusotoError::Validation(err.msg),
2316                _ => {}
2317            }
2318        }
2319        RusotoError::Unknown(res)
2320    }
2321}
2322impl fmt::Display for DeleteGraphqlApiError {
2323    #[allow(unused_variables)]
2324    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2325        match *self {
2326            DeleteGraphqlApiError::AccessDenied(ref cause) => write!(f, "{}", cause),
2327            DeleteGraphqlApiError::BadRequest(ref cause) => write!(f, "{}", cause),
2328            DeleteGraphqlApiError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
2329            DeleteGraphqlApiError::InternalFailure(ref cause) => write!(f, "{}", cause),
2330            DeleteGraphqlApiError::NotFound(ref cause) => write!(f, "{}", cause),
2331            DeleteGraphqlApiError::Unauthorized(ref cause) => write!(f, "{}", cause),
2332        }
2333    }
2334}
2335impl Error for DeleteGraphqlApiError {}
2336/// Errors returned by DeleteResolver
2337#[derive(Debug, PartialEq)]
2338pub enum DeleteResolverError {
2339    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
2340    ConcurrentModification(String),
2341    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
2342    InternalFailure(String),
2343    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
2344    NotFound(String),
2345    /// <p>You are not authorized to perform this operation.</p>
2346    Unauthorized(String),
2347}
2348
2349impl DeleteResolverError {
2350    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteResolverError> {
2351        if let Some(err) = proto::json::Error::parse_rest(&res) {
2352            match err.typ.as_str() {
2353                "ConcurrentModificationException" => {
2354                    return RusotoError::Service(DeleteResolverError::ConcurrentModification(
2355                        err.msg,
2356                    ))
2357                }
2358                "InternalFailureException" => {
2359                    return RusotoError::Service(DeleteResolverError::InternalFailure(err.msg))
2360                }
2361                "NotFoundException" => {
2362                    return RusotoError::Service(DeleteResolverError::NotFound(err.msg))
2363                }
2364                "UnauthorizedException" => {
2365                    return RusotoError::Service(DeleteResolverError::Unauthorized(err.msg))
2366                }
2367                "ValidationException" => return RusotoError::Validation(err.msg),
2368                _ => {}
2369            }
2370        }
2371        RusotoError::Unknown(res)
2372    }
2373}
2374impl fmt::Display for DeleteResolverError {
2375    #[allow(unused_variables)]
2376    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2377        match *self {
2378            DeleteResolverError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
2379            DeleteResolverError::InternalFailure(ref cause) => write!(f, "{}", cause),
2380            DeleteResolverError::NotFound(ref cause) => write!(f, "{}", cause),
2381            DeleteResolverError::Unauthorized(ref cause) => write!(f, "{}", cause),
2382        }
2383    }
2384}
2385impl Error for DeleteResolverError {}
2386/// Errors returned by DeleteType
2387#[derive(Debug, PartialEq)]
2388pub enum DeleteTypeError {
2389    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
2390    BadRequest(String),
2391    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
2392    ConcurrentModification(String),
2393    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
2394    InternalFailure(String),
2395    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
2396    NotFound(String),
2397    /// <p>You are not authorized to perform this operation.</p>
2398    Unauthorized(String),
2399}
2400
2401impl DeleteTypeError {
2402    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteTypeError> {
2403        if let Some(err) = proto::json::Error::parse_rest(&res) {
2404            match err.typ.as_str() {
2405                "BadRequestException" => {
2406                    return RusotoError::Service(DeleteTypeError::BadRequest(err.msg))
2407                }
2408                "ConcurrentModificationException" => {
2409                    return RusotoError::Service(DeleteTypeError::ConcurrentModification(err.msg))
2410                }
2411                "InternalFailureException" => {
2412                    return RusotoError::Service(DeleteTypeError::InternalFailure(err.msg))
2413                }
2414                "NotFoundException" => {
2415                    return RusotoError::Service(DeleteTypeError::NotFound(err.msg))
2416                }
2417                "UnauthorizedException" => {
2418                    return RusotoError::Service(DeleteTypeError::Unauthorized(err.msg))
2419                }
2420                "ValidationException" => return RusotoError::Validation(err.msg),
2421                _ => {}
2422            }
2423        }
2424        RusotoError::Unknown(res)
2425    }
2426}
2427impl fmt::Display for DeleteTypeError {
2428    #[allow(unused_variables)]
2429    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2430        match *self {
2431            DeleteTypeError::BadRequest(ref cause) => write!(f, "{}", cause),
2432            DeleteTypeError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
2433            DeleteTypeError::InternalFailure(ref cause) => write!(f, "{}", cause),
2434            DeleteTypeError::NotFound(ref cause) => write!(f, "{}", cause),
2435            DeleteTypeError::Unauthorized(ref cause) => write!(f, "{}", cause),
2436        }
2437    }
2438}
2439impl Error for DeleteTypeError {}
2440/// Errors returned by FlushApiCache
2441#[derive(Debug, PartialEq)]
2442pub enum FlushApiCacheError {
2443    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
2444    BadRequest(String),
2445    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
2446    ConcurrentModification(String),
2447    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
2448    InternalFailure(String),
2449    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
2450    NotFound(String),
2451    /// <p>You are not authorized to perform this operation.</p>
2452    Unauthorized(String),
2453}
2454
2455impl FlushApiCacheError {
2456    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<FlushApiCacheError> {
2457        if let Some(err) = proto::json::Error::parse_rest(&res) {
2458            match err.typ.as_str() {
2459                "BadRequestException" => {
2460                    return RusotoError::Service(FlushApiCacheError::BadRequest(err.msg))
2461                }
2462                "ConcurrentModificationException" => {
2463                    return RusotoError::Service(FlushApiCacheError::ConcurrentModification(
2464                        err.msg,
2465                    ))
2466                }
2467                "InternalFailureException" => {
2468                    return RusotoError::Service(FlushApiCacheError::InternalFailure(err.msg))
2469                }
2470                "NotFoundException" => {
2471                    return RusotoError::Service(FlushApiCacheError::NotFound(err.msg))
2472                }
2473                "UnauthorizedException" => {
2474                    return RusotoError::Service(FlushApiCacheError::Unauthorized(err.msg))
2475                }
2476                "ValidationException" => return RusotoError::Validation(err.msg),
2477                _ => {}
2478            }
2479        }
2480        RusotoError::Unknown(res)
2481    }
2482}
2483impl fmt::Display for FlushApiCacheError {
2484    #[allow(unused_variables)]
2485    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2486        match *self {
2487            FlushApiCacheError::BadRequest(ref cause) => write!(f, "{}", cause),
2488            FlushApiCacheError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
2489            FlushApiCacheError::InternalFailure(ref cause) => write!(f, "{}", cause),
2490            FlushApiCacheError::NotFound(ref cause) => write!(f, "{}", cause),
2491            FlushApiCacheError::Unauthorized(ref cause) => write!(f, "{}", cause),
2492        }
2493    }
2494}
2495impl Error for FlushApiCacheError {}
2496/// Errors returned by GetApiCache
2497#[derive(Debug, PartialEq)]
2498pub enum GetApiCacheError {
2499    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
2500    BadRequest(String),
2501    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
2502    ConcurrentModification(String),
2503    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
2504    InternalFailure(String),
2505    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
2506    NotFound(String),
2507    /// <p>You are not authorized to perform this operation.</p>
2508    Unauthorized(String),
2509}
2510
2511impl GetApiCacheError {
2512    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetApiCacheError> {
2513        if let Some(err) = proto::json::Error::parse_rest(&res) {
2514            match err.typ.as_str() {
2515                "BadRequestException" => {
2516                    return RusotoError::Service(GetApiCacheError::BadRequest(err.msg))
2517                }
2518                "ConcurrentModificationException" => {
2519                    return RusotoError::Service(GetApiCacheError::ConcurrentModification(err.msg))
2520                }
2521                "InternalFailureException" => {
2522                    return RusotoError::Service(GetApiCacheError::InternalFailure(err.msg))
2523                }
2524                "NotFoundException" => {
2525                    return RusotoError::Service(GetApiCacheError::NotFound(err.msg))
2526                }
2527                "UnauthorizedException" => {
2528                    return RusotoError::Service(GetApiCacheError::Unauthorized(err.msg))
2529                }
2530                "ValidationException" => return RusotoError::Validation(err.msg),
2531                _ => {}
2532            }
2533        }
2534        RusotoError::Unknown(res)
2535    }
2536}
2537impl fmt::Display for GetApiCacheError {
2538    #[allow(unused_variables)]
2539    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2540        match *self {
2541            GetApiCacheError::BadRequest(ref cause) => write!(f, "{}", cause),
2542            GetApiCacheError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
2543            GetApiCacheError::InternalFailure(ref cause) => write!(f, "{}", cause),
2544            GetApiCacheError::NotFound(ref cause) => write!(f, "{}", cause),
2545            GetApiCacheError::Unauthorized(ref cause) => write!(f, "{}", cause),
2546        }
2547    }
2548}
2549impl Error for GetApiCacheError {}
2550/// Errors returned by GetDataSource
2551#[derive(Debug, PartialEq)]
2552pub enum GetDataSourceError {
2553    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
2554    BadRequest(String),
2555    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
2556    ConcurrentModification(String),
2557    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
2558    InternalFailure(String),
2559    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
2560    NotFound(String),
2561    /// <p>You are not authorized to perform this operation.</p>
2562    Unauthorized(String),
2563}
2564
2565impl GetDataSourceError {
2566    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDataSourceError> {
2567        if let Some(err) = proto::json::Error::parse_rest(&res) {
2568            match err.typ.as_str() {
2569                "BadRequestException" => {
2570                    return RusotoError::Service(GetDataSourceError::BadRequest(err.msg))
2571                }
2572                "ConcurrentModificationException" => {
2573                    return RusotoError::Service(GetDataSourceError::ConcurrentModification(
2574                        err.msg,
2575                    ))
2576                }
2577                "InternalFailureException" => {
2578                    return RusotoError::Service(GetDataSourceError::InternalFailure(err.msg))
2579                }
2580                "NotFoundException" => {
2581                    return RusotoError::Service(GetDataSourceError::NotFound(err.msg))
2582                }
2583                "UnauthorizedException" => {
2584                    return RusotoError::Service(GetDataSourceError::Unauthorized(err.msg))
2585                }
2586                "ValidationException" => return RusotoError::Validation(err.msg),
2587                _ => {}
2588            }
2589        }
2590        RusotoError::Unknown(res)
2591    }
2592}
2593impl fmt::Display for GetDataSourceError {
2594    #[allow(unused_variables)]
2595    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2596        match *self {
2597            GetDataSourceError::BadRequest(ref cause) => write!(f, "{}", cause),
2598            GetDataSourceError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
2599            GetDataSourceError::InternalFailure(ref cause) => write!(f, "{}", cause),
2600            GetDataSourceError::NotFound(ref cause) => write!(f, "{}", cause),
2601            GetDataSourceError::Unauthorized(ref cause) => write!(f, "{}", cause),
2602        }
2603    }
2604}
2605impl Error for GetDataSourceError {}
2606/// Errors returned by GetFunction
2607#[derive(Debug, PartialEq)]
2608pub enum GetFunctionError {
2609    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
2610    ConcurrentModification(String),
2611    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
2612    NotFound(String),
2613    /// <p>You are not authorized to perform this operation.</p>
2614    Unauthorized(String),
2615}
2616
2617impl GetFunctionError {
2618    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetFunctionError> {
2619        if let Some(err) = proto::json::Error::parse_rest(&res) {
2620            match err.typ.as_str() {
2621                "ConcurrentModificationException" => {
2622                    return RusotoError::Service(GetFunctionError::ConcurrentModification(err.msg))
2623                }
2624                "NotFoundException" => {
2625                    return RusotoError::Service(GetFunctionError::NotFound(err.msg))
2626                }
2627                "UnauthorizedException" => {
2628                    return RusotoError::Service(GetFunctionError::Unauthorized(err.msg))
2629                }
2630                "ValidationException" => return RusotoError::Validation(err.msg),
2631                _ => {}
2632            }
2633        }
2634        RusotoError::Unknown(res)
2635    }
2636}
2637impl fmt::Display for GetFunctionError {
2638    #[allow(unused_variables)]
2639    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2640        match *self {
2641            GetFunctionError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
2642            GetFunctionError::NotFound(ref cause) => write!(f, "{}", cause),
2643            GetFunctionError::Unauthorized(ref cause) => write!(f, "{}", cause),
2644        }
2645    }
2646}
2647impl Error for GetFunctionError {}
2648/// Errors returned by GetGraphqlApi
2649#[derive(Debug, PartialEq)]
2650pub enum GetGraphqlApiError {
2651    /// <p>You do not have access to perform this operation on this resource.</p>
2652    AccessDenied(String),
2653    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
2654    BadRequest(String),
2655    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
2656    InternalFailure(String),
2657    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
2658    NotFound(String),
2659    /// <p>You are not authorized to perform this operation.</p>
2660    Unauthorized(String),
2661}
2662
2663impl GetGraphqlApiError {
2664    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetGraphqlApiError> {
2665        if let Some(err) = proto::json::Error::parse_rest(&res) {
2666            match err.typ.as_str() {
2667                "AccessDeniedException" => {
2668                    return RusotoError::Service(GetGraphqlApiError::AccessDenied(err.msg))
2669                }
2670                "BadRequestException" => {
2671                    return RusotoError::Service(GetGraphqlApiError::BadRequest(err.msg))
2672                }
2673                "InternalFailureException" => {
2674                    return RusotoError::Service(GetGraphqlApiError::InternalFailure(err.msg))
2675                }
2676                "NotFoundException" => {
2677                    return RusotoError::Service(GetGraphqlApiError::NotFound(err.msg))
2678                }
2679                "UnauthorizedException" => {
2680                    return RusotoError::Service(GetGraphqlApiError::Unauthorized(err.msg))
2681                }
2682                "ValidationException" => return RusotoError::Validation(err.msg),
2683                _ => {}
2684            }
2685        }
2686        RusotoError::Unknown(res)
2687    }
2688}
2689impl fmt::Display for GetGraphqlApiError {
2690    #[allow(unused_variables)]
2691    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2692        match *self {
2693            GetGraphqlApiError::AccessDenied(ref cause) => write!(f, "{}", cause),
2694            GetGraphqlApiError::BadRequest(ref cause) => write!(f, "{}", cause),
2695            GetGraphqlApiError::InternalFailure(ref cause) => write!(f, "{}", cause),
2696            GetGraphqlApiError::NotFound(ref cause) => write!(f, "{}", cause),
2697            GetGraphqlApiError::Unauthorized(ref cause) => write!(f, "{}", cause),
2698        }
2699    }
2700}
2701impl Error for GetGraphqlApiError {}
2702/// Errors returned by GetIntrospectionSchema
2703#[derive(Debug, PartialEq)]
2704pub enum GetIntrospectionSchemaError {
2705    /// <p>The GraphQL schema is not valid.</p>
2706    GraphQLSchema(String),
2707    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
2708    InternalFailure(String),
2709    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
2710    NotFound(String),
2711    /// <p>You are not authorized to perform this operation.</p>
2712    Unauthorized(String),
2713}
2714
2715impl GetIntrospectionSchemaError {
2716    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetIntrospectionSchemaError> {
2717        if let Some(err) = proto::json::Error::parse_rest(&res) {
2718            match err.typ.as_str() {
2719                "GraphQLSchemaException" => {
2720                    return RusotoError::Service(GetIntrospectionSchemaError::GraphQLSchema(
2721                        err.msg,
2722                    ))
2723                }
2724                "InternalFailureException" => {
2725                    return RusotoError::Service(GetIntrospectionSchemaError::InternalFailure(
2726                        err.msg,
2727                    ))
2728                }
2729                "NotFoundException" => {
2730                    return RusotoError::Service(GetIntrospectionSchemaError::NotFound(err.msg))
2731                }
2732                "UnauthorizedException" => {
2733                    return RusotoError::Service(GetIntrospectionSchemaError::Unauthorized(err.msg))
2734                }
2735                "ValidationException" => return RusotoError::Validation(err.msg),
2736                _ => {}
2737            }
2738        }
2739        RusotoError::Unknown(res)
2740    }
2741}
2742impl fmt::Display for GetIntrospectionSchemaError {
2743    #[allow(unused_variables)]
2744    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2745        match *self {
2746            GetIntrospectionSchemaError::GraphQLSchema(ref cause) => write!(f, "{}", cause),
2747            GetIntrospectionSchemaError::InternalFailure(ref cause) => write!(f, "{}", cause),
2748            GetIntrospectionSchemaError::NotFound(ref cause) => write!(f, "{}", cause),
2749            GetIntrospectionSchemaError::Unauthorized(ref cause) => write!(f, "{}", cause),
2750        }
2751    }
2752}
2753impl Error for GetIntrospectionSchemaError {}
2754/// Errors returned by GetResolver
2755#[derive(Debug, PartialEq)]
2756pub enum GetResolverError {
2757    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
2758    ConcurrentModification(String),
2759    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
2760    NotFound(String),
2761    /// <p>You are not authorized to perform this operation.</p>
2762    Unauthorized(String),
2763}
2764
2765impl GetResolverError {
2766    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetResolverError> {
2767        if let Some(err) = proto::json::Error::parse_rest(&res) {
2768            match err.typ.as_str() {
2769                "ConcurrentModificationException" => {
2770                    return RusotoError::Service(GetResolverError::ConcurrentModification(err.msg))
2771                }
2772                "NotFoundException" => {
2773                    return RusotoError::Service(GetResolverError::NotFound(err.msg))
2774                }
2775                "UnauthorizedException" => {
2776                    return RusotoError::Service(GetResolverError::Unauthorized(err.msg))
2777                }
2778                "ValidationException" => return RusotoError::Validation(err.msg),
2779                _ => {}
2780            }
2781        }
2782        RusotoError::Unknown(res)
2783    }
2784}
2785impl fmt::Display for GetResolverError {
2786    #[allow(unused_variables)]
2787    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2788        match *self {
2789            GetResolverError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
2790            GetResolverError::NotFound(ref cause) => write!(f, "{}", cause),
2791            GetResolverError::Unauthorized(ref cause) => write!(f, "{}", cause),
2792        }
2793    }
2794}
2795impl Error for GetResolverError {}
2796/// Errors returned by GetSchemaCreationStatus
2797#[derive(Debug, PartialEq)]
2798pub enum GetSchemaCreationStatusError {
2799    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
2800    BadRequest(String),
2801    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
2802    InternalFailure(String),
2803    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
2804    NotFound(String),
2805    /// <p>You are not authorized to perform this operation.</p>
2806    Unauthorized(String),
2807}
2808
2809impl GetSchemaCreationStatusError {
2810    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSchemaCreationStatusError> {
2811        if let Some(err) = proto::json::Error::parse_rest(&res) {
2812            match err.typ.as_str() {
2813                "BadRequestException" => {
2814                    return RusotoError::Service(GetSchemaCreationStatusError::BadRequest(err.msg))
2815                }
2816                "InternalFailureException" => {
2817                    return RusotoError::Service(GetSchemaCreationStatusError::InternalFailure(
2818                        err.msg,
2819                    ))
2820                }
2821                "NotFoundException" => {
2822                    return RusotoError::Service(GetSchemaCreationStatusError::NotFound(err.msg))
2823                }
2824                "UnauthorizedException" => {
2825                    return RusotoError::Service(GetSchemaCreationStatusError::Unauthorized(
2826                        err.msg,
2827                    ))
2828                }
2829                "ValidationException" => return RusotoError::Validation(err.msg),
2830                _ => {}
2831            }
2832        }
2833        RusotoError::Unknown(res)
2834    }
2835}
2836impl fmt::Display for GetSchemaCreationStatusError {
2837    #[allow(unused_variables)]
2838    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2839        match *self {
2840            GetSchemaCreationStatusError::BadRequest(ref cause) => write!(f, "{}", cause),
2841            GetSchemaCreationStatusError::InternalFailure(ref cause) => write!(f, "{}", cause),
2842            GetSchemaCreationStatusError::NotFound(ref cause) => write!(f, "{}", cause),
2843            GetSchemaCreationStatusError::Unauthorized(ref cause) => write!(f, "{}", cause),
2844        }
2845    }
2846}
2847impl Error for GetSchemaCreationStatusError {}
2848/// Errors returned by GetType
2849#[derive(Debug, PartialEq)]
2850pub enum GetTypeError {
2851    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
2852    BadRequest(String),
2853    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
2854    ConcurrentModification(String),
2855    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
2856    InternalFailure(String),
2857    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
2858    NotFound(String),
2859    /// <p>You are not authorized to perform this operation.</p>
2860    Unauthorized(String),
2861}
2862
2863impl GetTypeError {
2864    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetTypeError> {
2865        if let Some(err) = proto::json::Error::parse_rest(&res) {
2866            match err.typ.as_str() {
2867                "BadRequestException" => {
2868                    return RusotoError::Service(GetTypeError::BadRequest(err.msg))
2869                }
2870                "ConcurrentModificationException" => {
2871                    return RusotoError::Service(GetTypeError::ConcurrentModification(err.msg))
2872                }
2873                "InternalFailureException" => {
2874                    return RusotoError::Service(GetTypeError::InternalFailure(err.msg))
2875                }
2876                "NotFoundException" => {
2877                    return RusotoError::Service(GetTypeError::NotFound(err.msg))
2878                }
2879                "UnauthorizedException" => {
2880                    return RusotoError::Service(GetTypeError::Unauthorized(err.msg))
2881                }
2882                "ValidationException" => return RusotoError::Validation(err.msg),
2883                _ => {}
2884            }
2885        }
2886        RusotoError::Unknown(res)
2887    }
2888}
2889impl fmt::Display for GetTypeError {
2890    #[allow(unused_variables)]
2891    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2892        match *self {
2893            GetTypeError::BadRequest(ref cause) => write!(f, "{}", cause),
2894            GetTypeError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
2895            GetTypeError::InternalFailure(ref cause) => write!(f, "{}", cause),
2896            GetTypeError::NotFound(ref cause) => write!(f, "{}", cause),
2897            GetTypeError::Unauthorized(ref cause) => write!(f, "{}", cause),
2898        }
2899    }
2900}
2901impl Error for GetTypeError {}
2902/// Errors returned by ListApiKeys
2903#[derive(Debug, PartialEq)]
2904pub enum ListApiKeysError {
2905    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
2906    BadRequest(String),
2907    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
2908    InternalFailure(String),
2909    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
2910    NotFound(String),
2911    /// <p>You are not authorized to perform this operation.</p>
2912    Unauthorized(String),
2913}
2914
2915impl ListApiKeysError {
2916    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListApiKeysError> {
2917        if let Some(err) = proto::json::Error::parse_rest(&res) {
2918            match err.typ.as_str() {
2919                "BadRequestException" => {
2920                    return RusotoError::Service(ListApiKeysError::BadRequest(err.msg))
2921                }
2922                "InternalFailureException" => {
2923                    return RusotoError::Service(ListApiKeysError::InternalFailure(err.msg))
2924                }
2925                "NotFoundException" => {
2926                    return RusotoError::Service(ListApiKeysError::NotFound(err.msg))
2927                }
2928                "UnauthorizedException" => {
2929                    return RusotoError::Service(ListApiKeysError::Unauthorized(err.msg))
2930                }
2931                "ValidationException" => return RusotoError::Validation(err.msg),
2932                _ => {}
2933            }
2934        }
2935        RusotoError::Unknown(res)
2936    }
2937}
2938impl fmt::Display for ListApiKeysError {
2939    #[allow(unused_variables)]
2940    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2941        match *self {
2942            ListApiKeysError::BadRequest(ref cause) => write!(f, "{}", cause),
2943            ListApiKeysError::InternalFailure(ref cause) => write!(f, "{}", cause),
2944            ListApiKeysError::NotFound(ref cause) => write!(f, "{}", cause),
2945            ListApiKeysError::Unauthorized(ref cause) => write!(f, "{}", cause),
2946        }
2947    }
2948}
2949impl Error for ListApiKeysError {}
2950/// Errors returned by ListDataSources
2951#[derive(Debug, PartialEq)]
2952pub enum ListDataSourcesError {
2953    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
2954    BadRequest(String),
2955    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
2956    InternalFailure(String),
2957    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
2958    NotFound(String),
2959    /// <p>You are not authorized to perform this operation.</p>
2960    Unauthorized(String),
2961}
2962
2963impl ListDataSourcesError {
2964    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListDataSourcesError> {
2965        if let Some(err) = proto::json::Error::parse_rest(&res) {
2966            match err.typ.as_str() {
2967                "BadRequestException" => {
2968                    return RusotoError::Service(ListDataSourcesError::BadRequest(err.msg))
2969                }
2970                "InternalFailureException" => {
2971                    return RusotoError::Service(ListDataSourcesError::InternalFailure(err.msg))
2972                }
2973                "NotFoundException" => {
2974                    return RusotoError::Service(ListDataSourcesError::NotFound(err.msg))
2975                }
2976                "UnauthorizedException" => {
2977                    return RusotoError::Service(ListDataSourcesError::Unauthorized(err.msg))
2978                }
2979                "ValidationException" => return RusotoError::Validation(err.msg),
2980                _ => {}
2981            }
2982        }
2983        RusotoError::Unknown(res)
2984    }
2985}
2986impl fmt::Display for ListDataSourcesError {
2987    #[allow(unused_variables)]
2988    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2989        match *self {
2990            ListDataSourcesError::BadRequest(ref cause) => write!(f, "{}", cause),
2991            ListDataSourcesError::InternalFailure(ref cause) => write!(f, "{}", cause),
2992            ListDataSourcesError::NotFound(ref cause) => write!(f, "{}", cause),
2993            ListDataSourcesError::Unauthorized(ref cause) => write!(f, "{}", cause),
2994        }
2995    }
2996}
2997impl Error for ListDataSourcesError {}
2998/// Errors returned by ListFunctions
2999#[derive(Debug, PartialEq)]
3000pub enum ListFunctionsError {
3001    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
3002    BadRequest(String),
3003    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
3004    InternalFailure(String),
3005    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
3006    NotFound(String),
3007    /// <p>You are not authorized to perform this operation.</p>
3008    Unauthorized(String),
3009}
3010
3011impl ListFunctionsError {
3012    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListFunctionsError> {
3013        if let Some(err) = proto::json::Error::parse_rest(&res) {
3014            match err.typ.as_str() {
3015                "BadRequestException" => {
3016                    return RusotoError::Service(ListFunctionsError::BadRequest(err.msg))
3017                }
3018                "InternalFailureException" => {
3019                    return RusotoError::Service(ListFunctionsError::InternalFailure(err.msg))
3020                }
3021                "NotFoundException" => {
3022                    return RusotoError::Service(ListFunctionsError::NotFound(err.msg))
3023                }
3024                "UnauthorizedException" => {
3025                    return RusotoError::Service(ListFunctionsError::Unauthorized(err.msg))
3026                }
3027                "ValidationException" => return RusotoError::Validation(err.msg),
3028                _ => {}
3029            }
3030        }
3031        RusotoError::Unknown(res)
3032    }
3033}
3034impl fmt::Display for ListFunctionsError {
3035    #[allow(unused_variables)]
3036    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3037        match *self {
3038            ListFunctionsError::BadRequest(ref cause) => write!(f, "{}", cause),
3039            ListFunctionsError::InternalFailure(ref cause) => write!(f, "{}", cause),
3040            ListFunctionsError::NotFound(ref cause) => write!(f, "{}", cause),
3041            ListFunctionsError::Unauthorized(ref cause) => write!(f, "{}", cause),
3042        }
3043    }
3044}
3045impl Error for ListFunctionsError {}
3046/// Errors returned by ListGraphqlApis
3047#[derive(Debug, PartialEq)]
3048pub enum ListGraphqlApisError {
3049    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
3050    BadRequest(String),
3051    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
3052    InternalFailure(String),
3053    /// <p>You are not authorized to perform this operation.</p>
3054    Unauthorized(String),
3055}
3056
3057impl ListGraphqlApisError {
3058    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListGraphqlApisError> {
3059        if let Some(err) = proto::json::Error::parse_rest(&res) {
3060            match err.typ.as_str() {
3061                "BadRequestException" => {
3062                    return RusotoError::Service(ListGraphqlApisError::BadRequest(err.msg))
3063                }
3064                "InternalFailureException" => {
3065                    return RusotoError::Service(ListGraphqlApisError::InternalFailure(err.msg))
3066                }
3067                "UnauthorizedException" => {
3068                    return RusotoError::Service(ListGraphqlApisError::Unauthorized(err.msg))
3069                }
3070                "ValidationException" => return RusotoError::Validation(err.msg),
3071                _ => {}
3072            }
3073        }
3074        RusotoError::Unknown(res)
3075    }
3076}
3077impl fmt::Display for ListGraphqlApisError {
3078    #[allow(unused_variables)]
3079    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3080        match *self {
3081            ListGraphqlApisError::BadRequest(ref cause) => write!(f, "{}", cause),
3082            ListGraphqlApisError::InternalFailure(ref cause) => write!(f, "{}", cause),
3083            ListGraphqlApisError::Unauthorized(ref cause) => write!(f, "{}", cause),
3084        }
3085    }
3086}
3087impl Error for ListGraphqlApisError {}
3088/// Errors returned by ListResolvers
3089#[derive(Debug, PartialEq)]
3090pub enum ListResolversError {
3091    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
3092    BadRequest(String),
3093    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
3094    InternalFailure(String),
3095    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
3096    NotFound(String),
3097    /// <p>You are not authorized to perform this operation.</p>
3098    Unauthorized(String),
3099}
3100
3101impl ListResolversError {
3102    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListResolversError> {
3103        if let Some(err) = proto::json::Error::parse_rest(&res) {
3104            match err.typ.as_str() {
3105                "BadRequestException" => {
3106                    return RusotoError::Service(ListResolversError::BadRequest(err.msg))
3107                }
3108                "InternalFailureException" => {
3109                    return RusotoError::Service(ListResolversError::InternalFailure(err.msg))
3110                }
3111                "NotFoundException" => {
3112                    return RusotoError::Service(ListResolversError::NotFound(err.msg))
3113                }
3114                "UnauthorizedException" => {
3115                    return RusotoError::Service(ListResolversError::Unauthorized(err.msg))
3116                }
3117                "ValidationException" => return RusotoError::Validation(err.msg),
3118                _ => {}
3119            }
3120        }
3121        RusotoError::Unknown(res)
3122    }
3123}
3124impl fmt::Display for ListResolversError {
3125    #[allow(unused_variables)]
3126    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3127        match *self {
3128            ListResolversError::BadRequest(ref cause) => write!(f, "{}", cause),
3129            ListResolversError::InternalFailure(ref cause) => write!(f, "{}", cause),
3130            ListResolversError::NotFound(ref cause) => write!(f, "{}", cause),
3131            ListResolversError::Unauthorized(ref cause) => write!(f, "{}", cause),
3132        }
3133    }
3134}
3135impl Error for ListResolversError {}
3136/// Errors returned by ListResolversByFunction
3137#[derive(Debug, PartialEq)]
3138pub enum ListResolversByFunctionError {
3139    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
3140    BadRequest(String),
3141    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
3142    InternalFailure(String),
3143    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
3144    NotFound(String),
3145    /// <p>You are not authorized to perform this operation.</p>
3146    Unauthorized(String),
3147}
3148
3149impl ListResolversByFunctionError {
3150    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListResolversByFunctionError> {
3151        if let Some(err) = proto::json::Error::parse_rest(&res) {
3152            match err.typ.as_str() {
3153                "BadRequestException" => {
3154                    return RusotoError::Service(ListResolversByFunctionError::BadRequest(err.msg))
3155                }
3156                "InternalFailureException" => {
3157                    return RusotoError::Service(ListResolversByFunctionError::InternalFailure(
3158                        err.msg,
3159                    ))
3160                }
3161                "NotFoundException" => {
3162                    return RusotoError::Service(ListResolversByFunctionError::NotFound(err.msg))
3163                }
3164                "UnauthorizedException" => {
3165                    return RusotoError::Service(ListResolversByFunctionError::Unauthorized(
3166                        err.msg,
3167                    ))
3168                }
3169                "ValidationException" => return RusotoError::Validation(err.msg),
3170                _ => {}
3171            }
3172        }
3173        RusotoError::Unknown(res)
3174    }
3175}
3176impl fmt::Display for ListResolversByFunctionError {
3177    #[allow(unused_variables)]
3178    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3179        match *self {
3180            ListResolversByFunctionError::BadRequest(ref cause) => write!(f, "{}", cause),
3181            ListResolversByFunctionError::InternalFailure(ref cause) => write!(f, "{}", cause),
3182            ListResolversByFunctionError::NotFound(ref cause) => write!(f, "{}", cause),
3183            ListResolversByFunctionError::Unauthorized(ref cause) => write!(f, "{}", cause),
3184        }
3185    }
3186}
3187impl Error for ListResolversByFunctionError {}
3188/// Errors returned by ListTagsForResource
3189#[derive(Debug, PartialEq)]
3190pub enum ListTagsForResourceError {
3191    /// <p>You do not have access to perform this operation on this resource.</p>
3192    AccessDenied(String),
3193    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
3194    BadRequest(String),
3195    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
3196    InternalFailure(String),
3197    /// <p>The request exceeded a limit. Try your request again.</p>
3198    LimitExceeded(String),
3199    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
3200    NotFound(String),
3201    /// <p>You are not authorized to perform this operation.</p>
3202    Unauthorized(String),
3203}
3204
3205impl ListTagsForResourceError {
3206    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
3207        if let Some(err) = proto::json::Error::parse_rest(&res) {
3208            match err.typ.as_str() {
3209                "AccessDeniedException" => {
3210                    return RusotoError::Service(ListTagsForResourceError::AccessDenied(err.msg))
3211                }
3212                "BadRequestException" => {
3213                    return RusotoError::Service(ListTagsForResourceError::BadRequest(err.msg))
3214                }
3215                "InternalFailureException" => {
3216                    return RusotoError::Service(ListTagsForResourceError::InternalFailure(err.msg))
3217                }
3218                "LimitExceededException" => {
3219                    return RusotoError::Service(ListTagsForResourceError::LimitExceeded(err.msg))
3220                }
3221                "NotFoundException" => {
3222                    return RusotoError::Service(ListTagsForResourceError::NotFound(err.msg))
3223                }
3224                "UnauthorizedException" => {
3225                    return RusotoError::Service(ListTagsForResourceError::Unauthorized(err.msg))
3226                }
3227                "ValidationException" => return RusotoError::Validation(err.msg),
3228                _ => {}
3229            }
3230        }
3231        RusotoError::Unknown(res)
3232    }
3233}
3234impl fmt::Display for ListTagsForResourceError {
3235    #[allow(unused_variables)]
3236    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3237        match *self {
3238            ListTagsForResourceError::AccessDenied(ref cause) => write!(f, "{}", cause),
3239            ListTagsForResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
3240            ListTagsForResourceError::InternalFailure(ref cause) => write!(f, "{}", cause),
3241            ListTagsForResourceError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3242            ListTagsForResourceError::NotFound(ref cause) => write!(f, "{}", cause),
3243            ListTagsForResourceError::Unauthorized(ref cause) => write!(f, "{}", cause),
3244        }
3245    }
3246}
3247impl Error for ListTagsForResourceError {}
3248/// Errors returned by ListTypes
3249#[derive(Debug, PartialEq)]
3250pub enum ListTypesError {
3251    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
3252    BadRequest(String),
3253    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
3254    ConcurrentModification(String),
3255    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
3256    InternalFailure(String),
3257    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
3258    NotFound(String),
3259    /// <p>You are not authorized to perform this operation.</p>
3260    Unauthorized(String),
3261}
3262
3263impl ListTypesError {
3264    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTypesError> {
3265        if let Some(err) = proto::json::Error::parse_rest(&res) {
3266            match err.typ.as_str() {
3267                "BadRequestException" => {
3268                    return RusotoError::Service(ListTypesError::BadRequest(err.msg))
3269                }
3270                "ConcurrentModificationException" => {
3271                    return RusotoError::Service(ListTypesError::ConcurrentModification(err.msg))
3272                }
3273                "InternalFailureException" => {
3274                    return RusotoError::Service(ListTypesError::InternalFailure(err.msg))
3275                }
3276                "NotFoundException" => {
3277                    return RusotoError::Service(ListTypesError::NotFound(err.msg))
3278                }
3279                "UnauthorizedException" => {
3280                    return RusotoError::Service(ListTypesError::Unauthorized(err.msg))
3281                }
3282                "ValidationException" => return RusotoError::Validation(err.msg),
3283                _ => {}
3284            }
3285        }
3286        RusotoError::Unknown(res)
3287    }
3288}
3289impl fmt::Display for ListTypesError {
3290    #[allow(unused_variables)]
3291    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3292        match *self {
3293            ListTypesError::BadRequest(ref cause) => write!(f, "{}", cause),
3294            ListTypesError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
3295            ListTypesError::InternalFailure(ref cause) => write!(f, "{}", cause),
3296            ListTypesError::NotFound(ref cause) => write!(f, "{}", cause),
3297            ListTypesError::Unauthorized(ref cause) => write!(f, "{}", cause),
3298        }
3299    }
3300}
3301impl Error for ListTypesError {}
3302/// Errors returned by StartSchemaCreation
3303#[derive(Debug, PartialEq)]
3304pub enum StartSchemaCreationError {
3305    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
3306    BadRequest(String),
3307    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
3308    ConcurrentModification(String),
3309    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
3310    InternalFailure(String),
3311    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
3312    NotFound(String),
3313    /// <p>You are not authorized to perform this operation.</p>
3314    Unauthorized(String),
3315}
3316
3317impl StartSchemaCreationError {
3318    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartSchemaCreationError> {
3319        if let Some(err) = proto::json::Error::parse_rest(&res) {
3320            match err.typ.as_str() {
3321                "BadRequestException" => {
3322                    return RusotoError::Service(StartSchemaCreationError::BadRequest(err.msg))
3323                }
3324                "ConcurrentModificationException" => {
3325                    return RusotoError::Service(StartSchemaCreationError::ConcurrentModification(
3326                        err.msg,
3327                    ))
3328                }
3329                "InternalFailureException" => {
3330                    return RusotoError::Service(StartSchemaCreationError::InternalFailure(err.msg))
3331                }
3332                "NotFoundException" => {
3333                    return RusotoError::Service(StartSchemaCreationError::NotFound(err.msg))
3334                }
3335                "UnauthorizedException" => {
3336                    return RusotoError::Service(StartSchemaCreationError::Unauthorized(err.msg))
3337                }
3338                "ValidationException" => return RusotoError::Validation(err.msg),
3339                _ => {}
3340            }
3341        }
3342        RusotoError::Unknown(res)
3343    }
3344}
3345impl fmt::Display for StartSchemaCreationError {
3346    #[allow(unused_variables)]
3347    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3348        match *self {
3349            StartSchemaCreationError::BadRequest(ref cause) => write!(f, "{}", cause),
3350            StartSchemaCreationError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
3351            StartSchemaCreationError::InternalFailure(ref cause) => write!(f, "{}", cause),
3352            StartSchemaCreationError::NotFound(ref cause) => write!(f, "{}", cause),
3353            StartSchemaCreationError::Unauthorized(ref cause) => write!(f, "{}", cause),
3354        }
3355    }
3356}
3357impl Error for StartSchemaCreationError {}
3358/// Errors returned by TagResource
3359#[derive(Debug, PartialEq)]
3360pub enum TagResourceError {
3361    /// <p>You do not have access to perform this operation on this resource.</p>
3362    AccessDenied(String),
3363    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
3364    BadRequest(String),
3365    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
3366    InternalFailure(String),
3367    /// <p>The request exceeded a limit. Try your request again.</p>
3368    LimitExceeded(String),
3369    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
3370    NotFound(String),
3371    /// <p>You are not authorized to perform this operation.</p>
3372    Unauthorized(String),
3373}
3374
3375impl TagResourceError {
3376    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
3377        if let Some(err) = proto::json::Error::parse_rest(&res) {
3378            match err.typ.as_str() {
3379                "AccessDeniedException" => {
3380                    return RusotoError::Service(TagResourceError::AccessDenied(err.msg))
3381                }
3382                "BadRequestException" => {
3383                    return RusotoError::Service(TagResourceError::BadRequest(err.msg))
3384                }
3385                "InternalFailureException" => {
3386                    return RusotoError::Service(TagResourceError::InternalFailure(err.msg))
3387                }
3388                "LimitExceededException" => {
3389                    return RusotoError::Service(TagResourceError::LimitExceeded(err.msg))
3390                }
3391                "NotFoundException" => {
3392                    return RusotoError::Service(TagResourceError::NotFound(err.msg))
3393                }
3394                "UnauthorizedException" => {
3395                    return RusotoError::Service(TagResourceError::Unauthorized(err.msg))
3396                }
3397                "ValidationException" => return RusotoError::Validation(err.msg),
3398                _ => {}
3399            }
3400        }
3401        RusotoError::Unknown(res)
3402    }
3403}
3404impl fmt::Display for TagResourceError {
3405    #[allow(unused_variables)]
3406    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3407        match *self {
3408            TagResourceError::AccessDenied(ref cause) => write!(f, "{}", cause),
3409            TagResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
3410            TagResourceError::InternalFailure(ref cause) => write!(f, "{}", cause),
3411            TagResourceError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3412            TagResourceError::NotFound(ref cause) => write!(f, "{}", cause),
3413            TagResourceError::Unauthorized(ref cause) => write!(f, "{}", cause),
3414        }
3415    }
3416}
3417impl Error for TagResourceError {}
3418/// Errors returned by UntagResource
3419#[derive(Debug, PartialEq)]
3420pub enum UntagResourceError {
3421    /// <p>You do not have access to perform this operation on this resource.</p>
3422    AccessDenied(String),
3423    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
3424    BadRequest(String),
3425    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
3426    InternalFailure(String),
3427    /// <p>The request exceeded a limit. Try your request again.</p>
3428    LimitExceeded(String),
3429    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
3430    NotFound(String),
3431    /// <p>You are not authorized to perform this operation.</p>
3432    Unauthorized(String),
3433}
3434
3435impl UntagResourceError {
3436    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
3437        if let Some(err) = proto::json::Error::parse_rest(&res) {
3438            match err.typ.as_str() {
3439                "AccessDeniedException" => {
3440                    return RusotoError::Service(UntagResourceError::AccessDenied(err.msg))
3441                }
3442                "BadRequestException" => {
3443                    return RusotoError::Service(UntagResourceError::BadRequest(err.msg))
3444                }
3445                "InternalFailureException" => {
3446                    return RusotoError::Service(UntagResourceError::InternalFailure(err.msg))
3447                }
3448                "LimitExceededException" => {
3449                    return RusotoError::Service(UntagResourceError::LimitExceeded(err.msg))
3450                }
3451                "NotFoundException" => {
3452                    return RusotoError::Service(UntagResourceError::NotFound(err.msg))
3453                }
3454                "UnauthorizedException" => {
3455                    return RusotoError::Service(UntagResourceError::Unauthorized(err.msg))
3456                }
3457                "ValidationException" => return RusotoError::Validation(err.msg),
3458                _ => {}
3459            }
3460        }
3461        RusotoError::Unknown(res)
3462    }
3463}
3464impl fmt::Display for UntagResourceError {
3465    #[allow(unused_variables)]
3466    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3467        match *self {
3468            UntagResourceError::AccessDenied(ref cause) => write!(f, "{}", cause),
3469            UntagResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
3470            UntagResourceError::InternalFailure(ref cause) => write!(f, "{}", cause),
3471            UntagResourceError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3472            UntagResourceError::NotFound(ref cause) => write!(f, "{}", cause),
3473            UntagResourceError::Unauthorized(ref cause) => write!(f, "{}", cause),
3474        }
3475    }
3476}
3477impl Error for UntagResourceError {}
3478/// Errors returned by UpdateApiCache
3479#[derive(Debug, PartialEq)]
3480pub enum UpdateApiCacheError {
3481    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
3482    BadRequest(String),
3483    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
3484    ConcurrentModification(String),
3485    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
3486    InternalFailure(String),
3487    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
3488    NotFound(String),
3489    /// <p>You are not authorized to perform this operation.</p>
3490    Unauthorized(String),
3491}
3492
3493impl UpdateApiCacheError {
3494    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateApiCacheError> {
3495        if let Some(err) = proto::json::Error::parse_rest(&res) {
3496            match err.typ.as_str() {
3497                "BadRequestException" => {
3498                    return RusotoError::Service(UpdateApiCacheError::BadRequest(err.msg))
3499                }
3500                "ConcurrentModificationException" => {
3501                    return RusotoError::Service(UpdateApiCacheError::ConcurrentModification(
3502                        err.msg,
3503                    ))
3504                }
3505                "InternalFailureException" => {
3506                    return RusotoError::Service(UpdateApiCacheError::InternalFailure(err.msg))
3507                }
3508                "NotFoundException" => {
3509                    return RusotoError::Service(UpdateApiCacheError::NotFound(err.msg))
3510                }
3511                "UnauthorizedException" => {
3512                    return RusotoError::Service(UpdateApiCacheError::Unauthorized(err.msg))
3513                }
3514                "ValidationException" => return RusotoError::Validation(err.msg),
3515                _ => {}
3516            }
3517        }
3518        RusotoError::Unknown(res)
3519    }
3520}
3521impl fmt::Display for UpdateApiCacheError {
3522    #[allow(unused_variables)]
3523    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3524        match *self {
3525            UpdateApiCacheError::BadRequest(ref cause) => write!(f, "{}", cause),
3526            UpdateApiCacheError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
3527            UpdateApiCacheError::InternalFailure(ref cause) => write!(f, "{}", cause),
3528            UpdateApiCacheError::NotFound(ref cause) => write!(f, "{}", cause),
3529            UpdateApiCacheError::Unauthorized(ref cause) => write!(f, "{}", cause),
3530        }
3531    }
3532}
3533impl Error for UpdateApiCacheError {}
3534/// Errors returned by UpdateApiKey
3535#[derive(Debug, PartialEq)]
3536pub enum UpdateApiKeyError {
3537    /// <p>The API key expiration must be set to a value between 1 and 365 days from creation (for <code>CreateApiKey</code>) or from update (for <code>UpdateApiKey</code>).</p>
3538    ApiKeyValidityOutOfBounds(String),
3539    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
3540    BadRequest(String),
3541    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
3542    InternalFailure(String),
3543    /// <p>The request exceeded a limit. Try your request again.</p>
3544    LimitExceeded(String),
3545    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
3546    NotFound(String),
3547    /// <p>You are not authorized to perform this operation.</p>
3548    Unauthorized(String),
3549}
3550
3551impl UpdateApiKeyError {
3552    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateApiKeyError> {
3553        if let Some(err) = proto::json::Error::parse_rest(&res) {
3554            match err.typ.as_str() {
3555                "ApiKeyValidityOutOfBoundsException" => {
3556                    return RusotoError::Service(UpdateApiKeyError::ApiKeyValidityOutOfBounds(
3557                        err.msg,
3558                    ))
3559                }
3560                "BadRequestException" => {
3561                    return RusotoError::Service(UpdateApiKeyError::BadRequest(err.msg))
3562                }
3563                "InternalFailureException" => {
3564                    return RusotoError::Service(UpdateApiKeyError::InternalFailure(err.msg))
3565                }
3566                "LimitExceededException" => {
3567                    return RusotoError::Service(UpdateApiKeyError::LimitExceeded(err.msg))
3568                }
3569                "NotFoundException" => {
3570                    return RusotoError::Service(UpdateApiKeyError::NotFound(err.msg))
3571                }
3572                "UnauthorizedException" => {
3573                    return RusotoError::Service(UpdateApiKeyError::Unauthorized(err.msg))
3574                }
3575                "ValidationException" => return RusotoError::Validation(err.msg),
3576                _ => {}
3577            }
3578        }
3579        RusotoError::Unknown(res)
3580    }
3581}
3582impl fmt::Display for UpdateApiKeyError {
3583    #[allow(unused_variables)]
3584    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3585        match *self {
3586            UpdateApiKeyError::ApiKeyValidityOutOfBounds(ref cause) => write!(f, "{}", cause),
3587            UpdateApiKeyError::BadRequest(ref cause) => write!(f, "{}", cause),
3588            UpdateApiKeyError::InternalFailure(ref cause) => write!(f, "{}", cause),
3589            UpdateApiKeyError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3590            UpdateApiKeyError::NotFound(ref cause) => write!(f, "{}", cause),
3591            UpdateApiKeyError::Unauthorized(ref cause) => write!(f, "{}", cause),
3592        }
3593    }
3594}
3595impl Error for UpdateApiKeyError {}
3596/// Errors returned by UpdateDataSource
3597#[derive(Debug, PartialEq)]
3598pub enum UpdateDataSourceError {
3599    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
3600    BadRequest(String),
3601    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
3602    ConcurrentModification(String),
3603    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
3604    InternalFailure(String),
3605    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
3606    NotFound(String),
3607    /// <p>You are not authorized to perform this operation.</p>
3608    Unauthorized(String),
3609}
3610
3611impl UpdateDataSourceError {
3612    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDataSourceError> {
3613        if let Some(err) = proto::json::Error::parse_rest(&res) {
3614            match err.typ.as_str() {
3615                "BadRequestException" => {
3616                    return RusotoError::Service(UpdateDataSourceError::BadRequest(err.msg))
3617                }
3618                "ConcurrentModificationException" => {
3619                    return RusotoError::Service(UpdateDataSourceError::ConcurrentModification(
3620                        err.msg,
3621                    ))
3622                }
3623                "InternalFailureException" => {
3624                    return RusotoError::Service(UpdateDataSourceError::InternalFailure(err.msg))
3625                }
3626                "NotFoundException" => {
3627                    return RusotoError::Service(UpdateDataSourceError::NotFound(err.msg))
3628                }
3629                "UnauthorizedException" => {
3630                    return RusotoError::Service(UpdateDataSourceError::Unauthorized(err.msg))
3631                }
3632                "ValidationException" => return RusotoError::Validation(err.msg),
3633                _ => {}
3634            }
3635        }
3636        RusotoError::Unknown(res)
3637    }
3638}
3639impl fmt::Display for UpdateDataSourceError {
3640    #[allow(unused_variables)]
3641    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3642        match *self {
3643            UpdateDataSourceError::BadRequest(ref cause) => write!(f, "{}", cause),
3644            UpdateDataSourceError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
3645            UpdateDataSourceError::InternalFailure(ref cause) => write!(f, "{}", cause),
3646            UpdateDataSourceError::NotFound(ref cause) => write!(f, "{}", cause),
3647            UpdateDataSourceError::Unauthorized(ref cause) => write!(f, "{}", cause),
3648        }
3649    }
3650}
3651impl Error for UpdateDataSourceError {}
3652/// Errors returned by UpdateFunction
3653#[derive(Debug, PartialEq)]
3654pub enum UpdateFunctionError {
3655    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
3656    ConcurrentModification(String),
3657    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
3658    InternalFailure(String),
3659    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
3660    NotFound(String),
3661    /// <p>You are not authorized to perform this operation.</p>
3662    Unauthorized(String),
3663}
3664
3665impl UpdateFunctionError {
3666    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateFunctionError> {
3667        if let Some(err) = proto::json::Error::parse_rest(&res) {
3668            match err.typ.as_str() {
3669                "ConcurrentModificationException" => {
3670                    return RusotoError::Service(UpdateFunctionError::ConcurrentModification(
3671                        err.msg,
3672                    ))
3673                }
3674                "InternalFailureException" => {
3675                    return RusotoError::Service(UpdateFunctionError::InternalFailure(err.msg))
3676                }
3677                "NotFoundException" => {
3678                    return RusotoError::Service(UpdateFunctionError::NotFound(err.msg))
3679                }
3680                "UnauthorizedException" => {
3681                    return RusotoError::Service(UpdateFunctionError::Unauthorized(err.msg))
3682                }
3683                "ValidationException" => return RusotoError::Validation(err.msg),
3684                _ => {}
3685            }
3686        }
3687        RusotoError::Unknown(res)
3688    }
3689}
3690impl fmt::Display for UpdateFunctionError {
3691    #[allow(unused_variables)]
3692    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3693        match *self {
3694            UpdateFunctionError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
3695            UpdateFunctionError::InternalFailure(ref cause) => write!(f, "{}", cause),
3696            UpdateFunctionError::NotFound(ref cause) => write!(f, "{}", cause),
3697            UpdateFunctionError::Unauthorized(ref cause) => write!(f, "{}", cause),
3698        }
3699    }
3700}
3701impl Error for UpdateFunctionError {}
3702/// Errors returned by UpdateGraphqlApi
3703#[derive(Debug, PartialEq)]
3704pub enum UpdateGraphqlApiError {
3705    /// <p>You do not have access to perform this operation on this resource.</p>
3706    AccessDenied(String),
3707    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
3708    BadRequest(String),
3709    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
3710    ConcurrentModification(String),
3711    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
3712    InternalFailure(String),
3713    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
3714    NotFound(String),
3715    /// <p>You are not authorized to perform this operation.</p>
3716    Unauthorized(String),
3717}
3718
3719impl UpdateGraphqlApiError {
3720    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateGraphqlApiError> {
3721        if let Some(err) = proto::json::Error::parse_rest(&res) {
3722            match err.typ.as_str() {
3723                "AccessDeniedException" => {
3724                    return RusotoError::Service(UpdateGraphqlApiError::AccessDenied(err.msg))
3725                }
3726                "BadRequestException" => {
3727                    return RusotoError::Service(UpdateGraphqlApiError::BadRequest(err.msg))
3728                }
3729                "ConcurrentModificationException" => {
3730                    return RusotoError::Service(UpdateGraphqlApiError::ConcurrentModification(
3731                        err.msg,
3732                    ))
3733                }
3734                "InternalFailureException" => {
3735                    return RusotoError::Service(UpdateGraphqlApiError::InternalFailure(err.msg))
3736                }
3737                "NotFoundException" => {
3738                    return RusotoError::Service(UpdateGraphqlApiError::NotFound(err.msg))
3739                }
3740                "UnauthorizedException" => {
3741                    return RusotoError::Service(UpdateGraphqlApiError::Unauthorized(err.msg))
3742                }
3743                "ValidationException" => return RusotoError::Validation(err.msg),
3744                _ => {}
3745            }
3746        }
3747        RusotoError::Unknown(res)
3748    }
3749}
3750impl fmt::Display for UpdateGraphqlApiError {
3751    #[allow(unused_variables)]
3752    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3753        match *self {
3754            UpdateGraphqlApiError::AccessDenied(ref cause) => write!(f, "{}", cause),
3755            UpdateGraphqlApiError::BadRequest(ref cause) => write!(f, "{}", cause),
3756            UpdateGraphqlApiError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
3757            UpdateGraphqlApiError::InternalFailure(ref cause) => write!(f, "{}", cause),
3758            UpdateGraphqlApiError::NotFound(ref cause) => write!(f, "{}", cause),
3759            UpdateGraphqlApiError::Unauthorized(ref cause) => write!(f, "{}", cause),
3760        }
3761    }
3762}
3763impl Error for UpdateGraphqlApiError {}
3764/// Errors returned by UpdateResolver
3765#[derive(Debug, PartialEq)]
3766pub enum UpdateResolverError {
3767    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
3768    ConcurrentModification(String),
3769    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
3770    InternalFailure(String),
3771    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
3772    NotFound(String),
3773    /// <p>You are not authorized to perform this operation.</p>
3774    Unauthorized(String),
3775}
3776
3777impl UpdateResolverError {
3778    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateResolverError> {
3779        if let Some(err) = proto::json::Error::parse_rest(&res) {
3780            match err.typ.as_str() {
3781                "ConcurrentModificationException" => {
3782                    return RusotoError::Service(UpdateResolverError::ConcurrentModification(
3783                        err.msg,
3784                    ))
3785                }
3786                "InternalFailureException" => {
3787                    return RusotoError::Service(UpdateResolverError::InternalFailure(err.msg))
3788                }
3789                "NotFoundException" => {
3790                    return RusotoError::Service(UpdateResolverError::NotFound(err.msg))
3791                }
3792                "UnauthorizedException" => {
3793                    return RusotoError::Service(UpdateResolverError::Unauthorized(err.msg))
3794                }
3795                "ValidationException" => return RusotoError::Validation(err.msg),
3796                _ => {}
3797            }
3798        }
3799        RusotoError::Unknown(res)
3800    }
3801}
3802impl fmt::Display for UpdateResolverError {
3803    #[allow(unused_variables)]
3804    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3805        match *self {
3806            UpdateResolverError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
3807            UpdateResolverError::InternalFailure(ref cause) => write!(f, "{}", cause),
3808            UpdateResolverError::NotFound(ref cause) => write!(f, "{}", cause),
3809            UpdateResolverError::Unauthorized(ref cause) => write!(f, "{}", cause),
3810        }
3811    }
3812}
3813impl Error for UpdateResolverError {}
3814/// Errors returned by UpdateType
3815#[derive(Debug, PartialEq)]
3816pub enum UpdateTypeError {
3817    /// <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again. </p>
3818    BadRequest(String),
3819    /// <p>Another modification is in progress at this time and it must complete before you can make your change. </p>
3820    ConcurrentModification(String),
3821    /// <p>An internal AWS AppSync error occurred. Try your request again.</p>
3822    InternalFailure(String),
3823    /// <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
3824    NotFound(String),
3825    /// <p>You are not authorized to perform this operation.</p>
3826    Unauthorized(String),
3827}
3828
3829impl UpdateTypeError {
3830    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateTypeError> {
3831        if let Some(err) = proto::json::Error::parse_rest(&res) {
3832            match err.typ.as_str() {
3833                "BadRequestException" => {
3834                    return RusotoError::Service(UpdateTypeError::BadRequest(err.msg))
3835                }
3836                "ConcurrentModificationException" => {
3837                    return RusotoError::Service(UpdateTypeError::ConcurrentModification(err.msg))
3838                }
3839                "InternalFailureException" => {
3840                    return RusotoError::Service(UpdateTypeError::InternalFailure(err.msg))
3841                }
3842                "NotFoundException" => {
3843                    return RusotoError::Service(UpdateTypeError::NotFound(err.msg))
3844                }
3845                "UnauthorizedException" => {
3846                    return RusotoError::Service(UpdateTypeError::Unauthorized(err.msg))
3847                }
3848                "ValidationException" => return RusotoError::Validation(err.msg),
3849                _ => {}
3850            }
3851        }
3852        RusotoError::Unknown(res)
3853    }
3854}
3855impl fmt::Display for UpdateTypeError {
3856    #[allow(unused_variables)]
3857    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3858        match *self {
3859            UpdateTypeError::BadRequest(ref cause) => write!(f, "{}", cause),
3860            UpdateTypeError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
3861            UpdateTypeError::InternalFailure(ref cause) => write!(f, "{}", cause),
3862            UpdateTypeError::NotFound(ref cause) => write!(f, "{}", cause),
3863            UpdateTypeError::Unauthorized(ref cause) => write!(f, "{}", cause),
3864        }
3865    }
3866}
3867impl Error for UpdateTypeError {}
3868/// Trait representing the capabilities of the AWSAppSync API. AWSAppSync clients implement this trait.
3869#[async_trait]
3870pub trait AppSync {
3871    /// <p>Creates a cache for the GraphQL API.</p>
3872    async fn create_api_cache(
3873        &self,
3874        input: CreateApiCacheRequest,
3875    ) -> Result<CreateApiCacheResponse, RusotoError<CreateApiCacheError>>;
3876
3877    /// <p>Creates a unique key that you can distribute to clients who are executing your API.</p>
3878    async fn create_api_key(
3879        &self,
3880        input: CreateApiKeyRequest,
3881    ) -> Result<CreateApiKeyResponse, RusotoError<CreateApiKeyError>>;
3882
3883    /// <p>Creates a <code>DataSource</code> object.</p>
3884    async fn create_data_source(
3885        &self,
3886        input: CreateDataSourceRequest,
3887    ) -> Result<CreateDataSourceResponse, RusotoError<CreateDataSourceError>>;
3888
3889    /// <p>Creates a <code>Function</code> object.</p> <p>A function is a reusable entity. Multiple functions can be used to compose the resolver logic.</p>
3890    async fn create_function(
3891        &self,
3892        input: CreateFunctionRequest,
3893    ) -> Result<CreateFunctionResponse, RusotoError<CreateFunctionError>>;
3894
3895    /// <p>Creates a <code>GraphqlApi</code> object.</p>
3896    async fn create_graphql_api(
3897        &self,
3898        input: CreateGraphqlApiRequest,
3899    ) -> Result<CreateGraphqlApiResponse, RusotoError<CreateGraphqlApiError>>;
3900
3901    /// <p>Creates a <code>Resolver</code> object.</p> <p>A resolver converts incoming requests into a format that a data source can understand and converts the data source's responses into GraphQL.</p>
3902    async fn create_resolver(
3903        &self,
3904        input: CreateResolverRequest,
3905    ) -> Result<CreateResolverResponse, RusotoError<CreateResolverError>>;
3906
3907    /// <p>Creates a <code>Type</code> object.</p>
3908    async fn create_type(
3909        &self,
3910        input: CreateTypeRequest,
3911    ) -> Result<CreateTypeResponse, RusotoError<CreateTypeError>>;
3912
3913    /// <p>Deletes an <code>ApiCache</code> object.</p>
3914    async fn delete_api_cache(
3915        &self,
3916        input: DeleteApiCacheRequest,
3917    ) -> Result<DeleteApiCacheResponse, RusotoError<DeleteApiCacheError>>;
3918
3919    /// <p>Deletes an API key.</p>
3920    async fn delete_api_key(
3921        &self,
3922        input: DeleteApiKeyRequest,
3923    ) -> Result<DeleteApiKeyResponse, RusotoError<DeleteApiKeyError>>;
3924
3925    /// <p>Deletes a <code>DataSource</code> object.</p>
3926    async fn delete_data_source(
3927        &self,
3928        input: DeleteDataSourceRequest,
3929    ) -> Result<DeleteDataSourceResponse, RusotoError<DeleteDataSourceError>>;
3930
3931    /// <p>Deletes a <code>Function</code>.</p>
3932    async fn delete_function(
3933        &self,
3934        input: DeleteFunctionRequest,
3935    ) -> Result<DeleteFunctionResponse, RusotoError<DeleteFunctionError>>;
3936
3937    /// <p>Deletes a <code>GraphqlApi</code> object.</p>
3938    async fn delete_graphql_api(
3939        &self,
3940        input: DeleteGraphqlApiRequest,
3941    ) -> Result<DeleteGraphqlApiResponse, RusotoError<DeleteGraphqlApiError>>;
3942
3943    /// <p>Deletes a <code>Resolver</code> object.</p>
3944    async fn delete_resolver(
3945        &self,
3946        input: DeleteResolverRequest,
3947    ) -> Result<DeleteResolverResponse, RusotoError<DeleteResolverError>>;
3948
3949    /// <p>Deletes a <code>Type</code> object.</p>
3950    async fn delete_type(
3951        &self,
3952        input: DeleteTypeRequest,
3953    ) -> Result<DeleteTypeResponse, RusotoError<DeleteTypeError>>;
3954
3955    /// <p>Flushes an <code>ApiCache</code> object.</p>
3956    async fn flush_api_cache(
3957        &self,
3958        input: FlushApiCacheRequest,
3959    ) -> Result<FlushApiCacheResponse, RusotoError<FlushApiCacheError>>;
3960
3961    /// <p>Retrieves an <code>ApiCache</code> object.</p>
3962    async fn get_api_cache(
3963        &self,
3964        input: GetApiCacheRequest,
3965    ) -> Result<GetApiCacheResponse, RusotoError<GetApiCacheError>>;
3966
3967    /// <p>Retrieves a <code>DataSource</code> object.</p>
3968    async fn get_data_source(
3969        &self,
3970        input: GetDataSourceRequest,
3971    ) -> Result<GetDataSourceResponse, RusotoError<GetDataSourceError>>;
3972
3973    /// <p>Get a <code>Function</code>.</p>
3974    async fn get_function(
3975        &self,
3976        input: GetFunctionRequest,
3977    ) -> Result<GetFunctionResponse, RusotoError<GetFunctionError>>;
3978
3979    /// <p>Retrieves a <code>GraphqlApi</code> object.</p>
3980    async fn get_graphql_api(
3981        &self,
3982        input: GetGraphqlApiRequest,
3983    ) -> Result<GetGraphqlApiResponse, RusotoError<GetGraphqlApiError>>;
3984
3985    /// <p>Retrieves the introspection schema for a GraphQL API.</p>
3986    async fn get_introspection_schema(
3987        &self,
3988        input: GetIntrospectionSchemaRequest,
3989    ) -> Result<GetIntrospectionSchemaResponse, RusotoError<GetIntrospectionSchemaError>>;
3990
3991    /// <p>Retrieves a <code>Resolver</code> object.</p>
3992    async fn get_resolver(
3993        &self,
3994        input: GetResolverRequest,
3995    ) -> Result<GetResolverResponse, RusotoError<GetResolverError>>;
3996
3997    /// <p>Retrieves the current status of a schema creation operation.</p>
3998    async fn get_schema_creation_status(
3999        &self,
4000        input: GetSchemaCreationStatusRequest,
4001    ) -> Result<GetSchemaCreationStatusResponse, RusotoError<GetSchemaCreationStatusError>>;
4002
4003    /// <p>Retrieves a <code>Type</code> object.</p>
4004    async fn get_type(
4005        &self,
4006        input: GetTypeRequest,
4007    ) -> Result<GetTypeResponse, RusotoError<GetTypeError>>;
4008
4009    /// <p><p>Lists the API keys for a given API.</p> <note> <p>API keys are deleted automatically 60 days after they expire. However, they may still be included in the response until they have actually been deleted. You can safely call <code>DeleteApiKey</code> to manually delete a key before it&#39;s automatically deleted.</p> </note></p>
4010    async fn list_api_keys(
4011        &self,
4012        input: ListApiKeysRequest,
4013    ) -> Result<ListApiKeysResponse, RusotoError<ListApiKeysError>>;
4014
4015    /// <p>Lists the data sources for a given API.</p>
4016    async fn list_data_sources(
4017        &self,
4018        input: ListDataSourcesRequest,
4019    ) -> Result<ListDataSourcesResponse, RusotoError<ListDataSourcesError>>;
4020
4021    /// <p>List multiple functions.</p>
4022    async fn list_functions(
4023        &self,
4024        input: ListFunctionsRequest,
4025    ) -> Result<ListFunctionsResponse, RusotoError<ListFunctionsError>>;
4026
4027    /// <p>Lists your GraphQL APIs.</p>
4028    async fn list_graphql_apis(
4029        &self,
4030        input: ListGraphqlApisRequest,
4031    ) -> Result<ListGraphqlApisResponse, RusotoError<ListGraphqlApisError>>;
4032
4033    /// <p>Lists the resolvers for a given API and type.</p>
4034    async fn list_resolvers(
4035        &self,
4036        input: ListResolversRequest,
4037    ) -> Result<ListResolversResponse, RusotoError<ListResolversError>>;
4038
4039    /// <p>List the resolvers that are associated with a specific function.</p>
4040    async fn list_resolvers_by_function(
4041        &self,
4042        input: ListResolversByFunctionRequest,
4043    ) -> Result<ListResolversByFunctionResponse, RusotoError<ListResolversByFunctionError>>;
4044
4045    /// <p>Lists the tags for a resource.</p>
4046    async fn list_tags_for_resource(
4047        &self,
4048        input: ListTagsForResourceRequest,
4049    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>>;
4050
4051    /// <p>Lists the types for a given API.</p>
4052    async fn list_types(
4053        &self,
4054        input: ListTypesRequest,
4055    ) -> Result<ListTypesResponse, RusotoError<ListTypesError>>;
4056
4057    /// <p>Adds a new schema to your GraphQL API.</p> <p>This operation is asynchronous. Use to determine when it has completed.</p>
4058    async fn start_schema_creation(
4059        &self,
4060        input: StartSchemaCreationRequest,
4061    ) -> Result<StartSchemaCreationResponse, RusotoError<StartSchemaCreationError>>;
4062
4063    /// <p>Tags a resource with user-supplied tags.</p>
4064    async fn tag_resource(
4065        &self,
4066        input: TagResourceRequest,
4067    ) -> Result<TagResourceResponse, RusotoError<TagResourceError>>;
4068
4069    /// <p>Untags a resource.</p>
4070    async fn untag_resource(
4071        &self,
4072        input: UntagResourceRequest,
4073    ) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>>;
4074
4075    /// <p>Updates the cache for the GraphQL API.</p>
4076    async fn update_api_cache(
4077        &self,
4078        input: UpdateApiCacheRequest,
4079    ) -> Result<UpdateApiCacheResponse, RusotoError<UpdateApiCacheError>>;
4080
4081    /// <p>Updates an API key. The key can be updated while it is not deleted.</p>
4082    async fn update_api_key(
4083        &self,
4084        input: UpdateApiKeyRequest,
4085    ) -> Result<UpdateApiKeyResponse, RusotoError<UpdateApiKeyError>>;
4086
4087    /// <p>Updates a <code>DataSource</code> object.</p>
4088    async fn update_data_source(
4089        &self,
4090        input: UpdateDataSourceRequest,
4091    ) -> Result<UpdateDataSourceResponse, RusotoError<UpdateDataSourceError>>;
4092
4093    /// <p>Updates a <code>Function</code> object.</p>
4094    async fn update_function(
4095        &self,
4096        input: UpdateFunctionRequest,
4097    ) -> Result<UpdateFunctionResponse, RusotoError<UpdateFunctionError>>;
4098
4099    /// <p>Updates a <code>GraphqlApi</code> object.</p>
4100    async fn update_graphql_api(
4101        &self,
4102        input: UpdateGraphqlApiRequest,
4103    ) -> Result<UpdateGraphqlApiResponse, RusotoError<UpdateGraphqlApiError>>;
4104
4105    /// <p>Updates a <code>Resolver</code> object.</p>
4106    async fn update_resolver(
4107        &self,
4108        input: UpdateResolverRequest,
4109    ) -> Result<UpdateResolverResponse, RusotoError<UpdateResolverError>>;
4110
4111    /// <p>Updates a <code>Type</code> object.</p>
4112    async fn update_type(
4113        &self,
4114        input: UpdateTypeRequest,
4115    ) -> Result<UpdateTypeResponse, RusotoError<UpdateTypeError>>;
4116}
4117/// A client for the AWSAppSync API.
4118#[derive(Clone)]
4119pub struct AppSyncClient {
4120    client: Client,
4121    region: region::Region,
4122}
4123
4124impl AppSyncClient {
4125    /// Creates a client backed by the default tokio event loop.
4126    ///
4127    /// The client will use the default credentials provider and tls client.
4128    pub fn new(region: region::Region) -> AppSyncClient {
4129        AppSyncClient {
4130            client: Client::shared(),
4131            region,
4132        }
4133    }
4134
4135    pub fn new_with<P, D>(
4136        request_dispatcher: D,
4137        credentials_provider: P,
4138        region: region::Region,
4139    ) -> AppSyncClient
4140    where
4141        P: ProvideAwsCredentials + Send + Sync + 'static,
4142        D: DispatchSignedRequest + Send + Sync + 'static,
4143    {
4144        AppSyncClient {
4145            client: Client::new_with(credentials_provider, request_dispatcher),
4146            region,
4147        }
4148    }
4149
4150    pub fn new_with_client(client: Client, region: region::Region) -> AppSyncClient {
4151        AppSyncClient { client, region }
4152    }
4153}
4154
4155#[async_trait]
4156impl AppSync for AppSyncClient {
4157    /// <p>Creates a cache for the GraphQL API.</p>
4158    #[allow(unused_mut)]
4159    async fn create_api_cache(
4160        &self,
4161        input: CreateApiCacheRequest,
4162    ) -> Result<CreateApiCacheResponse, RusotoError<CreateApiCacheError>> {
4163        let request_uri = format!("/v1/apis/{api_id}/ApiCaches", api_id = input.api_id);
4164
4165        let mut request = SignedRequest::new("POST", "appsync", &self.region, &request_uri);
4166        request.set_content_type("application/x-amz-json-1.1".to_owned());
4167
4168        let encoded = Some(serde_json::to_vec(&input).unwrap());
4169        request.set_payload(encoded);
4170
4171        let mut response = self
4172            .client
4173            .sign_and_dispatch(request)
4174            .await
4175            .map_err(RusotoError::from)?;
4176        if response.status.is_success() {
4177            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4178            let result = proto::json::ResponsePayload::new(&response)
4179                .deserialize::<CreateApiCacheResponse, _>()?;
4180
4181            Ok(result)
4182        } else {
4183            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4184            Err(CreateApiCacheError::from_response(response))
4185        }
4186    }
4187
4188    /// <p>Creates a unique key that you can distribute to clients who are executing your API.</p>
4189    #[allow(unused_mut)]
4190    async fn create_api_key(
4191        &self,
4192        input: CreateApiKeyRequest,
4193    ) -> Result<CreateApiKeyResponse, RusotoError<CreateApiKeyError>> {
4194        let request_uri = format!("/v1/apis/{api_id}/apikeys", api_id = input.api_id);
4195
4196        let mut request = SignedRequest::new("POST", "appsync", &self.region, &request_uri);
4197        request.set_content_type("application/x-amz-json-1.1".to_owned());
4198
4199        let encoded = Some(serde_json::to_vec(&input).unwrap());
4200        request.set_payload(encoded);
4201
4202        let mut response = self
4203            .client
4204            .sign_and_dispatch(request)
4205            .await
4206            .map_err(RusotoError::from)?;
4207        if response.status.is_success() {
4208            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4209            let result = proto::json::ResponsePayload::new(&response)
4210                .deserialize::<CreateApiKeyResponse, _>()?;
4211
4212            Ok(result)
4213        } else {
4214            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4215            Err(CreateApiKeyError::from_response(response))
4216        }
4217    }
4218
4219    /// <p>Creates a <code>DataSource</code> object.</p>
4220    #[allow(unused_mut)]
4221    async fn create_data_source(
4222        &self,
4223        input: CreateDataSourceRequest,
4224    ) -> Result<CreateDataSourceResponse, RusotoError<CreateDataSourceError>> {
4225        let request_uri = format!("/v1/apis/{api_id}/datasources", api_id = input.api_id);
4226
4227        let mut request = SignedRequest::new("POST", "appsync", &self.region, &request_uri);
4228        request.set_content_type("application/x-amz-json-1.1".to_owned());
4229
4230        let encoded = Some(serde_json::to_vec(&input).unwrap());
4231        request.set_payload(encoded);
4232
4233        let mut response = self
4234            .client
4235            .sign_and_dispatch(request)
4236            .await
4237            .map_err(RusotoError::from)?;
4238        if response.status.is_success() {
4239            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4240            let result = proto::json::ResponsePayload::new(&response)
4241                .deserialize::<CreateDataSourceResponse, _>()?;
4242
4243            Ok(result)
4244        } else {
4245            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4246            Err(CreateDataSourceError::from_response(response))
4247        }
4248    }
4249
4250    /// <p>Creates a <code>Function</code> object.</p> <p>A function is a reusable entity. Multiple functions can be used to compose the resolver logic.</p>
4251    #[allow(unused_mut)]
4252    async fn create_function(
4253        &self,
4254        input: CreateFunctionRequest,
4255    ) -> Result<CreateFunctionResponse, RusotoError<CreateFunctionError>> {
4256        let request_uri = format!("/v1/apis/{api_id}/functions", api_id = input.api_id);
4257
4258        let mut request = SignedRequest::new("POST", "appsync", &self.region, &request_uri);
4259        request.set_content_type("application/x-amz-json-1.1".to_owned());
4260
4261        let encoded = Some(serde_json::to_vec(&input).unwrap());
4262        request.set_payload(encoded);
4263
4264        let mut response = self
4265            .client
4266            .sign_and_dispatch(request)
4267            .await
4268            .map_err(RusotoError::from)?;
4269        if response.status.is_success() {
4270            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4271            let result = proto::json::ResponsePayload::new(&response)
4272                .deserialize::<CreateFunctionResponse, _>()?;
4273
4274            Ok(result)
4275        } else {
4276            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4277            Err(CreateFunctionError::from_response(response))
4278        }
4279    }
4280
4281    /// <p>Creates a <code>GraphqlApi</code> object.</p>
4282    #[allow(unused_mut)]
4283    async fn create_graphql_api(
4284        &self,
4285        input: CreateGraphqlApiRequest,
4286    ) -> Result<CreateGraphqlApiResponse, RusotoError<CreateGraphqlApiError>> {
4287        let request_uri = "/v1/apis";
4288
4289        let mut request = SignedRequest::new("POST", "appsync", &self.region, &request_uri);
4290        request.set_content_type("application/x-amz-json-1.1".to_owned());
4291
4292        let encoded = Some(serde_json::to_vec(&input).unwrap());
4293        request.set_payload(encoded);
4294
4295        let mut response = self
4296            .client
4297            .sign_and_dispatch(request)
4298            .await
4299            .map_err(RusotoError::from)?;
4300        if response.status.is_success() {
4301            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4302            let result = proto::json::ResponsePayload::new(&response)
4303                .deserialize::<CreateGraphqlApiResponse, _>()?;
4304
4305            Ok(result)
4306        } else {
4307            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4308            Err(CreateGraphqlApiError::from_response(response))
4309        }
4310    }
4311
4312    /// <p>Creates a <code>Resolver</code> object.</p> <p>A resolver converts incoming requests into a format that a data source can understand and converts the data source's responses into GraphQL.</p>
4313    #[allow(unused_mut)]
4314    async fn create_resolver(
4315        &self,
4316        input: CreateResolverRequest,
4317    ) -> Result<CreateResolverResponse, RusotoError<CreateResolverError>> {
4318        let request_uri = format!(
4319            "/v1/apis/{api_id}/types/{type_name}/resolvers",
4320            api_id = input.api_id,
4321            type_name = input.type_name
4322        );
4323
4324        let mut request = SignedRequest::new("POST", "appsync", &self.region, &request_uri);
4325        request.set_content_type("application/x-amz-json-1.1".to_owned());
4326
4327        let encoded = Some(serde_json::to_vec(&input).unwrap());
4328        request.set_payload(encoded);
4329
4330        let mut response = self
4331            .client
4332            .sign_and_dispatch(request)
4333            .await
4334            .map_err(RusotoError::from)?;
4335        if response.status.is_success() {
4336            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4337            let result = proto::json::ResponsePayload::new(&response)
4338                .deserialize::<CreateResolverResponse, _>()?;
4339
4340            Ok(result)
4341        } else {
4342            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4343            Err(CreateResolverError::from_response(response))
4344        }
4345    }
4346
4347    /// <p>Creates a <code>Type</code> object.</p>
4348    #[allow(unused_mut)]
4349    async fn create_type(
4350        &self,
4351        input: CreateTypeRequest,
4352    ) -> Result<CreateTypeResponse, RusotoError<CreateTypeError>> {
4353        let request_uri = format!("/v1/apis/{api_id}/types", api_id = input.api_id);
4354
4355        let mut request = SignedRequest::new("POST", "appsync", &self.region, &request_uri);
4356        request.set_content_type("application/x-amz-json-1.1".to_owned());
4357
4358        let encoded = Some(serde_json::to_vec(&input).unwrap());
4359        request.set_payload(encoded);
4360
4361        let mut response = self
4362            .client
4363            .sign_and_dispatch(request)
4364            .await
4365            .map_err(RusotoError::from)?;
4366        if response.status.is_success() {
4367            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4368            let result = proto::json::ResponsePayload::new(&response)
4369                .deserialize::<CreateTypeResponse, _>()?;
4370
4371            Ok(result)
4372        } else {
4373            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4374            Err(CreateTypeError::from_response(response))
4375        }
4376    }
4377
4378    /// <p>Deletes an <code>ApiCache</code> object.</p>
4379    #[allow(unused_mut)]
4380    async fn delete_api_cache(
4381        &self,
4382        input: DeleteApiCacheRequest,
4383    ) -> Result<DeleteApiCacheResponse, RusotoError<DeleteApiCacheError>> {
4384        let request_uri = format!("/v1/apis/{api_id}/ApiCaches", api_id = input.api_id);
4385
4386        let mut request = SignedRequest::new("DELETE", "appsync", &self.region, &request_uri);
4387        request.set_content_type("application/x-amz-json-1.1".to_owned());
4388
4389        let mut response = self
4390            .client
4391            .sign_and_dispatch(request)
4392            .await
4393            .map_err(RusotoError::from)?;
4394        if response.status.is_success() {
4395            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4396            let result = proto::json::ResponsePayload::new(&response)
4397                .deserialize::<DeleteApiCacheResponse, _>()?;
4398
4399            Ok(result)
4400        } else {
4401            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4402            Err(DeleteApiCacheError::from_response(response))
4403        }
4404    }
4405
4406    /// <p>Deletes an API key.</p>
4407    #[allow(unused_mut)]
4408    async fn delete_api_key(
4409        &self,
4410        input: DeleteApiKeyRequest,
4411    ) -> Result<DeleteApiKeyResponse, RusotoError<DeleteApiKeyError>> {
4412        let request_uri = format!(
4413            "/v1/apis/{api_id}/apikeys/{id}",
4414            api_id = input.api_id,
4415            id = input.id
4416        );
4417
4418        let mut request = SignedRequest::new("DELETE", "appsync", &self.region, &request_uri);
4419        request.set_content_type("application/x-amz-json-1.1".to_owned());
4420
4421        let mut response = self
4422            .client
4423            .sign_and_dispatch(request)
4424            .await
4425            .map_err(RusotoError::from)?;
4426        if response.status.is_success() {
4427            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4428            let result = proto::json::ResponsePayload::new(&response)
4429                .deserialize::<DeleteApiKeyResponse, _>()?;
4430
4431            Ok(result)
4432        } else {
4433            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4434            Err(DeleteApiKeyError::from_response(response))
4435        }
4436    }
4437
4438    /// <p>Deletes a <code>DataSource</code> object.</p>
4439    #[allow(unused_mut)]
4440    async fn delete_data_source(
4441        &self,
4442        input: DeleteDataSourceRequest,
4443    ) -> Result<DeleteDataSourceResponse, RusotoError<DeleteDataSourceError>> {
4444        let request_uri = format!(
4445            "/v1/apis/{api_id}/datasources/{name}",
4446            api_id = input.api_id,
4447            name = input.name
4448        );
4449
4450        let mut request = SignedRequest::new("DELETE", "appsync", &self.region, &request_uri);
4451        request.set_content_type("application/x-amz-json-1.1".to_owned());
4452
4453        let mut response = self
4454            .client
4455            .sign_and_dispatch(request)
4456            .await
4457            .map_err(RusotoError::from)?;
4458        if response.status.is_success() {
4459            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4460            let result = proto::json::ResponsePayload::new(&response)
4461                .deserialize::<DeleteDataSourceResponse, _>()?;
4462
4463            Ok(result)
4464        } else {
4465            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4466            Err(DeleteDataSourceError::from_response(response))
4467        }
4468    }
4469
4470    /// <p>Deletes a <code>Function</code>.</p>
4471    #[allow(unused_mut)]
4472    async fn delete_function(
4473        &self,
4474        input: DeleteFunctionRequest,
4475    ) -> Result<DeleteFunctionResponse, RusotoError<DeleteFunctionError>> {
4476        let request_uri = format!(
4477            "/v1/apis/{api_id}/functions/{function_id}",
4478            api_id = input.api_id,
4479            function_id = input.function_id
4480        );
4481
4482        let mut request = SignedRequest::new("DELETE", "appsync", &self.region, &request_uri);
4483        request.set_content_type("application/x-amz-json-1.1".to_owned());
4484
4485        let mut response = self
4486            .client
4487            .sign_and_dispatch(request)
4488            .await
4489            .map_err(RusotoError::from)?;
4490        if response.status.is_success() {
4491            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4492            let result = proto::json::ResponsePayload::new(&response)
4493                .deserialize::<DeleteFunctionResponse, _>()?;
4494
4495            Ok(result)
4496        } else {
4497            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4498            Err(DeleteFunctionError::from_response(response))
4499        }
4500    }
4501
4502    /// <p>Deletes a <code>GraphqlApi</code> object.</p>
4503    #[allow(unused_mut)]
4504    async fn delete_graphql_api(
4505        &self,
4506        input: DeleteGraphqlApiRequest,
4507    ) -> Result<DeleteGraphqlApiResponse, RusotoError<DeleteGraphqlApiError>> {
4508        let request_uri = format!("/v1/apis/{api_id}", api_id = input.api_id);
4509
4510        let mut request = SignedRequest::new("DELETE", "appsync", &self.region, &request_uri);
4511        request.set_content_type("application/x-amz-json-1.1".to_owned());
4512
4513        let mut response = self
4514            .client
4515            .sign_and_dispatch(request)
4516            .await
4517            .map_err(RusotoError::from)?;
4518        if response.status.is_success() {
4519            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4520            let result = proto::json::ResponsePayload::new(&response)
4521                .deserialize::<DeleteGraphqlApiResponse, _>()?;
4522
4523            Ok(result)
4524        } else {
4525            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4526            Err(DeleteGraphqlApiError::from_response(response))
4527        }
4528    }
4529
4530    /// <p>Deletes a <code>Resolver</code> object.</p>
4531    #[allow(unused_mut)]
4532    async fn delete_resolver(
4533        &self,
4534        input: DeleteResolverRequest,
4535    ) -> Result<DeleteResolverResponse, RusotoError<DeleteResolverError>> {
4536        let request_uri = format!(
4537            "/v1/apis/{api_id}/types/{type_name}/resolvers/{field_name}",
4538            api_id = input.api_id,
4539            field_name = input.field_name,
4540            type_name = input.type_name
4541        );
4542
4543        let mut request = SignedRequest::new("DELETE", "appsync", &self.region, &request_uri);
4544        request.set_content_type("application/x-amz-json-1.1".to_owned());
4545
4546        let mut response = self
4547            .client
4548            .sign_and_dispatch(request)
4549            .await
4550            .map_err(RusotoError::from)?;
4551        if response.status.is_success() {
4552            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4553            let result = proto::json::ResponsePayload::new(&response)
4554                .deserialize::<DeleteResolverResponse, _>()?;
4555
4556            Ok(result)
4557        } else {
4558            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4559            Err(DeleteResolverError::from_response(response))
4560        }
4561    }
4562
4563    /// <p>Deletes a <code>Type</code> object.</p>
4564    #[allow(unused_mut)]
4565    async fn delete_type(
4566        &self,
4567        input: DeleteTypeRequest,
4568    ) -> Result<DeleteTypeResponse, RusotoError<DeleteTypeError>> {
4569        let request_uri = format!(
4570            "/v1/apis/{api_id}/types/{type_name}",
4571            api_id = input.api_id,
4572            type_name = input.type_name
4573        );
4574
4575        let mut request = SignedRequest::new("DELETE", "appsync", &self.region, &request_uri);
4576        request.set_content_type("application/x-amz-json-1.1".to_owned());
4577
4578        let mut response = self
4579            .client
4580            .sign_and_dispatch(request)
4581            .await
4582            .map_err(RusotoError::from)?;
4583        if response.status.is_success() {
4584            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4585            let result = proto::json::ResponsePayload::new(&response)
4586                .deserialize::<DeleteTypeResponse, _>()?;
4587
4588            Ok(result)
4589        } else {
4590            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4591            Err(DeleteTypeError::from_response(response))
4592        }
4593    }
4594
4595    /// <p>Flushes an <code>ApiCache</code> object.</p>
4596    #[allow(unused_mut)]
4597    async fn flush_api_cache(
4598        &self,
4599        input: FlushApiCacheRequest,
4600    ) -> Result<FlushApiCacheResponse, RusotoError<FlushApiCacheError>> {
4601        let request_uri = format!("/v1/apis/{api_id}/FlushCache", api_id = input.api_id);
4602
4603        let mut request = SignedRequest::new("DELETE", "appsync", &self.region, &request_uri);
4604        request.set_content_type("application/x-amz-json-1.1".to_owned());
4605
4606        let mut response = self
4607            .client
4608            .sign_and_dispatch(request)
4609            .await
4610            .map_err(RusotoError::from)?;
4611        if response.status.is_success() {
4612            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4613            let result = proto::json::ResponsePayload::new(&response)
4614                .deserialize::<FlushApiCacheResponse, _>()?;
4615
4616            Ok(result)
4617        } else {
4618            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4619            Err(FlushApiCacheError::from_response(response))
4620        }
4621    }
4622
4623    /// <p>Retrieves an <code>ApiCache</code> object.</p>
4624    #[allow(unused_mut)]
4625    async fn get_api_cache(
4626        &self,
4627        input: GetApiCacheRequest,
4628    ) -> Result<GetApiCacheResponse, RusotoError<GetApiCacheError>> {
4629        let request_uri = format!("/v1/apis/{api_id}/ApiCaches", api_id = input.api_id);
4630
4631        let mut request = SignedRequest::new("GET", "appsync", &self.region, &request_uri);
4632        request.set_content_type("application/x-amz-json-1.1".to_owned());
4633
4634        let mut response = self
4635            .client
4636            .sign_and_dispatch(request)
4637            .await
4638            .map_err(RusotoError::from)?;
4639        if response.status.is_success() {
4640            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4641            let result = proto::json::ResponsePayload::new(&response)
4642                .deserialize::<GetApiCacheResponse, _>()?;
4643
4644            Ok(result)
4645        } else {
4646            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4647            Err(GetApiCacheError::from_response(response))
4648        }
4649    }
4650
4651    /// <p>Retrieves a <code>DataSource</code> object.</p>
4652    #[allow(unused_mut)]
4653    async fn get_data_source(
4654        &self,
4655        input: GetDataSourceRequest,
4656    ) -> Result<GetDataSourceResponse, RusotoError<GetDataSourceError>> {
4657        let request_uri = format!(
4658            "/v1/apis/{api_id}/datasources/{name}",
4659            api_id = input.api_id,
4660            name = input.name
4661        );
4662
4663        let mut request = SignedRequest::new("GET", "appsync", &self.region, &request_uri);
4664        request.set_content_type("application/x-amz-json-1.1".to_owned());
4665
4666        let mut response = self
4667            .client
4668            .sign_and_dispatch(request)
4669            .await
4670            .map_err(RusotoError::from)?;
4671        if response.status.is_success() {
4672            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4673            let result = proto::json::ResponsePayload::new(&response)
4674                .deserialize::<GetDataSourceResponse, _>()?;
4675
4676            Ok(result)
4677        } else {
4678            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4679            Err(GetDataSourceError::from_response(response))
4680        }
4681    }
4682
4683    /// <p>Get a <code>Function</code>.</p>
4684    #[allow(unused_mut)]
4685    async fn get_function(
4686        &self,
4687        input: GetFunctionRequest,
4688    ) -> Result<GetFunctionResponse, RusotoError<GetFunctionError>> {
4689        let request_uri = format!(
4690            "/v1/apis/{api_id}/functions/{function_id}",
4691            api_id = input.api_id,
4692            function_id = input.function_id
4693        );
4694
4695        let mut request = SignedRequest::new("GET", "appsync", &self.region, &request_uri);
4696        request.set_content_type("application/x-amz-json-1.1".to_owned());
4697
4698        let mut response = self
4699            .client
4700            .sign_and_dispatch(request)
4701            .await
4702            .map_err(RusotoError::from)?;
4703        if response.status.is_success() {
4704            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4705            let result = proto::json::ResponsePayload::new(&response)
4706                .deserialize::<GetFunctionResponse, _>()?;
4707
4708            Ok(result)
4709        } else {
4710            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4711            Err(GetFunctionError::from_response(response))
4712        }
4713    }
4714
4715    /// <p>Retrieves a <code>GraphqlApi</code> object.</p>
4716    #[allow(unused_mut)]
4717    async fn get_graphql_api(
4718        &self,
4719        input: GetGraphqlApiRequest,
4720    ) -> Result<GetGraphqlApiResponse, RusotoError<GetGraphqlApiError>> {
4721        let request_uri = format!("/v1/apis/{api_id}", api_id = input.api_id);
4722
4723        let mut request = SignedRequest::new("GET", "appsync", &self.region, &request_uri);
4724        request.set_content_type("application/x-amz-json-1.1".to_owned());
4725
4726        let mut response = self
4727            .client
4728            .sign_and_dispatch(request)
4729            .await
4730            .map_err(RusotoError::from)?;
4731        if response.status.is_success() {
4732            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4733            let result = proto::json::ResponsePayload::new(&response)
4734                .deserialize::<GetGraphqlApiResponse, _>()?;
4735
4736            Ok(result)
4737        } else {
4738            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4739            Err(GetGraphqlApiError::from_response(response))
4740        }
4741    }
4742
4743    /// <p>Retrieves the introspection schema for a GraphQL API.</p>
4744    #[allow(unused_mut)]
4745    async fn get_introspection_schema(
4746        &self,
4747        input: GetIntrospectionSchemaRequest,
4748    ) -> Result<GetIntrospectionSchemaResponse, RusotoError<GetIntrospectionSchemaError>> {
4749        let request_uri = format!("/v1/apis/{api_id}/schema", api_id = input.api_id);
4750
4751        let mut request = SignedRequest::new("GET", "appsync", &self.region, &request_uri);
4752        request.set_content_type("application/x-amz-json-1.1".to_owned());
4753
4754        let mut params = Params::new();
4755        params.put("format", &input.format);
4756        if let Some(ref x) = input.include_directives {
4757            params.put("includeDirectives", x);
4758        }
4759        request.set_params(params);
4760
4761        let mut response = self
4762            .client
4763            .sign_and_dispatch(request)
4764            .await
4765            .map_err(RusotoError::from)?;
4766        if response.status.is_success() {
4767            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4768
4769            let mut result = GetIntrospectionSchemaResponse::default();
4770            result.schema = Some(response.body);
4771
4772            Ok(result)
4773        } else {
4774            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4775            Err(GetIntrospectionSchemaError::from_response(response))
4776        }
4777    }
4778
4779    /// <p>Retrieves a <code>Resolver</code> object.</p>
4780    #[allow(unused_mut)]
4781    async fn get_resolver(
4782        &self,
4783        input: GetResolverRequest,
4784    ) -> Result<GetResolverResponse, RusotoError<GetResolverError>> {
4785        let request_uri = format!(
4786            "/v1/apis/{api_id}/types/{type_name}/resolvers/{field_name}",
4787            api_id = input.api_id,
4788            field_name = input.field_name,
4789            type_name = input.type_name
4790        );
4791
4792        let mut request = SignedRequest::new("GET", "appsync", &self.region, &request_uri);
4793        request.set_content_type("application/x-amz-json-1.1".to_owned());
4794
4795        let mut response = self
4796            .client
4797            .sign_and_dispatch(request)
4798            .await
4799            .map_err(RusotoError::from)?;
4800        if response.status.is_success() {
4801            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4802            let result = proto::json::ResponsePayload::new(&response)
4803                .deserialize::<GetResolverResponse, _>()?;
4804
4805            Ok(result)
4806        } else {
4807            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4808            Err(GetResolverError::from_response(response))
4809        }
4810    }
4811
4812    /// <p>Retrieves the current status of a schema creation operation.</p>
4813    #[allow(unused_mut)]
4814    async fn get_schema_creation_status(
4815        &self,
4816        input: GetSchemaCreationStatusRequest,
4817    ) -> Result<GetSchemaCreationStatusResponse, RusotoError<GetSchemaCreationStatusError>> {
4818        let request_uri = format!("/v1/apis/{api_id}/schemacreation", api_id = input.api_id);
4819
4820        let mut request = SignedRequest::new("GET", "appsync", &self.region, &request_uri);
4821        request.set_content_type("application/x-amz-json-1.1".to_owned());
4822
4823        let mut response = self
4824            .client
4825            .sign_and_dispatch(request)
4826            .await
4827            .map_err(RusotoError::from)?;
4828        if response.status.is_success() {
4829            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4830            let result = proto::json::ResponsePayload::new(&response)
4831                .deserialize::<GetSchemaCreationStatusResponse, _>()?;
4832
4833            Ok(result)
4834        } else {
4835            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4836            Err(GetSchemaCreationStatusError::from_response(response))
4837        }
4838    }
4839
4840    /// <p>Retrieves a <code>Type</code> object.</p>
4841    #[allow(unused_mut)]
4842    async fn get_type(
4843        &self,
4844        input: GetTypeRequest,
4845    ) -> Result<GetTypeResponse, RusotoError<GetTypeError>> {
4846        let request_uri = format!(
4847            "/v1/apis/{api_id}/types/{type_name}",
4848            api_id = input.api_id,
4849            type_name = input.type_name
4850        );
4851
4852        let mut request = SignedRequest::new("GET", "appsync", &self.region, &request_uri);
4853        request.set_content_type("application/x-amz-json-1.1".to_owned());
4854
4855        let mut params = Params::new();
4856        params.put("format", &input.format);
4857        request.set_params(params);
4858
4859        let mut response = self
4860            .client
4861            .sign_and_dispatch(request)
4862            .await
4863            .map_err(RusotoError::from)?;
4864        if response.status.is_success() {
4865            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4866            let result =
4867                proto::json::ResponsePayload::new(&response).deserialize::<GetTypeResponse, _>()?;
4868
4869            Ok(result)
4870        } else {
4871            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4872            Err(GetTypeError::from_response(response))
4873        }
4874    }
4875
4876    /// <p><p>Lists the API keys for a given API.</p> <note> <p>API keys are deleted automatically 60 days after they expire. However, they may still be included in the response until they have actually been deleted. You can safely call <code>DeleteApiKey</code> to manually delete a key before it&#39;s automatically deleted.</p> </note></p>
4877    #[allow(unused_mut)]
4878    async fn list_api_keys(
4879        &self,
4880        input: ListApiKeysRequest,
4881    ) -> Result<ListApiKeysResponse, RusotoError<ListApiKeysError>> {
4882        let request_uri = format!("/v1/apis/{api_id}/apikeys", api_id = input.api_id);
4883
4884        let mut request = SignedRequest::new("GET", "appsync", &self.region, &request_uri);
4885        request.set_content_type("application/x-amz-json-1.1".to_owned());
4886
4887        let mut params = Params::new();
4888        if let Some(ref x) = input.max_results {
4889            params.put("maxResults", x);
4890        }
4891        if let Some(ref x) = input.next_token {
4892            params.put("nextToken", x);
4893        }
4894        request.set_params(params);
4895
4896        let mut response = self
4897            .client
4898            .sign_and_dispatch(request)
4899            .await
4900            .map_err(RusotoError::from)?;
4901        if response.status.is_success() {
4902            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4903            let result = proto::json::ResponsePayload::new(&response)
4904                .deserialize::<ListApiKeysResponse, _>()?;
4905
4906            Ok(result)
4907        } else {
4908            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4909            Err(ListApiKeysError::from_response(response))
4910        }
4911    }
4912
4913    /// <p>Lists the data sources for a given API.</p>
4914    #[allow(unused_mut)]
4915    async fn list_data_sources(
4916        &self,
4917        input: ListDataSourcesRequest,
4918    ) -> Result<ListDataSourcesResponse, RusotoError<ListDataSourcesError>> {
4919        let request_uri = format!("/v1/apis/{api_id}/datasources", api_id = input.api_id);
4920
4921        let mut request = SignedRequest::new("GET", "appsync", &self.region, &request_uri);
4922        request.set_content_type("application/x-amz-json-1.1".to_owned());
4923
4924        let mut params = Params::new();
4925        if let Some(ref x) = input.max_results {
4926            params.put("maxResults", x);
4927        }
4928        if let Some(ref x) = input.next_token {
4929            params.put("nextToken", x);
4930        }
4931        request.set_params(params);
4932
4933        let mut response = self
4934            .client
4935            .sign_and_dispatch(request)
4936            .await
4937            .map_err(RusotoError::from)?;
4938        if response.status.is_success() {
4939            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4940            let result = proto::json::ResponsePayload::new(&response)
4941                .deserialize::<ListDataSourcesResponse, _>()?;
4942
4943            Ok(result)
4944        } else {
4945            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4946            Err(ListDataSourcesError::from_response(response))
4947        }
4948    }
4949
4950    /// <p>List multiple functions.</p>
4951    #[allow(unused_mut)]
4952    async fn list_functions(
4953        &self,
4954        input: ListFunctionsRequest,
4955    ) -> Result<ListFunctionsResponse, RusotoError<ListFunctionsError>> {
4956        let request_uri = format!("/v1/apis/{api_id}/functions", api_id = input.api_id);
4957
4958        let mut request = SignedRequest::new("GET", "appsync", &self.region, &request_uri);
4959        request.set_content_type("application/x-amz-json-1.1".to_owned());
4960
4961        let mut params = Params::new();
4962        if let Some(ref x) = input.max_results {
4963            params.put("maxResults", x);
4964        }
4965        if let Some(ref x) = input.next_token {
4966            params.put("nextToken", x);
4967        }
4968        request.set_params(params);
4969
4970        let mut response = self
4971            .client
4972            .sign_and_dispatch(request)
4973            .await
4974            .map_err(RusotoError::from)?;
4975        if response.status.is_success() {
4976            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4977            let result = proto::json::ResponsePayload::new(&response)
4978                .deserialize::<ListFunctionsResponse, _>()?;
4979
4980            Ok(result)
4981        } else {
4982            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4983            Err(ListFunctionsError::from_response(response))
4984        }
4985    }
4986
4987    /// <p>Lists your GraphQL APIs.</p>
4988    #[allow(unused_mut)]
4989    async fn list_graphql_apis(
4990        &self,
4991        input: ListGraphqlApisRequest,
4992    ) -> Result<ListGraphqlApisResponse, RusotoError<ListGraphqlApisError>> {
4993        let request_uri = "/v1/apis";
4994
4995        let mut request = SignedRequest::new("GET", "appsync", &self.region, &request_uri);
4996        request.set_content_type("application/x-amz-json-1.1".to_owned());
4997
4998        let mut params = Params::new();
4999        if let Some(ref x) = input.max_results {
5000            params.put("maxResults", x);
5001        }
5002        if let Some(ref x) = input.next_token {
5003            params.put("nextToken", x);
5004        }
5005        request.set_params(params);
5006
5007        let mut response = self
5008            .client
5009            .sign_and_dispatch(request)
5010            .await
5011            .map_err(RusotoError::from)?;
5012        if response.status.is_success() {
5013            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5014            let result = proto::json::ResponsePayload::new(&response)
5015                .deserialize::<ListGraphqlApisResponse, _>()?;
5016
5017            Ok(result)
5018        } else {
5019            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5020            Err(ListGraphqlApisError::from_response(response))
5021        }
5022    }
5023
5024    /// <p>Lists the resolvers for a given API and type.</p>
5025    #[allow(unused_mut)]
5026    async fn list_resolvers(
5027        &self,
5028        input: ListResolversRequest,
5029    ) -> Result<ListResolversResponse, RusotoError<ListResolversError>> {
5030        let request_uri = format!(
5031            "/v1/apis/{api_id}/types/{type_name}/resolvers",
5032            api_id = input.api_id,
5033            type_name = input.type_name
5034        );
5035
5036        let mut request = SignedRequest::new("GET", "appsync", &self.region, &request_uri);
5037        request.set_content_type("application/x-amz-json-1.1".to_owned());
5038
5039        let mut params = Params::new();
5040        if let Some(ref x) = input.max_results {
5041            params.put("maxResults", x);
5042        }
5043        if let Some(ref x) = input.next_token {
5044            params.put("nextToken", x);
5045        }
5046        request.set_params(params);
5047
5048        let mut response = self
5049            .client
5050            .sign_and_dispatch(request)
5051            .await
5052            .map_err(RusotoError::from)?;
5053        if response.status.is_success() {
5054            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5055            let result = proto::json::ResponsePayload::new(&response)
5056                .deserialize::<ListResolversResponse, _>()?;
5057
5058            Ok(result)
5059        } else {
5060            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5061            Err(ListResolversError::from_response(response))
5062        }
5063    }
5064
5065    /// <p>List the resolvers that are associated with a specific function.</p>
5066    #[allow(unused_mut)]
5067    async fn list_resolvers_by_function(
5068        &self,
5069        input: ListResolversByFunctionRequest,
5070    ) -> Result<ListResolversByFunctionResponse, RusotoError<ListResolversByFunctionError>> {
5071        let request_uri = format!(
5072            "/v1/apis/{api_id}/functions/{function_id}/resolvers",
5073            api_id = input.api_id,
5074            function_id = input.function_id
5075        );
5076
5077        let mut request = SignedRequest::new("GET", "appsync", &self.region, &request_uri);
5078        request.set_content_type("application/x-amz-json-1.1".to_owned());
5079
5080        let mut params = Params::new();
5081        if let Some(ref x) = input.max_results {
5082            params.put("maxResults", x);
5083        }
5084        if let Some(ref x) = input.next_token {
5085            params.put("nextToken", x);
5086        }
5087        request.set_params(params);
5088
5089        let mut response = self
5090            .client
5091            .sign_and_dispatch(request)
5092            .await
5093            .map_err(RusotoError::from)?;
5094        if response.status.is_success() {
5095            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5096            let result = proto::json::ResponsePayload::new(&response)
5097                .deserialize::<ListResolversByFunctionResponse, _>()?;
5098
5099            Ok(result)
5100        } else {
5101            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5102            Err(ListResolversByFunctionError::from_response(response))
5103        }
5104    }
5105
5106    /// <p>Lists the tags for a resource.</p>
5107    #[allow(unused_mut)]
5108    async fn list_tags_for_resource(
5109        &self,
5110        input: ListTagsForResourceRequest,
5111    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>> {
5112        let request_uri = format!("/v1/tags/{resource_arn}", resource_arn = input.resource_arn);
5113
5114        let mut request = SignedRequest::new("GET", "appsync", &self.region, &request_uri);
5115        request.set_content_type("application/x-amz-json-1.1".to_owned());
5116
5117        let mut response = self
5118            .client
5119            .sign_and_dispatch(request)
5120            .await
5121            .map_err(RusotoError::from)?;
5122        if response.status.is_success() {
5123            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5124            let result = proto::json::ResponsePayload::new(&response)
5125                .deserialize::<ListTagsForResourceResponse, _>()?;
5126
5127            Ok(result)
5128        } else {
5129            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5130            Err(ListTagsForResourceError::from_response(response))
5131        }
5132    }
5133
5134    /// <p>Lists the types for a given API.</p>
5135    #[allow(unused_mut)]
5136    async fn list_types(
5137        &self,
5138        input: ListTypesRequest,
5139    ) -> Result<ListTypesResponse, RusotoError<ListTypesError>> {
5140        let request_uri = format!("/v1/apis/{api_id}/types", api_id = input.api_id);
5141
5142        let mut request = SignedRequest::new("GET", "appsync", &self.region, &request_uri);
5143        request.set_content_type("application/x-amz-json-1.1".to_owned());
5144
5145        let mut params = Params::new();
5146        params.put("format", &input.format);
5147        if let Some(ref x) = input.max_results {
5148            params.put("maxResults", x);
5149        }
5150        if let Some(ref x) = input.next_token {
5151            params.put("nextToken", x);
5152        }
5153        request.set_params(params);
5154
5155        let mut response = self
5156            .client
5157            .sign_and_dispatch(request)
5158            .await
5159            .map_err(RusotoError::from)?;
5160        if response.status.is_success() {
5161            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5162            let result = proto::json::ResponsePayload::new(&response)
5163                .deserialize::<ListTypesResponse, _>()?;
5164
5165            Ok(result)
5166        } else {
5167            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5168            Err(ListTypesError::from_response(response))
5169        }
5170    }
5171
5172    /// <p>Adds a new schema to your GraphQL API.</p> <p>This operation is asynchronous. Use to determine when it has completed.</p>
5173    #[allow(unused_mut)]
5174    async fn start_schema_creation(
5175        &self,
5176        input: StartSchemaCreationRequest,
5177    ) -> Result<StartSchemaCreationResponse, RusotoError<StartSchemaCreationError>> {
5178        let request_uri = format!("/v1/apis/{api_id}/schemacreation", api_id = input.api_id);
5179
5180        let mut request = SignedRequest::new("POST", "appsync", &self.region, &request_uri);
5181        request.set_content_type("application/x-amz-json-1.1".to_owned());
5182
5183        let encoded = Some(serde_json::to_vec(&input).unwrap());
5184        request.set_payload(encoded);
5185
5186        let mut response = self
5187            .client
5188            .sign_and_dispatch(request)
5189            .await
5190            .map_err(RusotoError::from)?;
5191        if response.status.is_success() {
5192            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5193            let result = proto::json::ResponsePayload::new(&response)
5194                .deserialize::<StartSchemaCreationResponse, _>()?;
5195
5196            Ok(result)
5197        } else {
5198            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5199            Err(StartSchemaCreationError::from_response(response))
5200        }
5201    }
5202
5203    /// <p>Tags a resource with user-supplied tags.</p>
5204    #[allow(unused_mut)]
5205    async fn tag_resource(
5206        &self,
5207        input: TagResourceRequest,
5208    ) -> Result<TagResourceResponse, RusotoError<TagResourceError>> {
5209        let request_uri = format!("/v1/tags/{resource_arn}", resource_arn = input.resource_arn);
5210
5211        let mut request = SignedRequest::new("POST", "appsync", &self.region, &request_uri);
5212        request.set_content_type("application/x-amz-json-1.1".to_owned());
5213
5214        let encoded = Some(serde_json::to_vec(&input).unwrap());
5215        request.set_payload(encoded);
5216
5217        let mut response = self
5218            .client
5219            .sign_and_dispatch(request)
5220            .await
5221            .map_err(RusotoError::from)?;
5222        if response.status.is_success() {
5223            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5224            let result = proto::json::ResponsePayload::new(&response)
5225                .deserialize::<TagResourceResponse, _>()?;
5226
5227            Ok(result)
5228        } else {
5229            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5230            Err(TagResourceError::from_response(response))
5231        }
5232    }
5233
5234    /// <p>Untags a resource.</p>
5235    #[allow(unused_mut)]
5236    async fn untag_resource(
5237        &self,
5238        input: UntagResourceRequest,
5239    ) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>> {
5240        let request_uri = format!("/v1/tags/{resource_arn}", resource_arn = input.resource_arn);
5241
5242        let mut request = SignedRequest::new("DELETE", "appsync", &self.region, &request_uri);
5243        request.set_content_type("application/x-amz-json-1.1".to_owned());
5244
5245        let mut params = Params::new();
5246        for item in input.tag_keys.iter() {
5247            params.put("tagKeys", item);
5248        }
5249        request.set_params(params);
5250
5251        let mut response = self
5252            .client
5253            .sign_and_dispatch(request)
5254            .await
5255            .map_err(RusotoError::from)?;
5256        if response.status.is_success() {
5257            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5258            let result = proto::json::ResponsePayload::new(&response)
5259                .deserialize::<UntagResourceResponse, _>()?;
5260
5261            Ok(result)
5262        } else {
5263            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5264            Err(UntagResourceError::from_response(response))
5265        }
5266    }
5267
5268    /// <p>Updates the cache for the GraphQL API.</p>
5269    #[allow(unused_mut)]
5270    async fn update_api_cache(
5271        &self,
5272        input: UpdateApiCacheRequest,
5273    ) -> Result<UpdateApiCacheResponse, RusotoError<UpdateApiCacheError>> {
5274        let request_uri = format!("/v1/apis/{api_id}/ApiCaches/update", api_id = input.api_id);
5275
5276        let mut request = SignedRequest::new("POST", "appsync", &self.region, &request_uri);
5277        request.set_content_type("application/x-amz-json-1.1".to_owned());
5278
5279        let encoded = Some(serde_json::to_vec(&input).unwrap());
5280        request.set_payload(encoded);
5281
5282        let mut response = self
5283            .client
5284            .sign_and_dispatch(request)
5285            .await
5286            .map_err(RusotoError::from)?;
5287        if response.status.is_success() {
5288            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5289            let result = proto::json::ResponsePayload::new(&response)
5290                .deserialize::<UpdateApiCacheResponse, _>()?;
5291
5292            Ok(result)
5293        } else {
5294            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5295            Err(UpdateApiCacheError::from_response(response))
5296        }
5297    }
5298
5299    /// <p>Updates an API key. The key can be updated while it is not deleted.</p>
5300    #[allow(unused_mut)]
5301    async fn update_api_key(
5302        &self,
5303        input: UpdateApiKeyRequest,
5304    ) -> Result<UpdateApiKeyResponse, RusotoError<UpdateApiKeyError>> {
5305        let request_uri = format!(
5306            "/v1/apis/{api_id}/apikeys/{id}",
5307            api_id = input.api_id,
5308            id = input.id
5309        );
5310
5311        let mut request = SignedRequest::new("POST", "appsync", &self.region, &request_uri);
5312        request.set_content_type("application/x-amz-json-1.1".to_owned());
5313
5314        let encoded = Some(serde_json::to_vec(&input).unwrap());
5315        request.set_payload(encoded);
5316
5317        let mut response = self
5318            .client
5319            .sign_and_dispatch(request)
5320            .await
5321            .map_err(RusotoError::from)?;
5322        if response.status.is_success() {
5323            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5324            let result = proto::json::ResponsePayload::new(&response)
5325                .deserialize::<UpdateApiKeyResponse, _>()?;
5326
5327            Ok(result)
5328        } else {
5329            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5330            Err(UpdateApiKeyError::from_response(response))
5331        }
5332    }
5333
5334    /// <p>Updates a <code>DataSource</code> object.</p>
5335    #[allow(unused_mut)]
5336    async fn update_data_source(
5337        &self,
5338        input: UpdateDataSourceRequest,
5339    ) -> Result<UpdateDataSourceResponse, RusotoError<UpdateDataSourceError>> {
5340        let request_uri = format!(
5341            "/v1/apis/{api_id}/datasources/{name}",
5342            api_id = input.api_id,
5343            name = input.name
5344        );
5345
5346        let mut request = SignedRequest::new("POST", "appsync", &self.region, &request_uri);
5347        request.set_content_type("application/x-amz-json-1.1".to_owned());
5348
5349        let encoded = Some(serde_json::to_vec(&input).unwrap());
5350        request.set_payload(encoded);
5351
5352        let mut response = self
5353            .client
5354            .sign_and_dispatch(request)
5355            .await
5356            .map_err(RusotoError::from)?;
5357        if response.status.is_success() {
5358            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5359            let result = proto::json::ResponsePayload::new(&response)
5360                .deserialize::<UpdateDataSourceResponse, _>()?;
5361
5362            Ok(result)
5363        } else {
5364            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5365            Err(UpdateDataSourceError::from_response(response))
5366        }
5367    }
5368
5369    /// <p>Updates a <code>Function</code> object.</p>
5370    #[allow(unused_mut)]
5371    async fn update_function(
5372        &self,
5373        input: UpdateFunctionRequest,
5374    ) -> Result<UpdateFunctionResponse, RusotoError<UpdateFunctionError>> {
5375        let request_uri = format!(
5376            "/v1/apis/{api_id}/functions/{function_id}",
5377            api_id = input.api_id,
5378            function_id = input.function_id
5379        );
5380
5381        let mut request = SignedRequest::new("POST", "appsync", &self.region, &request_uri);
5382        request.set_content_type("application/x-amz-json-1.1".to_owned());
5383
5384        let encoded = Some(serde_json::to_vec(&input).unwrap());
5385        request.set_payload(encoded);
5386
5387        let mut response = self
5388            .client
5389            .sign_and_dispatch(request)
5390            .await
5391            .map_err(RusotoError::from)?;
5392        if response.status.is_success() {
5393            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5394            let result = proto::json::ResponsePayload::new(&response)
5395                .deserialize::<UpdateFunctionResponse, _>()?;
5396
5397            Ok(result)
5398        } else {
5399            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5400            Err(UpdateFunctionError::from_response(response))
5401        }
5402    }
5403
5404    /// <p>Updates a <code>GraphqlApi</code> object.</p>
5405    #[allow(unused_mut)]
5406    async fn update_graphql_api(
5407        &self,
5408        input: UpdateGraphqlApiRequest,
5409    ) -> Result<UpdateGraphqlApiResponse, RusotoError<UpdateGraphqlApiError>> {
5410        let request_uri = format!("/v1/apis/{api_id}", api_id = input.api_id);
5411
5412        let mut request = SignedRequest::new("POST", "appsync", &self.region, &request_uri);
5413        request.set_content_type("application/x-amz-json-1.1".to_owned());
5414
5415        let encoded = Some(serde_json::to_vec(&input).unwrap());
5416        request.set_payload(encoded);
5417
5418        let mut response = self
5419            .client
5420            .sign_and_dispatch(request)
5421            .await
5422            .map_err(RusotoError::from)?;
5423        if response.status.is_success() {
5424            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5425            let result = proto::json::ResponsePayload::new(&response)
5426                .deserialize::<UpdateGraphqlApiResponse, _>()?;
5427
5428            Ok(result)
5429        } else {
5430            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5431            Err(UpdateGraphqlApiError::from_response(response))
5432        }
5433    }
5434
5435    /// <p>Updates a <code>Resolver</code> object.</p>
5436    #[allow(unused_mut)]
5437    async fn update_resolver(
5438        &self,
5439        input: UpdateResolverRequest,
5440    ) -> Result<UpdateResolverResponse, RusotoError<UpdateResolverError>> {
5441        let request_uri = format!(
5442            "/v1/apis/{api_id}/types/{type_name}/resolvers/{field_name}",
5443            api_id = input.api_id,
5444            field_name = input.field_name,
5445            type_name = input.type_name
5446        );
5447
5448        let mut request = SignedRequest::new("POST", "appsync", &self.region, &request_uri);
5449        request.set_content_type("application/x-amz-json-1.1".to_owned());
5450
5451        let encoded = Some(serde_json::to_vec(&input).unwrap());
5452        request.set_payload(encoded);
5453
5454        let mut response = self
5455            .client
5456            .sign_and_dispatch(request)
5457            .await
5458            .map_err(RusotoError::from)?;
5459        if response.status.is_success() {
5460            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5461            let result = proto::json::ResponsePayload::new(&response)
5462                .deserialize::<UpdateResolverResponse, _>()?;
5463
5464            Ok(result)
5465        } else {
5466            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5467            Err(UpdateResolverError::from_response(response))
5468        }
5469    }
5470
5471    /// <p>Updates a <code>Type</code> object.</p>
5472    #[allow(unused_mut)]
5473    async fn update_type(
5474        &self,
5475        input: UpdateTypeRequest,
5476    ) -> Result<UpdateTypeResponse, RusotoError<UpdateTypeError>> {
5477        let request_uri = format!(
5478            "/v1/apis/{api_id}/types/{type_name}",
5479            api_id = input.api_id,
5480            type_name = input.type_name
5481        );
5482
5483        let mut request = SignedRequest::new("POST", "appsync", &self.region, &request_uri);
5484        request.set_content_type("application/x-amz-json-1.1".to_owned());
5485
5486        let encoded = Some(serde_json::to_vec(&input).unwrap());
5487        request.set_payload(encoded);
5488
5489        let mut response = self
5490            .client
5491            .sign_and_dispatch(request)
5492            .await
5493            .map_err(RusotoError::from)?;
5494        if response.status.is_success() {
5495            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5496            let result = proto::json::ResponsePayload::new(&response)
5497                .deserialize::<UpdateTypeResponse, _>()?;
5498
5499            Ok(result)
5500        } else {
5501            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5502            Err(UpdateTypeError::from_response(response))
5503        }
5504    }
5505}