rusoto_signer/
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#[derive(Clone, Debug, Default, PartialEq, Serialize)]
29#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
30pub struct CancelSigningProfileRequest {
31    /// <p>The name of the signing profile to be canceled.</p>
32    #[serde(rename = "profileName")]
33    pub profile_name: String,
34}
35
36#[derive(Clone, Debug, Default, PartialEq, Serialize)]
37#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
38pub struct DescribeSigningJobRequest {
39    /// <p>The ID of the signing job on input.</p>
40    #[serde(rename = "jobId")]
41    pub job_id: String,
42}
43
44#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
45#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
46pub struct DescribeSigningJobResponse {
47    /// <p>Date and time that the signing job was completed.</p>
48    #[serde(rename = "completedAt")]
49    #[serde(skip_serializing_if = "Option::is_none")]
50    pub completed_at: Option<f64>,
51    /// <p>Date and time that the signing job was created.</p>
52    #[serde(rename = "createdAt")]
53    #[serde(skip_serializing_if = "Option::is_none")]
54    pub created_at: Option<f64>,
55    /// <p>The ID of the signing job on output.</p>
56    #[serde(rename = "jobId")]
57    #[serde(skip_serializing_if = "Option::is_none")]
58    pub job_id: Option<String>,
59    /// <p>A list of any overrides that were applied to the signing operation.</p>
60    #[serde(rename = "overrides")]
61    #[serde(skip_serializing_if = "Option::is_none")]
62    pub overrides: Option<SigningPlatformOverrides>,
63    /// <p>The microcontroller platform to which your signed code image will be distributed.</p>
64    #[serde(rename = "platformId")]
65    #[serde(skip_serializing_if = "Option::is_none")]
66    pub platform_id: Option<String>,
67    /// <p>The name of the profile that initiated the signing operation.</p>
68    #[serde(rename = "profileName")]
69    #[serde(skip_serializing_if = "Option::is_none")]
70    pub profile_name: Option<String>,
71    /// <p>The IAM principal that requested the signing job.</p>
72    #[serde(rename = "requestedBy")]
73    #[serde(skip_serializing_if = "Option::is_none")]
74    pub requested_by: Option<String>,
75    /// <p>Name of the S3 bucket where the signed code image is saved by code signing.</p>
76    #[serde(rename = "signedObject")]
77    #[serde(skip_serializing_if = "Option::is_none")]
78    pub signed_object: Option<SignedObject>,
79    /// <p>The Amazon Resource Name (ARN) of your code signing certificate.</p>
80    #[serde(rename = "signingMaterial")]
81    #[serde(skip_serializing_if = "Option::is_none")]
82    pub signing_material: Option<SigningMaterial>,
83    /// <p>Map of user-assigned key-value pairs used during signing. These values contain any information that you specified for use in your signing job. </p>
84    #[serde(rename = "signingParameters")]
85    #[serde(skip_serializing_if = "Option::is_none")]
86    pub signing_parameters: Option<::std::collections::HashMap<String, String>>,
87    /// <p>The object that contains the name of your S3 bucket or your raw code.</p>
88    #[serde(rename = "source")]
89    #[serde(skip_serializing_if = "Option::is_none")]
90    pub source: Option<Source>,
91    /// <p>Status of the signing job.</p>
92    #[serde(rename = "status")]
93    #[serde(skip_serializing_if = "Option::is_none")]
94    pub status: Option<String>,
95    /// <p>String value that contains the status reason.</p>
96    #[serde(rename = "statusReason")]
97    #[serde(skip_serializing_if = "Option::is_none")]
98    pub status_reason: Option<String>,
99}
100
101/// <p>Points to an <code>S3Destination</code> object that contains information about your S3 bucket.</p>
102#[derive(Clone, Debug, Default, PartialEq, Serialize)]
103#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
104pub struct Destination {
105    /// <p>The <code>S3Destination</code> object.</p>
106    #[serde(rename = "s3")]
107    #[serde(skip_serializing_if = "Option::is_none")]
108    pub s_3: Option<S3Destination>,
109}
110
111/// <p>The encryption algorithm options that are available to a code signing job.</p>
112#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
113#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
114pub struct EncryptionAlgorithmOptions {
115    /// <p>The set of accepted encryption algorithms that are allowed in a code signing job.</p>
116    #[serde(rename = "allowedValues")]
117    pub allowed_values: Vec<String>,
118    /// <p>The default encryption algorithm that is used by a code signing job.</p>
119    #[serde(rename = "defaultValue")]
120    pub default_value: String,
121}
122
123#[derive(Clone, Debug, Default, PartialEq, Serialize)]
124#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
125pub struct GetSigningPlatformRequest {
126    /// <p>The ID of the target signing platform.</p>
127    #[serde(rename = "platformId")]
128    pub platform_id: String,
129}
130
131#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
132#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
133pub struct GetSigningPlatformResponse {
134    /// <p>The category type of the target signing platform.</p>
135    #[serde(rename = "category")]
136    #[serde(skip_serializing_if = "Option::is_none")]
137    pub category: Option<String>,
138    /// <p>The display name of the target signing platform.</p>
139    #[serde(rename = "displayName")]
140    #[serde(skip_serializing_if = "Option::is_none")]
141    pub display_name: Option<String>,
142    /// <p>The maximum size (in MB) of the payload that can be signed by the target platform.</p>
143    #[serde(rename = "maxSizeInMB")]
144    #[serde(skip_serializing_if = "Option::is_none")]
145    pub max_size_in_mb: Option<i64>,
146    /// <p>A list of partner entities that use the target signing platform.</p>
147    #[serde(rename = "partner")]
148    #[serde(skip_serializing_if = "Option::is_none")]
149    pub partner: Option<String>,
150    /// <p>The ID of the target signing platform.</p>
151    #[serde(rename = "platformId")]
152    #[serde(skip_serializing_if = "Option::is_none")]
153    pub platform_id: Option<String>,
154    /// <p>A list of configurations applied to the target platform at signing.</p>
155    #[serde(rename = "signingConfiguration")]
156    #[serde(skip_serializing_if = "Option::is_none")]
157    pub signing_configuration: Option<SigningConfiguration>,
158    /// <p>The format of the target platform's signing image.</p>
159    #[serde(rename = "signingImageFormat")]
160    #[serde(skip_serializing_if = "Option::is_none")]
161    pub signing_image_format: Option<SigningImageFormat>,
162    /// <p>The validation template that is used by the target signing platform.</p>
163    #[serde(rename = "target")]
164    #[serde(skip_serializing_if = "Option::is_none")]
165    pub target: Option<String>,
166}
167
168#[derive(Clone, Debug, Default, PartialEq, Serialize)]
169#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
170pub struct GetSigningProfileRequest {
171    /// <p>The name of the target signing profile.</p>
172    #[serde(rename = "profileName")]
173    pub profile_name: String,
174}
175
176#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
177#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
178pub struct GetSigningProfileResponse {
179    /// <p>The Amazon Resource Name (ARN) for the signing profile.</p>
180    #[serde(rename = "arn")]
181    #[serde(skip_serializing_if = "Option::is_none")]
182    pub arn: Option<String>,
183    /// <p>A list of overrides applied by the target signing profile for signing operations.</p>
184    #[serde(rename = "overrides")]
185    #[serde(skip_serializing_if = "Option::is_none")]
186    pub overrides: Option<SigningPlatformOverrides>,
187    /// <p>The ID of the platform that is used by the target signing profile.</p>
188    #[serde(rename = "platformId")]
189    #[serde(skip_serializing_if = "Option::is_none")]
190    pub platform_id: Option<String>,
191    /// <p>The name of the target signing profile.</p>
192    #[serde(rename = "profileName")]
193    #[serde(skip_serializing_if = "Option::is_none")]
194    pub profile_name: Option<String>,
195    /// <p>The ARN of the certificate that the target profile uses for signing operations.</p>
196    #[serde(rename = "signingMaterial")]
197    #[serde(skip_serializing_if = "Option::is_none")]
198    pub signing_material: Option<SigningMaterial>,
199    /// <p>A map of key-value pairs for signing operations that is attached to the target signing profile.</p>
200    #[serde(rename = "signingParameters")]
201    #[serde(skip_serializing_if = "Option::is_none")]
202    pub signing_parameters: Option<::std::collections::HashMap<String, String>>,
203    /// <p>The status of the target signing profile.</p>
204    #[serde(rename = "status")]
205    #[serde(skip_serializing_if = "Option::is_none")]
206    pub status: Option<String>,
207    /// <p>A list of tags associated with the signing profile.</p>
208    #[serde(rename = "tags")]
209    #[serde(skip_serializing_if = "Option::is_none")]
210    pub tags: Option<::std::collections::HashMap<String, String>>,
211}
212
213/// <p>The hash algorithms that are available to a code signing job.</p>
214#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
215#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
216pub struct HashAlgorithmOptions {
217    /// <p>The set of accepted hash algorithms allowed in a code signing job.</p>
218    #[serde(rename = "allowedValues")]
219    pub allowed_values: Vec<String>,
220    /// <p>The default hash algorithm that is used in a code signing job.</p>
221    #[serde(rename = "defaultValue")]
222    pub default_value: String,
223}
224
225#[derive(Clone, Debug, Default, PartialEq, Serialize)]
226#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
227pub struct ListSigningJobsRequest {
228    /// <p>Specifies the maximum number of items to return in the response. Use this parameter when paginating results. If additional items exist beyond the number you specify, the <code>nextToken</code> element is set in the response. Use the <code>nextToken</code> value in a subsequent request to retrieve additional items. </p>
229    #[serde(rename = "maxResults")]
230    #[serde(skip_serializing_if = "Option::is_none")]
231    pub max_results: Option<i64>,
232    /// <p>String for specifying the next set of paginated results to return. After you receive a response with truncated results, use this parameter in a subsequent request. Set it to the value of <code>nextToken</code> from the response that you just received.</p>
233    #[serde(rename = "nextToken")]
234    #[serde(skip_serializing_if = "Option::is_none")]
235    pub next_token: Option<String>,
236    /// <p>The ID of microcontroller platform that you specified for the distribution of your code image.</p>
237    #[serde(rename = "platformId")]
238    #[serde(skip_serializing_if = "Option::is_none")]
239    pub platform_id: Option<String>,
240    /// <p>The IAM principal that requested the signing job.</p>
241    #[serde(rename = "requestedBy")]
242    #[serde(skip_serializing_if = "Option::is_none")]
243    pub requested_by: Option<String>,
244    /// <p>A status value with which to filter your results.</p>
245    #[serde(rename = "status")]
246    #[serde(skip_serializing_if = "Option::is_none")]
247    pub status: Option<String>,
248}
249
250#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
251#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
252pub struct ListSigningJobsResponse {
253    /// <p>A list of your signing jobs.</p>
254    #[serde(rename = "jobs")]
255    #[serde(skip_serializing_if = "Option::is_none")]
256    pub jobs: Option<Vec<SigningJob>>,
257    /// <p>String for specifying the next set of paginated results.</p>
258    #[serde(rename = "nextToken")]
259    #[serde(skip_serializing_if = "Option::is_none")]
260    pub next_token: Option<String>,
261}
262
263#[derive(Clone, Debug, Default, PartialEq, Serialize)]
264#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
265pub struct ListSigningPlatformsRequest {
266    /// <p>The category type of a signing platform.</p>
267    #[serde(rename = "category")]
268    #[serde(skip_serializing_if = "Option::is_none")]
269    pub category: Option<String>,
270    /// <p>The maximum number of results to be returned by this operation.</p>
271    #[serde(rename = "maxResults")]
272    #[serde(skip_serializing_if = "Option::is_none")]
273    pub max_results: Option<i64>,
274    /// <p>Value for specifying the next set of paginated results to return. After you receive a response with truncated results, use this parameter in a subsequent request. Set it to the value of <code>nextToken</code> from the response that you just received.</p>
275    #[serde(rename = "nextToken")]
276    #[serde(skip_serializing_if = "Option::is_none")]
277    pub next_token: Option<String>,
278    /// <p>Any partner entities connected to a signing platform.</p>
279    #[serde(rename = "partner")]
280    #[serde(skip_serializing_if = "Option::is_none")]
281    pub partner: Option<String>,
282    /// <p>The validation template that is used by the target signing platform.</p>
283    #[serde(rename = "target")]
284    #[serde(skip_serializing_if = "Option::is_none")]
285    pub target: Option<String>,
286}
287
288#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
289#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
290pub struct ListSigningPlatformsResponse {
291    /// <p>Value for specifying the next set of paginated results to return.</p>
292    #[serde(rename = "nextToken")]
293    #[serde(skip_serializing_if = "Option::is_none")]
294    pub next_token: Option<String>,
295    /// <p>A list of all platforms that match the request parameters.</p>
296    #[serde(rename = "platforms")]
297    #[serde(skip_serializing_if = "Option::is_none")]
298    pub platforms: Option<Vec<SigningPlatform>>,
299}
300
301#[derive(Clone, Debug, Default, PartialEq, Serialize)]
302#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
303pub struct ListSigningProfilesRequest {
304    /// <p>Designates whether to include profiles with the status of <code>CANCELED</code>.</p>
305    #[serde(rename = "includeCanceled")]
306    #[serde(skip_serializing_if = "Option::is_none")]
307    pub include_canceled: Option<bool>,
308    /// <p>The maximum number of profiles to be returned.</p>
309    #[serde(rename = "maxResults")]
310    #[serde(skip_serializing_if = "Option::is_none")]
311    pub max_results: Option<i64>,
312    /// <p>Value for specifying the next set of paginated results to return. After you receive a response with truncated results, use this parameter in a subsequent request. Set it to the value of <code>nextToken</code> from the response that you just received.</p>
313    #[serde(rename = "nextToken")]
314    #[serde(skip_serializing_if = "Option::is_none")]
315    pub next_token: Option<String>,
316}
317
318#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
319#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
320pub struct ListSigningProfilesResponse {
321    /// <p>Value for specifying the next set of paginated results to return.</p>
322    #[serde(rename = "nextToken")]
323    #[serde(skip_serializing_if = "Option::is_none")]
324    pub next_token: Option<String>,
325    /// <p>A list of profiles that are available in the AWS account. This includes profiles with the status of <code>CANCELED</code> if the <code>includeCanceled</code> parameter is set to <code>true</code>.</p>
326    #[serde(rename = "profiles")]
327    #[serde(skip_serializing_if = "Option::is_none")]
328    pub profiles: Option<Vec<SigningProfile>>,
329}
330
331#[derive(Clone, Debug, Default, PartialEq, Serialize)]
332#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
333pub struct ListTagsForResourceRequest {
334    /// <p>The Amazon Resource Name (ARN) for the signing profile.</p>
335    #[serde(rename = "resourceArn")]
336    pub resource_arn: String,
337}
338
339#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
340#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
341pub struct ListTagsForResourceResponse {
342    /// <p>A list of tags associated with the signing profile.</p>
343    #[serde(rename = "tags")]
344    #[serde(skip_serializing_if = "Option::is_none")]
345    pub tags: Option<::std::collections::HashMap<String, String>>,
346}
347
348#[derive(Clone, Debug, Default, PartialEq, Serialize)]
349#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
350pub struct PutSigningProfileRequest {
351    /// <p>A subfield of <code>platform</code>. This specifies any different configuration options that you want to apply to the chosen platform (such as a different <code>hash-algorithm</code> or <code>signing-algorithm</code>).</p>
352    #[serde(rename = "overrides")]
353    #[serde(skip_serializing_if = "Option::is_none")]
354    pub overrides: Option<SigningPlatformOverrides>,
355    /// <p>The ID of the signing platform to be created.</p>
356    #[serde(rename = "platformId")]
357    pub platform_id: String,
358    /// <p>The name of the signing profile to be created.</p>
359    #[serde(rename = "profileName")]
360    pub profile_name: String,
361    /// <p>The AWS Certificate Manager certificate that will be used to sign code with the new signing profile.</p>
362    #[serde(rename = "signingMaterial")]
363    pub signing_material: SigningMaterial,
364    /// <p>Map of key-value pairs for signing. These can include any information that you want to use during signing.</p>
365    #[serde(rename = "signingParameters")]
366    #[serde(skip_serializing_if = "Option::is_none")]
367    pub signing_parameters: Option<::std::collections::HashMap<String, String>>,
368    /// <p>Tags to be associated with the signing profile that is being created.</p>
369    #[serde(rename = "tags")]
370    #[serde(skip_serializing_if = "Option::is_none")]
371    pub tags: Option<::std::collections::HashMap<String, String>>,
372}
373
374#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
375#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
376pub struct PutSigningProfileResponse {
377    /// <p>The Amazon Resource Name (ARN) of the signing profile created.</p>
378    #[serde(rename = "arn")]
379    #[serde(skip_serializing_if = "Option::is_none")]
380    pub arn: Option<String>,
381}
382
383/// <p>The name and prefix of the S3 bucket where code signing saves your signed objects.</p>
384#[derive(Clone, Debug, Default, PartialEq, Serialize)]
385#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
386pub struct S3Destination {
387    /// <p>Name of the S3 bucket.</p>
388    #[serde(rename = "bucketName")]
389    #[serde(skip_serializing_if = "Option::is_none")]
390    pub bucket_name: Option<String>,
391    /// <p>An Amazon S3 prefix that you can use to limit responses to those that begin with the specified prefix.</p>
392    #[serde(rename = "prefix")]
393    #[serde(skip_serializing_if = "Option::is_none")]
394    pub prefix: Option<String>,
395}
396
397/// <p>The S3 bucket name and key where code signing saved your signed code image.</p>
398#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
399#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
400pub struct S3SignedObject {
401    /// <p>Name of the S3 bucket.</p>
402    #[serde(rename = "bucketName")]
403    #[serde(skip_serializing_if = "Option::is_none")]
404    pub bucket_name: Option<String>,
405    /// <p>Key name that uniquely identifies a signed code image in your bucket.</p>
406    #[serde(rename = "key")]
407    #[serde(skip_serializing_if = "Option::is_none")]
408    pub key: Option<String>,
409}
410
411/// <p>Information about the S3 bucket where you saved your unsigned code.</p>
412#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
413pub struct S3Source {
414    /// <p>Name of the S3 bucket.</p>
415    #[serde(rename = "bucketName")]
416    pub bucket_name: String,
417    /// <p>Key name of the bucket object that contains your unsigned code.</p>
418    #[serde(rename = "key")]
419    pub key: String,
420    /// <p>Version of your source image in your version enabled S3 bucket.</p>
421    #[serde(rename = "version")]
422    pub version: String,
423}
424
425/// <p>Points to an <code>S3SignedObject</code> object that contains information about your signed code image.</p>
426#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
427#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
428pub struct SignedObject {
429    /// <p>The <code>S3SignedObject</code>.</p>
430    #[serde(rename = "s3")]
431    #[serde(skip_serializing_if = "Option::is_none")]
432    pub s_3: Option<S3SignedObject>,
433}
434
435/// <p>The configuration of a code signing operation.</p>
436#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
437#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
438pub struct SigningConfiguration {
439    /// <p>The encryption algorithm options that are available for a code signing job.</p>
440    #[serde(rename = "encryptionAlgorithmOptions")]
441    pub encryption_algorithm_options: EncryptionAlgorithmOptions,
442    /// <p>The hash algorithm options that are available for a code signing job.</p>
443    #[serde(rename = "hashAlgorithmOptions")]
444    pub hash_algorithm_options: HashAlgorithmOptions,
445}
446
447/// <p>A signing configuration that overrides the default encryption or hash algorithm of a signing job.</p>
448#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
449pub struct SigningConfigurationOverrides {
450    /// <p>A specified override of the default encryption algorithm that is used in a code signing job.</p>
451    #[serde(rename = "encryptionAlgorithm")]
452    #[serde(skip_serializing_if = "Option::is_none")]
453    pub encryption_algorithm: Option<String>,
454    /// <p>A specified override of the default hash algorithm that is used in a code signing job.</p>
455    #[serde(rename = "hashAlgorithm")]
456    #[serde(skip_serializing_if = "Option::is_none")]
457    pub hash_algorithm: Option<String>,
458}
459
460/// <p>The image format of a code signing platform or profile.</p>
461#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
462#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
463pub struct SigningImageFormat {
464    /// <p>The default format of a code signing image.</p>
465    #[serde(rename = "defaultFormat")]
466    pub default_format: String,
467    /// <p>The supported formats of a code signing image.</p>
468    #[serde(rename = "supportedFormats")]
469    pub supported_formats: Vec<String>,
470}
471
472/// <p>Contains information about a signing job.</p>
473#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
474#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
475pub struct SigningJob {
476    /// <p>The date and time that the signing job was created.</p>
477    #[serde(rename = "createdAt")]
478    #[serde(skip_serializing_if = "Option::is_none")]
479    pub created_at: Option<f64>,
480    /// <p>The ID of the signing job.</p>
481    #[serde(rename = "jobId")]
482    #[serde(skip_serializing_if = "Option::is_none")]
483    pub job_id: Option<String>,
484    /// <p>A <code>SignedObject</code> structure that contains information about a signing job's signed code image.</p>
485    #[serde(rename = "signedObject")]
486    #[serde(skip_serializing_if = "Option::is_none")]
487    pub signed_object: Option<SignedObject>,
488    /// <p>A <code>SigningMaterial</code> object that contains the Amazon Resource Name (ARN) of the certificate used for the signing job.</p>
489    #[serde(rename = "signingMaterial")]
490    #[serde(skip_serializing_if = "Option::is_none")]
491    pub signing_material: Option<SigningMaterial>,
492    /// <p>A <code>Source</code> that contains information about a signing job's code image source.</p>
493    #[serde(rename = "source")]
494    #[serde(skip_serializing_if = "Option::is_none")]
495    pub source: Option<Source>,
496    /// <p>The status of the signing job.</p>
497    #[serde(rename = "status")]
498    #[serde(skip_serializing_if = "Option::is_none")]
499    pub status: Option<String>,
500}
501
502/// <p>The ACM certificate that is used to sign your code.</p>
503#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
504pub struct SigningMaterial {
505    /// <p>The Amazon Resource Name (ARN) of the certificates that is used to sign your code.</p>
506    #[serde(rename = "certificateArn")]
507    pub certificate_arn: String,
508}
509
510/// <p>Contains information about the signing configurations and parameters that are used to perform a code signing job.</p>
511#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
512#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
513pub struct SigningPlatform {
514    /// <p>The category of a code signing platform.</p>
515    #[serde(rename = "category")]
516    #[serde(skip_serializing_if = "Option::is_none")]
517    pub category: Option<String>,
518    /// <p>The display name of a code signing platform.</p>
519    #[serde(rename = "displayName")]
520    #[serde(skip_serializing_if = "Option::is_none")]
521    pub display_name: Option<String>,
522    /// <p>The maximum size (in MB) of code that can be signed by a code signing platform.</p>
523    #[serde(rename = "maxSizeInMB")]
524    #[serde(skip_serializing_if = "Option::is_none")]
525    pub max_size_in_mb: Option<i64>,
526    /// <p>Any partner entities linked to a code signing platform.</p>
527    #[serde(rename = "partner")]
528    #[serde(skip_serializing_if = "Option::is_none")]
529    pub partner: Option<String>,
530    /// <p>The ID of a code signing; platform.</p>
531    #[serde(rename = "platformId")]
532    #[serde(skip_serializing_if = "Option::is_none")]
533    pub platform_id: Option<String>,
534    /// <p>The configuration of a code signing platform. This includes the designated hash algorithm and encryption algorithm of a signing platform.</p>
535    #[serde(rename = "signingConfiguration")]
536    #[serde(skip_serializing_if = "Option::is_none")]
537    pub signing_configuration: Option<SigningConfiguration>,
538    #[serde(rename = "signingImageFormat")]
539    #[serde(skip_serializing_if = "Option::is_none")]
540    pub signing_image_format: Option<SigningImageFormat>,
541    /// <p>The types of targets that can be signed by a code signing platform.</p>
542    #[serde(rename = "target")]
543    #[serde(skip_serializing_if = "Option::is_none")]
544    pub target: Option<String>,
545}
546
547/// <p>Any overrides that are applied to the signing configuration of a code signing platform.</p>
548#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
549pub struct SigningPlatformOverrides {
550    /// <p>A signing configuration that overrides the default encryption or hash algorithm of a signing job.</p>
551    #[serde(rename = "signingConfiguration")]
552    #[serde(skip_serializing_if = "Option::is_none")]
553    pub signing_configuration: Option<SigningConfigurationOverrides>,
554    /// <p>A signed image is a JSON object. When overriding the default signing platform configuration, a customer can select either of two signing formats, <code>JSONEmbedded</code> or <code>JSONDetached</code>. (A third format value, <code>JSON</code>, is reserved for future use.) With <code>JSONEmbedded</code>, the signing image has the payload embedded in it. With <code>JSONDetached</code>, the payload is not be embedded in the signing image.</p>
555    #[serde(rename = "signingImageFormat")]
556    #[serde(skip_serializing_if = "Option::is_none")]
557    pub signing_image_format: Option<String>,
558}
559
560/// <p>Contains information about the ACM certificates and code signing configuration parameters that can be used by a given code signing user.</p>
561#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
562#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
563pub struct SigningProfile {
564    /// <p>The Amazon Resource Name (ARN) for the signing profile.</p>
565    #[serde(rename = "arn")]
566    #[serde(skip_serializing_if = "Option::is_none")]
567    pub arn: Option<String>,
568    /// <p>The ID of a platform that is available for use by a signing profile.</p>
569    #[serde(rename = "platformId")]
570    #[serde(skip_serializing_if = "Option::is_none")]
571    pub platform_id: Option<String>,
572    /// <p>The name of the signing profile.</p>
573    #[serde(rename = "profileName")]
574    #[serde(skip_serializing_if = "Option::is_none")]
575    pub profile_name: Option<String>,
576    /// <p>The ACM certificate that is available for use by a signing profile.</p>
577    #[serde(rename = "signingMaterial")]
578    #[serde(skip_serializing_if = "Option::is_none")]
579    pub signing_material: Option<SigningMaterial>,
580    /// <p>The parameters that are available for use by a code signing user.</p>
581    #[serde(rename = "signingParameters")]
582    #[serde(skip_serializing_if = "Option::is_none")]
583    pub signing_parameters: Option<::std::collections::HashMap<String, String>>,
584    /// <p>The status of a code signing profile.</p>
585    #[serde(rename = "status")]
586    #[serde(skip_serializing_if = "Option::is_none")]
587    pub status: Option<String>,
588    /// <p>A list of tags associated with the signing profile.</p>
589    #[serde(rename = "tags")]
590    #[serde(skip_serializing_if = "Option::is_none")]
591    pub tags: Option<::std::collections::HashMap<String, String>>,
592}
593
594/// <p>An <code>S3Source</code> object that contains information about the S3 bucket where you saved your unsigned code.</p>
595#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
596pub struct Source {
597    /// <p>The <code>S3Source</code> object.</p>
598    #[serde(rename = "s3")]
599    #[serde(skip_serializing_if = "Option::is_none")]
600    pub s_3: Option<S3Source>,
601}
602
603#[derive(Clone, Debug, Default, PartialEq, Serialize)]
604#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
605pub struct StartSigningJobRequest {
606    /// <p>String that identifies the signing request. All calls after the first that use this token return the same response as the first call.</p>
607    #[serde(rename = "clientRequestToken")]
608    pub client_request_token: String,
609    /// <p>The S3 bucket in which to save your signed object. The destination contains the name of your bucket and an optional prefix.</p>
610    #[serde(rename = "destination")]
611    pub destination: Destination,
612    /// <p>The name of the signing profile.</p>
613    #[serde(rename = "profileName")]
614    #[serde(skip_serializing_if = "Option::is_none")]
615    pub profile_name: Option<String>,
616    /// <p>The S3 bucket that contains the object to sign or a BLOB that contains your raw code.</p>
617    #[serde(rename = "source")]
618    pub source: Source,
619}
620
621#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
622#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
623pub struct StartSigningJobResponse {
624    /// <p>The ID of your signing job.</p>
625    #[serde(rename = "jobId")]
626    #[serde(skip_serializing_if = "Option::is_none")]
627    pub job_id: Option<String>,
628}
629
630#[derive(Clone, Debug, Default, PartialEq, Serialize)]
631#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
632pub struct TagResourceRequest {
633    /// <p>The Amazon Resource Name (ARN) for the signing profile.</p>
634    #[serde(rename = "resourceArn")]
635    pub resource_arn: String,
636    /// <p>One or more tags to be associated with the signing profile.</p>
637    #[serde(rename = "tags")]
638    pub tags: ::std::collections::HashMap<String, String>,
639}
640
641#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
642#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
643pub struct TagResourceResponse {}
644
645#[derive(Clone, Debug, Default, PartialEq, Serialize)]
646#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
647pub struct UntagResourceRequest {
648    /// <p>The Amazon Resource Name (ARN) for the signing profile.</p>
649    #[serde(rename = "resourceArn")]
650    pub resource_arn: String,
651    /// <p>A list of tag keys to be removed from the signing profile.</p>
652    #[serde(rename = "tagKeys")]
653    pub tag_keys: Vec<String>,
654}
655
656#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
657#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
658pub struct UntagResourceResponse {}
659
660/// Errors returned by CancelSigningProfile
661#[derive(Debug, PartialEq)]
662pub enum CancelSigningProfileError {
663    /// <p>You do not have sufficient access to perform this action.</p>
664    AccessDenied(String),
665    /// <p>An internal error occurred.</p>
666    InternalServiceError(String),
667    /// <p>A specified resource could not be found.</p>
668    ResourceNotFound(String),
669    /// <p>The signing job has been throttled.</p>
670    Throttling(String),
671}
672
673impl CancelSigningProfileError {
674    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CancelSigningProfileError> {
675        if let Some(err) = proto::json::Error::parse_rest(&res) {
676            match err.typ.as_str() {
677                "AccessDeniedException" => {
678                    return RusotoError::Service(CancelSigningProfileError::AccessDenied(err.msg))
679                }
680                "InternalServiceErrorException" => {
681                    return RusotoError::Service(CancelSigningProfileError::InternalServiceError(
682                        err.msg,
683                    ))
684                }
685                "ResourceNotFoundException" => {
686                    return RusotoError::Service(CancelSigningProfileError::ResourceNotFound(
687                        err.msg,
688                    ))
689                }
690                "ThrottlingException" => {
691                    return RusotoError::Service(CancelSigningProfileError::Throttling(err.msg))
692                }
693                "ValidationException" => return RusotoError::Validation(err.msg),
694                _ => {}
695            }
696        }
697        RusotoError::Unknown(res)
698    }
699}
700impl fmt::Display for CancelSigningProfileError {
701    #[allow(unused_variables)]
702    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
703        match *self {
704            CancelSigningProfileError::AccessDenied(ref cause) => write!(f, "{}", cause),
705            CancelSigningProfileError::InternalServiceError(ref cause) => write!(f, "{}", cause),
706            CancelSigningProfileError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
707            CancelSigningProfileError::Throttling(ref cause) => write!(f, "{}", cause),
708        }
709    }
710}
711impl Error for CancelSigningProfileError {}
712/// Errors returned by DescribeSigningJob
713#[derive(Debug, PartialEq)]
714pub enum DescribeSigningJobError {
715    /// <p>You do not have sufficient access to perform this action.</p>
716    AccessDenied(String),
717    /// <p>An internal error occurred.</p>
718    InternalServiceError(String),
719    /// <p>A specified resource could not be found.</p>
720    ResourceNotFound(String),
721}
722
723impl DescribeSigningJobError {
724    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeSigningJobError> {
725        if let Some(err) = proto::json::Error::parse_rest(&res) {
726            match err.typ.as_str() {
727                "AccessDeniedException" => {
728                    return RusotoError::Service(DescribeSigningJobError::AccessDenied(err.msg))
729                }
730                "InternalServiceErrorException" => {
731                    return RusotoError::Service(DescribeSigningJobError::InternalServiceError(
732                        err.msg,
733                    ))
734                }
735                "ResourceNotFoundException" => {
736                    return RusotoError::Service(DescribeSigningJobError::ResourceNotFound(err.msg))
737                }
738                "ValidationException" => return RusotoError::Validation(err.msg),
739                _ => {}
740            }
741        }
742        RusotoError::Unknown(res)
743    }
744}
745impl fmt::Display for DescribeSigningJobError {
746    #[allow(unused_variables)]
747    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
748        match *self {
749            DescribeSigningJobError::AccessDenied(ref cause) => write!(f, "{}", cause),
750            DescribeSigningJobError::InternalServiceError(ref cause) => write!(f, "{}", cause),
751            DescribeSigningJobError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
752        }
753    }
754}
755impl Error for DescribeSigningJobError {}
756/// Errors returned by GetSigningPlatform
757#[derive(Debug, PartialEq)]
758pub enum GetSigningPlatformError {
759    /// <p>You do not have sufficient access to perform this action.</p>
760    AccessDenied(String),
761    /// <p>An internal error occurred.</p>
762    InternalServiceError(String),
763    /// <p>A specified resource could not be found.</p>
764    ResourceNotFound(String),
765}
766
767impl GetSigningPlatformError {
768    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSigningPlatformError> {
769        if let Some(err) = proto::json::Error::parse_rest(&res) {
770            match err.typ.as_str() {
771                "AccessDeniedException" => {
772                    return RusotoError::Service(GetSigningPlatformError::AccessDenied(err.msg))
773                }
774                "InternalServiceErrorException" => {
775                    return RusotoError::Service(GetSigningPlatformError::InternalServiceError(
776                        err.msg,
777                    ))
778                }
779                "ResourceNotFoundException" => {
780                    return RusotoError::Service(GetSigningPlatformError::ResourceNotFound(err.msg))
781                }
782                "ValidationException" => return RusotoError::Validation(err.msg),
783                _ => {}
784            }
785        }
786        RusotoError::Unknown(res)
787    }
788}
789impl fmt::Display for GetSigningPlatformError {
790    #[allow(unused_variables)]
791    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
792        match *self {
793            GetSigningPlatformError::AccessDenied(ref cause) => write!(f, "{}", cause),
794            GetSigningPlatformError::InternalServiceError(ref cause) => write!(f, "{}", cause),
795            GetSigningPlatformError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
796        }
797    }
798}
799impl Error for GetSigningPlatformError {}
800/// Errors returned by GetSigningProfile
801#[derive(Debug, PartialEq)]
802pub enum GetSigningProfileError {
803    /// <p>You do not have sufficient access to perform this action.</p>
804    AccessDenied(String),
805    /// <p>An internal error occurred.</p>
806    InternalServiceError(String),
807    /// <p>A specified resource could not be found.</p>
808    ResourceNotFound(String),
809    /// <p>The signing job has been throttled.</p>
810    Throttling(String),
811}
812
813impl GetSigningProfileError {
814    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSigningProfileError> {
815        if let Some(err) = proto::json::Error::parse_rest(&res) {
816            match err.typ.as_str() {
817                "AccessDeniedException" => {
818                    return RusotoError::Service(GetSigningProfileError::AccessDenied(err.msg))
819                }
820                "InternalServiceErrorException" => {
821                    return RusotoError::Service(GetSigningProfileError::InternalServiceError(
822                        err.msg,
823                    ))
824                }
825                "ResourceNotFoundException" => {
826                    return RusotoError::Service(GetSigningProfileError::ResourceNotFound(err.msg))
827                }
828                "ThrottlingException" => {
829                    return RusotoError::Service(GetSigningProfileError::Throttling(err.msg))
830                }
831                "ValidationException" => return RusotoError::Validation(err.msg),
832                _ => {}
833            }
834        }
835        RusotoError::Unknown(res)
836    }
837}
838impl fmt::Display for GetSigningProfileError {
839    #[allow(unused_variables)]
840    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
841        match *self {
842            GetSigningProfileError::AccessDenied(ref cause) => write!(f, "{}", cause),
843            GetSigningProfileError::InternalServiceError(ref cause) => write!(f, "{}", cause),
844            GetSigningProfileError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
845            GetSigningProfileError::Throttling(ref cause) => write!(f, "{}", cause),
846        }
847    }
848}
849impl Error for GetSigningProfileError {}
850/// Errors returned by ListSigningJobs
851#[derive(Debug, PartialEq)]
852pub enum ListSigningJobsError {
853    /// <p>You do not have sufficient access to perform this action.</p>
854    AccessDenied(String),
855    /// <p>An internal error occurred.</p>
856    InternalServiceError(String),
857    /// <p>The signing job has been throttled.</p>
858    Throttling(String),
859}
860
861impl ListSigningJobsError {
862    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListSigningJobsError> {
863        if let Some(err) = proto::json::Error::parse_rest(&res) {
864            match err.typ.as_str() {
865                "AccessDeniedException" => {
866                    return RusotoError::Service(ListSigningJobsError::AccessDenied(err.msg))
867                }
868                "InternalServiceErrorException" => {
869                    return RusotoError::Service(ListSigningJobsError::InternalServiceError(
870                        err.msg,
871                    ))
872                }
873                "ThrottlingException" => {
874                    return RusotoError::Service(ListSigningJobsError::Throttling(err.msg))
875                }
876                "ValidationException" => return RusotoError::Validation(err.msg),
877                _ => {}
878            }
879        }
880        RusotoError::Unknown(res)
881    }
882}
883impl fmt::Display for ListSigningJobsError {
884    #[allow(unused_variables)]
885    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
886        match *self {
887            ListSigningJobsError::AccessDenied(ref cause) => write!(f, "{}", cause),
888            ListSigningJobsError::InternalServiceError(ref cause) => write!(f, "{}", cause),
889            ListSigningJobsError::Throttling(ref cause) => write!(f, "{}", cause),
890        }
891    }
892}
893impl Error for ListSigningJobsError {}
894/// Errors returned by ListSigningPlatforms
895#[derive(Debug, PartialEq)]
896pub enum ListSigningPlatformsError {
897    /// <p>You do not have sufficient access to perform this action.</p>
898    AccessDenied(String),
899    /// <p>An internal error occurred.</p>
900    InternalServiceError(String),
901    /// <p>The signing job has been throttled.</p>
902    Throttling(String),
903}
904
905impl ListSigningPlatformsError {
906    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListSigningPlatformsError> {
907        if let Some(err) = proto::json::Error::parse_rest(&res) {
908            match err.typ.as_str() {
909                "AccessDeniedException" => {
910                    return RusotoError::Service(ListSigningPlatformsError::AccessDenied(err.msg))
911                }
912                "InternalServiceErrorException" => {
913                    return RusotoError::Service(ListSigningPlatformsError::InternalServiceError(
914                        err.msg,
915                    ))
916                }
917                "ThrottlingException" => {
918                    return RusotoError::Service(ListSigningPlatformsError::Throttling(err.msg))
919                }
920                "ValidationException" => return RusotoError::Validation(err.msg),
921                _ => {}
922            }
923        }
924        RusotoError::Unknown(res)
925    }
926}
927impl fmt::Display for ListSigningPlatformsError {
928    #[allow(unused_variables)]
929    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
930        match *self {
931            ListSigningPlatformsError::AccessDenied(ref cause) => write!(f, "{}", cause),
932            ListSigningPlatformsError::InternalServiceError(ref cause) => write!(f, "{}", cause),
933            ListSigningPlatformsError::Throttling(ref cause) => write!(f, "{}", cause),
934        }
935    }
936}
937impl Error for ListSigningPlatformsError {}
938/// Errors returned by ListSigningProfiles
939#[derive(Debug, PartialEq)]
940pub enum ListSigningProfilesError {
941    /// <p>You do not have sufficient access to perform this action.</p>
942    AccessDenied(String),
943    /// <p>An internal error occurred.</p>
944    InternalServiceError(String),
945    /// <p>The signing job has been throttled.</p>
946    Throttling(String),
947}
948
949impl ListSigningProfilesError {
950    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListSigningProfilesError> {
951        if let Some(err) = proto::json::Error::parse_rest(&res) {
952            match err.typ.as_str() {
953                "AccessDeniedException" => {
954                    return RusotoError::Service(ListSigningProfilesError::AccessDenied(err.msg))
955                }
956                "InternalServiceErrorException" => {
957                    return RusotoError::Service(ListSigningProfilesError::InternalServiceError(
958                        err.msg,
959                    ))
960                }
961                "ThrottlingException" => {
962                    return RusotoError::Service(ListSigningProfilesError::Throttling(err.msg))
963                }
964                "ValidationException" => return RusotoError::Validation(err.msg),
965                _ => {}
966            }
967        }
968        RusotoError::Unknown(res)
969    }
970}
971impl fmt::Display for ListSigningProfilesError {
972    #[allow(unused_variables)]
973    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
974        match *self {
975            ListSigningProfilesError::AccessDenied(ref cause) => write!(f, "{}", cause),
976            ListSigningProfilesError::InternalServiceError(ref cause) => write!(f, "{}", cause),
977            ListSigningProfilesError::Throttling(ref cause) => write!(f, "{}", cause),
978        }
979    }
980}
981impl Error for ListSigningProfilesError {}
982/// Errors returned by ListTagsForResource
983#[derive(Debug, PartialEq)]
984pub enum ListTagsForResourceError {
985    /// <p>The request contains invalid parameters for the ARN or tags. This exception also occurs when you call a tagging API on a cancelled signing profile.</p>
986    BadRequest(String),
987    /// <p>An internal error occurred.</p>
988    InternalServiceError(String),
989    /// <p>The signing profile was not found.</p>
990    NotFound(String),
991}
992
993impl ListTagsForResourceError {
994    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
995        if let Some(err) = proto::json::Error::parse_rest(&res) {
996            match err.typ.as_str() {
997                "BadRequestException" => {
998                    return RusotoError::Service(ListTagsForResourceError::BadRequest(err.msg))
999                }
1000                "InternalServiceErrorException" => {
1001                    return RusotoError::Service(ListTagsForResourceError::InternalServiceError(
1002                        err.msg,
1003                    ))
1004                }
1005                "NotFoundException" => {
1006                    return RusotoError::Service(ListTagsForResourceError::NotFound(err.msg))
1007                }
1008                "ValidationException" => return RusotoError::Validation(err.msg),
1009                _ => {}
1010            }
1011        }
1012        RusotoError::Unknown(res)
1013    }
1014}
1015impl fmt::Display for ListTagsForResourceError {
1016    #[allow(unused_variables)]
1017    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1018        match *self {
1019            ListTagsForResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
1020            ListTagsForResourceError::InternalServiceError(ref cause) => write!(f, "{}", cause),
1021            ListTagsForResourceError::NotFound(ref cause) => write!(f, "{}", cause),
1022        }
1023    }
1024}
1025impl Error for ListTagsForResourceError {}
1026/// Errors returned by PutSigningProfile
1027#[derive(Debug, PartialEq)]
1028pub enum PutSigningProfileError {
1029    /// <p>You do not have sufficient access to perform this action.</p>
1030    AccessDenied(String),
1031    /// <p>An internal error occurred.</p>
1032    InternalServiceError(String),
1033    /// <p>A specified resource could not be found.</p>
1034    ResourceNotFound(String),
1035    /// <p>The signing job has been throttled.</p>
1036    Throttling(String),
1037}
1038
1039impl PutSigningProfileError {
1040    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutSigningProfileError> {
1041        if let Some(err) = proto::json::Error::parse_rest(&res) {
1042            match err.typ.as_str() {
1043                "AccessDeniedException" => {
1044                    return RusotoError::Service(PutSigningProfileError::AccessDenied(err.msg))
1045                }
1046                "InternalServiceErrorException" => {
1047                    return RusotoError::Service(PutSigningProfileError::InternalServiceError(
1048                        err.msg,
1049                    ))
1050                }
1051                "ResourceNotFoundException" => {
1052                    return RusotoError::Service(PutSigningProfileError::ResourceNotFound(err.msg))
1053                }
1054                "ThrottlingException" => {
1055                    return RusotoError::Service(PutSigningProfileError::Throttling(err.msg))
1056                }
1057                "ValidationException" => return RusotoError::Validation(err.msg),
1058                _ => {}
1059            }
1060        }
1061        RusotoError::Unknown(res)
1062    }
1063}
1064impl fmt::Display for PutSigningProfileError {
1065    #[allow(unused_variables)]
1066    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1067        match *self {
1068            PutSigningProfileError::AccessDenied(ref cause) => write!(f, "{}", cause),
1069            PutSigningProfileError::InternalServiceError(ref cause) => write!(f, "{}", cause),
1070            PutSigningProfileError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1071            PutSigningProfileError::Throttling(ref cause) => write!(f, "{}", cause),
1072        }
1073    }
1074}
1075impl Error for PutSigningProfileError {}
1076/// Errors returned by StartSigningJob
1077#[derive(Debug, PartialEq)]
1078pub enum StartSigningJobError {
1079    /// <p>You do not have sufficient access to perform this action.</p>
1080    AccessDenied(String),
1081    /// <p>An internal error occurred.</p>
1082    InternalServiceError(String),
1083    /// <p>A specified resource could not be found.</p>
1084    ResourceNotFound(String),
1085    /// <p>The signing job has been throttled.</p>
1086    Throttling(String),
1087}
1088
1089impl StartSigningJobError {
1090    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartSigningJobError> {
1091        if let Some(err) = proto::json::Error::parse_rest(&res) {
1092            match err.typ.as_str() {
1093                "AccessDeniedException" => {
1094                    return RusotoError::Service(StartSigningJobError::AccessDenied(err.msg))
1095                }
1096                "InternalServiceErrorException" => {
1097                    return RusotoError::Service(StartSigningJobError::InternalServiceError(
1098                        err.msg,
1099                    ))
1100                }
1101                "ResourceNotFoundException" => {
1102                    return RusotoError::Service(StartSigningJobError::ResourceNotFound(err.msg))
1103                }
1104                "ThrottlingException" => {
1105                    return RusotoError::Service(StartSigningJobError::Throttling(err.msg))
1106                }
1107                "ValidationException" => return RusotoError::Validation(err.msg),
1108                _ => {}
1109            }
1110        }
1111        RusotoError::Unknown(res)
1112    }
1113}
1114impl fmt::Display for StartSigningJobError {
1115    #[allow(unused_variables)]
1116    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1117        match *self {
1118            StartSigningJobError::AccessDenied(ref cause) => write!(f, "{}", cause),
1119            StartSigningJobError::InternalServiceError(ref cause) => write!(f, "{}", cause),
1120            StartSigningJobError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1121            StartSigningJobError::Throttling(ref cause) => write!(f, "{}", cause),
1122        }
1123    }
1124}
1125impl Error for StartSigningJobError {}
1126/// Errors returned by TagResource
1127#[derive(Debug, PartialEq)]
1128pub enum TagResourceError {
1129    /// <p>The request contains invalid parameters for the ARN or tags. This exception also occurs when you call a tagging API on a cancelled signing profile.</p>
1130    BadRequest(String),
1131    /// <p>An internal error occurred.</p>
1132    InternalServiceError(String),
1133    /// <p>The signing profile was not found.</p>
1134    NotFound(String),
1135}
1136
1137impl TagResourceError {
1138    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
1139        if let Some(err) = proto::json::Error::parse_rest(&res) {
1140            match err.typ.as_str() {
1141                "BadRequestException" => {
1142                    return RusotoError::Service(TagResourceError::BadRequest(err.msg))
1143                }
1144                "InternalServiceErrorException" => {
1145                    return RusotoError::Service(TagResourceError::InternalServiceError(err.msg))
1146                }
1147                "NotFoundException" => {
1148                    return RusotoError::Service(TagResourceError::NotFound(err.msg))
1149                }
1150                "ValidationException" => return RusotoError::Validation(err.msg),
1151                _ => {}
1152            }
1153        }
1154        RusotoError::Unknown(res)
1155    }
1156}
1157impl fmt::Display for TagResourceError {
1158    #[allow(unused_variables)]
1159    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1160        match *self {
1161            TagResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
1162            TagResourceError::InternalServiceError(ref cause) => write!(f, "{}", cause),
1163            TagResourceError::NotFound(ref cause) => write!(f, "{}", cause),
1164        }
1165    }
1166}
1167impl Error for TagResourceError {}
1168/// Errors returned by UntagResource
1169#[derive(Debug, PartialEq)]
1170pub enum UntagResourceError {
1171    /// <p>The request contains invalid parameters for the ARN or tags. This exception also occurs when you call a tagging API on a cancelled signing profile.</p>
1172    BadRequest(String),
1173    /// <p>An internal error occurred.</p>
1174    InternalServiceError(String),
1175    /// <p>The signing profile was not found.</p>
1176    NotFound(String),
1177}
1178
1179impl UntagResourceError {
1180    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
1181        if let Some(err) = proto::json::Error::parse_rest(&res) {
1182            match err.typ.as_str() {
1183                "BadRequestException" => {
1184                    return RusotoError::Service(UntagResourceError::BadRequest(err.msg))
1185                }
1186                "InternalServiceErrorException" => {
1187                    return RusotoError::Service(UntagResourceError::InternalServiceError(err.msg))
1188                }
1189                "NotFoundException" => {
1190                    return RusotoError::Service(UntagResourceError::NotFound(err.msg))
1191                }
1192                "ValidationException" => return RusotoError::Validation(err.msg),
1193                _ => {}
1194            }
1195        }
1196        RusotoError::Unknown(res)
1197    }
1198}
1199impl fmt::Display for UntagResourceError {
1200    #[allow(unused_variables)]
1201    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1202        match *self {
1203            UntagResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
1204            UntagResourceError::InternalServiceError(ref cause) => write!(f, "{}", cause),
1205            UntagResourceError::NotFound(ref cause) => write!(f, "{}", cause),
1206        }
1207    }
1208}
1209impl Error for UntagResourceError {}
1210/// Trait representing the capabilities of the signer API. signer clients implement this trait.
1211#[async_trait]
1212pub trait Signer {
1213    /// <p>Changes the state of an <code>ACTIVE</code> signing profile to <code>CANCELED</code>. A canceled profile is still viewable with the <code>ListSigningProfiles</code> operation, but it cannot perform new signing jobs, and is deleted two years after cancelation.</p>
1214    async fn cancel_signing_profile(
1215        &self,
1216        input: CancelSigningProfileRequest,
1217    ) -> Result<(), RusotoError<CancelSigningProfileError>>;
1218
1219    /// <p>Returns information about a specific code signing job. You specify the job by using the <code>jobId</code> value that is returned by the <a>StartSigningJob</a> operation. </p>
1220    async fn describe_signing_job(
1221        &self,
1222        input: DescribeSigningJobRequest,
1223    ) -> Result<DescribeSigningJobResponse, RusotoError<DescribeSigningJobError>>;
1224
1225    /// <p>Returns information on a specific signing platform.</p>
1226    async fn get_signing_platform(
1227        &self,
1228        input: GetSigningPlatformRequest,
1229    ) -> Result<GetSigningPlatformResponse, RusotoError<GetSigningPlatformError>>;
1230
1231    /// <p>Returns information on a specific signing profile.</p>
1232    async fn get_signing_profile(
1233        &self,
1234        input: GetSigningProfileRequest,
1235    ) -> Result<GetSigningProfileResponse, RusotoError<GetSigningProfileError>>;
1236
1237    /// <p>Lists all your signing jobs. You can use the <code>maxResults</code> parameter to limit the number of signing jobs that are returned in the response. If additional jobs remain to be listed, code signing returns a <code>nextToken</code> value. Use this value in subsequent calls to <code>ListSigningJobs</code> to fetch the remaining values. You can continue calling <code>ListSigningJobs</code> with your <code>maxResults</code> parameter and with new values that code signing returns in the <code>nextToken</code> parameter until all of your signing jobs have been returned. </p>
1238    async fn list_signing_jobs(
1239        &self,
1240        input: ListSigningJobsRequest,
1241    ) -> Result<ListSigningJobsResponse, RusotoError<ListSigningJobsError>>;
1242
1243    /// <p>Lists all signing platforms available in code signing that match the request parameters. If additional jobs remain to be listed, code signing returns a <code>nextToken</code> value. Use this value in subsequent calls to <code>ListSigningJobs</code> to fetch the remaining values. You can continue calling <code>ListSigningJobs</code> with your <code>maxResults</code> parameter and with new values that code signing returns in the <code>nextToken</code> parameter until all of your signing jobs have been returned.</p>
1244    async fn list_signing_platforms(
1245        &self,
1246        input: ListSigningPlatformsRequest,
1247    ) -> Result<ListSigningPlatformsResponse, RusotoError<ListSigningPlatformsError>>;
1248
1249    /// <p>Lists all available signing profiles in your AWS account. Returns only profiles with an <code>ACTIVE</code> status unless the <code>includeCanceled</code> request field is set to <code>true</code>. If additional jobs remain to be listed, code signing returns a <code>nextToken</code> value. Use this value in subsequent calls to <code>ListSigningJobs</code> to fetch the remaining values. You can continue calling <code>ListSigningJobs</code> with your <code>maxResults</code> parameter and with new values that code signing returns in the <code>nextToken</code> parameter until all of your signing jobs have been returned.</p>
1250    async fn list_signing_profiles(
1251        &self,
1252        input: ListSigningProfilesRequest,
1253    ) -> Result<ListSigningProfilesResponse, RusotoError<ListSigningProfilesError>>;
1254
1255    /// <p>Returns a list of the tags associated with a signing profile resource.</p>
1256    async fn list_tags_for_resource(
1257        &self,
1258        input: ListTagsForResourceRequest,
1259    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>>;
1260
1261    /// <p>Creates a signing profile. A signing profile is a code signing template that can be used to carry out a pre-defined signing job. For more information, see <a href="http://docs.aws.amazon.com/signer/latest/developerguide/gs-profile.html">http://docs.aws.amazon.com/signer/latest/developerguide/gs-profile.html</a> </p>
1262    async fn put_signing_profile(
1263        &self,
1264        input: PutSigningProfileRequest,
1265    ) -> Result<PutSigningProfileResponse, RusotoError<PutSigningProfileError>>;
1266
1267    /// <p>Initiates a signing job to be performed on the code provided. Signing jobs are viewable by the <code>ListSigningJobs</code> operation for two years after they are performed. Note the following requirements: </p> <ul> <li> <p> You must create an Amazon S3 source bucket. For more information, see <a href="http://docs.aws.amazon.com/AmazonS3/latest/gsg/CreatingABucket.html">Create a Bucket</a> in the <i>Amazon S3 Getting Started Guide</i>. </p> </li> <li> <p>Your S3 source bucket must be version enabled.</p> </li> <li> <p>You must create an S3 destination bucket. Code signing uses your S3 destination bucket to write your signed code.</p> </li> <li> <p>You specify the name of the source and destination buckets when calling the <code>StartSigningJob</code> operation.</p> </li> <li> <p>You must also specify a request token that identifies your request to code signing.</p> </li> </ul> <p>You can call the <a>DescribeSigningJob</a> and the <a>ListSigningJobs</a> actions after you call <code>StartSigningJob</code>.</p> <p>For a Java example that shows how to use this action, see <a href="http://docs.aws.amazon.com/acm/latest/userguide/">http://docs.aws.amazon.com/acm/latest/userguide/</a> </p>
1268    async fn start_signing_job(
1269        &self,
1270        input: StartSigningJobRequest,
1271    ) -> Result<StartSigningJobResponse, RusotoError<StartSigningJobError>>;
1272
1273    /// <p>Adds one or more tags to a signing profile. Tags are labels that you can use to identify and organize your AWS resources. Each tag consists of a key and an optional value. To specify the signing profile, use its Amazon Resource Name (ARN). To specify the tag, use a key-value pair.</p>
1274    async fn tag_resource(
1275        &self,
1276        input: TagResourceRequest,
1277    ) -> Result<TagResourceResponse, RusotoError<TagResourceError>>;
1278
1279    /// <p>Removes one or more tags from a signing profile. To remove the tags, specify a list of tag keys.</p>
1280    async fn untag_resource(
1281        &self,
1282        input: UntagResourceRequest,
1283    ) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>>;
1284}
1285/// A client for the signer API.
1286#[derive(Clone)]
1287pub struct SignerClient {
1288    client: Client,
1289    region: region::Region,
1290}
1291
1292impl SignerClient {
1293    /// Creates a client backed by the default tokio event loop.
1294    ///
1295    /// The client will use the default credentials provider and tls client.
1296    pub fn new(region: region::Region) -> SignerClient {
1297        SignerClient {
1298            client: Client::shared(),
1299            region,
1300        }
1301    }
1302
1303    pub fn new_with<P, D>(
1304        request_dispatcher: D,
1305        credentials_provider: P,
1306        region: region::Region,
1307    ) -> SignerClient
1308    where
1309        P: ProvideAwsCredentials + Send + Sync + 'static,
1310        D: DispatchSignedRequest + Send + Sync + 'static,
1311    {
1312        SignerClient {
1313            client: Client::new_with(credentials_provider, request_dispatcher),
1314            region,
1315        }
1316    }
1317
1318    pub fn new_with_client(client: Client, region: region::Region) -> SignerClient {
1319        SignerClient { client, region }
1320    }
1321}
1322
1323#[async_trait]
1324impl Signer for SignerClient {
1325    /// <p>Changes the state of an <code>ACTIVE</code> signing profile to <code>CANCELED</code>. A canceled profile is still viewable with the <code>ListSigningProfiles</code> operation, but it cannot perform new signing jobs, and is deleted two years after cancelation.</p>
1326    #[allow(unused_mut)]
1327    async fn cancel_signing_profile(
1328        &self,
1329        input: CancelSigningProfileRequest,
1330    ) -> Result<(), RusotoError<CancelSigningProfileError>> {
1331        let request_uri = format!(
1332            "/signing-profiles/{profile_name}",
1333            profile_name = input.profile_name
1334        );
1335
1336        let mut request = SignedRequest::new("DELETE", "signer", &self.region, &request_uri);
1337        request.set_content_type("application/x-amz-json-1.1".to_owned());
1338
1339        let mut response = self
1340            .client
1341            .sign_and_dispatch(request)
1342            .await
1343            .map_err(RusotoError::from)?;
1344        if response.status.is_success() {
1345            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1346            let result = ::std::mem::drop(response);
1347
1348            Ok(result)
1349        } else {
1350            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1351            Err(CancelSigningProfileError::from_response(response))
1352        }
1353    }
1354
1355    /// <p>Returns information about a specific code signing job. You specify the job by using the <code>jobId</code> value that is returned by the <a>StartSigningJob</a> operation. </p>
1356    #[allow(unused_mut)]
1357    async fn describe_signing_job(
1358        &self,
1359        input: DescribeSigningJobRequest,
1360    ) -> Result<DescribeSigningJobResponse, RusotoError<DescribeSigningJobError>> {
1361        let request_uri = format!("/signing-jobs/{job_id}", job_id = input.job_id);
1362
1363        let mut request = SignedRequest::new("GET", "signer", &self.region, &request_uri);
1364        request.set_content_type("application/x-amz-json-1.1".to_owned());
1365
1366        let mut response = self
1367            .client
1368            .sign_and_dispatch(request)
1369            .await
1370            .map_err(RusotoError::from)?;
1371        if response.status.is_success() {
1372            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1373            let result = proto::json::ResponsePayload::new(&response)
1374                .deserialize::<DescribeSigningJobResponse, _>()?;
1375
1376            Ok(result)
1377        } else {
1378            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1379            Err(DescribeSigningJobError::from_response(response))
1380        }
1381    }
1382
1383    /// <p>Returns information on a specific signing platform.</p>
1384    #[allow(unused_mut)]
1385    async fn get_signing_platform(
1386        &self,
1387        input: GetSigningPlatformRequest,
1388    ) -> Result<GetSigningPlatformResponse, RusotoError<GetSigningPlatformError>> {
1389        let request_uri = format!(
1390            "/signing-platforms/{platform_id}",
1391            platform_id = input.platform_id
1392        );
1393
1394        let mut request = SignedRequest::new("GET", "signer", &self.region, &request_uri);
1395        request.set_content_type("application/x-amz-json-1.1".to_owned());
1396
1397        let mut response = self
1398            .client
1399            .sign_and_dispatch(request)
1400            .await
1401            .map_err(RusotoError::from)?;
1402        if response.status.is_success() {
1403            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1404            let result = proto::json::ResponsePayload::new(&response)
1405                .deserialize::<GetSigningPlatformResponse, _>()?;
1406
1407            Ok(result)
1408        } else {
1409            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1410            Err(GetSigningPlatformError::from_response(response))
1411        }
1412    }
1413
1414    /// <p>Returns information on a specific signing profile.</p>
1415    #[allow(unused_mut)]
1416    async fn get_signing_profile(
1417        &self,
1418        input: GetSigningProfileRequest,
1419    ) -> Result<GetSigningProfileResponse, RusotoError<GetSigningProfileError>> {
1420        let request_uri = format!(
1421            "/signing-profiles/{profile_name}",
1422            profile_name = input.profile_name
1423        );
1424
1425        let mut request = SignedRequest::new("GET", "signer", &self.region, &request_uri);
1426        request.set_content_type("application/x-amz-json-1.1".to_owned());
1427
1428        let mut response = self
1429            .client
1430            .sign_and_dispatch(request)
1431            .await
1432            .map_err(RusotoError::from)?;
1433        if response.status.is_success() {
1434            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1435            let result = proto::json::ResponsePayload::new(&response)
1436                .deserialize::<GetSigningProfileResponse, _>()?;
1437
1438            Ok(result)
1439        } else {
1440            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1441            Err(GetSigningProfileError::from_response(response))
1442        }
1443    }
1444
1445    /// <p>Lists all your signing jobs. You can use the <code>maxResults</code> parameter to limit the number of signing jobs that are returned in the response. If additional jobs remain to be listed, code signing returns a <code>nextToken</code> value. Use this value in subsequent calls to <code>ListSigningJobs</code> to fetch the remaining values. You can continue calling <code>ListSigningJobs</code> with your <code>maxResults</code> parameter and with new values that code signing returns in the <code>nextToken</code> parameter until all of your signing jobs have been returned. </p>
1446    #[allow(unused_mut)]
1447    async fn list_signing_jobs(
1448        &self,
1449        input: ListSigningJobsRequest,
1450    ) -> Result<ListSigningJobsResponse, RusotoError<ListSigningJobsError>> {
1451        let request_uri = "/signing-jobs";
1452
1453        let mut request = SignedRequest::new("GET", "signer", &self.region, &request_uri);
1454        request.set_content_type("application/x-amz-json-1.1".to_owned());
1455
1456        let mut params = Params::new();
1457        if let Some(ref x) = input.max_results {
1458            params.put("maxResults", x);
1459        }
1460        if let Some(ref x) = input.next_token {
1461            params.put("nextToken", x);
1462        }
1463        if let Some(ref x) = input.platform_id {
1464            params.put("platformId", x);
1465        }
1466        if let Some(ref x) = input.requested_by {
1467            params.put("requestedBy", x);
1468        }
1469        if let Some(ref x) = input.status {
1470            params.put("status", x);
1471        }
1472        request.set_params(params);
1473
1474        let mut response = self
1475            .client
1476            .sign_and_dispatch(request)
1477            .await
1478            .map_err(RusotoError::from)?;
1479        if response.status.is_success() {
1480            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1481            let result = proto::json::ResponsePayload::new(&response)
1482                .deserialize::<ListSigningJobsResponse, _>()?;
1483
1484            Ok(result)
1485        } else {
1486            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1487            Err(ListSigningJobsError::from_response(response))
1488        }
1489    }
1490
1491    /// <p>Lists all signing platforms available in code signing that match the request parameters. If additional jobs remain to be listed, code signing returns a <code>nextToken</code> value. Use this value in subsequent calls to <code>ListSigningJobs</code> to fetch the remaining values. You can continue calling <code>ListSigningJobs</code> with your <code>maxResults</code> parameter and with new values that code signing returns in the <code>nextToken</code> parameter until all of your signing jobs have been returned.</p>
1492    #[allow(unused_mut)]
1493    async fn list_signing_platforms(
1494        &self,
1495        input: ListSigningPlatformsRequest,
1496    ) -> Result<ListSigningPlatformsResponse, RusotoError<ListSigningPlatformsError>> {
1497        let request_uri = "/signing-platforms";
1498
1499        let mut request = SignedRequest::new("GET", "signer", &self.region, &request_uri);
1500        request.set_content_type("application/x-amz-json-1.1".to_owned());
1501
1502        let mut params = Params::new();
1503        if let Some(ref x) = input.category {
1504            params.put("category", x);
1505        }
1506        if let Some(ref x) = input.max_results {
1507            params.put("maxResults", x);
1508        }
1509        if let Some(ref x) = input.next_token {
1510            params.put("nextToken", x);
1511        }
1512        if let Some(ref x) = input.partner {
1513            params.put("partner", x);
1514        }
1515        if let Some(ref x) = input.target {
1516            params.put("target", x);
1517        }
1518        request.set_params(params);
1519
1520        let mut response = self
1521            .client
1522            .sign_and_dispatch(request)
1523            .await
1524            .map_err(RusotoError::from)?;
1525        if response.status.is_success() {
1526            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1527            let result = proto::json::ResponsePayload::new(&response)
1528                .deserialize::<ListSigningPlatformsResponse, _>()?;
1529
1530            Ok(result)
1531        } else {
1532            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1533            Err(ListSigningPlatformsError::from_response(response))
1534        }
1535    }
1536
1537    /// <p>Lists all available signing profiles in your AWS account. Returns only profiles with an <code>ACTIVE</code> status unless the <code>includeCanceled</code> request field is set to <code>true</code>. If additional jobs remain to be listed, code signing returns a <code>nextToken</code> value. Use this value in subsequent calls to <code>ListSigningJobs</code> to fetch the remaining values. You can continue calling <code>ListSigningJobs</code> with your <code>maxResults</code> parameter and with new values that code signing returns in the <code>nextToken</code> parameter until all of your signing jobs have been returned.</p>
1538    #[allow(unused_mut)]
1539    async fn list_signing_profiles(
1540        &self,
1541        input: ListSigningProfilesRequest,
1542    ) -> Result<ListSigningProfilesResponse, RusotoError<ListSigningProfilesError>> {
1543        let request_uri = "/signing-profiles";
1544
1545        let mut request = SignedRequest::new("GET", "signer", &self.region, &request_uri);
1546        request.set_content_type("application/x-amz-json-1.1".to_owned());
1547
1548        let mut params = Params::new();
1549        if let Some(ref x) = input.include_canceled {
1550            params.put("includeCanceled", x);
1551        }
1552        if let Some(ref x) = input.max_results {
1553            params.put("maxResults", x);
1554        }
1555        if let Some(ref x) = input.next_token {
1556            params.put("nextToken", x);
1557        }
1558        request.set_params(params);
1559
1560        let mut response = self
1561            .client
1562            .sign_and_dispatch(request)
1563            .await
1564            .map_err(RusotoError::from)?;
1565        if response.status.is_success() {
1566            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1567            let result = proto::json::ResponsePayload::new(&response)
1568                .deserialize::<ListSigningProfilesResponse, _>()?;
1569
1570            Ok(result)
1571        } else {
1572            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1573            Err(ListSigningProfilesError::from_response(response))
1574        }
1575    }
1576
1577    /// <p>Returns a list of the tags associated with a signing profile resource.</p>
1578    #[allow(unused_mut)]
1579    async fn list_tags_for_resource(
1580        &self,
1581        input: ListTagsForResourceRequest,
1582    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>> {
1583        let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
1584
1585        let mut request = SignedRequest::new("GET", "signer", &self.region, &request_uri);
1586        request.set_content_type("application/x-amz-json-1.1".to_owned());
1587
1588        let mut response = self
1589            .client
1590            .sign_and_dispatch(request)
1591            .await
1592            .map_err(RusotoError::from)?;
1593        if response.status.is_success() {
1594            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1595            let result = proto::json::ResponsePayload::new(&response)
1596                .deserialize::<ListTagsForResourceResponse, _>()?;
1597
1598            Ok(result)
1599        } else {
1600            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1601            Err(ListTagsForResourceError::from_response(response))
1602        }
1603    }
1604
1605    /// <p>Creates a signing profile. A signing profile is a code signing template that can be used to carry out a pre-defined signing job. For more information, see <a href="http://docs.aws.amazon.com/signer/latest/developerguide/gs-profile.html">http://docs.aws.amazon.com/signer/latest/developerguide/gs-profile.html</a> </p>
1606    #[allow(unused_mut)]
1607    async fn put_signing_profile(
1608        &self,
1609        input: PutSigningProfileRequest,
1610    ) -> Result<PutSigningProfileResponse, RusotoError<PutSigningProfileError>> {
1611        let request_uri = format!(
1612            "/signing-profiles/{profile_name}",
1613            profile_name = input.profile_name
1614        );
1615
1616        let mut request = SignedRequest::new("PUT", "signer", &self.region, &request_uri);
1617        request.set_content_type("application/x-amz-json-1.1".to_owned());
1618
1619        let encoded = Some(serde_json::to_vec(&input).unwrap());
1620        request.set_payload(encoded);
1621
1622        let mut response = self
1623            .client
1624            .sign_and_dispatch(request)
1625            .await
1626            .map_err(RusotoError::from)?;
1627        if response.status.is_success() {
1628            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1629            let result = proto::json::ResponsePayload::new(&response)
1630                .deserialize::<PutSigningProfileResponse, _>()?;
1631
1632            Ok(result)
1633        } else {
1634            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1635            Err(PutSigningProfileError::from_response(response))
1636        }
1637    }
1638
1639    /// <p>Initiates a signing job to be performed on the code provided. Signing jobs are viewable by the <code>ListSigningJobs</code> operation for two years after they are performed. Note the following requirements: </p> <ul> <li> <p> You must create an Amazon S3 source bucket. For more information, see <a href="http://docs.aws.amazon.com/AmazonS3/latest/gsg/CreatingABucket.html">Create a Bucket</a> in the <i>Amazon S3 Getting Started Guide</i>. </p> </li> <li> <p>Your S3 source bucket must be version enabled.</p> </li> <li> <p>You must create an S3 destination bucket. Code signing uses your S3 destination bucket to write your signed code.</p> </li> <li> <p>You specify the name of the source and destination buckets when calling the <code>StartSigningJob</code> operation.</p> </li> <li> <p>You must also specify a request token that identifies your request to code signing.</p> </li> </ul> <p>You can call the <a>DescribeSigningJob</a> and the <a>ListSigningJobs</a> actions after you call <code>StartSigningJob</code>.</p> <p>For a Java example that shows how to use this action, see <a href="http://docs.aws.amazon.com/acm/latest/userguide/">http://docs.aws.amazon.com/acm/latest/userguide/</a> </p>
1640    #[allow(unused_mut)]
1641    async fn start_signing_job(
1642        &self,
1643        input: StartSigningJobRequest,
1644    ) -> Result<StartSigningJobResponse, RusotoError<StartSigningJobError>> {
1645        let request_uri = "/signing-jobs";
1646
1647        let mut request = SignedRequest::new("POST", "signer", &self.region, &request_uri);
1648        request.set_content_type("application/x-amz-json-1.1".to_owned());
1649
1650        let encoded = Some(serde_json::to_vec(&input).unwrap());
1651        request.set_payload(encoded);
1652
1653        let mut response = self
1654            .client
1655            .sign_and_dispatch(request)
1656            .await
1657            .map_err(RusotoError::from)?;
1658        if response.status.is_success() {
1659            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1660            let result = proto::json::ResponsePayload::new(&response)
1661                .deserialize::<StartSigningJobResponse, _>()?;
1662
1663            Ok(result)
1664        } else {
1665            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1666            Err(StartSigningJobError::from_response(response))
1667        }
1668    }
1669
1670    /// <p>Adds one or more tags to a signing profile. Tags are labels that you can use to identify and organize your AWS resources. Each tag consists of a key and an optional value. To specify the signing profile, use its Amazon Resource Name (ARN). To specify the tag, use a key-value pair.</p>
1671    #[allow(unused_mut)]
1672    async fn tag_resource(
1673        &self,
1674        input: TagResourceRequest,
1675    ) -> Result<TagResourceResponse, RusotoError<TagResourceError>> {
1676        let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
1677
1678        let mut request = SignedRequest::new("POST", "signer", &self.region, &request_uri);
1679        request.set_content_type("application/x-amz-json-1.1".to_owned());
1680
1681        let encoded = Some(serde_json::to_vec(&input).unwrap());
1682        request.set_payload(encoded);
1683
1684        let mut response = self
1685            .client
1686            .sign_and_dispatch(request)
1687            .await
1688            .map_err(RusotoError::from)?;
1689        if response.status.is_success() {
1690            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1691            let result = proto::json::ResponsePayload::new(&response)
1692                .deserialize::<TagResourceResponse, _>()?;
1693
1694            Ok(result)
1695        } else {
1696            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1697            Err(TagResourceError::from_response(response))
1698        }
1699    }
1700
1701    /// <p>Removes one or more tags from a signing profile. To remove the tags, specify a list of tag keys.</p>
1702    #[allow(unused_mut)]
1703    async fn untag_resource(
1704        &self,
1705        input: UntagResourceRequest,
1706    ) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>> {
1707        let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
1708
1709        let mut request = SignedRequest::new("DELETE", "signer", &self.region, &request_uri);
1710        request.set_content_type("application/x-amz-json-1.1".to_owned());
1711
1712        let mut params = Params::new();
1713        for item in input.tag_keys.iter() {
1714            params.put("tagKeys", item);
1715        }
1716        request.set_params(params);
1717
1718        let mut response = self
1719            .client
1720            .sign_and_dispatch(request)
1721            .await
1722            .map_err(RusotoError::from)?;
1723        if response.status.is_success() {
1724            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1725            let result = proto::json::ResponsePayload::new(&response)
1726                .deserialize::<UntagResourceResponse, _>()?;
1727
1728            Ok(result)
1729        } else {
1730            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1731            Err(UntagResourceError::from_response(response))
1732        }
1733    }
1734}