rusoto_serverlessrepo/
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>A nested application summary.</p>
29#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
30#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
31pub struct ApplicationDependencySummary {
32    /// <p>The Amazon Resource Name (ARN) of the nested application.</p>
33    #[serde(rename = "ApplicationId")]
34    pub application_id: String,
35    /// <p>The semantic version of the nested application.</p>
36    #[serde(rename = "SemanticVersion")]
37    pub semantic_version: String,
38}
39
40/// <p>Policy statement applied to the application.</p>
41#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
42pub struct ApplicationPolicyStatement {
43    /// <p>For the list of actions supported for this operation, see <a href="https://docs.aws.amazon.com/serverlessrepo/latest/devguide/access-control-resource-based.html#application-permissions">Application
44    /// Permissions</a>.</p>
45    #[serde(rename = "Actions")]
46    pub actions: Vec<String>,
47    /// <p>An array of PrinciplalOrgIDs, which corresponds to AWS IAM <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#principal-org-id">aws:PrincipalOrgID</a> global condition key.</p>
48    #[serde(rename = "PrincipalOrgIDs")]
49    #[serde(skip_serializing_if = "Option::is_none")]
50    pub principal_org_i_ds: Option<Vec<String>>,
51    /// <p>An array of AWS account IDs, or * to make the application public.</p>
52    #[serde(rename = "Principals")]
53    pub principals: Vec<String>,
54    /// <p>A unique ID for the statement.</p>
55    #[serde(rename = "StatementId")]
56    #[serde(skip_serializing_if = "Option::is_none")]
57    pub statement_id: Option<String>,
58}
59
60/// <p>Summary of details about the application.</p>
61#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
62#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
63pub struct ApplicationSummary {
64    /// <p>The application Amazon Resource Name (ARN).</p>
65    #[serde(rename = "ApplicationId")]
66    pub application_id: String,
67    /// <p>The name of the author publishing the app.</p><p>Minimum length=1. Maximum length=127.</p><p>Pattern "^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$";</p>
68    #[serde(rename = "Author")]
69    pub author: String,
70    /// <p>The date and time this resource was created.</p>
71    #[serde(rename = "CreationTime")]
72    #[serde(skip_serializing_if = "Option::is_none")]
73    pub creation_time: Option<String>,
74    /// <p>The description of the application.</p><p>Minimum length=1. Maximum length=256</p>
75    #[serde(rename = "Description")]
76    pub description: String,
77    /// <p>A URL with more information about the application, for example the location of your GitHub repository for the application.</p>
78    #[serde(rename = "HomePageUrl")]
79    #[serde(skip_serializing_if = "Option::is_none")]
80    pub home_page_url: Option<String>,
81    /// <p>Labels to improve discovery of apps in search results.</p><p>Minimum length=1. Maximum length=127. Maximum number of labels: 10</p><p>Pattern: "^[a-zA-Z0-9+\\-_:\\/@]+$";</p>
82    #[serde(rename = "Labels")]
83    #[serde(skip_serializing_if = "Option::is_none")]
84    pub labels: Option<Vec<String>>,
85    /// <p>The name of the application.</p><p>Minimum length=1. Maximum length=140</p><p>Pattern: "[a-zA-Z0-9\\-]+";</p>
86    #[serde(rename = "Name")]
87    pub name: String,
88    /// <p>A valid identifier from <a href="https://spdx.org/licenses/">https://spdx.org/licenses/</a>.</p>
89    #[serde(rename = "SpdxLicenseId")]
90    #[serde(skip_serializing_if = "Option::is_none")]
91    pub spdx_license_id: Option<String>,
92}
93
94#[derive(Clone, Debug, Default, PartialEq, Serialize)]
95#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
96pub struct CreateApplicationRequest {
97    /// <p>The name of the author publishing the app.</p><p>Minimum length=1. Maximum length=127.</p><p>Pattern "^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$";</p>
98    #[serde(rename = "Author")]
99    pub author: String,
100    /// <p>The description of the application.</p><p>Minimum length=1. Maximum length=256</p>
101    #[serde(rename = "Description")]
102    pub description: String,
103    /// <p>A URL with more information about the application, for example the location of your GitHub repository for the application.</p>
104    #[serde(rename = "HomePageUrl")]
105    #[serde(skip_serializing_if = "Option::is_none")]
106    pub home_page_url: Option<String>,
107    /// <p>Labels to improve discovery of apps in search results.</p><p>Minimum length=1. Maximum length=127. Maximum number of labels: 10</p><p>Pattern: "^[a-zA-Z0-9+\\-_:\\/@]+$";</p>
108    #[serde(rename = "Labels")]
109    #[serde(skip_serializing_if = "Option::is_none")]
110    pub labels: Option<Vec<String>>,
111    /// <p>A local text file that contains the license of the app that matches the spdxLicenseID value of your application.
112    /// The file has the format file://&lt;path>/&lt;filename>.</p><p>Maximum size 5 MB</p><p>You can specify only one of licenseBody and licenseUrl; otherwise, an error results.</p>
113    #[serde(rename = "LicenseBody")]
114    #[serde(skip_serializing_if = "Option::is_none")]
115    pub license_body: Option<String>,
116    /// <p>A link to the S3 object that contains the license of the app that matches the spdxLicenseID value of your application.</p><p>Maximum size 5 MB</p><p>You can specify only one of licenseBody and licenseUrl; otherwise, an error results.</p>
117    #[serde(rename = "LicenseUrl")]
118    #[serde(skip_serializing_if = "Option::is_none")]
119    pub license_url: Option<String>,
120    /// <p>The name of the application that you want to publish.</p><p>Minimum length=1. Maximum length=140</p><p>Pattern: "[a-zA-Z0-9\\-]+";</p>
121    #[serde(rename = "Name")]
122    pub name: String,
123    /// <p>A local text readme file in Markdown language that contains a more detailed description of the application and how it works.
124    /// The file has the format file://&lt;path>/&lt;filename>.</p><p>Maximum size 5 MB</p><p>You can specify only one of readmeBody and readmeUrl; otherwise, an error results.</p>
125    #[serde(rename = "ReadmeBody")]
126    #[serde(skip_serializing_if = "Option::is_none")]
127    pub readme_body: Option<String>,
128    /// <p>A link to the S3 object in Markdown language that contains a more detailed description of the application and how it works.</p><p>Maximum size 5 MB</p><p>You can specify only one of readmeBody and readmeUrl; otherwise, an error results.</p>
129    #[serde(rename = "ReadmeUrl")]
130    #[serde(skip_serializing_if = "Option::is_none")]
131    pub readme_url: Option<String>,
132    /// <p>The semantic version of the application:</p><p>
133    /// <a href="https://semver.org/">https://semver.org/</a>
134    /// </p>
135    #[serde(rename = "SemanticVersion")]
136    #[serde(skip_serializing_if = "Option::is_none")]
137    pub semantic_version: Option<String>,
138    /// <p>A link to the S3 object that contains the ZIP archive of the source code for this version of your application.</p><p>Maximum size 50 MB</p>
139    #[serde(rename = "SourceCodeArchiveUrl")]
140    #[serde(skip_serializing_if = "Option::is_none")]
141    pub source_code_archive_url: Option<String>,
142    /// <p>A link to a public repository for the source code of your application, for example the URL of a specific GitHub commit.</p>
143    #[serde(rename = "SourceCodeUrl")]
144    #[serde(skip_serializing_if = "Option::is_none")]
145    pub source_code_url: Option<String>,
146    /// <p>A valid identifier from <a href="https://spdx.org/licenses/">https://spdx.org/licenses/</a>.</p>
147    #[serde(rename = "SpdxLicenseId")]
148    #[serde(skip_serializing_if = "Option::is_none")]
149    pub spdx_license_id: Option<String>,
150    /// <p>The local raw packaged AWS SAM template file of your application.
151    /// The file has the format file://&lt;path>/&lt;filename>.</p><p>You can specify only one of templateBody and templateUrl; otherwise an error results.</p>
152    #[serde(rename = "TemplateBody")]
153    #[serde(skip_serializing_if = "Option::is_none")]
154    pub template_body: Option<String>,
155    /// <p>A link to the S3 object containing the packaged AWS SAM template of your application.</p><p>You can specify only one of templateBody and templateUrl; otherwise an error results.</p>
156    #[serde(rename = "TemplateUrl")]
157    #[serde(skip_serializing_if = "Option::is_none")]
158    pub template_url: Option<String>,
159}
160
161#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
162#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
163pub struct CreateApplicationResponse {
164    /// <p>The application Amazon Resource Name (ARN).</p>
165    #[serde(rename = "ApplicationId")]
166    #[serde(skip_serializing_if = "Option::is_none")]
167    pub application_id: Option<String>,
168    /// <p>The name of the author publishing the app.</p><p>Minimum length=1. Maximum length=127.</p><p>Pattern "^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$";</p>
169    #[serde(rename = "Author")]
170    #[serde(skip_serializing_if = "Option::is_none")]
171    pub author: Option<String>,
172    /// <p>The date and time this resource was created.</p>
173    #[serde(rename = "CreationTime")]
174    #[serde(skip_serializing_if = "Option::is_none")]
175    pub creation_time: Option<String>,
176    /// <p>The description of the application.</p><p>Minimum length=1. Maximum length=256</p>
177    #[serde(rename = "Description")]
178    #[serde(skip_serializing_if = "Option::is_none")]
179    pub description: Option<String>,
180    /// <p>A URL with more information about the application, for example the location of your GitHub repository for the application.</p>
181    #[serde(rename = "HomePageUrl")]
182    #[serde(skip_serializing_if = "Option::is_none")]
183    pub home_page_url: Option<String>,
184    /// <p>Whether the author of this application has been verified. This means means that AWS has made a good faith review, as a reasonable and prudent service provider, of the information provided by the requester and has confirmed that the requester's identity is as claimed.</p>
185    #[serde(rename = "IsVerifiedAuthor")]
186    #[serde(skip_serializing_if = "Option::is_none")]
187    pub is_verified_author: Option<bool>,
188    /// <p>Labels to improve discovery of apps in search results.</p><p>Minimum length=1. Maximum length=127. Maximum number of labels: 10</p><p>Pattern: "^[a-zA-Z0-9+\\-_:\\/@]+$";</p>
189    #[serde(rename = "Labels")]
190    #[serde(skip_serializing_if = "Option::is_none")]
191    pub labels: Option<Vec<String>>,
192    /// <p>A link to a license file of the app that matches the spdxLicenseID value of your application.</p><p>Maximum size 5 MB</p>
193    #[serde(rename = "LicenseUrl")]
194    #[serde(skip_serializing_if = "Option::is_none")]
195    pub license_url: Option<String>,
196    /// <p>The name of the application.</p><p>Minimum length=1. Maximum length=140</p><p>Pattern: "[a-zA-Z0-9\\-]+";</p>
197    #[serde(rename = "Name")]
198    #[serde(skip_serializing_if = "Option::is_none")]
199    pub name: Option<String>,
200    /// <p>A link to the readme file in Markdown language that contains a more detailed description of the application and how it works.</p><p>Maximum size 5 MB</p>
201    #[serde(rename = "ReadmeUrl")]
202    #[serde(skip_serializing_if = "Option::is_none")]
203    pub readme_url: Option<String>,
204    /// <p>A valid identifier from https://spdx.org/licenses/.</p>
205    #[serde(rename = "SpdxLicenseId")]
206    #[serde(skip_serializing_if = "Option::is_none")]
207    pub spdx_license_id: Option<String>,
208    /// <p>The URL to the public profile of a verified author. This URL is submitted by the author.</p>
209    #[serde(rename = "VerifiedAuthorUrl")]
210    #[serde(skip_serializing_if = "Option::is_none")]
211    pub verified_author_url: Option<String>,
212    /// <p>Version information about the application.</p>
213    #[serde(rename = "Version")]
214    #[serde(skip_serializing_if = "Option::is_none")]
215    pub version: Option<Version>,
216}
217
218#[derive(Clone, Debug, Default, PartialEq, Serialize)]
219#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
220pub struct CreateApplicationVersionRequest {
221    /// <p>The Amazon Resource Name (ARN) of the application.</p>
222    #[serde(rename = "ApplicationId")]
223    pub application_id: String,
224    /// <p>The semantic version of the new version.</p>
225    #[serde(rename = "SemanticVersion")]
226    pub semantic_version: String,
227    /// <p>A link to the S3 object that contains the ZIP archive of the source code for this version of your application.</p><p>Maximum size 50 MB</p>
228    #[serde(rename = "SourceCodeArchiveUrl")]
229    #[serde(skip_serializing_if = "Option::is_none")]
230    pub source_code_archive_url: Option<String>,
231    /// <p>A link to a public repository for the source code of your application, for example the URL of a specific GitHub commit.</p>
232    #[serde(rename = "SourceCodeUrl")]
233    #[serde(skip_serializing_if = "Option::is_none")]
234    pub source_code_url: Option<String>,
235    /// <p>The raw packaged AWS SAM template of your application.</p>
236    #[serde(rename = "TemplateBody")]
237    #[serde(skip_serializing_if = "Option::is_none")]
238    pub template_body: Option<String>,
239    /// <p>A link to the packaged AWS SAM template of your application.</p>
240    #[serde(rename = "TemplateUrl")]
241    #[serde(skip_serializing_if = "Option::is_none")]
242    pub template_url: Option<String>,
243}
244
245#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
246#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
247pub struct CreateApplicationVersionResponse {
248    /// <p>The application Amazon Resource Name (ARN).</p>
249    #[serde(rename = "ApplicationId")]
250    #[serde(skip_serializing_if = "Option::is_none")]
251    pub application_id: Option<String>,
252    /// <p>The date and time this resource was created.</p>
253    #[serde(rename = "CreationTime")]
254    #[serde(skip_serializing_if = "Option::is_none")]
255    pub creation_time: Option<String>,
256    /// <p>An array of parameter types supported by the application.</p>
257    #[serde(rename = "ParameterDefinitions")]
258    #[serde(skip_serializing_if = "Option::is_none")]
259    pub parameter_definitions: Option<Vec<ParameterDefinition>>,
260    /// <p>A list of values that you must specify before you can deploy certain applications.
261    /// Some applications might include resources that can affect permissions in your AWS
262    /// account, for example, by creating new AWS Identity and Access Management (IAM) users.
263    /// For those applications, you must explicitly acknowledge their capabilities by
264    /// specifying this parameter.</p><p>The only valid values are CAPABILITY_IAM, CAPABILITY_NAMED_IAM,
265    /// CAPABILITY_RESOURCE_POLICY, and CAPABILITY_AUTO_EXPAND.</p><p>The following resources require you to specify CAPABILITY_IAM or
266    /// CAPABILITY_NAMED_IAM:
267    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html">AWS::IAM::Group</a>,
268    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html">AWS::IAM::InstanceProfile</a>,
269    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html">AWS::IAM::Policy</a>, and
270    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html">AWS::IAM::Role</a>.
271    /// If the application contains IAM resources, you can specify either CAPABILITY_IAM
272    /// or CAPABILITY_NAMED_IAM. If the application contains IAM resources
273    /// with custom names, you must specify CAPABILITY_NAMED_IAM.</p><p>The following resources require you to specify CAPABILITY_RESOURCE_POLICY:
274    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html">AWS::Lambda::Permission</a>,
275    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html">AWS::IAM:Policy</a>,
276    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationautoscaling-scalingpolicy.html">AWS::ApplicationAutoScaling::ScalingPolicy</a>,
277    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-policy.html">AWS::S3::BucketPolicy</a>,
278    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-policy.html">AWS::SQS::QueuePolicy</a>, and
279    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-policy.html">AWS::SNS::TopicPolicy</a>.</p><p>Applications that contain one or more nested applications require you to specify
280    /// CAPABILITY_AUTO_EXPAND.</p><p>If your application template contains any of the above resources, we recommend that you review
281    /// all permissions associated with the application before deploying. If you don't specify
282    /// this parameter for an application that requires capabilities, the call will fail.</p>
283    #[serde(rename = "RequiredCapabilities")]
284    #[serde(skip_serializing_if = "Option::is_none")]
285    pub required_capabilities: Option<Vec<String>>,
286    /// <p>Whether all of the AWS resources contained in this application are supported in the region
287    /// in which it is being retrieved.</p>
288    #[serde(rename = "ResourcesSupported")]
289    #[serde(skip_serializing_if = "Option::is_none")]
290    pub resources_supported: Option<bool>,
291    /// <p>The semantic version of the application:</p><p>
292    /// <a href="https://semver.org/">https://semver.org/</a>
293    /// </p>
294    #[serde(rename = "SemanticVersion")]
295    #[serde(skip_serializing_if = "Option::is_none")]
296    pub semantic_version: Option<String>,
297    /// <p>A link to the S3 object that contains the ZIP archive of the source code for this version of your application.</p><p>Maximum size 50 MB</p>
298    #[serde(rename = "SourceCodeArchiveUrl")]
299    #[serde(skip_serializing_if = "Option::is_none")]
300    pub source_code_archive_url: Option<String>,
301    /// <p>A link to a public repository for the source code of your application, for example the URL of a specific GitHub commit.</p>
302    #[serde(rename = "SourceCodeUrl")]
303    #[serde(skip_serializing_if = "Option::is_none")]
304    pub source_code_url: Option<String>,
305    /// <p>A link to the packaged AWS SAM template of your application.</p>
306    #[serde(rename = "TemplateUrl")]
307    #[serde(skip_serializing_if = "Option::is_none")]
308    pub template_url: Option<String>,
309}
310
311#[derive(Clone, Debug, Default, PartialEq, Serialize)]
312#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
313pub struct CreateCloudFormationChangeSetRequest {
314    /// <p>The Amazon Resource Name (ARN) of the application.</p>
315    #[serde(rename = "ApplicationId")]
316    pub application_id: String,
317    /// <p>A list of values that you must specify before you can deploy certain applications.
318    /// Some applications might include resources that can affect permissions in your AWS
319    /// account, for example, by creating new AWS Identity and Access Management (IAM) users.
320    /// For those applications, you must explicitly acknowledge their capabilities by
321    /// specifying this parameter.</p><p>The only valid values are CAPABILITY_IAM, CAPABILITY_NAMED_IAM,
322    /// CAPABILITY_RESOURCE_POLICY, and CAPABILITY_AUTO_EXPAND.</p><p>The following resources require you to specify CAPABILITY_IAM or
323    /// CAPABILITY_NAMED_IAM:
324    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html">AWS::IAM::Group</a>,
325    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html">AWS::IAM::InstanceProfile</a>,
326    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html">AWS::IAM::Policy</a>, and
327    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html">AWS::IAM::Role</a>.
328    /// If the application contains IAM resources, you can specify either CAPABILITY_IAM
329    /// or CAPABILITY_NAMED_IAM. If the application contains IAM resources
330    /// with custom names, you must specify CAPABILITY_NAMED_IAM.</p><p>The following resources require you to specify CAPABILITY_RESOURCE_POLICY:
331    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html">AWS::Lambda::Permission</a>,
332    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html">AWS::IAM:Policy</a>,
333    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationautoscaling-scalingpolicy.html">AWS::ApplicationAutoScaling::ScalingPolicy</a>,
334    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-policy.html">AWS::S3::BucketPolicy</a>,
335    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-policy.html">AWS::SQS::QueuePolicy</a>, and
336    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-policy.html">AWS::SNS:TopicPolicy</a>.</p><p>Applications that contain one or more nested applications require you to specify
337    /// CAPABILITY_AUTO_EXPAND.</p><p>If your application template contains any of the above resources, we recommend that you review
338    /// all permissions associated with the application before deploying. If you don't specify
339    /// this parameter for an application that requires capabilities, the call will fail.</p>
340    #[serde(rename = "Capabilities")]
341    #[serde(skip_serializing_if = "Option::is_none")]
342    pub capabilities: Option<Vec<String>>,
343    /// <p>This property corresponds to the parameter of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateChangeSet">CreateChangeSet</a>
344    /// </i> API.</p>
345    #[serde(rename = "ChangeSetName")]
346    #[serde(skip_serializing_if = "Option::is_none")]
347    pub change_set_name: Option<String>,
348    /// <p>This property corresponds to the parameter of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateChangeSet">CreateChangeSet</a>
349    /// </i> API.</p>
350    #[serde(rename = "ClientToken")]
351    #[serde(skip_serializing_if = "Option::is_none")]
352    pub client_token: Option<String>,
353    /// <p>This property corresponds to the parameter of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateChangeSet">CreateChangeSet</a>
354    /// </i> API.</p>
355    #[serde(rename = "Description")]
356    #[serde(skip_serializing_if = "Option::is_none")]
357    pub description: Option<String>,
358    /// <p>This property corresponds to the parameter of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateChangeSet">CreateChangeSet</a>
359    /// </i> API.</p>
360    #[serde(rename = "NotificationArns")]
361    #[serde(skip_serializing_if = "Option::is_none")]
362    pub notification_arns: Option<Vec<String>>,
363    /// <p>A list of parameter values for the parameters of the application.</p>
364    #[serde(rename = "ParameterOverrides")]
365    #[serde(skip_serializing_if = "Option::is_none")]
366    pub parameter_overrides: Option<Vec<ParameterValue>>,
367    /// <p>This property corresponds to the parameter of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateChangeSet">CreateChangeSet</a>
368    /// </i> API.</p>
369    #[serde(rename = "ResourceTypes")]
370    #[serde(skip_serializing_if = "Option::is_none")]
371    pub resource_types: Option<Vec<String>>,
372    /// <p>This property corresponds to the parameter of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateChangeSet">CreateChangeSet</a>
373    /// </i> API.</p>
374    #[serde(rename = "RollbackConfiguration")]
375    #[serde(skip_serializing_if = "Option::is_none")]
376    pub rollback_configuration: Option<RollbackConfiguration>,
377    /// <p>The semantic version of the application:</p><p>
378    /// <a href="https://semver.org/">https://semver.org/</a>
379    /// </p>
380    #[serde(rename = "SemanticVersion")]
381    #[serde(skip_serializing_if = "Option::is_none")]
382    pub semantic_version: Option<String>,
383    /// <p>This property corresponds to the parameter of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateChangeSet">CreateChangeSet</a>
384    /// </i> API.</p>
385    #[serde(rename = "StackName")]
386    pub stack_name: String,
387    /// <p>This property corresponds to the parameter of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateChangeSet">CreateChangeSet</a>
388    /// </i> API.</p>
389    #[serde(rename = "Tags")]
390    #[serde(skip_serializing_if = "Option::is_none")]
391    pub tags: Option<Vec<Tag>>,
392    /// <p>The UUID returned by CreateCloudFormationTemplate.</p><p>Pattern: [0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}</p>
393    #[serde(rename = "TemplateId")]
394    #[serde(skip_serializing_if = "Option::is_none")]
395    pub template_id: Option<String>,
396}
397
398#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
399#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
400pub struct CreateCloudFormationChangeSetResponse {
401    /// <p>The application Amazon Resource Name (ARN).</p>
402    #[serde(rename = "ApplicationId")]
403    #[serde(skip_serializing_if = "Option::is_none")]
404    pub application_id: Option<String>,
405    /// <p>The Amazon Resource Name (ARN) of the change set.</p><p>Length constraints: Minimum length of 1.</p><p>Pattern: ARN:[-a-zA-Z0-9:/]*</p>
406    #[serde(rename = "ChangeSetId")]
407    #[serde(skip_serializing_if = "Option::is_none")]
408    pub change_set_id: Option<String>,
409    /// <p>The semantic version of the application:</p><p>
410    /// <a href="https://semver.org/">https://semver.org/</a>
411    /// </p>
412    #[serde(rename = "SemanticVersion")]
413    #[serde(skip_serializing_if = "Option::is_none")]
414    pub semantic_version: Option<String>,
415    /// <p>The unique ID of the stack.</p>
416    #[serde(rename = "StackId")]
417    #[serde(skip_serializing_if = "Option::is_none")]
418    pub stack_id: Option<String>,
419}
420
421#[derive(Clone, Debug, Default, PartialEq, Serialize)]
422#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
423pub struct CreateCloudFormationTemplateRequest {
424    /// <p>The Amazon Resource Name (ARN) of the application.</p>
425    #[serde(rename = "ApplicationId")]
426    pub application_id: String,
427    /// <p>The semantic version of the application:</p><p>
428    /// <a href="https://semver.org/">https://semver.org/</a>
429    /// </p>
430    #[serde(rename = "SemanticVersion")]
431    #[serde(skip_serializing_if = "Option::is_none")]
432    pub semantic_version: Option<String>,
433}
434
435#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
436#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
437pub struct CreateCloudFormationTemplateResponse {
438    /// <p>The application Amazon Resource Name (ARN).</p>
439    #[serde(rename = "ApplicationId")]
440    #[serde(skip_serializing_if = "Option::is_none")]
441    pub application_id: Option<String>,
442    /// <p>The date and time this resource was created.</p>
443    #[serde(rename = "CreationTime")]
444    #[serde(skip_serializing_if = "Option::is_none")]
445    pub creation_time: Option<String>,
446    /// <p>The date and time this template expires. Templates
447    /// expire 1 hour after creation.</p>
448    #[serde(rename = "ExpirationTime")]
449    #[serde(skip_serializing_if = "Option::is_none")]
450    pub expiration_time: Option<String>,
451    /// <p>The semantic version of the application:</p><p>
452    /// <a href="https://semver.org/">https://semver.org/</a>
453    /// </p>
454    #[serde(rename = "SemanticVersion")]
455    #[serde(skip_serializing_if = "Option::is_none")]
456    pub semantic_version: Option<String>,
457    /// <p>Status of the template creation workflow.</p><p>Possible values: PREPARING | ACTIVE | EXPIRED
458    /// </p>
459    #[serde(rename = "Status")]
460    #[serde(skip_serializing_if = "Option::is_none")]
461    pub status: Option<String>,
462    /// <p>The UUID returned by CreateCloudFormationTemplate.</p><p>Pattern: [0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}</p>
463    #[serde(rename = "TemplateId")]
464    #[serde(skip_serializing_if = "Option::is_none")]
465    pub template_id: Option<String>,
466    /// <p>A link to the template that can be used to deploy the application using
467    /// AWS CloudFormation.</p>
468    #[serde(rename = "TemplateUrl")]
469    #[serde(skip_serializing_if = "Option::is_none")]
470    pub template_url: Option<String>,
471}
472
473#[derive(Clone, Debug, Default, PartialEq, Serialize)]
474#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
475pub struct DeleteApplicationRequest {
476    /// <p>The Amazon Resource Name (ARN) of the application.</p>
477    #[serde(rename = "ApplicationId")]
478    pub application_id: String,
479}
480
481#[derive(Clone, Debug, Default, PartialEq, Serialize)]
482#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
483pub struct GetApplicationPolicyRequest {
484    /// <p>The Amazon Resource Name (ARN) of the application.</p>
485    #[serde(rename = "ApplicationId")]
486    pub application_id: String,
487}
488
489#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
490#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
491pub struct GetApplicationPolicyResponse {
492    /// <p>An array of policy statements applied to the application.</p>
493    #[serde(rename = "Statements")]
494    #[serde(skip_serializing_if = "Option::is_none")]
495    pub statements: Option<Vec<ApplicationPolicyStatement>>,
496}
497
498#[derive(Clone, Debug, Default, PartialEq, Serialize)]
499#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
500pub struct GetApplicationRequest {
501    /// <p>The Amazon Resource Name (ARN) of the application.</p>
502    #[serde(rename = "ApplicationId")]
503    pub application_id: String,
504    /// <p>The semantic version of the application to get.</p>
505    #[serde(rename = "SemanticVersion")]
506    #[serde(skip_serializing_if = "Option::is_none")]
507    pub semantic_version: Option<String>,
508}
509
510#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
511#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
512pub struct GetApplicationResponse {
513    /// <p>The application Amazon Resource Name (ARN).</p>
514    #[serde(rename = "ApplicationId")]
515    #[serde(skip_serializing_if = "Option::is_none")]
516    pub application_id: Option<String>,
517    /// <p>The name of the author publishing the app.</p><p>Minimum length=1. Maximum length=127.</p><p>Pattern "^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$";</p>
518    #[serde(rename = "Author")]
519    #[serde(skip_serializing_if = "Option::is_none")]
520    pub author: Option<String>,
521    /// <p>The date and time this resource was created.</p>
522    #[serde(rename = "CreationTime")]
523    #[serde(skip_serializing_if = "Option::is_none")]
524    pub creation_time: Option<String>,
525    /// <p>The description of the application.</p><p>Minimum length=1. Maximum length=256</p>
526    #[serde(rename = "Description")]
527    #[serde(skip_serializing_if = "Option::is_none")]
528    pub description: Option<String>,
529    /// <p>A URL with more information about the application, for example the location of your GitHub repository for the application.</p>
530    #[serde(rename = "HomePageUrl")]
531    #[serde(skip_serializing_if = "Option::is_none")]
532    pub home_page_url: Option<String>,
533    /// <p>Whether the author of this application has been verified. This means means that AWS has made a good faith review, as a reasonable and prudent service provider, of the information provided by the requester and has confirmed that the requester's identity is as claimed.</p>
534    #[serde(rename = "IsVerifiedAuthor")]
535    #[serde(skip_serializing_if = "Option::is_none")]
536    pub is_verified_author: Option<bool>,
537    /// <p>Labels to improve discovery of apps in search results.</p><p>Minimum length=1. Maximum length=127. Maximum number of labels: 10</p><p>Pattern: "^[a-zA-Z0-9+\\-_:\\/@]+$";</p>
538    #[serde(rename = "Labels")]
539    #[serde(skip_serializing_if = "Option::is_none")]
540    pub labels: Option<Vec<String>>,
541    /// <p>A link to a license file of the app that matches the spdxLicenseID value of your application.</p><p>Maximum size 5 MB</p>
542    #[serde(rename = "LicenseUrl")]
543    #[serde(skip_serializing_if = "Option::is_none")]
544    pub license_url: Option<String>,
545    /// <p>The name of the application.</p><p>Minimum length=1. Maximum length=140</p><p>Pattern: "[a-zA-Z0-9\\-]+";</p>
546    #[serde(rename = "Name")]
547    #[serde(skip_serializing_if = "Option::is_none")]
548    pub name: Option<String>,
549    /// <p>A link to the readme file in Markdown language that contains a more detailed description of the application and how it works.</p><p>Maximum size 5 MB</p>
550    #[serde(rename = "ReadmeUrl")]
551    #[serde(skip_serializing_if = "Option::is_none")]
552    pub readme_url: Option<String>,
553    /// <p>A valid identifier from https://spdx.org/licenses/.</p>
554    #[serde(rename = "SpdxLicenseId")]
555    #[serde(skip_serializing_if = "Option::is_none")]
556    pub spdx_license_id: Option<String>,
557    /// <p>The URL to the public profile of a verified author. This URL is submitted by the author.</p>
558    #[serde(rename = "VerifiedAuthorUrl")]
559    #[serde(skip_serializing_if = "Option::is_none")]
560    pub verified_author_url: Option<String>,
561    /// <p>Version information about the application.</p>
562    #[serde(rename = "Version")]
563    #[serde(skip_serializing_if = "Option::is_none")]
564    pub version: Option<Version>,
565}
566
567#[derive(Clone, Debug, Default, PartialEq, Serialize)]
568#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
569pub struct GetCloudFormationTemplateRequest {
570    /// <p>The Amazon Resource Name (ARN) of the application.</p>
571    #[serde(rename = "ApplicationId")]
572    pub application_id: String,
573    /// <p>The UUID returned by CreateCloudFormationTemplate.</p><p>Pattern: [0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}</p>
574    #[serde(rename = "TemplateId")]
575    pub template_id: String,
576}
577
578#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
579#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
580pub struct GetCloudFormationTemplateResponse {
581    /// <p>The application Amazon Resource Name (ARN).</p>
582    #[serde(rename = "ApplicationId")]
583    #[serde(skip_serializing_if = "Option::is_none")]
584    pub application_id: Option<String>,
585    /// <p>The date and time this resource was created.</p>
586    #[serde(rename = "CreationTime")]
587    #[serde(skip_serializing_if = "Option::is_none")]
588    pub creation_time: Option<String>,
589    /// <p>The date and time this template expires. Templates
590    /// expire 1 hour after creation.</p>
591    #[serde(rename = "ExpirationTime")]
592    #[serde(skip_serializing_if = "Option::is_none")]
593    pub expiration_time: Option<String>,
594    /// <p>The semantic version of the application:</p><p>
595    /// <a href="https://semver.org/">https://semver.org/</a>
596    /// </p>
597    #[serde(rename = "SemanticVersion")]
598    #[serde(skip_serializing_if = "Option::is_none")]
599    pub semantic_version: Option<String>,
600    /// <p>Status of the template creation workflow.</p><p>Possible values: PREPARING | ACTIVE | EXPIRED
601    /// </p>
602    #[serde(rename = "Status")]
603    #[serde(skip_serializing_if = "Option::is_none")]
604    pub status: Option<String>,
605    /// <p>The UUID returned by CreateCloudFormationTemplate.</p><p>Pattern: [0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}</p>
606    #[serde(rename = "TemplateId")]
607    #[serde(skip_serializing_if = "Option::is_none")]
608    pub template_id: Option<String>,
609    /// <p>A link to the template that can be used to deploy the application using
610    /// AWS CloudFormation.</p>
611    #[serde(rename = "TemplateUrl")]
612    #[serde(skip_serializing_if = "Option::is_none")]
613    pub template_url: Option<String>,
614}
615
616#[derive(Clone, Debug, Default, PartialEq, Serialize)]
617#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
618pub struct ListApplicationDependenciesRequest {
619    /// <p>The Amazon Resource Name (ARN) of the application.</p>
620    #[serde(rename = "ApplicationId")]
621    pub application_id: String,
622    /// <p>The total number of items to return.</p>
623    #[serde(rename = "MaxItems")]
624    #[serde(skip_serializing_if = "Option::is_none")]
625    pub max_items: Option<i64>,
626    /// <p>A token to specify where to start paginating.</p>
627    #[serde(rename = "NextToken")]
628    #[serde(skip_serializing_if = "Option::is_none")]
629    pub next_token: Option<String>,
630    /// <p>The semantic version of the application to get.</p>
631    #[serde(rename = "SemanticVersion")]
632    #[serde(skip_serializing_if = "Option::is_none")]
633    pub semantic_version: Option<String>,
634}
635
636#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
637#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
638pub struct ListApplicationDependenciesResponse {
639    /// <p>An array of application summaries nested in the application.</p>
640    #[serde(rename = "Dependencies")]
641    #[serde(skip_serializing_if = "Option::is_none")]
642    pub dependencies: Option<Vec<ApplicationDependencySummary>>,
643    /// <p>The token to request the next page of results.</p>
644    #[serde(rename = "NextToken")]
645    #[serde(skip_serializing_if = "Option::is_none")]
646    pub next_token: Option<String>,
647}
648
649#[derive(Clone, Debug, Default, PartialEq, Serialize)]
650#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
651pub struct ListApplicationVersionsRequest {
652    /// <p>The Amazon Resource Name (ARN) of the application.</p>
653    #[serde(rename = "ApplicationId")]
654    pub application_id: String,
655    /// <p>The total number of items to return.</p>
656    #[serde(rename = "MaxItems")]
657    #[serde(skip_serializing_if = "Option::is_none")]
658    pub max_items: Option<i64>,
659    /// <p>A token to specify where to start paginating.</p>
660    #[serde(rename = "NextToken")]
661    #[serde(skip_serializing_if = "Option::is_none")]
662    pub next_token: Option<String>,
663}
664
665#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
666#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
667pub struct ListApplicationVersionsResponse {
668    /// <p>The token to request the next page of results.</p>
669    #[serde(rename = "NextToken")]
670    #[serde(skip_serializing_if = "Option::is_none")]
671    pub next_token: Option<String>,
672    /// <p>An array of version summaries for the application.</p>
673    #[serde(rename = "Versions")]
674    #[serde(skip_serializing_if = "Option::is_none")]
675    pub versions: Option<Vec<VersionSummary>>,
676}
677
678#[derive(Clone, Debug, Default, PartialEq, Serialize)]
679#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
680pub struct ListApplicationsRequest {
681    /// <p>The total number of items to return.</p>
682    #[serde(rename = "MaxItems")]
683    #[serde(skip_serializing_if = "Option::is_none")]
684    pub max_items: Option<i64>,
685    /// <p>A token to specify where to start paginating.</p>
686    #[serde(rename = "NextToken")]
687    #[serde(skip_serializing_if = "Option::is_none")]
688    pub next_token: Option<String>,
689}
690
691#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
692#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
693pub struct ListApplicationsResponse {
694    /// <p>An array of application summaries.</p>
695    #[serde(rename = "Applications")]
696    #[serde(skip_serializing_if = "Option::is_none")]
697    pub applications: Option<Vec<ApplicationSummary>>,
698    /// <p>The token to request the next page of results.</p>
699    #[serde(rename = "NextToken")]
700    #[serde(skip_serializing_if = "Option::is_none")]
701    pub next_token: Option<String>,
702}
703
704/// <p>Parameters supported by the application.</p>
705#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
706#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
707pub struct ParameterDefinition {
708    /// <p>A regular expression that represents the patterns to allow for String types.</p>
709    #[serde(rename = "AllowedPattern")]
710    #[serde(skip_serializing_if = "Option::is_none")]
711    pub allowed_pattern: Option<String>,
712    /// <p>An array containing the list of values allowed for the parameter.</p>
713    #[serde(rename = "AllowedValues")]
714    #[serde(skip_serializing_if = "Option::is_none")]
715    pub allowed_values: Option<Vec<String>>,
716    /// <p>A string that explains a constraint when the constraint is violated. For example, without a constraint description,
717    /// a parameter that has an allowed pattern of [A-Za-z0-9]+ displays the following error message when the user
718    /// specifies an invalid value:</p><p>
719    /// Malformed input-Parameter MyParameter must match pattern [A-Za-z0-9]+
720    /// </p><p>By adding a constraint description, such as "must contain only uppercase and lowercase letters and numbers," you can display
721    /// the following customized error message:</p><p>
722    /// Malformed input-Parameter MyParameter must contain only uppercase and lowercase letters and numbers.
723    /// </p>
724    #[serde(rename = "ConstraintDescription")]
725    #[serde(skip_serializing_if = "Option::is_none")]
726    pub constraint_description: Option<String>,
727    /// <p>A value of the appropriate type for the template to use if no value is specified when a stack is created.
728    /// If you define constraints for the parameter, you must specify a value that adheres to those constraints.</p>
729    #[serde(rename = "DefaultValue")]
730    #[serde(skip_serializing_if = "Option::is_none")]
731    pub default_value: Option<String>,
732    /// <p>A string of up to 4,000 characters that describes the parameter.</p>
733    #[serde(rename = "Description")]
734    #[serde(skip_serializing_if = "Option::is_none")]
735    pub description: Option<String>,
736    /// <p>An integer value that determines the largest number of characters that you want to allow for String types.</p>
737    #[serde(rename = "MaxLength")]
738    #[serde(skip_serializing_if = "Option::is_none")]
739    pub max_length: Option<i64>,
740    /// <p>A numeric value that determines the largest numeric value that you want to allow for Number types.</p>
741    #[serde(rename = "MaxValue")]
742    #[serde(skip_serializing_if = "Option::is_none")]
743    pub max_value: Option<i64>,
744    /// <p>An integer value that determines the smallest number of characters that you want to allow for String types.</p>
745    #[serde(rename = "MinLength")]
746    #[serde(skip_serializing_if = "Option::is_none")]
747    pub min_length: Option<i64>,
748    /// <p>A numeric value that determines the smallest numeric value that you want to allow for Number types.</p>
749    #[serde(rename = "MinValue")]
750    #[serde(skip_serializing_if = "Option::is_none")]
751    pub min_value: Option<i64>,
752    /// <p>The name of the parameter.</p>
753    #[serde(rename = "Name")]
754    pub name: String,
755    /// <p>Whether to mask the parameter value whenever anyone makes a call that describes the stack. If you set the
756    /// value to true, the parameter value is masked with asterisks (*****).</p>
757    #[serde(rename = "NoEcho")]
758    #[serde(skip_serializing_if = "Option::is_none")]
759    pub no_echo: Option<bool>,
760    /// <p>A list of AWS SAM resources that use this parameter.</p>
761    #[serde(rename = "ReferencedByResources")]
762    pub referenced_by_resources: Vec<String>,
763    /// <p>The type of the parameter.</p><p>Valid values: String | Number | List&lt;Number> | CommaDelimitedList
764    /// </p><p>
765    /// String: A literal string.</p><p>For example, users can specify "MyUserName".</p><p>
766    /// Number: An integer or float. AWS CloudFormation validates the parameter value as a number. However, when you use the
767    /// parameter elsewhere in your template (for example, by using the Ref intrinsic function), the parameter value becomes a string.</p><p>For example, users might specify "8888".</p><p>
768    /// List&lt;Number>: An array of integers or floats that are separated by commas. AWS CloudFormation validates the parameter value as numbers. However, when
769    /// you use the parameter elsewhere in your template (for example, by using the Ref intrinsic function), the parameter value becomes a list of strings.</p><p>For example, users might specify "80,20", and then Ref results in ["80","20"].</p><p>
770    /// CommaDelimitedList: An array of literal strings that are separated by commas. The total number of strings should be one more than the total number of commas.
771    /// Also, each member string is space-trimmed.</p><p>For example, users might specify "test,dev,prod", and then Ref results in ["test","dev","prod"].</p>
772    #[serde(rename = "Type")]
773    #[serde(skip_serializing_if = "Option::is_none")]
774    pub type_: Option<String>,
775}
776
777/// <p>Parameter value of the application.</p>
778#[derive(Clone, Debug, Default, PartialEq, Serialize)]
779#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
780pub struct ParameterValue {
781    /// <p>The key associated with the parameter. If you don't specify a key and value for a particular parameter, AWS CloudFormation
782    /// uses the default value that is specified in your template.</p>
783    #[serde(rename = "Name")]
784    pub name: String,
785    /// <p>The input value associated with the parameter.</p>
786    #[serde(rename = "Value")]
787    pub value: String,
788}
789
790#[derive(Clone, Debug, Default, PartialEq, Serialize)]
791#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
792pub struct PutApplicationPolicyRequest {
793    /// <p>The Amazon Resource Name (ARN) of the application.</p>
794    #[serde(rename = "ApplicationId")]
795    pub application_id: String,
796    /// <p>An array of policy statements applied to the application.</p>
797    #[serde(rename = "Statements")]
798    pub statements: Vec<ApplicationPolicyStatement>,
799}
800
801#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
802#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
803pub struct PutApplicationPolicyResponse {
804    /// <p>An array of policy statements applied to the application.</p>
805    #[serde(rename = "Statements")]
806    #[serde(skip_serializing_if = "Option::is_none")]
807    pub statements: Option<Vec<ApplicationPolicyStatement>>,
808}
809
810/// <p>This property corresponds to the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RollbackConfiguration">RollbackConfiguration</a>
811/// </i> Data Type.</p>
812#[derive(Clone, Debug, Default, PartialEq, Serialize)]
813#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
814pub struct RollbackConfiguration {
815    /// <p>This property corresponds to the content of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RollbackConfiguration">RollbackConfiguration</a>
816    /// </i> Data Type.</p>
817    #[serde(rename = "MonitoringTimeInMinutes")]
818    #[serde(skip_serializing_if = "Option::is_none")]
819    pub monitoring_time_in_minutes: Option<i64>,
820    /// <p>This property corresponds to the content of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RollbackConfiguration">RollbackConfiguration</a>
821    /// </i> Data Type.</p>
822    #[serde(rename = "RollbackTriggers")]
823    #[serde(skip_serializing_if = "Option::is_none")]
824    pub rollback_triggers: Option<Vec<RollbackTrigger>>,
825}
826
827/// <p>This property corresponds to the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RollbackTrigger">RollbackTrigger</a>
828/// </i> Data Type.</p>
829#[derive(Clone, Debug, Default, PartialEq, Serialize)]
830#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
831pub struct RollbackTrigger {
832    /// <p>This property corresponds to the content of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RollbackTrigger">RollbackTrigger</a>
833    /// </i> Data Type.</p>
834    #[serde(rename = "Arn")]
835    pub arn: String,
836    /// <p>This property corresponds to the content of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RollbackTrigger">RollbackTrigger</a>
837    /// </i> Data Type.</p>
838    #[serde(rename = "Type")]
839    pub type_: String,
840}
841
842/// <p>This property corresponds to the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/Tag">Tag</a>
843/// </i> Data Type.</p>
844#[derive(Clone, Debug, Default, PartialEq, Serialize)]
845#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
846pub struct Tag {
847    /// <p>This property corresponds to the content of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/Tag">Tag</a>
848    /// </i> Data Type.</p>
849    #[serde(rename = "Key")]
850    pub key: String,
851    /// <p>This property corresponds to the content of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/Tag">
852    /// Tag</a>
853    /// </i>
854    /// Data Type.</p>
855    #[serde(rename = "Value")]
856    pub value: String,
857}
858
859#[derive(Clone, Debug, Default, PartialEq, Serialize)]
860#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
861pub struct UnshareApplicationRequest {
862    /// <p>The Amazon Resource Name (ARN) of the application.</p>
863    #[serde(rename = "ApplicationId")]
864    pub application_id: String,
865    /// <p>The AWS Organization ID to unshare the application from.</p>
866    #[serde(rename = "OrganizationId")]
867    pub organization_id: String,
868}
869
870#[derive(Clone, Debug, Default, PartialEq, Serialize)]
871#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
872pub struct UpdateApplicationRequest {
873    /// <p>The Amazon Resource Name (ARN) of the application.</p>
874    #[serde(rename = "ApplicationId")]
875    pub application_id: String,
876    /// <p>The name of the author publishing the app.</p><p>Minimum length=1. Maximum length=127.</p><p>Pattern "^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$";</p>
877    #[serde(rename = "Author")]
878    #[serde(skip_serializing_if = "Option::is_none")]
879    pub author: Option<String>,
880    /// <p>The description of the application.</p><p>Minimum length=1. Maximum length=256</p>
881    #[serde(rename = "Description")]
882    #[serde(skip_serializing_if = "Option::is_none")]
883    pub description: Option<String>,
884    /// <p>A URL with more information about the application, for example the location of your GitHub repository for the application.</p>
885    #[serde(rename = "HomePageUrl")]
886    #[serde(skip_serializing_if = "Option::is_none")]
887    pub home_page_url: Option<String>,
888    /// <p>Labels to improve discovery of apps in search results.</p><p>Minimum length=1. Maximum length=127. Maximum number of labels: 10</p><p>Pattern: "^[a-zA-Z0-9+\\-_:\\/@]+$";</p>
889    #[serde(rename = "Labels")]
890    #[serde(skip_serializing_if = "Option::is_none")]
891    pub labels: Option<Vec<String>>,
892    /// <p>A text readme file in Markdown language that contains a more detailed description of the application and how it works.</p><p>Maximum size 5 MB</p>
893    #[serde(rename = "ReadmeBody")]
894    #[serde(skip_serializing_if = "Option::is_none")]
895    pub readme_body: Option<String>,
896    /// <p>A link to the readme file in Markdown language that contains a more detailed description of the application and how it works.</p><p>Maximum size 5 MB</p>
897    #[serde(rename = "ReadmeUrl")]
898    #[serde(skip_serializing_if = "Option::is_none")]
899    pub readme_url: Option<String>,
900}
901
902#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
903#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
904pub struct UpdateApplicationResponse {
905    /// <p>The application Amazon Resource Name (ARN).</p>
906    #[serde(rename = "ApplicationId")]
907    #[serde(skip_serializing_if = "Option::is_none")]
908    pub application_id: Option<String>,
909    /// <p>The name of the author publishing the app.</p><p>Minimum length=1. Maximum length=127.</p><p>Pattern "^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$";</p>
910    #[serde(rename = "Author")]
911    #[serde(skip_serializing_if = "Option::is_none")]
912    pub author: Option<String>,
913    /// <p>The date and time this resource was created.</p>
914    #[serde(rename = "CreationTime")]
915    #[serde(skip_serializing_if = "Option::is_none")]
916    pub creation_time: Option<String>,
917    /// <p>The description of the application.</p><p>Minimum length=1. Maximum length=256</p>
918    #[serde(rename = "Description")]
919    #[serde(skip_serializing_if = "Option::is_none")]
920    pub description: Option<String>,
921    /// <p>A URL with more information about the application, for example the location of your GitHub repository for the application.</p>
922    #[serde(rename = "HomePageUrl")]
923    #[serde(skip_serializing_if = "Option::is_none")]
924    pub home_page_url: Option<String>,
925    /// <p>Whether the author of this application has been verified. This means means that AWS has made a good faith review, as a reasonable and prudent service provider, of the information provided by the requester and has confirmed that the requester's identity is as claimed.</p>
926    #[serde(rename = "IsVerifiedAuthor")]
927    #[serde(skip_serializing_if = "Option::is_none")]
928    pub is_verified_author: Option<bool>,
929    /// <p>Labels to improve discovery of apps in search results.</p><p>Minimum length=1. Maximum length=127. Maximum number of labels: 10</p><p>Pattern: "^[a-zA-Z0-9+\\-_:\\/@]+$";</p>
930    #[serde(rename = "Labels")]
931    #[serde(skip_serializing_if = "Option::is_none")]
932    pub labels: Option<Vec<String>>,
933    /// <p>A link to a license file of the app that matches the spdxLicenseID value of your application.</p><p>Maximum size 5 MB</p>
934    #[serde(rename = "LicenseUrl")]
935    #[serde(skip_serializing_if = "Option::is_none")]
936    pub license_url: Option<String>,
937    /// <p>The name of the application.</p><p>Minimum length=1. Maximum length=140</p><p>Pattern: "[a-zA-Z0-9\\-]+";</p>
938    #[serde(rename = "Name")]
939    #[serde(skip_serializing_if = "Option::is_none")]
940    pub name: Option<String>,
941    /// <p>A link to the readme file in Markdown language that contains a more detailed description of the application and how it works.</p><p>Maximum size 5 MB</p>
942    #[serde(rename = "ReadmeUrl")]
943    #[serde(skip_serializing_if = "Option::is_none")]
944    pub readme_url: Option<String>,
945    /// <p>A valid identifier from https://spdx.org/licenses/.</p>
946    #[serde(rename = "SpdxLicenseId")]
947    #[serde(skip_serializing_if = "Option::is_none")]
948    pub spdx_license_id: Option<String>,
949    /// <p>The URL to the public profile of a verified author. This URL is submitted by the author.</p>
950    #[serde(rename = "VerifiedAuthorUrl")]
951    #[serde(skip_serializing_if = "Option::is_none")]
952    pub verified_author_url: Option<String>,
953    /// <p>Version information about the application.</p>
954    #[serde(rename = "Version")]
955    #[serde(skip_serializing_if = "Option::is_none")]
956    pub version: Option<Version>,
957}
958
959/// <p>Application version details.</p>
960#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
961#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
962pub struct Version {
963    /// <p>The application Amazon Resource Name (ARN).</p>
964    #[serde(rename = "ApplicationId")]
965    pub application_id: String,
966    /// <p>The date and time this resource was created.</p>
967    #[serde(rename = "CreationTime")]
968    pub creation_time: String,
969    /// <p>An array of parameter types supported by the application.</p>
970    #[serde(rename = "ParameterDefinitions")]
971    pub parameter_definitions: Vec<ParameterDefinition>,
972    /// <p>A list of values that you must specify before you can deploy certain applications.
973    /// Some applications might include resources that can affect permissions in your AWS
974    /// account, for example, by creating new AWS Identity and Access Management (IAM) users.
975    /// For those applications, you must explicitly acknowledge their capabilities by
976    /// specifying this parameter.</p><p>The only valid values are CAPABILITY_IAM, CAPABILITY_NAMED_IAM,
977    /// CAPABILITY_RESOURCE_POLICY, and CAPABILITY_AUTO_EXPAND.</p><p>The following resources require you to specify CAPABILITY_IAM or
978    /// CAPABILITY_NAMED_IAM:
979    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html">AWS::IAM::Group</a>,
980    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html">AWS::IAM::InstanceProfile</a>,
981    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html">AWS::IAM::Policy</a>, and
982    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html">AWS::IAM::Role</a>.
983    /// If the application contains IAM resources, you can specify either CAPABILITY_IAM
984    /// or CAPABILITY_NAMED_IAM. If the application contains IAM resources
985    /// with custom names, you must specify CAPABILITY_NAMED_IAM.</p><p>The following resources require you to specify CAPABILITY_RESOURCE_POLICY:
986    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html">AWS::Lambda::Permission</a>,
987    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html">AWS::IAM:Policy</a>,
988    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationautoscaling-scalingpolicy.html">AWS::ApplicationAutoScaling::ScalingPolicy</a>,
989    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-policy.html">AWS::S3::BucketPolicy</a>,
990    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-policy.html">AWS::SQS::QueuePolicy</a>, and
991    /// <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-policy.html">AWS::SNS::TopicPolicy</a>.</p><p>Applications that contain one or more nested applications require you to specify
992    /// CAPABILITY_AUTO_EXPAND.</p><p>If your application template contains any of the above resources, we recommend that you review
993    /// all permissions associated with the application before deploying. If you don't specify
994    /// this parameter for an application that requires capabilities, the call will fail.</p>
995    #[serde(rename = "RequiredCapabilities")]
996    pub required_capabilities: Vec<String>,
997    /// <p>Whether all of the AWS resources contained in this application are supported in the region
998    /// in which it is being retrieved.</p>
999    #[serde(rename = "ResourcesSupported")]
1000    pub resources_supported: bool,
1001    /// <p>The semantic version of the application:</p><p>
1002    /// <a href="https://semver.org/">https://semver.org/</a>
1003    /// </p>
1004    #[serde(rename = "SemanticVersion")]
1005    pub semantic_version: String,
1006    /// <p>A link to the S3 object that contains the ZIP archive of the source code for this version of your application.</p><p>Maximum size 50 MB</p>
1007    #[serde(rename = "SourceCodeArchiveUrl")]
1008    #[serde(skip_serializing_if = "Option::is_none")]
1009    pub source_code_archive_url: Option<String>,
1010    /// <p>A link to a public repository for the source code of your application, for example the URL of a specific GitHub commit.</p>
1011    #[serde(rename = "SourceCodeUrl")]
1012    #[serde(skip_serializing_if = "Option::is_none")]
1013    pub source_code_url: Option<String>,
1014    /// <p>A link to the packaged AWS SAM template of your application.</p>
1015    #[serde(rename = "TemplateUrl")]
1016    pub template_url: String,
1017}
1018
1019/// <p>An application version summary.</p>
1020#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1021#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1022pub struct VersionSummary {
1023    /// <p>The application Amazon Resource Name (ARN).</p>
1024    #[serde(rename = "ApplicationId")]
1025    pub application_id: String,
1026    /// <p>The date and time this resource was created.</p>
1027    #[serde(rename = "CreationTime")]
1028    pub creation_time: String,
1029    /// <p>The semantic version of the application:</p><p>
1030    /// <a href="https://semver.org/">https://semver.org/</a>
1031    /// </p>
1032    #[serde(rename = "SemanticVersion")]
1033    pub semantic_version: String,
1034    /// <p>A link to a public repository for the source code of your application, for example the URL of a specific GitHub commit.</p>
1035    #[serde(rename = "SourceCodeUrl")]
1036    #[serde(skip_serializing_if = "Option::is_none")]
1037    pub source_code_url: Option<String>,
1038}
1039
1040/// Errors returned by CreateApplication
1041#[derive(Debug, PartialEq)]
1042pub enum CreateApplicationError {
1043    /// <p>One of the parameters in the request is invalid.</p>
1044    BadRequest(String),
1045    /// <p>The resource already exists.</p>
1046    Conflict(String),
1047    /// <p>The client is not authenticated.</p>
1048    Forbidden(String),
1049    /// <p>The AWS Serverless Application Repository service encountered an internal error.</p>
1050    InternalServerError(String),
1051    /// <p>The client is sending more than the allowed number of requests per unit of time.</p>
1052    TooManyRequests(String),
1053}
1054
1055impl CreateApplicationError {
1056    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateApplicationError> {
1057        if let Some(err) = proto::json::Error::parse_rest(&res) {
1058            match err.typ.as_str() {
1059                "BadRequestException" => {
1060                    return RusotoError::Service(CreateApplicationError::BadRequest(err.msg))
1061                }
1062                "ConflictException" => {
1063                    return RusotoError::Service(CreateApplicationError::Conflict(err.msg))
1064                }
1065                "ForbiddenException" => {
1066                    return RusotoError::Service(CreateApplicationError::Forbidden(err.msg))
1067                }
1068                "InternalServerErrorException" => {
1069                    return RusotoError::Service(CreateApplicationError::InternalServerError(
1070                        err.msg,
1071                    ))
1072                }
1073                "TooManyRequestsException" => {
1074                    return RusotoError::Service(CreateApplicationError::TooManyRequests(err.msg))
1075                }
1076                "ValidationException" => return RusotoError::Validation(err.msg),
1077                _ => {}
1078            }
1079        }
1080        RusotoError::Unknown(res)
1081    }
1082}
1083impl fmt::Display for CreateApplicationError {
1084    #[allow(unused_variables)]
1085    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1086        match *self {
1087            CreateApplicationError::BadRequest(ref cause) => write!(f, "{}", cause),
1088            CreateApplicationError::Conflict(ref cause) => write!(f, "{}", cause),
1089            CreateApplicationError::Forbidden(ref cause) => write!(f, "{}", cause),
1090            CreateApplicationError::InternalServerError(ref cause) => write!(f, "{}", cause),
1091            CreateApplicationError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1092        }
1093    }
1094}
1095impl Error for CreateApplicationError {}
1096/// Errors returned by CreateApplicationVersion
1097#[derive(Debug, PartialEq)]
1098pub enum CreateApplicationVersionError {
1099    /// <p>One of the parameters in the request is invalid.</p>
1100    BadRequest(String),
1101    /// <p>The resource already exists.</p>
1102    Conflict(String),
1103    /// <p>The client is not authenticated.</p>
1104    Forbidden(String),
1105    /// <p>The AWS Serverless Application Repository service encountered an internal error.</p>
1106    InternalServerError(String),
1107    /// <p>The client is sending more than the allowed number of requests per unit of time.</p>
1108    TooManyRequests(String),
1109}
1110
1111impl CreateApplicationVersionError {
1112    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateApplicationVersionError> {
1113        if let Some(err) = proto::json::Error::parse_rest(&res) {
1114            match err.typ.as_str() {
1115                "BadRequestException" => {
1116                    return RusotoError::Service(CreateApplicationVersionError::BadRequest(err.msg))
1117                }
1118                "ConflictException" => {
1119                    return RusotoError::Service(CreateApplicationVersionError::Conflict(err.msg))
1120                }
1121                "ForbiddenException" => {
1122                    return RusotoError::Service(CreateApplicationVersionError::Forbidden(err.msg))
1123                }
1124                "InternalServerErrorException" => {
1125                    return RusotoError::Service(
1126                        CreateApplicationVersionError::InternalServerError(err.msg),
1127                    )
1128                }
1129                "TooManyRequestsException" => {
1130                    return RusotoError::Service(CreateApplicationVersionError::TooManyRequests(
1131                        err.msg,
1132                    ))
1133                }
1134                "ValidationException" => return RusotoError::Validation(err.msg),
1135                _ => {}
1136            }
1137        }
1138        RusotoError::Unknown(res)
1139    }
1140}
1141impl fmt::Display for CreateApplicationVersionError {
1142    #[allow(unused_variables)]
1143    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1144        match *self {
1145            CreateApplicationVersionError::BadRequest(ref cause) => write!(f, "{}", cause),
1146            CreateApplicationVersionError::Conflict(ref cause) => write!(f, "{}", cause),
1147            CreateApplicationVersionError::Forbidden(ref cause) => write!(f, "{}", cause),
1148            CreateApplicationVersionError::InternalServerError(ref cause) => write!(f, "{}", cause),
1149            CreateApplicationVersionError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1150        }
1151    }
1152}
1153impl Error for CreateApplicationVersionError {}
1154/// Errors returned by CreateCloudFormationChangeSet
1155#[derive(Debug, PartialEq)]
1156pub enum CreateCloudFormationChangeSetError {
1157    /// <p>One of the parameters in the request is invalid.</p>
1158    BadRequest(String),
1159    /// <p>The client is not authenticated.</p>
1160    Forbidden(String),
1161    /// <p>The AWS Serverless Application Repository service encountered an internal error.</p>
1162    InternalServerError(String),
1163    /// <p>The client is sending more than the allowed number of requests per unit of time.</p>
1164    TooManyRequests(String),
1165}
1166
1167impl CreateCloudFormationChangeSetError {
1168    pub fn from_response(
1169        res: BufferedHttpResponse,
1170    ) -> RusotoError<CreateCloudFormationChangeSetError> {
1171        if let Some(err) = proto::json::Error::parse_rest(&res) {
1172            match err.typ.as_str() {
1173                "BadRequestException" => {
1174                    return RusotoError::Service(CreateCloudFormationChangeSetError::BadRequest(
1175                        err.msg,
1176                    ))
1177                }
1178                "ForbiddenException" => {
1179                    return RusotoError::Service(CreateCloudFormationChangeSetError::Forbidden(
1180                        err.msg,
1181                    ))
1182                }
1183                "InternalServerErrorException" => {
1184                    return RusotoError::Service(
1185                        CreateCloudFormationChangeSetError::InternalServerError(err.msg),
1186                    )
1187                }
1188                "TooManyRequestsException" => {
1189                    return RusotoError::Service(
1190                        CreateCloudFormationChangeSetError::TooManyRequests(err.msg),
1191                    )
1192                }
1193                "ValidationException" => return RusotoError::Validation(err.msg),
1194                _ => {}
1195            }
1196        }
1197        RusotoError::Unknown(res)
1198    }
1199}
1200impl fmt::Display for CreateCloudFormationChangeSetError {
1201    #[allow(unused_variables)]
1202    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1203        match *self {
1204            CreateCloudFormationChangeSetError::BadRequest(ref cause) => write!(f, "{}", cause),
1205            CreateCloudFormationChangeSetError::Forbidden(ref cause) => write!(f, "{}", cause),
1206            CreateCloudFormationChangeSetError::InternalServerError(ref cause) => {
1207                write!(f, "{}", cause)
1208            }
1209            CreateCloudFormationChangeSetError::TooManyRequests(ref cause) => {
1210                write!(f, "{}", cause)
1211            }
1212        }
1213    }
1214}
1215impl Error for CreateCloudFormationChangeSetError {}
1216/// Errors returned by CreateCloudFormationTemplate
1217#[derive(Debug, PartialEq)]
1218pub enum CreateCloudFormationTemplateError {
1219    /// <p>One of the parameters in the request is invalid.</p>
1220    BadRequest(String),
1221    /// <p>The client is not authenticated.</p>
1222    Forbidden(String),
1223    /// <p>The AWS Serverless Application Repository service encountered an internal error.</p>
1224    InternalServerError(String),
1225    /// <p>The resource (for example, an access policy statement) specified in the request doesn't exist.</p>
1226    NotFound(String),
1227    /// <p>The client is sending more than the allowed number of requests per unit of time.</p>
1228    TooManyRequests(String),
1229}
1230
1231impl CreateCloudFormationTemplateError {
1232    pub fn from_response(
1233        res: BufferedHttpResponse,
1234    ) -> RusotoError<CreateCloudFormationTemplateError> {
1235        if let Some(err) = proto::json::Error::parse_rest(&res) {
1236            match err.typ.as_str() {
1237                "BadRequestException" => {
1238                    return RusotoError::Service(CreateCloudFormationTemplateError::BadRequest(
1239                        err.msg,
1240                    ))
1241                }
1242                "ForbiddenException" => {
1243                    return RusotoError::Service(CreateCloudFormationTemplateError::Forbidden(
1244                        err.msg,
1245                    ))
1246                }
1247                "InternalServerErrorException" => {
1248                    return RusotoError::Service(
1249                        CreateCloudFormationTemplateError::InternalServerError(err.msg),
1250                    )
1251                }
1252                "NotFoundException" => {
1253                    return RusotoError::Service(CreateCloudFormationTemplateError::NotFound(
1254                        err.msg,
1255                    ))
1256                }
1257                "TooManyRequestsException" => {
1258                    return RusotoError::Service(
1259                        CreateCloudFormationTemplateError::TooManyRequests(err.msg),
1260                    )
1261                }
1262                "ValidationException" => return RusotoError::Validation(err.msg),
1263                _ => {}
1264            }
1265        }
1266        RusotoError::Unknown(res)
1267    }
1268}
1269impl fmt::Display for CreateCloudFormationTemplateError {
1270    #[allow(unused_variables)]
1271    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1272        match *self {
1273            CreateCloudFormationTemplateError::BadRequest(ref cause) => write!(f, "{}", cause),
1274            CreateCloudFormationTemplateError::Forbidden(ref cause) => write!(f, "{}", cause),
1275            CreateCloudFormationTemplateError::InternalServerError(ref cause) => {
1276                write!(f, "{}", cause)
1277            }
1278            CreateCloudFormationTemplateError::NotFound(ref cause) => write!(f, "{}", cause),
1279            CreateCloudFormationTemplateError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1280        }
1281    }
1282}
1283impl Error for CreateCloudFormationTemplateError {}
1284/// Errors returned by DeleteApplication
1285#[derive(Debug, PartialEq)]
1286pub enum DeleteApplicationError {
1287    /// <p>One of the parameters in the request is invalid.</p>
1288    BadRequest(String),
1289    /// <p>The resource already exists.</p>
1290    Conflict(String),
1291    /// <p>The client is not authenticated.</p>
1292    Forbidden(String),
1293    /// <p>The AWS Serverless Application Repository service encountered an internal error.</p>
1294    InternalServerError(String),
1295    /// <p>The resource (for example, an access policy statement) specified in the request doesn't exist.</p>
1296    NotFound(String),
1297    /// <p>The client is sending more than the allowed number of requests per unit of time.</p>
1298    TooManyRequests(String),
1299}
1300
1301impl DeleteApplicationError {
1302    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteApplicationError> {
1303        if let Some(err) = proto::json::Error::parse_rest(&res) {
1304            match err.typ.as_str() {
1305                "BadRequestException" => {
1306                    return RusotoError::Service(DeleteApplicationError::BadRequest(err.msg))
1307                }
1308                "ConflictException" => {
1309                    return RusotoError::Service(DeleteApplicationError::Conflict(err.msg))
1310                }
1311                "ForbiddenException" => {
1312                    return RusotoError::Service(DeleteApplicationError::Forbidden(err.msg))
1313                }
1314                "InternalServerErrorException" => {
1315                    return RusotoError::Service(DeleteApplicationError::InternalServerError(
1316                        err.msg,
1317                    ))
1318                }
1319                "NotFoundException" => {
1320                    return RusotoError::Service(DeleteApplicationError::NotFound(err.msg))
1321                }
1322                "TooManyRequestsException" => {
1323                    return RusotoError::Service(DeleteApplicationError::TooManyRequests(err.msg))
1324                }
1325                "ValidationException" => return RusotoError::Validation(err.msg),
1326                _ => {}
1327            }
1328        }
1329        RusotoError::Unknown(res)
1330    }
1331}
1332impl fmt::Display for DeleteApplicationError {
1333    #[allow(unused_variables)]
1334    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1335        match *self {
1336            DeleteApplicationError::BadRequest(ref cause) => write!(f, "{}", cause),
1337            DeleteApplicationError::Conflict(ref cause) => write!(f, "{}", cause),
1338            DeleteApplicationError::Forbidden(ref cause) => write!(f, "{}", cause),
1339            DeleteApplicationError::InternalServerError(ref cause) => write!(f, "{}", cause),
1340            DeleteApplicationError::NotFound(ref cause) => write!(f, "{}", cause),
1341            DeleteApplicationError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1342        }
1343    }
1344}
1345impl Error for DeleteApplicationError {}
1346/// Errors returned by GetApplication
1347#[derive(Debug, PartialEq)]
1348pub enum GetApplicationError {
1349    /// <p>One of the parameters in the request is invalid.</p>
1350    BadRequest(String),
1351    /// <p>The client is not authenticated.</p>
1352    Forbidden(String),
1353    /// <p>The AWS Serverless Application Repository service encountered an internal error.</p>
1354    InternalServerError(String),
1355    /// <p>The resource (for example, an access policy statement) specified in the request doesn't exist.</p>
1356    NotFound(String),
1357    /// <p>The client is sending more than the allowed number of requests per unit of time.</p>
1358    TooManyRequests(String),
1359}
1360
1361impl GetApplicationError {
1362    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetApplicationError> {
1363        if let Some(err) = proto::json::Error::parse_rest(&res) {
1364            match err.typ.as_str() {
1365                "BadRequestException" => {
1366                    return RusotoError::Service(GetApplicationError::BadRequest(err.msg))
1367                }
1368                "ForbiddenException" => {
1369                    return RusotoError::Service(GetApplicationError::Forbidden(err.msg))
1370                }
1371                "InternalServerErrorException" => {
1372                    return RusotoError::Service(GetApplicationError::InternalServerError(err.msg))
1373                }
1374                "NotFoundException" => {
1375                    return RusotoError::Service(GetApplicationError::NotFound(err.msg))
1376                }
1377                "TooManyRequestsException" => {
1378                    return RusotoError::Service(GetApplicationError::TooManyRequests(err.msg))
1379                }
1380                "ValidationException" => return RusotoError::Validation(err.msg),
1381                _ => {}
1382            }
1383        }
1384        RusotoError::Unknown(res)
1385    }
1386}
1387impl fmt::Display for GetApplicationError {
1388    #[allow(unused_variables)]
1389    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1390        match *self {
1391            GetApplicationError::BadRequest(ref cause) => write!(f, "{}", cause),
1392            GetApplicationError::Forbidden(ref cause) => write!(f, "{}", cause),
1393            GetApplicationError::InternalServerError(ref cause) => write!(f, "{}", cause),
1394            GetApplicationError::NotFound(ref cause) => write!(f, "{}", cause),
1395            GetApplicationError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1396        }
1397    }
1398}
1399impl Error for GetApplicationError {}
1400/// Errors returned by GetApplicationPolicy
1401#[derive(Debug, PartialEq)]
1402pub enum GetApplicationPolicyError {
1403    /// <p>One of the parameters in the request is invalid.</p>
1404    BadRequest(String),
1405    /// <p>The client is not authenticated.</p>
1406    Forbidden(String),
1407    /// <p>The AWS Serverless Application Repository service encountered an internal error.</p>
1408    InternalServerError(String),
1409    /// <p>The resource (for example, an access policy statement) specified in the request doesn't exist.</p>
1410    NotFound(String),
1411    /// <p>The client is sending more than the allowed number of requests per unit of time.</p>
1412    TooManyRequests(String),
1413}
1414
1415impl GetApplicationPolicyError {
1416    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetApplicationPolicyError> {
1417        if let Some(err) = proto::json::Error::parse_rest(&res) {
1418            match err.typ.as_str() {
1419                "BadRequestException" => {
1420                    return RusotoError::Service(GetApplicationPolicyError::BadRequest(err.msg))
1421                }
1422                "ForbiddenException" => {
1423                    return RusotoError::Service(GetApplicationPolicyError::Forbidden(err.msg))
1424                }
1425                "InternalServerErrorException" => {
1426                    return RusotoError::Service(GetApplicationPolicyError::InternalServerError(
1427                        err.msg,
1428                    ))
1429                }
1430                "NotFoundException" => {
1431                    return RusotoError::Service(GetApplicationPolicyError::NotFound(err.msg))
1432                }
1433                "TooManyRequestsException" => {
1434                    return RusotoError::Service(GetApplicationPolicyError::TooManyRequests(
1435                        err.msg,
1436                    ))
1437                }
1438                "ValidationException" => return RusotoError::Validation(err.msg),
1439                _ => {}
1440            }
1441        }
1442        RusotoError::Unknown(res)
1443    }
1444}
1445impl fmt::Display for GetApplicationPolicyError {
1446    #[allow(unused_variables)]
1447    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1448        match *self {
1449            GetApplicationPolicyError::BadRequest(ref cause) => write!(f, "{}", cause),
1450            GetApplicationPolicyError::Forbidden(ref cause) => write!(f, "{}", cause),
1451            GetApplicationPolicyError::InternalServerError(ref cause) => write!(f, "{}", cause),
1452            GetApplicationPolicyError::NotFound(ref cause) => write!(f, "{}", cause),
1453            GetApplicationPolicyError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1454        }
1455    }
1456}
1457impl Error for GetApplicationPolicyError {}
1458/// Errors returned by GetCloudFormationTemplate
1459#[derive(Debug, PartialEq)]
1460pub enum GetCloudFormationTemplateError {
1461    /// <p>One of the parameters in the request is invalid.</p>
1462    BadRequest(String),
1463    /// <p>The client is not authenticated.</p>
1464    Forbidden(String),
1465    /// <p>The AWS Serverless Application Repository service encountered an internal error.</p>
1466    InternalServerError(String),
1467    /// <p>The resource (for example, an access policy statement) specified in the request doesn't exist.</p>
1468    NotFound(String),
1469    /// <p>The client is sending more than the allowed number of requests per unit of time.</p>
1470    TooManyRequests(String),
1471}
1472
1473impl GetCloudFormationTemplateError {
1474    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetCloudFormationTemplateError> {
1475        if let Some(err) = proto::json::Error::parse_rest(&res) {
1476            match err.typ.as_str() {
1477                "BadRequestException" => {
1478                    return RusotoError::Service(GetCloudFormationTemplateError::BadRequest(
1479                        err.msg,
1480                    ))
1481                }
1482                "ForbiddenException" => {
1483                    return RusotoError::Service(GetCloudFormationTemplateError::Forbidden(err.msg))
1484                }
1485                "InternalServerErrorException" => {
1486                    return RusotoError::Service(
1487                        GetCloudFormationTemplateError::InternalServerError(err.msg),
1488                    )
1489                }
1490                "NotFoundException" => {
1491                    return RusotoError::Service(GetCloudFormationTemplateError::NotFound(err.msg))
1492                }
1493                "TooManyRequestsException" => {
1494                    return RusotoError::Service(GetCloudFormationTemplateError::TooManyRequests(
1495                        err.msg,
1496                    ))
1497                }
1498                "ValidationException" => return RusotoError::Validation(err.msg),
1499                _ => {}
1500            }
1501        }
1502        RusotoError::Unknown(res)
1503    }
1504}
1505impl fmt::Display for GetCloudFormationTemplateError {
1506    #[allow(unused_variables)]
1507    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1508        match *self {
1509            GetCloudFormationTemplateError::BadRequest(ref cause) => write!(f, "{}", cause),
1510            GetCloudFormationTemplateError::Forbidden(ref cause) => write!(f, "{}", cause),
1511            GetCloudFormationTemplateError::InternalServerError(ref cause) => {
1512                write!(f, "{}", cause)
1513            }
1514            GetCloudFormationTemplateError::NotFound(ref cause) => write!(f, "{}", cause),
1515            GetCloudFormationTemplateError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1516        }
1517    }
1518}
1519impl Error for GetCloudFormationTemplateError {}
1520/// Errors returned by ListApplicationDependencies
1521#[derive(Debug, PartialEq)]
1522pub enum ListApplicationDependenciesError {
1523    /// <p>One of the parameters in the request is invalid.</p>
1524    BadRequest(String),
1525    /// <p>The client is not authenticated.</p>
1526    Forbidden(String),
1527    /// <p>The AWS Serverless Application Repository service encountered an internal error.</p>
1528    InternalServerError(String),
1529    /// <p>The resource (for example, an access policy statement) specified in the request doesn't exist.</p>
1530    NotFound(String),
1531    /// <p>The client is sending more than the allowed number of requests per unit of time.</p>
1532    TooManyRequests(String),
1533}
1534
1535impl ListApplicationDependenciesError {
1536    pub fn from_response(
1537        res: BufferedHttpResponse,
1538    ) -> RusotoError<ListApplicationDependenciesError> {
1539        if let Some(err) = proto::json::Error::parse_rest(&res) {
1540            match err.typ.as_str() {
1541                "BadRequestException" => {
1542                    return RusotoError::Service(ListApplicationDependenciesError::BadRequest(
1543                        err.msg,
1544                    ))
1545                }
1546                "ForbiddenException" => {
1547                    return RusotoError::Service(ListApplicationDependenciesError::Forbidden(
1548                        err.msg,
1549                    ))
1550                }
1551                "InternalServerErrorException" => {
1552                    return RusotoError::Service(
1553                        ListApplicationDependenciesError::InternalServerError(err.msg),
1554                    )
1555                }
1556                "NotFoundException" => {
1557                    return RusotoError::Service(ListApplicationDependenciesError::NotFound(
1558                        err.msg,
1559                    ))
1560                }
1561                "TooManyRequestsException" => {
1562                    return RusotoError::Service(ListApplicationDependenciesError::TooManyRequests(
1563                        err.msg,
1564                    ))
1565                }
1566                "ValidationException" => return RusotoError::Validation(err.msg),
1567                _ => {}
1568            }
1569        }
1570        RusotoError::Unknown(res)
1571    }
1572}
1573impl fmt::Display for ListApplicationDependenciesError {
1574    #[allow(unused_variables)]
1575    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1576        match *self {
1577            ListApplicationDependenciesError::BadRequest(ref cause) => write!(f, "{}", cause),
1578            ListApplicationDependenciesError::Forbidden(ref cause) => write!(f, "{}", cause),
1579            ListApplicationDependenciesError::InternalServerError(ref cause) => {
1580                write!(f, "{}", cause)
1581            }
1582            ListApplicationDependenciesError::NotFound(ref cause) => write!(f, "{}", cause),
1583            ListApplicationDependenciesError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1584        }
1585    }
1586}
1587impl Error for ListApplicationDependenciesError {}
1588/// Errors returned by ListApplicationVersions
1589#[derive(Debug, PartialEq)]
1590pub enum ListApplicationVersionsError {
1591    /// <p>One of the parameters in the request is invalid.</p>
1592    BadRequest(String),
1593    /// <p>The client is not authenticated.</p>
1594    Forbidden(String),
1595    /// <p>The AWS Serverless Application Repository service encountered an internal error.</p>
1596    InternalServerError(String),
1597    /// <p>The resource (for example, an access policy statement) specified in the request doesn't exist.</p>
1598    NotFound(String),
1599    /// <p>The client is sending more than the allowed number of requests per unit of time.</p>
1600    TooManyRequests(String),
1601}
1602
1603impl ListApplicationVersionsError {
1604    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListApplicationVersionsError> {
1605        if let Some(err) = proto::json::Error::parse_rest(&res) {
1606            match err.typ.as_str() {
1607                "BadRequestException" => {
1608                    return RusotoError::Service(ListApplicationVersionsError::BadRequest(err.msg))
1609                }
1610                "ForbiddenException" => {
1611                    return RusotoError::Service(ListApplicationVersionsError::Forbidden(err.msg))
1612                }
1613                "InternalServerErrorException" => {
1614                    return RusotoError::Service(ListApplicationVersionsError::InternalServerError(
1615                        err.msg,
1616                    ))
1617                }
1618                "NotFoundException" => {
1619                    return RusotoError::Service(ListApplicationVersionsError::NotFound(err.msg))
1620                }
1621                "TooManyRequestsException" => {
1622                    return RusotoError::Service(ListApplicationVersionsError::TooManyRequests(
1623                        err.msg,
1624                    ))
1625                }
1626                "ValidationException" => return RusotoError::Validation(err.msg),
1627                _ => {}
1628            }
1629        }
1630        RusotoError::Unknown(res)
1631    }
1632}
1633impl fmt::Display for ListApplicationVersionsError {
1634    #[allow(unused_variables)]
1635    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1636        match *self {
1637            ListApplicationVersionsError::BadRequest(ref cause) => write!(f, "{}", cause),
1638            ListApplicationVersionsError::Forbidden(ref cause) => write!(f, "{}", cause),
1639            ListApplicationVersionsError::InternalServerError(ref cause) => write!(f, "{}", cause),
1640            ListApplicationVersionsError::NotFound(ref cause) => write!(f, "{}", cause),
1641            ListApplicationVersionsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1642        }
1643    }
1644}
1645impl Error for ListApplicationVersionsError {}
1646/// Errors returned by ListApplications
1647#[derive(Debug, PartialEq)]
1648pub enum ListApplicationsError {
1649    /// <p>One of the parameters in the request is invalid.</p>
1650    BadRequest(String),
1651    /// <p>The client is not authenticated.</p>
1652    Forbidden(String),
1653    /// <p>The AWS Serverless Application Repository service encountered an internal error.</p>
1654    InternalServerError(String),
1655    /// <p>The resource (for example, an access policy statement) specified in the request doesn't exist.</p>
1656    NotFound(String),
1657}
1658
1659impl ListApplicationsError {
1660    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListApplicationsError> {
1661        if let Some(err) = proto::json::Error::parse_rest(&res) {
1662            match err.typ.as_str() {
1663                "BadRequestException" => {
1664                    return RusotoError::Service(ListApplicationsError::BadRequest(err.msg))
1665                }
1666                "ForbiddenException" => {
1667                    return RusotoError::Service(ListApplicationsError::Forbidden(err.msg))
1668                }
1669                "InternalServerErrorException" => {
1670                    return RusotoError::Service(ListApplicationsError::InternalServerError(
1671                        err.msg,
1672                    ))
1673                }
1674                "NotFoundException" => {
1675                    return RusotoError::Service(ListApplicationsError::NotFound(err.msg))
1676                }
1677                "ValidationException" => return RusotoError::Validation(err.msg),
1678                _ => {}
1679            }
1680        }
1681        RusotoError::Unknown(res)
1682    }
1683}
1684impl fmt::Display for ListApplicationsError {
1685    #[allow(unused_variables)]
1686    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1687        match *self {
1688            ListApplicationsError::BadRequest(ref cause) => write!(f, "{}", cause),
1689            ListApplicationsError::Forbidden(ref cause) => write!(f, "{}", cause),
1690            ListApplicationsError::InternalServerError(ref cause) => write!(f, "{}", cause),
1691            ListApplicationsError::NotFound(ref cause) => write!(f, "{}", cause),
1692        }
1693    }
1694}
1695impl Error for ListApplicationsError {}
1696/// Errors returned by PutApplicationPolicy
1697#[derive(Debug, PartialEq)]
1698pub enum PutApplicationPolicyError {
1699    /// <p>One of the parameters in the request is invalid.</p>
1700    BadRequest(String),
1701    /// <p>The client is not authenticated.</p>
1702    Forbidden(String),
1703    /// <p>The AWS Serverless Application Repository service encountered an internal error.</p>
1704    InternalServerError(String),
1705    /// <p>The resource (for example, an access policy statement) specified in the request doesn't exist.</p>
1706    NotFound(String),
1707    /// <p>The client is sending more than the allowed number of requests per unit of time.</p>
1708    TooManyRequests(String),
1709}
1710
1711impl PutApplicationPolicyError {
1712    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutApplicationPolicyError> {
1713        if let Some(err) = proto::json::Error::parse_rest(&res) {
1714            match err.typ.as_str() {
1715                "BadRequestException" => {
1716                    return RusotoError::Service(PutApplicationPolicyError::BadRequest(err.msg))
1717                }
1718                "ForbiddenException" => {
1719                    return RusotoError::Service(PutApplicationPolicyError::Forbidden(err.msg))
1720                }
1721                "InternalServerErrorException" => {
1722                    return RusotoError::Service(PutApplicationPolicyError::InternalServerError(
1723                        err.msg,
1724                    ))
1725                }
1726                "NotFoundException" => {
1727                    return RusotoError::Service(PutApplicationPolicyError::NotFound(err.msg))
1728                }
1729                "TooManyRequestsException" => {
1730                    return RusotoError::Service(PutApplicationPolicyError::TooManyRequests(
1731                        err.msg,
1732                    ))
1733                }
1734                "ValidationException" => return RusotoError::Validation(err.msg),
1735                _ => {}
1736            }
1737        }
1738        RusotoError::Unknown(res)
1739    }
1740}
1741impl fmt::Display for PutApplicationPolicyError {
1742    #[allow(unused_variables)]
1743    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1744        match *self {
1745            PutApplicationPolicyError::BadRequest(ref cause) => write!(f, "{}", cause),
1746            PutApplicationPolicyError::Forbidden(ref cause) => write!(f, "{}", cause),
1747            PutApplicationPolicyError::InternalServerError(ref cause) => write!(f, "{}", cause),
1748            PutApplicationPolicyError::NotFound(ref cause) => write!(f, "{}", cause),
1749            PutApplicationPolicyError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1750        }
1751    }
1752}
1753impl Error for PutApplicationPolicyError {}
1754/// Errors returned by UnshareApplication
1755#[derive(Debug, PartialEq)]
1756pub enum UnshareApplicationError {
1757    /// <p>One of the parameters in the request is invalid.</p>
1758    BadRequest(String),
1759    /// <p>The client is not authenticated.</p>
1760    Forbidden(String),
1761    /// <p>The AWS Serverless Application Repository service encountered an internal error.</p>
1762    InternalServerError(String),
1763    /// <p>The resource (for example, an access policy statement) specified in the request doesn't exist.</p>
1764    NotFound(String),
1765    /// <p>The client is sending more than the allowed number of requests per unit of time.</p>
1766    TooManyRequests(String),
1767}
1768
1769impl UnshareApplicationError {
1770    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UnshareApplicationError> {
1771        if let Some(err) = proto::json::Error::parse_rest(&res) {
1772            match err.typ.as_str() {
1773                "BadRequestException" => {
1774                    return RusotoError::Service(UnshareApplicationError::BadRequest(err.msg))
1775                }
1776                "ForbiddenException" => {
1777                    return RusotoError::Service(UnshareApplicationError::Forbidden(err.msg))
1778                }
1779                "InternalServerErrorException" => {
1780                    return RusotoError::Service(UnshareApplicationError::InternalServerError(
1781                        err.msg,
1782                    ))
1783                }
1784                "NotFoundException" => {
1785                    return RusotoError::Service(UnshareApplicationError::NotFound(err.msg))
1786                }
1787                "TooManyRequestsException" => {
1788                    return RusotoError::Service(UnshareApplicationError::TooManyRequests(err.msg))
1789                }
1790                "ValidationException" => return RusotoError::Validation(err.msg),
1791                _ => {}
1792            }
1793        }
1794        RusotoError::Unknown(res)
1795    }
1796}
1797impl fmt::Display for UnshareApplicationError {
1798    #[allow(unused_variables)]
1799    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1800        match *self {
1801            UnshareApplicationError::BadRequest(ref cause) => write!(f, "{}", cause),
1802            UnshareApplicationError::Forbidden(ref cause) => write!(f, "{}", cause),
1803            UnshareApplicationError::InternalServerError(ref cause) => write!(f, "{}", cause),
1804            UnshareApplicationError::NotFound(ref cause) => write!(f, "{}", cause),
1805            UnshareApplicationError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1806        }
1807    }
1808}
1809impl Error for UnshareApplicationError {}
1810/// Errors returned by UpdateApplication
1811#[derive(Debug, PartialEq)]
1812pub enum UpdateApplicationError {
1813    /// <p>One of the parameters in the request is invalid.</p>
1814    BadRequest(String),
1815    /// <p>The resource already exists.</p>
1816    Conflict(String),
1817    /// <p>The client is not authenticated.</p>
1818    Forbidden(String),
1819    /// <p>The AWS Serverless Application Repository service encountered an internal error.</p>
1820    InternalServerError(String),
1821    /// <p>The resource (for example, an access policy statement) specified in the request doesn't exist.</p>
1822    NotFound(String),
1823    /// <p>The client is sending more than the allowed number of requests per unit of time.</p>
1824    TooManyRequests(String),
1825}
1826
1827impl UpdateApplicationError {
1828    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateApplicationError> {
1829        if let Some(err) = proto::json::Error::parse_rest(&res) {
1830            match err.typ.as_str() {
1831                "BadRequestException" => {
1832                    return RusotoError::Service(UpdateApplicationError::BadRequest(err.msg))
1833                }
1834                "ConflictException" => {
1835                    return RusotoError::Service(UpdateApplicationError::Conflict(err.msg))
1836                }
1837                "ForbiddenException" => {
1838                    return RusotoError::Service(UpdateApplicationError::Forbidden(err.msg))
1839                }
1840                "InternalServerErrorException" => {
1841                    return RusotoError::Service(UpdateApplicationError::InternalServerError(
1842                        err.msg,
1843                    ))
1844                }
1845                "NotFoundException" => {
1846                    return RusotoError::Service(UpdateApplicationError::NotFound(err.msg))
1847                }
1848                "TooManyRequestsException" => {
1849                    return RusotoError::Service(UpdateApplicationError::TooManyRequests(err.msg))
1850                }
1851                "ValidationException" => return RusotoError::Validation(err.msg),
1852                _ => {}
1853            }
1854        }
1855        RusotoError::Unknown(res)
1856    }
1857}
1858impl fmt::Display for UpdateApplicationError {
1859    #[allow(unused_variables)]
1860    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1861        match *self {
1862            UpdateApplicationError::BadRequest(ref cause) => write!(f, "{}", cause),
1863            UpdateApplicationError::Conflict(ref cause) => write!(f, "{}", cause),
1864            UpdateApplicationError::Forbidden(ref cause) => write!(f, "{}", cause),
1865            UpdateApplicationError::InternalServerError(ref cause) => write!(f, "{}", cause),
1866            UpdateApplicationError::NotFound(ref cause) => write!(f, "{}", cause),
1867            UpdateApplicationError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1868        }
1869    }
1870}
1871impl Error for UpdateApplicationError {}
1872/// Trait representing the capabilities of the AWSServerlessApplicationRepository API. AWSServerlessApplicationRepository clients implement this trait.
1873#[async_trait]
1874pub trait ServerlessRepo {
1875    /// <p>Creates an application, optionally including an AWS SAM file to create the first application version in the same call.</p>
1876    async fn create_application(
1877        &self,
1878        input: CreateApplicationRequest,
1879    ) -> Result<CreateApplicationResponse, RusotoError<CreateApplicationError>>;
1880
1881    /// <p>Creates an application version.</p>
1882    async fn create_application_version(
1883        &self,
1884        input: CreateApplicationVersionRequest,
1885    ) -> Result<CreateApplicationVersionResponse, RusotoError<CreateApplicationVersionError>>;
1886
1887    /// <p>Creates an AWS CloudFormation change set for the given application.</p>
1888    async fn create_cloud_formation_change_set(
1889        &self,
1890        input: CreateCloudFormationChangeSetRequest,
1891    ) -> Result<
1892        CreateCloudFormationChangeSetResponse,
1893        RusotoError<CreateCloudFormationChangeSetError>,
1894    >;
1895
1896    /// <p>Creates an AWS CloudFormation template.</p>
1897    async fn create_cloud_formation_template(
1898        &self,
1899        input: CreateCloudFormationTemplateRequest,
1900    ) -> Result<CreateCloudFormationTemplateResponse, RusotoError<CreateCloudFormationTemplateError>>;
1901
1902    /// <p>Deletes the specified application.</p>
1903    async fn delete_application(
1904        &self,
1905        input: DeleteApplicationRequest,
1906    ) -> Result<(), RusotoError<DeleteApplicationError>>;
1907
1908    /// <p>Gets the specified application.</p>
1909    async fn get_application(
1910        &self,
1911        input: GetApplicationRequest,
1912    ) -> Result<GetApplicationResponse, RusotoError<GetApplicationError>>;
1913
1914    /// <p>Retrieves the policy for the application.</p>
1915    async fn get_application_policy(
1916        &self,
1917        input: GetApplicationPolicyRequest,
1918    ) -> Result<GetApplicationPolicyResponse, RusotoError<GetApplicationPolicyError>>;
1919
1920    /// <p>Gets the specified AWS CloudFormation template.</p>
1921    async fn get_cloud_formation_template(
1922        &self,
1923        input: GetCloudFormationTemplateRequest,
1924    ) -> Result<GetCloudFormationTemplateResponse, RusotoError<GetCloudFormationTemplateError>>;
1925
1926    /// <p>Retrieves the list of applications nested in the containing application.</p>
1927    async fn list_application_dependencies(
1928        &self,
1929        input: ListApplicationDependenciesRequest,
1930    ) -> Result<ListApplicationDependenciesResponse, RusotoError<ListApplicationDependenciesError>>;
1931
1932    /// <p>Lists versions for the specified application.</p>
1933    async fn list_application_versions(
1934        &self,
1935        input: ListApplicationVersionsRequest,
1936    ) -> Result<ListApplicationVersionsResponse, RusotoError<ListApplicationVersionsError>>;
1937
1938    /// <p>Lists applications owned by the requester.</p>
1939    async fn list_applications(
1940        &self,
1941        input: ListApplicationsRequest,
1942    ) -> Result<ListApplicationsResponse, RusotoError<ListApplicationsError>>;
1943
1944    /// <p>Sets the permission policy for an application. For the list of actions supported for this operation, see
1945    /// <a href="https://docs.aws.amazon.com/serverlessrepo/latest/devguide/access-control-resource-based.html#application-permissions">Application
1946    /// Permissions</a>
1947    /// .</p>
1948    async fn put_application_policy(
1949        &self,
1950        input: PutApplicationPolicyRequest,
1951    ) -> Result<PutApplicationPolicyResponse, RusotoError<PutApplicationPolicyError>>;
1952
1953    /// <p>Unshares an application from an AWS Organization.</p><p>This operation can be called only from the organization's master account.</p>
1954    async fn unshare_application(
1955        &self,
1956        input: UnshareApplicationRequest,
1957    ) -> Result<(), RusotoError<UnshareApplicationError>>;
1958
1959    /// <p>Updates the specified application.</p>
1960    async fn update_application(
1961        &self,
1962        input: UpdateApplicationRequest,
1963    ) -> Result<UpdateApplicationResponse, RusotoError<UpdateApplicationError>>;
1964}
1965/// A client for the AWSServerlessApplicationRepository API.
1966#[derive(Clone)]
1967pub struct ServerlessRepoClient {
1968    client: Client,
1969    region: region::Region,
1970}
1971
1972impl ServerlessRepoClient {
1973    /// Creates a client backed by the default tokio event loop.
1974    ///
1975    /// The client will use the default credentials provider and tls client.
1976    pub fn new(region: region::Region) -> ServerlessRepoClient {
1977        ServerlessRepoClient {
1978            client: Client::shared(),
1979            region,
1980        }
1981    }
1982
1983    pub fn new_with<P, D>(
1984        request_dispatcher: D,
1985        credentials_provider: P,
1986        region: region::Region,
1987    ) -> ServerlessRepoClient
1988    where
1989        P: ProvideAwsCredentials + Send + Sync + 'static,
1990        D: DispatchSignedRequest + Send + Sync + 'static,
1991    {
1992        ServerlessRepoClient {
1993            client: Client::new_with(credentials_provider, request_dispatcher),
1994            region,
1995        }
1996    }
1997
1998    pub fn new_with_client(client: Client, region: region::Region) -> ServerlessRepoClient {
1999        ServerlessRepoClient { client, region }
2000    }
2001}
2002
2003#[async_trait]
2004impl ServerlessRepo for ServerlessRepoClient {
2005    /// <p>Creates an application, optionally including an AWS SAM file to create the first application version in the same call.</p>
2006    #[allow(unused_mut)]
2007    async fn create_application(
2008        &self,
2009        input: CreateApplicationRequest,
2010    ) -> Result<CreateApplicationResponse, RusotoError<CreateApplicationError>> {
2011        let request_uri = "/applications";
2012
2013        let mut request = SignedRequest::new("POST", "serverlessrepo", &self.region, &request_uri);
2014        request.set_content_type("application/x-amz-json-1.1".to_owned());
2015
2016        let encoded = Some(serde_json::to_vec(&input).unwrap());
2017        request.set_payload(encoded);
2018
2019        let mut response = self
2020            .client
2021            .sign_and_dispatch(request)
2022            .await
2023            .map_err(RusotoError::from)?;
2024        if response.status.as_u16() == 201 {
2025            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2026            let result = proto::json::ResponsePayload::new(&response)
2027                .deserialize::<CreateApplicationResponse, _>()?;
2028
2029            Ok(result)
2030        } else {
2031            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2032            Err(CreateApplicationError::from_response(response))
2033        }
2034    }
2035
2036    /// <p>Creates an application version.</p>
2037    #[allow(unused_mut)]
2038    async fn create_application_version(
2039        &self,
2040        input: CreateApplicationVersionRequest,
2041    ) -> Result<CreateApplicationVersionResponse, RusotoError<CreateApplicationVersionError>> {
2042        let request_uri = format!(
2043            "/applications/{application_id}/versions/{semantic_version}",
2044            application_id = input.application_id,
2045            semantic_version = input.semantic_version
2046        );
2047
2048        let mut request = SignedRequest::new("PUT", "serverlessrepo", &self.region, &request_uri);
2049        request.set_content_type("application/x-amz-json-1.1".to_owned());
2050
2051        let encoded = Some(serde_json::to_vec(&input).unwrap());
2052        request.set_payload(encoded);
2053
2054        let mut response = self
2055            .client
2056            .sign_and_dispatch(request)
2057            .await
2058            .map_err(RusotoError::from)?;
2059        if response.status.as_u16() == 201 {
2060            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2061            let result = proto::json::ResponsePayload::new(&response)
2062                .deserialize::<CreateApplicationVersionResponse, _>()?;
2063
2064            Ok(result)
2065        } else {
2066            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2067            Err(CreateApplicationVersionError::from_response(response))
2068        }
2069    }
2070
2071    /// <p>Creates an AWS CloudFormation change set for the given application.</p>
2072    #[allow(unused_mut)]
2073    async fn create_cloud_formation_change_set(
2074        &self,
2075        input: CreateCloudFormationChangeSetRequest,
2076    ) -> Result<
2077        CreateCloudFormationChangeSetResponse,
2078        RusotoError<CreateCloudFormationChangeSetError>,
2079    > {
2080        let request_uri = format!(
2081            "/applications/{application_id}/changesets",
2082            application_id = input.application_id
2083        );
2084
2085        let mut request = SignedRequest::new("POST", "serverlessrepo", &self.region, &request_uri);
2086        request.set_content_type("application/x-amz-json-1.1".to_owned());
2087
2088        let encoded = Some(serde_json::to_vec(&input).unwrap());
2089        request.set_payload(encoded);
2090
2091        let mut response = self
2092            .client
2093            .sign_and_dispatch(request)
2094            .await
2095            .map_err(RusotoError::from)?;
2096        if response.status.as_u16() == 201 {
2097            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2098            let result = proto::json::ResponsePayload::new(&response)
2099                .deserialize::<CreateCloudFormationChangeSetResponse, _>()?;
2100
2101            Ok(result)
2102        } else {
2103            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2104            Err(CreateCloudFormationChangeSetError::from_response(response))
2105        }
2106    }
2107
2108    /// <p>Creates an AWS CloudFormation template.</p>
2109    #[allow(unused_mut)]
2110    async fn create_cloud_formation_template(
2111        &self,
2112        input: CreateCloudFormationTemplateRequest,
2113    ) -> Result<CreateCloudFormationTemplateResponse, RusotoError<CreateCloudFormationTemplateError>>
2114    {
2115        let request_uri = format!(
2116            "/applications/{application_id}/templates",
2117            application_id = input.application_id
2118        );
2119
2120        let mut request = SignedRequest::new("POST", "serverlessrepo", &self.region, &request_uri);
2121        request.set_content_type("application/x-amz-json-1.1".to_owned());
2122
2123        let encoded = Some(serde_json::to_vec(&input).unwrap());
2124        request.set_payload(encoded);
2125
2126        let mut response = self
2127            .client
2128            .sign_and_dispatch(request)
2129            .await
2130            .map_err(RusotoError::from)?;
2131        if response.status.as_u16() == 201 {
2132            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2133            let result = proto::json::ResponsePayload::new(&response)
2134                .deserialize::<CreateCloudFormationTemplateResponse, _>()?;
2135
2136            Ok(result)
2137        } else {
2138            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2139            Err(CreateCloudFormationTemplateError::from_response(response))
2140        }
2141    }
2142
2143    /// <p>Deletes the specified application.</p>
2144    #[allow(unused_mut)]
2145    async fn delete_application(
2146        &self,
2147        input: DeleteApplicationRequest,
2148    ) -> Result<(), RusotoError<DeleteApplicationError>> {
2149        let request_uri = format!(
2150            "/applications/{application_id}",
2151            application_id = input.application_id
2152        );
2153
2154        let mut request =
2155            SignedRequest::new("DELETE", "serverlessrepo", &self.region, &request_uri);
2156        request.set_content_type("application/x-amz-json-1.1".to_owned());
2157
2158        let mut response = self
2159            .client
2160            .sign_and_dispatch(request)
2161            .await
2162            .map_err(RusotoError::from)?;
2163        if response.status.as_u16() == 204 {
2164            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2165            let result = ::std::mem::drop(response);
2166
2167            Ok(result)
2168        } else {
2169            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2170            Err(DeleteApplicationError::from_response(response))
2171        }
2172    }
2173
2174    /// <p>Gets the specified application.</p>
2175    #[allow(unused_mut)]
2176    async fn get_application(
2177        &self,
2178        input: GetApplicationRequest,
2179    ) -> Result<GetApplicationResponse, RusotoError<GetApplicationError>> {
2180        let request_uri = format!(
2181            "/applications/{application_id}",
2182            application_id = input.application_id
2183        );
2184
2185        let mut request = SignedRequest::new("GET", "serverlessrepo", &self.region, &request_uri);
2186        request.set_content_type("application/x-amz-json-1.1".to_owned());
2187
2188        let mut params = Params::new();
2189        if let Some(ref x) = input.semantic_version {
2190            params.put("semanticVersion", x);
2191        }
2192        request.set_params(params);
2193
2194        let mut response = self
2195            .client
2196            .sign_and_dispatch(request)
2197            .await
2198            .map_err(RusotoError::from)?;
2199        if response.status.as_u16() == 200 {
2200            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2201            let result = proto::json::ResponsePayload::new(&response)
2202                .deserialize::<GetApplicationResponse, _>()?;
2203
2204            Ok(result)
2205        } else {
2206            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2207            Err(GetApplicationError::from_response(response))
2208        }
2209    }
2210
2211    /// <p>Retrieves the policy for the application.</p>
2212    #[allow(unused_mut)]
2213    async fn get_application_policy(
2214        &self,
2215        input: GetApplicationPolicyRequest,
2216    ) -> Result<GetApplicationPolicyResponse, RusotoError<GetApplicationPolicyError>> {
2217        let request_uri = format!(
2218            "/applications/{application_id}/policy",
2219            application_id = input.application_id
2220        );
2221
2222        let mut request = SignedRequest::new("GET", "serverlessrepo", &self.region, &request_uri);
2223        request.set_content_type("application/x-amz-json-1.1".to_owned());
2224
2225        let mut response = self
2226            .client
2227            .sign_and_dispatch(request)
2228            .await
2229            .map_err(RusotoError::from)?;
2230        if response.status.as_u16() == 200 {
2231            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2232            let result = proto::json::ResponsePayload::new(&response)
2233                .deserialize::<GetApplicationPolicyResponse, _>()?;
2234
2235            Ok(result)
2236        } else {
2237            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2238            Err(GetApplicationPolicyError::from_response(response))
2239        }
2240    }
2241
2242    /// <p>Gets the specified AWS CloudFormation template.</p>
2243    #[allow(unused_mut)]
2244    async fn get_cloud_formation_template(
2245        &self,
2246        input: GetCloudFormationTemplateRequest,
2247    ) -> Result<GetCloudFormationTemplateResponse, RusotoError<GetCloudFormationTemplateError>>
2248    {
2249        let request_uri = format!(
2250            "/applications/{application_id}/templates/{template_id}",
2251            application_id = input.application_id,
2252            template_id = input.template_id
2253        );
2254
2255        let mut request = SignedRequest::new("GET", "serverlessrepo", &self.region, &request_uri);
2256        request.set_content_type("application/x-amz-json-1.1".to_owned());
2257
2258        let mut response = self
2259            .client
2260            .sign_and_dispatch(request)
2261            .await
2262            .map_err(RusotoError::from)?;
2263        if response.status.as_u16() == 200 {
2264            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2265            let result = proto::json::ResponsePayload::new(&response)
2266                .deserialize::<GetCloudFormationTemplateResponse, _>()?;
2267
2268            Ok(result)
2269        } else {
2270            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2271            Err(GetCloudFormationTemplateError::from_response(response))
2272        }
2273    }
2274
2275    /// <p>Retrieves the list of applications nested in the containing application.</p>
2276    #[allow(unused_mut)]
2277    async fn list_application_dependencies(
2278        &self,
2279        input: ListApplicationDependenciesRequest,
2280    ) -> Result<ListApplicationDependenciesResponse, RusotoError<ListApplicationDependenciesError>>
2281    {
2282        let request_uri = format!(
2283            "/applications/{application_id}/dependencies",
2284            application_id = input.application_id
2285        );
2286
2287        let mut request = SignedRequest::new("GET", "serverlessrepo", &self.region, &request_uri);
2288        request.set_content_type("application/x-amz-json-1.1".to_owned());
2289
2290        let mut params = Params::new();
2291        if let Some(ref x) = input.max_items {
2292            params.put("maxItems", x);
2293        }
2294        if let Some(ref x) = input.next_token {
2295            params.put("nextToken", x);
2296        }
2297        if let Some(ref x) = input.semantic_version {
2298            params.put("semanticVersion", x);
2299        }
2300        request.set_params(params);
2301
2302        let mut response = self
2303            .client
2304            .sign_and_dispatch(request)
2305            .await
2306            .map_err(RusotoError::from)?;
2307        if response.status.as_u16() == 200 {
2308            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2309            let result = proto::json::ResponsePayload::new(&response)
2310                .deserialize::<ListApplicationDependenciesResponse, _>()?;
2311
2312            Ok(result)
2313        } else {
2314            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2315            Err(ListApplicationDependenciesError::from_response(response))
2316        }
2317    }
2318
2319    /// <p>Lists versions for the specified application.</p>
2320    #[allow(unused_mut)]
2321    async fn list_application_versions(
2322        &self,
2323        input: ListApplicationVersionsRequest,
2324    ) -> Result<ListApplicationVersionsResponse, RusotoError<ListApplicationVersionsError>> {
2325        let request_uri = format!(
2326            "/applications/{application_id}/versions",
2327            application_id = input.application_id
2328        );
2329
2330        let mut request = SignedRequest::new("GET", "serverlessrepo", &self.region, &request_uri);
2331        request.set_content_type("application/x-amz-json-1.1".to_owned());
2332
2333        let mut params = Params::new();
2334        if let Some(ref x) = input.max_items {
2335            params.put("maxItems", x);
2336        }
2337        if let Some(ref x) = input.next_token {
2338            params.put("nextToken", x);
2339        }
2340        request.set_params(params);
2341
2342        let mut response = self
2343            .client
2344            .sign_and_dispatch(request)
2345            .await
2346            .map_err(RusotoError::from)?;
2347        if response.status.as_u16() == 200 {
2348            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2349            let result = proto::json::ResponsePayload::new(&response)
2350                .deserialize::<ListApplicationVersionsResponse, _>()?;
2351
2352            Ok(result)
2353        } else {
2354            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2355            Err(ListApplicationVersionsError::from_response(response))
2356        }
2357    }
2358
2359    /// <p>Lists applications owned by the requester.</p>
2360    #[allow(unused_mut)]
2361    async fn list_applications(
2362        &self,
2363        input: ListApplicationsRequest,
2364    ) -> Result<ListApplicationsResponse, RusotoError<ListApplicationsError>> {
2365        let request_uri = "/applications";
2366
2367        let mut request = SignedRequest::new("GET", "serverlessrepo", &self.region, &request_uri);
2368        request.set_content_type("application/x-amz-json-1.1".to_owned());
2369
2370        let mut params = Params::new();
2371        if let Some(ref x) = input.max_items {
2372            params.put("maxItems", x);
2373        }
2374        if let Some(ref x) = input.next_token {
2375            params.put("nextToken", x);
2376        }
2377        request.set_params(params);
2378
2379        let mut response = self
2380            .client
2381            .sign_and_dispatch(request)
2382            .await
2383            .map_err(RusotoError::from)?;
2384        if response.status.as_u16() == 200 {
2385            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2386            let result = proto::json::ResponsePayload::new(&response)
2387                .deserialize::<ListApplicationsResponse, _>()?;
2388
2389            Ok(result)
2390        } else {
2391            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2392            Err(ListApplicationsError::from_response(response))
2393        }
2394    }
2395
2396    /// <p>Sets the permission policy for an application. For the list of actions supported for this operation, see
2397    /// <a href="https://docs.aws.amazon.com/serverlessrepo/latest/devguide/access-control-resource-based.html#application-permissions">Application
2398    /// Permissions</a>
2399    /// .</p>
2400    #[allow(unused_mut)]
2401    async fn put_application_policy(
2402        &self,
2403        input: PutApplicationPolicyRequest,
2404    ) -> Result<PutApplicationPolicyResponse, RusotoError<PutApplicationPolicyError>> {
2405        let request_uri = format!(
2406            "/applications/{application_id}/policy",
2407            application_id = input.application_id
2408        );
2409
2410        let mut request = SignedRequest::new("PUT", "serverlessrepo", &self.region, &request_uri);
2411        request.set_content_type("application/x-amz-json-1.1".to_owned());
2412
2413        let encoded = Some(serde_json::to_vec(&input).unwrap());
2414        request.set_payload(encoded);
2415
2416        let mut response = self
2417            .client
2418            .sign_and_dispatch(request)
2419            .await
2420            .map_err(RusotoError::from)?;
2421        if response.status.as_u16() == 200 {
2422            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2423            let result = proto::json::ResponsePayload::new(&response)
2424                .deserialize::<PutApplicationPolicyResponse, _>()?;
2425
2426            Ok(result)
2427        } else {
2428            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2429            Err(PutApplicationPolicyError::from_response(response))
2430        }
2431    }
2432
2433    /// <p>Unshares an application from an AWS Organization.</p><p>This operation can be called only from the organization's master account.</p>
2434    #[allow(unused_mut)]
2435    async fn unshare_application(
2436        &self,
2437        input: UnshareApplicationRequest,
2438    ) -> Result<(), RusotoError<UnshareApplicationError>> {
2439        let request_uri = format!(
2440            "/applications/{application_id}/unshare",
2441            application_id = input.application_id
2442        );
2443
2444        let mut request = SignedRequest::new("POST", "serverlessrepo", &self.region, &request_uri);
2445        request.set_content_type("application/x-amz-json-1.1".to_owned());
2446
2447        let encoded = Some(serde_json::to_vec(&input).unwrap());
2448        request.set_payload(encoded);
2449
2450        let mut response = self
2451            .client
2452            .sign_and_dispatch(request)
2453            .await
2454            .map_err(RusotoError::from)?;
2455        if response.status.as_u16() == 204 {
2456            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2457            let result = ::std::mem::drop(response);
2458
2459            Ok(result)
2460        } else {
2461            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2462            Err(UnshareApplicationError::from_response(response))
2463        }
2464    }
2465
2466    /// <p>Updates the specified application.</p>
2467    #[allow(unused_mut)]
2468    async fn update_application(
2469        &self,
2470        input: UpdateApplicationRequest,
2471    ) -> Result<UpdateApplicationResponse, RusotoError<UpdateApplicationError>> {
2472        let request_uri = format!(
2473            "/applications/{application_id}",
2474            application_id = input.application_id
2475        );
2476
2477        let mut request = SignedRequest::new("PATCH", "serverlessrepo", &self.region, &request_uri);
2478        request.set_content_type("application/x-amz-json-1.1".to_owned());
2479
2480        let encoded = Some(serde_json::to_vec(&input).unwrap());
2481        request.set_payload(encoded);
2482
2483        let mut response = self
2484            .client
2485            .sign_and_dispatch(request)
2486            .await
2487            .map_err(RusotoError::from)?;
2488        if response.status.as_u16() == 200 {
2489            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2490            let result = proto::json::ResponsePayload::new(&response)
2491                .deserialize::<UpdateApplicationResponse, _>()?;
2492
2493            Ok(result)
2494        } else {
2495            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2496            Err(UpdateApplicationError::from_response(response))
2497        }
2498    }
2499}