rusoto_license_manager/
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::proto;
23use rusoto_core::request::HttpResponse;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27
28impl LicenseManagerClient {
29    fn new_signed_request(&self, http_method: &str, request_uri: &str) -> SignedRequest {
30        let mut request =
31            SignedRequest::new(http_method, "license-manager", &self.region, request_uri);
32
33        request.set_content_type("application/x-amz-json-1.1".to_owned());
34
35        request
36    }
37
38    async fn sign_and_dispatch<E>(
39        &self,
40        request: SignedRequest,
41        from_response: fn(BufferedHttpResponse) -> RusotoError<E>,
42    ) -> Result<HttpResponse, RusotoError<E>> {
43        let mut response = self.client.sign_and_dispatch(request).await?;
44        if !response.status.is_success() {
45            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
46            return Err(from_response(response));
47        }
48
49        Ok(response)
50    }
51}
52
53use serde_json;
54/// <p>Describes automated discovery.</p>
55#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
56#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
57pub struct AutomatedDiscoveryInformation {
58    /// <p>Time that automated discovery last ran.</p>
59    #[serde(rename = "LastRunTime")]
60    #[serde(skip_serializing_if = "Option::is_none")]
61    pub last_run_time: Option<f64>,
62}
63
64/// <p>Details about license consumption.</p>
65#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
66#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
67pub struct ConsumedLicenseSummary {
68    /// <p>Number of licenses consumed by the resource.</p>
69    #[serde(rename = "ConsumedLicenses")]
70    #[serde(skip_serializing_if = "Option::is_none")]
71    pub consumed_licenses: Option<i64>,
72    /// <p>Resource type of the resource consuming a license.</p>
73    #[serde(rename = "ResourceType")]
74    #[serde(skip_serializing_if = "Option::is_none")]
75    pub resource_type: Option<String>,
76}
77
78#[derive(Clone, Debug, Default, PartialEq, Serialize)]
79#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
80pub struct CreateLicenseConfigurationRequest {
81    /// <p>Description of the license configuration.</p>
82    #[serde(rename = "Description")]
83    #[serde(skip_serializing_if = "Option::is_none")]
84    pub description: Option<String>,
85    /// <p>Number of licenses managed by the license configuration.</p>
86    #[serde(rename = "LicenseCount")]
87    #[serde(skip_serializing_if = "Option::is_none")]
88    pub license_count: Option<i64>,
89    /// <p>Indicates whether hard or soft license enforcement is used. Exceeding a hard limit blocks the launch of new instances.</p>
90    #[serde(rename = "LicenseCountHardLimit")]
91    #[serde(skip_serializing_if = "Option::is_none")]
92    pub license_count_hard_limit: Option<bool>,
93    /// <p>Dimension used to track the license inventory.</p>
94    #[serde(rename = "LicenseCountingType")]
95    pub license_counting_type: String,
96    /// <p><p>License rules. The syntax is #name=value (for example, #allowedTenancy=EC2-DedicatedHost). Available rules vary by dimension.</p> <ul> <li> <p> <code>Cores</code> dimension: <code>allowedTenancy</code> | <code>maximumCores</code> | <code>minimumCores</code> </p> </li> <li> <p> <code>Instances</code> dimension: <code>allowedTenancy</code> | <code>maximumCores</code> | <code>minimumCores</code> | <code>maximumSockets</code> | <code>minimumSockets</code> | <code>maximumVcpus</code> | <code>minimumVcpus</code> </p> </li> <li> <p> <code>Sockets</code> dimension: <code>allowedTenancy</code> | <code>maximumSockets</code> | <code>minimumSockets</code> </p> </li> <li> <p> <code>vCPUs</code> dimension: <code>allowedTenancy</code> | <code>honorVcpuOptimization</code> | <code>maximumVcpus</code> | <code>minimumVcpus</code> </p> </li> </ul></p>
97    #[serde(rename = "LicenseRules")]
98    #[serde(skip_serializing_if = "Option::is_none")]
99    pub license_rules: Option<Vec<String>>,
100    /// <p>Name of the license configuration.</p>
101    #[serde(rename = "Name")]
102    pub name: String,
103    /// <p>Product information.</p>
104    #[serde(rename = "ProductInformationList")]
105    #[serde(skip_serializing_if = "Option::is_none")]
106    pub product_information_list: Option<Vec<ProductInformation>>,
107    /// <p>Tags to add to the license configuration.</p>
108    #[serde(rename = "Tags")]
109    #[serde(skip_serializing_if = "Option::is_none")]
110    pub tags: Option<Vec<Tag>>,
111}
112
113#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
114#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
115pub struct CreateLicenseConfigurationResponse {
116    /// <p>Amazon Resource Name (ARN) of the license configuration.</p>
117    #[serde(rename = "LicenseConfigurationArn")]
118    #[serde(skip_serializing_if = "Option::is_none")]
119    pub license_configuration_arn: Option<String>,
120}
121
122#[derive(Clone, Debug, Default, PartialEq, Serialize)]
123#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
124pub struct DeleteLicenseConfigurationRequest {
125    /// <p>ID of the license configuration.</p>
126    #[serde(rename = "LicenseConfigurationArn")]
127    pub license_configuration_arn: String,
128}
129
130#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
131#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
132pub struct DeleteLicenseConfigurationResponse {}
133
134/// <p>A filter name and value pair that is used to return more specific results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.</p>
135#[derive(Clone, Debug, Default, PartialEq, Serialize)]
136#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
137pub struct Filter {
138    /// <p>Name of the filter. Filter names are case-sensitive.</p>
139    #[serde(rename = "Name")]
140    #[serde(skip_serializing_if = "Option::is_none")]
141    pub name: Option<String>,
142    /// <p>Filter values. Filter values are case-sensitive.</p>
143    #[serde(rename = "Values")]
144    #[serde(skip_serializing_if = "Option::is_none")]
145    pub values: Option<Vec<String>>,
146}
147
148#[derive(Clone, Debug, Default, PartialEq, Serialize)]
149#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
150pub struct GetLicenseConfigurationRequest {
151    /// <p>Amazon Resource Name (ARN) of the license configuration.</p>
152    #[serde(rename = "LicenseConfigurationArn")]
153    pub license_configuration_arn: String,
154}
155
156#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
157#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
158pub struct GetLicenseConfigurationResponse {
159    /// <p>Automated discovery information.</p>
160    #[serde(rename = "AutomatedDiscoveryInformation")]
161    #[serde(skip_serializing_if = "Option::is_none")]
162    pub automated_discovery_information: Option<AutomatedDiscoveryInformation>,
163    /// <p>Summaries of the licenses consumed by resources.</p>
164    #[serde(rename = "ConsumedLicenseSummaryList")]
165    #[serde(skip_serializing_if = "Option::is_none")]
166    pub consumed_license_summary_list: Option<Vec<ConsumedLicenseSummary>>,
167    /// <p>Number of licenses assigned to resources.</p>
168    #[serde(rename = "ConsumedLicenses")]
169    #[serde(skip_serializing_if = "Option::is_none")]
170    pub consumed_licenses: Option<i64>,
171    /// <p>Description of the license configuration.</p>
172    #[serde(rename = "Description")]
173    #[serde(skip_serializing_if = "Option::is_none")]
174    pub description: Option<String>,
175    /// <p>Amazon Resource Name (ARN) of the license configuration.</p>
176    #[serde(rename = "LicenseConfigurationArn")]
177    #[serde(skip_serializing_if = "Option::is_none")]
178    pub license_configuration_arn: Option<String>,
179    /// <p>Unique ID for the license configuration.</p>
180    #[serde(rename = "LicenseConfigurationId")]
181    #[serde(skip_serializing_if = "Option::is_none")]
182    pub license_configuration_id: Option<String>,
183    /// <p>Number of available licenses.</p>
184    #[serde(rename = "LicenseCount")]
185    #[serde(skip_serializing_if = "Option::is_none")]
186    pub license_count: Option<i64>,
187    /// <p>Sets the number of available licenses as a hard limit.</p>
188    #[serde(rename = "LicenseCountHardLimit")]
189    #[serde(skip_serializing_if = "Option::is_none")]
190    pub license_count_hard_limit: Option<bool>,
191    /// <p>Dimension on which the licenses are counted.</p>
192    #[serde(rename = "LicenseCountingType")]
193    #[serde(skip_serializing_if = "Option::is_none")]
194    pub license_counting_type: Option<String>,
195    /// <p>License rules.</p>
196    #[serde(rename = "LicenseRules")]
197    #[serde(skip_serializing_if = "Option::is_none")]
198    pub license_rules: Option<Vec<String>>,
199    /// <p>Summaries of the managed resources.</p>
200    #[serde(rename = "ManagedResourceSummaryList")]
201    #[serde(skip_serializing_if = "Option::is_none")]
202    pub managed_resource_summary_list: Option<Vec<ManagedResourceSummary>>,
203    /// <p>Name of the license configuration.</p>
204    #[serde(rename = "Name")]
205    #[serde(skip_serializing_if = "Option::is_none")]
206    pub name: Option<String>,
207    /// <p>Account ID of the owner of the license configuration.</p>
208    #[serde(rename = "OwnerAccountId")]
209    #[serde(skip_serializing_if = "Option::is_none")]
210    pub owner_account_id: Option<String>,
211    /// <p>Product information.</p>
212    #[serde(rename = "ProductInformationList")]
213    #[serde(skip_serializing_if = "Option::is_none")]
214    pub product_information_list: Option<Vec<ProductInformation>>,
215    /// <p>License configuration status.</p>
216    #[serde(rename = "Status")]
217    #[serde(skip_serializing_if = "Option::is_none")]
218    pub status: Option<String>,
219    /// <p>Tags for the license configuration.</p>
220    #[serde(rename = "Tags")]
221    #[serde(skip_serializing_if = "Option::is_none")]
222    pub tags: Option<Vec<Tag>>,
223}
224
225#[derive(Clone, Debug, Default, PartialEq, Serialize)]
226#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
227pub struct GetServiceSettingsRequest {}
228
229#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
230#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
231pub struct GetServiceSettingsResponse {
232    /// <p>Indicates whether cross-account discovery has been enabled.</p>
233    #[serde(rename = "EnableCrossAccountsDiscovery")]
234    #[serde(skip_serializing_if = "Option::is_none")]
235    pub enable_cross_accounts_discovery: Option<bool>,
236    /// <p>Amazon Resource Name (ARN) of the AWS resource share. The License Manager master account will provide member accounts with access to this share.</p>
237    #[serde(rename = "LicenseManagerResourceShareArn")]
238    #[serde(skip_serializing_if = "Option::is_none")]
239    pub license_manager_resource_share_arn: Option<String>,
240    /// <p>Indicates whether AWS Organizations has been integrated with License Manager for cross-account discovery.</p>
241    #[serde(rename = "OrganizationConfiguration")]
242    #[serde(skip_serializing_if = "Option::is_none")]
243    pub organization_configuration: Option<OrganizationConfiguration>,
244    /// <p>Regional S3 bucket path for storing reports, license trail event data, discovery data, and so on.</p>
245    #[serde(rename = "S3BucketArn")]
246    #[serde(skip_serializing_if = "Option::is_none")]
247    pub s3_bucket_arn: Option<String>,
248    /// <p>SNS topic configured to receive notifications from License Manager.</p>
249    #[serde(rename = "SnsTopicArn")]
250    #[serde(skip_serializing_if = "Option::is_none")]
251    pub sns_topic_arn: Option<String>,
252}
253
254/// <p>An inventory filter.</p>
255#[derive(Clone, Debug, Default, PartialEq, Serialize)]
256#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
257pub struct InventoryFilter {
258    /// <p>Condition of the filter.</p>
259    #[serde(rename = "Condition")]
260    pub condition: String,
261    /// <p>Name of the filter.</p>
262    #[serde(rename = "Name")]
263    pub name: String,
264    /// <p>Value of the filter.</p>
265    #[serde(rename = "Value")]
266    #[serde(skip_serializing_if = "Option::is_none")]
267    pub value: Option<String>,
268}
269
270/// <p>A license configuration is an abstraction of a customer license agreement that can be consumed and enforced by License Manager. Components include specifications for the license type (licensing by instance, socket, CPU, or vCPU), allowed tenancy (shared tenancy, Dedicated Instance, Dedicated Host, or all of these), host affinity (how long a VM must be associated with a host), and the number of licenses purchased and used.</p>
271#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
272#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
273pub struct LicenseConfiguration {
274    /// <p>Automated discovery information.</p>
275    #[serde(rename = "AutomatedDiscoveryInformation")]
276    #[serde(skip_serializing_if = "Option::is_none")]
277    pub automated_discovery_information: Option<AutomatedDiscoveryInformation>,
278    /// <p>Summaries for licenses consumed by various resources.</p>
279    #[serde(rename = "ConsumedLicenseSummaryList")]
280    #[serde(skip_serializing_if = "Option::is_none")]
281    pub consumed_license_summary_list: Option<Vec<ConsumedLicenseSummary>>,
282    /// <p>Number of licenses consumed. </p>
283    #[serde(rename = "ConsumedLicenses")]
284    #[serde(skip_serializing_if = "Option::is_none")]
285    pub consumed_licenses: Option<i64>,
286    /// <p>Description of the license configuration.</p>
287    #[serde(rename = "Description")]
288    #[serde(skip_serializing_if = "Option::is_none")]
289    pub description: Option<String>,
290    /// <p>Amazon Resource Name (ARN) of the license configuration.</p>
291    #[serde(rename = "LicenseConfigurationArn")]
292    #[serde(skip_serializing_if = "Option::is_none")]
293    pub license_configuration_arn: Option<String>,
294    /// <p>Unique ID of the license configuration.</p>
295    #[serde(rename = "LicenseConfigurationId")]
296    #[serde(skip_serializing_if = "Option::is_none")]
297    pub license_configuration_id: Option<String>,
298    /// <p>Number of licenses managed by the license configuration.</p>
299    #[serde(rename = "LicenseCount")]
300    #[serde(skip_serializing_if = "Option::is_none")]
301    pub license_count: Option<i64>,
302    /// <p>Number of available licenses as a hard limit.</p>
303    #[serde(rename = "LicenseCountHardLimit")]
304    #[serde(skip_serializing_if = "Option::is_none")]
305    pub license_count_hard_limit: Option<bool>,
306    /// <p>Dimension to use to track the license inventory.</p>
307    #[serde(rename = "LicenseCountingType")]
308    #[serde(skip_serializing_if = "Option::is_none")]
309    pub license_counting_type: Option<String>,
310    /// <p>License rules.</p>
311    #[serde(rename = "LicenseRules")]
312    #[serde(skip_serializing_if = "Option::is_none")]
313    pub license_rules: Option<Vec<String>>,
314    /// <p>Summaries for managed resources.</p>
315    #[serde(rename = "ManagedResourceSummaryList")]
316    #[serde(skip_serializing_if = "Option::is_none")]
317    pub managed_resource_summary_list: Option<Vec<ManagedResourceSummary>>,
318    /// <p>Name of the license configuration.</p>
319    #[serde(rename = "Name")]
320    #[serde(skip_serializing_if = "Option::is_none")]
321    pub name: Option<String>,
322    /// <p>Account ID of the license configuration's owner.</p>
323    #[serde(rename = "OwnerAccountId")]
324    #[serde(skip_serializing_if = "Option::is_none")]
325    pub owner_account_id: Option<String>,
326    /// <p>Product information.</p>
327    #[serde(rename = "ProductInformationList")]
328    #[serde(skip_serializing_if = "Option::is_none")]
329    pub product_information_list: Option<Vec<ProductInformation>>,
330    /// <p>Status of the license configuration.</p>
331    #[serde(rename = "Status")]
332    #[serde(skip_serializing_if = "Option::is_none")]
333    pub status: Option<String>,
334}
335
336/// <p>Describes an association with a license configuration.</p>
337#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
338#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
339pub struct LicenseConfigurationAssociation {
340    /// <p>Time when the license configuration was associated with the resource.</p>
341    #[serde(rename = "AssociationTime")]
342    #[serde(skip_serializing_if = "Option::is_none")]
343    pub association_time: Option<f64>,
344    /// <p>Amazon Resource Name (ARN) of the resource.</p>
345    #[serde(rename = "ResourceArn")]
346    #[serde(skip_serializing_if = "Option::is_none")]
347    pub resource_arn: Option<String>,
348    /// <p>ID of the AWS account that owns the resource consuming licenses.</p>
349    #[serde(rename = "ResourceOwnerId")]
350    #[serde(skip_serializing_if = "Option::is_none")]
351    pub resource_owner_id: Option<String>,
352    /// <p>Type of server resource.</p>
353    #[serde(rename = "ResourceType")]
354    #[serde(skip_serializing_if = "Option::is_none")]
355    pub resource_type: Option<String>,
356}
357
358/// <p>Details about the usage of a resource associated with a license configuration.</p>
359#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
360#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
361pub struct LicenseConfigurationUsage {
362    /// <p>Time when the license configuration was initially associated with the resource.</p>
363    #[serde(rename = "AssociationTime")]
364    #[serde(skip_serializing_if = "Option::is_none")]
365    pub association_time: Option<f64>,
366    /// <p>Number of licenses consumed by the resource.</p>
367    #[serde(rename = "ConsumedLicenses")]
368    #[serde(skip_serializing_if = "Option::is_none")]
369    pub consumed_licenses: Option<i64>,
370    /// <p>Amazon Resource Name (ARN) of the resource.</p>
371    #[serde(rename = "ResourceArn")]
372    #[serde(skip_serializing_if = "Option::is_none")]
373    pub resource_arn: Option<String>,
374    /// <p>ID of the account that owns the resource.</p>
375    #[serde(rename = "ResourceOwnerId")]
376    #[serde(skip_serializing_if = "Option::is_none")]
377    pub resource_owner_id: Option<String>,
378    /// <p>Status of the resource.</p>
379    #[serde(rename = "ResourceStatus")]
380    #[serde(skip_serializing_if = "Option::is_none")]
381    pub resource_status: Option<String>,
382    /// <p>Type of resource.</p>
383    #[serde(rename = "ResourceType")]
384    #[serde(skip_serializing_if = "Option::is_none")]
385    pub resource_type: Option<String>,
386}
387
388/// <p>Describes the failure of a license operation.</p>
389#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
390#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
391pub struct LicenseOperationFailure {
392    /// <p>Error message.</p>
393    #[serde(rename = "ErrorMessage")]
394    #[serde(skip_serializing_if = "Option::is_none")]
395    pub error_message: Option<String>,
396    /// <p>Failure time.</p>
397    #[serde(rename = "FailureTime")]
398    #[serde(skip_serializing_if = "Option::is_none")]
399    pub failure_time: Option<f64>,
400    /// <p>Reserved.</p>
401    #[serde(rename = "MetadataList")]
402    #[serde(skip_serializing_if = "Option::is_none")]
403    pub metadata_list: Option<Vec<Metadata>>,
404    /// <p>Name of the operation.</p>
405    #[serde(rename = "OperationName")]
406    #[serde(skip_serializing_if = "Option::is_none")]
407    pub operation_name: Option<String>,
408    /// <p>The requester is "License Manager Automated Discovery".</p>
409    #[serde(rename = "OperationRequestedBy")]
410    #[serde(skip_serializing_if = "Option::is_none")]
411    pub operation_requested_by: Option<String>,
412    /// <p>Amazon Resource Name (ARN) of the resource.</p>
413    #[serde(rename = "ResourceArn")]
414    #[serde(skip_serializing_if = "Option::is_none")]
415    pub resource_arn: Option<String>,
416    /// <p>ID of the AWS account that owns the resource.</p>
417    #[serde(rename = "ResourceOwnerId")]
418    #[serde(skip_serializing_if = "Option::is_none")]
419    pub resource_owner_id: Option<String>,
420    /// <p>Resource type.</p>
421    #[serde(rename = "ResourceType")]
422    #[serde(skip_serializing_if = "Option::is_none")]
423    pub resource_type: Option<String>,
424}
425
426/// <p>Details for associating a license configuration with a resource.</p>
427#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
428pub struct LicenseSpecification {
429    /// <p>Amazon Resource Name (ARN) of the license configuration.</p>
430    #[serde(rename = "LicenseConfigurationArn")]
431    pub license_configuration_arn: String,
432}
433
434#[derive(Clone, Debug, Default, PartialEq, Serialize)]
435#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
436pub struct ListAssociationsForLicenseConfigurationRequest {
437    /// <p>Amazon Resource Name (ARN) of a license configuration.</p>
438    #[serde(rename = "LicenseConfigurationArn")]
439    pub license_configuration_arn: String,
440    /// <p>Maximum number of results to return in a single call.</p>
441    #[serde(rename = "MaxResults")]
442    #[serde(skip_serializing_if = "Option::is_none")]
443    pub max_results: Option<i64>,
444    /// <p>Token for the next set of results.</p>
445    #[serde(rename = "NextToken")]
446    #[serde(skip_serializing_if = "Option::is_none")]
447    pub next_token: Option<String>,
448}
449
450#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
451#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
452pub struct ListAssociationsForLicenseConfigurationResponse {
453    /// <p>Information about the associations for the license configuration.</p>
454    #[serde(rename = "LicenseConfigurationAssociations")]
455    #[serde(skip_serializing_if = "Option::is_none")]
456    pub license_configuration_associations: Option<Vec<LicenseConfigurationAssociation>>,
457    /// <p>Token for the next set of results.</p>
458    #[serde(rename = "NextToken")]
459    #[serde(skip_serializing_if = "Option::is_none")]
460    pub next_token: Option<String>,
461}
462
463#[derive(Clone, Debug, Default, PartialEq, Serialize)]
464#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
465pub struct ListFailuresForLicenseConfigurationOperationsRequest {
466    /// <p>Amazon Resource Name of the license configuration.</p>
467    #[serde(rename = "LicenseConfigurationArn")]
468    pub license_configuration_arn: String,
469    /// <p>Maximum number of results to return in a single call.</p>
470    #[serde(rename = "MaxResults")]
471    #[serde(skip_serializing_if = "Option::is_none")]
472    pub max_results: Option<i64>,
473    /// <p>Token for the next set of results.</p>
474    #[serde(rename = "NextToken")]
475    #[serde(skip_serializing_if = "Option::is_none")]
476    pub next_token: Option<String>,
477}
478
479#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
480#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
481pub struct ListFailuresForLicenseConfigurationOperationsResponse {
482    /// <p>License configuration operations that failed.</p>
483    #[serde(rename = "LicenseOperationFailureList")]
484    #[serde(skip_serializing_if = "Option::is_none")]
485    pub license_operation_failure_list: Option<Vec<LicenseOperationFailure>>,
486    /// <p>Token for the next set of results.</p>
487    #[serde(rename = "NextToken")]
488    #[serde(skip_serializing_if = "Option::is_none")]
489    pub next_token: Option<String>,
490}
491
492#[derive(Clone, Debug, Default, PartialEq, Serialize)]
493#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
494pub struct ListLicenseConfigurationsRequest {
495    /// <p><p>Filters to scope the results. The following filters and logical operators are supported:</p> <ul> <li> <p> <code>licenseCountingType</code> - The dimension on which licenses are counted (vCPU). Logical operators are <code>EQUALS</code> | <code>NOT<em>EQUALS</code>.</p> </li> <li> <p> <code>enforceLicenseCount</code> - A Boolean value that indicates whether hard license enforcement is used. Logical operators are <code>EQUALS</code> | <code>NOT</em>EQUALS</code>.</p> </li> <li> <p> <code>usagelimitExceeded</code> - A Boolean value that indicates whether the available licenses have been exceeded. Logical operators are <code>EQUALS</code> | <code>NOT_EQUALS</code>.</p> </li> </ul></p>
496    #[serde(rename = "Filters")]
497    #[serde(skip_serializing_if = "Option::is_none")]
498    pub filters: Option<Vec<Filter>>,
499    /// <p>Amazon Resource Names (ARN) of the license configurations.</p>
500    #[serde(rename = "LicenseConfigurationArns")]
501    #[serde(skip_serializing_if = "Option::is_none")]
502    pub license_configuration_arns: Option<Vec<String>>,
503    /// <p>Maximum number of results to return in a single call.</p>
504    #[serde(rename = "MaxResults")]
505    #[serde(skip_serializing_if = "Option::is_none")]
506    pub max_results: Option<i64>,
507    /// <p>Token for the next set of results.</p>
508    #[serde(rename = "NextToken")]
509    #[serde(skip_serializing_if = "Option::is_none")]
510    pub next_token: Option<String>,
511}
512
513#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
514#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
515pub struct ListLicenseConfigurationsResponse {
516    /// <p>Information about the license configurations.</p>
517    #[serde(rename = "LicenseConfigurations")]
518    #[serde(skip_serializing_if = "Option::is_none")]
519    pub license_configurations: Option<Vec<LicenseConfiguration>>,
520    /// <p>Token for the next set of results.</p>
521    #[serde(rename = "NextToken")]
522    #[serde(skip_serializing_if = "Option::is_none")]
523    pub next_token: Option<String>,
524}
525
526#[derive(Clone, Debug, Default, PartialEq, Serialize)]
527#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
528pub struct ListLicenseSpecificationsForResourceRequest {
529    /// <p>Maximum number of results to return in a single call.</p>
530    #[serde(rename = "MaxResults")]
531    #[serde(skip_serializing_if = "Option::is_none")]
532    pub max_results: Option<i64>,
533    /// <p>Token for the next set of results.</p>
534    #[serde(rename = "NextToken")]
535    #[serde(skip_serializing_if = "Option::is_none")]
536    pub next_token: Option<String>,
537    /// <p>Amazon Resource Name (ARN) of a resource that has an associated license configuration.</p>
538    #[serde(rename = "ResourceArn")]
539    pub resource_arn: String,
540}
541
542#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
543#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
544pub struct ListLicenseSpecificationsForResourceResponse {
545    /// <p>License configurations associated with a resource.</p>
546    #[serde(rename = "LicenseSpecifications")]
547    #[serde(skip_serializing_if = "Option::is_none")]
548    pub license_specifications: Option<Vec<LicenseSpecification>>,
549    /// <p>Token for the next set of results.</p>
550    #[serde(rename = "NextToken")]
551    #[serde(skip_serializing_if = "Option::is_none")]
552    pub next_token: Option<String>,
553}
554
555#[derive(Clone, Debug, Default, PartialEq, Serialize)]
556#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
557pub struct ListResourceInventoryRequest {
558    /// <p><p>Filters to scope the results. The following filters and logical operators are supported:</p> <ul> <li> <p> <code>account<em>id</code> - The ID of the AWS account that owns the resource. Logical operators are <code>EQUALS</code> | <code>NOT</em>EQUALS</code>.</p> </li> <li> <p> <code>application<em>name</code> - The name of the application. Logical operators are <code>EQUALS</code> | <code>BEGINS</em>WITH</code>.</p> </li> <li> <p> <code>license<em>included</code> - The type of license included. Logical operators are <code>EQUALS</code> | <code>NOT</em>EQUALS</code>. Possible values are <code>sql-server-enterprise</code> | <code>sql-server-standard</code> | <code>sql-server-web</code> | <code>windows-server-datacenter</code>.</p> </li> <li> <p> <code>platform</code> - The platform of the resource. Logical operators are <code>EQUALS</code> | <code>BEGINS<em>WITH</code>.</p> </li> <li> <p> <code>resource</em>id</code> - The ID of the resource. Logical operators are <code>EQUALS</code> | <code>NOT_EQUALS</code>.</p> </li> </ul></p>
559    #[serde(rename = "Filters")]
560    #[serde(skip_serializing_if = "Option::is_none")]
561    pub filters: Option<Vec<InventoryFilter>>,
562    /// <p>Maximum number of results to return in a single call.</p>
563    #[serde(rename = "MaxResults")]
564    #[serde(skip_serializing_if = "Option::is_none")]
565    pub max_results: Option<i64>,
566    /// <p>Token for the next set of results.</p>
567    #[serde(rename = "NextToken")]
568    #[serde(skip_serializing_if = "Option::is_none")]
569    pub next_token: Option<String>,
570}
571
572#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
573#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
574pub struct ListResourceInventoryResponse {
575    /// <p>Token for the next set of results.</p>
576    #[serde(rename = "NextToken")]
577    #[serde(skip_serializing_if = "Option::is_none")]
578    pub next_token: Option<String>,
579    /// <p>Information about the resources.</p>
580    #[serde(rename = "ResourceInventoryList")]
581    #[serde(skip_serializing_if = "Option::is_none")]
582    pub resource_inventory_list: Option<Vec<ResourceInventory>>,
583}
584
585#[derive(Clone, Debug, Default, PartialEq, Serialize)]
586#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
587pub struct ListTagsForResourceRequest {
588    /// <p>Amazon Resource Name (ARN) of the license configuration.</p>
589    #[serde(rename = "ResourceArn")]
590    pub resource_arn: String,
591}
592
593#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
594#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
595pub struct ListTagsForResourceResponse {
596    /// <p>Information about the tags.</p>
597    #[serde(rename = "Tags")]
598    #[serde(skip_serializing_if = "Option::is_none")]
599    pub tags: Option<Vec<Tag>>,
600}
601
602#[derive(Clone, Debug, Default, PartialEq, Serialize)]
603#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
604pub struct ListUsageForLicenseConfigurationRequest {
605    /// <p><p>Filters to scope the results. The following filters and logical operators are supported:</p> <ul> <li> <p> <code>resourceArn</code> - The ARN of the license configuration resource. Logical operators are <code>EQUALS</code> | <code>NOT<em>EQUALS</code>.</p> </li> <li> <p> <code>resourceType</code> - The resource type (EC2</em>INSTANCE | EC2<em>HOST | EC2</em>AMI | SYSTEMS<em>MANAGER</em>MANAGED<em>INSTANCE). Logical operators are <code>EQUALS</code> | <code>NOT</em>EQUALS</code>.</p> </li> <li> <p> <code>resourceAccount</code> - The ID of the account that owns the resource. Logical operators are <code>EQUALS</code> | <code>NOT_EQUALS</code>.</p> </li> </ul></p>
606    #[serde(rename = "Filters")]
607    #[serde(skip_serializing_if = "Option::is_none")]
608    pub filters: Option<Vec<Filter>>,
609    /// <p>Amazon Resource Name (ARN) of the license configuration.</p>
610    #[serde(rename = "LicenseConfigurationArn")]
611    pub license_configuration_arn: String,
612    /// <p>Maximum number of results to return in a single call.</p>
613    #[serde(rename = "MaxResults")]
614    #[serde(skip_serializing_if = "Option::is_none")]
615    pub max_results: Option<i64>,
616    /// <p>Token for the next set of results.</p>
617    #[serde(rename = "NextToken")]
618    #[serde(skip_serializing_if = "Option::is_none")]
619    pub next_token: Option<String>,
620}
621
622#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
623#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
624pub struct ListUsageForLicenseConfigurationResponse {
625    /// <p>Information about the license configurations.</p>
626    #[serde(rename = "LicenseConfigurationUsageList")]
627    #[serde(skip_serializing_if = "Option::is_none")]
628    pub license_configuration_usage_list: Option<Vec<LicenseConfigurationUsage>>,
629    /// <p>Token for the next set of results.</p>
630    #[serde(rename = "NextToken")]
631    #[serde(skip_serializing_if = "Option::is_none")]
632    pub next_token: Option<String>,
633}
634
635/// <p>Summary information about a managed resource.</p>
636#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
637#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
638pub struct ManagedResourceSummary {
639    /// <p>Number of resources associated with licenses.</p>
640    #[serde(rename = "AssociationCount")]
641    #[serde(skip_serializing_if = "Option::is_none")]
642    pub association_count: Option<i64>,
643    /// <p>Type of resource associated with a license.</p>
644    #[serde(rename = "ResourceType")]
645    #[serde(skip_serializing_if = "Option::is_none")]
646    pub resource_type: Option<String>,
647}
648
649/// <p>Reserved.</p>
650#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
651#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
652pub struct Metadata {
653    /// <p>Reserved.</p>
654    #[serde(rename = "Name")]
655    #[serde(skip_serializing_if = "Option::is_none")]
656    pub name: Option<String>,
657    /// <p>Reserved.</p>
658    #[serde(rename = "Value")]
659    #[serde(skip_serializing_if = "Option::is_none")]
660    pub value: Option<String>,
661}
662
663/// <p>Configuration information for AWS Organizations.</p>
664#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
665pub struct OrganizationConfiguration {
666    /// <p>Enables AWS Organization integration.</p>
667    #[serde(rename = "EnableIntegration")]
668    pub enable_integration: bool,
669}
670
671/// <p>Describes product information for a license configuration.</p>
672#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
673pub struct ProductInformation {
674    /// <p><p>Product information filters. The following filters and logical operators are supported:</p> <ul> <li> <p> <code>Application Name</code> - The name of the application. Logical operator is <code>EQUALS</code>.</p> </li> <li> <p> <code>Application Publisher</code> - The publisher of the application. Logical operator is <code>EQUALS</code>.</p> </li> <li> <p> <code>Application Version</code> - The version of the application. Logical operator is <code>EQUALS</code>.</p> </li> <li> <p> <code>Platform Name</code> - The name of the platform. Logical operator is <code>EQUALS</code>.</p> </li> <li> <p> <code>Platform Type</code> - The platform type. Logical operator is <code>EQUALS</code>.</p> </li> <li> <p> <code>License Included</code> - The type of license included. Logical operators are <code>EQUALS</code> and <code>NOT_EQUALS</code>. Possible values are <code>sql-server-enterprise</code> | <code>sql-server-standard</code> | <code>sql-server-web</code> | <code>windows-server-datacenter</code>.</p> </li> </ul></p>
675    #[serde(rename = "ProductInformationFilterList")]
676    pub product_information_filter_list: Vec<ProductInformationFilter>,
677    /// <p>Resource type. The value is <code>SSM_MANAGED</code>.</p>
678    #[serde(rename = "ResourceType")]
679    pub resource_type: String,
680}
681
682/// <p>Describes product information filters.</p>
683#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
684pub struct ProductInformationFilter {
685    /// <p>Logical operator.</p>
686    #[serde(rename = "ProductInformationFilterComparator")]
687    pub product_information_filter_comparator: String,
688    /// <p>Filter name.</p>
689    #[serde(rename = "ProductInformationFilterName")]
690    pub product_information_filter_name: String,
691    /// <p>Filter value.</p>
692    #[serde(rename = "ProductInformationFilterValue")]
693    pub product_information_filter_value: Vec<String>,
694}
695
696/// <p>Details about a resource.</p>
697#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
698#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
699pub struct ResourceInventory {
700    /// <p>Platform of the resource.</p>
701    #[serde(rename = "Platform")]
702    #[serde(skip_serializing_if = "Option::is_none")]
703    pub platform: Option<String>,
704    /// <p>Platform version of the resource in the inventory.</p>
705    #[serde(rename = "PlatformVersion")]
706    #[serde(skip_serializing_if = "Option::is_none")]
707    pub platform_version: Option<String>,
708    /// <p>Amazon Resource Name (ARN) of the resource.</p>
709    #[serde(rename = "ResourceArn")]
710    #[serde(skip_serializing_if = "Option::is_none")]
711    pub resource_arn: Option<String>,
712    /// <p>ID of the resource.</p>
713    #[serde(rename = "ResourceId")]
714    #[serde(skip_serializing_if = "Option::is_none")]
715    pub resource_id: Option<String>,
716    /// <p>ID of the account that owns the resource.</p>
717    #[serde(rename = "ResourceOwningAccountId")]
718    #[serde(skip_serializing_if = "Option::is_none")]
719    pub resource_owning_account_id: Option<String>,
720    /// <p>Type of resource.</p>
721    #[serde(rename = "ResourceType")]
722    #[serde(skip_serializing_if = "Option::is_none")]
723    pub resource_type: Option<String>,
724}
725
726/// <p>Details about a tag for a license configuration.</p>
727#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
728pub struct Tag {
729    /// <p>Tag key.</p>
730    #[serde(rename = "Key")]
731    #[serde(skip_serializing_if = "Option::is_none")]
732    pub key: Option<String>,
733    /// <p>Tag value.</p>
734    #[serde(rename = "Value")]
735    #[serde(skip_serializing_if = "Option::is_none")]
736    pub value: Option<String>,
737}
738
739#[derive(Clone, Debug, Default, PartialEq, Serialize)]
740#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
741pub struct TagResourceRequest {
742    /// <p>Amazon Resource Name (ARN) of the license configuration.</p>
743    #[serde(rename = "ResourceArn")]
744    pub resource_arn: String,
745    /// <p>One or more tags.</p>
746    #[serde(rename = "Tags")]
747    pub tags: Vec<Tag>,
748}
749
750#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
751#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
752pub struct TagResourceResponse {}
753
754#[derive(Clone, Debug, Default, PartialEq, Serialize)]
755#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
756pub struct UntagResourceRequest {
757    /// <p>Amazon Resource Name (ARN) of the license configuration.</p>
758    #[serde(rename = "ResourceArn")]
759    pub resource_arn: String,
760    /// <p>Keys identifying the tags to remove.</p>
761    #[serde(rename = "TagKeys")]
762    pub tag_keys: Vec<String>,
763}
764
765#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
766#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
767pub struct UntagResourceResponse {}
768
769#[derive(Clone, Debug, Default, PartialEq, Serialize)]
770#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
771pub struct UpdateLicenseConfigurationRequest {
772    /// <p>New description of the license configuration.</p>
773    #[serde(rename = "Description")]
774    #[serde(skip_serializing_if = "Option::is_none")]
775    pub description: Option<String>,
776    /// <p>Amazon Resource Name (ARN) of the license configuration.</p>
777    #[serde(rename = "LicenseConfigurationArn")]
778    pub license_configuration_arn: String,
779    /// <p>New status of the license configuration.</p>
780    #[serde(rename = "LicenseConfigurationStatus")]
781    #[serde(skip_serializing_if = "Option::is_none")]
782    pub license_configuration_status: Option<String>,
783    /// <p>New number of licenses managed by the license configuration.</p>
784    #[serde(rename = "LicenseCount")]
785    #[serde(skip_serializing_if = "Option::is_none")]
786    pub license_count: Option<i64>,
787    /// <p>New hard limit of the number of available licenses.</p>
788    #[serde(rename = "LicenseCountHardLimit")]
789    #[serde(skip_serializing_if = "Option::is_none")]
790    pub license_count_hard_limit: Option<bool>,
791    /// <p>New license rules.</p>
792    #[serde(rename = "LicenseRules")]
793    #[serde(skip_serializing_if = "Option::is_none")]
794    pub license_rules: Option<Vec<String>>,
795    /// <p>New name of the license configuration.</p>
796    #[serde(rename = "Name")]
797    #[serde(skip_serializing_if = "Option::is_none")]
798    pub name: Option<String>,
799    /// <p>New product information.</p>
800    #[serde(rename = "ProductInformationList")]
801    #[serde(skip_serializing_if = "Option::is_none")]
802    pub product_information_list: Option<Vec<ProductInformation>>,
803}
804
805#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
806#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
807pub struct UpdateLicenseConfigurationResponse {}
808
809#[derive(Clone, Debug, Default, PartialEq, Serialize)]
810#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
811pub struct UpdateLicenseSpecificationsForResourceRequest {
812    /// <p>ARNs of the license configurations to add.</p>
813    #[serde(rename = "AddLicenseSpecifications")]
814    #[serde(skip_serializing_if = "Option::is_none")]
815    pub add_license_specifications: Option<Vec<LicenseSpecification>>,
816    /// <p>ARNs of the license configurations to remove.</p>
817    #[serde(rename = "RemoveLicenseSpecifications")]
818    #[serde(skip_serializing_if = "Option::is_none")]
819    pub remove_license_specifications: Option<Vec<LicenseSpecification>>,
820    /// <p>Amazon Resource Name (ARN) of the AWS resource.</p>
821    #[serde(rename = "ResourceArn")]
822    pub resource_arn: String,
823}
824
825#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
826#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
827pub struct UpdateLicenseSpecificationsForResourceResponse {}
828
829#[derive(Clone, Debug, Default, PartialEq, Serialize)]
830#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
831pub struct UpdateServiceSettingsRequest {
832    /// <p>Activates cross-account discovery.</p>
833    #[serde(rename = "EnableCrossAccountsDiscovery")]
834    #[serde(skip_serializing_if = "Option::is_none")]
835    pub enable_cross_accounts_discovery: Option<bool>,
836    /// <p>Enables integration with AWS Organizations for cross-account discovery.</p>
837    #[serde(rename = "OrganizationConfiguration")]
838    #[serde(skip_serializing_if = "Option::is_none")]
839    pub organization_configuration: Option<OrganizationConfiguration>,
840    /// <p>Amazon Resource Name (ARN) of the Amazon S3 bucket where the License Manager information is stored.</p>
841    #[serde(rename = "S3BucketArn")]
842    #[serde(skip_serializing_if = "Option::is_none")]
843    pub s3_bucket_arn: Option<String>,
844    /// <p>Amazon Resource Name (ARN) of the Amazon SNS topic used for License Manager alerts.</p>
845    #[serde(rename = "SnsTopicArn")]
846    #[serde(skip_serializing_if = "Option::is_none")]
847    pub sns_topic_arn: Option<String>,
848}
849
850#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
851#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
852pub struct UpdateServiceSettingsResponse {}
853
854/// Errors returned by CreateLicenseConfiguration
855#[derive(Debug, PartialEq)]
856pub enum CreateLicenseConfigurationError {
857    /// <p>Access to resource denied.</p>
858    AccessDenied(String),
859    /// <p>The AWS user account does not have permission to perform the action. Check the IAM policy associated with this account.</p>
860    Authorization(String),
861    /// <p>One or more parameter values are not valid.</p>
862    InvalidParameterValue(String),
863    /// <p>Too many requests have been submitted. Try again after a brief wait.</p>
864    RateLimitExceeded(String),
865    /// <p>Your resource limits have been exceeded.</p>
866    ResourceLimitExceeded(String),
867    /// <p>The server experienced an internal error. Try again.</p>
868    ServerInternal(String),
869}
870
871impl CreateLicenseConfigurationError {
872    pub fn from_response(
873        res: BufferedHttpResponse,
874    ) -> RusotoError<CreateLicenseConfigurationError> {
875        if let Some(err) = proto::json::Error::parse(&res) {
876            match err.typ.as_str() {
877                "AccessDeniedException" => {
878                    return RusotoError::Service(CreateLicenseConfigurationError::AccessDenied(
879                        err.msg,
880                    ))
881                }
882                "AuthorizationException" => {
883                    return RusotoError::Service(CreateLicenseConfigurationError::Authorization(
884                        err.msg,
885                    ))
886                }
887                "InvalidParameterValueException" => {
888                    return RusotoError::Service(
889                        CreateLicenseConfigurationError::InvalidParameterValue(err.msg),
890                    )
891                }
892                "RateLimitExceededException" => {
893                    return RusotoError::Service(
894                        CreateLicenseConfigurationError::RateLimitExceeded(err.msg),
895                    )
896                }
897                "ResourceLimitExceededException" => {
898                    return RusotoError::Service(
899                        CreateLicenseConfigurationError::ResourceLimitExceeded(err.msg),
900                    )
901                }
902                "ServerInternalException" => {
903                    return RusotoError::Service(CreateLicenseConfigurationError::ServerInternal(
904                        err.msg,
905                    ))
906                }
907                "ValidationException" => return RusotoError::Validation(err.msg),
908                _ => {}
909            }
910        }
911        RusotoError::Unknown(res)
912    }
913}
914impl fmt::Display for CreateLicenseConfigurationError {
915    #[allow(unused_variables)]
916    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
917        match *self {
918            CreateLicenseConfigurationError::AccessDenied(ref cause) => write!(f, "{}", cause),
919            CreateLicenseConfigurationError::Authorization(ref cause) => write!(f, "{}", cause),
920            CreateLicenseConfigurationError::InvalidParameterValue(ref cause) => {
921                write!(f, "{}", cause)
922            }
923            CreateLicenseConfigurationError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
924            CreateLicenseConfigurationError::ResourceLimitExceeded(ref cause) => {
925                write!(f, "{}", cause)
926            }
927            CreateLicenseConfigurationError::ServerInternal(ref cause) => write!(f, "{}", cause),
928        }
929    }
930}
931impl Error for CreateLicenseConfigurationError {}
932/// Errors returned by DeleteLicenseConfiguration
933#[derive(Debug, PartialEq)]
934pub enum DeleteLicenseConfigurationError {
935    /// <p>Access to resource denied.</p>
936    AccessDenied(String),
937    /// <p>The AWS user account does not have permission to perform the action. Check the IAM policy associated with this account.</p>
938    Authorization(String),
939    /// <p>One or more parameter values are not valid.</p>
940    InvalidParameterValue(String),
941    /// <p>Too many requests have been submitted. Try again after a brief wait.</p>
942    RateLimitExceeded(String),
943    /// <p>The server experienced an internal error. Try again.</p>
944    ServerInternal(String),
945}
946
947impl DeleteLicenseConfigurationError {
948    pub fn from_response(
949        res: BufferedHttpResponse,
950    ) -> RusotoError<DeleteLicenseConfigurationError> {
951        if let Some(err) = proto::json::Error::parse(&res) {
952            match err.typ.as_str() {
953                "AccessDeniedException" => {
954                    return RusotoError::Service(DeleteLicenseConfigurationError::AccessDenied(
955                        err.msg,
956                    ))
957                }
958                "AuthorizationException" => {
959                    return RusotoError::Service(DeleteLicenseConfigurationError::Authorization(
960                        err.msg,
961                    ))
962                }
963                "InvalidParameterValueException" => {
964                    return RusotoError::Service(
965                        DeleteLicenseConfigurationError::InvalidParameterValue(err.msg),
966                    )
967                }
968                "RateLimitExceededException" => {
969                    return RusotoError::Service(
970                        DeleteLicenseConfigurationError::RateLimitExceeded(err.msg),
971                    )
972                }
973                "ServerInternalException" => {
974                    return RusotoError::Service(DeleteLicenseConfigurationError::ServerInternal(
975                        err.msg,
976                    ))
977                }
978                "ValidationException" => return RusotoError::Validation(err.msg),
979                _ => {}
980            }
981        }
982        RusotoError::Unknown(res)
983    }
984}
985impl fmt::Display for DeleteLicenseConfigurationError {
986    #[allow(unused_variables)]
987    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
988        match *self {
989            DeleteLicenseConfigurationError::AccessDenied(ref cause) => write!(f, "{}", cause),
990            DeleteLicenseConfigurationError::Authorization(ref cause) => write!(f, "{}", cause),
991            DeleteLicenseConfigurationError::InvalidParameterValue(ref cause) => {
992                write!(f, "{}", cause)
993            }
994            DeleteLicenseConfigurationError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
995            DeleteLicenseConfigurationError::ServerInternal(ref cause) => write!(f, "{}", cause),
996        }
997    }
998}
999impl Error for DeleteLicenseConfigurationError {}
1000/// Errors returned by GetLicenseConfiguration
1001#[derive(Debug, PartialEq)]
1002pub enum GetLicenseConfigurationError {
1003    /// <p>Access to resource denied.</p>
1004    AccessDenied(String),
1005    /// <p>The AWS user account does not have permission to perform the action. Check the IAM policy associated with this account.</p>
1006    Authorization(String),
1007    /// <p>One or more parameter values are not valid.</p>
1008    InvalidParameterValue(String),
1009    /// <p>Too many requests have been submitted. Try again after a brief wait.</p>
1010    RateLimitExceeded(String),
1011    /// <p>The server experienced an internal error. Try again.</p>
1012    ServerInternal(String),
1013}
1014
1015impl GetLicenseConfigurationError {
1016    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetLicenseConfigurationError> {
1017        if let Some(err) = proto::json::Error::parse(&res) {
1018            match err.typ.as_str() {
1019                "AccessDeniedException" => {
1020                    return RusotoError::Service(GetLicenseConfigurationError::AccessDenied(
1021                        err.msg,
1022                    ))
1023                }
1024                "AuthorizationException" => {
1025                    return RusotoError::Service(GetLicenseConfigurationError::Authorization(
1026                        err.msg,
1027                    ))
1028                }
1029                "InvalidParameterValueException" => {
1030                    return RusotoError::Service(
1031                        GetLicenseConfigurationError::InvalidParameterValue(err.msg),
1032                    )
1033                }
1034                "RateLimitExceededException" => {
1035                    return RusotoError::Service(GetLicenseConfigurationError::RateLimitExceeded(
1036                        err.msg,
1037                    ))
1038                }
1039                "ServerInternalException" => {
1040                    return RusotoError::Service(GetLicenseConfigurationError::ServerInternal(
1041                        err.msg,
1042                    ))
1043                }
1044                "ValidationException" => return RusotoError::Validation(err.msg),
1045                _ => {}
1046            }
1047        }
1048        RusotoError::Unknown(res)
1049    }
1050}
1051impl fmt::Display for GetLicenseConfigurationError {
1052    #[allow(unused_variables)]
1053    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1054        match *self {
1055            GetLicenseConfigurationError::AccessDenied(ref cause) => write!(f, "{}", cause),
1056            GetLicenseConfigurationError::Authorization(ref cause) => write!(f, "{}", cause),
1057            GetLicenseConfigurationError::InvalidParameterValue(ref cause) => {
1058                write!(f, "{}", cause)
1059            }
1060            GetLicenseConfigurationError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
1061            GetLicenseConfigurationError::ServerInternal(ref cause) => write!(f, "{}", cause),
1062        }
1063    }
1064}
1065impl Error for GetLicenseConfigurationError {}
1066/// Errors returned by GetServiceSettings
1067#[derive(Debug, PartialEq)]
1068pub enum GetServiceSettingsError {
1069    /// <p>Access to resource denied.</p>
1070    AccessDenied(String),
1071    /// <p>The AWS user account does not have permission to perform the action. Check the IAM policy associated with this account.</p>
1072    Authorization(String),
1073    /// <p>Too many requests have been submitted. Try again after a brief wait.</p>
1074    RateLimitExceeded(String),
1075    /// <p>The server experienced an internal error. Try again.</p>
1076    ServerInternal(String),
1077}
1078
1079impl GetServiceSettingsError {
1080    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetServiceSettingsError> {
1081        if let Some(err) = proto::json::Error::parse(&res) {
1082            match err.typ.as_str() {
1083                "AccessDeniedException" => {
1084                    return RusotoError::Service(GetServiceSettingsError::AccessDenied(err.msg))
1085                }
1086                "AuthorizationException" => {
1087                    return RusotoError::Service(GetServiceSettingsError::Authorization(err.msg))
1088                }
1089                "RateLimitExceededException" => {
1090                    return RusotoError::Service(GetServiceSettingsError::RateLimitExceeded(
1091                        err.msg,
1092                    ))
1093                }
1094                "ServerInternalException" => {
1095                    return RusotoError::Service(GetServiceSettingsError::ServerInternal(err.msg))
1096                }
1097                "ValidationException" => return RusotoError::Validation(err.msg),
1098                _ => {}
1099            }
1100        }
1101        RusotoError::Unknown(res)
1102    }
1103}
1104impl fmt::Display for GetServiceSettingsError {
1105    #[allow(unused_variables)]
1106    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1107        match *self {
1108            GetServiceSettingsError::AccessDenied(ref cause) => write!(f, "{}", cause),
1109            GetServiceSettingsError::Authorization(ref cause) => write!(f, "{}", cause),
1110            GetServiceSettingsError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
1111            GetServiceSettingsError::ServerInternal(ref cause) => write!(f, "{}", cause),
1112        }
1113    }
1114}
1115impl Error for GetServiceSettingsError {}
1116/// Errors returned by ListAssociationsForLicenseConfiguration
1117#[derive(Debug, PartialEq)]
1118pub enum ListAssociationsForLicenseConfigurationError {
1119    /// <p>Access to resource denied.</p>
1120    AccessDenied(String),
1121    /// <p>The AWS user account does not have permission to perform the action. Check the IAM policy associated with this account.</p>
1122    Authorization(String),
1123    /// <p>The request uses too many filters or too many filter values.</p>
1124    FilterLimitExceeded(String),
1125    /// <p>One or more parameter values are not valid.</p>
1126    InvalidParameterValue(String),
1127    /// <p>Too many requests have been submitted. Try again after a brief wait.</p>
1128    RateLimitExceeded(String),
1129    /// <p>The server experienced an internal error. Try again.</p>
1130    ServerInternal(String),
1131}
1132
1133impl ListAssociationsForLicenseConfigurationError {
1134    pub fn from_response(
1135        res: BufferedHttpResponse,
1136    ) -> RusotoError<ListAssociationsForLicenseConfigurationError> {
1137        if let Some(err) = proto::json::Error::parse(&res) {
1138            match err.typ.as_str() {
1139                "AccessDeniedException" => {
1140                    return RusotoError::Service(
1141                        ListAssociationsForLicenseConfigurationError::AccessDenied(err.msg),
1142                    )
1143                }
1144                "AuthorizationException" => {
1145                    return RusotoError::Service(
1146                        ListAssociationsForLicenseConfigurationError::Authorization(err.msg),
1147                    )
1148                }
1149                "FilterLimitExceededException" => {
1150                    return RusotoError::Service(
1151                        ListAssociationsForLicenseConfigurationError::FilterLimitExceeded(err.msg),
1152                    )
1153                }
1154                "InvalidParameterValueException" => {
1155                    return RusotoError::Service(
1156                        ListAssociationsForLicenseConfigurationError::InvalidParameterValue(
1157                            err.msg,
1158                        ),
1159                    )
1160                }
1161                "RateLimitExceededException" => {
1162                    return RusotoError::Service(
1163                        ListAssociationsForLicenseConfigurationError::RateLimitExceeded(err.msg),
1164                    )
1165                }
1166                "ServerInternalException" => {
1167                    return RusotoError::Service(
1168                        ListAssociationsForLicenseConfigurationError::ServerInternal(err.msg),
1169                    )
1170                }
1171                "ValidationException" => return RusotoError::Validation(err.msg),
1172                _ => {}
1173            }
1174        }
1175        RusotoError::Unknown(res)
1176    }
1177}
1178impl fmt::Display for ListAssociationsForLicenseConfigurationError {
1179    #[allow(unused_variables)]
1180    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1181        match *self {
1182            ListAssociationsForLicenseConfigurationError::AccessDenied(ref cause) => {
1183                write!(f, "{}", cause)
1184            }
1185            ListAssociationsForLicenseConfigurationError::Authorization(ref cause) => {
1186                write!(f, "{}", cause)
1187            }
1188            ListAssociationsForLicenseConfigurationError::FilterLimitExceeded(ref cause) => {
1189                write!(f, "{}", cause)
1190            }
1191            ListAssociationsForLicenseConfigurationError::InvalidParameterValue(ref cause) => {
1192                write!(f, "{}", cause)
1193            }
1194            ListAssociationsForLicenseConfigurationError::RateLimitExceeded(ref cause) => {
1195                write!(f, "{}", cause)
1196            }
1197            ListAssociationsForLicenseConfigurationError::ServerInternal(ref cause) => {
1198                write!(f, "{}", cause)
1199            }
1200        }
1201    }
1202}
1203impl Error for ListAssociationsForLicenseConfigurationError {}
1204/// Errors returned by ListFailuresForLicenseConfigurationOperations
1205#[derive(Debug, PartialEq)]
1206pub enum ListFailuresForLicenseConfigurationOperationsError {
1207    /// <p>Access to resource denied.</p>
1208    AccessDenied(String),
1209    /// <p>The AWS user account does not have permission to perform the action. Check the IAM policy associated with this account.</p>
1210    Authorization(String),
1211    /// <p>One or more parameter values are not valid.</p>
1212    InvalidParameterValue(String),
1213    /// <p>Too many requests have been submitted. Try again after a brief wait.</p>
1214    RateLimitExceeded(String),
1215    /// <p>The server experienced an internal error. Try again.</p>
1216    ServerInternal(String),
1217}
1218
1219impl ListFailuresForLicenseConfigurationOperationsError {
1220    pub fn from_response(
1221        res: BufferedHttpResponse,
1222    ) -> RusotoError<ListFailuresForLicenseConfigurationOperationsError> {
1223        if let Some(err) = proto::json::Error::parse(&res) {
1224            match err.typ.as_str() {
1225                "AccessDeniedException" => {
1226                    return RusotoError::Service(
1227                        ListFailuresForLicenseConfigurationOperationsError::AccessDenied(err.msg),
1228                    )
1229                }
1230                "AuthorizationException" => {
1231                    return RusotoError::Service(
1232                        ListFailuresForLicenseConfigurationOperationsError::Authorization(err.msg),
1233                    )
1234                }
1235                "InvalidParameterValueException" => {
1236                    return RusotoError::Service(
1237                        ListFailuresForLicenseConfigurationOperationsError::InvalidParameterValue(
1238                            err.msg,
1239                        ),
1240                    )
1241                }
1242                "RateLimitExceededException" => {
1243                    return RusotoError::Service(
1244                        ListFailuresForLicenseConfigurationOperationsError::RateLimitExceeded(
1245                            err.msg,
1246                        ),
1247                    )
1248                }
1249                "ServerInternalException" => {
1250                    return RusotoError::Service(
1251                        ListFailuresForLicenseConfigurationOperationsError::ServerInternal(err.msg),
1252                    )
1253                }
1254                "ValidationException" => return RusotoError::Validation(err.msg),
1255                _ => {}
1256            }
1257        }
1258        RusotoError::Unknown(res)
1259    }
1260}
1261impl fmt::Display for ListFailuresForLicenseConfigurationOperationsError {
1262    #[allow(unused_variables)]
1263    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1264        match *self {
1265            ListFailuresForLicenseConfigurationOperationsError::AccessDenied(ref cause) => {
1266                write!(f, "{}", cause)
1267            }
1268            ListFailuresForLicenseConfigurationOperationsError::Authorization(ref cause) => {
1269                write!(f, "{}", cause)
1270            }
1271            ListFailuresForLicenseConfigurationOperationsError::InvalidParameterValue(
1272                ref cause,
1273            ) => write!(f, "{}", cause),
1274            ListFailuresForLicenseConfigurationOperationsError::RateLimitExceeded(ref cause) => {
1275                write!(f, "{}", cause)
1276            }
1277            ListFailuresForLicenseConfigurationOperationsError::ServerInternal(ref cause) => {
1278                write!(f, "{}", cause)
1279            }
1280        }
1281    }
1282}
1283impl Error for ListFailuresForLicenseConfigurationOperationsError {}
1284/// Errors returned by ListLicenseConfigurations
1285#[derive(Debug, PartialEq)]
1286pub enum ListLicenseConfigurationsError {
1287    /// <p>Access to resource denied.</p>
1288    AccessDenied(String),
1289    /// <p>The AWS user account does not have permission to perform the action. Check the IAM policy associated with this account.</p>
1290    Authorization(String),
1291    /// <p>The request uses too many filters or too many filter values.</p>
1292    FilterLimitExceeded(String),
1293    /// <p>One or more parameter values are not valid.</p>
1294    InvalidParameterValue(String),
1295    /// <p>Too many requests have been submitted. Try again after a brief wait.</p>
1296    RateLimitExceeded(String),
1297    /// <p>The server experienced an internal error. Try again.</p>
1298    ServerInternal(String),
1299}
1300
1301impl ListLicenseConfigurationsError {
1302    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListLicenseConfigurationsError> {
1303        if let Some(err) = proto::json::Error::parse(&res) {
1304            match err.typ.as_str() {
1305                "AccessDeniedException" => {
1306                    return RusotoError::Service(ListLicenseConfigurationsError::AccessDenied(
1307                        err.msg,
1308                    ))
1309                }
1310                "AuthorizationException" => {
1311                    return RusotoError::Service(ListLicenseConfigurationsError::Authorization(
1312                        err.msg,
1313                    ))
1314                }
1315                "FilterLimitExceededException" => {
1316                    return RusotoError::Service(
1317                        ListLicenseConfigurationsError::FilterLimitExceeded(err.msg),
1318                    )
1319                }
1320                "InvalidParameterValueException" => {
1321                    return RusotoError::Service(
1322                        ListLicenseConfigurationsError::InvalidParameterValue(err.msg),
1323                    )
1324                }
1325                "RateLimitExceededException" => {
1326                    return RusotoError::Service(ListLicenseConfigurationsError::RateLimitExceeded(
1327                        err.msg,
1328                    ))
1329                }
1330                "ServerInternalException" => {
1331                    return RusotoError::Service(ListLicenseConfigurationsError::ServerInternal(
1332                        err.msg,
1333                    ))
1334                }
1335                "ValidationException" => return RusotoError::Validation(err.msg),
1336                _ => {}
1337            }
1338        }
1339        RusotoError::Unknown(res)
1340    }
1341}
1342impl fmt::Display for ListLicenseConfigurationsError {
1343    #[allow(unused_variables)]
1344    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1345        match *self {
1346            ListLicenseConfigurationsError::AccessDenied(ref cause) => write!(f, "{}", cause),
1347            ListLicenseConfigurationsError::Authorization(ref cause) => write!(f, "{}", cause),
1348            ListLicenseConfigurationsError::FilterLimitExceeded(ref cause) => {
1349                write!(f, "{}", cause)
1350            }
1351            ListLicenseConfigurationsError::InvalidParameterValue(ref cause) => {
1352                write!(f, "{}", cause)
1353            }
1354            ListLicenseConfigurationsError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
1355            ListLicenseConfigurationsError::ServerInternal(ref cause) => write!(f, "{}", cause),
1356        }
1357    }
1358}
1359impl Error for ListLicenseConfigurationsError {}
1360/// Errors returned by ListLicenseSpecificationsForResource
1361#[derive(Debug, PartialEq)]
1362pub enum ListLicenseSpecificationsForResourceError {
1363    /// <p>Access to resource denied.</p>
1364    AccessDenied(String),
1365    /// <p>The AWS user account does not have permission to perform the action. Check the IAM policy associated with this account.</p>
1366    Authorization(String),
1367    /// <p>One or more parameter values are not valid.</p>
1368    InvalidParameterValue(String),
1369    /// <p>Too many requests have been submitted. Try again after a brief wait.</p>
1370    RateLimitExceeded(String),
1371    /// <p>The server experienced an internal error. Try again.</p>
1372    ServerInternal(String),
1373}
1374
1375impl ListLicenseSpecificationsForResourceError {
1376    pub fn from_response(
1377        res: BufferedHttpResponse,
1378    ) -> RusotoError<ListLicenseSpecificationsForResourceError> {
1379        if let Some(err) = proto::json::Error::parse(&res) {
1380            match err.typ.as_str() {
1381                "AccessDeniedException" => {
1382                    return RusotoError::Service(
1383                        ListLicenseSpecificationsForResourceError::AccessDenied(err.msg),
1384                    )
1385                }
1386                "AuthorizationException" => {
1387                    return RusotoError::Service(
1388                        ListLicenseSpecificationsForResourceError::Authorization(err.msg),
1389                    )
1390                }
1391                "InvalidParameterValueException" => {
1392                    return RusotoError::Service(
1393                        ListLicenseSpecificationsForResourceError::InvalidParameterValue(err.msg),
1394                    )
1395                }
1396                "RateLimitExceededException" => {
1397                    return RusotoError::Service(
1398                        ListLicenseSpecificationsForResourceError::RateLimitExceeded(err.msg),
1399                    )
1400                }
1401                "ServerInternalException" => {
1402                    return RusotoError::Service(
1403                        ListLicenseSpecificationsForResourceError::ServerInternal(err.msg),
1404                    )
1405                }
1406                "ValidationException" => return RusotoError::Validation(err.msg),
1407                _ => {}
1408            }
1409        }
1410        RusotoError::Unknown(res)
1411    }
1412}
1413impl fmt::Display for ListLicenseSpecificationsForResourceError {
1414    #[allow(unused_variables)]
1415    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1416        match *self {
1417            ListLicenseSpecificationsForResourceError::AccessDenied(ref cause) => {
1418                write!(f, "{}", cause)
1419            }
1420            ListLicenseSpecificationsForResourceError::Authorization(ref cause) => {
1421                write!(f, "{}", cause)
1422            }
1423            ListLicenseSpecificationsForResourceError::InvalidParameterValue(ref cause) => {
1424                write!(f, "{}", cause)
1425            }
1426            ListLicenseSpecificationsForResourceError::RateLimitExceeded(ref cause) => {
1427                write!(f, "{}", cause)
1428            }
1429            ListLicenseSpecificationsForResourceError::ServerInternal(ref cause) => {
1430                write!(f, "{}", cause)
1431            }
1432        }
1433    }
1434}
1435impl Error for ListLicenseSpecificationsForResourceError {}
1436/// Errors returned by ListResourceInventory
1437#[derive(Debug, PartialEq)]
1438pub enum ListResourceInventoryError {
1439    /// <p>Access to resource denied.</p>
1440    AccessDenied(String),
1441    /// <p>The AWS user account does not have permission to perform the action. Check the IAM policy associated with this account.</p>
1442    Authorization(String),
1443    /// <p>A dependency required to run the API is missing.</p>
1444    FailedDependency(String),
1445    /// <p>The request uses too many filters or too many filter values.</p>
1446    FilterLimitExceeded(String),
1447    /// <p>One or more parameter values are not valid.</p>
1448    InvalidParameterValue(String),
1449    /// <p>Too many requests have been submitted. Try again after a brief wait.</p>
1450    RateLimitExceeded(String),
1451    /// <p>The server experienced an internal error. Try again.</p>
1452    ServerInternal(String),
1453}
1454
1455impl ListResourceInventoryError {
1456    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListResourceInventoryError> {
1457        if let Some(err) = proto::json::Error::parse(&res) {
1458            match err.typ.as_str() {
1459                "AccessDeniedException" => {
1460                    return RusotoError::Service(ListResourceInventoryError::AccessDenied(err.msg))
1461                }
1462                "AuthorizationException" => {
1463                    return RusotoError::Service(ListResourceInventoryError::Authorization(err.msg))
1464                }
1465                "FailedDependencyException" => {
1466                    return RusotoError::Service(ListResourceInventoryError::FailedDependency(
1467                        err.msg,
1468                    ))
1469                }
1470                "FilterLimitExceededException" => {
1471                    return RusotoError::Service(ListResourceInventoryError::FilterLimitExceeded(
1472                        err.msg,
1473                    ))
1474                }
1475                "InvalidParameterValueException" => {
1476                    return RusotoError::Service(ListResourceInventoryError::InvalidParameterValue(
1477                        err.msg,
1478                    ))
1479                }
1480                "RateLimitExceededException" => {
1481                    return RusotoError::Service(ListResourceInventoryError::RateLimitExceeded(
1482                        err.msg,
1483                    ))
1484                }
1485                "ServerInternalException" => {
1486                    return RusotoError::Service(ListResourceInventoryError::ServerInternal(
1487                        err.msg,
1488                    ))
1489                }
1490                "ValidationException" => return RusotoError::Validation(err.msg),
1491                _ => {}
1492            }
1493        }
1494        RusotoError::Unknown(res)
1495    }
1496}
1497impl fmt::Display for ListResourceInventoryError {
1498    #[allow(unused_variables)]
1499    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1500        match *self {
1501            ListResourceInventoryError::AccessDenied(ref cause) => write!(f, "{}", cause),
1502            ListResourceInventoryError::Authorization(ref cause) => write!(f, "{}", cause),
1503            ListResourceInventoryError::FailedDependency(ref cause) => write!(f, "{}", cause),
1504            ListResourceInventoryError::FilterLimitExceeded(ref cause) => write!(f, "{}", cause),
1505            ListResourceInventoryError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
1506            ListResourceInventoryError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
1507            ListResourceInventoryError::ServerInternal(ref cause) => write!(f, "{}", cause),
1508        }
1509    }
1510}
1511impl Error for ListResourceInventoryError {}
1512/// Errors returned by ListTagsForResource
1513#[derive(Debug, PartialEq)]
1514pub enum ListTagsForResourceError {
1515    /// <p>Access to resource denied.</p>
1516    AccessDenied(String),
1517    /// <p>The AWS user account does not have permission to perform the action. Check the IAM policy associated with this account.</p>
1518    Authorization(String),
1519    /// <p>One or more parameter values are not valid.</p>
1520    InvalidParameterValue(String),
1521    /// <p>Too many requests have been submitted. Try again after a brief wait.</p>
1522    RateLimitExceeded(String),
1523    /// <p>The server experienced an internal error. Try again.</p>
1524    ServerInternal(String),
1525}
1526
1527impl ListTagsForResourceError {
1528    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
1529        if let Some(err) = proto::json::Error::parse(&res) {
1530            match err.typ.as_str() {
1531                "AccessDeniedException" => {
1532                    return RusotoError::Service(ListTagsForResourceError::AccessDenied(err.msg))
1533                }
1534                "AuthorizationException" => {
1535                    return RusotoError::Service(ListTagsForResourceError::Authorization(err.msg))
1536                }
1537                "InvalidParameterValueException" => {
1538                    return RusotoError::Service(ListTagsForResourceError::InvalidParameterValue(
1539                        err.msg,
1540                    ))
1541                }
1542                "RateLimitExceededException" => {
1543                    return RusotoError::Service(ListTagsForResourceError::RateLimitExceeded(
1544                        err.msg,
1545                    ))
1546                }
1547                "ServerInternalException" => {
1548                    return RusotoError::Service(ListTagsForResourceError::ServerInternal(err.msg))
1549                }
1550                "ValidationException" => return RusotoError::Validation(err.msg),
1551                _ => {}
1552            }
1553        }
1554        RusotoError::Unknown(res)
1555    }
1556}
1557impl fmt::Display for ListTagsForResourceError {
1558    #[allow(unused_variables)]
1559    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1560        match *self {
1561            ListTagsForResourceError::AccessDenied(ref cause) => write!(f, "{}", cause),
1562            ListTagsForResourceError::Authorization(ref cause) => write!(f, "{}", cause),
1563            ListTagsForResourceError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
1564            ListTagsForResourceError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
1565            ListTagsForResourceError::ServerInternal(ref cause) => write!(f, "{}", cause),
1566        }
1567    }
1568}
1569impl Error for ListTagsForResourceError {}
1570/// Errors returned by ListUsageForLicenseConfiguration
1571#[derive(Debug, PartialEq)]
1572pub enum ListUsageForLicenseConfigurationError {
1573    /// <p>Access to resource denied.</p>
1574    AccessDenied(String),
1575    /// <p>The AWS user account does not have permission to perform the action. Check the IAM policy associated with this account.</p>
1576    Authorization(String),
1577    /// <p>The request uses too many filters or too many filter values.</p>
1578    FilterLimitExceeded(String),
1579    /// <p>One or more parameter values are not valid.</p>
1580    InvalidParameterValue(String),
1581    /// <p>Too many requests have been submitted. Try again after a brief wait.</p>
1582    RateLimitExceeded(String),
1583    /// <p>The server experienced an internal error. Try again.</p>
1584    ServerInternal(String),
1585}
1586
1587impl ListUsageForLicenseConfigurationError {
1588    pub fn from_response(
1589        res: BufferedHttpResponse,
1590    ) -> RusotoError<ListUsageForLicenseConfigurationError> {
1591        if let Some(err) = proto::json::Error::parse(&res) {
1592            match err.typ.as_str() {
1593                "AccessDeniedException" => {
1594                    return RusotoError::Service(
1595                        ListUsageForLicenseConfigurationError::AccessDenied(err.msg),
1596                    )
1597                }
1598                "AuthorizationException" => {
1599                    return RusotoError::Service(
1600                        ListUsageForLicenseConfigurationError::Authorization(err.msg),
1601                    )
1602                }
1603                "FilterLimitExceededException" => {
1604                    return RusotoError::Service(
1605                        ListUsageForLicenseConfigurationError::FilterLimitExceeded(err.msg),
1606                    )
1607                }
1608                "InvalidParameterValueException" => {
1609                    return RusotoError::Service(
1610                        ListUsageForLicenseConfigurationError::InvalidParameterValue(err.msg),
1611                    )
1612                }
1613                "RateLimitExceededException" => {
1614                    return RusotoError::Service(
1615                        ListUsageForLicenseConfigurationError::RateLimitExceeded(err.msg),
1616                    )
1617                }
1618                "ServerInternalException" => {
1619                    return RusotoError::Service(
1620                        ListUsageForLicenseConfigurationError::ServerInternal(err.msg),
1621                    )
1622                }
1623                "ValidationException" => return RusotoError::Validation(err.msg),
1624                _ => {}
1625            }
1626        }
1627        RusotoError::Unknown(res)
1628    }
1629}
1630impl fmt::Display for ListUsageForLicenseConfigurationError {
1631    #[allow(unused_variables)]
1632    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1633        match *self {
1634            ListUsageForLicenseConfigurationError::AccessDenied(ref cause) => {
1635                write!(f, "{}", cause)
1636            }
1637            ListUsageForLicenseConfigurationError::Authorization(ref cause) => {
1638                write!(f, "{}", cause)
1639            }
1640            ListUsageForLicenseConfigurationError::FilterLimitExceeded(ref cause) => {
1641                write!(f, "{}", cause)
1642            }
1643            ListUsageForLicenseConfigurationError::InvalidParameterValue(ref cause) => {
1644                write!(f, "{}", cause)
1645            }
1646            ListUsageForLicenseConfigurationError::RateLimitExceeded(ref cause) => {
1647                write!(f, "{}", cause)
1648            }
1649            ListUsageForLicenseConfigurationError::ServerInternal(ref cause) => {
1650                write!(f, "{}", cause)
1651            }
1652        }
1653    }
1654}
1655impl Error for ListUsageForLicenseConfigurationError {}
1656/// Errors returned by TagResource
1657#[derive(Debug, PartialEq)]
1658pub enum TagResourceError {
1659    /// <p>Access to resource denied.</p>
1660    AccessDenied(String),
1661    /// <p>The AWS user account does not have permission to perform the action. Check the IAM policy associated with this account.</p>
1662    Authorization(String),
1663    /// <p>One or more parameter values are not valid.</p>
1664    InvalidParameterValue(String),
1665    /// <p>Too many requests have been submitted. Try again after a brief wait.</p>
1666    RateLimitExceeded(String),
1667    /// <p>The server experienced an internal error. Try again.</p>
1668    ServerInternal(String),
1669}
1670
1671impl TagResourceError {
1672    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
1673        if let Some(err) = proto::json::Error::parse(&res) {
1674            match err.typ.as_str() {
1675                "AccessDeniedException" => {
1676                    return RusotoError::Service(TagResourceError::AccessDenied(err.msg))
1677                }
1678                "AuthorizationException" => {
1679                    return RusotoError::Service(TagResourceError::Authorization(err.msg))
1680                }
1681                "InvalidParameterValueException" => {
1682                    return RusotoError::Service(TagResourceError::InvalidParameterValue(err.msg))
1683                }
1684                "RateLimitExceededException" => {
1685                    return RusotoError::Service(TagResourceError::RateLimitExceeded(err.msg))
1686                }
1687                "ServerInternalException" => {
1688                    return RusotoError::Service(TagResourceError::ServerInternal(err.msg))
1689                }
1690                "ValidationException" => return RusotoError::Validation(err.msg),
1691                _ => {}
1692            }
1693        }
1694        RusotoError::Unknown(res)
1695    }
1696}
1697impl fmt::Display for TagResourceError {
1698    #[allow(unused_variables)]
1699    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1700        match *self {
1701            TagResourceError::AccessDenied(ref cause) => write!(f, "{}", cause),
1702            TagResourceError::Authorization(ref cause) => write!(f, "{}", cause),
1703            TagResourceError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
1704            TagResourceError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
1705            TagResourceError::ServerInternal(ref cause) => write!(f, "{}", cause),
1706        }
1707    }
1708}
1709impl Error for TagResourceError {}
1710/// Errors returned by UntagResource
1711#[derive(Debug, PartialEq)]
1712pub enum UntagResourceError {
1713    /// <p>Access to resource denied.</p>
1714    AccessDenied(String),
1715    /// <p>The AWS user account does not have permission to perform the action. Check the IAM policy associated with this account.</p>
1716    Authorization(String),
1717    /// <p>One or more parameter values are not valid.</p>
1718    InvalidParameterValue(String),
1719    /// <p>Too many requests have been submitted. Try again after a brief wait.</p>
1720    RateLimitExceeded(String),
1721    /// <p>The server experienced an internal error. Try again.</p>
1722    ServerInternal(String),
1723}
1724
1725impl UntagResourceError {
1726    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
1727        if let Some(err) = proto::json::Error::parse(&res) {
1728            match err.typ.as_str() {
1729                "AccessDeniedException" => {
1730                    return RusotoError::Service(UntagResourceError::AccessDenied(err.msg))
1731                }
1732                "AuthorizationException" => {
1733                    return RusotoError::Service(UntagResourceError::Authorization(err.msg))
1734                }
1735                "InvalidParameterValueException" => {
1736                    return RusotoError::Service(UntagResourceError::InvalidParameterValue(err.msg))
1737                }
1738                "RateLimitExceededException" => {
1739                    return RusotoError::Service(UntagResourceError::RateLimitExceeded(err.msg))
1740                }
1741                "ServerInternalException" => {
1742                    return RusotoError::Service(UntagResourceError::ServerInternal(err.msg))
1743                }
1744                "ValidationException" => return RusotoError::Validation(err.msg),
1745                _ => {}
1746            }
1747        }
1748        RusotoError::Unknown(res)
1749    }
1750}
1751impl fmt::Display for UntagResourceError {
1752    #[allow(unused_variables)]
1753    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1754        match *self {
1755            UntagResourceError::AccessDenied(ref cause) => write!(f, "{}", cause),
1756            UntagResourceError::Authorization(ref cause) => write!(f, "{}", cause),
1757            UntagResourceError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
1758            UntagResourceError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
1759            UntagResourceError::ServerInternal(ref cause) => write!(f, "{}", cause),
1760        }
1761    }
1762}
1763impl Error for UntagResourceError {}
1764/// Errors returned by UpdateLicenseConfiguration
1765#[derive(Debug, PartialEq)]
1766pub enum UpdateLicenseConfigurationError {
1767    /// <p>Access to resource denied.</p>
1768    AccessDenied(String),
1769    /// <p>The AWS user account does not have permission to perform the action. Check the IAM policy associated with this account.</p>
1770    Authorization(String),
1771    /// <p>One or more parameter values are not valid.</p>
1772    InvalidParameterValue(String),
1773    /// <p>Too many requests have been submitted. Try again after a brief wait.</p>
1774    RateLimitExceeded(String),
1775    /// <p>The server experienced an internal error. Try again.</p>
1776    ServerInternal(String),
1777}
1778
1779impl UpdateLicenseConfigurationError {
1780    pub fn from_response(
1781        res: BufferedHttpResponse,
1782    ) -> RusotoError<UpdateLicenseConfigurationError> {
1783        if let Some(err) = proto::json::Error::parse(&res) {
1784            match err.typ.as_str() {
1785                "AccessDeniedException" => {
1786                    return RusotoError::Service(UpdateLicenseConfigurationError::AccessDenied(
1787                        err.msg,
1788                    ))
1789                }
1790                "AuthorizationException" => {
1791                    return RusotoError::Service(UpdateLicenseConfigurationError::Authorization(
1792                        err.msg,
1793                    ))
1794                }
1795                "InvalidParameterValueException" => {
1796                    return RusotoError::Service(
1797                        UpdateLicenseConfigurationError::InvalidParameterValue(err.msg),
1798                    )
1799                }
1800                "RateLimitExceededException" => {
1801                    return RusotoError::Service(
1802                        UpdateLicenseConfigurationError::RateLimitExceeded(err.msg),
1803                    )
1804                }
1805                "ServerInternalException" => {
1806                    return RusotoError::Service(UpdateLicenseConfigurationError::ServerInternal(
1807                        err.msg,
1808                    ))
1809                }
1810                "ValidationException" => return RusotoError::Validation(err.msg),
1811                _ => {}
1812            }
1813        }
1814        RusotoError::Unknown(res)
1815    }
1816}
1817impl fmt::Display for UpdateLicenseConfigurationError {
1818    #[allow(unused_variables)]
1819    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1820        match *self {
1821            UpdateLicenseConfigurationError::AccessDenied(ref cause) => write!(f, "{}", cause),
1822            UpdateLicenseConfigurationError::Authorization(ref cause) => write!(f, "{}", cause),
1823            UpdateLicenseConfigurationError::InvalidParameterValue(ref cause) => {
1824                write!(f, "{}", cause)
1825            }
1826            UpdateLicenseConfigurationError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
1827            UpdateLicenseConfigurationError::ServerInternal(ref cause) => write!(f, "{}", cause),
1828        }
1829    }
1830}
1831impl Error for UpdateLicenseConfigurationError {}
1832/// Errors returned by UpdateLicenseSpecificationsForResource
1833#[derive(Debug, PartialEq)]
1834pub enum UpdateLicenseSpecificationsForResourceError {
1835    /// <p>Access to resource denied.</p>
1836    AccessDenied(String),
1837    /// <p>The AWS user account does not have permission to perform the action. Check the IAM policy associated with this account.</p>
1838    Authorization(String),
1839    /// <p>One or more parameter values are not valid.</p>
1840    InvalidParameterValue(String),
1841    /// <p>License Manager cannot allocate a license to a resource because of its state. </p> <p>For example, you cannot allocate a license to an instance in the process of shutting down.</p>
1842    InvalidResourceState(String),
1843    /// <p>You do not have enough licenses available to support a new resource launch.</p>
1844    LicenseUsage(String),
1845    /// <p>Too many requests have been submitted. Try again after a brief wait.</p>
1846    RateLimitExceeded(String),
1847    /// <p>The server experienced an internal error. Try again.</p>
1848    ServerInternal(String),
1849}
1850
1851impl UpdateLicenseSpecificationsForResourceError {
1852    pub fn from_response(
1853        res: BufferedHttpResponse,
1854    ) -> RusotoError<UpdateLicenseSpecificationsForResourceError> {
1855        if let Some(err) = proto::json::Error::parse(&res) {
1856            match err.typ.as_str() {
1857                "AccessDeniedException" => {
1858                    return RusotoError::Service(
1859                        UpdateLicenseSpecificationsForResourceError::AccessDenied(err.msg),
1860                    )
1861                }
1862                "AuthorizationException" => {
1863                    return RusotoError::Service(
1864                        UpdateLicenseSpecificationsForResourceError::Authorization(err.msg),
1865                    )
1866                }
1867                "InvalidParameterValueException" => {
1868                    return RusotoError::Service(
1869                        UpdateLicenseSpecificationsForResourceError::InvalidParameterValue(err.msg),
1870                    )
1871                }
1872                "InvalidResourceStateException" => {
1873                    return RusotoError::Service(
1874                        UpdateLicenseSpecificationsForResourceError::InvalidResourceState(err.msg),
1875                    )
1876                }
1877                "LicenseUsageException" => {
1878                    return RusotoError::Service(
1879                        UpdateLicenseSpecificationsForResourceError::LicenseUsage(err.msg),
1880                    )
1881                }
1882                "RateLimitExceededException" => {
1883                    return RusotoError::Service(
1884                        UpdateLicenseSpecificationsForResourceError::RateLimitExceeded(err.msg),
1885                    )
1886                }
1887                "ServerInternalException" => {
1888                    return RusotoError::Service(
1889                        UpdateLicenseSpecificationsForResourceError::ServerInternal(err.msg),
1890                    )
1891                }
1892                "ValidationException" => return RusotoError::Validation(err.msg),
1893                _ => {}
1894            }
1895        }
1896        RusotoError::Unknown(res)
1897    }
1898}
1899impl fmt::Display for UpdateLicenseSpecificationsForResourceError {
1900    #[allow(unused_variables)]
1901    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1902        match *self {
1903            UpdateLicenseSpecificationsForResourceError::AccessDenied(ref cause) => {
1904                write!(f, "{}", cause)
1905            }
1906            UpdateLicenseSpecificationsForResourceError::Authorization(ref cause) => {
1907                write!(f, "{}", cause)
1908            }
1909            UpdateLicenseSpecificationsForResourceError::InvalidParameterValue(ref cause) => {
1910                write!(f, "{}", cause)
1911            }
1912            UpdateLicenseSpecificationsForResourceError::InvalidResourceState(ref cause) => {
1913                write!(f, "{}", cause)
1914            }
1915            UpdateLicenseSpecificationsForResourceError::LicenseUsage(ref cause) => {
1916                write!(f, "{}", cause)
1917            }
1918            UpdateLicenseSpecificationsForResourceError::RateLimitExceeded(ref cause) => {
1919                write!(f, "{}", cause)
1920            }
1921            UpdateLicenseSpecificationsForResourceError::ServerInternal(ref cause) => {
1922                write!(f, "{}", cause)
1923            }
1924        }
1925    }
1926}
1927impl Error for UpdateLicenseSpecificationsForResourceError {}
1928/// Errors returned by UpdateServiceSettings
1929#[derive(Debug, PartialEq)]
1930pub enum UpdateServiceSettingsError {
1931    /// <p>Access to resource denied.</p>
1932    AccessDenied(String),
1933    /// <p>The AWS user account does not have permission to perform the action. Check the IAM policy associated with this account.</p>
1934    Authorization(String),
1935    /// <p>One or more parameter values are not valid.</p>
1936    InvalidParameterValue(String),
1937    /// <p>Too many requests have been submitted. Try again after a brief wait.</p>
1938    RateLimitExceeded(String),
1939    /// <p>The server experienced an internal error. Try again.</p>
1940    ServerInternal(String),
1941}
1942
1943impl UpdateServiceSettingsError {
1944    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateServiceSettingsError> {
1945        if let Some(err) = proto::json::Error::parse(&res) {
1946            match err.typ.as_str() {
1947                "AccessDeniedException" => {
1948                    return RusotoError::Service(UpdateServiceSettingsError::AccessDenied(err.msg))
1949                }
1950                "AuthorizationException" => {
1951                    return RusotoError::Service(UpdateServiceSettingsError::Authorization(err.msg))
1952                }
1953                "InvalidParameterValueException" => {
1954                    return RusotoError::Service(UpdateServiceSettingsError::InvalidParameterValue(
1955                        err.msg,
1956                    ))
1957                }
1958                "RateLimitExceededException" => {
1959                    return RusotoError::Service(UpdateServiceSettingsError::RateLimitExceeded(
1960                        err.msg,
1961                    ))
1962                }
1963                "ServerInternalException" => {
1964                    return RusotoError::Service(UpdateServiceSettingsError::ServerInternal(
1965                        err.msg,
1966                    ))
1967                }
1968                "ValidationException" => return RusotoError::Validation(err.msg),
1969                _ => {}
1970            }
1971        }
1972        RusotoError::Unknown(res)
1973    }
1974}
1975impl fmt::Display for UpdateServiceSettingsError {
1976    #[allow(unused_variables)]
1977    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1978        match *self {
1979            UpdateServiceSettingsError::AccessDenied(ref cause) => write!(f, "{}", cause),
1980            UpdateServiceSettingsError::Authorization(ref cause) => write!(f, "{}", cause),
1981            UpdateServiceSettingsError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
1982            UpdateServiceSettingsError::RateLimitExceeded(ref cause) => write!(f, "{}", cause),
1983            UpdateServiceSettingsError::ServerInternal(ref cause) => write!(f, "{}", cause),
1984        }
1985    }
1986}
1987impl Error for UpdateServiceSettingsError {}
1988/// Trait representing the capabilities of the AWS License Manager API. AWS License Manager clients implement this trait.
1989#[async_trait]
1990pub trait LicenseManager {
1991    /// <p>Creates a license configuration.</p> <p>A license configuration is an abstraction of a customer license agreement that can be consumed and enforced by License Manager. Components include specifications for the license type (licensing by instance, socket, CPU, or vCPU), allowed tenancy (shared tenancy, Dedicated Instance, Dedicated Host, or all of these), host affinity (how long a VM must be associated with a host), and the number of licenses purchased and used.</p>
1992    async fn create_license_configuration(
1993        &self,
1994        input: CreateLicenseConfigurationRequest,
1995    ) -> Result<CreateLicenseConfigurationResponse, RusotoError<CreateLicenseConfigurationError>>;
1996
1997    /// <p>Deletes the specified license configuration.</p> <p>You cannot delete a license configuration that is in use.</p>
1998    async fn delete_license_configuration(
1999        &self,
2000        input: DeleteLicenseConfigurationRequest,
2001    ) -> Result<DeleteLicenseConfigurationResponse, RusotoError<DeleteLicenseConfigurationError>>;
2002
2003    /// <p>Gets detailed information about the specified license configuration.</p>
2004    async fn get_license_configuration(
2005        &self,
2006        input: GetLicenseConfigurationRequest,
2007    ) -> Result<GetLicenseConfigurationResponse, RusotoError<GetLicenseConfigurationError>>;
2008
2009    /// <p>Gets the License Manager settings for the current Region.</p>
2010    async fn get_service_settings(
2011        &self,
2012    ) -> Result<GetServiceSettingsResponse, RusotoError<GetServiceSettingsError>>;
2013
2014    /// <p>Lists the resource associations for the specified license configuration.</p> <p>Resource associations need not consume licenses from a license configuration. For example, an AMI or a stopped instance might not consume a license (depending on the license rules).</p>
2015    async fn list_associations_for_license_configuration(
2016        &self,
2017        input: ListAssociationsForLicenseConfigurationRequest,
2018    ) -> Result<
2019        ListAssociationsForLicenseConfigurationResponse,
2020        RusotoError<ListAssociationsForLicenseConfigurationError>,
2021    >;
2022
2023    /// <p>Lists the license configuration operations that failed.</p>
2024    async fn list_failures_for_license_configuration_operations(
2025        &self,
2026        input: ListFailuresForLicenseConfigurationOperationsRequest,
2027    ) -> Result<
2028        ListFailuresForLicenseConfigurationOperationsResponse,
2029        RusotoError<ListFailuresForLicenseConfigurationOperationsError>,
2030    >;
2031
2032    /// <p>Lists the license configurations for your account.</p>
2033    async fn list_license_configurations(
2034        &self,
2035        input: ListLicenseConfigurationsRequest,
2036    ) -> Result<ListLicenseConfigurationsResponse, RusotoError<ListLicenseConfigurationsError>>;
2037
2038    /// <p>Describes the license configurations for the specified resource.</p>
2039    async fn list_license_specifications_for_resource(
2040        &self,
2041        input: ListLicenseSpecificationsForResourceRequest,
2042    ) -> Result<
2043        ListLicenseSpecificationsForResourceResponse,
2044        RusotoError<ListLicenseSpecificationsForResourceError>,
2045    >;
2046
2047    /// <p>Lists resources managed using Systems Manager inventory.</p>
2048    async fn list_resource_inventory(
2049        &self,
2050        input: ListResourceInventoryRequest,
2051    ) -> Result<ListResourceInventoryResponse, RusotoError<ListResourceInventoryError>>;
2052
2053    /// <p>Lists the tags for the specified license configuration.</p>
2054    async fn list_tags_for_resource(
2055        &self,
2056        input: ListTagsForResourceRequest,
2057    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>>;
2058
2059    /// <p>Lists all license usage records for a license configuration, displaying license consumption details by resource at a selected point in time. Use this action to audit the current license consumption for any license inventory and configuration.</p>
2060    async fn list_usage_for_license_configuration(
2061        &self,
2062        input: ListUsageForLicenseConfigurationRequest,
2063    ) -> Result<
2064        ListUsageForLicenseConfigurationResponse,
2065        RusotoError<ListUsageForLicenseConfigurationError>,
2066    >;
2067
2068    /// <p>Adds the specified tags to the specified license configuration.</p>
2069    async fn tag_resource(
2070        &self,
2071        input: TagResourceRequest,
2072    ) -> Result<TagResourceResponse, RusotoError<TagResourceError>>;
2073
2074    /// <p>Removes the specified tags from the specified license configuration.</p>
2075    async fn untag_resource(
2076        &self,
2077        input: UntagResourceRequest,
2078    ) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>>;
2079
2080    /// <p>Modifies the attributes of an existing license configuration.</p> <p>A license configuration is an abstraction of a customer license agreement that can be consumed and enforced by License Manager. Components include specifications for the license type (licensing by instance, socket, CPU, or vCPU), allowed tenancy (shared tenancy, Dedicated Instance, Dedicated Host, or all of these), host affinity (how long a VM must be associated with a host), and the number of licenses purchased and used.</p>
2081    async fn update_license_configuration(
2082        &self,
2083        input: UpdateLicenseConfigurationRequest,
2084    ) -> Result<UpdateLicenseConfigurationResponse, RusotoError<UpdateLicenseConfigurationError>>;
2085
2086    /// <p>Adds or removes the specified license configurations for the specified AWS resource.</p> <p>You can update the license specifications of AMIs, instances, and hosts. You cannot update the license specifications for launch templates and AWS CloudFormation templates, as they send license configurations to the operation that creates the resource.</p>
2087    async fn update_license_specifications_for_resource(
2088        &self,
2089        input: UpdateLicenseSpecificationsForResourceRequest,
2090    ) -> Result<
2091        UpdateLicenseSpecificationsForResourceResponse,
2092        RusotoError<UpdateLicenseSpecificationsForResourceError>,
2093    >;
2094
2095    /// <p>Updates License Manager settings for the current Region.</p>
2096    async fn update_service_settings(
2097        &self,
2098        input: UpdateServiceSettingsRequest,
2099    ) -> Result<UpdateServiceSettingsResponse, RusotoError<UpdateServiceSettingsError>>;
2100}
2101/// A client for the AWS License Manager API.
2102#[derive(Clone)]
2103pub struct LicenseManagerClient {
2104    client: Client,
2105    region: region::Region,
2106}
2107
2108impl LicenseManagerClient {
2109    /// Creates a client backed by the default tokio event loop.
2110    ///
2111    /// The client will use the default credentials provider and tls client.
2112    pub fn new(region: region::Region) -> LicenseManagerClient {
2113        LicenseManagerClient {
2114            client: Client::shared(),
2115            region,
2116        }
2117    }
2118
2119    pub fn new_with<P, D>(
2120        request_dispatcher: D,
2121        credentials_provider: P,
2122        region: region::Region,
2123    ) -> LicenseManagerClient
2124    where
2125        P: ProvideAwsCredentials + Send + Sync + 'static,
2126        D: DispatchSignedRequest + Send + Sync + 'static,
2127    {
2128        LicenseManagerClient {
2129            client: Client::new_with(credentials_provider, request_dispatcher),
2130            region,
2131        }
2132    }
2133
2134    pub fn new_with_client(client: Client, region: region::Region) -> LicenseManagerClient {
2135        LicenseManagerClient { client, region }
2136    }
2137}
2138
2139#[async_trait]
2140impl LicenseManager for LicenseManagerClient {
2141    /// <p>Creates a license configuration.</p> <p>A license configuration is an abstraction of a customer license agreement that can be consumed and enforced by License Manager. Components include specifications for the license type (licensing by instance, socket, CPU, or vCPU), allowed tenancy (shared tenancy, Dedicated Instance, Dedicated Host, or all of these), host affinity (how long a VM must be associated with a host), and the number of licenses purchased and used.</p>
2142    async fn create_license_configuration(
2143        &self,
2144        input: CreateLicenseConfigurationRequest,
2145    ) -> Result<CreateLicenseConfigurationResponse, RusotoError<CreateLicenseConfigurationError>>
2146    {
2147        let mut request = self.new_signed_request("POST", "/");
2148        request.add_header(
2149            "x-amz-target",
2150            "AWSLicenseManager.CreateLicenseConfiguration",
2151        );
2152        let encoded = serde_json::to_string(&input).unwrap();
2153        request.set_payload(Some(encoded));
2154
2155        let response = self
2156            .sign_and_dispatch(request, CreateLicenseConfigurationError::from_response)
2157            .await?;
2158        let mut response = response;
2159        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2160        proto::json::ResponsePayload::new(&response)
2161            .deserialize::<CreateLicenseConfigurationResponse, _>()
2162    }
2163
2164    /// <p>Deletes the specified license configuration.</p> <p>You cannot delete a license configuration that is in use.</p>
2165    async fn delete_license_configuration(
2166        &self,
2167        input: DeleteLicenseConfigurationRequest,
2168    ) -> Result<DeleteLicenseConfigurationResponse, RusotoError<DeleteLicenseConfigurationError>>
2169    {
2170        let mut request = self.new_signed_request("POST", "/");
2171        request.add_header(
2172            "x-amz-target",
2173            "AWSLicenseManager.DeleteLicenseConfiguration",
2174        );
2175        let encoded = serde_json::to_string(&input).unwrap();
2176        request.set_payload(Some(encoded));
2177
2178        let response = self
2179            .sign_and_dispatch(request, DeleteLicenseConfigurationError::from_response)
2180            .await?;
2181        let mut response = response;
2182        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2183        proto::json::ResponsePayload::new(&response)
2184            .deserialize::<DeleteLicenseConfigurationResponse, _>()
2185    }
2186
2187    /// <p>Gets detailed information about the specified license configuration.</p>
2188    async fn get_license_configuration(
2189        &self,
2190        input: GetLicenseConfigurationRequest,
2191    ) -> Result<GetLicenseConfigurationResponse, RusotoError<GetLicenseConfigurationError>> {
2192        let mut request = self.new_signed_request("POST", "/");
2193        request.add_header("x-amz-target", "AWSLicenseManager.GetLicenseConfiguration");
2194        let encoded = serde_json::to_string(&input).unwrap();
2195        request.set_payload(Some(encoded));
2196
2197        let response = self
2198            .sign_and_dispatch(request, GetLicenseConfigurationError::from_response)
2199            .await?;
2200        let mut response = response;
2201        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2202        proto::json::ResponsePayload::new(&response)
2203            .deserialize::<GetLicenseConfigurationResponse, _>()
2204    }
2205
2206    /// <p>Gets the License Manager settings for the current Region.</p>
2207    async fn get_service_settings(
2208        &self,
2209    ) -> Result<GetServiceSettingsResponse, RusotoError<GetServiceSettingsError>> {
2210        let mut request = self.new_signed_request("POST", "/");
2211        request.add_header("x-amz-target", "AWSLicenseManager.GetServiceSettings");
2212        request.set_payload(Some(bytes::Bytes::from_static(b"{}")));
2213
2214        let response = self
2215            .sign_and_dispatch(request, GetServiceSettingsError::from_response)
2216            .await?;
2217        let mut response = response;
2218        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2219        proto::json::ResponsePayload::new(&response).deserialize::<GetServiceSettingsResponse, _>()
2220    }
2221
2222    /// <p>Lists the resource associations for the specified license configuration.</p> <p>Resource associations need not consume licenses from a license configuration. For example, an AMI or a stopped instance might not consume a license (depending on the license rules).</p>
2223    async fn list_associations_for_license_configuration(
2224        &self,
2225        input: ListAssociationsForLicenseConfigurationRequest,
2226    ) -> Result<
2227        ListAssociationsForLicenseConfigurationResponse,
2228        RusotoError<ListAssociationsForLicenseConfigurationError>,
2229    > {
2230        let mut request = self.new_signed_request("POST", "/");
2231        request.add_header(
2232            "x-amz-target",
2233            "AWSLicenseManager.ListAssociationsForLicenseConfiguration",
2234        );
2235        let encoded = serde_json::to_string(&input).unwrap();
2236        request.set_payload(Some(encoded));
2237
2238        let response = self
2239            .sign_and_dispatch(
2240                request,
2241                ListAssociationsForLicenseConfigurationError::from_response,
2242            )
2243            .await?;
2244        let mut response = response;
2245        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2246        proto::json::ResponsePayload::new(&response)
2247            .deserialize::<ListAssociationsForLicenseConfigurationResponse, _>()
2248    }
2249
2250    /// <p>Lists the license configuration operations that failed.</p>
2251    async fn list_failures_for_license_configuration_operations(
2252        &self,
2253        input: ListFailuresForLicenseConfigurationOperationsRequest,
2254    ) -> Result<
2255        ListFailuresForLicenseConfigurationOperationsResponse,
2256        RusotoError<ListFailuresForLicenseConfigurationOperationsError>,
2257    > {
2258        let mut request = self.new_signed_request("POST", "/");
2259        request.add_header(
2260            "x-amz-target",
2261            "AWSLicenseManager.ListFailuresForLicenseConfigurationOperations",
2262        );
2263        let encoded = serde_json::to_string(&input).unwrap();
2264        request.set_payload(Some(encoded));
2265
2266        let response = self
2267            .sign_and_dispatch(
2268                request,
2269                ListFailuresForLicenseConfigurationOperationsError::from_response,
2270            )
2271            .await?;
2272        let mut response = response;
2273        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2274        proto::json::ResponsePayload::new(&response)
2275            .deserialize::<ListFailuresForLicenseConfigurationOperationsResponse, _>()
2276    }
2277
2278    /// <p>Lists the license configurations for your account.</p>
2279    async fn list_license_configurations(
2280        &self,
2281        input: ListLicenseConfigurationsRequest,
2282    ) -> Result<ListLicenseConfigurationsResponse, RusotoError<ListLicenseConfigurationsError>>
2283    {
2284        let mut request = self.new_signed_request("POST", "/");
2285        request.add_header(
2286            "x-amz-target",
2287            "AWSLicenseManager.ListLicenseConfigurations",
2288        );
2289        let encoded = serde_json::to_string(&input).unwrap();
2290        request.set_payload(Some(encoded));
2291
2292        let response = self
2293            .sign_and_dispatch(request, ListLicenseConfigurationsError::from_response)
2294            .await?;
2295        let mut response = response;
2296        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2297        proto::json::ResponsePayload::new(&response)
2298            .deserialize::<ListLicenseConfigurationsResponse, _>()
2299    }
2300
2301    /// <p>Describes the license configurations for the specified resource.</p>
2302    async fn list_license_specifications_for_resource(
2303        &self,
2304        input: ListLicenseSpecificationsForResourceRequest,
2305    ) -> Result<
2306        ListLicenseSpecificationsForResourceResponse,
2307        RusotoError<ListLicenseSpecificationsForResourceError>,
2308    > {
2309        let mut request = self.new_signed_request("POST", "/");
2310        request.add_header(
2311            "x-amz-target",
2312            "AWSLicenseManager.ListLicenseSpecificationsForResource",
2313        );
2314        let encoded = serde_json::to_string(&input).unwrap();
2315        request.set_payload(Some(encoded));
2316
2317        let response = self
2318            .sign_and_dispatch(
2319                request,
2320                ListLicenseSpecificationsForResourceError::from_response,
2321            )
2322            .await?;
2323        let mut response = response;
2324        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2325        proto::json::ResponsePayload::new(&response)
2326            .deserialize::<ListLicenseSpecificationsForResourceResponse, _>()
2327    }
2328
2329    /// <p>Lists resources managed using Systems Manager inventory.</p>
2330    async fn list_resource_inventory(
2331        &self,
2332        input: ListResourceInventoryRequest,
2333    ) -> Result<ListResourceInventoryResponse, RusotoError<ListResourceInventoryError>> {
2334        let mut request = self.new_signed_request("POST", "/");
2335        request.add_header("x-amz-target", "AWSLicenseManager.ListResourceInventory");
2336        let encoded = serde_json::to_string(&input).unwrap();
2337        request.set_payload(Some(encoded));
2338
2339        let response = self
2340            .sign_and_dispatch(request, ListResourceInventoryError::from_response)
2341            .await?;
2342        let mut response = response;
2343        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2344        proto::json::ResponsePayload::new(&response)
2345            .deserialize::<ListResourceInventoryResponse, _>()
2346    }
2347
2348    /// <p>Lists the tags for the specified license configuration.</p>
2349    async fn list_tags_for_resource(
2350        &self,
2351        input: ListTagsForResourceRequest,
2352    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>> {
2353        let mut request = self.new_signed_request("POST", "/");
2354        request.add_header("x-amz-target", "AWSLicenseManager.ListTagsForResource");
2355        let encoded = serde_json::to_string(&input).unwrap();
2356        request.set_payload(Some(encoded));
2357
2358        let response = self
2359            .sign_and_dispatch(request, ListTagsForResourceError::from_response)
2360            .await?;
2361        let mut response = response;
2362        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2363        proto::json::ResponsePayload::new(&response).deserialize::<ListTagsForResourceResponse, _>()
2364    }
2365
2366    /// <p>Lists all license usage records for a license configuration, displaying license consumption details by resource at a selected point in time. Use this action to audit the current license consumption for any license inventory and configuration.</p>
2367    async fn list_usage_for_license_configuration(
2368        &self,
2369        input: ListUsageForLicenseConfigurationRequest,
2370    ) -> Result<
2371        ListUsageForLicenseConfigurationResponse,
2372        RusotoError<ListUsageForLicenseConfigurationError>,
2373    > {
2374        let mut request = self.new_signed_request("POST", "/");
2375        request.add_header(
2376            "x-amz-target",
2377            "AWSLicenseManager.ListUsageForLicenseConfiguration",
2378        );
2379        let encoded = serde_json::to_string(&input).unwrap();
2380        request.set_payload(Some(encoded));
2381
2382        let response = self
2383            .sign_and_dispatch(
2384                request,
2385                ListUsageForLicenseConfigurationError::from_response,
2386            )
2387            .await?;
2388        let mut response = response;
2389        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2390        proto::json::ResponsePayload::new(&response)
2391            .deserialize::<ListUsageForLicenseConfigurationResponse, _>()
2392    }
2393
2394    /// <p>Adds the specified tags to the specified license configuration.</p>
2395    async fn tag_resource(
2396        &self,
2397        input: TagResourceRequest,
2398    ) -> Result<TagResourceResponse, RusotoError<TagResourceError>> {
2399        let mut request = self.new_signed_request("POST", "/");
2400        request.add_header("x-amz-target", "AWSLicenseManager.TagResource");
2401        let encoded = serde_json::to_string(&input).unwrap();
2402        request.set_payload(Some(encoded));
2403
2404        let response = self
2405            .sign_and_dispatch(request, TagResourceError::from_response)
2406            .await?;
2407        let mut response = response;
2408        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2409        proto::json::ResponsePayload::new(&response).deserialize::<TagResourceResponse, _>()
2410    }
2411
2412    /// <p>Removes the specified tags from the specified license configuration.</p>
2413    async fn untag_resource(
2414        &self,
2415        input: UntagResourceRequest,
2416    ) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>> {
2417        let mut request = self.new_signed_request("POST", "/");
2418        request.add_header("x-amz-target", "AWSLicenseManager.UntagResource");
2419        let encoded = serde_json::to_string(&input).unwrap();
2420        request.set_payload(Some(encoded));
2421
2422        let response = self
2423            .sign_and_dispatch(request, UntagResourceError::from_response)
2424            .await?;
2425        let mut response = response;
2426        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2427        proto::json::ResponsePayload::new(&response).deserialize::<UntagResourceResponse, _>()
2428    }
2429
2430    /// <p>Modifies the attributes of an existing license configuration.</p> <p>A license configuration is an abstraction of a customer license agreement that can be consumed and enforced by License Manager. Components include specifications for the license type (licensing by instance, socket, CPU, or vCPU), allowed tenancy (shared tenancy, Dedicated Instance, Dedicated Host, or all of these), host affinity (how long a VM must be associated with a host), and the number of licenses purchased and used.</p>
2431    async fn update_license_configuration(
2432        &self,
2433        input: UpdateLicenseConfigurationRequest,
2434    ) -> Result<UpdateLicenseConfigurationResponse, RusotoError<UpdateLicenseConfigurationError>>
2435    {
2436        let mut request = self.new_signed_request("POST", "/");
2437        request.add_header(
2438            "x-amz-target",
2439            "AWSLicenseManager.UpdateLicenseConfiguration",
2440        );
2441        let encoded = serde_json::to_string(&input).unwrap();
2442        request.set_payload(Some(encoded));
2443
2444        let response = self
2445            .sign_and_dispatch(request, UpdateLicenseConfigurationError::from_response)
2446            .await?;
2447        let mut response = response;
2448        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2449        proto::json::ResponsePayload::new(&response)
2450            .deserialize::<UpdateLicenseConfigurationResponse, _>()
2451    }
2452
2453    /// <p>Adds or removes the specified license configurations for the specified AWS resource.</p> <p>You can update the license specifications of AMIs, instances, and hosts. You cannot update the license specifications for launch templates and AWS CloudFormation templates, as they send license configurations to the operation that creates the resource.</p>
2454    async fn update_license_specifications_for_resource(
2455        &self,
2456        input: UpdateLicenseSpecificationsForResourceRequest,
2457    ) -> Result<
2458        UpdateLicenseSpecificationsForResourceResponse,
2459        RusotoError<UpdateLicenseSpecificationsForResourceError>,
2460    > {
2461        let mut request = self.new_signed_request("POST", "/");
2462        request.add_header(
2463            "x-amz-target",
2464            "AWSLicenseManager.UpdateLicenseSpecificationsForResource",
2465        );
2466        let encoded = serde_json::to_string(&input).unwrap();
2467        request.set_payload(Some(encoded));
2468
2469        let response = self
2470            .sign_and_dispatch(
2471                request,
2472                UpdateLicenseSpecificationsForResourceError::from_response,
2473            )
2474            .await?;
2475        let mut response = response;
2476        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2477        proto::json::ResponsePayload::new(&response)
2478            .deserialize::<UpdateLicenseSpecificationsForResourceResponse, _>()
2479    }
2480
2481    /// <p>Updates License Manager settings for the current Region.</p>
2482    async fn update_service_settings(
2483        &self,
2484        input: UpdateServiceSettingsRequest,
2485    ) -> Result<UpdateServiceSettingsResponse, RusotoError<UpdateServiceSettingsError>> {
2486        let mut request = self.new_signed_request("POST", "/");
2487        request.add_header("x-amz-target", "AWSLicenseManager.UpdateServiceSettings");
2488        let encoded = serde_json::to_string(&input).unwrap();
2489        request.set_payload(Some(encoded));
2490
2491        let response = self
2492            .sign_and_dispatch(request, UpdateServiceSettingsError::from_response)
2493            .await?;
2494        let mut response = response;
2495        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2496        proto::json::ResponsePayload::new(&response)
2497            .deserialize::<UpdateServiceSettingsResponse, _>()
2498    }
2499}