diff --git a/aws-models/acm-pca.json b/aws-models/acm-pca.json index eef153c64d5b..68c5c76f58b4 100644 --- a/aws-models/acm-pca.json +++ b/aws-models/acm-pca.json @@ -1,37 +1,8 @@ { "smithy": "2.0", - "metadata": { - "suppressions": [ - { - "id": "HttpMethodSemantics", - "namespace": "*" - }, - { - "id": "HttpResponseCodeSemantics", - "namespace": "*" - }, - { - "id": "PaginatedTrait", - "namespace": "*" - }, - { - "id": "HttpHeaderTrait", - "namespace": "*" - }, - { - "id": "HttpUriConflict", - "namespace": "*" - }, - { - "id": "Service", - "namespace": "*" - } - ] - }, "shapes": { "com.amazonaws.acmpca#ACMPrivateCA": { "type": "service", - "version": "2017-08-22", "operations": [ { "target": "com.amazonaws.acmpca#CreateCertificateAuthority" @@ -109,6 +80,7 @@ "arnNamespace": "acm-pca", "cloudFormationName": "ACMPCA", "cloudTrailEventSource": "acm-pca.amazonaws.com", + "docId": "acm-pca-2017-08-22", "endpointPrefix": "acm-pca" }, "aws.auth#sigv4": { @@ -1223,7 +1195,7 @@ "CustomAttributes": { "target": "com.amazonaws.acmpca#CustomAttributeList", "traits": { - "smithy.api#documentation": "

\n

Contains a sequence of one or more X.500 relative distinguished names (RDNs), each of\n\t\t\twhich consists of an object identifier (OID) and a value. For more information, see\n\t\t\tNIST’s definition of Object Identifier (OID).

\n \n

Custom attributes cannot be used in combination with standard attributes.

\n
" + "smithy.api#documentation": "

\n

Contains a sequence of one or more X.500 relative distinguished names (RDNs), each of\n\t\t\twhich consists of an object identifier (OID) and a value. For more information, see\n\t\t\tNIST’s definition of Object Identifier (OID).

\n \n

Custom attributes cannot be used in combination with standard attributes.

\n
" } } }, @@ -2099,7 +2071,7 @@ "Value": { "target": "com.amazonaws.acmpca#String1To256", "traits": { - "smithy.api#documentation": "

\n

Specifies the attribute value of relative distinguished name (RDN).

", + "smithy.api#documentation": "

\n

Specifies the attribute value of relative distinguished name (RDN).

", "smithy.api#required": {} } } @@ -2126,14 +2098,14 @@ "ObjectIdentifier": { "target": "com.amazonaws.acmpca#CustomObjectIdentifier", "traits": { - "smithy.api#documentation": "

\n

Specifies the object identifier (OID) of the X.509 extension. For more information,\n\t\t\tsee the Global OID reference database.\n

", + "smithy.api#documentation": "

\n

Specifies the object identifier (OID) of the X.509 extension. For more information,\n\t\t\tsee the Global OID reference database.\n

", "smithy.api#required": {} } }, "Value": { "target": "com.amazonaws.acmpca#Base64String1To4096", "traits": { - "smithy.api#documentation": "

\n

Specifies the base64-encoded value of the X.509 extension.

", + "smithy.api#documentation": "

\n

Specifies the base64-encoded value of the X.509 extension.

", "smithy.api#required": {} } }, @@ -2141,12 +2113,12 @@ "target": "com.amazonaws.acmpca#Boolean", "traits": { "smithy.api#default": null, - "smithy.api#documentation": "

\n

Specifies the critical flag of the X.509 extension.

" + "smithy.api#documentation": "

\n

Specifies the critical flag of the X.509 extension.

" } } }, "traits": { - "smithy.api#documentation": "

\n

Specifies the X.509 extension information for a certificate.

\n

Extensions present in CustomExtensions follow the\n\t\t\t\tApiPassthrough\n template\n\t\t\t\trules.

" + "smithy.api#documentation": "

\n

Specifies the X.509 extension information for a certificate.

\n

Extensions present in CustomExtensions follow the\n\t\t\t\tApiPassthrough\n template\n\t\t\t\trules.

" } }, "com.amazonaws.acmpca#CustomExtensionList": { @@ -2621,7 +2593,7 @@ "CustomExtensions": { "target": "com.amazonaws.acmpca#CustomExtensionList", "traits": { - "smithy.api#documentation": "

\n

Contains a sequence of one or more X.509 extensions, each of which consists of an\n\t\t\tobject identifier (OID), a base64-encoded value, and the critical flag. For more\n\t\t\tinformation, see the Global OID reference\n\t\t\t\tdatabase.\n

" + "smithy.api#documentation": "

\n

Contains a sequence of one or more X.509 extensions, each of which consists of an\n\t\t\tobject identifier (OID), a base64-encoded value, and the critical flag. For more\n\t\t\tinformation, see the Global OID reference\n\t\t\t\tdatabase.\n

" } } }, @@ -3065,7 +3037,7 @@ } ], "traits": { - "smithy.api#documentation": "

Imports a signed private CA certificate into Amazon Web Services Private CA. This action is used when you\n\t\t\tare using a chain of trust whose root is located outside Amazon Web Services Private CA. Before you can call\n\t\t\tthis action, the following preparations must in place:

\n
    \n
  1. \n

    In Amazon Web Services Private CA, call the CreateCertificateAuthority action to create the private CA that you\n\t\t\t\t\tplan to back with the imported certificate.

    \n
  2. \n
  3. \n

    Call the GetCertificateAuthorityCsr action to generate a certificate signing\n\t\t\t\t\trequest (CSR).

    \n
  4. \n
  5. \n

    Sign the CSR using a root or intermediate CA hosted by either an on-premises\n\t\t\t\t\tPKI hierarchy or by a commercial CA.

    \n
  6. \n
  7. \n

    Create a certificate chain and copy the signed certificate and the certificate\n\t\t\t\t\tchain to your working directory.

    \n
  8. \n
\n

Amazon Web Services Private CA supports three scenarios for installing a CA certificate:

\n \n

The following additional requirements apply when you import a CA certificate.

\n \n

\n Enforcement of Critical Constraints\n

\n

Amazon Web Services Private CA allows the following extensions to be marked critical in the imported CA\n\t\t\tcertificate or chain.

\n \n

Amazon Web Services Private CA rejects the following extensions when they are marked critical in an\n\t\t\timported CA certificate or chain.

\n \n

Amazon Web Services Private Certificate Authority will also reject any other extension marked as critical not contained on the preceding list of allowed extensions.

" + "smithy.api#documentation": "

Imports a signed private CA certificate into Amazon Web Services Private CA. This action is used when you\n\t\t\tare using a chain of trust whose root is located outside Amazon Web Services Private CA. Before you can call\n\t\t\tthis action, the following preparations must in place:

\n
    \n
  1. \n

    In Amazon Web Services Private CA, call the CreateCertificateAuthority action to create the private CA that you\n\t\t\t\t\tplan to back with the imported certificate.

    \n
  2. \n
  3. \n

    Call the GetCertificateAuthorityCsr action to generate a certificate signing\n\t\t\t\t\trequest (CSR).

    \n
  4. \n
  5. \n

    Sign the CSR using a root or intermediate CA hosted by either an on-premises\n\t\t\t\t\tPKI hierarchy or by a commercial CA.

    \n
  6. \n
  7. \n

    Create a certificate chain and copy the signed certificate and the certificate\n\t\t\t\t\tchain to your working directory.

    \n
  8. \n
\n

Amazon Web Services Private CA supports three scenarios for installing a CA certificate:

\n \n

The following additional requirements apply when you import a CA certificate.

\n \n

\n Enforcement of Critical Constraints\n

\n

Amazon Web Services Private CA allows the following extensions to be marked critical in the imported CA\n\t\t\tcertificate or chain.

\n \n

Amazon Web Services Private CA rejects the following extensions when they are marked critical in an\n\t\t\timported CA certificate or chain.

\n " } }, "com.amazonaws.acmpca#ImportCertificateAuthorityCertificateRequest": { @@ -3463,18 +3435,18 @@ "com.amazonaws.acmpca#ListCertificateAuthoritiesRequest": { "type": "structure", "members": { - "NextToken": { - "target": "com.amazonaws.acmpca#NextToken", - "traits": { - "smithy.api#documentation": "

Use this parameter when paginating results in a subsequent request after you receive a\n\t\t\tresponse with truncated results. Set it to the value of the NextToken\n\t\t\tparameter from the response you just received.

" - } - }, "MaxResults": { "target": "com.amazonaws.acmpca#MaxResults", "traits": { "smithy.api#documentation": "

Use this parameter when paginating results to specify the maximum number of items to\n\t\t\treturn in the response on each page. If additional items exist beyond the number you\n\t\t\tspecify, the NextToken element is sent in the response. Use this\n\t\t\t\tNextToken value in a subsequent request to retrieve additional\n\t\t\titems.

\n

Although the maximum value is 1000, the action only returns a maximum of 100 items.

" } }, + "NextToken": { + "target": "com.amazonaws.acmpca#NextToken", + "traits": { + "smithy.api#documentation": "

Use this parameter when paginating results in a subsequent request after you receive a\n\t\t\tresponse with truncated results. Set it to the value of the NextToken\n\t\t\tparameter from the response you just received.

" + } + }, "ResourceOwner": { "target": "com.amazonaws.acmpca#ResourceOwner", "traits": { @@ -3489,17 +3461,17 @@ "com.amazonaws.acmpca#ListCertificateAuthoritiesResponse": { "type": "structure", "members": { - "CertificateAuthorities": { - "target": "com.amazonaws.acmpca#CertificateAuthorities", - "traits": { - "smithy.api#documentation": "

Summary information about each certificate authority you have created.

" - } - }, "NextToken": { "target": "com.amazonaws.acmpca#NextToken", "traits": { "smithy.api#documentation": "

When the list is truncated, this value is present and should be used for the\n\t\t\t\tNextToken parameter in a subsequent pagination request.

" } + }, + "CertificateAuthorities": { + "target": "com.amazonaws.acmpca#CertificateAuthorities", + "traits": { + "smithy.api#documentation": "

Summary information about each certificate authority you have created.

" + } } }, "traits": { @@ -3544,11 +3516,10 @@ "com.amazonaws.acmpca#ListPermissionsRequest": { "type": "structure", "members": { - "CertificateAuthorityArn": { - "target": "com.amazonaws.acmpca#Arn", + "MaxResults": { + "target": "com.amazonaws.acmpca#MaxResults", "traits": { - "smithy.api#documentation": "

The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by\n\t\t\tcalling the ListCertificateAuthorities action. This must be of the form:\n\t\t\t\tarn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012\n\t\t\tYou can get a private CA's ARN by running the ListCertificateAuthorities action.

", - "smithy.api#required": {} + "smithy.api#documentation": "

When paginating results, use this parameter to specify the maximum number of items to\n\t\t\treturn in the response. If additional items exist beyond the number you specify, the\n\t\t\t\tNextToken element is sent in the response. Use this\n\t\t\t\tNextToken value in a subsequent request to retrieve\n\t\t\tadditional items.

" } }, "NextToken": { @@ -3557,10 +3528,11 @@ "smithy.api#documentation": "

When paginating results, use this parameter in a subsequent request after you receive\n\t\t\ta response with truncated results. Set it to the value of NextToken from the response you just received.

" } }, - "MaxResults": { - "target": "com.amazonaws.acmpca#MaxResults", + "CertificateAuthorityArn": { + "target": "com.amazonaws.acmpca#Arn", "traits": { - "smithy.api#documentation": "

When paginating results, use this parameter to specify the maximum number of items to\n\t\t\treturn in the response. If additional items exist beyond the number you specify, the\n\t\t\t\tNextToken element is sent in the response. Use this\n\t\t\t\tNextToken value in a subsequent request to retrieve\n\t\t\tadditional items.

" + "smithy.api#documentation": "

The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by\n\t\t\tcalling the ListCertificateAuthorities action. This must be of the form:\n\t\t\t\tarn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012\n\t\t\tYou can get a private CA's ARN by running the ListCertificateAuthorities action.

", + "smithy.api#required": {} } } }, @@ -3571,17 +3543,17 @@ "com.amazonaws.acmpca#ListPermissionsResponse": { "type": "structure", "members": { - "Permissions": { - "target": "com.amazonaws.acmpca#PermissionList", - "traits": { - "smithy.api#documentation": "

Summary information about each permission assigned by the specified private CA,\n\t\t\tincluding the action enabled, the policy provided, and the time of creation.

" - } - }, "NextToken": { "target": "com.amazonaws.acmpca#NextToken", "traits": { "smithy.api#documentation": "

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.\n\t\t

" } + }, + "Permissions": { + "target": "com.amazonaws.acmpca#PermissionList", + "traits": { + "smithy.api#documentation": "

Summary information about each permission assigned by the specified private CA,\n\t\t\tincluding the action enabled, the policy provided, and the time of creation.

" + } } }, "traits": { @@ -3620,11 +3592,10 @@ "com.amazonaws.acmpca#ListTagsRequest": { "type": "structure", "members": { - "CertificateAuthorityArn": { - "target": "com.amazonaws.acmpca#Arn", + "MaxResults": { + "target": "com.amazonaws.acmpca#MaxResults", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority action. This must be of the form:

\n

\n arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012\n \n

", - "smithy.api#required": {} + "smithy.api#documentation": "

Use this parameter when paginating results to specify the maximum number of items to\n\t\t\treturn in the response. If additional items exist beyond the number you specify, the\n\t\t\t\tNextToken element is sent in the response. Use this\n\t\t\t\tNextToken value in a subsequent request to retrieve\n\t\t\tadditional items.

" } }, "NextToken": { @@ -3633,10 +3604,11 @@ "smithy.api#documentation": "

Use this parameter when paginating results in a subsequent request after you receive a\n\t\t\tresponse with truncated results. Set it to the value of NextToken from the response you just received.

" } }, - "MaxResults": { - "target": "com.amazonaws.acmpca#MaxResults", + "CertificateAuthorityArn": { + "target": "com.amazonaws.acmpca#Arn", "traits": { - "smithy.api#documentation": "

Use this parameter when paginating results to specify the maximum number of items to\n\t\t\treturn in the response. If additional items exist beyond the number you specify, the\n\t\t\t\tNextToken element is sent in the response. Use this\n\t\t\t\tNextToken value in a subsequent request to retrieve\n\t\t\tadditional items.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority action. This must be of the form:

\n

\n arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012\n \n

", + "smithy.api#required": {} } } }, @@ -3647,17 +3619,17 @@ "com.amazonaws.acmpca#ListTagsResponse": { "type": "structure", "members": { - "Tags": { - "target": "com.amazonaws.acmpca#TagList", - "traits": { - "smithy.api#documentation": "

The tags associated with your private CA.

" - } - }, "NextToken": { "target": "com.amazonaws.acmpca#NextToken", "traits": { "smithy.api#documentation": "

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.\n\t\t

" } + }, + "Tags": { + "target": "com.amazonaws.acmpca#TagList", + "traits": { + "smithy.api#documentation": "

The tags associated with your private CA.

" + } } }, "traits": { @@ -3963,7 +3935,7 @@ "ResourceArn": { "target": "com.amazonaws.acmpca#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Number (ARN) of the private CA to associate with the policy. The\n\t\t\tARN of the CA can be found by calling the ListCertificateAuthorities action.

\n

", + "smithy.api#documentation": "

The Amazon Resource Number (ARN) of the private CA to associate with the policy. The\n\t\t\tARN of the CA can be found by calling the ListCertificateAuthorities action.

\n

", "smithy.api#required": {} } }, @@ -4709,4 +4681,4 @@ } } } -} +} \ No newline at end of file diff --git a/aws-models/arc-zonal-shift.json b/aws-models/arc-zonal-shift.json index e09f3dd19af7..b592b485f3ea 100644 --- a/aws-models/arc-zonal-shift.json +++ b/aws-models/arc-zonal-shift.json @@ -94,14 +94,14 @@ "appliedStatus": { "target": "com.amazonaws.arczonalshift#AutoshiftAppliedStatus", "traits": { - "smithy.api#documentation": "

The appliedStatus field specifies which application traffic shift is in effect for a\n\t\t\tresource when there is more than one traffic shift active. There can be more than one application traffic \n\t\t\tshift in progress at the same time - that is, practice run zonal shifts, customer-started zonal shifts, \n\t\t\tor an autoshift. The appliedStatus field for an autoshift for a resource can have one of two \n\t\t\tvalues: APPLIED or NOT_APPLIED. The zonal shift or autoshift \n\t\t\tthat is currently in effect for the resource has an applied status set to APPLIED.

\n

The overall principle for precedence is that zonal shifts that you start as a customer take precedence \n\t\t\tautoshifts, which take precedence over practice runs. That is, customer-started zonal shifts > autoshifts > practice run \n\t\t\tzonal shifts.

\n

For more information, see \n\t\t\tHow zonal autoshift \n\t\t\t\tand practice runs work in the Amazon Route 53 Application Recovery Controller Developer Guide.

", + "smithy.api#documentation": "

The appliedStatus field specifies which application traffic shift is in effect for a\n\t\t\tresource when there is more than one active traffic shift. There can be more than one application traffic \n\t\t\tshift in progress at the same time - that is, practice run zonal shifts, customer-initiated zonal shifts, \n\t\t\tor an autoshift. The appliedStatus field for a shift that is in progress for a resource can \n\t\t\thave one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift \n\t\t\tthat is currently in effect for the resource has an appliedStatus set to APPLIED.

\n

The overall principle for precedence is that zonal shifts that you start as a customer take precedence \n\t\t\tautoshifts, which take precedence over practice runs. That is, customer-initiated zonal shifts > autoshifts > practice run \n\t\t\tzonal shifts.

\n

For more information, see \n\t\t\tHow zonal autoshift \n\t\t\t\tand practice runs work in the Amazon Route 53 Application Recovery Controller Developer Guide.

", "smithy.api#required": {} } }, "awayFrom": { "target": "com.amazonaws.arczonalshift#AvailabilityZone", "traits": { - "smithy.api#documentation": "

The Availability Zone that traffic is shifted away from for a resource, when Amazon Web Services starts an autoshift. \n\t\t\tUntil the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region.\n\t\t\tAn autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when \n\t\t\tyou disable zonal autoshift for the resource.

", + "smithy.api#documentation": "

The Availability Zone (for example, use1-az1) that traffic is shifted away from for a resource, when Amazon Web Services starts an autoshift. \n\t\t\tUntil the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region.\n\t\t\tAn autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when \n\t\t\tyou disable zonal autoshift for the resource.

", "smithy.api#required": {} } }, @@ -117,6 +117,34 @@ "smithy.api#documentation": "

A complex structure that lists an autoshift that is currently active for a managed resource and information about\n\t\t\tthe autoshift.

\n

For more information, see How zonal autoshift \n\t\t\tand practice runs work in the Amazon Route 53 Application Recovery Controller Developer Guide.

" } }, + "com.amazonaws.arczonalshift#AutoshiftObserverNotification": { + "type": "resource", + "operations": [ + { + "target": "com.amazonaws.arczonalshift#GetAutoshiftObserverNotificationStatus" + }, + { + "target": "com.amazonaws.arczonalshift#UpdateAutoshiftObserverNotificationStatus" + } + ] + }, + "com.amazonaws.arczonalshift#AutoshiftObserverNotificationStatus": { + "type": "enum", + "members": { + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" + } + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + } + } + }, "com.amazonaws.arczonalshift#AutoshiftSummaries": { "type": "list", "member": { @@ -129,7 +157,7 @@ "awayFrom": { "target": "com.amazonaws.arczonalshift#AvailabilityZone", "traits": { - "smithy.api#documentation": "

The Availability Zone that traffic is shifted away from for a resource when Amazon Web Services starts an autoshift. \n\t\t\tUntil the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region.\n\t\t\tAn autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when \n\t\t\tyou disable zonal autoshift for the resource.

", + "smithy.api#documentation": "

The Availability Zone (for example, use1-az1) that traffic is shifted away from for a resource when Amazon Web Services starts an autoshift. \n\t\t\tUntil the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region.\n\t\t\tAn autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when \n\t\t\tyou disable zonal autoshift for the resource.

", "smithy.api#required": {} } }, @@ -159,6 +187,9 @@ "smithy.api#documentation": "

Information about an autoshift. Amazon Web Services starts an autoshift to temporarily move traffic for a resource \n\t\t\taway from an Availability Zone in an Amazon Web Services Region\n\t\t\twhen Amazon Web Services determines that there's an issue in the Availability Zone that could potentially affect customers.\n\t\t\tYou can configure zonal autoshift in Route 53 ARC for managed resources in your Amazon Web Services account in a Region. \n\t\t\tSupported Amazon Web Services resources are automatically registered with Route 53 ARC.

\n

Autoshifts are temporary. When the Availability Zone recovers, Amazon Web Services ends the autoshift, and \n\t\t\ttraffic for the resource is no longer directed to the other Availability Zones in the Region.

\n

You can stop an autoshift for a resource by disabling zonal autoshift.

" } }, + "com.amazonaws.arczonalshift#AutoshiftTriggerResource": { + "type": "resource" + }, "com.amazonaws.arczonalshift#AutoshiftsInResource": { "type": "list", "member": { @@ -311,34 +342,44 @@ } }, "com.amazonaws.arczonalshift#ConflictExceptionReason": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ZonalShiftAlreadyExists", - "name": "ZONAL_SHIFT_ALREADY_EXISTS" - }, - { - "value": "ZonalShiftStatusNotActive", - "name": "ZONAL_SHIFT_STATUS_NOT_ACTIVE" - }, - { - "value": "SimultaneousZonalShiftsConflict", - "name": "SIMULTANEOUS_ZONAL_SHIFTS_CONFLICT" - }, - { - "value": "PracticeConfigurationAlreadyExists", - "name": "PRACTICE_CONFIGURATION_ALREADY_EXISTS" - }, - { - "value": "AutoShiftEnabled", - "name": "AUTOSHIFT_ENABLED" - }, - { - "value": "PracticeConfigurationDoesNotExist", - "name": "PRACTICE_CONFIGURATION_DOES_NOT_EXIST" + "type": "enum", + "members": { + "ZONAL_SHIFT_ALREADY_EXISTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ZonalShiftAlreadyExists" } - ] + }, + "ZONAL_SHIFT_STATUS_NOT_ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ZonalShiftStatusNotActive" + } + }, + "SIMULTANEOUS_ZONAL_SHIFTS_CONFLICT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SimultaneousZonalShiftsConflict" + } + }, + "PRACTICE_CONFIGURATION_ALREADY_EXISTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PracticeConfigurationAlreadyExists" + } + }, + "AUTOSHIFT_ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AutoShiftEnabled" + } + }, + "PRACTICE_CONFIGURATION_DOES_NOT_EXIST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PracticeConfigurationDoesNotExist" + } + } } }, "com.amazonaws.arczonalshift#ControlCondition": { @@ -347,20 +388,20 @@ "type": { "target": "com.amazonaws.arczonalshift#ControlConditionType", "traits": { - "smithy.api#documentation": "

The type of alarm specified for a practice run. The only valid value is CLOUDWATCH.

", + "smithy.api#documentation": "

The type of alarm specified for a practice run. You can only specify Amazon CloudWatch alarms for practice runs, so the \n\t\t\tonly valid value is CLOUDWATCH.

", "smithy.api#required": {} } }, "alarmIdentifier": { "target": "com.amazonaws.arczonalshift#ResourceArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) for the Amazon CloudWatch alarm that you specify as a control condition for a practice run.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for an Amazon CloudWatch alarm that you specify as a control condition for a practice run.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

A control condition is an alarm that you specify for a practice run. When you configure practice runs\n\t\t\twith zonal autoshift for a resource, you specify Amazon CloudWatch alarms, which you create in CloudWatch \n\t\t\tto use with the practice run. The alarms that you specify are an \n\t\t\toutcome alarm, to monitor application health during practice runs and, \n\t\t\toptionally, a blocking alarm, to block practice runs from starting.

\n

Control condition alarms do not apply for autoshifts.

\n

For more information, see \n\t\t\t\n\t\t\t\tConsiderations when you configure zonal autoshift in the Amazon Route 53 Application Recovery Controller Developer Guide.

" + "smithy.api#documentation": "

A control condition is an alarm that you specify for a practice run. When you configure practice runs\n\t\t\twith zonal autoshift for a resource, you specify Amazon CloudWatch alarms, which you create in CloudWatch \n\t\t\tto use with the practice run. The alarms that you specify are an \n\t\t\toutcome alarm, to monitor application health during practice runs and, \n\t\t\toptionally, a blocking alarm, to block practice runs from starting or to interrupt\n\t\t\ta practice run in progress.

\n

Control condition alarms do not apply for autoshifts.

\n

For more information, see \n\t\t\t\n\t\t\t\tConsiderations when you configure zonal autoshift in the Amazon Route 53 Application Recovery Controller Developer Guide.

" } }, "com.amazonaws.arczonalshift#ControlConditionType": { @@ -415,7 +456,7 @@ } ], "traits": { - "smithy.api#documentation": "

A practice run configuration for zonal autoshift is required when you enable zonal autoshift.\n\t\t\tA practice run configuration includes specifications for blocked dates and blocked time windows,\n\t\tand for Amazon CloudWatch alarms that you create to use with practice runs. The alarms that you specify are an \n\t\t\toutcome alarm, to monitor application health during practice runs and, \n\t\t\toptionally, a blocking alarm, to block practice runs from starting.

\n

For more information, see \n\t\t\t\n\t\t\t\tConsiderations when you configure zonal autoshift in the Amazon Route 53 Application Recovery Controller Developer Guide.

", + "smithy.api#documentation": "

A practice run configuration for zonal autoshift is required when you enable zonal autoshift.\n\t\t\tA practice run configuration includes specifications for blocked dates and blocked time windows,\n\t\tand for Amazon CloudWatch alarms that you create to use with practice runs. The alarms that you specify are an \n\t\t\toutcome alarm, to monitor application health during practice runs and, \n\t\t\toptionally, a blocking alarm, to block practice runs from starting.

\n

When a resource has a practice run configuration, Route 53 ARC starts zonal shifts for the resource\n\t\t\tweekly, to shift traffic for practice runs. Practice runs help you to ensure that \n\t\t\tshifting away traffic from an Availability Zone during an autoshift is safe for your application.

\n

For more information, see \n\t\t\t\n\t\t\t\tConsiderations when you configure zonal autoshift in the Amazon Route 53 Application Recovery Controller Developer Guide.

", "smithy.api#http": { "method": "POST", "uri": "/configuration", @@ -429,7 +470,7 @@ "resourceIdentifier": { "target": "com.amazonaws.arczonalshift#ResourceIdentifier", "traits": { - "smithy.api#documentation": "

The identifier of the resource to shift away traffic for when a practice\n\t\t\trun starts a zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

\n

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

", + "smithy.api#documentation": "

The identifier of the resource that Amazon Web Services shifts traffic for with a practice \n\t\t\trun zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

\n

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

", "smithy.api#required": {} } }, @@ -488,7 +529,7 @@ "zonalAutoshiftStatus": { "target": "com.amazonaws.arczonalshift#ZonalAutoshiftStatus", "traits": { - "smithy.api#documentation": "

The status for zonal autoshift for a resource. When you specify the\n\t\t\tautoshift status as ENABLED, Amazon Web Services shifts traffic \n\t\t\taway from shifts away application resource traffic from an Availability Zone, \n\t\t\ton your behalf, when Amazon Web Services determines that there's an issue in \n\t\t\tthe Availability Zone that could potentially affect customers.

\n

When you enable zonal autoshift, you must also configure practice runs for\n\t\t\tthe resource.

", + "smithy.api#documentation": "

The status for zonal autoshift for a resource. When you specify ENABLED\n\t\t\tfor the autoshift status, Amazon Web Services shifts traffic \n\t\t\taway from shifts away application resource traffic from an Availability Zone, \n\t\t\ton your behalf, when internal telemetry indicates that there is an Availability \n\t\t\tZone impairment that could potentially impact customers.

\n

When you enable zonal autoshift, you must also configure practice runs for\n\t\t\tthe resource.

", "smithy.api#required": {} } }, @@ -605,6 +646,62 @@ "com.amazonaws.arczonalshift#ExpiryTime": { "type": "timestamp" }, + "com.amazonaws.arczonalshift#GetAutoshiftObserverNotificationStatus": { + "type": "operation", + "input": { + "target": "com.amazonaws.arczonalshift#GetAutoshiftObserverNotificationStatusRequest" + }, + "output": { + "target": "com.amazonaws.arczonalshift#GetAutoshiftObserverNotificationStatusResponse" + }, + "errors": [ + { + "target": "com.amazonaws.arczonalshift#AccessDeniedException" + }, + { + "target": "com.amazonaws.arczonalshift#InternalServerException" + }, + { + "target": "com.amazonaws.arczonalshift#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns the status of autoshift observer notification. Autoshift observer\n\t\t\tnotification enables you to be notified, through Amazon EventBridge, when\n\t\t\tthere is an autoshift event for zonal autoshift.

\n

If the status is ENABLED,\n\t\t\tRoute 53 ARC includes all autoshift events when you use the EventBridge pattern\n\t\t\tAutoshift In Progress. When the status is DISABLED,\n\t\t\tRoute 53 ARC includes only autoshift events for autoshifts when one or more of your\n\t\t\tresources is included in the autoshift.

\n

For more information, see \n\t\t\t\n\t\t\t\tNotifications for practice runs and autoshifts in the Amazon Route 53 Application Recovery Controller Developer Guide.

", + "smithy.api#http": { + "method": "GET", + "uri": "/autoshift-observer-notification", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.arczonalshift#GetAutoshiftObserverNotificationStatusRequest": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#input": {}, + "smithy.api#references": [ + { + "resource": "com.amazonaws.arczonalshift#AutoshiftObserverNotification" + } + ] + } + }, + "com.amazonaws.arczonalshift#GetAutoshiftObserverNotificationStatusResponse": { + "type": "structure", + "members": { + "status": { + "target": "com.amazonaws.arczonalshift#AutoshiftObserverNotificationStatus", + "traits": { + "smithy.api#documentation": "

The status of autoshift observer notification. If the status is ENABLED,\n\t\t\tRoute 53 ARC includes all autoshift events when you use the Amazon EventBridge pattern\n\t\t\tAutoshift In Progress. When the status is DISABLED,\n\t\t\tRoute 53 ARC includes only autoshift events for autoshifts when one or more of your\n\t\t\tresources is included in the autoshift.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.arczonalshift#GetManagedResource": { "type": "operation", "input": { @@ -646,7 +743,7 @@ "resourceIdentifier": { "target": "com.amazonaws.arczonalshift#ResourceIdentifier", "traits": { - "smithy.api#documentation": "

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

\n

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

", + "smithy.api#documentation": "

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

\n

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -749,7 +846,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the active autoshifts for a specified resource.

", + "smithy.api#documentation": "

Returns a list of autoshifts for an Amazon Web Services Region. By default, the call returns\n\t\t\tonly ACTIVE autoshifts. Optionally, you can specify the status parameter to return\n\t\t\tCOMPLETED autoshifts.\n\t\t

", "smithy.api#http": { "method": "GET", "uri": "/autoshifts", @@ -917,7 +1014,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists all active and completed zonal shifts in Amazon Route 53 Application Recovery Controller in your Amazon Web Services account in this Amazon Web Services Region.\n \t\tListZonalShifts returns customer-started zonal shifts, as well as practice run zonal shifts that Route 53 ARC started on \n \t\tyour behalf for zonal autoshift.

\n

The ListZonalShifts operation does not list autoshifts. For more information about listing\n \t\tautoshifts, see \">ListAutoshifts.

", + "smithy.api#documentation": "

Lists all active and completed zonal shifts in Amazon Route 53 Application Recovery Controller in your Amazon Web Services account in this Amazon Web Services Region.\n \t\tListZonalShifts returns customer-initiated zonal shifts, as well as practice run zonal shifts that Route 53 ARC started on \n \t\tyour behalf for zonal autoshift.

\n

The ListZonalShifts operation does not list autoshifts. For more information about listing\n \t\tautoshifts, see \">ListAutoshifts.

", "smithy.api#http": { "method": "GET", "uri": "/zonalshifts", @@ -1092,6 +1189,12 @@ { "target": "com.amazonaws.arczonalshift#Autoshift" }, + { + "target": "com.amazonaws.arczonalshift#AutoshiftObserverNotification" + }, + { + "target": "com.amazonaws.arczonalshift#AutoshiftTriggerResource" + }, { "target": "com.amazonaws.arczonalshift#ManagedResource" }, @@ -1137,7 +1240,7 @@ "Date" ] }, - "smithy.api#documentation": "

Welcome to the Zonal Shift API Reference Guide for Amazon Route 53 Application Recovery Controller (Route 53 ARC).

\n

You can start a zonal shift to move traffic for a load balancer resource away from an Availability Zone to\n\t\t\thelp your application recover quickly from an impairment in an Availability Zone. For example, \n\t\t\tyou can recover your application from a developer's bad code deployment or from an \n\t\t\tAmazon Web Services infrastructure failure in a single Availability Zone.

\n

You can also configure zonal autoshift for a load balancer resource. Zonal autoshift \n\t\t\tis a capability in Route 53 ARC where Amazon Web Services shifts away application resource \n\t\t\ttraffic from an Availability Zone, on your behalf, to help reduce your time to recovery during events.\n\t\t\tAmazon Web Services shifts away traffic for resources that are enabled for zonal autoshift whenever Amazon Web Services \n\t\t\tdetermines that there's an issue in the Availability Zone that could potentially affect \n\t\t\tcustomers.

\n

To ensure that zonal autoshift is safe for your application, you must \n\t\t\talso configure practice runs when you enable zonal autoshift for a resource. Practice runs start \n\t\t\tweekly zonal shifts for a resource, to shift\n\t\t\ttraffic for the resource out of an Availability Zone. Practice runs make sure, on a regular basis, \n\t\t\tthat you have enough capacity in all the Availability Zones in an Amazon Web Services Region \n\t\t\tfor your application to continue to operate normally \n\t\t\twhen traffic for a resource is shifted away from one Availability Zone.

\n \n

You must prescale resource capacity in all Availability Zones in the Region \n\t\t\twhere your application is deployed, before you configure practice runs or enable zonal autoshift\n\t\t\tfor a resource. You should not rely on scaling on demand when an autoshift or practice run \n\t\t\tstarts.

\n
\n

For more information about using zonal shift and zonal autoshift, see the \n\t\t\tAmazon Route 53 Application Recovery Controller \n\t\t\t\tDeveloper Guide.

", + "smithy.api#documentation": "

Welcome to the API Reference Guide for zonal shift and zonal autoshift in Amazon Route 53 Application Recovery Controller (Route 53 ARC).

\n

You can start a zonal shift to move traffic for a load balancer resource away from an Availability Zone to\n\t\t\thelp your application recover quickly from an impairment in an Availability Zone. For example, \n\t\t\tyou can recover your application from a developer's bad code deployment or from an \n\t\t\tAmazon Web Services infrastructure failure in a single Availability Zone.

\n

You can also configure zonal autoshift for supported load balancer resources. Zonal autoshift \n\t\t\tis a capability in Route 53 ARC where you authorize Amazon Web Services to shift away application resource \n\t\t\ttraffic from an Availability Zone during events, on your behalf, to help reduce your time to recovery.\n\t\t\tAmazon Web Services starts an autoshift when internal telemetry indicates that there is an Availability \n\t\t\tZone impairment that could potentially impact customers.

\n

To help make sure that zonal autoshift is safe for your application, you must \n\t\t\talso configure practice runs when you enable zonal autoshift for a resource. Practice runs start \n\t\t\tweekly zonal shifts for a resource, to shift traffic for the resource away from an Availability Zone. \n\t\t\tPractice runs help you to make sure, on a regular basis, that you have enough capacity in all the \n\t\t\tAvailability Zones in an Amazon Web Services Region for your application to continue to operate normally \n\t\t\twhen traffic for a resource is shifted away from one Availability Zone.

\n \n

Before you configure practice runs or enable zonal autoshift, we strongly recommend\n\t\t\tthat you prescale your application resource capacity in all Availability Zones in the Region where \n\t\t\tyour application resources are deployed. You should not rely on scaling on demand when an \n\t\t\tautoshift or practice run starts. Zonal autoshift, including practice runs, works independently, \n\t\t\tand does not wait for auto scaling actions to complete. Relying on auto scaling, instead of \n\t\t\tpre-scaling, can result in loss of availability.

\n

If you use auto scaling to handle regular cycles of traffic, we strongly recommend that you configure \n\t\t\t\tthe minimum capacity of your auto scaling to continue operating normally with the loss of an \n\t\t\t\tAvailability Zone.

\n
\n

Be aware that Route 53 ARC does not inspect the health of individual resources. Amazon Web Services only starts an \n\t\t\tautoshift when Amazon Web Services telemetry detects that there is an Availability Zone impairment that could \n\t\t\tpotentially impact customers. In some cases, resources might be shifted away that are not experiencing \n\t\t\timpact.

\n

For more information about using zonal shift and zonal autoshift, see the \n\t\t\tAmazon Route 53 Application Recovery Controller \n\t\t\t\tDeveloper Guide.

", "smithy.api#title": "AWS ARC - Zonal Shift", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -1836,7 +1939,7 @@ } }, "traits": { - "smithy.api#documentation": "

A practice run configuration for a resource includes the Amazon CloudWatch alarms that you've specified for a practice\n\t\trun, as well as any blocked dates or blocked windows for the practice run.

\n

You can update or delete a practice run configuration. Before you delete a practice run configuration, you\n\t\t\tmust disable zonal autoshift for the resource. A practice run configuration is required when zonal autoshift is enabled.

" + "smithy.api#documentation": "

A practice run configuration for a resource includes the Amazon CloudWatch alarms that you've specified for a practice\n\t\trun, as well as any blocked dates or blocked windows for the practice run. When a resource has a practice run \n\t\tconfiguration, Route 53 ARC shifts traffic for the resource weekly for practice runs.

\n

Practice runs are required for zonal autoshift. The zonal shifts that Route 53 ARC starts for practice runs help you to ensure that \n\t\t\tshifting away traffic from an Availability Zone during an autoshift is safe for your application.

\n

You can update or delete a practice run configuration. Before you delete a practice run configuration, you\n\t\t\tmust disable zonal autoshift for the resource. A practice run configuration is required when zonal autoshift is enabled.

" } }, "com.amazonaws.arczonalshift#PracticeRunConfigurationResource": { @@ -1982,14 +2085,14 @@ "resourceIdentifier": { "target": "com.amazonaws.arczonalshift#ResourceIdentifier", "traits": { - "smithy.api#documentation": "

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

\n

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

", + "smithy.api#documentation": "

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

\n

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

", "smithy.api#required": {} } }, "awayFrom": { "target": "com.amazonaws.arczonalshift#AvailabilityZone", "traits": { - "smithy.api#documentation": "

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. \n \t\tUntil the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

", + "smithy.api#documentation": "

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. \n \t\tUntil the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

", "smithy.api#required": {} } }, @@ -2030,6 +2133,73 @@ "smithy.api#httpError": 429 } }, + "com.amazonaws.arczonalshift#UpdateAutoshiftObserverNotificationStatus": { + "type": "operation", + "input": { + "target": "com.amazonaws.arczonalshift#UpdateAutoshiftObserverNotificationStatusRequest" + }, + "output": { + "target": "com.amazonaws.arczonalshift#UpdateAutoshiftObserverNotificationStatusResponse" + }, + "errors": [ + { + "target": "com.amazonaws.arczonalshift#AccessDeniedException" + }, + { + "target": "com.amazonaws.arczonalshift#InternalServerException" + }, + { + "target": "com.amazonaws.arczonalshift#ThrottlingException" + }, + { + "target": "com.amazonaws.arczonalshift#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Update the status of autoshift observer notification. Autoshift observer\n\t\t\tnotification enables you to be notified, through Amazon EventBridge, when\n\t\t\tthere is an autoshift event for zonal autoshift.

\n

If the status is ENABLED,\n\t\t\tRoute 53 ARC includes all autoshift events when you use the EventBridge pattern\n\t\t\tAutoshift In Progress. When the status is DISABLED,\n\t\t\tRoute 53 ARC includes only autoshift events for autoshifts when one or more of your\n\t\t\tresources is included in the autoshift.

\n

For more information, see \n\t\t\t\n\t\t\t\tNotifications for practice runs and autoshifts in the Amazon Route 53 Application Recovery Controller Developer Guide.

", + "smithy.api#http": { + "method": "PUT", + "uri": "/autoshift-observer-notification", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.arczonalshift#UpdateAutoshiftObserverNotificationStatusRequest": { + "type": "structure", + "members": { + "status": { + "target": "com.amazonaws.arczonalshift#AutoshiftObserverNotificationStatus", + "traits": { + "smithy.api#documentation": "

The status to set for autoshift observer notification. If the status is ENABLED,\n\t\t\tRoute 53 ARC includes all autoshift events when you use the Amazon EventBridge pattern\n\t\t\tAutoshift In Progress. When the status is DISABLED,\n\t\t\tRoute 53 ARC includes only autoshift events for autoshifts when one or more of your\n\t\t\tresources is included in the autoshift.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {}, + "smithy.api#references": [ + { + "resource": "com.amazonaws.arczonalshift#AutoshiftObserverNotification" + } + ] + } + }, + "com.amazonaws.arczonalshift#UpdateAutoshiftObserverNotificationStatusResponse": { + "type": "structure", + "members": { + "status": { + "target": "com.amazonaws.arczonalshift#AutoshiftObserverNotificationStatus", + "traits": { + "smithy.api#documentation": "

The status for autoshift observer notification.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.arczonalshift#UpdatePracticeRunConfiguration": { "type": "operation", "input": { @@ -2177,7 +2347,7 @@ } ], "traits": { - "smithy.api#documentation": "

You can update the zonal autoshift status for a resource, to enable or disable zonal\n\t\t\tautoshift. When zonal autoshift is ENABLED, Amazon Web Services shifts away \n\t\t\tresource traffic from an Availability Zone, on your behalf, when Amazon Web Services\n\t\t\tdetermines that there's an issue in the Availability Zone that could potentially affect customers.

", + "smithy.api#documentation": "

The zonal autoshift configuration for a resource includes the practice run configuration and the status for\n\t\t\trunning autoshifts, zonal autoshift status. When a resource has a practice run configuation, Route 53 ARC \n\t\t\tstarts weekly zonal shifts for the resource, to shift traffic away from an Availability Zone. Weekly practice\n\t\t\truns help you to make sure that your application can continue to operate normally with the loss of one Availability Zone.

\n

You can update the zonal autoshift autoshift status to enable or disable zonal autoshift. When zonal\n\t\t\tautoshift is ENABLED, you authorize Amazon Web Services to shift away resource traffic for \n\t\t\tan application from an Availability Zone during events, on your behalf, to help reduce time to recovery.\n\t\t\tTraffic is also shifted away for the required weekly practice runs.

", "smithy.api#http": { "method": "PUT", "uri": "/managedresources/{resourceIdentifier}", @@ -2200,7 +2370,7 @@ "zonalAutoshiftStatus": { "target": "com.amazonaws.arczonalshift#ZonalAutoshiftStatus", "traits": { - "smithy.api#documentation": "

The zonal autoshift status for the resource that you want to update the zonal\n\t\t\tautoshift configuration for.

", + "smithy.api#documentation": "

The zonal autoshift status for the resource that you want to update the zonal\n\t\t\tautoshift configuration for. Choose ENABLED to authorize Amazon Web Services \n\t\t\tto shift away resource traffic for an application from an Availability Zone during events, \n\t\t\ton your behalf, to help reduce time to recovery.

", "smithy.api#required": {} } } @@ -2222,7 +2392,7 @@ "zonalAutoshiftStatus": { "target": "com.amazonaws.arczonalshift#ZonalAutoshiftStatus", "traits": { - "smithy.api#documentation": "

The zonal autoshift status for the resource that you updated the zonal\n\t\t\tautoshift configuration for.

", + "smithy.api#documentation": "

The updated zonal autoshift status for the resource.

", "smithy.api#required": {} } } @@ -2410,21 +2580,21 @@ "resourceIdentifier": { "target": "com.amazonaws.arczonalshift#ResourceIdentifier", "traits": { - "smithy.api#documentation": "

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

\n

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

", + "smithy.api#documentation": "

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

\n

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

", "smithy.api#required": {} } }, "awayFrom": { "target": "com.amazonaws.arczonalshift#AvailabilityZone", "traits": { - "smithy.api#documentation": "

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. \n\t\t\tUntil the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

", + "smithy.api#documentation": "

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. \n\t\t\tUntil the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

", "smithy.api#required": {} } }, "expiryTime": { "target": "com.amazonaws.arczonalshift#ExpiryTime", "traits": { - "smithy.api#documentation": "

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. \n\t\t\tYou can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift \n\t\t\tto set a new expiration at any time.

\n

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts \n\t\t\tto an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or\n\t\t\tjust wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

", + "smithy.api#documentation": "

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. \n\t\t\tYou can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift \n\t\t\tto set a new expiration at any time.

\n

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts \n\t\t\tto an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or\n\t\t\tjust wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

", "smithy.api#required": {} } }, @@ -2475,7 +2645,7 @@ "appliedStatus": { "target": "com.amazonaws.arczonalshift#AppliedStatus", "traits": { - "smithy.api#documentation": "

The appliedStatus field specifies which application traffic shift is in effect for a\n \t\tresource when there is more than one traffic shift active. There can be more than one application traffic \n \t\tshift in progress at the same time - that is, practice run zonal shifts, customer-started zonal shifts, \n \t\tor an autoshift. The appliedStatus field for an autoshift for a resource can have one of two \n \t\tvalues: APPLIED or NOT_APPLIED. The zonal shift or autoshift \n \t\tthat is currently in effect for the resource has an applied status set to APPLIED.

\n

The overall principle for precedence is that zonal shifts that you start as a customer take precedence \n \t\tautoshifts, which take precedence over practice runs. That is, customer-started zonal shifts > autoshifts > practice run \n \t\tzonal shifts.

\n

For more information, see \n \t\tHow zonal autoshift \n \t\t\tand practice runs work in the Amazon Route 53 Application Recovery Controller Developer Guide.

", + "smithy.api#documentation": "

The appliedStatus field specifies which application traffic shift is in effect for a\n \t\tresource when there is more than one active traffic shift. There can be more than one application traffic \n \t\tshift in progress at the same time - that is, practice run zonal shifts, customer-initiated zonal shifts, \n \t\tor an autoshift. The appliedStatus field for a shift that is in progress for a resource can \n \t\thave one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift \n \t\tthat is currently in effect for the resource has an appliedStatus set to APPLIED.

\n

The overall principle for precedence is that zonal shifts that you start as a customer take precedence \n \t\tautoshifts, which take precedence over practice runs. That is, customer-initiated zonal shifts > autoshifts > practice run \n \t\tzonal shifts.

\n

For more information, see \n \t\tHow zonal autoshift \n \t\t\tand practice runs work in the Amazon Route 53 Application Recovery Controller Developer Guide.

", "smithy.api#required": {} } }, @@ -2496,14 +2666,14 @@ "awayFrom": { "target": "com.amazonaws.arczonalshift#AvailabilityZone", "traits": { - "smithy.api#documentation": "

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. \n \t\tUntil the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

", + "smithy.api#documentation": "

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. \n \t\tUntil the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

", "smithy.api#required": {} } }, "expiryTime": { "target": "com.amazonaws.arczonalshift#ExpiryTime", "traits": { - "smithy.api#documentation": "

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. \n \t\tYou can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift \n \t\tto set a new expiration at any time.

\n

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts \n \t\tto an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or\n \t\tjust wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

", + "smithy.api#documentation": "

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. \n \t\tYou can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift \n \t\tto set a new expiration at any time.

\n

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts \n \t\tto an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or\n \t\tjust wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

", "smithy.api#required": {} } }, @@ -2517,7 +2687,7 @@ "comment": { "target": "com.amazonaws.arczonalshift#ZonalShiftComment", "traits": { - "smithy.api#documentation": "

A comment that you enter about the zonal shift. Only the latest comment is retained; no comment\n \t\thistory is maintained. That is, a new comment overwrites any existing comment string.

", + "smithy.api#documentation": "

A comment that you enter for a customer-initiated zonal shift. Only the latest comment is retained; no comment\n \t\thistory is maintained. That is, a new comment overwrites any existing comment string.

", "smithy.api#required": {} } }, @@ -2597,14 +2767,14 @@ "awayFrom": { "target": "com.amazonaws.arczonalshift#AvailabilityZone", "traits": { - "smithy.api#documentation": "

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. \n \t\tUntil the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

", + "smithy.api#documentation": "

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. \n \t\tUntil the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

", "smithy.api#required": {} } }, "expiryTime": { "target": "com.amazonaws.arczonalshift#ExpiryTime", "traits": { - "smithy.api#documentation": "

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. \n \t\tYou can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift \n \t\tto set a new expiration at any time.

\n

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts \n \t\tto an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or\n \t\tjust wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

", + "smithy.api#documentation": "

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. \n \t\tYou can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift \n \t\tto set a new expiration at any time.

\n

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts \n \t\tto an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or\n \t\tjust wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

", "smithy.api#required": {} } }, @@ -2637,7 +2807,7 @@ } }, "traits": { - "smithy.api#documentation": "

Lists information about zonal shifts in Amazon Route 53 Application Recovery Controller, including zonal shifts that you start yourself and zonal shifts that Route 53 ARC starts\n \t\ton your behalf for practice runs with zonal autoshift.

\n

Zonal shifts are temporary, including customer-started zonal shifts and the zonal autoshift practice run zonal shifts that\n \t\tRoute 53 ARC starts weekly, on your behalf. A zonal shift that a customer starts can be active for up to three days (72 hours). A\n \t\tpractice run zonal shift has a 30 minute duration.

" + "smithy.api#documentation": "

Lists information about zonal shifts in Amazon Route 53 Application Recovery Controller, including zonal shifts that you start yourself and zonal shifts that Route 53 ARC starts\n \t\ton your behalf for practice runs with zonal autoshift.

\n

Zonal shifts are temporary, including customer-initiated zonal shifts and the zonal autoshift practice run zonal shifts that\n \t\tRoute 53 ARC starts weekly, on your behalf. A zonal shift that a customer starts can be active for up to three days (72 hours). A\n \t\tpractice run zonal shift has a 30 minute duration.

" } }, "com.amazonaws.arczonalshift#ZonalShifts": { diff --git a/aws-models/auto-scaling.json b/aws-models/auto-scaling.json index e9c3eaaa562b..d6d9e29ef20b 100644 --- a/aws-models/auto-scaling.json +++ b/aws-models/auto-scaling.json @@ -4954,6 +4954,19 @@ ] } } + ], + "smithy.test#smokeTests": [ + { + "id": "DescribeScalingProcessTypesSuccess", + "params": {}, + "vendorParams": { + "region": "us-west-2" + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "expect": { + "success": {} + } + } ] } }, diff --git a/aws-models/codebuild.json b/aws-models/codebuild.json index 98f50908cd54..5b1dcc7ce6e6 100644 --- a/aws-models/codebuild.json +++ b/aws-models/codebuild.json @@ -4916,7 +4916,20 @@ "inputToken": "nextToken", "outputToken": "nextToken", "items": "ids" - } + }, + "smithy.test#smokeTests": [ + { + "id": "ListBuildsSuccess", + "params": {}, + "vendorParams": { + "region": "us-west-2" + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "expect": { + "success": {} + } + } + ] } }, "com.amazonaws.codebuild#ListBuildsForProject": { diff --git a/aws-models/dynamodb.json b/aws-models/dynamodb.json index 0d8e4d1e42ac..3dcf98b62dfc 100644 --- a/aws-models/dynamodb.json +++ b/aws-models/dynamodb.json @@ -7720,7 +7720,22 @@ "outputToken": "LastEvaluatedTableName", "items": "TableNames", "pageSize": "Limit" - } + }, + "smithy.test#smokeTests": [ + { + "id": "ListTablesSuccess", + "params": { + "Limit": 1 + }, + "vendorParams": { + "region": "us-west-2" + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "expect": { + "success": {} + } + } + ] } }, "com.amazonaws.dynamodb#ListTablesInput": { diff --git a/aws-models/global-accelerator.json b/aws-models/global-accelerator.json index 7374c575f082..bf937e1e3f86 100644 --- a/aws-models/global-accelerator.json +++ b/aws-models/global-accelerator.json @@ -807,6 +807,9 @@ "target": "com.amazonaws.globalaccelerator#CreateAcceleratorResponse" }, "errors": [ + { + "target": "com.amazonaws.globalaccelerator#AccessDeniedException" + }, { "target": "com.amazonaws.globalaccelerator#InternalServiceErrorException" }, @@ -815,6 +818,9 @@ }, { "target": "com.amazonaws.globalaccelerator#LimitExceededException" + }, + { + "target": "com.amazonaws.globalaccelerator#TransactionInProgressException" } ], "traits": { @@ -986,6 +992,9 @@ }, { "target": "com.amazonaws.globalaccelerator#LimitExceededException" + }, + { + "target": "com.amazonaws.globalaccelerator#TransactionInProgressException" } ], "traits": { @@ -1829,6 +1838,9 @@ }, { "target": "com.amazonaws.globalaccelerator#InvalidArgumentException" + }, + { + "target": "com.amazonaws.globalaccelerator#TransactionInProgressException" } ], "traits": { @@ -1917,6 +1929,9 @@ }, { "target": "com.amazonaws.globalaccelerator#InvalidArgumentException" + }, + { + "target": "com.amazonaws.globalaccelerator#TransactionInProgressException" } ], "traits": { @@ -5033,11 +5048,20 @@ { "target": "com.amazonaws.globalaccelerator#AcceleratorNotFoundException" }, + { + "target": "com.amazonaws.globalaccelerator#AttachmentNotFoundException" + }, + { + "target": "com.amazonaws.globalaccelerator#EndpointGroupNotFoundException" + }, { "target": "com.amazonaws.globalaccelerator#InternalServiceErrorException" }, { "target": "com.amazonaws.globalaccelerator#InvalidArgumentException" + }, + { + "target": "com.amazonaws.globalaccelerator#ListenerNotFoundException" } ], "traits": { @@ -5754,11 +5778,17 @@ { "target": "com.amazonaws.globalaccelerator#AccessDeniedException" }, + { + "target": "com.amazonaws.globalaccelerator#ConflictException" + }, { "target": "com.amazonaws.globalaccelerator#InternalServiceErrorException" }, { "target": "com.amazonaws.globalaccelerator#InvalidArgumentException" + }, + { + "target": "com.amazonaws.globalaccelerator#TransactionInProgressException" } ], "traits": { @@ -5785,6 +5815,9 @@ }, { "target": "com.amazonaws.globalaccelerator#InvalidArgumentException" + }, + { + "target": "com.amazonaws.globalaccelerator#TransactionInProgressException" } ], "traits": { @@ -5994,11 +6027,17 @@ { "target": "com.amazonaws.globalaccelerator#AcceleratorNotFoundException" }, + { + "target": "com.amazonaws.globalaccelerator#ConflictException" + }, { "target": "com.amazonaws.globalaccelerator#InternalServiceErrorException" }, { "target": "com.amazonaws.globalaccelerator#InvalidArgumentException" + }, + { + "target": "com.amazonaws.globalaccelerator#TransactionInProgressException" } ], "traits": { @@ -6025,6 +6064,9 @@ }, { "target": "com.amazonaws.globalaccelerator#InvalidArgumentException" + }, + { + "target": "com.amazonaws.globalaccelerator#TransactionInProgressException" } ], "traits": { diff --git a/aws-models/pinpoint.json b/aws-models/pinpoint.json index 5dfd2d90a1af..88844d00aa55 100644 --- a/aws-models/pinpoint.json +++ b/aws-models/pinpoint.json @@ -8034,7 +8034,22 @@ "method": "GET", "uri": "/v1/apps/{ApplicationId}", "code": 200 - } + }, + "smithy.test#smokeTests": [ + { + "id": "GetAppFailure", + "params": { + "ApplicationId": "InvalidApplicationId" + }, + "vendorParams": { + "region": "us-west-2" + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "expect": { + "failure": {} + } + } + ] } }, "com.amazonaws.pinpoint#GetAppRequest": { @@ -8286,7 +8301,20 @@ "method": "GET", "uri": "/v1/apps", "code": 200 - } + }, + "smithy.test#smokeTests": [ + { + "id": "GetAppsSuccess", + "params": {}, + "vendorParams": { + "region": "us-west-2" + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "expect": { + "success": {} + } + } + ] } }, "com.amazonaws.pinpoint#GetAppsRequest": { @@ -15202,6 +15230,9 @@ "name": "mobiletargeting" }, "aws.protocols#restJson1": {}, + "smithy.api#auth": [ + "aws.auth#sigv4" + ], "smithy.api#documentation": "

Doc Engage API - Amazon Pinpoint API

", "smithy.api#title": "Amazon Pinpoint", "smithy.rules#endpointRuleSet": { diff --git a/aws-models/quicksight.json b/aws-models/quicksight.json index 18face9a2b49..f169298e8660 100644 --- a/aws-models/quicksight.json +++ b/aws-models/quicksight.json @@ -232,6 +232,190 @@ } } }, + "com.amazonaws.quicksight#AggFunction": { + "type": "structure", + "members": { + "Aggregation": { + "target": "com.amazonaws.quicksight#AggType", + "traits": { + "smithy.api#documentation": "

The aggregation of an Agg function.

" + } + }, + "AggregationFunctionParameters": { + "target": "com.amazonaws.quicksight#AggFunctionParamMap", + "traits": { + "smithy.api#documentation": "

The aggregation parameters for an Agg function.

" + } + }, + "Period": { + "target": "com.amazonaws.quicksight#TopicTimeGranularity", + "traits": { + "smithy.api#documentation": "

The period of an Agg function.

" + } + }, + "PeriodField": { + "target": "com.amazonaws.quicksight#LimitedString", + "traits": { + "smithy.api#documentation": "

The period field for an Agg function.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition of an Agg function.

" + } + }, + "com.amazonaws.quicksight#AggFunctionParamKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + } + } + }, + "com.amazonaws.quicksight#AggFunctionParamMap": { + "type": "map", + "key": { + "target": "com.amazonaws.quicksight#AggFunctionParamKey" + }, + "value": { + "target": "com.amazonaws.quicksight#AggFunctionParamValue" + } + }, + "com.amazonaws.quicksight#AggFunctionParamValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + } + } + }, + "com.amazonaws.quicksight#AggType": { + "type": "enum", + "members": { + "SUM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUM" + } + }, + "MIN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MIN" + } + }, + "MAX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MAX" + } + }, + "COUNT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COUNT" + } + }, + "AVERAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AVERAGE" + } + }, + "DISTINCT_COUNT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISTINCT_COUNT" + } + }, + "STDEV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STDEV" + } + }, + "STDEVP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STDEVP" + } + }, + "VAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VAR" + } + }, + "VARP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VARP" + } + }, + "PERCENTILE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PERCENTILE" + } + }, + "MEDIAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MEDIAN" + } + }, + "PTD_SUM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PTD_SUM" + } + }, + "PTD_MIN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PTD_MIN" + } + }, + "PTD_MAX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PTD_MAX" + } + }, + "PTD_COUNT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PTD_COUNT" + } + }, + "PTD_DISTINCT_COUNT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PTD_DISTINCT_COUNT" + } + }, + "PTD_AVERAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PTD_AVERAGE" + } + }, + "COLUMN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COLUMN" + } + }, + "CUSTOM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CUSTOM" + } + } + } + }, "com.amazonaws.quicksight#AggregationFunction": { "type": "structure", "members": { @@ -273,6 +457,38 @@ "target": "com.amazonaws.quicksight#LimitedString" } }, + "com.amazonaws.quicksight#AggregationPartitionBy": { + "type": "structure", + "members": { + "FieldName": { + "target": "com.amazonaws.quicksight#LimitedString", + "traits": { + "smithy.api#documentation": "

The field Name for an AggregationPartitionBy.

" + } + }, + "TimeGranularity": { + "target": "com.amazonaws.quicksight#TimeGranularity", + "traits": { + "smithy.api#documentation": "

The TimeGranularity for an AggregationPartitionBy.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition of an AggregationPartitionBy.

" + } + }, + "com.amazonaws.quicksight#AggregationPartitionByList": { + "type": "list", + "member": { + "target": "com.amazonaws.quicksight#AggregationPartitionBy" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, "com.amazonaws.quicksight#AggregationSortConfiguration": { "type": "structure", "members": { @@ -785,6 +1001,33 @@ } } }, + "com.amazonaws.quicksight#Anchor": { + "type": "structure", + "members": { + "AnchorType": { + "target": "com.amazonaws.quicksight#AnchorType", + "traits": { + "smithy.api#documentation": "

The AnchorType for the Anchor.

" + } + }, + "TimeGranularity": { + "target": "com.amazonaws.quicksight#TimeGranularity", + "traits": { + "smithy.api#documentation": "

The TimeGranularity of the Anchor.

" + } + }, + "Offset": { + "target": "com.amazonaws.quicksight#Integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The offset of the Anchor.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition of the Anchor.

" + } + }, "com.amazonaws.quicksight#AnchorDateConfiguration": { "type": "structure", "members": { @@ -816,6 +1059,17 @@ } } }, + "com.amazonaws.quicksight#AnchorType": { + "type": "enum", + "members": { + "TODAY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TODAY" + } + } + } + }, "com.amazonaws.quicksight#AnonymousUserDashboardEmbeddingConfiguration": { "type": "structure", "members": { @@ -928,6 +1182,22 @@ "target": "com.amazonaws.quicksight#AnonymousUserSnapshotJobResult" } }, + "com.amazonaws.quicksight#AnswerId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": "^[A-Za-z0-9-_.\\\\+]*$" + } + }, + "com.amazonaws.quicksight#AnswerIds": { + "type": "list", + "member": { + "target": "com.amazonaws.quicksight#AnswerId" + } + }, "com.amazonaws.quicksight#ArcAxisConfiguration": { "type": "structure", "members": { @@ -3893,6 +4163,230 @@ } } }, + "com.amazonaws.quicksight#BatchCreateTopicReviewedAnswer": { + "type": "operation", + "input": { + "target": "com.amazonaws.quicksight#BatchCreateTopicReviewedAnswerRequest" + }, + "output": { + "target": "com.amazonaws.quicksight#BatchCreateTopicReviewedAnswerResponse" + }, + "errors": [ + { + "target": "com.amazonaws.quicksight#AccessDeniedException" + }, + { + "target": "com.amazonaws.quicksight#InternalFailureException" + }, + { + "target": "com.amazonaws.quicksight#InvalidParameterValueException" + }, + { + "target": "com.amazonaws.quicksight#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.quicksight#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates new reviewed answers for a Q Topic.

", + "smithy.api#http": { + "method": "POST", + "uri": "/accounts/{AwsAccountId}/topics/{TopicId}/batch-create-reviewed-answers", + "code": 200 + } + } + }, + "com.amazonaws.quicksight#BatchCreateTopicReviewedAnswerRequest": { + "type": "structure", + "members": { + "AwsAccountId": { + "target": "com.amazonaws.quicksight#AwsAccountId", + "traits": { + "smithy.api#documentation": "

The ID of the Amazon Web Services account that you want to create a reviewed answer in.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "TopicId": { + "target": "com.amazonaws.quicksight#TopicId", + "traits": { + "smithy.api#documentation": "

The ID for the topic reviewed answer that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Answers": { + "target": "com.amazonaws.quicksight#CreateTopicReviewedAnswers", + "traits": { + "smithy.api#documentation": "

The definition of the Answers to be created.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.quicksight#BatchCreateTopicReviewedAnswerResponse": { + "type": "structure", + "members": { + "TopicId": { + "target": "com.amazonaws.quicksight#TopicId", + "traits": { + "smithy.api#documentation": "

The ID for the topic reviewed answer that you want to create. This ID is unique per Amazon Web Services Region\n for each Amazon Web Services account.

" + } + }, + "TopicArn": { + "target": "com.amazonaws.quicksight#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the topic.

" + } + }, + "SucceededAnswers": { + "target": "com.amazonaws.quicksight#SucceededTopicReviewedAnswers", + "traits": { + "smithy.api#documentation": "

The definition of Answers that are successfully created.

" + } + }, + "InvalidAnswers": { + "target": "com.amazonaws.quicksight#InvalidTopicReviewedAnswers", + "traits": { + "smithy.api#documentation": "

The definition of Answers that are invalid and not created.

" + } + }, + "Status": { + "target": "com.amazonaws.quicksight#StatusCode", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The HTTP status of the request.

", + "smithy.api#httpResponseCode": {} + } + }, + "RequestId": { + "target": "com.amazonaws.quicksight#String", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services request ID for this operation.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.quicksight#BatchDeleteTopicReviewedAnswer": { + "type": "operation", + "input": { + "target": "com.amazonaws.quicksight#BatchDeleteTopicReviewedAnswerRequest" + }, + "output": { + "target": "com.amazonaws.quicksight#BatchDeleteTopicReviewedAnswerResponse" + }, + "errors": [ + { + "target": "com.amazonaws.quicksight#AccessDeniedException" + }, + { + "target": "com.amazonaws.quicksight#ConflictException" + }, + { + "target": "com.amazonaws.quicksight#InternalFailureException" + }, + { + "target": "com.amazonaws.quicksight#InvalidParameterValueException" + }, + { + "target": "com.amazonaws.quicksight#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.quicksight#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes reviewed answers for Q Topic.

", + "smithy.api#http": { + "method": "POST", + "uri": "/accounts/{AwsAccountId}/topics/{TopicId}/batch-delete-reviewed-answers", + "code": 200 + } + } + }, + "com.amazonaws.quicksight#BatchDeleteTopicReviewedAnswerRequest": { + "type": "structure", + "members": { + "AwsAccountId": { + "target": "com.amazonaws.quicksight#AwsAccountId", + "traits": { + "smithy.api#documentation": "

The ID of the Amazon Web Services account that you want to delete a reviewed answers in.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "TopicId": { + "target": "com.amazonaws.quicksight#TopicId", + "traits": { + "smithy.api#documentation": "

The ID for the topic reviewed answer that you want to delete. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "AnswerIds": { + "target": "com.amazonaws.quicksight#AnswerIds", + "traits": { + "smithy.api#documentation": "

The Answer IDs of the Answers to be deleted.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.quicksight#BatchDeleteTopicReviewedAnswerResponse": { + "type": "structure", + "members": { + "TopicId": { + "target": "com.amazonaws.quicksight#TopicId", + "traits": { + "smithy.api#documentation": "

The ID of the topic reviewed answer that you want to delete. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

" + } + }, + "TopicArn": { + "target": "com.amazonaws.quicksight#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the topic.

" + } + }, + "SucceededAnswers": { + "target": "com.amazonaws.quicksight#SucceededTopicReviewedAnswers", + "traits": { + "smithy.api#documentation": "

The definition of Answers that are successfully deleted.

" + } + }, + "InvalidAnswers": { + "target": "com.amazonaws.quicksight#InvalidTopicReviewedAnswers", + "traits": { + "smithy.api#documentation": "

The definition of Answers that are invalid and not deleted.

" + } + }, + "RequestId": { + "target": "com.amazonaws.quicksight#String", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services request ID for this operation.

" + } + }, + "Status": { + "target": "com.amazonaws.quicksight#StatusCode", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The HTTP status of the request.

", + "smithy.api#httpResponseCode": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.quicksight#BigQueryParameters": { "type": "structure", "members": { @@ -4564,6 +5058,18 @@ "smithy.api#sensitive": {} } }, + "com.amazonaws.quicksight#CalculatedFieldReferenceList": { + "type": "list", + "member": { + "target": "com.amazonaws.quicksight#Identifier" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 250 + } + } + }, "com.amazonaws.quicksight#CalculatedFields": { "type": "list", "member": { @@ -5197,6 +5703,38 @@ "smithy.api#documentation": "

A structure that represents a collective constant.

" } }, + "com.amazonaws.quicksight#CollectiveConstantEntry": { + "type": "structure", + "members": { + "ConstantType": { + "target": "com.amazonaws.quicksight#ConstantType", + "traits": { + "smithy.api#documentation": "

The ConstantType of a CollectiveConstantEntry.

" + } + }, + "Value": { + "target": "com.amazonaws.quicksight#ConstantValueString", + "traits": { + "smithy.api#documentation": "

The value of a CollectiveConstantEntry.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition for a CollectiveConstantEntry.

" + } + }, + "com.amazonaws.quicksight#CollectiveConstantEntryList": { + "type": "list", + "member": { + "target": "com.amazonaws.quicksight#CollectiveConstantEntry" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2000 + } + } + }, "com.amazonaws.quicksight#ColorFillType": { "type": "enum", "members": { @@ -6160,6 +6698,71 @@ } } }, + "com.amazonaws.quicksight#ComparisonMethodType": { + "type": "enum", + "members": { + "DIFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DIFF" + } + }, + "PERC_DIFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PERC_DIFF" + } + }, + "DIFF_AS_PERC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DIFF_AS_PERC" + } + }, + "POP_CURRENT_DIFF_AS_PERC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "POP_CURRENT_DIFF_AS_PERC" + } + }, + "POP_CURRENT_DIFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "POP_CURRENT_DIFF" + } + }, + "POP_OVERTIME_DIFF_AS_PERC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "POP_OVERTIME_DIFF_AS_PERC" + } + }, + "POP_OVERTIME_DIFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "POP_OVERTIME_DIFF" + } + }, + "PERCENT_OF_TOTAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PERCENT_OF_TOTAL" + } + }, + "RUNNING_SUM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RUNNING_SUM" + } + }, + "MOVING_AVERAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MOVING_AVERAGE" + } + } + } + }, "com.amazonaws.quicksight#Computation": { "type": "structure", "members": { @@ -6552,6 +7155,15 @@ } } }, + "com.amazonaws.quicksight#ConstantValueString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + } + } + }, "com.amazonaws.quicksight#ContextMenuOption": { "type": "structure", "members": { @@ -6600,6 +7212,104 @@ } } }, + "com.amazonaws.quicksight#ContributionAnalysisDirection": { + "type": "enum", + "members": { + "INCREASE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INCREASE" + } + }, + "DECREASE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DECREASE" + } + }, + "NEUTRAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEUTRAL" + } + } + } + }, + "com.amazonaws.quicksight#ContributionAnalysisFactor": { + "type": "structure", + "members": { + "FieldName": { + "target": "com.amazonaws.quicksight#LimitedString", + "traits": { + "smithy.api#documentation": "

The field name of the ContributionAnalysisFactor.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition for the ContributionAnalysisFactor.

" + } + }, + "com.amazonaws.quicksight#ContributionAnalysisFactorsList": { + "type": "list", + "member": { + "target": "com.amazonaws.quicksight#ContributionAnalysisFactor" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.quicksight#ContributionAnalysisSortType": { + "type": "enum", + "members": { + "ABSOLUTE_DIFFERENCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ABSOLUTE_DIFFERENCE" + } + }, + "CONTRIBUTION_PERCENTAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTRIBUTION_PERCENTAGE" + } + }, + "DEVIATION_FROM_EXPECTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEVIATION_FROM_EXPECTED" + } + }, + "PERCENTAGE_DIFFERENCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PERCENTAGE_DIFFERENCE" + } + } + } + }, + "com.amazonaws.quicksight#ContributionAnalysisTimeRanges": { + "type": "structure", + "members": { + "StartRange": { + "target": "com.amazonaws.quicksight#TopicIRFilterOption", + "traits": { + "smithy.api#documentation": "

The start range for the ContributionAnalysisTimeRanges.

" + } + }, + "EndRange": { + "target": "com.amazonaws.quicksight#TopicIRFilterOption", + "traits": { + "smithy.api#documentation": "

The end range for the ContributionAnalysisTimeRanges.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition for the ContributionAnalysisTimeRanges.

" + } + }, "com.amazonaws.quicksight#ContributorDimensionList": { "type": "list", "member": { @@ -9525,6 +10235,65 @@ "smithy.api#output": {} } }, + "com.amazonaws.quicksight#CreateTopicReviewedAnswer": { + "type": "structure", + "members": { + "AnswerId": { + "target": "com.amazonaws.quicksight#AnswerId", + "traits": { + "smithy.api#documentation": "

The answer ID for the CreateTopicReviewedAnswer.

", + "smithy.api#required": {} + } + }, + "DatasetArn": { + "target": "com.amazonaws.quicksight#Arn", + "traits": { + "smithy.api#documentation": "

The Dataset arn for the CreateTopicReviewedAnswer.

", + "smithy.api#required": {} + } + }, + "Question": { + "target": "com.amazonaws.quicksight#LimitedString", + "traits": { + "smithy.api#documentation": "

The Question to be created.

", + "smithy.api#required": {} + } + }, + "Mir": { + "target": "com.amazonaws.quicksight#TopicIR", + "traits": { + "smithy.api#documentation": "

The Mir for the CreateTopicReviewedAnswer.

" + } + }, + "PrimaryVisual": { + "target": "com.amazonaws.quicksight#TopicVisual", + "traits": { + "smithy.api#documentation": "

The PrimaryVisual for the CreateTopicReviewedAnswer.

" + } + }, + "Template": { + "target": "com.amazonaws.quicksight#TopicTemplate", + "traits": { + "smithy.api#documentation": "

The template for the CreateTopicReviewedAnswer.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition for a CreateTopicReviewedAnswer.

" + } + }, + "com.amazonaws.quicksight#CreateTopicReviewedAnswers": { + "type": "list", + "member": { + "target": "com.amazonaws.quicksight#CreateTopicReviewedAnswer" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, "com.amazonaws.quicksight#CreateVPCConnection": { "type": "operation", "input": { @@ -13149,6 +13918,18 @@ "traits": { "smithy.api#documentation": "

The configuration of info icon label options.

" } + }, + "HelperTextVisibility": { + "target": "com.amazonaws.quicksight#Visibility", + "traits": { + "smithy.api#documentation": "

The helper text visibility of the DateTimePickerControlDisplayOptions.

" + } + }, + "DateIconVisibility": { + "target": "com.amazonaws.quicksight#Visibility", + "traits": { + "smithy.api#documentation": "

The date icon visibility of the DateTimePickerControlDisplayOptions.

" + } } }, "traits": { @@ -22406,6 +23187,44 @@ "smithy.api#documentation": "

With a Filter, you can remove portions of data from a particular visual or view.

\n

This is a union type structure. For this structure to be valid, only one of the attributes can be defined.

" } }, + "com.amazonaws.quicksight#FilterAggMetrics": { + "type": "structure", + "members": { + "MetricOperand": { + "target": "com.amazonaws.quicksight#Identifier", + "traits": { + "smithy.api#documentation": "

The metric operand of the FilterAggMetrics.

" + } + }, + "Function": { + "target": "com.amazonaws.quicksight#AggType", + "traits": { + "smithy.api#documentation": "

The function for the FilterAggMetrics.

" + } + }, + "SortDirection": { + "target": "com.amazonaws.quicksight#TopicSortDirection", + "traits": { + "smithy.api#documentation": "

The sort direction for FilterAggMetrics.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition for the FilterAggMetrics.

" + } + }, + "com.amazonaws.quicksight#FilterAggMetricsList": { + "type": "list", + "member": { + "target": "com.amazonaws.quicksight#FilterAggMetrics" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, "com.amazonaws.quicksight#FilterClass": { "type": "enum", "members": { @@ -26553,6 +27372,21 @@ } } }, + "com.amazonaws.quicksight#Identifier": { + "type": "structure", + "members": { + "Identity": { + "target": "com.amazonaws.quicksight#LimitedString", + "traits": { + "smithy.api#documentation": "

The identity of the identifier.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition for the identifier.

" + } + }, "com.amazonaws.quicksight#IdentityCenterConfiguration": { "type": "structure", "members": { @@ -27599,6 +28433,32 @@ "smithy.api#httpError": 400 } }, + "com.amazonaws.quicksight#InvalidTopicReviewedAnswer": { + "type": "structure", + "members": { + "AnswerId": { + "target": "com.amazonaws.quicksight#AnswerId", + "traits": { + "smithy.api#documentation": "

The answer ID for the InvalidTopicReviewedAnswer.

" + } + }, + "Error": { + "target": "com.amazonaws.quicksight#ReviewedAnswerErrorCode", + "traits": { + "smithy.api#documentation": "

The error that is returned for the InvalidTopicReviewedAnswer.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition for a InvalidTopicReviewedAnswer.

" + } + }, + "com.amazonaws.quicksight#InvalidTopicReviewedAnswers": { + "type": "list", + "member": { + "target": "com.amazonaws.quicksight#InvalidTopicReviewedAnswer" + } + }, "com.amazonaws.quicksight#IpRestrictionRuleDescription": { "type": "string", "traits": { @@ -31864,6 +32724,104 @@ "smithy.api#output": {} } }, + "com.amazonaws.quicksight#ListTopicReviewedAnswers": { + "type": "operation", + "input": { + "target": "com.amazonaws.quicksight#ListTopicReviewedAnswersRequest" + }, + "output": { + "target": "com.amazonaws.quicksight#ListTopicReviewedAnswersResponse" + }, + "errors": [ + { + "target": "com.amazonaws.quicksight#AccessDeniedException" + }, + { + "target": "com.amazonaws.quicksight#InternalFailureException" + }, + { + "target": "com.amazonaws.quicksight#InvalidParameterValueException" + }, + { + "target": "com.amazonaws.quicksight#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.quicksight#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all reviewed answers for a Q Topic.

", + "smithy.api#http": { + "method": "GET", + "uri": "/accounts/{AwsAccountId}/topics/{TopicId}/reviewed-answers", + "code": 200 + } + } + }, + "com.amazonaws.quicksight#ListTopicReviewedAnswersRequest": { + "type": "structure", + "members": { + "AwsAccountId": { + "target": "com.amazonaws.quicksight#AwsAccountId", + "traits": { + "smithy.api#documentation": "

The ID of the Amazon Web Services account that containd the reviewed answers that you want listed.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "TopicId": { + "target": "com.amazonaws.quicksight#TopicId", + "traits": { + "smithy.api#documentation": "

The ID for the topic that contains the reviewed answer that you want to list. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.quicksight#ListTopicReviewedAnswersResponse": { + "type": "structure", + "members": { + "TopicId": { + "target": "com.amazonaws.quicksight#TopicId", + "traits": { + "smithy.api#documentation": "

The ID for the topic that contains the reviewed answer that you want to list. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

" + } + }, + "TopicArn": { + "target": "com.amazonaws.quicksight#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the topic.

" + } + }, + "Answers": { + "target": "com.amazonaws.quicksight#TopicReviewedAnswers", + "traits": { + "smithy.api#documentation": "

The definition of all Answers in the topic.

" + } + }, + "Status": { + "target": "com.amazonaws.quicksight#StatusCode", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The HTTP status of the request.

", + "smithy.api#httpResponseCode": {} + } + }, + "RequestId": { + "target": "com.amazonaws.quicksight#String", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services request ID for this operation.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.quicksight#ListTopics": { "type": "operation", "input": { @@ -33118,6 +34076,20 @@ "target": "com.amazonaws.quicksight#NamedEntityDefinition" } }, + "com.amazonaws.quicksight#NamedEntityRef": { + "type": "structure", + "members": { + "NamedEntityName": { + "target": "com.amazonaws.quicksight#LimitedString", + "traits": { + "smithy.api#documentation": "

The NamedEntityName for the NamedEntityRef.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition for a NamedEntityRef.

" + } + }, "com.amazonaws.quicksight#NamedFilterAggType": { "type": "enum", "members": { @@ -33629,6 +34601,29 @@ } } }, + "com.amazonaws.quicksight#NullFilterOption": { + "type": "enum", + "members": { + "ALL_VALUES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ALL_VALUES" + } + }, + "NON_NULLS_ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NON_NULLS_ONLY" + } + }, + "NULLS_ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NULLS_ONLY" + } + } + } + }, "com.amazonaws.quicksight#NullString": { "type": "string", "traits": { @@ -34160,6 +35155,18 @@ } } }, + "com.amazonaws.quicksight#OperandList": { + "type": "list", + "member": { + "target": "com.amazonaws.quicksight#Identifier" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 25 + } + } + }, "com.amazonaws.quicksight#OptionalPort": { "type": "integer", "traits": { @@ -36753,6 +37760,12 @@ "type": "service", "version": "2018-04-01", "operations": [ + { + "target": "com.amazonaws.quicksight#BatchCreateTopicReviewedAnswer" + }, + { + "target": "com.amazonaws.quicksight#BatchDeleteTopicReviewedAnswer" + }, { "target": "com.amazonaws.quicksight#CancelIngestion" }, @@ -37119,6 +38132,9 @@ { "target": "com.amazonaws.quicksight#ListTopicRefreshSchedules" }, + { + "target": "com.amazonaws.quicksight#ListTopicReviewedAnswers" + }, { "target": "com.amazonaws.quicksight#ListTopics" }, @@ -39957,6 +40973,53 @@ "smithy.api#pattern": "^[\\w\\-]+$" } }, + "com.amazonaws.quicksight#ReviewedAnswerErrorCode": { + "type": "enum", + "members": { + "INTERNAL_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INTERNAL_ERROR" + } + }, + "MISSING_ANSWER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MISSING_ANSWER" + } + }, + "DATASET_DOES_NOT_EXIST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DATASET_DOES_NOT_EXIST" + } + }, + "INVALID_DATASET_ARN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_DATASET_ARN" + } + }, + "DUPLICATED_ANSWER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DUPLICATED_ANSWER" + } + }, + "INVALID_DATA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_DATA" + } + }, + "MISSING_REQUIRED_FIELDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MISSING_REQUIRED_FIELDS" + } + } + } + }, "com.amazonaws.quicksight#Role": { "type": "enum", "members": { @@ -42912,6 +43975,32 @@ "smithy.api#documentation": "

The display options of a control.

" } }, + "com.amazonaws.quicksight#Slot": { + "type": "structure", + "members": { + "SlotId": { + "target": "com.amazonaws.quicksight#LimitedString", + "traits": { + "smithy.api#documentation": "

The slot ID of the slot.

" + } + }, + "VisualId": { + "target": "com.amazonaws.quicksight#LimitedString", + "traits": { + "smithy.api#documentation": "

The visual ID for the slot.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition for the slot.

" + } + }, + "com.amazonaws.quicksight#Slots": { + "type": "list", + "member": { + "target": "com.amazonaws.quicksight#Slot" + } + }, "com.amazonaws.quicksight#SmallMultiplesAxisPlacement": { "type": "enum", "members": { @@ -44463,6 +45552,26 @@ "smithy.api#documentation": "

The subtotal options.

" } }, + "com.amazonaws.quicksight#SucceededTopicReviewedAnswer": { + "type": "structure", + "members": { + "AnswerId": { + "target": "com.amazonaws.quicksight#AnswerId", + "traits": { + "smithy.api#documentation": "

The answer ID for the SucceededTopicReviewedAnswer.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition for a SucceededTopicReviewedAnswer.

" + } + }, + "com.amazonaws.quicksight#SucceededTopicReviewedAnswers": { + "type": "list", + "member": { + "target": "com.amazonaws.quicksight#SucceededTopicReviewedAnswer" + } + }, "com.amazonaws.quicksight#SuccessfulKeyRegistrationEntries": { "type": "list", "member": { @@ -47472,6 +48581,44 @@ "target": "com.amazonaws.quicksight#TopicColumn" } }, + "com.amazonaws.quicksight#TopicConstantValue": { + "type": "structure", + "members": { + "ConstantType": { + "target": "com.amazonaws.quicksight#ConstantType", + "traits": { + "smithy.api#documentation": "

The constant type of a TopicConstantValue.

" + } + }, + "Value": { + "target": "com.amazonaws.quicksight#ConstantValueString", + "traits": { + "smithy.api#documentation": "

The value of the TopicConstantValue.

" + } + }, + "Minimum": { + "target": "com.amazonaws.quicksight#ConstantValueString", + "traits": { + "smithy.api#documentation": "

The minimum for the TopicConstantValue.

" + } + }, + "Maximum": { + "target": "com.amazonaws.quicksight#ConstantValueString", + "traits": { + "smithy.api#documentation": "

The maximum for the TopicConstantValue.

" + } + }, + "ValueList": { + "target": "com.amazonaws.quicksight#CollectiveConstantEntryList", + "traits": { + "smithy.api#documentation": "

The value list of the TopicConstantValue.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition for a TopicConstantValue.

" + } + }, "com.amazonaws.quicksight#TopicDateRangeFilter": { "type": "structure", "members": { @@ -47607,6 +48754,499 @@ "target": "com.amazonaws.quicksight#TopicFilter" } }, + "com.amazonaws.quicksight#TopicIR": { + "type": "structure", + "members": { + "Metrics": { + "target": "com.amazonaws.quicksight#TopicIRMetricList", + "traits": { + "smithy.api#documentation": "

The metrics for the TopicIR.

" + } + }, + "GroupByList": { + "target": "com.amazonaws.quicksight#TopicIRGroupByList", + "traits": { + "smithy.api#documentation": "

The GroupBy list for the TopicIR.

" + } + }, + "Filters": { + "target": "com.amazonaws.quicksight#TopicIRFilterList", + "traits": { + "smithy.api#documentation": "

The filters for the TopicIR.

" + } + }, + "Sort": { + "target": "com.amazonaws.quicksight#TopicSortClause", + "traits": { + "smithy.api#documentation": "

The sort for the TopicIR.

" + } + }, + "ContributionAnalysis": { + "target": "com.amazonaws.quicksight#TopicIRContributionAnalysis", + "traits": { + "smithy.api#documentation": "

The contribution analysis for the TopicIR.

" + } + }, + "Visual": { + "target": "com.amazonaws.quicksight#VisualOptions", + "traits": { + "smithy.api#documentation": "

The visual for the TopicIR.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition for a TopicIR.

" + } + }, + "com.amazonaws.quicksight#TopicIRComparisonMethod": { + "type": "structure", + "members": { + "Type": { + "target": "com.amazonaws.quicksight#ComparisonMethodType", + "traits": { + "smithy.api#documentation": "

The type for the TopicIRComparisonMethod.

" + } + }, + "Period": { + "target": "com.amazonaws.quicksight#TopicTimeGranularity", + "traits": { + "smithy.api#documentation": "

The period for the TopicIRComparisonMethod.

" + } + }, + "WindowSize": { + "target": "com.amazonaws.quicksight#Integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The window size for the TopicIRComparisonMethod.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition of a TopicIRComparisonMethod.

" + } + }, + "com.amazonaws.quicksight#TopicIRContributionAnalysis": { + "type": "structure", + "members": { + "Factors": { + "target": "com.amazonaws.quicksight#ContributionAnalysisFactorsList", + "traits": { + "smithy.api#documentation": "

The factors for a TopicIRContributionAnalysis.

" + } + }, + "TimeRanges": { + "target": "com.amazonaws.quicksight#ContributionAnalysisTimeRanges", + "traits": { + "smithy.api#documentation": "

The time ranges for the TopicIRContributionAnalysis.

" + } + }, + "Direction": { + "target": "com.amazonaws.quicksight#ContributionAnalysisDirection", + "traits": { + "smithy.api#documentation": "

The direction for the TopicIRContributionAnalysis.

" + } + }, + "SortType": { + "target": "com.amazonaws.quicksight#ContributionAnalysisSortType", + "traits": { + "smithy.api#documentation": "

The sort type for the TopicIRContributionAnalysis.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition for a TopicIRContributionAnalysis.

" + } + }, + "com.amazonaws.quicksight#TopicIRFilterEntry": { + "type": "list", + "member": { + "target": "com.amazonaws.quicksight#TopicIRFilterOption" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2000 + } + } + }, + "com.amazonaws.quicksight#TopicIRFilterFunction": { + "type": "enum", + "members": { + "CONTAINS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTAINS" + } + }, + "EXACT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EXACT" + } + }, + "STARTS_WITH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STARTS_WITH" + } + }, + "ENDS_WITH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENDS_WITH" + } + }, + "CONTAINS_STRING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTAINS_STRING" + } + }, + "PREVIOUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PREVIOUS" + } + }, + "THIS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "THIS" + } + }, + "LAST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LAST" + } + }, + "NEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXT" + } + }, + "NOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOW" + } + } + } + }, + "com.amazonaws.quicksight#TopicIRFilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.quicksight#TopicIRFilterEntry" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2000 + } + } + }, + "com.amazonaws.quicksight#TopicIRFilterOption": { + "type": "structure", + "members": { + "FilterType": { + "target": "com.amazonaws.quicksight#TopicIRFilterType", + "traits": { + "smithy.api#documentation": "

The filter type for the TopicIRFilterOption.

" + } + }, + "FilterClass": { + "target": "com.amazonaws.quicksight#FilterClass", + "traits": { + "smithy.api#documentation": "

The filter class for the TopicIRFilterOption.

" + } + }, + "OperandField": { + "target": "com.amazonaws.quicksight#Identifier", + "traits": { + "smithy.api#documentation": "

The operand field for the TopicIRFilterOption.

" + } + }, + "Function": { + "target": "com.amazonaws.quicksight#TopicIRFilterFunction", + "traits": { + "smithy.api#documentation": "

The function for the TopicIRFilterOption.

" + } + }, + "Constant": { + "target": "com.amazonaws.quicksight#TopicConstantValue", + "traits": { + "smithy.api#documentation": "

The constant for the TopicIRFilterOption.

" + } + }, + "Inverse": { + "target": "com.amazonaws.quicksight#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

The inverse for the TopicIRFilterOption.

" + } + }, + "NullFilter": { + "target": "com.amazonaws.quicksight#NullFilterOption", + "traits": { + "smithy.api#documentation": "

The null filter for the TopicIRFilterOption.

" + } + }, + "Aggregation": { + "target": "com.amazonaws.quicksight#AggType", + "traits": { + "smithy.api#documentation": "

The aggregation for the TopicIRFilterOption.

" + } + }, + "AggregationFunctionParameters": { + "target": "com.amazonaws.quicksight#AggFunctionParamMap", + "traits": { + "smithy.api#documentation": "

The aggregation function parameters for the TopicIRFilterOption.

" + } + }, + "AggregationPartitionBy": { + "target": "com.amazonaws.quicksight#AggregationPartitionByList", + "traits": { + "smithy.api#documentation": "

The AggregationPartitionBy for the TopicIRFilterOption.

" + } + }, + "Range": { + "target": "com.amazonaws.quicksight#TopicConstantValue", + "traits": { + "smithy.api#documentation": "

The range for the TopicIRFilterOption.

" + } + }, + "Inclusive": { + "target": "com.amazonaws.quicksight#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

The inclusive for the TopicIRFilterOption.

" + } + }, + "TimeGranularity": { + "target": "com.amazonaws.quicksight#TimeGranularity", + "traits": { + "smithy.api#documentation": "

The time granularity for the TopicIRFilterOption.

" + } + }, + "LastNextOffset": { + "target": "com.amazonaws.quicksight#TopicConstantValue", + "traits": { + "smithy.api#documentation": "

The last next offset for the TopicIRFilterOption.

" + } + }, + "AggMetrics": { + "target": "com.amazonaws.quicksight#FilterAggMetricsList", + "traits": { + "smithy.api#documentation": "

The agg metrics for the TopicIRFilterOption.

" + } + }, + "TopBottomLimit": { + "target": "com.amazonaws.quicksight#TopicConstantValue", + "traits": { + "smithy.api#documentation": "

The TopBottomLimit for the TopicIRFilterOption.

" + } + }, + "SortDirection": { + "target": "com.amazonaws.quicksight#TopicSortDirection", + "traits": { + "smithy.api#documentation": "

The sort direction for the TopicIRFilterOption.

" + } + }, + "Anchor": { + "target": "com.amazonaws.quicksight#Anchor", + "traits": { + "smithy.api#documentation": "

The anchor for the TopicIRFilterOption.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition for a TopicIRFilterOption.

" + } + }, + "com.amazonaws.quicksight#TopicIRFilterType": { + "type": "enum", + "members": { + "CATEGORY_FILTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CATEGORY_FILTER" + } + }, + "NUMERIC_EQUALITY_FILTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NUMERIC_EQUALITY_FILTER" + } + }, + "NUMERIC_RANGE_FILTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NUMERIC_RANGE_FILTER" + } + }, + "DATE_RANGE_FILTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DATE_RANGE_FILTER" + } + }, + "RELATIVE_DATE_FILTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RELATIVE_DATE_FILTER" + } + }, + "TOP_BOTTOM_FILTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TOP_BOTTOM_FILTER" + } + }, + "EQUALS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EQUALS" + } + }, + "RANK_LIMIT_FILTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RANK_LIMIT_FILTER" + } + }, + "ACCEPT_ALL_FILTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACCEPT_ALL_FILTER" + } + } + } + }, + "com.amazonaws.quicksight#TopicIRGroupBy": { + "type": "structure", + "members": { + "FieldName": { + "target": "com.amazonaws.quicksight#Identifier", + "traits": { + "smithy.api#documentation": "

The field name for the TopicIRGroupBy.

" + } + }, + "TimeGranularity": { + "target": "com.amazonaws.quicksight#TopicTimeGranularity", + "traits": { + "smithy.api#documentation": "

The time granularity for the TopicIRGroupBy.

" + } + }, + "Sort": { + "target": "com.amazonaws.quicksight#TopicSortClause", + "traits": { + "smithy.api#documentation": "

The sort for the TopicIRGroupBy.

" + } + }, + "DisplayFormat": { + "target": "com.amazonaws.quicksight#DisplayFormat", + "traits": { + "smithy.api#documentation": "

The display format for the TopicIRGroupBy.

" + } + }, + "DisplayFormatOptions": { + "target": "com.amazonaws.quicksight#DisplayFormatOptions" + }, + "NamedEntity": { + "target": "com.amazonaws.quicksight#NamedEntityRef", + "traits": { + "smithy.api#documentation": "

The named entity for the TopicIRGroupBy.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition for a TopicIRGroupBy.

" + } + }, + "com.amazonaws.quicksight#TopicIRGroupByList": { + "type": "list", + "member": { + "target": "com.amazonaws.quicksight#TopicIRGroupBy" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2000 + } + } + }, + "com.amazonaws.quicksight#TopicIRMetric": { + "type": "structure", + "members": { + "MetricId": { + "target": "com.amazonaws.quicksight#Identifier", + "traits": { + "smithy.api#documentation": "

The metric ID for the TopicIRMetric.

" + } + }, + "Function": { + "target": "com.amazonaws.quicksight#AggFunction", + "traits": { + "smithy.api#documentation": "

The function for the TopicIRMetric.

" + } + }, + "Operands": { + "target": "com.amazonaws.quicksight#OperandList", + "traits": { + "smithy.api#documentation": "

The operands for the TopicIRMetric.

" + } + }, + "ComparisonMethod": { + "target": "com.amazonaws.quicksight#TopicIRComparisonMethod", + "traits": { + "smithy.api#documentation": "

The comparison method for the TopicIRMetric.

" + } + }, + "Expression": { + "target": "com.amazonaws.quicksight#Expression", + "traits": { + "smithy.api#documentation": "

The expression for the TopicIRMetric.

" + } + }, + "CalculatedFieldReferences": { + "target": "com.amazonaws.quicksight#CalculatedFieldReferenceList", + "traits": { + "smithy.api#documentation": "

The calculated field references for the TopicIRMetric.

" + } + }, + "DisplayFormat": { + "target": "com.amazonaws.quicksight#DisplayFormat", + "traits": { + "smithy.api#documentation": "

The display format for the TopicIRMetric.

" + } + }, + "DisplayFormatOptions": { + "target": "com.amazonaws.quicksight#DisplayFormatOptions" + }, + "NamedEntity": { + "target": "com.amazonaws.quicksight#NamedEntityRef", + "traits": { + "smithy.api#documentation": "

The named entity for the TopicIRMetric.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition for a TopicIRMetric.

" + } + }, + "com.amazonaws.quicksight#TopicIRMetricList": { + "type": "list", + "member": { + "target": "com.amazonaws.quicksight#TopicIRMetric" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2000 + } + } + }, "com.amazonaws.quicksight#TopicId": { "type": "string", "traits": { @@ -47954,6 +49594,65 @@ } } }, + "com.amazonaws.quicksight#TopicReviewedAnswer": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.quicksight#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the reviewed answer.

" + } + }, + "AnswerId": { + "target": "com.amazonaws.quicksight#AnswerId", + "traits": { + "smithy.api#documentation": "

The answer ID of the reviewed answer.

", + "smithy.api#required": {} + } + }, + "DatasetArn": { + "target": "com.amazonaws.quicksight#Arn", + "traits": { + "smithy.api#documentation": "

The Dataset ARN for the TopicReviewedAnswer.

", + "smithy.api#required": {} + } + }, + "Question": { + "target": "com.amazonaws.quicksight#LimitedString", + "traits": { + "smithy.api#documentation": "

The question for the TopicReviewedAnswer.

", + "smithy.api#required": {} + } + }, + "Mir": { + "target": "com.amazonaws.quicksight#TopicIR", + "traits": { + "smithy.api#documentation": "

The mir for the TopicReviewedAnswer.

" + } + }, + "PrimaryVisual": { + "target": "com.amazonaws.quicksight#TopicVisual", + "traits": { + "smithy.api#documentation": "

The primary visual for the TopicReviewedAnswer.

" + } + }, + "Template": { + "target": "com.amazonaws.quicksight#TopicTemplate", + "traits": { + "smithy.api#documentation": "

The template for the TopicReviewedAnswer.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The deinition for a TopicReviewedAnswer.

" + } + }, + "com.amazonaws.quicksight#TopicReviewedAnswers": { + "type": "list", + "member": { + "target": "com.amazonaws.quicksight#TopicReviewedAnswer" + } + }, "com.amazonaws.quicksight#TopicScheduleType": { "type": "enum", "members": { @@ -48004,6 +49703,43 @@ "smithy.api#sensitive": {} } }, + "com.amazonaws.quicksight#TopicSortClause": { + "type": "structure", + "members": { + "Operand": { + "target": "com.amazonaws.quicksight#Identifier", + "traits": { + "smithy.api#documentation": "

The operand for a TopicSortClause.

" + } + }, + "SortDirection": { + "target": "com.amazonaws.quicksight#TopicSortDirection", + "traits": { + "smithy.api#documentation": "

The sort direction for the TopicSortClause.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition for a TopicSortClause.

" + } + }, + "com.amazonaws.quicksight#TopicSortDirection": { + "type": "enum", + "members": { + "ASCENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASCENDING" + } + }, + "DESCENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DESCENDING" + } + } + } + }, "com.amazonaws.quicksight#TopicSummaries": { "type": "list", "member": { @@ -48042,6 +49778,26 @@ "smithy.api#documentation": "

A topic summary.

" } }, + "com.amazonaws.quicksight#TopicTemplate": { + "type": "structure", + "members": { + "TemplateType": { + "target": "com.amazonaws.quicksight#LimitedString", + "traits": { + "smithy.api#documentation": "

The template type for the TopicTemplate.

" + } + }, + "Slots": { + "target": "com.amazonaws.quicksight#Slots", + "traits": { + "smithy.api#documentation": "

The slots for the TopicTemplate.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition for a TopicTemplate.

" + } + }, "com.amazonaws.quicksight#TopicTimeGranularity": { "type": "enum", "members": { @@ -48112,6 +49868,44 @@ } } }, + "com.amazonaws.quicksight#TopicVisual": { + "type": "structure", + "members": { + "VisualId": { + "target": "com.amazonaws.quicksight#LimitedString", + "traits": { + "smithy.api#documentation": "

The visual ID for the TopicVisual.

" + } + }, + "Role": { + "target": "com.amazonaws.quicksight#VisualRole", + "traits": { + "smithy.api#documentation": "

The role for the TopicVisual.

" + } + }, + "Ir": { + "target": "com.amazonaws.quicksight#TopicIR", + "traits": { + "smithy.api#documentation": "

The ir for the TopicVisual.

" + } + }, + "SupportingVisuals": { + "target": "com.amazonaws.quicksight#TopicVisuals", + "traits": { + "smithy.api#documentation": "

The supporting visuals for the TopicVisual.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition for a TopicVisual.

" + } + }, + "com.amazonaws.quicksight#TopicVisuals": { + "type": "list", + "member": { + "target": "com.amazonaws.quicksight#TopicVisual" + } + }, "com.amazonaws.quicksight#TotalAggregationComputation": { "type": "structure", "members": { @@ -53875,6 +55669,20 @@ "smithy.api#documentation": "

The menu options for a visual.

" } }, + "com.amazonaws.quicksight#VisualOptions": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.quicksight#LimitedString", + "traits": { + "smithy.api#documentation": "

The type for a VisualOptions.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The definition for a VisualOptions.

" + } + }, "com.amazonaws.quicksight#VisualPalette": { "type": "structure", "members": { @@ -53895,6 +55703,41 @@ "smithy.api#documentation": "

The visual display options for the visual palette.

" } }, + "com.amazonaws.quicksight#VisualRole": { + "type": "enum", + "members": { + "PRIMARY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PRIMARY" + } + }, + "COMPLIMENTARY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLIMENTARY" + } + }, + "MULTI_INTENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MULTI_INTENT" + } + }, + "FALLBACK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FALLBACK" + } + }, + "FRAGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FRAGMENT" + } + } + } + }, "com.amazonaws.quicksight#VisualSubtitleLabelOptions": { "type": "structure", "members": { diff --git a/aws-models/rds.json b/aws-models/rds.json index 58ab8cf2a106..706afa674304 100644 --- a/aws-models/rds.json +++ b/aws-models/rds.json @@ -14615,7 +14615,20 @@ "outputToken": "Marker", "items": "DBEngineVersions", "pageSize": "MaxRecords" - } + }, + "smithy.test#smokeTests": [ + { + "id": "DescribeDBEngineVersionsSuccess", + "params": {}, + "vendorParams": { + "region": "us-west-2" + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "expect": { + "success": {} + } + } + ] } }, "com.amazonaws.rds#DescribeDBEngineVersionsMessage": { @@ -14840,6 +14853,21 @@ "smithy.api#suppress": [ "WaitableTraitInvalidErrorType" ], + "smithy.test#smokeTests": [ + { + "id": "DescribeDBInstancesFailure", + "params": { + "DBInstanceIdentifier": "fake-id" + }, + "vendorParams": { + "region": "us-west-2" + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "expect": { + "failure": {} + } + } + ], "smithy.waiters#waitable": { "DBInstanceAvailable": { "acceptors": [ diff --git a/aws-models/sdk-endpoints.json b/aws-models/sdk-endpoints.json index 6decd3e23e7d..1c2a7de7aecf 100644 --- a/aws-models/sdk-endpoints.json +++ b/aws-models/sdk-endpoints.json @@ -453,16 +453,25 @@ "ap-east-1" : { }, "ap-northeast-1" : { }, "ap-northeast-2" : { }, + "ap-northeast-3" : { }, "ap-south-1" : { }, + "ap-south-2" : { }, "ap-southeast-1" : { }, "ap-southeast-2" : { }, + "ap-southeast-3" : { }, + "ap-southeast-4" : { }, "ca-central-1" : { }, + "ca-west-1" : { }, "eu-central-1" : { }, + "eu-central-2" : { }, "eu-north-1" : { }, "eu-south-1" : { }, + "eu-south-2" : { }, "eu-west-1" : { }, "eu-west-2" : { }, "eu-west-3" : { }, + "il-central-1" : { }, + "me-central-1" : { }, "me-south-1" : { }, "sa-east-1" : { }, "us-east-1" : { }, diff --git a/aws-models/sns.json b/aws-models/sns.json index b523df57d064..8d7701b25101 100644 --- a/aws-models/sns.json +++ b/aws-models/sns.json @@ -3388,7 +3388,20 @@ "inputToken": "NextToken", "outputToken": "NextToken", "items": "Topics" - } + }, + "smithy.test#smokeTests": [ + { + "id": "ListTopicsSuccess", + "params": {}, + "vendorParams": { + "region": "us-west-2" + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "expect": { + "success": {} + } + } + ] } }, "com.amazonaws.sns#ListTopicsInput": { diff --git a/sdk/acmpca/src/client/list_certificate_authorities.rs b/sdk/acmpca/src/client/list_certificate_authorities.rs index 4d71316d75d1..d110e015e239 100644 --- a/sdk/acmpca/src/client/list_certificate_authorities.rs +++ b/sdk/acmpca/src/client/list_certificate_authorities.rs @@ -4,12 +4,12 @@ impl super::Client { /// This operation supports pagination; See [`into_paginator()`](crate::operation::list_certificate_authorities::builders::ListCertificateAuthoritiesFluentBuilder::into_paginator). /// /// - The fluent builder is configurable: - /// - [`next_token(impl Into)`](crate::operation::list_certificate_authorities::builders::ListCertificateAuthoritiesFluentBuilder::next_token) / [`set_next_token(Option)`](crate::operation::list_certificate_authorities::builders::ListCertificateAuthoritiesFluentBuilder::set_next_token):
required: **false**

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.


/// - [`max_results(i32)`](crate::operation::list_certificate_authorities::builders::ListCertificateAuthoritiesFluentBuilder::max_results) / [`set_max_results(Option)`](crate::operation::list_certificate_authorities::builders::ListCertificateAuthoritiesFluentBuilder::set_max_results):
required: **false**

Use this parameter when paginating results to specify the maximum number of items to return in the response on each page. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

Although the maximum value is 1000, the action only returns a maximum of 100 items.


+ /// - [`next_token(impl Into)`](crate::operation::list_certificate_authorities::builders::ListCertificateAuthoritiesFluentBuilder::next_token) / [`set_next_token(Option)`](crate::operation::list_certificate_authorities::builders::ListCertificateAuthoritiesFluentBuilder::set_next_token):
required: **false**

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.


/// - [`resource_owner(ResourceOwner)`](crate::operation::list_certificate_authorities::builders::ListCertificateAuthoritiesFluentBuilder::resource_owner) / [`set_resource_owner(Option)`](crate::operation::list_certificate_authorities::builders::ListCertificateAuthoritiesFluentBuilder::set_resource_owner):
required: **false**

Use this parameter to filter the returned set of certificate authorities based on their owner. The default is SELF.


/// - On success, responds with [`ListCertificateAuthoritiesOutput`](crate::operation::list_certificate_authorities::ListCertificateAuthoritiesOutput) with field(s): - /// - [`certificate_authorities(Option>)`](crate::operation::list_certificate_authorities::ListCertificateAuthoritiesOutput::certificate_authorities):

Summary information about each certificate authority you have created.

/// - [`next_token(Option)`](crate::operation::list_certificate_authorities::ListCertificateAuthoritiesOutput::next_token):

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

+ /// - [`certificate_authorities(Option>)`](crate::operation::list_certificate_authorities::ListCertificateAuthoritiesOutput::certificate_authorities):

Summary information about each certificate authority you have created.

/// - On failure, responds with [`SdkError`](crate::operation::list_certificate_authorities::ListCertificateAuthoritiesError) pub fn list_certificate_authorities(&self) -> crate::operation::list_certificate_authorities::builders::ListCertificateAuthoritiesFluentBuilder { crate::operation::list_certificate_authorities::builders::ListCertificateAuthoritiesFluentBuilder::new(self.handle.clone()) diff --git a/sdk/acmpca/src/client/list_permissions.rs b/sdk/acmpca/src/client/list_permissions.rs index 5a9ab1a36e5a..ec1a0441e631 100644 --- a/sdk/acmpca/src/client/list_permissions.rs +++ b/sdk/acmpca/src/client/list_permissions.rs @@ -4,12 +4,12 @@ impl super::Client { /// This operation supports pagination; See [`into_paginator()`](crate::operation::list_permissions::builders::ListPermissionsFluentBuilder::into_paginator). /// /// - The fluent builder is configurable: - /// - [`certificate_authority_arn(impl Into)`](crate::operation::list_permissions::builders::ListPermissionsFluentBuilder::certificate_authority_arn) / [`set_certificate_authority_arn(Option)`](crate::operation::list_permissions::builders::ListPermissionsFluentBuilder::set_certificate_authority_arn):
required: **true**

The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by calling the ListCertificateAuthorities action. This must be of the form: arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 You can get a private CA's ARN by running the ListCertificateAuthorities action.


- /// - [`next_token(impl Into)`](crate::operation::list_permissions::builders::ListPermissionsFluentBuilder::next_token) / [`set_next_token(Option)`](crate::operation::list_permissions::builders::ListPermissionsFluentBuilder::set_next_token):
required: **false**

When paginating results, use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextToken from the response you just received.


/// - [`max_results(i32)`](crate::operation::list_permissions::builders::ListPermissionsFluentBuilder::max_results) / [`set_max_results(Option)`](crate::operation::list_permissions::builders::ListPermissionsFluentBuilder::set_max_results):
required: **false**

When paginating results, use this parameter to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.


+ /// - [`next_token(impl Into)`](crate::operation::list_permissions::builders::ListPermissionsFluentBuilder::next_token) / [`set_next_token(Option)`](crate::operation::list_permissions::builders::ListPermissionsFluentBuilder::set_next_token):
required: **false**

When paginating results, use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextToken from the response you just received.


+ /// - [`certificate_authority_arn(impl Into)`](crate::operation::list_permissions::builders::ListPermissionsFluentBuilder::certificate_authority_arn) / [`set_certificate_authority_arn(Option)`](crate::operation::list_permissions::builders::ListPermissionsFluentBuilder::set_certificate_authority_arn):
required: **true**

The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by calling the ListCertificateAuthorities action. This must be of the form: arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 You can get a private CA's ARN by running the ListCertificateAuthorities action.


/// - On success, responds with [`ListPermissionsOutput`](crate::operation::list_permissions::ListPermissionsOutput) with field(s): - /// - [`permissions(Option>)`](crate::operation::list_permissions::ListPermissionsOutput::permissions):

Summary information about each permission assigned by the specified private CA, including the action enabled, the policy provided, and the time of creation.

/// - [`next_token(Option)`](crate::operation::list_permissions::ListPermissionsOutput::next_token):

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

+ /// - [`permissions(Option>)`](crate::operation::list_permissions::ListPermissionsOutput::permissions):

Summary information about each permission assigned by the specified private CA, including the action enabled, the policy provided, and the time of creation.

/// - On failure, responds with [`SdkError`](crate::operation::list_permissions::ListPermissionsError) pub fn list_permissions(&self) -> crate::operation::list_permissions::builders::ListPermissionsFluentBuilder { crate::operation::list_permissions::builders::ListPermissionsFluentBuilder::new(self.handle.clone()) diff --git a/sdk/acmpca/src/client/list_tags.rs b/sdk/acmpca/src/client/list_tags.rs index dc1501fabfb7..21bbbd1ffcc8 100644 --- a/sdk/acmpca/src/client/list_tags.rs +++ b/sdk/acmpca/src/client/list_tags.rs @@ -4,12 +4,12 @@ impl super::Client { /// This operation supports pagination; See [`into_paginator()`](crate::operation::list_tags::builders::ListTagsFluentBuilder::into_paginator). /// /// - The fluent builder is configurable: - /// - [`certificate_authority_arn(impl Into)`](crate::operation::list_tags::builders::ListTagsFluentBuilder::certificate_authority_arn) / [`set_certificate_authority_arn(Option)`](crate::operation::list_tags::builders::ListTagsFluentBuilder::set_certificate_authority_arn):
required: **true**

The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority action. This must be of the form:

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012


- /// - [`next_token(impl Into)`](crate::operation::list_tags::builders::ListTagsFluentBuilder::next_token) / [`set_next_token(Option)`](crate::operation::list_tags::builders::ListTagsFluentBuilder::set_next_token):
required: **false**

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of NextToken from the response you just received.


/// - [`max_results(i32)`](crate::operation::list_tags::builders::ListTagsFluentBuilder::max_results) / [`set_max_results(Option)`](crate::operation::list_tags::builders::ListTagsFluentBuilder::set_max_results):
required: **false**

Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.


+ /// - [`next_token(impl Into)`](crate::operation::list_tags::builders::ListTagsFluentBuilder::next_token) / [`set_next_token(Option)`](crate::operation::list_tags::builders::ListTagsFluentBuilder::set_next_token):
required: **false**

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of NextToken from the response you just received.


+ /// - [`certificate_authority_arn(impl Into)`](crate::operation::list_tags::builders::ListTagsFluentBuilder::certificate_authority_arn) / [`set_certificate_authority_arn(Option)`](crate::operation::list_tags::builders::ListTagsFluentBuilder::set_certificate_authority_arn):
required: **true**

The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority action. This must be of the form:

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012


/// - On success, responds with [`ListTagsOutput`](crate::operation::list_tags::ListTagsOutput) with field(s): - /// - [`tags(Option>)`](crate::operation::list_tags::ListTagsOutput::tags):

The tags associated with your private CA.

/// - [`next_token(Option)`](crate::operation::list_tags::ListTagsOutput::next_token):

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

+ /// - [`tags(Option>)`](crate::operation::list_tags::ListTagsOutput::tags):

The tags associated with your private CA.

/// - On failure, responds with [`SdkError`](crate::operation::list_tags::ListTagsError) pub fn list_tags(&self) -> crate::operation::list_tags::builders::ListTagsFluentBuilder { crate::operation::list_tags::builders::ListTagsFluentBuilder::new(self.handle.clone()) diff --git a/sdk/acmpca/src/operation/import_certificate_authority_certificate/builders.rs b/sdk/acmpca/src/operation/import_certificate_authority_certificate/builders.rs index 8a4f447b3afa..60630843f494 100644 --- a/sdk/acmpca/src/operation/import_certificate_authority_certificate/builders.rs +++ b/sdk/acmpca/src/operation/import_certificate_authority_certificate/builders.rs @@ -63,44 +63,45 @@ impl crate::operation::import_certificate_authority_certificate::builders::Impor ///

Amazon Web Services Private CA allows the following extensions to be marked critical in the imported CA certificate or chain.

///
    ///
  • -///

    Authority key identifier

  • -///
  • ///

    Basic constraints (must be marked critical)

  • ///
  • -///

    Certificate policies

  • +///

    Subject alternative names

    ///
  • -///

    Extended key usage

  • +///

    Key usage

    ///
  • -///

    Inhibit anyPolicy

  • +///

    Extended key usage

    ///
  • -///

    Issuer alternative name

  • +///

    Authority key identifier

    ///
  • -///

    Key usage

  • +///

    Subject key identifier

    ///
  • -///

    Name constraints

  • +///

    Issuer alternative name

    ///
  • -///

    Policy mappings

  • +///

    Subject directory attributes

    ///
  • -///

    Subject alternative name

  • +///

    Subject information access

    ///
  • -///

    Subject directory attributes

  • +///

    Certificate policies

    ///
  • -///

    Subject key identifier

  • +///

    Policy mappings

    ///
  • -///

    Subject information access

  • +///

    Inhibit anyPolicy

    ///
///

Amazon Web Services Private CA rejects the following extensions when they are marked critical in an imported CA certificate or chain.

///
    ///
  • -///

    Authority information access

  • +///

    Name constraints

    +///
  • +///

    Policy constraints

  • ///
  • ///

    CRL distribution points

  • ///
  • +///

    Authority information access

  • +///
  • ///

    Freshest CRL

  • ///
  • -///

    Policy constraints

  • +///

    Any other extension

    ///
-///

Amazon Web Services Private Certificate Authority will also reject any other extension marked as critical not contained on the preceding list of allowed extensions.

#[derive(::std::clone::Clone, ::std::fmt::Debug)] pub struct ImportCertificateAuthorityCertificateFluentBuilder { handle: ::std::sync::Arc, diff --git a/sdk/acmpca/src/operation/list_certificate_authorities/_list_certificate_authorities_input.rs b/sdk/acmpca/src/operation/list_certificate_authorities/_list_certificate_authorities_input.rs index fcbc315716cf..fd735d01b849 100644 --- a/sdk/acmpca/src/operation/list_certificate_authorities/_list_certificate_authorities_input.rs +++ b/sdk/acmpca/src/operation/list_certificate_authorities/_list_certificate_authorities_input.rs @@ -3,24 +3,24 @@ #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct ListCertificateAuthoritiesInput { - ///

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.

- pub next_token: ::std::option::Option<::std::string::String>, ///

Use this parameter when paginating results to specify the maximum number of items to return in the response on each page. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

///

Although the maximum value is 1000, the action only returns a maximum of 100 items.

pub max_results: ::std::option::Option, + ///

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.

+ pub next_token: ::std::option::Option<::std::string::String>, ///

Use this parameter to filter the returned set of certificate authorities based on their owner. The default is SELF.

pub resource_owner: ::std::option::Option, } impl ListCertificateAuthoritiesInput { - ///

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.

- pub fn next_token(&self) -> ::std::option::Option<&str> { - self.next_token.as_deref() - } ///

Use this parameter when paginating results to specify the maximum number of items to return in the response on each page. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

///

Although the maximum value is 1000, the action only returns a maximum of 100 items.

pub fn max_results(&self) -> ::std::option::Option { self.max_results } + ///

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.

+ pub fn next_token(&self) -> ::std::option::Option<&str> { + self.next_token.as_deref() + } ///

Use this parameter to filter the returned set of certificate authorities based on their owner. The default is SELF.

pub fn resource_owner(&self) -> ::std::option::Option<&crate::types::ResourceOwner> { self.resource_owner.as_ref() @@ -37,25 +37,11 @@ impl ListCertificateAuthoritiesInput { #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] #[non_exhaustive] pub struct ListCertificateAuthoritiesInputBuilder { - pub(crate) next_token: ::std::option::Option<::std::string::String>, pub(crate) max_results: ::std::option::Option, + pub(crate) next_token: ::std::option::Option<::std::string::String>, pub(crate) resource_owner: ::std::option::Option, } impl ListCertificateAuthoritiesInputBuilder { - ///

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.

- pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.next_token = ::std::option::Option::Some(input.into()); - self - } - ///

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.

- pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.next_token = input; - self - } - ///

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.

- pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { - &self.next_token - } ///

Use this parameter when paginating results to specify the maximum number of items to return in the response on each page. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

///

Although the maximum value is 1000, the action only returns a maximum of 100 items.

pub fn max_results(mut self, input: i32) -> Self { @@ -73,6 +59,20 @@ impl ListCertificateAuthoritiesInputBuilder { pub fn get_max_results(&self) -> &::std::option::Option { &self.max_results } + ///

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.

+ pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.next_token = ::std::option::Option::Some(input.into()); + self + } + ///

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.

+ pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.next_token = input; + self + } + ///

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.

+ pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { + &self.next_token + } ///

Use this parameter to filter the returned set of certificate authorities based on their owner. The default is SELF.

pub fn resource_owner(mut self, input: crate::types::ResourceOwner) -> Self { self.resource_owner = ::std::option::Option::Some(input); @@ -95,8 +95,8 @@ impl ListCertificateAuthoritiesInputBuilder { ::aws_smithy_types::error::operation::BuildError, > { ::std::result::Result::Ok(crate::operation::list_certificate_authorities::ListCertificateAuthoritiesInput { - next_token: self.next_token, max_results: self.max_results, + next_token: self.next_token, resource_owner: self.resource_owner, }) } diff --git a/sdk/acmpca/src/operation/list_certificate_authorities/_list_certificate_authorities_output.rs b/sdk/acmpca/src/operation/list_certificate_authorities/_list_certificate_authorities_output.rs index 78838263e926..65da06ed897e 100644 --- a/sdk/acmpca/src/operation/list_certificate_authorities/_list_certificate_authorities_output.rs +++ b/sdk/acmpca/src/operation/list_certificate_authorities/_list_certificate_authorities_output.rs @@ -3,23 +3,23 @@ #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct ListCertificateAuthoritiesOutput { - ///

Summary information about each certificate authority you have created.

- pub certificate_authorities: ::std::option::Option<::std::vec::Vec>, ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

pub next_token: ::std::option::Option<::std::string::String>, + ///

Summary information about each certificate authority you have created.

+ pub certificate_authorities: ::std::option::Option<::std::vec::Vec>, _request_id: Option, } impl ListCertificateAuthoritiesOutput { + ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

+ pub fn next_token(&self) -> ::std::option::Option<&str> { + self.next_token.as_deref() + } ///

Summary information about each certificate authority you have created.

/// /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.certificate_authorities.is_none()`. pub fn certificate_authorities(&self) -> &[crate::types::CertificateAuthority] { self.certificate_authorities.as_deref().unwrap_or_default() } - ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

- pub fn next_token(&self) -> ::std::option::Option<&str> { - self.next_token.as_deref() - } } impl ::aws_types::request_id::RequestId for ListCertificateAuthoritiesOutput { fn request_id(&self) -> Option<&str> { @@ -37,11 +37,25 @@ impl ListCertificateAuthoritiesOutput { #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] #[non_exhaustive] pub struct ListCertificateAuthoritiesOutputBuilder { - pub(crate) certificate_authorities: ::std::option::Option<::std::vec::Vec>, pub(crate) next_token: ::std::option::Option<::std::string::String>, + pub(crate) certificate_authorities: ::std::option::Option<::std::vec::Vec>, _request_id: Option, } impl ListCertificateAuthoritiesOutputBuilder { + ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

+ pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.next_token = ::std::option::Option::Some(input.into()); + self + } + ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

+ pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.next_token = input; + self + } + ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

+ pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { + &self.next_token + } /// Appends an item to `certificate_authorities`. /// /// To override the contents of this collection use [`set_certificate_authorities`](Self::set_certificate_authorities). @@ -62,20 +76,6 @@ impl ListCertificateAuthoritiesOutputBuilder { pub fn get_certificate_authorities(&self) -> &::std::option::Option<::std::vec::Vec> { &self.certificate_authorities } - ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

- pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.next_token = ::std::option::Option::Some(input.into()); - self - } - ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

- pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.next_token = input; - self - } - ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

- pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { - &self.next_token - } pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { self._request_id = Some(request_id.into()); self @@ -88,8 +88,8 @@ impl ListCertificateAuthoritiesOutputBuilder { /// Consumes the builder and constructs a [`ListCertificateAuthoritiesOutput`](crate::operation::list_certificate_authorities::ListCertificateAuthoritiesOutput). pub fn build(self) -> crate::operation::list_certificate_authorities::ListCertificateAuthoritiesOutput { crate::operation::list_certificate_authorities::ListCertificateAuthoritiesOutput { - certificate_authorities: self.certificate_authorities, next_token: self.next_token, + certificate_authorities: self.certificate_authorities, _request_id: self._request_id, } } diff --git a/sdk/acmpca/src/operation/list_certificate_authorities/builders.rs b/sdk/acmpca/src/operation/list_certificate_authorities/builders.rs index 7a5363f9dcd3..b982d6702c37 100644 --- a/sdk/acmpca/src/operation/list_certificate_authorities/builders.rs +++ b/sdk/acmpca/src/operation/list_certificate_authorities/builders.rs @@ -114,20 +114,6 @@ impl ListCertificateAuthoritiesFluentBuilder { pub fn into_paginator(self) -> crate::operation::list_certificate_authorities::paginator::ListCertificateAuthoritiesPaginator { crate::operation::list_certificate_authorities::paginator::ListCertificateAuthoritiesPaginator::new(self.handle, self.inner) } - ///

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.

- pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.next_token(input.into()); - self - } - ///

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.

- pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_next_token(input); - self - } - ///

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.

- pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_next_token() - } ///

Use this parameter when paginating results to specify the maximum number of items to return in the response on each page. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

///

Although the maximum value is 1000, the action only returns a maximum of 100 items.

pub fn max_results(mut self, input: i32) -> Self { @@ -145,6 +131,20 @@ impl ListCertificateAuthoritiesFluentBuilder { pub fn get_max_results(&self) -> &::std::option::Option { self.inner.get_max_results() } + ///

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.

+ pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.next_token(input.into()); + self + } + ///

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.

+ pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_next_token(input); + self + } + ///

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.

+ pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_next_token() + } ///

Use this parameter to filter the returned set of certificate authorities based on their owner. The default is SELF.

pub fn resource_owner(mut self, input: crate::types::ResourceOwner) -> Self { self.inner = self.inner.resource_owner(input); diff --git a/sdk/acmpca/src/operation/list_permissions/_list_permissions_input.rs b/sdk/acmpca/src/operation/list_permissions/_list_permissions_input.rs index 9b93da113e8d..7ed7f9417234 100644 --- a/sdk/acmpca/src/operation/list_permissions/_list_permissions_input.rs +++ b/sdk/acmpca/src/operation/list_permissions/_list_permissions_input.rs @@ -3,25 +3,25 @@ #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct ListPermissionsInput { - ///

The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by calling the ListCertificateAuthorities action. This must be of the form: arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 You can get a private CA's ARN by running the ListCertificateAuthorities action.

- pub certificate_authority_arn: ::std::option::Option<::std::string::String>, - ///

When paginating results, use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextToken from the response you just received.

- pub next_token: ::std::option::Option<::std::string::String>, ///

When paginating results, use this parameter to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

pub max_results: ::std::option::Option, + ///

When paginating results, use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextToken from the response you just received.

+ pub next_token: ::std::option::Option<::std::string::String>, + ///

The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by calling the ListCertificateAuthorities action. This must be of the form: arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 You can get a private CA's ARN by running the ListCertificateAuthorities action.

+ pub certificate_authority_arn: ::std::option::Option<::std::string::String>, } impl ListPermissionsInput { - ///

The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by calling the ListCertificateAuthorities action. This must be of the form: arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 You can get a private CA's ARN by running the ListCertificateAuthorities action.

- pub fn certificate_authority_arn(&self) -> ::std::option::Option<&str> { - self.certificate_authority_arn.as_deref() + ///

When paginating results, use this parameter to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

+ pub fn max_results(&self) -> ::std::option::Option { + self.max_results } ///

When paginating results, use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextToken from the response you just received.

pub fn next_token(&self) -> ::std::option::Option<&str> { self.next_token.as_deref() } - ///

When paginating results, use this parameter to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

- pub fn max_results(&self) -> ::std::option::Option { - self.max_results + ///

The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by calling the ListCertificateAuthorities action. This must be of the form: arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 You can get a private CA's ARN by running the ListCertificateAuthorities action.

+ pub fn certificate_authority_arn(&self) -> ::std::option::Option<&str> { + self.certificate_authority_arn.as_deref() } } impl ListPermissionsInput { @@ -35,25 +35,24 @@ impl ListPermissionsInput { #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] #[non_exhaustive] pub struct ListPermissionsInputBuilder { - pub(crate) certificate_authority_arn: ::std::option::Option<::std::string::String>, - pub(crate) next_token: ::std::option::Option<::std::string::String>, pub(crate) max_results: ::std::option::Option, + pub(crate) next_token: ::std::option::Option<::std::string::String>, + pub(crate) certificate_authority_arn: ::std::option::Option<::std::string::String>, } impl ListPermissionsInputBuilder { - ///

The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by calling the ListCertificateAuthorities action. This must be of the form: arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 You can get a private CA's ARN by running the ListCertificateAuthorities action.

- /// This field is required. - pub fn certificate_authority_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.certificate_authority_arn = ::std::option::Option::Some(input.into()); + ///

When paginating results, use this parameter to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

+ pub fn max_results(mut self, input: i32) -> Self { + self.max_results = ::std::option::Option::Some(input); self } - ///

The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by calling the ListCertificateAuthorities action. This must be of the form: arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 You can get a private CA's ARN by running the ListCertificateAuthorities action.

- pub fn set_certificate_authority_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.certificate_authority_arn = input; + ///

When paginating results, use this parameter to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

+ pub fn set_max_results(mut self, input: ::std::option::Option) -> Self { + self.max_results = input; self } - ///

The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by calling the ListCertificateAuthorities action. This must be of the form: arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 You can get a private CA's ARN by running the ListCertificateAuthorities action.

- pub fn get_certificate_authority_arn(&self) -> &::std::option::Option<::std::string::String> { - &self.certificate_authority_arn + ///

When paginating results, use this parameter to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

+ pub fn get_max_results(&self) -> &::std::option::Option { + &self.max_results } ///

When paginating results, use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextToken from the response you just received.

pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { @@ -69,28 +68,29 @@ impl ListPermissionsInputBuilder { pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { &self.next_token } - ///

When paginating results, use this parameter to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

- pub fn max_results(mut self, input: i32) -> Self { - self.max_results = ::std::option::Option::Some(input); + ///

The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by calling the ListCertificateAuthorities action. This must be of the form: arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 You can get a private CA's ARN by running the ListCertificateAuthorities action.

+ /// This field is required. + pub fn certificate_authority_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.certificate_authority_arn = ::std::option::Option::Some(input.into()); self } - ///

When paginating results, use this parameter to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

- pub fn set_max_results(mut self, input: ::std::option::Option) -> Self { - self.max_results = input; + ///

The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by calling the ListCertificateAuthorities action. This must be of the form: arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 You can get a private CA's ARN by running the ListCertificateAuthorities action.

+ pub fn set_certificate_authority_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.certificate_authority_arn = input; self } - ///

When paginating results, use this parameter to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

- pub fn get_max_results(&self) -> &::std::option::Option { - &self.max_results + ///

The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by calling the ListCertificateAuthorities action. This must be of the form: arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 You can get a private CA's ARN by running the ListCertificateAuthorities action.

+ pub fn get_certificate_authority_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.certificate_authority_arn } /// Consumes the builder and constructs a [`ListPermissionsInput`](crate::operation::list_permissions::ListPermissionsInput). pub fn build( self, ) -> ::std::result::Result { ::std::result::Result::Ok(crate::operation::list_permissions::ListPermissionsInput { - certificate_authority_arn: self.certificate_authority_arn, - next_token: self.next_token, max_results: self.max_results, + next_token: self.next_token, + certificate_authority_arn: self.certificate_authority_arn, }) } } diff --git a/sdk/acmpca/src/operation/list_permissions/_list_permissions_output.rs b/sdk/acmpca/src/operation/list_permissions/_list_permissions_output.rs index 6417085a0759..c02f12ed8d2c 100644 --- a/sdk/acmpca/src/operation/list_permissions/_list_permissions_output.rs +++ b/sdk/acmpca/src/operation/list_permissions/_list_permissions_output.rs @@ -3,23 +3,23 @@ #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct ListPermissionsOutput { - ///

Summary information about each permission assigned by the specified private CA, including the action enabled, the policy provided, and the time of creation.

- pub permissions: ::std::option::Option<::std::vec::Vec>, ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

pub next_token: ::std::option::Option<::std::string::String>, + ///

Summary information about each permission assigned by the specified private CA, including the action enabled, the policy provided, and the time of creation.

+ pub permissions: ::std::option::Option<::std::vec::Vec>, _request_id: Option, } impl ListPermissionsOutput { + ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

+ pub fn next_token(&self) -> ::std::option::Option<&str> { + self.next_token.as_deref() + } ///

Summary information about each permission assigned by the specified private CA, including the action enabled, the policy provided, and the time of creation.

/// /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.permissions.is_none()`. pub fn permissions(&self) -> &[crate::types::Permission] { self.permissions.as_deref().unwrap_or_default() } - ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

- pub fn next_token(&self) -> ::std::option::Option<&str> { - self.next_token.as_deref() - } } impl ::aws_types::request_id::RequestId for ListPermissionsOutput { fn request_id(&self) -> Option<&str> { @@ -37,11 +37,25 @@ impl ListPermissionsOutput { #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] #[non_exhaustive] pub struct ListPermissionsOutputBuilder { - pub(crate) permissions: ::std::option::Option<::std::vec::Vec>, pub(crate) next_token: ::std::option::Option<::std::string::String>, + pub(crate) permissions: ::std::option::Option<::std::vec::Vec>, _request_id: Option, } impl ListPermissionsOutputBuilder { + ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

+ pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.next_token = ::std::option::Option::Some(input.into()); + self + } + ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

+ pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.next_token = input; + self + } + ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

+ pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { + &self.next_token + } /// Appends an item to `permissions`. /// /// To override the contents of this collection use [`set_permissions`](Self::set_permissions). @@ -62,20 +76,6 @@ impl ListPermissionsOutputBuilder { pub fn get_permissions(&self) -> &::std::option::Option<::std::vec::Vec> { &self.permissions } - ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

- pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.next_token = ::std::option::Option::Some(input.into()); - self - } - ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

- pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.next_token = input; - self - } - ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

- pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { - &self.next_token - } pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { self._request_id = Some(request_id.into()); self @@ -88,8 +88,8 @@ impl ListPermissionsOutputBuilder { /// Consumes the builder and constructs a [`ListPermissionsOutput`](crate::operation::list_permissions::ListPermissionsOutput). pub fn build(self) -> crate::operation::list_permissions::ListPermissionsOutput { crate::operation::list_permissions::ListPermissionsOutput { - permissions: self.permissions, next_token: self.next_token, + permissions: self.permissions, _request_id: self._request_id, } } diff --git a/sdk/acmpca/src/operation/list_permissions/builders.rs b/sdk/acmpca/src/operation/list_permissions/builders.rs index 56dd609b66f6..ec96635cac03 100644 --- a/sdk/acmpca/src/operation/list_permissions/builders.rs +++ b/sdk/acmpca/src/operation/list_permissions/builders.rs @@ -125,19 +125,19 @@ impl ListPermissionsFluentBuilder { pub fn into_paginator(self) -> crate::operation::list_permissions::paginator::ListPermissionsPaginator { crate::operation::list_permissions::paginator::ListPermissionsPaginator::new(self.handle, self.inner) } - ///

The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by calling the ListCertificateAuthorities action. This must be of the form: arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 You can get a private CA's ARN by running the ListCertificateAuthorities action.

- pub fn certificate_authority_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.certificate_authority_arn(input.into()); + ///

When paginating results, use this parameter to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

+ pub fn max_results(mut self, input: i32) -> Self { + self.inner = self.inner.max_results(input); self } - ///

The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by calling the ListCertificateAuthorities action. This must be of the form: arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 You can get a private CA's ARN by running the ListCertificateAuthorities action.

- pub fn set_certificate_authority_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_certificate_authority_arn(input); + ///

When paginating results, use this parameter to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

+ pub fn set_max_results(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_max_results(input); self } - ///

The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by calling the ListCertificateAuthorities action. This must be of the form: arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 You can get a private CA's ARN by running the ListCertificateAuthorities action.

- pub fn get_certificate_authority_arn(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_certificate_authority_arn() + ///

When paginating results, use this parameter to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

+ pub fn get_max_results(&self) -> &::std::option::Option { + self.inner.get_max_results() } ///

When paginating results, use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextToken from the response you just received.

pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { @@ -153,18 +153,18 @@ impl ListPermissionsFluentBuilder { pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_next_token() } - ///

When paginating results, use this parameter to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

- pub fn max_results(mut self, input: i32) -> Self { - self.inner = self.inner.max_results(input); + ///

The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by calling the ListCertificateAuthorities action. This must be of the form: arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 You can get a private CA's ARN by running the ListCertificateAuthorities action.

+ pub fn certificate_authority_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.certificate_authority_arn(input.into()); self } - ///

When paginating results, use this parameter to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

- pub fn set_max_results(mut self, input: ::std::option::Option) -> Self { - self.inner = self.inner.set_max_results(input); + ///

The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by calling the ListCertificateAuthorities action. This must be of the form: arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 You can get a private CA's ARN by running the ListCertificateAuthorities action.

+ pub fn set_certificate_authority_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_certificate_authority_arn(input); self } - ///

When paginating results, use this parameter to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

- pub fn get_max_results(&self) -> &::std::option::Option { - self.inner.get_max_results() + ///

The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by calling the ListCertificateAuthorities action. This must be of the form: arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 You can get a private CA's ARN by running the ListCertificateAuthorities action.

+ pub fn get_certificate_authority_arn(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_certificate_authority_arn() } } diff --git a/sdk/acmpca/src/operation/list_tags/_list_tags_input.rs b/sdk/acmpca/src/operation/list_tags/_list_tags_input.rs index 16e2512649ba..475646377fdf 100644 --- a/sdk/acmpca/src/operation/list_tags/_list_tags_input.rs +++ b/sdk/acmpca/src/operation/list_tags/_list_tags_input.rs @@ -3,27 +3,27 @@ #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct ListTagsInput { + ///

Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

+ pub max_results: ::std::option::Option, + ///

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of NextToken from the response you just received.

+ pub next_token: ::std::option::Option<::std::string::String>, ///

The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority action. This must be of the form:

///

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012

pub certificate_authority_arn: ::std::option::Option<::std::string::String>, - ///

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of NextToken from the response you just received.

- pub next_token: ::std::option::Option<::std::string::String>, - ///

Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

- pub max_results: ::std::option::Option, } impl ListTagsInput { - ///

The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority action. This must be of the form:

- ///

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012

- pub fn certificate_authority_arn(&self) -> ::std::option::Option<&str> { - self.certificate_authority_arn.as_deref() + ///

Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

+ pub fn max_results(&self) -> ::std::option::Option { + self.max_results } ///

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of NextToken from the response you just received.

pub fn next_token(&self) -> ::std::option::Option<&str> { self.next_token.as_deref() } - ///

Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

- pub fn max_results(&self) -> ::std::option::Option { - self.max_results + ///

The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority action. This must be of the form:

+ ///

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012

+ pub fn certificate_authority_arn(&self) -> ::std::option::Option<&str> { + self.certificate_authority_arn.as_deref() } } impl ListTagsInput { @@ -37,28 +37,24 @@ impl ListTagsInput { #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] #[non_exhaustive] pub struct ListTagsInputBuilder { - pub(crate) certificate_authority_arn: ::std::option::Option<::std::string::String>, - pub(crate) next_token: ::std::option::Option<::std::string::String>, pub(crate) max_results: ::std::option::Option, + pub(crate) next_token: ::std::option::Option<::std::string::String>, + pub(crate) certificate_authority_arn: ::std::option::Option<::std::string::String>, } impl ListTagsInputBuilder { - ///

The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority action. This must be of the form:

- ///

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012

- /// This field is required. - pub fn certificate_authority_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.certificate_authority_arn = ::std::option::Option::Some(input.into()); + ///

Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

+ pub fn max_results(mut self, input: i32) -> Self { + self.max_results = ::std::option::Option::Some(input); self } - ///

The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority action. This must be of the form:

- ///

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012

- pub fn set_certificate_authority_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.certificate_authority_arn = input; + ///

Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

+ pub fn set_max_results(mut self, input: ::std::option::Option) -> Self { + self.max_results = input; self } - ///

The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority action. This must be of the form:

- ///

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012

- pub fn get_certificate_authority_arn(&self) -> &::std::option::Option<::std::string::String> { - &self.certificate_authority_arn + ///

Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

+ pub fn get_max_results(&self) -> &::std::option::Option { + &self.max_results } ///

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of NextToken from the response you just received.

pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { @@ -74,26 +70,30 @@ impl ListTagsInputBuilder { pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { &self.next_token } - ///

Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

- pub fn max_results(mut self, input: i32) -> Self { - self.max_results = ::std::option::Option::Some(input); + ///

The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority action. This must be of the form:

+ ///

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012

+ /// This field is required. + pub fn certificate_authority_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.certificate_authority_arn = ::std::option::Option::Some(input.into()); self } - ///

Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

- pub fn set_max_results(mut self, input: ::std::option::Option) -> Self { - self.max_results = input; + ///

The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority action. This must be of the form:

+ ///

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012

+ pub fn set_certificate_authority_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.certificate_authority_arn = input; self } - ///

Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

- pub fn get_max_results(&self) -> &::std::option::Option { - &self.max_results + ///

The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority action. This must be of the form:

+ ///

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012

+ pub fn get_certificate_authority_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.certificate_authority_arn } /// Consumes the builder and constructs a [`ListTagsInput`](crate::operation::list_tags::ListTagsInput). pub fn build(self) -> ::std::result::Result { ::std::result::Result::Ok(crate::operation::list_tags::ListTagsInput { - certificate_authority_arn: self.certificate_authority_arn, - next_token: self.next_token, max_results: self.max_results, + next_token: self.next_token, + certificate_authority_arn: self.certificate_authority_arn, }) } } diff --git a/sdk/acmpca/src/operation/list_tags/_list_tags_output.rs b/sdk/acmpca/src/operation/list_tags/_list_tags_output.rs index a8b6851e58a6..e86ad96bd7c9 100644 --- a/sdk/acmpca/src/operation/list_tags/_list_tags_output.rs +++ b/sdk/acmpca/src/operation/list_tags/_list_tags_output.rs @@ -3,23 +3,23 @@ #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct ListTagsOutput { - ///

The tags associated with your private CA.

- pub tags: ::std::option::Option<::std::vec::Vec>, ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

pub next_token: ::std::option::Option<::std::string::String>, + ///

The tags associated with your private CA.

+ pub tags: ::std::option::Option<::std::vec::Vec>, _request_id: Option, } impl ListTagsOutput { + ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

+ pub fn next_token(&self) -> ::std::option::Option<&str> { + self.next_token.as_deref() + } ///

The tags associated with your private CA.

/// /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`. pub fn tags(&self) -> &[crate::types::Tag] { self.tags.as_deref().unwrap_or_default() } - ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

- pub fn next_token(&self) -> ::std::option::Option<&str> { - self.next_token.as_deref() - } } impl ::aws_types::request_id::RequestId for ListTagsOutput { fn request_id(&self) -> Option<&str> { @@ -37,11 +37,25 @@ impl ListTagsOutput { #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] #[non_exhaustive] pub struct ListTagsOutputBuilder { - pub(crate) tags: ::std::option::Option<::std::vec::Vec>, pub(crate) next_token: ::std::option::Option<::std::string::String>, + pub(crate) tags: ::std::option::Option<::std::vec::Vec>, _request_id: Option, } impl ListTagsOutputBuilder { + ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

+ pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.next_token = ::std::option::Option::Some(input.into()); + self + } + ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

+ pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.next_token = input; + self + } + ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

+ pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { + &self.next_token + } /// Appends an item to `tags`. /// /// To override the contents of this collection use [`set_tags`](Self::set_tags). @@ -62,20 +76,6 @@ impl ListTagsOutputBuilder { pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec> { &self.tags } - ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

- pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.next_token = ::std::option::Option::Some(input.into()); - self - } - ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

- pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.next_token = input; - self - } - ///

When the list is truncated, this value is present and should be used for the NextToken parameter in a subsequent pagination request.

- pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { - &self.next_token - } pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { self._request_id = Some(request_id.into()); self @@ -88,8 +88,8 @@ impl ListTagsOutputBuilder { /// Consumes the builder and constructs a [`ListTagsOutput`](crate::operation::list_tags::ListTagsOutput). pub fn build(self) -> crate::operation::list_tags::ListTagsOutput { crate::operation::list_tags::ListTagsOutput { - tags: self.tags, next_token: self.next_token, + tags: self.tags, _request_id: self._request_id, } } diff --git a/sdk/acmpca/src/operation/list_tags/builders.rs b/sdk/acmpca/src/operation/list_tags/builders.rs index c3f969bd737c..761bd42ee7e9 100644 --- a/sdk/acmpca/src/operation/list_tags/builders.rs +++ b/sdk/acmpca/src/operation/list_tags/builders.rs @@ -105,22 +105,19 @@ impl ListTagsFluentBuilder { pub fn into_paginator(self) -> crate::operation::list_tags::paginator::ListTagsPaginator { crate::operation::list_tags::paginator::ListTagsPaginator::new(self.handle, self.inner) } - ///

The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority action. This must be of the form:

- ///

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012

- pub fn certificate_authority_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.certificate_authority_arn(input.into()); + ///

Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

+ pub fn max_results(mut self, input: i32) -> Self { + self.inner = self.inner.max_results(input); self } - ///

The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority action. This must be of the form:

- ///

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012

- pub fn set_certificate_authority_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_certificate_authority_arn(input); + ///

Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

+ pub fn set_max_results(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_max_results(input); self } - ///

The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority action. This must be of the form:

- ///

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012

- pub fn get_certificate_authority_arn(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_certificate_authority_arn() + ///

Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

+ pub fn get_max_results(&self) -> &::std::option::Option { + self.inner.get_max_results() } ///

Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of NextToken from the response you just received.

pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { @@ -136,18 +133,21 @@ impl ListTagsFluentBuilder { pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_next_token() } - ///

Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

- pub fn max_results(mut self, input: i32) -> Self { - self.inner = self.inner.max_results(input); + ///

The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority action. This must be of the form:

+ ///

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012

+ pub fn certificate_authority_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.certificate_authority_arn(input.into()); self } - ///

Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

- pub fn set_max_results(mut self, input: ::std::option::Option) -> Self { - self.inner = self.inner.set_max_results(input); + ///

The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority action. This must be of the form:

+ ///

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012

+ pub fn set_certificate_authority_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_certificate_authority_arn(input); self } - ///

Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

- pub fn get_max_results(&self) -> &::std::option::Option { - self.inner.get_max_results() + ///

The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority action. This must be of the form:

+ ///

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012

+ pub fn get_certificate_authority_arn(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_certificate_authority_arn() } } diff --git a/sdk/acmpca/src/protocol_serde/shape_list_certificate_authorities.rs b/sdk/acmpca/src/protocol_serde/shape_list_certificate_authorities.rs index 3ce7018a6838..b2bb98b7c0cd 100644 --- a/sdk/acmpca/src/protocol_serde/shape_list_certificate_authorities.rs +++ b/sdk/acmpca/src/protocol_serde/shape_list_certificate_authorities.rs @@ -82,10 +82,6 @@ pub(crate) fn de_list_certificate_authorities( match tokens.next().transpose()? { Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "CertificateAuthorities" => { - builder = builder - .set_certificate_authorities(crate::protocol_serde::shape_certificate_authorities::de_certificate_authorities(tokens)?); - } "NextToken" => { builder = builder.set_next_token( ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? @@ -93,6 +89,10 @@ pub(crate) fn de_list_certificate_authorities( .transpose()?, ); } + "CertificateAuthorities" => { + builder = builder + .set_certificate_authorities(crate::protocol_serde::shape_certificate_authorities::de_certificate_authorities(tokens)?); + } _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, }, other => { diff --git a/sdk/acmpca/src/protocol_serde/shape_list_certificate_authorities_input.rs b/sdk/acmpca/src/protocol_serde/shape_list_certificate_authorities_input.rs index a85c53a3aa27..3901498c1bb5 100644 --- a/sdk/acmpca/src/protocol_serde/shape_list_certificate_authorities_input.rs +++ b/sdk/acmpca/src/protocol_serde/shape_list_certificate_authorities_input.rs @@ -3,15 +3,15 @@ pub fn ser_list_certificate_authorities_input_input( object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, input: &crate::operation::list_certificate_authorities::ListCertificateAuthoritiesInput, ) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - if let Some(var_1) = &input.next_token { - object.key("NextToken").string(var_1.as_str()); - } - if let Some(var_2) = &input.max_results { + if let Some(var_1) = &input.max_results { object.key("MaxResults").number( #[allow(clippy::useless_conversion)] - ::aws_smithy_types::Number::NegInt((*var_2).into()), + ::aws_smithy_types::Number::NegInt((*var_1).into()), ); } + if let Some(var_2) = &input.next_token { + object.key("NextToken").string(var_2.as_str()); + } if let Some(var_3) = &input.resource_owner { object.key("ResourceOwner").string(var_3.as_str()); } diff --git a/sdk/acmpca/src/protocol_serde/shape_list_permissions.rs b/sdk/acmpca/src/protocol_serde/shape_list_permissions.rs index 7477324901a6..77ab3e1c1811 100644 --- a/sdk/acmpca/src/protocol_serde/shape_list_permissions.rs +++ b/sdk/acmpca/src/protocol_serde/shape_list_permissions.rs @@ -133,9 +133,6 @@ pub(crate) fn de_list_permissions( match tokens.next().transpose()? { Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "Permissions" => { - builder = builder.set_permissions(crate::protocol_serde::shape_permission_list::de_permission_list(tokens)?); - } "NextToken" => { builder = builder.set_next_token( ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? @@ -143,6 +140,9 @@ pub(crate) fn de_list_permissions( .transpose()?, ); } + "Permissions" => { + builder = builder.set_permissions(crate::protocol_serde::shape_permission_list::de_permission_list(tokens)?); + } _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, }, other => { diff --git a/sdk/acmpca/src/protocol_serde/shape_list_permissions_input.rs b/sdk/acmpca/src/protocol_serde/shape_list_permissions_input.rs index d9d918bf2074..c05b0804d7a4 100644 --- a/sdk/acmpca/src/protocol_serde/shape_list_permissions_input.rs +++ b/sdk/acmpca/src/protocol_serde/shape_list_permissions_input.rs @@ -3,17 +3,17 @@ pub fn ser_list_permissions_input_input( object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, input: &crate::operation::list_permissions::ListPermissionsInput, ) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - if let Some(var_1) = &input.certificate_authority_arn { - object.key("CertificateAuthorityArn").string(var_1.as_str()); + if let Some(var_1) = &input.max_results { + object.key("MaxResults").number( + #[allow(clippy::useless_conversion)] + ::aws_smithy_types::Number::NegInt((*var_1).into()), + ); } if let Some(var_2) = &input.next_token { object.key("NextToken").string(var_2.as_str()); } - if let Some(var_3) = &input.max_results { - object.key("MaxResults").number( - #[allow(clippy::useless_conversion)] - ::aws_smithy_types::Number::NegInt((*var_3).into()), - ); + if let Some(var_3) = &input.certificate_authority_arn { + object.key("CertificateAuthorityArn").string(var_3.as_str()); } Ok(()) } diff --git a/sdk/acmpca/src/protocol_serde/shape_list_tags.rs b/sdk/acmpca/src/protocol_serde/shape_list_tags.rs index 19756bc7ed8a..2cd794bb0fba 100644 --- a/sdk/acmpca/src/protocol_serde/shape_list_tags.rs +++ b/sdk/acmpca/src/protocol_serde/shape_list_tags.rs @@ -103,9 +103,6 @@ pub(crate) fn de_list_tags( match tokens.next().transpose()? { Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "Tags" => { - builder = builder.set_tags(crate::protocol_serde::shape_tag_list::de_tag_list(tokens)?); - } "NextToken" => { builder = builder.set_next_token( ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? @@ -113,6 +110,9 @@ pub(crate) fn de_list_tags( .transpose()?, ); } + "Tags" => { + builder = builder.set_tags(crate::protocol_serde::shape_tag_list::de_tag_list(tokens)?); + } _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, }, other => { diff --git a/sdk/acmpca/src/protocol_serde/shape_list_tags_input.rs b/sdk/acmpca/src/protocol_serde/shape_list_tags_input.rs index 714582c73128..d8bb0fbde027 100644 --- a/sdk/acmpca/src/protocol_serde/shape_list_tags_input.rs +++ b/sdk/acmpca/src/protocol_serde/shape_list_tags_input.rs @@ -3,17 +3,17 @@ pub fn ser_list_tags_input_input( object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, input: &crate::operation::list_tags::ListTagsInput, ) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - if let Some(var_1) = &input.certificate_authority_arn { - object.key("CertificateAuthorityArn").string(var_1.as_str()); + if let Some(var_1) = &input.max_results { + object.key("MaxResults").number( + #[allow(clippy::useless_conversion)] + ::aws_smithy_types::Number::NegInt((*var_1).into()), + ); } if let Some(var_2) = &input.next_token { object.key("NextToken").string(var_2.as_str()); } - if let Some(var_3) = &input.max_results { - object.key("MaxResults").number( - #[allow(clippy::useless_conversion)] - ::aws_smithy_types::Number::NegInt((*var_3).into()), - ); + if let Some(var_3) = &input.certificate_authority_arn { + object.key("CertificateAuthorityArn").string(var_3.as_str()); } Ok(()) } diff --git a/sdk/arczonalshift/README.md b/sdk/arczonalshift/README.md index 3ad04d6dbb93..c1b8fab2a80f 100644 --- a/sdk/arczonalshift/README.md +++ b/sdk/arczonalshift/README.md @@ -1,14 +1,18 @@ # aws-sdk-arczonalshift -Welcome to the Zonal Shift API Reference Guide for Amazon Route 53 Application Recovery Controller (Route 53 ARC). +Welcome to the API Reference Guide for zonal shift and zonal autoshift in Amazon Route 53 Application Recovery Controller (Route 53 ARC). You can start a zonal shift to move traffic for a load balancer resource away from an Availability Zone to help your application recover quickly from an impairment in an Availability Zone. For example, you can recover your application from a developer's bad code deployment or from an Amazon Web Services infrastructure failure in a single Availability Zone. -You can also configure zonal autoshift for a load balancer resource. Zonal autoshift is a capability in Route 53 ARC where Amazon Web Services shifts away application resource traffic from an Availability Zone, on your behalf, to help reduce your time to recovery during events. Amazon Web Services shifts away traffic for resources that are enabled for zonal autoshift whenever Amazon Web Services determines that there's an issue in the Availability Zone that could potentially affect customers. +You can also configure zonal autoshift for supported load balancer resources. Zonal autoshift is a capability in Route 53 ARC where you authorize Amazon Web Services to shift away application resource traffic from an Availability Zone during events, on your behalf, to help reduce your time to recovery. Amazon Web Services starts an autoshift when internal telemetry indicates that there is an Availability Zone impairment that could potentially impact customers. -To ensure that zonal autoshift is safe for your application, you must also configure practice runs when you enable zonal autoshift for a resource. Practice runs start weekly zonal shifts for a resource, to shift traffic for the resource out of an Availability Zone. Practice runs make sure, on a regular basis, that you have enough capacity in all the Availability Zones in an Amazon Web Services Region for your application to continue to operate normally when traffic for a resource is shifted away from one Availability Zone. +To help make sure that zonal autoshift is safe for your application, you must also configure practice runs when you enable zonal autoshift for a resource. Practice runs start weekly zonal shifts for a resource, to shift traffic for the resource away from an Availability Zone. Practice runs help you to make sure, on a regular basis, that you have enough capacity in all the Availability Zones in an Amazon Web Services Region for your application to continue to operate normally when traffic for a resource is shifted away from one Availability Zone. -You must prescale resource capacity in all Availability Zones in the Region where your application is deployed, before you configure practice runs or enable zonal autoshift for a resource. You should not rely on scaling on demand when an autoshift or practice run starts. +Before you configure practice runs or enable zonal autoshift, we strongly recommend that you prescale your application resource capacity in all Availability Zones in the Region where your application resources are deployed. You should not rely on scaling on demand when an autoshift or practice run starts. Zonal autoshift, including practice runs, works independently, and does not wait for auto scaling actions to complete. Relying on auto scaling, instead of pre-scaling, can result in loss of availability. + +If you use auto scaling to handle regular cycles of traffic, we strongly recommend that you configure the minimum capacity of your auto scaling to continue operating normally with the loss of an Availability Zone. + +Be aware that Route 53 ARC does not inspect the health of individual resources. Amazon Web Services only starts an autoshift when Amazon Web Services telemetry detects that there is an Availability Zone impairment that could potentially impact customers. In some cases, resources might be shifted away that are not experiencing impact. For more information about using zonal shift and zonal autoshift, see the [Amazon Route 53 Application Recovery Controller Developer Guide](https://docs.aws.amazon.com/r53recovery/latest/dg/what-is-route53-recovery.html). diff --git a/sdk/arczonalshift/src/client.rs b/sdk/arczonalshift/src/client.rs index 1274c88890ec..fe09ea34ecec 100644 --- a/sdk/arczonalshift/src/client.rs +++ b/sdk/arczonalshift/src/client.rs @@ -128,6 +128,8 @@ pub mod customize; mod delete_practice_run_configuration; +mod get_autoshift_observer_notification_status; + mod get_managed_resource; mod list_autoshifts; @@ -138,6 +140,8 @@ mod list_zonal_shifts; mod start_zonal_shift; +mod update_autoshift_observer_notification_status; + mod update_practice_run_configuration; mod update_zonal_autoshift_configuration; diff --git a/sdk/arczonalshift/src/client/cancel_zonal_shift.rs b/sdk/arczonalshift/src/client/cancel_zonal_shift.rs index f380b037b49b..cf2ff42fa0df 100644 --- a/sdk/arczonalshift/src/client/cancel_zonal_shift.rs +++ b/sdk/arczonalshift/src/client/cancel_zonal_shift.rs @@ -6,9 +6,9 @@ impl super::Client { /// - [`zonal_shift_id(impl Into)`](crate::operation::cancel_zonal_shift::builders::CancelZonalShiftFluentBuilder::zonal_shift_id) / [`set_zonal_shift_id(Option)`](crate::operation::cancel_zonal_shift::builders::CancelZonalShiftFluentBuilder::set_zonal_shift_id):
required: **true**

The internally-generated identifier of a zonal shift.


/// - On success, responds with [`CancelZonalShiftOutput`](crate::operation::cancel_zonal_shift::CancelZonalShiftOutput) with field(s): /// - [`zonal_shift_id(String)`](crate::operation::cancel_zonal_shift::CancelZonalShiftOutput::zonal_shift_id):

The identifier of a zonal shift.

- /// - [`resource_identifier(String)`](crate::operation::cancel_zonal_shift::CancelZonalShiftOutput::resource_identifier):

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

- /// - [`away_from(String)`](crate::operation::cancel_zonal_shift::CancelZonalShiftOutput::away_from):

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

- /// - [`expiry_time(DateTime)`](crate::operation::cancel_zonal_shift::CancelZonalShiftOutput::expiry_time):

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

+ /// - [`resource_identifier(String)`](crate::operation::cancel_zonal_shift::CancelZonalShiftOutput::resource_identifier):

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

+ /// - [`away_from(String)`](crate::operation::cancel_zonal_shift::CancelZonalShiftOutput::away_from):

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ /// - [`expiry_time(DateTime)`](crate::operation::cancel_zonal_shift::CancelZonalShiftOutput::expiry_time):

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

/// - [`start_time(DateTime)`](crate::operation::cancel_zonal_shift::CancelZonalShiftOutput::start_time):

The time (UTC) when the zonal shift starts.

/// - [`status(ZonalShiftStatus)`](crate::operation::cancel_zonal_shift::CancelZonalShiftOutput::status):

A status for a zonal shift.

The Status for a zonal shift can have one of the following values:

  • ACTIVE: The zonal shift has been started and active.

  • EXPIRED: The zonal shift has expired (the expiry time was exceeded).

  • CANCELED: The zonal shift was canceled.

/// - [`comment(String)`](crate::operation::cancel_zonal_shift::CancelZonalShiftOutput::comment):

A comment that you enter about the zonal shift. Only the latest comment is retained; no comment history is maintained. A new comment overwrites any existing comment string.

diff --git a/sdk/arczonalshift/src/client/create_practice_run_configuration.rs b/sdk/arczonalshift/src/client/create_practice_run_configuration.rs index 9ea2ad27c14c..052e46e3a84c 100644 --- a/sdk/arczonalshift/src/client/create_practice_run_configuration.rs +++ b/sdk/arczonalshift/src/client/create_practice_run_configuration.rs @@ -3,7 +3,7 @@ impl super::Client { /// Constructs a fluent builder for the [`CreatePracticeRunConfiguration`](crate::operation::create_practice_run_configuration::builders::CreatePracticeRunConfigurationFluentBuilder) operation. /// /// - The fluent builder is configurable: - /// - [`resource_identifier(impl Into)`](crate::operation::create_practice_run_configuration::builders::CreatePracticeRunConfigurationFluentBuilder::resource_identifier) / [`set_resource_identifier(Option)`](crate::operation::create_practice_run_configuration::builders::CreatePracticeRunConfigurationFluentBuilder::set_resource_identifier):
required: **true**

The identifier of the resource to shift away traffic for when a practice run starts a zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.


+ /// - [`resource_identifier(impl Into)`](crate::operation::create_practice_run_configuration::builders::CreatePracticeRunConfigurationFluentBuilder::resource_identifier) / [`set_resource_identifier(Option)`](crate::operation::create_practice_run_configuration::builders::CreatePracticeRunConfigurationFluentBuilder::set_resource_identifier):
required: **true**

The identifier of the resource that Amazon Web Services shifts traffic for with a practice run zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.


/// - [`blocked_windows(impl Into)`](crate::operation::create_practice_run_configuration::builders::CreatePracticeRunConfigurationFluentBuilder::blocked_windows) / [`set_blocked_windows(Option>)`](crate::operation::create_practice_run_configuration::builders::CreatePracticeRunConfigurationFluentBuilder::set_blocked_windows):
required: **false**

Optionally, you can block Route 53 ARC from starting practice runs for specific windows of days and times.

The format for blocked windows is: DAY:HH:SS-DAY:HH:SS. Keep in mind, when you specify dates, that dates and times for practice runs are in UTC. Also, be aware of potential time adjustments that might be required for daylight saving time differences. Separate multiple blocked windows with spaces.

For example, say you run business report summaries three days a week. For this scenario, you might set the following recurring days and times as blocked windows, for example: MON-20:30-21:30 WED-20:30-21:30 FRI-20:30-21:30.


/// - [`blocked_dates(impl Into)`](crate::operation::create_practice_run_configuration::builders::CreatePracticeRunConfigurationFluentBuilder::blocked_dates) / [`set_blocked_dates(Option>)`](crate::operation::create_practice_run_configuration::builders::CreatePracticeRunConfigurationFluentBuilder::set_blocked_dates):
required: **false**

Optionally, you can block Route 53 ARC from starting practice runs for a resource on specific calendar dates.

The format for blocked dates is: YYYY-MM-DD. Keep in mind, when you specify dates, that dates and times for practice runs are in UTC. Separate multiple blocked dates with spaces.

For example, if you have an application update scheduled to launch on May 1, 2024, and you don't want practice runs to shift traffic away at that time, you could set a blocked date for 2024-05-01.


/// - [`blocking_alarms(ControlCondition)`](crate::operation::create_practice_run_configuration::builders::CreatePracticeRunConfigurationFluentBuilder::blocking_alarms) / [`set_blocking_alarms(Option>)`](crate::operation::create_practice_run_configuration::builders::CreatePracticeRunConfigurationFluentBuilder::set_blocking_alarms):
required: **false**

An Amazon CloudWatch alarm that you can specify for zonal autoshift practice runs. This alarm blocks Route 53 ARC from starting practice run zonal shifts, and ends a practice run that's in progress, when the alarm is in an ALARM state.


@@ -11,7 +11,7 @@ impl super::Client { /// - On success, responds with [`CreatePracticeRunConfigurationOutput`](crate::operation::create_practice_run_configuration::CreatePracticeRunConfigurationOutput) with field(s): /// - [`arn(String)`](crate::operation::create_practice_run_configuration::CreatePracticeRunConfigurationOutput::arn):

The Amazon Resource Name (ARN) of the resource that you configured the practice run for.

/// - [`name(String)`](crate::operation::create_practice_run_configuration::CreatePracticeRunConfigurationOutput::name):

The name of the resource that you configured the practice run for.

- /// - [`zonal_autoshift_status(ZonalAutoshiftStatus)`](crate::operation::create_practice_run_configuration::CreatePracticeRunConfigurationOutput::zonal_autoshift_status):

The status for zonal autoshift for a resource. When you specify the autoshift status as ENABLED, Amazon Web Services shifts traffic away from shifts away application resource traffic from an Availability Zone, on your behalf, when Amazon Web Services determines that there's an issue in the Availability Zone that could potentially affect customers.

When you enable zonal autoshift, you must also configure practice runs for the resource.

+ /// - [`zonal_autoshift_status(ZonalAutoshiftStatus)`](crate::operation::create_practice_run_configuration::CreatePracticeRunConfigurationOutput::zonal_autoshift_status):

The status for zonal autoshift for a resource. When you specify ENABLED for the autoshift status, Amazon Web Services shifts traffic away from shifts away application resource traffic from an Availability Zone, on your behalf, when internal telemetry indicates that there is an Availability Zone impairment that could potentially impact customers.

When you enable zonal autoshift, you must also configure practice runs for the resource.

/// - [`practice_run_configuration(Option)`](crate::operation::create_practice_run_configuration::CreatePracticeRunConfigurationOutput::practice_run_configuration):

A practice run configuration for a resource. Configurations include the outcome alarm that you specify for practice runs, and, optionally, a blocking alarm and blocking dates and windows.

/// - On failure, responds with [`SdkError`](crate::operation::create_practice_run_configuration::CreatePracticeRunConfigurationError) pub fn create_practice_run_configuration( diff --git a/sdk/arczonalshift/src/client/get_autoshift_observer_notification_status.rs b/sdk/arczonalshift/src/client/get_autoshift_observer_notification_status.rs new file mode 100644 index 000000000000..04c767ffe5e3 --- /dev/null +++ b/sdk/arczonalshift/src/client/get_autoshift_observer_notification_status.rs @@ -0,0 +1,16 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +impl super::Client { + /// Constructs a fluent builder for the [`GetAutoshiftObserverNotificationStatus`](crate::operation::get_autoshift_observer_notification_status::builders::GetAutoshiftObserverNotificationStatusFluentBuilder) operation. + /// + /// - The fluent builder takes no input, just [`send`](crate::operation::get_autoshift_observer_notification_status::builders::GetAutoshiftObserverNotificationStatusFluentBuilder::send) it. + /// - On success, responds with [`GetAutoshiftObserverNotificationStatusOutput`](crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusOutput) with field(s): + /// - [`status(AutoshiftObserverNotificationStatus)`](crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusOutput::status):

The status of autoshift observer notification. If the status is ENABLED, Route 53 ARC includes all autoshift events when you use the Amazon EventBridge pattern Autoshift In Progress. When the status is DISABLED, Route 53 ARC includes only autoshift events for autoshifts when one or more of your resources is included in the autoshift.

+ /// - On failure, responds with [`SdkError`](crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError) + pub fn get_autoshift_observer_notification_status( + &self, + ) -> crate::operation::get_autoshift_observer_notification_status::builders::GetAutoshiftObserverNotificationStatusFluentBuilder { + crate::operation::get_autoshift_observer_notification_status::builders::GetAutoshiftObserverNotificationStatusFluentBuilder::new( + self.handle.clone(), + ) + } +} diff --git a/sdk/arczonalshift/src/client/get_managed_resource.rs b/sdk/arczonalshift/src/client/get_managed_resource.rs index df89a87ca68d..11c92058d49d 100644 --- a/sdk/arczonalshift/src/client/get_managed_resource.rs +++ b/sdk/arczonalshift/src/client/get_managed_resource.rs @@ -3,7 +3,7 @@ impl super::Client { /// Constructs a fluent builder for the [`GetManagedResource`](crate::operation::get_managed_resource::builders::GetManagedResourceFluentBuilder) operation. /// /// - The fluent builder is configurable: - /// - [`resource_identifier(impl Into)`](crate::operation::get_managed_resource::builders::GetManagedResourceFluentBuilder::resource_identifier) / [`set_resource_identifier(Option)`](crate::operation::get_managed_resource::builders::GetManagedResourceFluentBuilder::set_resource_identifier):
required: **true**

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.


+ /// - [`resource_identifier(impl Into)`](crate::operation::get_managed_resource::builders::GetManagedResourceFluentBuilder::resource_identifier) / [`set_resource_identifier(Option)`](crate::operation::get_managed_resource::builders::GetManagedResourceFluentBuilder::set_resource_identifier):
required: **true**

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.


/// - On success, responds with [`GetManagedResourceOutput`](crate::operation::get_managed_resource::GetManagedResourceOutput) with field(s): /// - [`arn(Option)`](crate::operation::get_managed_resource::GetManagedResourceOutput::arn):

The Amazon Resource Name (ARN) for the resource.

/// - [`name(Option)`](crate::operation::get_managed_resource::GetManagedResourceOutput::name):

The name of the resource.

diff --git a/sdk/arczonalshift/src/client/start_zonal_shift.rs b/sdk/arczonalshift/src/client/start_zonal_shift.rs index 41708bbeba30..3a64c4b8be9f 100644 --- a/sdk/arczonalshift/src/client/start_zonal_shift.rs +++ b/sdk/arczonalshift/src/client/start_zonal_shift.rs @@ -3,15 +3,15 @@ impl super::Client { /// Constructs a fluent builder for the [`StartZonalShift`](crate::operation::start_zonal_shift::builders::StartZonalShiftFluentBuilder) operation. /// /// - The fluent builder is configurable: - /// - [`resource_identifier(impl Into)`](crate::operation::start_zonal_shift::builders::StartZonalShiftFluentBuilder::resource_identifier) / [`set_resource_identifier(Option)`](crate::operation::start_zonal_shift::builders::StartZonalShiftFluentBuilder::set_resource_identifier):
required: **true**

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.


- /// - [`away_from(impl Into)`](crate::operation::start_zonal_shift::builders::StartZonalShiftFluentBuilder::away_from) / [`set_away_from(Option)`](crate::operation::start_zonal_shift::builders::StartZonalShiftFluentBuilder::set_away_from):
required: **true**

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.


+ /// - [`resource_identifier(impl Into)`](crate::operation::start_zonal_shift::builders::StartZonalShiftFluentBuilder::resource_identifier) / [`set_resource_identifier(Option)`](crate::operation::start_zonal_shift::builders::StartZonalShiftFluentBuilder::set_resource_identifier):
required: **true**

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.


+ /// - [`away_from(impl Into)`](crate::operation::start_zonal_shift::builders::StartZonalShiftFluentBuilder::away_from) / [`set_away_from(Option)`](crate::operation::start_zonal_shift::builders::StartZonalShiftFluentBuilder::set_away_from):
required: **true**

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.


/// - [`expires_in(impl Into)`](crate::operation::start_zonal_shift::builders::StartZonalShiftFluentBuilder::expires_in) / [`set_expires_in(Option)`](crate::operation::start_zonal_shift::builders::StartZonalShiftFluentBuilder::set_expires_in):
required: **true**

The length of time that you want a zonal shift to be active, which Route 53 ARC converts to an expiry time (expiration time). Zonal shifts are temporary. You can set a zonal shift to be active initially for up to three days (72 hours).

If you want to still keep traffic away from an Availability Zone, you can update the zonal shift and set a new expiration. You can also cancel a zonal shift, before it expires, for example, if you're ready to restore traffic to the Availability Zone.

To set a length of time for a zonal shift to be active, specify a whole number, and then one of the following, with no space:

  • A lowercase letter m: To specify that the value is in minutes.

  • A lowercase letter h: To specify that the value is in hours.

For example: 20h means the zonal shift expires in 20 hours. 120m means the zonal shift expires in 120 minutes (2 hours).


/// - [`comment(impl Into)`](crate::operation::start_zonal_shift::builders::StartZonalShiftFluentBuilder::comment) / [`set_comment(Option)`](crate::operation::start_zonal_shift::builders::StartZonalShiftFluentBuilder::set_comment):
required: **true**

A comment that you enter about the zonal shift. Only the latest comment is retained; no comment history is maintained. A new comment overwrites any existing comment string.


/// - On success, responds with [`StartZonalShiftOutput`](crate::operation::start_zonal_shift::StartZonalShiftOutput) with field(s): /// - [`zonal_shift_id(String)`](crate::operation::start_zonal_shift::StartZonalShiftOutput::zonal_shift_id):

The identifier of a zonal shift.

- /// - [`resource_identifier(String)`](crate::operation::start_zonal_shift::StartZonalShiftOutput::resource_identifier):

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

- /// - [`away_from(String)`](crate::operation::start_zonal_shift::StartZonalShiftOutput::away_from):

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

- /// - [`expiry_time(DateTime)`](crate::operation::start_zonal_shift::StartZonalShiftOutput::expiry_time):

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

+ /// - [`resource_identifier(String)`](crate::operation::start_zonal_shift::StartZonalShiftOutput::resource_identifier):

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

+ /// - [`away_from(String)`](crate::operation::start_zonal_shift::StartZonalShiftOutput::away_from):

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ /// - [`expiry_time(DateTime)`](crate::operation::start_zonal_shift::StartZonalShiftOutput::expiry_time):

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

/// - [`start_time(DateTime)`](crate::operation::start_zonal_shift::StartZonalShiftOutput::start_time):

The time (UTC) when the zonal shift starts.

/// - [`status(ZonalShiftStatus)`](crate::operation::start_zonal_shift::StartZonalShiftOutput::status):

A status for a zonal shift.

The Status for a zonal shift can have one of the following values:

  • ACTIVE: The zonal shift has been started and active.

  • EXPIRED: The zonal shift has expired (the expiry time was exceeded).

  • CANCELED: The zonal shift was canceled.

/// - [`comment(String)`](crate::operation::start_zonal_shift::StartZonalShiftOutput::comment):

A comment that you enter about the zonal shift. Only the latest comment is retained; no comment history is maintained. A new comment overwrites any existing comment string.

diff --git a/sdk/arczonalshift/src/client/update_autoshift_observer_notification_status.rs b/sdk/arczonalshift/src/client/update_autoshift_observer_notification_status.rs new file mode 100644 index 000000000000..883c4fcac353 --- /dev/null +++ b/sdk/arczonalshift/src/client/update_autoshift_observer_notification_status.rs @@ -0,0 +1,17 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +impl super::Client { + /// Constructs a fluent builder for the [`UpdateAutoshiftObserverNotificationStatus`](crate::operation::update_autoshift_observer_notification_status::builders::UpdateAutoshiftObserverNotificationStatusFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`status(AutoshiftObserverNotificationStatus)`](crate::operation::update_autoshift_observer_notification_status::builders::UpdateAutoshiftObserverNotificationStatusFluentBuilder::status) / [`set_status(Option)`](crate::operation::update_autoshift_observer_notification_status::builders::UpdateAutoshiftObserverNotificationStatusFluentBuilder::set_status):
required: **true**

The status to set for autoshift observer notification. If the status is ENABLED, Route 53 ARC includes all autoshift events when you use the Amazon EventBridge pattern Autoshift In Progress. When the status is DISABLED, Route 53 ARC includes only autoshift events for autoshifts when one or more of your resources is included in the autoshift.


+ /// - On success, responds with [`UpdateAutoshiftObserverNotificationStatusOutput`](crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusOutput) with field(s): + /// - [`status(AutoshiftObserverNotificationStatus)`](crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusOutput::status):

The status for autoshift observer notification.

+ /// - On failure, responds with [`SdkError`](crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError) + pub fn update_autoshift_observer_notification_status( + &self, + ) -> crate::operation::update_autoshift_observer_notification_status::builders::UpdateAutoshiftObserverNotificationStatusFluentBuilder { + crate::operation::update_autoshift_observer_notification_status::builders::UpdateAutoshiftObserverNotificationStatusFluentBuilder::new( + self.handle.clone(), + ) + } +} diff --git a/sdk/arczonalshift/src/client/update_zonal_autoshift_configuration.rs b/sdk/arczonalshift/src/client/update_zonal_autoshift_configuration.rs index 0de023c2c4dd..0e59ae474540 100644 --- a/sdk/arczonalshift/src/client/update_zonal_autoshift_configuration.rs +++ b/sdk/arczonalshift/src/client/update_zonal_autoshift_configuration.rs @@ -4,10 +4,10 @@ impl super::Client { /// /// - The fluent builder is configurable: /// - [`resource_identifier(impl Into)`](crate::operation::update_zonal_autoshift_configuration::builders::UpdateZonalAutoshiftConfigurationFluentBuilder::resource_identifier) / [`set_resource_identifier(Option)`](crate::operation::update_zonal_autoshift_configuration::builders::UpdateZonalAutoshiftConfigurationFluentBuilder::set_resource_identifier):
required: **true**

The identifier for the resource that you want to update the zonal autoshift configuration for. The identifier is the Amazon Resource Name (ARN) for the resource.


- /// - [`zonal_autoshift_status(ZonalAutoshiftStatus)`](crate::operation::update_zonal_autoshift_configuration::builders::UpdateZonalAutoshiftConfigurationFluentBuilder::zonal_autoshift_status) / [`set_zonal_autoshift_status(Option)`](crate::operation::update_zonal_autoshift_configuration::builders::UpdateZonalAutoshiftConfigurationFluentBuilder::set_zonal_autoshift_status):
required: **true**

The zonal autoshift status for the resource that you want to update the zonal autoshift configuration for.


+ /// - [`zonal_autoshift_status(ZonalAutoshiftStatus)`](crate::operation::update_zonal_autoshift_configuration::builders::UpdateZonalAutoshiftConfigurationFluentBuilder::zonal_autoshift_status) / [`set_zonal_autoshift_status(Option)`](crate::operation::update_zonal_autoshift_configuration::builders::UpdateZonalAutoshiftConfigurationFluentBuilder::set_zonal_autoshift_status):
required: **true**

The zonal autoshift status for the resource that you want to update the zonal autoshift configuration for. Choose ENABLED to authorize Amazon Web Services to shift away resource traffic for an application from an Availability Zone during events, on your behalf, to help reduce time to recovery.


/// - On success, responds with [`UpdateZonalAutoshiftConfigurationOutput`](crate::operation::update_zonal_autoshift_configuration::UpdateZonalAutoshiftConfigurationOutput) with field(s): /// - [`resource_identifier(String)`](crate::operation::update_zonal_autoshift_configuration::UpdateZonalAutoshiftConfigurationOutput::resource_identifier):

The identifier for the resource that you updated the zonal autoshift configuration for. The identifier is the Amazon Resource Name (ARN) for the resource.

- /// - [`zonal_autoshift_status(ZonalAutoshiftStatus)`](crate::operation::update_zonal_autoshift_configuration::UpdateZonalAutoshiftConfigurationOutput::zonal_autoshift_status):

The zonal autoshift status for the resource that you updated the zonal autoshift configuration for.

+ /// - [`zonal_autoshift_status(ZonalAutoshiftStatus)`](crate::operation::update_zonal_autoshift_configuration::UpdateZonalAutoshiftConfigurationOutput::zonal_autoshift_status):

The updated zonal autoshift status for the resource.

/// - On failure, responds with [`SdkError`](crate::operation::update_zonal_autoshift_configuration::UpdateZonalAutoshiftConfigurationError) pub fn update_zonal_autoshift_configuration( &self, diff --git a/sdk/arczonalshift/src/client/update_zonal_shift.rs b/sdk/arczonalshift/src/client/update_zonal_shift.rs index 8a79aa45a076..84a0b17bc5aa 100644 --- a/sdk/arczonalshift/src/client/update_zonal_shift.rs +++ b/sdk/arczonalshift/src/client/update_zonal_shift.rs @@ -8,9 +8,9 @@ impl super::Client { /// - [`expires_in(impl Into)`](crate::operation::update_zonal_shift::builders::UpdateZonalShiftFluentBuilder::expires_in) / [`set_expires_in(Option)`](crate::operation::update_zonal_shift::builders::UpdateZonalShiftFluentBuilder::set_expires_in):
required: **false**

The length of time that you want a zonal shift to be active, which Route 53 ARC converts to an expiry time (expiration time). Zonal shifts are temporary. You can set a zonal shift to be active initially for up to three days (72 hours).

If you want to still keep traffic away from an Availability Zone, you can update the zonal shift and set a new expiration. You can also cancel a zonal shift, before it expires, for example, if you're ready to restore traffic to the Availability Zone.

To set a length of time for a zonal shift to be active, specify a whole number, and then one of the following, with no space:

  • A lowercase letter m: To specify that the value is in minutes.

  • A lowercase letter h: To specify that the value is in hours.

For example: 20h means the zonal shift expires in 20 hours. 120m means the zonal shift expires in 120 minutes (2 hours).


/// - On success, responds with [`UpdateZonalShiftOutput`](crate::operation::update_zonal_shift::UpdateZonalShiftOutput) with field(s): /// - [`zonal_shift_id(String)`](crate::operation::update_zonal_shift::UpdateZonalShiftOutput::zonal_shift_id):

The identifier of a zonal shift.

- /// - [`resource_identifier(String)`](crate::operation::update_zonal_shift::UpdateZonalShiftOutput::resource_identifier):

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

- /// - [`away_from(String)`](crate::operation::update_zonal_shift::UpdateZonalShiftOutput::away_from):

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

- /// - [`expiry_time(DateTime)`](crate::operation::update_zonal_shift::UpdateZonalShiftOutput::expiry_time):

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

+ /// - [`resource_identifier(String)`](crate::operation::update_zonal_shift::UpdateZonalShiftOutput::resource_identifier):

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

+ /// - [`away_from(String)`](crate::operation::update_zonal_shift::UpdateZonalShiftOutput::away_from):

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ /// - [`expiry_time(DateTime)`](crate::operation::update_zonal_shift::UpdateZonalShiftOutput::expiry_time):

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

/// - [`start_time(DateTime)`](crate::operation::update_zonal_shift::UpdateZonalShiftOutput::start_time):

The time (UTC) when the zonal shift starts.

/// - [`status(ZonalShiftStatus)`](crate::operation::update_zonal_shift::UpdateZonalShiftOutput::status):

A status for a zonal shift.

The Status for a zonal shift can have one of the following values:

  • ACTIVE: The zonal shift has been started and active.

  • EXPIRED: The zonal shift has expired (the expiry time was exceeded).

  • CANCELED: The zonal shift was canceled.

/// - [`comment(String)`](crate::operation::update_zonal_shift::UpdateZonalShiftOutput::comment):

A comment that you enter about the zonal shift. Only the latest comment is retained; no comment history is maintained. A new comment overwrites any existing comment string.

diff --git a/sdk/arczonalshift/src/error_meta.rs b/sdk/arczonalshift/src/error_meta.rs index 764028edb63d..8757c29787d5 100644 --- a/sdk/arczonalshift/src/error_meta.rs +++ b/sdk/arczonalshift/src/error_meta.rs @@ -191,6 +191,49 @@ impl From + From< + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError, + R, + >, + > for Error +where + R: Send + Sync + std::fmt::Debug + 'static, +{ + fn from( + err: ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError, + R, + >, + ) -> Self { + match err { + ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), + _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { + meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), + source: err.into(), + }), + } + } +} +impl From for Error { + fn from(err: crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError) -> Self { + match err { + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError::AccessDeniedException( + inner, + ) => Error::AccessDeniedException(inner), + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError::InternalServerException( + inner, + ) => Error::InternalServerException(inner), + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError::ThrottlingException(inner) => { + Error::ThrottlingException(inner) + } + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError::Unhandled(inner) => { + Error::Unhandled(inner) + } + } + } +} impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error where R: Send + Sync + std::fmt::Debug + 'static, @@ -323,6 +366,42 @@ impl From for Error { } } } +impl + From< + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError, + R, + >, + > for Error +where + R: Send + Sync + std::fmt::Debug + 'static, +{ + fn from( + err: ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError, + R, + >, + ) -> Self { + match err { + ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), + _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { + meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), + source: err.into(), + }), + } + } +} +impl From for Error { + fn from(err: crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError) -> Self { + match err { + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError::InternalServerException(inner) => Error::InternalServerException(inner), + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError::ThrottlingException(inner) => Error::ThrottlingException(inner), + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError::ValidationException(inner) => Error::ValidationException(inner), + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError::Unhandled(inner) => Error::Unhandled(inner), + } + } +} impl From< ::aws_smithy_runtime_api::client::result::SdkError< diff --git a/sdk/arczonalshift/src/lib.rs b/sdk/arczonalshift/src/lib.rs index f07d7069d7b1..12e5cbc3a9f4 100644 --- a/sdk/arczonalshift/src/lib.rs +++ b/sdk/arczonalshift/src/lib.rs @@ -17,15 +17,19 @@ #![forbid(unsafe_code)] #![warn(missing_docs)] #![cfg_attr(docsrs, feature(doc_auto_cfg))] -//! Welcome to the Zonal Shift API Reference Guide for Amazon Route 53 Application Recovery Controller (Route 53 ARC). +//! Welcome to the API Reference Guide for zonal shift and zonal autoshift in Amazon Route 53 Application Recovery Controller (Route 53 ARC). //! //! You can start a zonal shift to move traffic for a load balancer resource away from an Availability Zone to help your application recover quickly from an impairment in an Availability Zone. For example, you can recover your application from a developer's bad code deployment or from an Amazon Web Services infrastructure failure in a single Availability Zone. //! -//! You can also configure zonal autoshift for a load balancer resource. Zonal autoshift is a capability in Route 53 ARC where Amazon Web Services shifts away application resource traffic from an Availability Zone, on your behalf, to help reduce your time to recovery during events. Amazon Web Services shifts away traffic for resources that are enabled for zonal autoshift whenever Amazon Web Services determines that there's an issue in the Availability Zone that could potentially affect customers. +//! You can also configure zonal autoshift for supported load balancer resources. Zonal autoshift is a capability in Route 53 ARC where you authorize Amazon Web Services to shift away application resource traffic from an Availability Zone during events, on your behalf, to help reduce your time to recovery. Amazon Web Services starts an autoshift when internal telemetry indicates that there is an Availability Zone impairment that could potentially impact customers. //! -//! To ensure that zonal autoshift is safe for your application, you must also configure practice runs when you enable zonal autoshift for a resource. Practice runs start weekly zonal shifts for a resource, to shift traffic for the resource out of an Availability Zone. Practice runs make sure, on a regular basis, that you have enough capacity in all the Availability Zones in an Amazon Web Services Region for your application to continue to operate normally when traffic for a resource is shifted away from one Availability Zone. +//! To help make sure that zonal autoshift is safe for your application, you must also configure practice runs when you enable zonal autoshift for a resource. Practice runs start weekly zonal shifts for a resource, to shift traffic for the resource away from an Availability Zone. Practice runs help you to make sure, on a regular basis, that you have enough capacity in all the Availability Zones in an Amazon Web Services Region for your application to continue to operate normally when traffic for a resource is shifted away from one Availability Zone. //! -//! You must prescale resource capacity in all Availability Zones in the Region where your application is deployed, before you configure practice runs or enable zonal autoshift for a resource. You should not rely on scaling on demand when an autoshift or practice run starts. +//! Before you configure practice runs or enable zonal autoshift, we strongly recommend that you prescale your application resource capacity in all Availability Zones in the Region where your application resources are deployed. You should not rely on scaling on demand when an autoshift or practice run starts. Zonal autoshift, including practice runs, works independently, and does not wait for auto scaling actions to complete. Relying on auto scaling, instead of pre-scaling, can result in loss of availability. +//! +//! If you use auto scaling to handle regular cycles of traffic, we strongly recommend that you configure the minimum capacity of your auto scaling to continue operating normally with the loss of an Availability Zone. +//! +//! Be aware that Route 53 ARC does not inspect the health of individual resources. Amazon Web Services only starts an autoshift when Amazon Web Services telemetry detects that there is an Availability Zone impairment that could potentially impact customers. In some cases, resources might be shifted away that are not experiencing impact. //! //! For more information about using zonal shift and zonal autoshift, see the [Amazon Route 53 Application Recovery Controller Developer Guide](https://docs.aws.amazon.com/r53recovery/latest/dg/what-is-route53-recovery.html). //! diff --git a/sdk/arczonalshift/src/operation.rs b/sdk/arczonalshift/src/operation.rs index b9ea0d487c9a..b39fcb5a33ce 100644 --- a/sdk/arczonalshift/src/operation.rs +++ b/sdk/arczonalshift/src/operation.rs @@ -10,6 +10,9 @@ pub mod create_practice_run_configuration; /// Types for the `DeletePracticeRunConfiguration` operation. pub mod delete_practice_run_configuration; +/// Types for the `GetAutoshiftObserverNotificationStatus` operation. +pub mod get_autoshift_observer_notification_status; + /// Types for the `GetManagedResource` operation. pub mod get_managed_resource; @@ -25,6 +28,9 @@ pub mod list_zonal_shifts; /// Types for the `StartZonalShift` operation. pub mod start_zonal_shift; +/// Types for the `UpdateAutoshiftObserverNotificationStatus` operation. +pub mod update_autoshift_observer_notification_status; + /// Types for the `UpdatePracticeRunConfiguration` operation. pub mod update_practice_run_configuration; diff --git a/sdk/arczonalshift/src/operation/cancel_zonal_shift/_cancel_zonal_shift_output.rs b/sdk/arczonalshift/src/operation/cancel_zonal_shift/_cancel_zonal_shift_output.rs index d351b7e09e35..557429269d15 100644 --- a/sdk/arczonalshift/src/operation/cancel_zonal_shift/_cancel_zonal_shift_output.rs +++ b/sdk/arczonalshift/src/operation/cancel_zonal_shift/_cancel_zonal_shift_output.rs @@ -5,12 +5,12 @@ pub struct CancelZonalShiftOutput { ///

The identifier of a zonal shift.

pub zonal_shift_id: ::std::string::String, - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub resource_identifier: ::std::string::String, - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

pub away_from: ::std::string::String, - ///

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

+ ///

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

///

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

pub expiry_time: ::aws_smithy_types::DateTime, ///

The time (UTC) when the zonal shift starts.

@@ -36,18 +36,18 @@ impl CancelZonalShiftOutput { use std::ops::Deref; self.zonal_shift_id.deref() } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn resource_identifier(&self) -> &str { use std::ops::Deref; self.resource_identifier.deref() } - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

pub fn away_from(&self) -> &str { use std::ops::Deref; self.away_from.deref() } - ///

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

+ ///

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

///

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

pub fn expiry_time(&self) -> &::aws_smithy_types::DateTime { &self.expiry_time @@ -116,53 +116,53 @@ impl CancelZonalShiftOutputBuilder { pub fn get_zonal_shift_id(&self) -> &::std::option::Option<::std::string::String> { &self.zonal_shift_id } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

/// This field is required. pub fn resource_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.resource_identifier = ::std::option::Option::Some(input.into()); self } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn set_resource_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.resource_identifier = input; self } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn get_resource_identifier(&self) -> &::std::option::Option<::std::string::String> { &self.resource_identifier } - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

/// This field is required. pub fn away_from(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.away_from = ::std::option::Option::Some(input.into()); self } - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

pub fn set_away_from(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.away_from = input; self } - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

pub fn get_away_from(&self) -> &::std::option::Option<::std::string::String> { &self.away_from } - ///

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

+ ///

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

///

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

/// This field is required. pub fn expiry_time(mut self, input: ::aws_smithy_types::DateTime) -> Self { self.expiry_time = ::std::option::Option::Some(input); self } - ///

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

+ ///

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

///

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

pub fn set_expiry_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { self.expiry_time = input; self } - ///

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

+ ///

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

///

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

pub fn get_expiry_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { &self.expiry_time diff --git a/sdk/arczonalshift/src/operation/create_practice_run_configuration/_create_practice_run_configuration_input.rs b/sdk/arczonalshift/src/operation/create_practice_run_configuration/_create_practice_run_configuration_input.rs index e7f72086a0b0..4b8e6ddd5843 100644 --- a/sdk/arczonalshift/src/operation/create_practice_run_configuration/_create_practice_run_configuration_input.rs +++ b/sdk/arczonalshift/src/operation/create_practice_run_configuration/_create_practice_run_configuration_input.rs @@ -3,7 +3,7 @@ #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct CreatePracticeRunConfigurationInput { - ///

The identifier of the resource to shift away traffic for when a practice run starts a zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier of the resource that Amazon Web Services shifts traffic for with a practice run zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub resource_identifier: ::std::option::Option<::std::string::String>, ///

Optionally, you can block Route 53 ARC from starting practice runs for specific windows of days and times.

@@ -21,7 +21,7 @@ pub struct CreatePracticeRunConfigurationInput { pub outcome_alarms: ::std::option::Option<::std::vec::Vec>, } impl CreatePracticeRunConfigurationInput { - ///

The identifier of the resource to shift away traffic for when a practice run starts a zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier of the resource that Amazon Web Services shifts traffic for with a practice run zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn resource_identifier(&self) -> ::std::option::Option<&str> { self.resource_identifier.as_deref() @@ -74,20 +74,20 @@ pub struct CreatePracticeRunConfigurationInputBuilder { pub(crate) outcome_alarms: ::std::option::Option<::std::vec::Vec>, } impl CreatePracticeRunConfigurationInputBuilder { - ///

The identifier of the resource to shift away traffic for when a practice run starts a zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier of the resource that Amazon Web Services shifts traffic for with a practice run zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

/// This field is required. pub fn resource_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.resource_identifier = ::std::option::Option::Some(input.into()); self } - ///

The identifier of the resource to shift away traffic for when a practice run starts a zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier of the resource that Amazon Web Services shifts traffic for with a practice run zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn set_resource_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.resource_identifier = input; self } - ///

The identifier of the resource to shift away traffic for when a practice run starts a zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier of the resource that Amazon Web Services shifts traffic for with a practice run zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn get_resource_identifier(&self) -> &::std::option::Option<::std::string::String> { &self.resource_identifier diff --git a/sdk/arczonalshift/src/operation/create_practice_run_configuration/_create_practice_run_configuration_output.rs b/sdk/arczonalshift/src/operation/create_practice_run_configuration/_create_practice_run_configuration_output.rs index a30049231993..85eeb7a2784f 100644 --- a/sdk/arczonalshift/src/operation/create_practice_run_configuration/_create_practice_run_configuration_output.rs +++ b/sdk/arczonalshift/src/operation/create_practice_run_configuration/_create_practice_run_configuration_output.rs @@ -7,7 +7,7 @@ pub struct CreatePracticeRunConfigurationOutput { pub arn: ::std::string::String, ///

The name of the resource that you configured the practice run for.

pub name: ::std::string::String, - ///

The status for zonal autoshift for a resource. When you specify the autoshift status as ENABLED, Amazon Web Services shifts traffic away from shifts away application resource traffic from an Availability Zone, on your behalf, when Amazon Web Services determines that there's an issue in the Availability Zone that could potentially affect customers.

+ ///

The status for zonal autoshift for a resource. When you specify ENABLED for the autoshift status, Amazon Web Services shifts traffic away from shifts away application resource traffic from an Availability Zone, on your behalf, when internal telemetry indicates that there is an Availability Zone impairment that could potentially impact customers.

///

When you enable zonal autoshift, you must also configure practice runs for the resource.

pub zonal_autoshift_status: crate::types::ZonalAutoshiftStatus, ///

A practice run configuration for a resource. Configurations include the outcome alarm that you specify for practice runs, and, optionally, a blocking alarm and blocking dates and windows.

@@ -25,7 +25,7 @@ impl CreatePracticeRunConfigurationOutput { use std::ops::Deref; self.name.deref() } - ///

The status for zonal autoshift for a resource. When you specify the autoshift status as ENABLED, Amazon Web Services shifts traffic away from shifts away application resource traffic from an Availability Zone, on your behalf, when Amazon Web Services determines that there's an issue in the Availability Zone that could potentially affect customers.

+ ///

The status for zonal autoshift for a resource. When you specify ENABLED for the autoshift status, Amazon Web Services shifts traffic away from shifts away application resource traffic from an Availability Zone, on your behalf, when internal telemetry indicates that there is an Availability Zone impairment that could potentially impact customers.

///

When you enable zonal autoshift, you must also configure practice runs for the resource.

pub fn zonal_autoshift_status(&self) -> &crate::types::ZonalAutoshiftStatus { &self.zonal_autoshift_status @@ -88,20 +88,20 @@ impl CreatePracticeRunConfigurationOutputBuilder { pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { &self.name } - ///

The status for zonal autoshift for a resource. When you specify the autoshift status as ENABLED, Amazon Web Services shifts traffic away from shifts away application resource traffic from an Availability Zone, on your behalf, when Amazon Web Services determines that there's an issue in the Availability Zone that could potentially affect customers.

+ ///

The status for zonal autoshift for a resource. When you specify ENABLED for the autoshift status, Amazon Web Services shifts traffic away from shifts away application resource traffic from an Availability Zone, on your behalf, when internal telemetry indicates that there is an Availability Zone impairment that could potentially impact customers.

///

When you enable zonal autoshift, you must also configure practice runs for the resource.

/// This field is required. pub fn zonal_autoshift_status(mut self, input: crate::types::ZonalAutoshiftStatus) -> Self { self.zonal_autoshift_status = ::std::option::Option::Some(input); self } - ///

The status for zonal autoshift for a resource. When you specify the autoshift status as ENABLED, Amazon Web Services shifts traffic away from shifts away application resource traffic from an Availability Zone, on your behalf, when Amazon Web Services determines that there's an issue in the Availability Zone that could potentially affect customers.

+ ///

The status for zonal autoshift for a resource. When you specify ENABLED for the autoshift status, Amazon Web Services shifts traffic away from shifts away application resource traffic from an Availability Zone, on your behalf, when internal telemetry indicates that there is an Availability Zone impairment that could potentially impact customers.

///

When you enable zonal autoshift, you must also configure practice runs for the resource.

pub fn set_zonal_autoshift_status(mut self, input: ::std::option::Option) -> Self { self.zonal_autoshift_status = input; self } - ///

The status for zonal autoshift for a resource. When you specify the autoshift status as ENABLED, Amazon Web Services shifts traffic away from shifts away application resource traffic from an Availability Zone, on your behalf, when Amazon Web Services determines that there's an issue in the Availability Zone that could potentially affect customers.

+ ///

The status for zonal autoshift for a resource. When you specify ENABLED for the autoshift status, Amazon Web Services shifts traffic away from shifts away application resource traffic from an Availability Zone, on your behalf, when internal telemetry indicates that there is an Availability Zone impairment that could potentially impact customers.

///

When you enable zonal autoshift, you must also configure practice runs for the resource.

pub fn get_zonal_autoshift_status(&self) -> &::std::option::Option { &self.zonal_autoshift_status diff --git a/sdk/arczonalshift/src/operation/create_practice_run_configuration/builders.rs b/sdk/arczonalshift/src/operation/create_practice_run_configuration/builders.rs index ff00c431e9e6..2c7e11a7be5c 100644 --- a/sdk/arczonalshift/src/operation/create_practice_run_configuration/builders.rs +++ b/sdk/arczonalshift/src/operation/create_practice_run_configuration/builders.rs @@ -23,6 +23,7 @@ impl crate::operation::create_practice_run_configuration::builders::CreatePracti /// Fluent builder constructing a request to `CreatePracticeRunConfiguration`. /// ///

A practice run configuration for zonal autoshift is required when you enable zonal autoshift. A practice run configuration includes specifications for blocked dates and blocked time windows, and for Amazon CloudWatch alarms that you create to use with practice runs. The alarms that you specify are an outcome alarm, to monitor application health during practice runs and, optionally, a blocking alarm, to block practice runs from starting.

+///

When a resource has a practice run configuration, Route 53 ARC starts zonal shifts for the resource weekly, to shift traffic for practice runs. Practice runs help you to ensure that shifting away traffic from an Availability Zone during an autoshift is safe for your application.

///

For more information, see Considerations when you configure zonal autoshift in the Amazon Route 53 Application Recovery Controller Developer Guide.

#[derive(::std::clone::Clone, ::std::fmt::Debug)] pub struct CreatePracticeRunConfigurationFluentBuilder { @@ -109,19 +110,19 @@ impl CreatePracticeRunConfigurationFluentBuilder { self.config_override = config_override; self } - ///

The identifier of the resource to shift away traffic for when a practice run starts a zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier of the resource that Amazon Web Services shifts traffic for with a practice run zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn resource_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.inner = self.inner.resource_identifier(input.into()); self } - ///

The identifier of the resource to shift away traffic for when a practice run starts a zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier of the resource that Amazon Web Services shifts traffic for with a practice run zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn set_resource_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.inner = self.inner.set_resource_identifier(input); self } - ///

The identifier of the resource to shift away traffic for when a practice run starts a zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier of the resource that Amazon Web Services shifts traffic for with a practice run zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn get_resource_identifier(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_resource_identifier() diff --git a/sdk/arczonalshift/src/operation/get_autoshift_observer_notification_status.rs b/sdk/arczonalshift/src/operation/get_autoshift_observer_notification_status.rs new file mode 100644 index 000000000000..cdcc32607edb --- /dev/null +++ b/sdk/arczonalshift/src/operation/get_autoshift_observer_notification_status.rs @@ -0,0 +1,379 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +/// Orchestration and serialization glue logic for `GetAutoshiftObserverNotificationStatus`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GetAutoshiftObserverNotificationStatus; +impl GetAutoshiftObserverNotificationStatus { + /// Creates a new `GetAutoshiftObserverNotificationStatus` + pub fn new() -> Self { + Self + } + pub(crate) async fn orchestrate( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusInput, + ) -> ::std::result::Result< + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< + ::aws_smithy_runtime_api::client::interceptors::context::Error, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >| { + err.map_service_error(|err| { + err.downcast::() + .expect("correct error type") + }) + }; + let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) + .await + .map_err(map_err)?; + let output = context.finalize().map_err(map_err)?; + ::std::result::Result::Ok( + output + .downcast::() + .expect("correct output type"), + ) + } + + pub(crate) async fn orchestrate_with_stop_point( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusInput, + stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, + ) -> ::std::result::Result< + ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, + ::aws_smithy_runtime_api::client::result::SdkError< + ::aws_smithy_runtime_api::client::interceptors::context::Error, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); + ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point( + "arczonalshift", + "GetAutoshiftObserverNotificationStatus", + input, + runtime_plugins, + stop_point, + ) + .await + } + + pub(crate) fn operation_runtime_plugins( + client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + client_config: &crate::config::Config, + config_override: ::std::option::Option, + ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { + let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); + runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ + ::aws_runtime::auth::sigv4::SCHEME_ID, + ])); + if let ::std::option::Option::Some(config_override) = config_override { + for plugin in config_override.runtime_plugins.iter().cloned() { + runtime_plugins = runtime_plugins.with_operation_plugin(plugin); + } + runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( + config_override, + client_config.config.clone(), + &client_config.runtime_components, + )); + } + runtime_plugins + } +} +impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for GetAutoshiftObserverNotificationStatus { + fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { + let mut cfg = ::aws_smithy_types::config_bag::Layer::new("GetAutoshiftObserverNotificationStatus"); + + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( + GetAutoshiftObserverNotificationStatusRequestSerializer, + )); + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( + GetAutoshiftObserverNotificationStatusResponseDeserializer, + )); + + cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( + ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), + )); + + cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( + "GetAutoshiftObserverNotificationStatus", + "arczonalshift", + )); + let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); + signing_options.double_uri_encode = true; + signing_options.content_sha256_header = false; + signing_options.normalize_uri_path = true; + signing_options.payload_override = None; + + cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { + signing_options, + ..::std::default::Default::default() + }); + + ::std::option::Option::Some(cfg.freeze()) + } + + fn runtime_components( + &self, + _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, + ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { + #[allow(unused_mut)] + let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("GetAutoshiftObserverNotificationStatus") + .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default()) + .with_interceptor(GetAutoshiftObserverNotificationStatusEndpointParamsInterceptor) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError, + >::new()) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError, + >::new()) + .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError, + >::new()); + + ::std::borrow::Cow::Owned(rcb) + } +} + +#[derive(Debug)] +struct GetAutoshiftObserverNotificationStatusResponseDeserializer; +impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetAutoshiftObserverNotificationStatusResponseDeserializer { + fn deserialize_nonstreaming( + &self, + response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { + let (success, status) = (response.status().is_success(), response.status().as_u16()); + let headers = response.headers(); + let body = response.body().bytes().expect("body loaded"); + #[allow(unused_mut)] + let mut force_error = false; + ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); + let parse_result = if !success && status != 200 || force_error { + crate::protocol_serde::shape_get_autoshift_observer_notification_status::de_get_autoshift_observer_notification_status_http_error( + status, headers, body, + ) + } else { + crate::protocol_serde::shape_get_autoshift_observer_notification_status::de_get_autoshift_observer_notification_status_http_response( + status, headers, body, + ) + }; + crate::protocol_serde::type_erase_result(parse_result) + } +} +#[derive(Debug)] +struct GetAutoshiftObserverNotificationStatusRequestSerializer; +impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetAutoshiftObserverNotificationStatusRequestSerializer { + #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] + fn serialize_input( + &self, + input: ::aws_smithy_runtime_api::client::interceptors::context::Input, + _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, + ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { + let input = input + .downcast::() + .expect("correct type"); + let _header_serialization_settings = _cfg + .load::() + .cloned() + .unwrap_or_default(); + let mut request_builder = { + fn uri_base( + _input: &crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusInput, + output: &mut ::std::string::String, + ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { + use ::std::fmt::Write as _; + ::std::write!(output, "/autoshift-observer-notification").expect("formatting should succeed"); + ::std::result::Result::Ok(()) + } + #[allow(clippy::unnecessary_wraps)] + fn update_http_builder( + input: &crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusInput, + builder: ::http::request::Builder, + ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { + let mut uri = ::std::string::String::new(); + uri_base(input, &mut uri)?; + ::std::result::Result::Ok(builder.method("GET").uri(uri)) + } + let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; + builder + }; + let body = ::aws_smithy_types::body::SdkBody::from(""); + + ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) + } +} +#[derive(Debug)] +struct GetAutoshiftObserverNotificationStatusEndpointParamsInterceptor; + +impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetAutoshiftObserverNotificationStatusEndpointParamsInterceptor { + fn name(&self) -> &'static str { + "GetAutoshiftObserverNotificationStatusEndpointParamsInterceptor" + } + + fn read_before_execution( + &self, + context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< + '_, + ::aws_smithy_runtime_api::client::interceptors::context::Input, + ::aws_smithy_runtime_api::client::interceptors::context::Output, + ::aws_smithy_runtime_api::client::interceptors::context::Error, + >, + cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, + ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { + let _input = context + .input() + .downcast_ref::() + .ok_or("failed to downcast to GetAutoshiftObserverNotificationStatusInput")?; + + let params = crate::config::endpoint::Params::builder() + .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) + .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) + .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) + .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) + .build() + .map_err(|err| { + ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) + })?; + cfg.interceptor_state() + .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); + ::std::result::Result::Ok(()) + } +} + +/// Error type for the `GetAutoshiftObserverNotificationStatusError` operation. +#[non_exhaustive] +#[derive(::std::fmt::Debug)] +pub enum GetAutoshiftObserverNotificationStatusError { + ///

You do not have sufficient access to perform this action.

+ AccessDeniedException(crate::types::error::AccessDeniedException), + ///

There was an internal server error.

+ InternalServerException(crate::types::error::InternalServerException), + ///

The request was denied due to request throttling.

+ ThrottlingException(crate::types::error::ThrottlingException), + /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). + #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ + variable wildcard pattern and check `.code()`: + \ +    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` + \ + See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GetAutoshiftObserverNotificationStatusError) for what information is available for the error.")] + Unhandled(crate::error::sealed_unhandled::Unhandled), +} +impl GetAutoshiftObserverNotificationStatusError { + /// Creates the `GetAutoshiftObserverNotificationStatusError::Unhandled` variant from any error type. + pub fn unhandled( + err: impl ::std::convert::Into<::std::boxed::Box>, + ) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source: err.into(), + meta: ::std::default::Default::default(), + }) + } + + /// Creates the `GetAutoshiftObserverNotificationStatusError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). + pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source: err.clone().into(), + meta: err, + }) + } + /// + /// Returns error metadata, which includes the error code, message, + /// request ID, and potentially additional information. + /// + pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::Unhandled(e) => &e.meta, + } + } + /// Returns `true` if the error kind is `GetAutoshiftObserverNotificationStatusError::AccessDeniedException`. + pub fn is_access_denied_exception(&self) -> bool { + matches!(self, Self::AccessDeniedException(_)) + } + /// Returns `true` if the error kind is `GetAutoshiftObserverNotificationStatusError::InternalServerException`. + pub fn is_internal_server_exception(&self) -> bool { + matches!(self, Self::InternalServerException(_)) + } + /// Returns `true` if the error kind is `GetAutoshiftObserverNotificationStatusError::ThrottlingException`. + pub fn is_throttling_exception(&self) -> bool { + matches!(self, Self::ThrottlingException(_)) + } +} +impl ::std::error::Error for GetAutoshiftObserverNotificationStatusError { + fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { + match self { + Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), + Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), + Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), + Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), + } + } +} +impl ::std::fmt::Display for GetAutoshiftObserverNotificationStatusError { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match self { + Self::AccessDeniedException(_inner) => _inner.fmt(f), + Self::InternalServerException(_inner) => _inner.fmt(f), + Self::ThrottlingException(_inner) => _inner.fmt(f), + Self::Unhandled(_inner) => { + if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { + write!(f, "unhandled error ({code})") + } else { + f.write_str("unhandled error") + } + } + } + } +} +impl ::aws_smithy_types::retry::ProvideErrorKind for GetAutoshiftObserverNotificationStatusError { + fn code(&self) -> ::std::option::Option<&str> { + ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) + } + fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { + ::std::option::Option::None + } +} +impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GetAutoshiftObserverNotificationStatusError { + fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::Unhandled(_inner) => &_inner.meta, + } + } +} +impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetAutoshiftObserverNotificationStatusError { + fn create_unhandled_error( + source: ::std::boxed::Box, + meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, + ) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source, + meta: meta.unwrap_or_default(), + }) + } +} +impl ::aws_types::request_id::RequestId + for crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError +{ + fn request_id(&self) -> Option<&str> { + self.meta().request_id() + } +} + +pub use crate::operation::get_autoshift_observer_notification_status::_get_autoshift_observer_notification_status_output::GetAutoshiftObserverNotificationStatusOutput; + +pub use crate::operation::get_autoshift_observer_notification_status::_get_autoshift_observer_notification_status_input::GetAutoshiftObserverNotificationStatusInput; + +mod _get_autoshift_observer_notification_status_input; + +mod _get_autoshift_observer_notification_status_output; + +/// Builders +pub mod builders; diff --git a/sdk/arczonalshift/src/operation/get_autoshift_observer_notification_status/_get_autoshift_observer_notification_status_input.rs b/sdk/arczonalshift/src/operation/get_autoshift_observer_notification_status/_get_autoshift_observer_notification_status_input.rs new file mode 100644 index 000000000000..46b9d214ba1d --- /dev/null +++ b/sdk/arczonalshift/src/operation/get_autoshift_observer_notification_status/_get_autoshift_observer_notification_status_input.rs @@ -0,0 +1,27 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct GetAutoshiftObserverNotificationStatusInput {} +impl GetAutoshiftObserverNotificationStatusInput { + /// Creates a new builder-style object to manufacture [`GetAutoshiftObserverNotificationStatusInput`](crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusInput). + pub fn builder() -> crate::operation::get_autoshift_observer_notification_status::builders::GetAutoshiftObserverNotificationStatusInputBuilder { + crate::operation::get_autoshift_observer_notification_status::builders::GetAutoshiftObserverNotificationStatusInputBuilder::default() + } +} + +/// A builder for [`GetAutoshiftObserverNotificationStatusInput`](crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusInput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GetAutoshiftObserverNotificationStatusInputBuilder {} +impl GetAutoshiftObserverNotificationStatusInputBuilder { + /// Consumes the builder and constructs a [`GetAutoshiftObserverNotificationStatusInput`](crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusInput {}) + } +} diff --git a/sdk/arczonalshift/src/operation/get_autoshift_observer_notification_status/_get_autoshift_observer_notification_status_output.rs b/sdk/arczonalshift/src/operation/get_autoshift_observer_notification_status/_get_autoshift_observer_notification_status_output.rs new file mode 100644 index 000000000000..d94fa2b118cf --- /dev/null +++ b/sdk/arczonalshift/src/operation/get_autoshift_observer_notification_status/_get_autoshift_observer_notification_status_output.rs @@ -0,0 +1,81 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct GetAutoshiftObserverNotificationStatusOutput { + ///

The status of autoshift observer notification. If the status is ENABLED, Route 53 ARC includes all autoshift events when you use the Amazon EventBridge pattern Autoshift In Progress. When the status is DISABLED, Route 53 ARC includes only autoshift events for autoshifts when one or more of your resources is included in the autoshift.

+ pub status: crate::types::AutoshiftObserverNotificationStatus, + _request_id: Option, +} +impl GetAutoshiftObserverNotificationStatusOutput { + ///

The status of autoshift observer notification. If the status is ENABLED, Route 53 ARC includes all autoshift events when you use the Amazon EventBridge pattern Autoshift In Progress. When the status is DISABLED, Route 53 ARC includes only autoshift events for autoshifts when one or more of your resources is included in the autoshift.

+ pub fn status(&self) -> &crate::types::AutoshiftObserverNotificationStatus { + &self.status + } +} +impl ::aws_types::request_id::RequestId for GetAutoshiftObserverNotificationStatusOutput { + fn request_id(&self) -> Option<&str> { + self._request_id.as_deref() + } +} +impl GetAutoshiftObserverNotificationStatusOutput { + /// Creates a new builder-style object to manufacture [`GetAutoshiftObserverNotificationStatusOutput`](crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusOutput). + pub fn builder() -> crate::operation::get_autoshift_observer_notification_status::builders::GetAutoshiftObserverNotificationStatusOutputBuilder { + crate::operation::get_autoshift_observer_notification_status::builders::GetAutoshiftObserverNotificationStatusOutputBuilder::default() + } +} + +/// A builder for [`GetAutoshiftObserverNotificationStatusOutput`](crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusOutput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct GetAutoshiftObserverNotificationStatusOutputBuilder { + pub(crate) status: ::std::option::Option, + _request_id: Option, +} +impl GetAutoshiftObserverNotificationStatusOutputBuilder { + ///

The status of autoshift observer notification. If the status is ENABLED, Route 53 ARC includes all autoshift events when you use the Amazon EventBridge pattern Autoshift In Progress. When the status is DISABLED, Route 53 ARC includes only autoshift events for autoshifts when one or more of your resources is included in the autoshift.

+ /// This field is required. + pub fn status(mut self, input: crate::types::AutoshiftObserverNotificationStatus) -> Self { + self.status = ::std::option::Option::Some(input); + self + } + ///

The status of autoshift observer notification. If the status is ENABLED, Route 53 ARC includes all autoshift events when you use the Amazon EventBridge pattern Autoshift In Progress. When the status is DISABLED, Route 53 ARC includes only autoshift events for autoshifts when one or more of your resources is included in the autoshift.

+ pub fn set_status(mut self, input: ::std::option::Option) -> Self { + self.status = input; + self + } + ///

The status of autoshift observer notification. If the status is ENABLED, Route 53 ARC includes all autoshift events when you use the Amazon EventBridge pattern Autoshift In Progress. When the status is DISABLED, Route 53 ARC includes only autoshift events for autoshifts when one or more of your resources is included in the autoshift.

+ pub fn get_status(&self) -> &::std::option::Option { + &self.status + } + pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { + self._request_id = Some(request_id.into()); + self + } + + pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { + self._request_id = request_id; + self + } + /// Consumes the builder and constructs a [`GetAutoshiftObserverNotificationStatusOutput`](crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusOutput). + /// This method will fail if any of the following fields are not set: + /// - [`status`](crate::operation::get_autoshift_observer_notification_status::builders::GetAutoshiftObserverNotificationStatusOutputBuilder::status) + pub fn build( + self, + ) -> ::std::result::Result< + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok( + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusOutput { + status: self.status.ok_or_else(|| { + ::aws_smithy_types::error::operation::BuildError::missing_field( + "status", + "status was not specified but it is required when building GetAutoshiftObserverNotificationStatusOutput", + ) + })?, + _request_id: self._request_id, + }, + ) + } +} diff --git a/sdk/arczonalshift/src/operation/get_autoshift_observer_notification_status/builders.rs b/sdk/arczonalshift/src/operation/get_autoshift_observer_notification_status/builders.rs new file mode 100644 index 000000000000..f3ee2ea25279 --- /dev/null +++ b/sdk/arczonalshift/src/operation/get_autoshift_observer_notification_status/builders.rs @@ -0,0 +1,117 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub use crate::operation::get_autoshift_observer_notification_status::_get_autoshift_observer_notification_status_output::GetAutoshiftObserverNotificationStatusOutputBuilder; + +pub use crate::operation::get_autoshift_observer_notification_status::_get_autoshift_observer_notification_status_input::GetAutoshiftObserverNotificationStatusInputBuilder; + +impl crate::operation::get_autoshift_observer_notification_status::builders::GetAutoshiftObserverNotificationStatusInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::Client, + ) -> ::std::result::Result< + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let mut fluent_builder = client.get_autoshift_observer_notification_status(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `GetAutoshiftObserverNotificationStatus`. +/// +///

Returns the status of autoshift observer notification. Autoshift observer notification enables you to be notified, through Amazon EventBridge, when there is an autoshift event for zonal autoshift.

+///

If the status is ENABLED, Route 53 ARC includes all autoshift events when you use the EventBridge pattern Autoshift In Progress. When the status is DISABLED, Route 53 ARC includes only autoshift events for autoshifts when one or more of your resources is included in the autoshift.

+///

For more information, see Notifications for practice runs and autoshifts in the Amazon Route 53 Application Recovery Controller Developer Guide.

+#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct GetAutoshiftObserverNotificationStatusFluentBuilder { + handle: ::std::sync::Arc, + inner: crate::operation::get_autoshift_observer_notification_status::builders::GetAutoshiftObserverNotificationStatusInputBuilder, + config_override: ::std::option::Option, +} +impl + crate::client::customize::internal::CustomizableSend< + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusOutput, + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError, + > for GetAutoshiftObserverNotificationStatusFluentBuilder +{ + fn send( + self, + config_override: crate::config::Builder, + ) -> crate::client::customize::internal::BoxFuture< + crate::client::customize::internal::SendResult< + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusOutput, + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError, + >, + > { + ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) + } +} +impl GetAutoshiftObserverNotificationStatusFluentBuilder { + /// Creates a new `GetAutoshiftObserverNotificationStatusFluentBuilder`. + pub(crate) fn new(handle: ::std::sync::Arc) -> Self { + Self { + handle, + inner: ::std::default::Default::default(), + config_override: ::std::option::Option::None, + } + } + /// Access the GetAutoshiftObserverNotificationStatus as a reference. + pub fn as_input( + &self, + ) -> &crate::operation::get_autoshift_observer_notification_status::builders::GetAutoshiftObserverNotificationStatusInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + /// + /// If an error occurs, an `SdkError` will be returned with additional details that + /// can be matched against. + /// + /// By default, any retryable failures will be retried twice. Retry behavior + /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be + /// set when configuring the client. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let input = self + .inner + .build() + .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; + let runtime_plugins = + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatus::operation_runtime_plugins( + self.handle.runtime_plugins.clone(), + &self.handle.conf, + self.config_override, + ); + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatus::orchestrate(&runtime_plugins, input) + .await + } + + /// Consumes this builder, creating a customizable operation that can be modified before being sent. + pub fn customize( + self, + ) -> crate::client::customize::CustomizableOperation< + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusOutput, + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError, + Self, + > { + crate::client::customize::CustomizableOperation::new(self) + } + pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into) -> Self { + self.set_config_override(::std::option::Option::Some(config_override.into())); + self + } + + pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option) -> &mut Self { + self.config_override = config_override; + self + } +} diff --git a/sdk/arczonalshift/src/operation/get_managed_resource/_get_managed_resource_input.rs b/sdk/arczonalshift/src/operation/get_managed_resource/_get_managed_resource_input.rs index 43ef23a6584f..70163b279a33 100644 --- a/sdk/arczonalshift/src/operation/get_managed_resource/_get_managed_resource_input.rs +++ b/sdk/arczonalshift/src/operation/get_managed_resource/_get_managed_resource_input.rs @@ -3,12 +3,12 @@ #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct GetManagedResourceInput { - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub resource_identifier: ::std::option::Option<::std::string::String>, } impl GetManagedResourceInput { - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn resource_identifier(&self) -> ::std::option::Option<&str> { self.resource_identifier.as_deref() @@ -28,20 +28,20 @@ pub struct GetManagedResourceInputBuilder { pub(crate) resource_identifier: ::std::option::Option<::std::string::String>, } impl GetManagedResourceInputBuilder { - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

/// This field is required. pub fn resource_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.resource_identifier = ::std::option::Option::Some(input.into()); self } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn set_resource_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.resource_identifier = input; self } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn get_resource_identifier(&self) -> &::std::option::Option<::std::string::String> { &self.resource_identifier diff --git a/sdk/arczonalshift/src/operation/get_managed_resource/builders.rs b/sdk/arczonalshift/src/operation/get_managed_resource/builders.rs index 0e7942109833..96f968a48db3 100644 --- a/sdk/arczonalshift/src/operation/get_managed_resource/builders.rs +++ b/sdk/arczonalshift/src/operation/get_managed_resource/builders.rs @@ -109,19 +109,19 @@ impl GetManagedResourceFluentBuilder { self.config_override = config_override; self } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn resource_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.inner = self.inner.resource_identifier(input.into()); self } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn set_resource_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.inner = self.inner.set_resource_identifier(input); self } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn get_resource_identifier(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_resource_identifier() diff --git a/sdk/arczonalshift/src/operation/list_autoshifts/builders.rs b/sdk/arczonalshift/src/operation/list_autoshifts/builders.rs index 6898ae9fadfd..8d8bd8b9aee5 100644 --- a/sdk/arczonalshift/src/operation/list_autoshifts/builders.rs +++ b/sdk/arczonalshift/src/operation/list_autoshifts/builders.rs @@ -22,7 +22,7 @@ impl crate::operation::list_autoshifts::builders::ListAutoshiftsInputBuilder { } /// Fluent builder constructing a request to `ListAutoshifts`. /// -///

Returns the active autoshifts for a specified resource.

+///

Returns a list of autoshifts for an Amazon Web Services Region. By default, the call returns only ACTIVE autoshifts. Optionally, you can specify the status parameter to return COMPLETED autoshifts.

#[derive(::std::clone::Clone, ::std::fmt::Debug)] pub struct ListAutoshiftsFluentBuilder { handle: ::std::sync::Arc, diff --git a/sdk/arczonalshift/src/operation/list_zonal_shifts/builders.rs b/sdk/arczonalshift/src/operation/list_zonal_shifts/builders.rs index 0d2c0728e8be..e3c7824ed792 100644 --- a/sdk/arczonalshift/src/operation/list_zonal_shifts/builders.rs +++ b/sdk/arczonalshift/src/operation/list_zonal_shifts/builders.rs @@ -22,7 +22,7 @@ impl crate::operation::list_zonal_shifts::builders::ListZonalShiftsInputBuilder } /// Fluent builder constructing a request to `ListZonalShifts`. /// -///

Lists all active and completed zonal shifts in Amazon Route 53 Application Recovery Controller in your Amazon Web Services account in this Amazon Web Services Region. ListZonalShifts returns customer-started zonal shifts, as well as practice run zonal shifts that Route 53 ARC started on your behalf for zonal autoshift.

+///

Lists all active and completed zonal shifts in Amazon Route 53 Application Recovery Controller in your Amazon Web Services account in this Amazon Web Services Region. ListZonalShifts returns customer-initiated zonal shifts, as well as practice run zonal shifts that Route 53 ARC started on your behalf for zonal autoshift.

///

The ListZonalShifts operation does not list autoshifts. For more information about listing autoshifts, see ">ListAutoshifts.

#[derive(::std::clone::Clone, ::std::fmt::Debug)] pub struct ListZonalShiftsFluentBuilder { diff --git a/sdk/arczonalshift/src/operation/start_zonal_shift/_start_zonal_shift_input.rs b/sdk/arczonalshift/src/operation/start_zonal_shift/_start_zonal_shift_input.rs index 9ec9dd3d11de..fe052d43e2cc 100644 --- a/sdk/arczonalshift/src/operation/start_zonal_shift/_start_zonal_shift_input.rs +++ b/sdk/arczonalshift/src/operation/start_zonal_shift/_start_zonal_shift_input.rs @@ -3,10 +3,10 @@ #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct StartZonalShiftInput { - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub resource_identifier: ::std::option::Option<::std::string::String>, - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

pub away_from: ::std::option::Option<::std::string::String>, ///

The length of time that you want a zonal shift to be active, which Route 53 ARC converts to an expiry time (expiration time). Zonal shifts are temporary. You can set a zonal shift to be active initially for up to three days (72 hours).

///

If you want to still keep traffic away from an Availability Zone, you can update the zonal shift and set a new expiration. You can also cancel a zonal shift, before it expires, for example, if you're ready to restore traffic to the Availability Zone.

@@ -23,12 +23,12 @@ pub struct StartZonalShiftInput { pub comment: ::std::option::Option<::std::string::String>, } impl StartZonalShiftInput { - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn resource_identifier(&self) -> ::std::option::Option<&str> { self.resource_identifier.as_deref() } - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

pub fn away_from(&self) -> ::std::option::Option<&str> { self.away_from.as_deref() } @@ -67,36 +67,36 @@ pub struct StartZonalShiftInputBuilder { pub(crate) comment: ::std::option::Option<::std::string::String>, } impl StartZonalShiftInputBuilder { - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

/// This field is required. pub fn resource_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.resource_identifier = ::std::option::Option::Some(input.into()); self } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn set_resource_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.resource_identifier = input; self } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn get_resource_identifier(&self) -> &::std::option::Option<::std::string::String> { &self.resource_identifier } - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

/// This field is required. pub fn away_from(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.away_from = ::std::option::Option::Some(input.into()); self } - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

pub fn set_away_from(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.away_from = input; self } - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

pub fn get_away_from(&self) -> &::std::option::Option<::std::string::String> { &self.away_from } diff --git a/sdk/arczonalshift/src/operation/start_zonal_shift/_start_zonal_shift_output.rs b/sdk/arczonalshift/src/operation/start_zonal_shift/_start_zonal_shift_output.rs index 11acc39c2535..a44af0d2960e 100644 --- a/sdk/arczonalshift/src/operation/start_zonal_shift/_start_zonal_shift_output.rs +++ b/sdk/arczonalshift/src/operation/start_zonal_shift/_start_zonal_shift_output.rs @@ -5,12 +5,12 @@ pub struct StartZonalShiftOutput { ///

The identifier of a zonal shift.

pub zonal_shift_id: ::std::string::String, - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub resource_identifier: ::std::string::String, - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

pub away_from: ::std::string::String, - ///

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

+ ///

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

///

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

pub expiry_time: ::aws_smithy_types::DateTime, ///

The time (UTC) when the zonal shift starts.

@@ -36,18 +36,18 @@ impl StartZonalShiftOutput { use std::ops::Deref; self.zonal_shift_id.deref() } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn resource_identifier(&self) -> &str { use std::ops::Deref; self.resource_identifier.deref() } - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

pub fn away_from(&self) -> &str { use std::ops::Deref; self.away_from.deref() } - ///

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

+ ///

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

///

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

pub fn expiry_time(&self) -> &::aws_smithy_types::DateTime { &self.expiry_time @@ -116,53 +116,53 @@ impl StartZonalShiftOutputBuilder { pub fn get_zonal_shift_id(&self) -> &::std::option::Option<::std::string::String> { &self.zonal_shift_id } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

/// This field is required. pub fn resource_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.resource_identifier = ::std::option::Option::Some(input.into()); self } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn set_resource_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.resource_identifier = input; self } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn get_resource_identifier(&self) -> &::std::option::Option<::std::string::String> { &self.resource_identifier } - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

/// This field is required. pub fn away_from(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.away_from = ::std::option::Option::Some(input.into()); self } - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

pub fn set_away_from(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.away_from = input; self } - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

pub fn get_away_from(&self) -> &::std::option::Option<::std::string::String> { &self.away_from } - ///

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

+ ///

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

///

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

/// This field is required. pub fn expiry_time(mut self, input: ::aws_smithy_types::DateTime) -> Self { self.expiry_time = ::std::option::Option::Some(input); self } - ///

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

+ ///

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

///

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

pub fn set_expiry_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { self.expiry_time = input; self } - ///

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

+ ///

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

///

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

pub fn get_expiry_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { &self.expiry_time diff --git a/sdk/arczonalshift/src/operation/start_zonal_shift/builders.rs b/sdk/arczonalshift/src/operation/start_zonal_shift/builders.rs index ce17aae3b911..bbb058f6ba92 100644 --- a/sdk/arczonalshift/src/operation/start_zonal_shift/builders.rs +++ b/sdk/arczonalshift/src/operation/start_zonal_shift/builders.rs @@ -111,34 +111,34 @@ impl StartZonalShiftFluentBuilder { self.config_override = config_override; self } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn resource_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.inner = self.inner.resource_identifier(input.into()); self } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn set_resource_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.inner = self.inner.set_resource_identifier(input); self } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn get_resource_identifier(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_resource_identifier() } - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

pub fn away_from(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.inner = self.inner.away_from(input.into()); self } - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

pub fn set_away_from(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.inner = self.inner.set_away_from(input); self } - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

pub fn get_away_from(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_away_from() } diff --git a/sdk/arczonalshift/src/operation/update_autoshift_observer_notification_status.rs b/sdk/arczonalshift/src/operation/update_autoshift_observer_notification_status.rs new file mode 100644 index 000000000000..c786552885cc --- /dev/null +++ b/sdk/arczonalshift/src/operation/update_autoshift_observer_notification_status.rs @@ -0,0 +1,398 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +/// Orchestration and serialization glue logic for `UpdateAutoshiftObserverNotificationStatus`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateAutoshiftObserverNotificationStatus; +impl UpdateAutoshiftObserverNotificationStatus { + /// Creates a new `UpdateAutoshiftObserverNotificationStatus` + pub fn new() -> Self { + Self + } + pub(crate) async fn orchestrate( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusInput, + ) -> ::std::result::Result< + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< + ::aws_smithy_runtime_api::client::interceptors::context::Error, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >| { + err.map_service_error(|err| { + err.downcast::() + .expect("correct error type") + }) + }; + let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) + .await + .map_err(map_err)?; + let output = context.finalize().map_err(map_err)?; + ::std::result::Result::Ok( + output + .downcast::() + .expect("correct output type"), + ) + } + + pub(crate) async fn orchestrate_with_stop_point( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusInput, + stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, + ) -> ::std::result::Result< + ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, + ::aws_smithy_runtime_api::client::result::SdkError< + ::aws_smithy_runtime_api::client::interceptors::context::Error, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); + ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point( + "arczonalshift", + "UpdateAutoshiftObserverNotificationStatus", + input, + runtime_plugins, + stop_point, + ) + .await + } + + pub(crate) fn operation_runtime_plugins( + client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + client_config: &crate::config::Config, + config_override: ::std::option::Option, + ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { + let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); + runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ + ::aws_runtime::auth::sigv4::SCHEME_ID, + ])); + if let ::std::option::Option::Some(config_override) = config_override { + for plugin in config_override.runtime_plugins.iter().cloned() { + runtime_plugins = runtime_plugins.with_operation_plugin(plugin); + } + runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( + config_override, + client_config.config.clone(), + &client_config.runtime_components, + )); + } + runtime_plugins + } +} +impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateAutoshiftObserverNotificationStatus { + fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { + let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateAutoshiftObserverNotificationStatus"); + + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( + UpdateAutoshiftObserverNotificationStatusRequestSerializer, + )); + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( + UpdateAutoshiftObserverNotificationStatusResponseDeserializer, + )); + + cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( + ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), + )); + + cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( + "UpdateAutoshiftObserverNotificationStatus", + "arczonalshift", + )); + let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); + signing_options.double_uri_encode = true; + signing_options.content_sha256_header = false; + signing_options.normalize_uri_path = true; + signing_options.payload_override = None; + + cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { + signing_options, + ..::std::default::Default::default() + }); + + ::std::option::Option::Some(cfg.freeze()) + } + + fn runtime_components( + &self, + _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, + ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { + #[allow(unused_mut)] + let mut rcb = + ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UpdateAutoshiftObserverNotificationStatus") + .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default()) + .with_interceptor(UpdateAutoshiftObserverNotificationStatusEndpointParamsInterceptor) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError, + >::new()) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError, + >::new()) + .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError, + >::new()); + + ::std::borrow::Cow::Owned(rcb) + } +} + +#[derive(Debug)] +struct UpdateAutoshiftObserverNotificationStatusResponseDeserializer; +impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateAutoshiftObserverNotificationStatusResponseDeserializer { + fn deserialize_nonstreaming( + &self, + response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { + let (success, status) = (response.status().is_success(), response.status().as_u16()); + let headers = response.headers(); + let body = response.body().bytes().expect("body loaded"); + #[allow(unused_mut)] + let mut force_error = false; + ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); + let parse_result = if !success && status != 200 || force_error { + crate::protocol_serde::shape_update_autoshift_observer_notification_status::de_update_autoshift_observer_notification_status_http_error( + status, headers, body, + ) + } else { + crate::protocol_serde::shape_update_autoshift_observer_notification_status::de_update_autoshift_observer_notification_status_http_response( + status, headers, body, + ) + }; + crate::protocol_serde::type_erase_result(parse_result) + } +} +#[derive(Debug)] +struct UpdateAutoshiftObserverNotificationStatusRequestSerializer; +impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateAutoshiftObserverNotificationStatusRequestSerializer { + #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] + fn serialize_input( + &self, + input: ::aws_smithy_runtime_api::client::interceptors::context::Input, + _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, + ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { + let input = input + .downcast::() + .expect("correct type"); + let _header_serialization_settings = _cfg + .load::() + .cloned() + .unwrap_or_default(); + let mut request_builder = { + fn uri_base( + _input: &crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusInput, + output: &mut ::std::string::String, + ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { + use ::std::fmt::Write as _; + ::std::write!(output, "/autoshift-observer-notification").expect("formatting should succeed"); + ::std::result::Result::Ok(()) + } + #[allow(clippy::unnecessary_wraps)] + fn update_http_builder( + input: &crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusInput, + builder: ::http::request::Builder, + ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { + let mut uri = ::std::string::String::new(); + uri_base(input, &mut uri)?; + ::std::result::Result::Ok(builder.method("PUT").uri(uri)) + } + let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; + builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json"); + builder + }; + let body = ::aws_smithy_types::body::SdkBody::from( + crate::protocol_serde::shape_update_autoshift_observer_notification_status::ser_update_autoshift_observer_notification_status_input( + &input, + )?, + ); + if let Some(content_length) = body.content_length() { + let content_length = content_length.to_string(); + request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length); + } + ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) + } +} +#[derive(Debug)] +struct UpdateAutoshiftObserverNotificationStatusEndpointParamsInterceptor; + +impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateAutoshiftObserverNotificationStatusEndpointParamsInterceptor { + fn name(&self) -> &'static str { + "UpdateAutoshiftObserverNotificationStatusEndpointParamsInterceptor" + } + + fn read_before_execution( + &self, + context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< + '_, + ::aws_smithy_runtime_api::client::interceptors::context::Input, + ::aws_smithy_runtime_api::client::interceptors::context::Output, + ::aws_smithy_runtime_api::client::interceptors::context::Error, + >, + cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, + ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { + let _input = context + .input() + .downcast_ref::() + .ok_or("failed to downcast to UpdateAutoshiftObserverNotificationStatusInput")?; + + let params = crate::config::endpoint::Params::builder() + .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) + .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) + .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) + .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) + .build() + .map_err(|err| { + ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) + })?; + cfg.interceptor_state() + .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); + ::std::result::Result::Ok(()) + } +} + +/// Error type for the `UpdateAutoshiftObserverNotificationStatusError` operation. +#[non_exhaustive] +#[derive(::std::fmt::Debug)] +pub enum UpdateAutoshiftObserverNotificationStatusError { + ///

You do not have sufficient access to perform this action.

+ AccessDeniedException(crate::types::error::AccessDeniedException), + ///

There was an internal server error.

+ InternalServerException(crate::types::error::InternalServerException), + ///

The request was denied due to request throttling.

+ ThrottlingException(crate::types::error::ThrottlingException), + ///

The input fails to satisfy the constraints specified by an Amazon Web Services service.

+ ValidationException(crate::types::error::ValidationException), + /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). + #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ + variable wildcard pattern and check `.code()`: + \ +    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` + \ + See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateAutoshiftObserverNotificationStatusError) for what information is available for the error.")] + Unhandled(crate::error::sealed_unhandled::Unhandled), +} +impl UpdateAutoshiftObserverNotificationStatusError { + /// Creates the `UpdateAutoshiftObserverNotificationStatusError::Unhandled` variant from any error type. + pub fn unhandled( + err: impl ::std::convert::Into<::std::boxed::Box>, + ) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source: err.into(), + meta: ::std::default::Default::default(), + }) + } + + /// Creates the `UpdateAutoshiftObserverNotificationStatusError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). + pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source: err.clone().into(), + meta: err, + }) + } + /// + /// Returns error metadata, which includes the error code, message, + /// request ID, and potentially additional information. + /// + pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::Unhandled(e) => &e.meta, + } + } + /// Returns `true` if the error kind is `UpdateAutoshiftObserverNotificationStatusError::AccessDeniedException`. + pub fn is_access_denied_exception(&self) -> bool { + matches!(self, Self::AccessDeniedException(_)) + } + /// Returns `true` if the error kind is `UpdateAutoshiftObserverNotificationStatusError::InternalServerException`. + pub fn is_internal_server_exception(&self) -> bool { + matches!(self, Self::InternalServerException(_)) + } + /// Returns `true` if the error kind is `UpdateAutoshiftObserverNotificationStatusError::ThrottlingException`. + pub fn is_throttling_exception(&self) -> bool { + matches!(self, Self::ThrottlingException(_)) + } + /// Returns `true` if the error kind is `UpdateAutoshiftObserverNotificationStatusError::ValidationException`. + pub fn is_validation_exception(&self) -> bool { + matches!(self, Self::ValidationException(_)) + } +} +impl ::std::error::Error for UpdateAutoshiftObserverNotificationStatusError { + fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { + match self { + Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), + Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), + Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), + Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), + Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), + } + } +} +impl ::std::fmt::Display for UpdateAutoshiftObserverNotificationStatusError { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match self { + Self::AccessDeniedException(_inner) => _inner.fmt(f), + Self::InternalServerException(_inner) => _inner.fmt(f), + Self::ThrottlingException(_inner) => _inner.fmt(f), + Self::ValidationException(_inner) => _inner.fmt(f), + Self::Unhandled(_inner) => { + if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { + write!(f, "unhandled error ({code})") + } else { + f.write_str("unhandled error") + } + } + } + } +} +impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateAutoshiftObserverNotificationStatusError { + fn code(&self) -> ::std::option::Option<&str> { + ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) + } + fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { + ::std::option::Option::None + } +} +impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateAutoshiftObserverNotificationStatusError { + fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::Unhandled(_inner) => &_inner.meta, + } + } +} +impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateAutoshiftObserverNotificationStatusError { + fn create_unhandled_error( + source: ::std::boxed::Box, + meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, + ) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source, + meta: meta.unwrap_or_default(), + }) + } +} +impl ::aws_types::request_id::RequestId + for crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError +{ + fn request_id(&self) -> Option<&str> { + self.meta().request_id() + } +} + +pub use crate::operation::update_autoshift_observer_notification_status::_update_autoshift_observer_notification_status_output::UpdateAutoshiftObserverNotificationStatusOutput; + +pub use crate::operation::update_autoshift_observer_notification_status::_update_autoshift_observer_notification_status_input::UpdateAutoshiftObserverNotificationStatusInput; + +mod _update_autoshift_observer_notification_status_input; + +mod _update_autoshift_observer_notification_status_output; + +/// Builders +pub mod builders; diff --git a/sdk/arczonalshift/src/operation/update_autoshift_observer_notification_status/_update_autoshift_observer_notification_status_input.rs b/sdk/arczonalshift/src/operation/update_autoshift_observer_notification_status/_update_autoshift_observer_notification_status_input.rs new file mode 100644 index 000000000000..351376e62f8c --- /dev/null +++ b/sdk/arczonalshift/src/operation/update_autoshift_observer_notification_status/_update_autoshift_observer_notification_status_input.rs @@ -0,0 +1,56 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct UpdateAutoshiftObserverNotificationStatusInput { + ///

The status to set for autoshift observer notification. If the status is ENABLED, Route 53 ARC includes all autoshift events when you use the Amazon EventBridge pattern Autoshift In Progress. When the status is DISABLED, Route 53 ARC includes only autoshift events for autoshifts when one or more of your resources is included in the autoshift.

+ pub status: ::std::option::Option, +} +impl UpdateAutoshiftObserverNotificationStatusInput { + ///

The status to set for autoshift observer notification. If the status is ENABLED, Route 53 ARC includes all autoshift events when you use the Amazon EventBridge pattern Autoshift In Progress. When the status is DISABLED, Route 53 ARC includes only autoshift events for autoshifts when one or more of your resources is included in the autoshift.

+ pub fn status(&self) -> ::std::option::Option<&crate::types::AutoshiftObserverNotificationStatus> { + self.status.as_ref() + } +} +impl UpdateAutoshiftObserverNotificationStatusInput { + /// Creates a new builder-style object to manufacture [`UpdateAutoshiftObserverNotificationStatusInput`](crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusInput). + pub fn builder( + ) -> crate::operation::update_autoshift_observer_notification_status::builders::UpdateAutoshiftObserverNotificationStatusInputBuilder { + crate::operation::update_autoshift_observer_notification_status::builders::UpdateAutoshiftObserverNotificationStatusInputBuilder::default() + } +} + +/// A builder for [`UpdateAutoshiftObserverNotificationStatusInput`](crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusInput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateAutoshiftObserverNotificationStatusInputBuilder { + pub(crate) status: ::std::option::Option, +} +impl UpdateAutoshiftObserverNotificationStatusInputBuilder { + ///

The status to set for autoshift observer notification. If the status is ENABLED, Route 53 ARC includes all autoshift events when you use the Amazon EventBridge pattern Autoshift In Progress. When the status is DISABLED, Route 53 ARC includes only autoshift events for autoshifts when one or more of your resources is included in the autoshift.

+ /// This field is required. + pub fn status(mut self, input: crate::types::AutoshiftObserverNotificationStatus) -> Self { + self.status = ::std::option::Option::Some(input); + self + } + ///

The status to set for autoshift observer notification. If the status is ENABLED, Route 53 ARC includes all autoshift events when you use the Amazon EventBridge pattern Autoshift In Progress. When the status is DISABLED, Route 53 ARC includes only autoshift events for autoshifts when one or more of your resources is included in the autoshift.

+ pub fn set_status(mut self, input: ::std::option::Option) -> Self { + self.status = input; + self + } + ///

The status to set for autoshift observer notification. If the status is ENABLED, Route 53 ARC includes all autoshift events when you use the Amazon EventBridge pattern Autoshift In Progress. When the status is DISABLED, Route 53 ARC includes only autoshift events for autoshifts when one or more of your resources is included in the autoshift.

+ pub fn get_status(&self) -> &::std::option::Option { + &self.status + } + /// Consumes the builder and constructs a [`UpdateAutoshiftObserverNotificationStatusInput`](crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok( + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusInput { status: self.status }, + ) + } +} diff --git a/sdk/arczonalshift/src/operation/update_autoshift_observer_notification_status/_update_autoshift_observer_notification_status_output.rs b/sdk/arczonalshift/src/operation/update_autoshift_observer_notification_status/_update_autoshift_observer_notification_status_output.rs new file mode 100644 index 000000000000..3c096daee473 --- /dev/null +++ b/sdk/arczonalshift/src/operation/update_autoshift_observer_notification_status/_update_autoshift_observer_notification_status_output.rs @@ -0,0 +1,82 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct UpdateAutoshiftObserverNotificationStatusOutput { + ///

The status for autoshift observer notification.

+ pub status: crate::types::AutoshiftObserverNotificationStatus, + _request_id: Option, +} +impl UpdateAutoshiftObserverNotificationStatusOutput { + ///

The status for autoshift observer notification.

+ pub fn status(&self) -> &crate::types::AutoshiftObserverNotificationStatus { + &self.status + } +} +impl ::aws_types::request_id::RequestId for UpdateAutoshiftObserverNotificationStatusOutput { + fn request_id(&self) -> Option<&str> { + self._request_id.as_deref() + } +} +impl UpdateAutoshiftObserverNotificationStatusOutput { + /// Creates a new builder-style object to manufacture [`UpdateAutoshiftObserverNotificationStatusOutput`](crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusOutput). + pub fn builder( + ) -> crate::operation::update_autoshift_observer_notification_status::builders::UpdateAutoshiftObserverNotificationStatusOutputBuilder { + crate::operation::update_autoshift_observer_notification_status::builders::UpdateAutoshiftObserverNotificationStatusOutputBuilder::default() + } +} + +/// A builder for [`UpdateAutoshiftObserverNotificationStatusOutput`](crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusOutput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct UpdateAutoshiftObserverNotificationStatusOutputBuilder { + pub(crate) status: ::std::option::Option, + _request_id: Option, +} +impl UpdateAutoshiftObserverNotificationStatusOutputBuilder { + ///

The status for autoshift observer notification.

+ /// This field is required. + pub fn status(mut self, input: crate::types::AutoshiftObserverNotificationStatus) -> Self { + self.status = ::std::option::Option::Some(input); + self + } + ///

The status for autoshift observer notification.

+ pub fn set_status(mut self, input: ::std::option::Option) -> Self { + self.status = input; + self + } + ///

The status for autoshift observer notification.

+ pub fn get_status(&self) -> &::std::option::Option { + &self.status + } + pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { + self._request_id = Some(request_id.into()); + self + } + + pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { + self._request_id = request_id; + self + } + /// Consumes the builder and constructs a [`UpdateAutoshiftObserverNotificationStatusOutput`](crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusOutput). + /// This method will fail if any of the following fields are not set: + /// - [`status`](crate::operation::update_autoshift_observer_notification_status::builders::UpdateAutoshiftObserverNotificationStatusOutputBuilder::status) + pub fn build( + self, + ) -> ::std::result::Result< + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusOutput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok( + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusOutput { + status: self.status.ok_or_else(|| { + ::aws_smithy_types::error::operation::BuildError::missing_field( + "status", + "status was not specified but it is required when building UpdateAutoshiftObserverNotificationStatusOutput", + ) + })?, + _request_id: self._request_id, + }, + ) + } +} diff --git a/sdk/arczonalshift/src/operation/update_autoshift_observer_notification_status/builders.rs b/sdk/arczonalshift/src/operation/update_autoshift_observer_notification_status/builders.rs new file mode 100644 index 000000000000..b7220ba67153 --- /dev/null +++ b/sdk/arczonalshift/src/operation/update_autoshift_observer_notification_status/builders.rs @@ -0,0 +1,134 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub use crate::operation::update_autoshift_observer_notification_status::_update_autoshift_observer_notification_status_output::UpdateAutoshiftObserverNotificationStatusOutputBuilder; + +pub use crate::operation::update_autoshift_observer_notification_status::_update_autoshift_observer_notification_status_input::UpdateAutoshiftObserverNotificationStatusInputBuilder; + +impl crate::operation::update_autoshift_observer_notification_status::builders::UpdateAutoshiftObserverNotificationStatusInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::Client, + ) -> ::std::result::Result< + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let mut fluent_builder = client.update_autoshift_observer_notification_status(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `UpdateAutoshiftObserverNotificationStatus`. +/// +///

Update the status of autoshift observer notification. Autoshift observer notification enables you to be notified, through Amazon EventBridge, when there is an autoshift event for zonal autoshift.

+///

If the status is ENABLED, Route 53 ARC includes all autoshift events when you use the EventBridge pattern Autoshift In Progress. When the status is DISABLED, Route 53 ARC includes only autoshift events for autoshifts when one or more of your resources is included in the autoshift.

+///

For more information, see Notifications for practice runs and autoshifts in the Amazon Route 53 Application Recovery Controller Developer Guide.

+#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct UpdateAutoshiftObserverNotificationStatusFluentBuilder { + handle: ::std::sync::Arc, + inner: crate::operation::update_autoshift_observer_notification_status::builders::UpdateAutoshiftObserverNotificationStatusInputBuilder, + config_override: ::std::option::Option, +} +impl + crate::client::customize::internal::CustomizableSend< + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusOutput, + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError, + > for UpdateAutoshiftObserverNotificationStatusFluentBuilder +{ + fn send( + self, + config_override: crate::config::Builder, + ) -> crate::client::customize::internal::BoxFuture< + crate::client::customize::internal::SendResult< + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusOutput, + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError, + >, + > { + ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) + } +} +impl UpdateAutoshiftObserverNotificationStatusFluentBuilder { + /// Creates a new `UpdateAutoshiftObserverNotificationStatusFluentBuilder`. + pub(crate) fn new(handle: ::std::sync::Arc) -> Self { + Self { + handle, + inner: ::std::default::Default::default(), + config_override: ::std::option::Option::None, + } + } + /// Access the UpdateAutoshiftObserverNotificationStatus as a reference. + pub fn as_input( + &self, + ) -> &crate::operation::update_autoshift_observer_notification_status::builders::UpdateAutoshiftObserverNotificationStatusInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + /// + /// If an error occurs, an `SdkError` will be returned with additional details that + /// can be matched against. + /// + /// By default, any retryable failures will be retried twice. Retry behavior + /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be + /// set when configuring the client. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let input = self + .inner + .build() + .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; + let runtime_plugins = + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatus::operation_runtime_plugins( + self.handle.runtime_plugins.clone(), + &self.handle.conf, + self.config_override, + ); + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatus::orchestrate( + &runtime_plugins, + input, + ) + .await + } + + /// Consumes this builder, creating a customizable operation that can be modified before being sent. + pub fn customize( + self, + ) -> crate::client::customize::CustomizableOperation< + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusOutput, + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError, + Self, + > { + crate::client::customize::CustomizableOperation::new(self) + } + pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into) -> Self { + self.set_config_override(::std::option::Option::Some(config_override.into())); + self + } + + pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option) -> &mut Self { + self.config_override = config_override; + self + } + ///

The status to set for autoshift observer notification. If the status is ENABLED, Route 53 ARC includes all autoshift events when you use the Amazon EventBridge pattern Autoshift In Progress. When the status is DISABLED, Route 53 ARC includes only autoshift events for autoshifts when one or more of your resources is included in the autoshift.

+ pub fn status(mut self, input: crate::types::AutoshiftObserverNotificationStatus) -> Self { + self.inner = self.inner.status(input); + self + } + ///

The status to set for autoshift observer notification. If the status is ENABLED, Route 53 ARC includes all autoshift events when you use the Amazon EventBridge pattern Autoshift In Progress. When the status is DISABLED, Route 53 ARC includes only autoshift events for autoshifts when one or more of your resources is included in the autoshift.

+ pub fn set_status(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_status(input); + self + } + ///

The status to set for autoshift observer notification. If the status is ENABLED, Route 53 ARC includes all autoshift events when you use the Amazon EventBridge pattern Autoshift In Progress. When the status is DISABLED, Route 53 ARC includes only autoshift events for autoshifts when one or more of your resources is included in the autoshift.

+ pub fn get_status(&self) -> &::std::option::Option { + self.inner.get_status() + } +} diff --git a/sdk/arczonalshift/src/operation/update_zonal_autoshift_configuration/_update_zonal_autoshift_configuration_input.rs b/sdk/arczonalshift/src/operation/update_zonal_autoshift_configuration/_update_zonal_autoshift_configuration_input.rs index 7063d9f16eca..31fd43bf534c 100644 --- a/sdk/arczonalshift/src/operation/update_zonal_autoshift_configuration/_update_zonal_autoshift_configuration_input.rs +++ b/sdk/arczonalshift/src/operation/update_zonal_autoshift_configuration/_update_zonal_autoshift_configuration_input.rs @@ -5,7 +5,7 @@ pub struct UpdateZonalAutoshiftConfigurationInput { ///

The identifier for the resource that you want to update the zonal autoshift configuration for. The identifier is the Amazon Resource Name (ARN) for the resource.

pub resource_identifier: ::std::option::Option<::std::string::String>, - ///

The zonal autoshift status for the resource that you want to update the zonal autoshift configuration for.

+ ///

The zonal autoshift status for the resource that you want to update the zonal autoshift configuration for. Choose ENABLED to authorize Amazon Web Services to shift away resource traffic for an application from an Availability Zone during events, on your behalf, to help reduce time to recovery.

pub zonal_autoshift_status: ::std::option::Option, } impl UpdateZonalAutoshiftConfigurationInput { @@ -13,7 +13,7 @@ impl UpdateZonalAutoshiftConfigurationInput { pub fn resource_identifier(&self) -> ::std::option::Option<&str> { self.resource_identifier.as_deref() } - ///

The zonal autoshift status for the resource that you want to update the zonal autoshift configuration for.

+ ///

The zonal autoshift status for the resource that you want to update the zonal autoshift configuration for. Choose ENABLED to authorize Amazon Web Services to shift away resource traffic for an application from an Availability Zone during events, on your behalf, to help reduce time to recovery.

pub fn zonal_autoshift_status(&self) -> ::std::option::Option<&crate::types::ZonalAutoshiftStatus> { self.zonal_autoshift_status.as_ref() } @@ -48,18 +48,18 @@ impl UpdateZonalAutoshiftConfigurationInputBuilder { pub fn get_resource_identifier(&self) -> &::std::option::Option<::std::string::String> { &self.resource_identifier } - ///

The zonal autoshift status for the resource that you want to update the zonal autoshift configuration for.

+ ///

The zonal autoshift status for the resource that you want to update the zonal autoshift configuration for. Choose ENABLED to authorize Amazon Web Services to shift away resource traffic for an application from an Availability Zone during events, on your behalf, to help reduce time to recovery.

/// This field is required. pub fn zonal_autoshift_status(mut self, input: crate::types::ZonalAutoshiftStatus) -> Self { self.zonal_autoshift_status = ::std::option::Option::Some(input); self } - ///

The zonal autoshift status for the resource that you want to update the zonal autoshift configuration for.

+ ///

The zonal autoshift status for the resource that you want to update the zonal autoshift configuration for. Choose ENABLED to authorize Amazon Web Services to shift away resource traffic for an application from an Availability Zone during events, on your behalf, to help reduce time to recovery.

pub fn set_zonal_autoshift_status(mut self, input: ::std::option::Option) -> Self { self.zonal_autoshift_status = input; self } - ///

The zonal autoshift status for the resource that you want to update the zonal autoshift configuration for.

+ ///

The zonal autoshift status for the resource that you want to update the zonal autoshift configuration for. Choose ENABLED to authorize Amazon Web Services to shift away resource traffic for an application from an Availability Zone during events, on your behalf, to help reduce time to recovery.

pub fn get_zonal_autoshift_status(&self) -> &::std::option::Option { &self.zonal_autoshift_status } diff --git a/sdk/arczonalshift/src/operation/update_zonal_autoshift_configuration/_update_zonal_autoshift_configuration_output.rs b/sdk/arczonalshift/src/operation/update_zonal_autoshift_configuration/_update_zonal_autoshift_configuration_output.rs index 56da6c398b6c..594b7eda321d 100644 --- a/sdk/arczonalshift/src/operation/update_zonal_autoshift_configuration/_update_zonal_autoshift_configuration_output.rs +++ b/sdk/arczonalshift/src/operation/update_zonal_autoshift_configuration/_update_zonal_autoshift_configuration_output.rs @@ -5,7 +5,7 @@ pub struct UpdateZonalAutoshiftConfigurationOutput { ///

The identifier for the resource that you updated the zonal autoshift configuration for. The identifier is the Amazon Resource Name (ARN) for the resource.

pub resource_identifier: ::std::string::String, - ///

The zonal autoshift status for the resource that you updated the zonal autoshift configuration for.

+ ///

The updated zonal autoshift status for the resource.

pub zonal_autoshift_status: crate::types::ZonalAutoshiftStatus, _request_id: Option, } @@ -15,7 +15,7 @@ impl UpdateZonalAutoshiftConfigurationOutput { use std::ops::Deref; self.resource_identifier.deref() } - ///

The zonal autoshift status for the resource that you updated the zonal autoshift configuration for.

+ ///

The updated zonal autoshift status for the resource.

pub fn zonal_autoshift_status(&self) -> &crate::types::ZonalAutoshiftStatus { &self.zonal_autoshift_status } @@ -56,18 +56,18 @@ impl UpdateZonalAutoshiftConfigurationOutputBuilder { pub fn get_resource_identifier(&self) -> &::std::option::Option<::std::string::String> { &self.resource_identifier } - ///

The zonal autoshift status for the resource that you updated the zonal autoshift configuration for.

+ ///

The updated zonal autoshift status for the resource.

/// This field is required. pub fn zonal_autoshift_status(mut self, input: crate::types::ZonalAutoshiftStatus) -> Self { self.zonal_autoshift_status = ::std::option::Option::Some(input); self } - ///

The zonal autoshift status for the resource that you updated the zonal autoshift configuration for.

+ ///

The updated zonal autoshift status for the resource.

pub fn set_zonal_autoshift_status(mut self, input: ::std::option::Option) -> Self { self.zonal_autoshift_status = input; self } - ///

The zonal autoshift status for the resource that you updated the zonal autoshift configuration for.

+ ///

The updated zonal autoshift status for the resource.

pub fn get_zonal_autoshift_status(&self) -> &::std::option::Option { &self.zonal_autoshift_status } diff --git a/sdk/arczonalshift/src/operation/update_zonal_autoshift_configuration/builders.rs b/sdk/arczonalshift/src/operation/update_zonal_autoshift_configuration/builders.rs index a49c3aec044f..ee89a34d45a5 100644 --- a/sdk/arczonalshift/src/operation/update_zonal_autoshift_configuration/builders.rs +++ b/sdk/arczonalshift/src/operation/update_zonal_autoshift_configuration/builders.rs @@ -22,7 +22,8 @@ impl crate::operation::update_zonal_autoshift_configuration::builders::UpdateZon } /// Fluent builder constructing a request to `UpdateZonalAutoshiftConfiguration`. /// -///

You can update the zonal autoshift status for a resource, to enable or disable zonal autoshift. When zonal autoshift is ENABLED, Amazon Web Services shifts away resource traffic from an Availability Zone, on your behalf, when Amazon Web Services determines that there's an issue in the Availability Zone that could potentially affect customers.

+///

The zonal autoshift configuration for a resource includes the practice run configuration and the status for running autoshifts, zonal autoshift status. When a resource has a practice run configuation, Route 53 ARC starts weekly zonal shifts for the resource, to shift traffic away from an Availability Zone. Weekly practice runs help you to make sure that your application can continue to operate normally with the loss of one Availability Zone.

+///

You can update the zonal autoshift autoshift status to enable or disable zonal autoshift. When zonal autoshift is ENABLED, you authorize Amazon Web Services to shift away resource traffic for an application from an Availability Zone during events, on your behalf, to help reduce time to recovery. Traffic is also shifted away for the required weekly practice runs.

#[derive(::std::clone::Clone, ::std::fmt::Debug)] pub struct UpdateZonalAutoshiftConfigurationFluentBuilder { handle: ::std::sync::Arc, @@ -122,17 +123,17 @@ impl UpdateZonalAutoshiftConfigurationFluentBuilder { pub fn get_resource_identifier(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_resource_identifier() } - ///

The zonal autoshift status for the resource that you want to update the zonal autoshift configuration for.

+ ///

The zonal autoshift status for the resource that you want to update the zonal autoshift configuration for. Choose ENABLED to authorize Amazon Web Services to shift away resource traffic for an application from an Availability Zone during events, on your behalf, to help reduce time to recovery.

pub fn zonal_autoshift_status(mut self, input: crate::types::ZonalAutoshiftStatus) -> Self { self.inner = self.inner.zonal_autoshift_status(input); self } - ///

The zonal autoshift status for the resource that you want to update the zonal autoshift configuration for.

+ ///

The zonal autoshift status for the resource that you want to update the zonal autoshift configuration for. Choose ENABLED to authorize Amazon Web Services to shift away resource traffic for an application from an Availability Zone during events, on your behalf, to help reduce time to recovery.

pub fn set_zonal_autoshift_status(mut self, input: ::std::option::Option) -> Self { self.inner = self.inner.set_zonal_autoshift_status(input); self } - ///

The zonal autoshift status for the resource that you want to update the zonal autoshift configuration for.

+ ///

The zonal autoshift status for the resource that you want to update the zonal autoshift configuration for. Choose ENABLED to authorize Amazon Web Services to shift away resource traffic for an application from an Availability Zone during events, on your behalf, to help reduce time to recovery.

pub fn get_zonal_autoshift_status(&self) -> &::std::option::Option { self.inner.get_zonal_autoshift_status() } diff --git a/sdk/arczonalshift/src/operation/update_zonal_shift/_update_zonal_shift_output.rs b/sdk/arczonalshift/src/operation/update_zonal_shift/_update_zonal_shift_output.rs index a61c56d50aef..6589b0be5008 100644 --- a/sdk/arczonalshift/src/operation/update_zonal_shift/_update_zonal_shift_output.rs +++ b/sdk/arczonalshift/src/operation/update_zonal_shift/_update_zonal_shift_output.rs @@ -5,12 +5,12 @@ pub struct UpdateZonalShiftOutput { ///

The identifier of a zonal shift.

pub zonal_shift_id: ::std::string::String, - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub resource_identifier: ::std::string::String, - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

pub away_from: ::std::string::String, - ///

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

+ ///

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

///

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

pub expiry_time: ::aws_smithy_types::DateTime, ///

The time (UTC) when the zonal shift starts.

@@ -36,18 +36,18 @@ impl UpdateZonalShiftOutput { use std::ops::Deref; self.zonal_shift_id.deref() } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn resource_identifier(&self) -> &str { use std::ops::Deref; self.resource_identifier.deref() } - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

pub fn away_from(&self) -> &str { use std::ops::Deref; self.away_from.deref() } - ///

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

+ ///

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

///

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

pub fn expiry_time(&self) -> &::aws_smithy_types::DateTime { &self.expiry_time @@ -116,53 +116,53 @@ impl UpdateZonalShiftOutputBuilder { pub fn get_zonal_shift_id(&self) -> &::std::option::Option<::std::string::String> { &self.zonal_shift_id } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

/// This field is required. pub fn resource_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.resource_identifier = ::std::option::Option::Some(input.into()); self } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn set_resource_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.resource_identifier = input; self } - ///

The identifier for the resource to shift away traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

+ ///

The identifier for the resource that Amazon Web Services shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub fn get_resource_identifier(&self) -> &::std::option::Option<::std::string::String> { &self.resource_identifier } - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

/// This field is required. pub fn away_from(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.away_from = ::std::option::Option::Some(input.into()); self } - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

pub fn set_away_from(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.away_from = input; self } - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

pub fn get_away_from(&self) -> &::std::option::Option<::std::string::String> { &self.away_from } - ///

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

+ ///

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

///

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

/// This field is required. pub fn expiry_time(mut self, input: ::aws_smithy_types::DateTime) -> Self { self.expiry_time = ::std::option::Option::Some(input); self } - ///

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

+ ///

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

///

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

pub fn set_expiry_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { self.expiry_time = input; self } - ///

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

+ ///

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

///

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

pub fn get_expiry_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { &self.expiry_time diff --git a/sdk/arczonalshift/src/protocol_serde.rs b/sdk/arczonalshift/src/protocol_serde.rs index c38a6b37b33c..b59b56b5d85f 100644 --- a/sdk/arczonalshift/src/protocol_serde.rs +++ b/sdk/arczonalshift/src/protocol_serde.rs @@ -29,6 +29,8 @@ pub(crate) mod shape_create_practice_run_configuration; pub(crate) mod shape_delete_practice_run_configuration; +pub(crate) mod shape_get_autoshift_observer_notification_status; + pub(crate) mod shape_get_managed_resource; pub(crate) mod shape_list_autoshifts; @@ -39,6 +41,8 @@ pub(crate) mod shape_list_zonal_shifts; pub(crate) mod shape_start_zonal_shift; +pub(crate) mod shape_update_autoshift_observer_notification_status; + pub(crate) mod shape_update_practice_run_configuration; pub(crate) mod shape_update_zonal_autoshift_configuration; @@ -67,6 +71,8 @@ pub(crate) mod shape_start_zonal_shift_input; pub(crate) mod shape_throttling_exception; +pub(crate) mod shape_update_autoshift_observer_notification_status_input; + pub(crate) mod shape_update_practice_run_configuration_input; pub(crate) mod shape_update_zonal_autoshift_configuration_input; diff --git a/sdk/arczonalshift/src/protocol_serde/shape_get_autoshift_observer_notification_status.rs b/sdk/arczonalshift/src/protocol_serde/shape_get_autoshift_observer_notification_status.rs new file mode 100644 index 000000000000..883e1d4b9ea7 --- /dev/null +++ b/sdk/arczonalshift/src/protocol_serde/shape_get_autoshift_observer_notification_status.rs @@ -0,0 +1,150 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(clippy::unnecessary_wraps)] +pub fn de_get_autoshift_observer_notification_status_http_error( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusOutput, + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError, +> { + #[allow(unused_mut)] + let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) + .map_err(crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError::unhandled)?; + generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); + let generic = generic_builder.build(); + let error_code = match generic.code() { + Some(code) => code, + None => { + return Err(crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError::unhandled(generic)) + } + }; + + let _error_message = generic.message().map(|msg| msg.to_owned()); + Err(match error_code { + "AccessDeniedException" => { + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError::AccessDeniedException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); + output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) + .map_err( + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError::unhandled, + )?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } + "InternalServerException" => { + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError::InternalServerException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); + output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) + .map_err( + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError::unhandled, + )?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } + "ThrottlingException" => { + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError::ThrottlingException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); + output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output).map_err( + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError::unhandled, + )?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } + _ => crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError::generic(generic), + }) +} + +#[allow(clippy::unnecessary_wraps)] +pub fn de_get_autoshift_observer_notification_status_http_response( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusOutput, + crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError, +> { + Ok({ + #[allow(unused_mut)] + let mut output = + crate::operation::get_autoshift_observer_notification_status::builders::GetAutoshiftObserverNotificationStatusOutputBuilder::default(); + output = crate::protocol_serde::shape_get_autoshift_observer_notification_status::de_get_autoshift_observer_notification_status( + _response_body, + output, + ) + .map_err(crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError::unhandled)?; + output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); + crate::serde_util::get_autoshift_observer_notification_status_output_output_correct_errors(output) + .build() + .map_err(crate::operation::get_autoshift_observer_notification_status::GetAutoshiftObserverNotificationStatusError::unhandled)? + }) +} + +pub(crate) fn de_get_autoshift_observer_notification_status( + value: &[u8], + mut builder: crate::operation::get_autoshift_observer_notification_status::builders::GetAutoshiftObserverNotificationStatusOutputBuilder, +) -> Result< + crate::operation::get_autoshift_observer_notification_status::builders::GetAutoshiftObserverNotificationStatusOutputBuilder, + ::aws_smithy_json::deserialize::error::DeserializeError, +> { + let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); + let tokens = &mut tokens_owned; + ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "status" => { + builder = builder.set_status( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| { + s.to_unescaped() + .map(|u| crate::types::AutoshiftObserverNotificationStatus::from(u.as_ref())) + }) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + if tokens.next().is_some() { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "found more JSON tokens after completing parsing", + )); + } + Ok(builder) +} diff --git a/sdk/arczonalshift/src/protocol_serde/shape_update_autoshift_observer_notification_status.rs b/sdk/arczonalshift/src/protocol_serde/shape_update_autoshift_observer_notification_status.rs new file mode 100644 index 000000000000..8e41897f837e --- /dev/null +++ b/sdk/arczonalshift/src/protocol_serde/shape_update_autoshift_observer_notification_status.rs @@ -0,0 +1,180 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(clippy::unnecessary_wraps)] +pub fn de_update_autoshift_observer_notification_status_http_error( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusOutput, + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError, +> { + #[allow(unused_mut)] + let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) + .map_err(crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError::unhandled)?; + generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); + let generic = generic_builder.build(); + let error_code = match generic.code() { + Some(code) => code, + None => { + return Err( + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError::unhandled(generic), + ) + } + }; + + let _error_message = generic.message().map(|msg| msg.to_owned()); + Err(match error_code { + "AccessDeniedException" => { + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError::AccessDeniedException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); + output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) + .map_err( + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError::unhandled, + )?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } + "InternalServerException" => { + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError::InternalServerException( + { + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); + output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output).map_err(crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }, + ) + } + "ThrottlingException" => { + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError::ThrottlingException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); + output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output).map_err( + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError::unhandled, + )?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } + "ValidationException" => { + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError::ValidationException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); + output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output).map_err( + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError::unhandled, + )?; + let output = output.meta(generic); + crate::serde_util::validation_exception_correct_errors(output).build().map_err( + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError::unhandled, + )? + }; + tmp + }) + } + _ => crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError::generic(generic), + }) +} + +#[allow(clippy::unnecessary_wraps)] +pub fn de_update_autoshift_observer_notification_status_http_response( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusOutput, + crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError, +> { + Ok({ + #[allow(unused_mut)] + let mut output = crate::operation::update_autoshift_observer_notification_status::builders::UpdateAutoshiftObserverNotificationStatusOutputBuilder::default(); + output = crate::protocol_serde::shape_update_autoshift_observer_notification_status::de_update_autoshift_observer_notification_status( + _response_body, + output, + ) + .map_err(crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError::unhandled)?; + output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); + crate::serde_util::update_autoshift_observer_notification_status_output_output_correct_errors(output) + .build() + .map_err(crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusError::unhandled)? + }) +} + +pub fn ser_update_autoshift_observer_notification_status_input( + input: &crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusInput, +) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> { + let mut out = String::new(); + let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out); + crate::protocol_serde::shape_update_autoshift_observer_notification_status_input::ser_update_autoshift_observer_notification_status_input_input( + &mut object, + input, + )?; + object.finish(); + Ok(::aws_smithy_types::body::SdkBody::from(out)) +} + +pub(crate) fn de_update_autoshift_observer_notification_status( + value: &[u8], + mut builder: crate::operation::update_autoshift_observer_notification_status::builders::UpdateAutoshiftObserverNotificationStatusOutputBuilder, +) -> Result< + crate::operation::update_autoshift_observer_notification_status::builders::UpdateAutoshiftObserverNotificationStatusOutputBuilder, + ::aws_smithy_json::deserialize::error::DeserializeError, +> { + let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); + let tokens = &mut tokens_owned; + ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "status" => { + builder = builder.set_status( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| { + s.to_unescaped() + .map(|u| crate::types::AutoshiftObserverNotificationStatus::from(u.as_ref())) + }) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + if tokens.next().is_some() { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "found more JSON tokens after completing parsing", + )); + } + Ok(builder) +} diff --git a/sdk/arczonalshift/src/protocol_serde/shape_update_autoshift_observer_notification_status_input.rs b/sdk/arczonalshift/src/protocol_serde/shape_update_autoshift_observer_notification_status_input.rs new file mode 100644 index 000000000000..f3a4000b603b --- /dev/null +++ b/sdk/arczonalshift/src/protocol_serde/shape_update_autoshift_observer_notification_status_input.rs @@ -0,0 +1,10 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_update_autoshift_observer_notification_status_input_input( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::operation::update_autoshift_observer_notification_status::UpdateAutoshiftObserverNotificationStatusInput, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.status { + object.key("status").string(var_1.as_str()); + } + Ok(()) +} diff --git a/sdk/arczonalshift/src/serde_util.rs b/sdk/arczonalshift/src/serde_util.rs index a1c69562157e..b32ab7e4ce56 100644 --- a/sdk/arczonalshift/src/serde_util.rs +++ b/sdk/arczonalshift/src/serde_util.rs @@ -95,6 +95,15 @@ pub(crate) fn delete_practice_run_configuration_output_output_correct_errors( builder } +pub(crate) fn get_autoshift_observer_notification_status_output_output_correct_errors( + mut builder: crate::operation::get_autoshift_observer_notification_status::builders::GetAutoshiftObserverNotificationStatusOutputBuilder, +) -> crate::operation::get_autoshift_observer_notification_status::builders::GetAutoshiftObserverNotificationStatusOutputBuilder { + if builder.status.is_none() { + builder.status = "no value was set".parse::().ok() + } + builder +} + pub(crate) fn get_managed_resource_output_output_correct_errors( mut builder: crate::operation::get_managed_resource::builders::GetManagedResourceOutputBuilder, ) -> crate::operation::get_managed_resource::builders::GetManagedResourceOutputBuilder { @@ -143,6 +152,15 @@ pub(crate) fn start_zonal_shift_output_output_correct_errors( builder } +pub(crate) fn update_autoshift_observer_notification_status_output_output_correct_errors( + mut builder: crate::operation::update_autoshift_observer_notification_status::builders::UpdateAutoshiftObserverNotificationStatusOutputBuilder, +) -> crate::operation::update_autoshift_observer_notification_status::builders::UpdateAutoshiftObserverNotificationStatusOutputBuilder { + if builder.status.is_none() { + builder.status = "no value was set".parse::().ok() + } + builder +} + pub(crate) fn update_practice_run_configuration_output_output_correct_errors( mut builder: crate::operation::update_practice_run_configuration::builders::UpdatePracticeRunConfigurationOutputBuilder, ) -> crate::operation::update_practice_run_configuration::builders::UpdatePracticeRunConfigurationOutputBuilder { diff --git a/sdk/arczonalshift/src/types.rs b/sdk/arczonalshift/src/types.rs index f79359cf683a..7b0e5b340cd1 100644 --- a/sdk/arczonalshift/src/types.rs +++ b/sdk/arczonalshift/src/types.rs @@ -27,6 +27,8 @@ pub use crate::types::_applied_status::AppliedStatus; pub use crate::types::_managed_resource_summary::ManagedResourceSummary; +pub use crate::types::_autoshift_observer_notification_status::AutoshiftObserverNotificationStatus; + pub use crate::types::_autoshift_summary::AutoshiftSummary; pub use crate::types::_autoshift_execution_status::AutoshiftExecutionStatus; @@ -39,6 +41,8 @@ mod _autoshift_execution_status; mod _autoshift_in_resource; +mod _autoshift_observer_notification_status; + mod _autoshift_summary; mod _conflict_exception_reason; diff --git a/sdk/arczonalshift/src/types/_autoshift_in_resource.rs b/sdk/arczonalshift/src/types/_autoshift_in_resource.rs index bf2aec6de37c..b3ad5d299965 100644 --- a/sdk/arczonalshift/src/types/_autoshift_in_resource.rs +++ b/sdk/arczonalshift/src/types/_autoshift_in_resource.rs @@ -5,23 +5,23 @@ #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct AutoshiftInResource { - ///

The appliedStatus field specifies which application traffic shift is in effect for a resource when there is more than one traffic shift active. There can be more than one application traffic shift in progress at the same time - that is, practice run zonal shifts, customer-started zonal shifts, or an autoshift. The appliedStatus field for an autoshift for a resource can have one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift that is currently in effect for the resource has an applied status set to APPLIED.

- ///

The overall principle for precedence is that zonal shifts that you start as a customer take precedence autoshifts, which take precedence over practice runs. That is, customer-started zonal shifts > autoshifts > practice run zonal shifts.

+ ///

The appliedStatus field specifies which application traffic shift is in effect for a resource when there is more than one active traffic shift. There can be more than one application traffic shift in progress at the same time - that is, practice run zonal shifts, customer-initiated zonal shifts, or an autoshift. The appliedStatus field for a shift that is in progress for a resource can have one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift that is currently in effect for the resource has an appliedStatus set to APPLIED.

+ ///

The overall principle for precedence is that zonal shifts that you start as a customer take precedence autoshifts, which take precedence over practice runs. That is, customer-initiated zonal shifts > autoshifts > practice run zonal shifts.

///

For more information, see How zonal autoshift and practice runs work in the Amazon Route 53 Application Recovery Controller Developer Guide.

pub applied_status: crate::types::AutoshiftAppliedStatus, - ///

The Availability Zone that traffic is shifted away from for a resource, when Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region. An autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when you disable zonal autoshift for the resource.

+ ///

The Availability Zone (for example, use1-az1) that traffic is shifted away from for a resource, when Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region. An autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when you disable zonal autoshift for the resource.

pub away_from: ::std::string::String, ///

The time (UTC) when the autoshift started.

pub start_time: ::aws_smithy_types::DateTime, } impl AutoshiftInResource { - ///

The appliedStatus field specifies which application traffic shift is in effect for a resource when there is more than one traffic shift active. There can be more than one application traffic shift in progress at the same time - that is, practice run zonal shifts, customer-started zonal shifts, or an autoshift. The appliedStatus field for an autoshift for a resource can have one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift that is currently in effect for the resource has an applied status set to APPLIED.

- ///

The overall principle for precedence is that zonal shifts that you start as a customer take precedence autoshifts, which take precedence over practice runs. That is, customer-started zonal shifts > autoshifts > practice run zonal shifts.

+ ///

The appliedStatus field specifies which application traffic shift is in effect for a resource when there is more than one active traffic shift. There can be more than one application traffic shift in progress at the same time - that is, practice run zonal shifts, customer-initiated zonal shifts, or an autoshift. The appliedStatus field for a shift that is in progress for a resource can have one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift that is currently in effect for the resource has an appliedStatus set to APPLIED.

+ ///

The overall principle for precedence is that zonal shifts that you start as a customer take precedence autoshifts, which take precedence over practice runs. That is, customer-initiated zonal shifts > autoshifts > practice run zonal shifts.

///

For more information, see How zonal autoshift and practice runs work in the Amazon Route 53 Application Recovery Controller Developer Guide.

pub fn applied_status(&self) -> &crate::types::AutoshiftAppliedStatus { &self.applied_status } - ///

The Availability Zone that traffic is shifted away from for a resource, when Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region. An autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when you disable zonal autoshift for the resource.

+ ///

The Availability Zone (for example, use1-az1) that traffic is shifted away from for a resource, when Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region. An autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when you disable zonal autoshift for the resource.

pub fn away_from(&self) -> &str { use std::ops::Deref; self.away_from.deref() @@ -47,39 +47,39 @@ pub struct AutoshiftInResourceBuilder { pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>, } impl AutoshiftInResourceBuilder { - ///

The appliedStatus field specifies which application traffic shift is in effect for a resource when there is more than one traffic shift active. There can be more than one application traffic shift in progress at the same time - that is, practice run zonal shifts, customer-started zonal shifts, or an autoshift. The appliedStatus field for an autoshift for a resource can have one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift that is currently in effect for the resource has an applied status set to APPLIED.

- ///

The overall principle for precedence is that zonal shifts that you start as a customer take precedence autoshifts, which take precedence over practice runs. That is, customer-started zonal shifts > autoshifts > practice run zonal shifts.

+ ///

The appliedStatus field specifies which application traffic shift is in effect for a resource when there is more than one active traffic shift. There can be more than one application traffic shift in progress at the same time - that is, practice run zonal shifts, customer-initiated zonal shifts, or an autoshift. The appliedStatus field for a shift that is in progress for a resource can have one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift that is currently in effect for the resource has an appliedStatus set to APPLIED.

+ ///

The overall principle for precedence is that zonal shifts that you start as a customer take precedence autoshifts, which take precedence over practice runs. That is, customer-initiated zonal shifts > autoshifts > practice run zonal shifts.

///

For more information, see How zonal autoshift and practice runs work in the Amazon Route 53 Application Recovery Controller Developer Guide.

/// This field is required. pub fn applied_status(mut self, input: crate::types::AutoshiftAppliedStatus) -> Self { self.applied_status = ::std::option::Option::Some(input); self } - ///

The appliedStatus field specifies which application traffic shift is in effect for a resource when there is more than one traffic shift active. There can be more than one application traffic shift in progress at the same time - that is, practice run zonal shifts, customer-started zonal shifts, or an autoshift. The appliedStatus field for an autoshift for a resource can have one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift that is currently in effect for the resource has an applied status set to APPLIED.

- ///

The overall principle for precedence is that zonal shifts that you start as a customer take precedence autoshifts, which take precedence over practice runs. That is, customer-started zonal shifts > autoshifts > practice run zonal shifts.

+ ///

The appliedStatus field specifies which application traffic shift is in effect for a resource when there is more than one active traffic shift. There can be more than one application traffic shift in progress at the same time - that is, practice run zonal shifts, customer-initiated zonal shifts, or an autoshift. The appliedStatus field for a shift that is in progress for a resource can have one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift that is currently in effect for the resource has an appliedStatus set to APPLIED.

+ ///

The overall principle for precedence is that zonal shifts that you start as a customer take precedence autoshifts, which take precedence over practice runs. That is, customer-initiated zonal shifts > autoshifts > practice run zonal shifts.

///

For more information, see How zonal autoshift and practice runs work in the Amazon Route 53 Application Recovery Controller Developer Guide.

pub fn set_applied_status(mut self, input: ::std::option::Option) -> Self { self.applied_status = input; self } - ///

The appliedStatus field specifies which application traffic shift is in effect for a resource when there is more than one traffic shift active. There can be more than one application traffic shift in progress at the same time - that is, practice run zonal shifts, customer-started zonal shifts, or an autoshift. The appliedStatus field for an autoshift for a resource can have one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift that is currently in effect for the resource has an applied status set to APPLIED.

- ///

The overall principle for precedence is that zonal shifts that you start as a customer take precedence autoshifts, which take precedence over practice runs. That is, customer-started zonal shifts > autoshifts > practice run zonal shifts.

+ ///

The appliedStatus field specifies which application traffic shift is in effect for a resource when there is more than one active traffic shift. There can be more than one application traffic shift in progress at the same time - that is, practice run zonal shifts, customer-initiated zonal shifts, or an autoshift. The appliedStatus field for a shift that is in progress for a resource can have one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift that is currently in effect for the resource has an appliedStatus set to APPLIED.

+ ///

The overall principle for precedence is that zonal shifts that you start as a customer take precedence autoshifts, which take precedence over practice runs. That is, customer-initiated zonal shifts > autoshifts > practice run zonal shifts.

///

For more information, see How zonal autoshift and practice runs work in the Amazon Route 53 Application Recovery Controller Developer Guide.

pub fn get_applied_status(&self) -> &::std::option::Option { &self.applied_status } - ///

The Availability Zone that traffic is shifted away from for a resource, when Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region. An autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when you disable zonal autoshift for the resource.

+ ///

The Availability Zone (for example, use1-az1) that traffic is shifted away from for a resource, when Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region. An autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when you disable zonal autoshift for the resource.

/// This field is required. pub fn away_from(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.away_from = ::std::option::Option::Some(input.into()); self } - ///

The Availability Zone that traffic is shifted away from for a resource, when Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region. An autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when you disable zonal autoshift for the resource.

+ ///

The Availability Zone (for example, use1-az1) that traffic is shifted away from for a resource, when Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region. An autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when you disable zonal autoshift for the resource.

pub fn set_away_from(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.away_from = input; self } - ///

The Availability Zone that traffic is shifted away from for a resource, when Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region. An autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when you disable zonal autoshift for the resource.

+ ///

The Availability Zone (for example, use1-az1) that traffic is shifted away from for a resource, when Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region. An autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when you disable zonal autoshift for the resource.

pub fn get_away_from(&self) -> &::std::option::Option<::std::string::String> { &self.away_from } diff --git a/sdk/arczonalshift/src/types/_autoshift_observer_notification_status.rs b/sdk/arczonalshift/src/types/_autoshift_observer_notification_status.rs new file mode 100644 index 000000000000..2db69780afc6 --- /dev/null +++ b/sdk/arczonalshift/src/types/_autoshift_observer_notification_status.rs @@ -0,0 +1,107 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// When writing a match expression against `AutoshiftObserverNotificationStatus`, it is important to ensure +/// your code is forward-compatible. That is, if a match arm handles a case for a +/// feature that is supported by the service but has not been represented as an enum +/// variant in a current version of SDK, your code should continue to work when you +/// upgrade SDK to a future version in which the enum does include a variant for that +/// feature. +/// +/// Here is an example of how you can make a match expression forward-compatible: +/// +/// ```text +/// # let autoshiftobservernotificationstatus = unimplemented!(); +/// match autoshiftobservernotificationstatus { +/// AutoshiftObserverNotificationStatus::Disabled => { /* ... */ }, +/// AutoshiftObserverNotificationStatus::Enabled => { /* ... */ }, +/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, +/// _ => { /* ... */ }, +/// } +/// ``` +/// The above code demonstrates that when `autoshiftobservernotificationstatus` represents +/// `NewFeature`, the execution path will lead to the second last match arm, +/// even though the enum does not contain a variant `AutoshiftObserverNotificationStatus::NewFeature` +/// in the current version of SDK. The reason is that the variable `other`, +/// created by the `@` operator, is bound to +/// `AutoshiftObserverNotificationStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))` +/// and calling `as_str` on it yields `"NewFeature"`. +/// This match expression is forward-compatible when executed with a newer +/// version of SDK where the variant `AutoshiftObserverNotificationStatus::NewFeature` is defined. +/// Specifically, when `autoshiftobservernotificationstatus` represents `NewFeature`, +/// the execution path will hit the second last match arm as before by virtue of +/// calling `as_str` on `AutoshiftObserverNotificationStatus::NewFeature` also yielding `"NewFeature"`. +/// +/// Explicitly matching on the `Unknown` variant should +/// be avoided for two reasons: +/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted. +/// - It might inadvertently shadow other intended match arms. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash, +)] +pub enum AutoshiftObserverNotificationStatus { + #[allow(missing_docs)] // documentation missing in model + Disabled, + #[allow(missing_docs)] // documentation missing in model + Enabled, + /// `Unknown` contains new variants that have been added since this code was generated. + #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")] + Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), +} +impl ::std::convert::From<&str> for AutoshiftObserverNotificationStatus { + fn from(s: &str) -> Self { + match s { + "DISABLED" => AutoshiftObserverNotificationStatus::Disabled, + "ENABLED" => AutoshiftObserverNotificationStatus::Enabled, + other => AutoshiftObserverNotificationStatus::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), + } + } +} +impl ::std::str::FromStr for AutoshiftObserverNotificationStatus { + type Err = ::std::convert::Infallible; + + fn from_str(s: &str) -> ::std::result::Result::Err> { + ::std::result::Result::Ok(AutoshiftObserverNotificationStatus::from(s)) + } +} +impl AutoshiftObserverNotificationStatus { + /// Returns the `&str` value of the enum member. + pub fn as_str(&self) -> &str { + match self { + AutoshiftObserverNotificationStatus::Disabled => "DISABLED", + AutoshiftObserverNotificationStatus::Enabled => "ENABLED", + AutoshiftObserverNotificationStatus::Unknown(value) => value.as_str(), + } + } + /// Returns all the `&str` representations of the enum members. + pub const fn values() -> &'static [&'static str] { + &["DISABLED", "ENABLED"] + } +} +impl ::std::convert::AsRef for AutoshiftObserverNotificationStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl AutoshiftObserverNotificationStatus { + /// Parses the enum value while disallowing unknown variants. + /// + /// Unknown variants will result in an error. + pub fn try_parse(value: &str) -> ::std::result::Result { + match Self::from(value) { + #[allow(deprecated)] + Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)), + known => Ok(known), + } + } +} +impl ::std::fmt::Display for AutoshiftObserverNotificationStatus { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + AutoshiftObserverNotificationStatus::Disabled => write!(f, "DISABLED"), + AutoshiftObserverNotificationStatus::Enabled => write!(f, "ENABLED"), + AutoshiftObserverNotificationStatus::Unknown(value) => write!(f, "{}", value), + } + } +} diff --git a/sdk/arczonalshift/src/types/_autoshift_summary.rs b/sdk/arczonalshift/src/types/_autoshift_summary.rs index f271de7c555f..fd8e9d8fbc40 100644 --- a/sdk/arczonalshift/src/types/_autoshift_summary.rs +++ b/sdk/arczonalshift/src/types/_autoshift_summary.rs @@ -6,7 +6,7 @@ #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct AutoshiftSummary { - ///

The Availability Zone that traffic is shifted away from for a resource when Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region. An autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when you disable zonal autoshift for the resource.

+ ///

The Availability Zone (for example, use1-az1) that traffic is shifted away from for a resource when Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region. An autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when you disable zonal autoshift for the resource.

pub away_from: ::std::string::String, ///

The time (in UTC) when the autoshift ended.

pub end_time: ::aws_smithy_types::DateTime, @@ -16,7 +16,7 @@ pub struct AutoshiftSummary { pub status: crate::types::AutoshiftExecutionStatus, } impl AutoshiftSummary { - ///

The Availability Zone that traffic is shifted away from for a resource when Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region. An autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when you disable zonal autoshift for the resource.

+ ///

The Availability Zone (for example, use1-az1) that traffic is shifted away from for a resource when Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region. An autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when you disable zonal autoshift for the resource.

pub fn away_from(&self) -> &str { use std::ops::Deref; self.away_from.deref() @@ -51,18 +51,18 @@ pub struct AutoshiftSummaryBuilder { pub(crate) status: ::std::option::Option, } impl AutoshiftSummaryBuilder { - ///

The Availability Zone that traffic is shifted away from for a resource when Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region. An autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when you disable zonal autoshift for the resource.

+ ///

The Availability Zone (for example, use1-az1) that traffic is shifted away from for a resource when Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region. An autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when you disable zonal autoshift for the resource.

/// This field is required. pub fn away_from(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.away_from = ::std::option::Option::Some(input.into()); self } - ///

The Availability Zone that traffic is shifted away from for a resource when Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region. An autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when you disable zonal autoshift for the resource.

+ ///

The Availability Zone (for example, use1-az1) that traffic is shifted away from for a resource when Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region. An autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when you disable zonal autoshift for the resource.

pub fn set_away_from(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.away_from = input; self } - ///

The Availability Zone that traffic is shifted away from for a resource when Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region. An autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when you disable zonal autoshift for the resource.

+ ///

The Availability Zone (for example, use1-az1) that traffic is shifted away from for a resource when Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for the resource is instead directed to other Availability Zones in the Amazon Web Services Region. An autoshift can end for a resource, for example, when Amazon Web Services ends the autoshift for the Availability Zone or when you disable zonal autoshift for the resource.

pub fn get_away_from(&self) -> &::std::option::Option<::std::string::String> { &self.away_from } diff --git a/sdk/arczonalshift/src/types/_control_condition.rs b/sdk/arczonalshift/src/types/_control_condition.rs index aad342c9300a..85c701c2b15c 100644 --- a/sdk/arczonalshift/src/types/_control_condition.rs +++ b/sdk/arczonalshift/src/types/_control_condition.rs @@ -1,22 +1,22 @@ // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -///

A control condition is an alarm that you specify for a practice run. When you configure practice runs with zonal autoshift for a resource, you specify Amazon CloudWatch alarms, which you create in CloudWatch to use with the practice run. The alarms that you specify are an outcome alarm, to monitor application health during practice runs and, optionally, a blocking alarm, to block practice runs from starting.

+///

A control condition is an alarm that you specify for a practice run. When you configure practice runs with zonal autoshift for a resource, you specify Amazon CloudWatch alarms, which you create in CloudWatch to use with the practice run. The alarms that you specify are an outcome alarm, to monitor application health during practice runs and, optionally, a blocking alarm, to block practice runs from starting or to interrupt a practice run in progress.

///

Control condition alarms do not apply for autoshifts.

///

For more information, see Considerations when you configure zonal autoshift in the Amazon Route 53 Application Recovery Controller Developer Guide.

#[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct ControlCondition { - ///

The type of alarm specified for a practice run. The only valid value is CLOUDWATCH.

+ ///

The type of alarm specified for a practice run. You can only specify Amazon CloudWatch alarms for practice runs, so the only valid value is CLOUDWATCH.

pub r#type: crate::types::ControlConditionType, - ///

The Amazon Resource Name (ARN) for the Amazon CloudWatch alarm that you specify as a control condition for a practice run.

+ ///

The Amazon Resource Name (ARN) for an Amazon CloudWatch alarm that you specify as a control condition for a practice run.

pub alarm_identifier: ::std::string::String, } impl ControlCondition { - ///

The type of alarm specified for a practice run. The only valid value is CLOUDWATCH.

+ ///

The type of alarm specified for a practice run. You can only specify Amazon CloudWatch alarms for practice runs, so the only valid value is CLOUDWATCH.

pub fn r#type(&self) -> &crate::types::ControlConditionType { &self.r#type } - ///

The Amazon Resource Name (ARN) for the Amazon CloudWatch alarm that you specify as a control condition for a practice run.

+ ///

The Amazon Resource Name (ARN) for an Amazon CloudWatch alarm that you specify as a control condition for a practice run.

pub fn alarm_identifier(&self) -> &str { use std::ops::Deref; self.alarm_identifier.deref() @@ -37,33 +37,33 @@ pub struct ControlConditionBuilder { pub(crate) alarm_identifier: ::std::option::Option<::std::string::String>, } impl ControlConditionBuilder { - ///

The type of alarm specified for a practice run. The only valid value is CLOUDWATCH.

+ ///

The type of alarm specified for a practice run. You can only specify Amazon CloudWatch alarms for practice runs, so the only valid value is CLOUDWATCH.

/// This field is required. pub fn r#type(mut self, input: crate::types::ControlConditionType) -> Self { self.r#type = ::std::option::Option::Some(input); self } - ///

The type of alarm specified for a practice run. The only valid value is CLOUDWATCH.

+ ///

The type of alarm specified for a practice run. You can only specify Amazon CloudWatch alarms for practice runs, so the only valid value is CLOUDWATCH.

pub fn set_type(mut self, input: ::std::option::Option) -> Self { self.r#type = input; self } - ///

The type of alarm specified for a practice run. The only valid value is CLOUDWATCH.

+ ///

The type of alarm specified for a practice run. You can only specify Amazon CloudWatch alarms for practice runs, so the only valid value is CLOUDWATCH.

pub fn get_type(&self) -> &::std::option::Option { &self.r#type } - ///

The Amazon Resource Name (ARN) for the Amazon CloudWatch alarm that you specify as a control condition for a practice run.

+ ///

The Amazon Resource Name (ARN) for an Amazon CloudWatch alarm that you specify as a control condition for a practice run.

/// This field is required. pub fn alarm_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.alarm_identifier = ::std::option::Option::Some(input.into()); self } - ///

The Amazon Resource Name (ARN) for the Amazon CloudWatch alarm that you specify as a control condition for a practice run.

+ ///

The Amazon Resource Name (ARN) for an Amazon CloudWatch alarm that you specify as a control condition for a practice run.

pub fn set_alarm_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.alarm_identifier = input; self } - ///

The Amazon Resource Name (ARN) for the Amazon CloudWatch alarm that you specify as a control condition for a practice run.

+ ///

The Amazon Resource Name (ARN) for an Amazon CloudWatch alarm that you specify as a control condition for a practice run.

pub fn get_alarm_identifier(&self) -> &::std::option::Option<::std::string::String> { &self.alarm_identifier } diff --git a/sdk/arczonalshift/src/types/_practice_run_configuration.rs b/sdk/arczonalshift/src/types/_practice_run_configuration.rs index 19e597340641..997135defc51 100644 --- a/sdk/arczonalshift/src/types/_practice_run_configuration.rs +++ b/sdk/arczonalshift/src/types/_practice_run_configuration.rs @@ -1,6 +1,7 @@ // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -///

A practice run configuration for a resource includes the Amazon CloudWatch alarms that you've specified for a practice run, as well as any blocked dates or blocked windows for the practice run.

+///

A practice run configuration for a resource includes the Amazon CloudWatch alarms that you've specified for a practice run, as well as any blocked dates or blocked windows for the practice run. When a resource has a practice run configuration, Route 53 ARC shifts traffic for the resource weekly for practice runs.

+///

Practice runs are required for zonal autoshift. The zonal shifts that Route 53 ARC starts for practice runs help you to ensure that shifting away traffic from an Availability Zone during an autoshift is safe for your application.

///

You can update or delete a practice run configuration. Before you delete a practice run configuration, you must disable zonal autoshift for the resource. A practice run configuration is required when zonal autoshift is enabled.

#[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] diff --git a/sdk/arczonalshift/src/types/_zonal_shift_in_resource.rs b/sdk/arczonalshift/src/types/_zonal_shift_in_resource.rs index 05f850b4e0f5..89cf2b02b68f 100644 --- a/sdk/arczonalshift/src/types/_zonal_shift_in_resource.rs +++ b/sdk/arczonalshift/src/types/_zonal_shift_in_resource.rs @@ -4,8 +4,8 @@ #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct ZonalShiftInResource { - ///

The appliedStatus field specifies which application traffic shift is in effect for a resource when there is more than one traffic shift active. There can be more than one application traffic shift in progress at the same time - that is, practice run zonal shifts, customer-started zonal shifts, or an autoshift. The appliedStatus field for an autoshift for a resource can have one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift that is currently in effect for the resource has an applied status set to APPLIED.

- ///

The overall principle for precedence is that zonal shifts that you start as a customer take precedence autoshifts, which take precedence over practice runs. That is, customer-started zonal shifts > autoshifts > practice run zonal shifts.

+ ///

The appliedStatus field specifies which application traffic shift is in effect for a resource when there is more than one active traffic shift. There can be more than one application traffic shift in progress at the same time - that is, practice run zonal shifts, customer-initiated zonal shifts, or an autoshift. The appliedStatus field for a shift that is in progress for a resource can have one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift that is currently in effect for the resource has an appliedStatus set to APPLIED.

+ ///

The overall principle for precedence is that zonal shifts that you start as a customer take precedence autoshifts, which take precedence over practice runs. That is, customer-initiated zonal shifts > autoshifts > practice run zonal shifts.

///

For more information, see How zonal autoshift and practice runs work in the Amazon Route 53 Application Recovery Controller Developer Guide.

pub applied_status: crate::types::AppliedStatus, ///

The identifier of a zonal shift.

@@ -13,14 +13,14 @@ pub struct ZonalShiftInResource { ///

The identifier for the resource to include in a zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

///

At this time, you can only start a zonal shift for Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

pub resource_identifier: ::std::string::String, - ///

The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

+ ///

The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

pub away_from: ::std::string::String, - ///

The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

+ ///

The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

///

When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

pub expiry_time: ::aws_smithy_types::DateTime, ///

The time (UTC) when the zonal shift starts.

pub start_time: ::aws_smithy_types::DateTime, - ///

A comment that you enter about the zonal shift. Only the latest comment is retained; no comment history is maintained. That is, a new comment overwrites any existing comment string.

+ ///

A comment that you enter for a customer-initiated zonal shift. Only the latest comment is retained; no comment history is maintained. That is, a new comment overwrites any existing comment string.

pub comment: ::std::string::String, ///

The outcome, or end state, returned for a practice run. The following values can be returned:

///
    @@ -37,8 +37,8 @@ pub struct ZonalShiftInResource { pub practice_run_outcome: ::std::option::Option, } impl ZonalShiftInResource { - ///

    The appliedStatus field specifies which application traffic shift is in effect for a resource when there is more than one traffic shift active. There can be more than one application traffic shift in progress at the same time - that is, practice run zonal shifts, customer-started zonal shifts, or an autoshift. The appliedStatus field for an autoshift for a resource can have one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift that is currently in effect for the resource has an applied status set to APPLIED.

    - ///

    The overall principle for precedence is that zonal shifts that you start as a customer take precedence autoshifts, which take precedence over practice runs. That is, customer-started zonal shifts > autoshifts > practice run zonal shifts.

    + ///

    The appliedStatus field specifies which application traffic shift is in effect for a resource when there is more than one active traffic shift. There can be more than one application traffic shift in progress at the same time - that is, practice run zonal shifts, customer-initiated zonal shifts, or an autoshift. The appliedStatus field for a shift that is in progress for a resource can have one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift that is currently in effect for the resource has an appliedStatus set to APPLIED.

    + ///

    The overall principle for precedence is that zonal shifts that you start as a customer take precedence autoshifts, which take precedence over practice runs. That is, customer-initiated zonal shifts > autoshifts > practice run zonal shifts.

    ///

    For more information, see How zonal autoshift and practice runs work in the Amazon Route 53 Application Recovery Controller Developer Guide.

    pub fn applied_status(&self) -> &crate::types::AppliedStatus { &self.applied_status @@ -54,12 +54,12 @@ impl ZonalShiftInResource { use std::ops::Deref; self.resource_identifier.deref() } - ///

    The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

    + ///

    The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

    pub fn away_from(&self) -> &str { use std::ops::Deref; self.away_from.deref() } - ///

    The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

    + ///

    The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

    ///

    When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

    pub fn expiry_time(&self) -> &::aws_smithy_types::DateTime { &self.expiry_time @@ -68,7 +68,7 @@ impl ZonalShiftInResource { pub fn start_time(&self) -> &::aws_smithy_types::DateTime { &self.start_time } - ///

    A comment that you enter about the zonal shift. Only the latest comment is retained; no comment history is maintained. That is, a new comment overwrites any existing comment string.

    + ///

    A comment that you enter for a customer-initiated zonal shift. Only the latest comment is retained; no comment history is maintained. That is, a new comment overwrites any existing comment string.

    pub fn comment(&self) -> &str { use std::ops::Deref; self.comment.deref() @@ -110,23 +110,23 @@ pub struct ZonalShiftInResourceBuilder { pub(crate) practice_run_outcome: ::std::option::Option, } impl ZonalShiftInResourceBuilder { - ///

    The appliedStatus field specifies which application traffic shift is in effect for a resource when there is more than one traffic shift active. There can be more than one application traffic shift in progress at the same time - that is, practice run zonal shifts, customer-started zonal shifts, or an autoshift. The appliedStatus field for an autoshift for a resource can have one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift that is currently in effect for the resource has an applied status set to APPLIED.

    - ///

    The overall principle for precedence is that zonal shifts that you start as a customer take precedence autoshifts, which take precedence over practice runs. That is, customer-started zonal shifts > autoshifts > practice run zonal shifts.

    + ///

    The appliedStatus field specifies which application traffic shift is in effect for a resource when there is more than one active traffic shift. There can be more than one application traffic shift in progress at the same time - that is, practice run zonal shifts, customer-initiated zonal shifts, or an autoshift. The appliedStatus field for a shift that is in progress for a resource can have one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift that is currently in effect for the resource has an appliedStatus set to APPLIED.

    + ///

    The overall principle for precedence is that zonal shifts that you start as a customer take precedence autoshifts, which take precedence over practice runs. That is, customer-initiated zonal shifts > autoshifts > practice run zonal shifts.

    ///

    For more information, see How zonal autoshift and practice runs work in the Amazon Route 53 Application Recovery Controller Developer Guide.

    /// This field is required. pub fn applied_status(mut self, input: crate::types::AppliedStatus) -> Self { self.applied_status = ::std::option::Option::Some(input); self } - ///

    The appliedStatus field specifies which application traffic shift is in effect for a resource when there is more than one traffic shift active. There can be more than one application traffic shift in progress at the same time - that is, practice run zonal shifts, customer-started zonal shifts, or an autoshift. The appliedStatus field for an autoshift for a resource can have one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift that is currently in effect for the resource has an applied status set to APPLIED.

    - ///

    The overall principle for precedence is that zonal shifts that you start as a customer take precedence autoshifts, which take precedence over practice runs. That is, customer-started zonal shifts > autoshifts > practice run zonal shifts.

    + ///

    The appliedStatus field specifies which application traffic shift is in effect for a resource when there is more than one active traffic shift. There can be more than one application traffic shift in progress at the same time - that is, practice run zonal shifts, customer-initiated zonal shifts, or an autoshift. The appliedStatus field for a shift that is in progress for a resource can have one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift that is currently in effect for the resource has an appliedStatus set to APPLIED.

    + ///

    The overall principle for precedence is that zonal shifts that you start as a customer take precedence autoshifts, which take precedence over practice runs. That is, customer-initiated zonal shifts > autoshifts > practice run zonal shifts.

    ///

    For more information, see How zonal autoshift and practice runs work in the Amazon Route 53 Application Recovery Controller Developer Guide.

    pub fn set_applied_status(mut self, input: ::std::option::Option) -> Self { self.applied_status = input; self } - ///

    The appliedStatus field specifies which application traffic shift is in effect for a resource when there is more than one traffic shift active. There can be more than one application traffic shift in progress at the same time - that is, practice run zonal shifts, customer-started zonal shifts, or an autoshift. The appliedStatus field for an autoshift for a resource can have one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift that is currently in effect for the resource has an applied status set to APPLIED.

    - ///

    The overall principle for precedence is that zonal shifts that you start as a customer take precedence autoshifts, which take precedence over practice runs. That is, customer-started zonal shifts > autoshifts > practice run zonal shifts.

    + ///

    The appliedStatus field specifies which application traffic shift is in effect for a resource when there is more than one active traffic shift. There can be more than one application traffic shift in progress at the same time - that is, practice run zonal shifts, customer-initiated zonal shifts, or an autoshift. The appliedStatus field for a shift that is in progress for a resource can have one of two values: APPLIED or NOT_APPLIED. The zonal shift or autoshift that is currently in effect for the resource has an appliedStatus set to APPLIED.

    + ///

    The overall principle for precedence is that zonal shifts that you start as a customer take precedence autoshifts, which take precedence over practice runs. That is, customer-initiated zonal shifts > autoshifts > practice run zonal shifts.

    ///

    For more information, see How zonal autoshift and practice runs work in the Amazon Route 53 Application Recovery Controller Developer Guide.

    pub fn get_applied_status(&self) -> &::std::option::Option { &self.applied_status @@ -164,35 +164,35 @@ impl ZonalShiftInResourceBuilder { pub fn get_resource_identifier(&self) -> &::std::option::Option<::std::string::String> { &self.resource_identifier } - ///

    The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

    + ///

    The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

    /// This field is required. pub fn away_from(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.away_from = ::std::option::Option::Some(input.into()); self } - ///

    The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

    + ///

    The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

    pub fn set_away_from(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.away_from = input; self } - ///

    The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

    + ///

    The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

    pub fn get_away_from(&self) -> &::std::option::Option<::std::string::String> { &self.away_from } - ///

    The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

    + ///

    The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

    ///

    When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

    /// This field is required. pub fn expiry_time(mut self, input: ::aws_smithy_types::DateTime) -> Self { self.expiry_time = ::std::option::Option::Some(input); self } - ///

    The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

    + ///

    The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

    ///

    When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

    pub fn set_expiry_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { self.expiry_time = input; self } - ///

    The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

    + ///

    The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

    ///

    When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

    pub fn get_expiry_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { &self.expiry_time @@ -212,18 +212,18 @@ impl ZonalShiftInResourceBuilder { pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { &self.start_time } - ///

    A comment that you enter about the zonal shift. Only the latest comment is retained; no comment history is maintained. That is, a new comment overwrites any existing comment string.

    + ///

    A comment that you enter for a customer-initiated zonal shift. Only the latest comment is retained; no comment history is maintained. That is, a new comment overwrites any existing comment string.

    /// This field is required. pub fn comment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.comment = ::std::option::Option::Some(input.into()); self } - ///

    A comment that you enter about the zonal shift. Only the latest comment is retained; no comment history is maintained. That is, a new comment overwrites any existing comment string.

    + ///

    A comment that you enter for a customer-initiated zonal shift. Only the latest comment is retained; no comment history is maintained. That is, a new comment overwrites any existing comment string.

    pub fn set_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.comment = input; self } - ///

    A comment that you enter about the zonal shift. Only the latest comment is retained; no comment history is maintained. That is, a new comment overwrites any existing comment string.

    + ///

    A comment that you enter for a customer-initiated zonal shift. Only the latest comment is retained; no comment history is maintained. That is, a new comment overwrites any existing comment string.

    pub fn get_comment(&self) -> &::std::option::Option<::std::string::String> { &self.comment } diff --git a/sdk/arczonalshift/src/types/_zonal_shift_summary.rs b/sdk/arczonalshift/src/types/_zonal_shift_summary.rs index 3dec385f4d1f..4b0a85a01178 100644 --- a/sdk/arczonalshift/src/types/_zonal_shift_summary.rs +++ b/sdk/arczonalshift/src/types/_zonal_shift_summary.rs @@ -1,7 +1,7 @@ // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. ///

    Lists information about zonal shifts in Amazon Route 53 Application Recovery Controller, including zonal shifts that you start yourself and zonal shifts that Route 53 ARC starts on your behalf for practice runs with zonal autoshift.

    -///

    Zonal shifts are temporary, including customer-started zonal shifts and the zonal autoshift practice run zonal shifts that Route 53 ARC starts weekly, on your behalf. A zonal shift that a customer starts can be active for up to three days (72 hours). A practice run zonal shift has a 30 minute duration.

    +///

    Zonal shifts are temporary, including customer-initiated zonal shifts and the zonal autoshift practice run zonal shifts that Route 53 ARC starts weekly, on your behalf. A zonal shift that a customer starts can be active for up to three days (72 hours). A practice run zonal shift has a 30 minute duration.

    #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct ZonalShiftSummary { @@ -10,9 +10,9 @@ pub struct ZonalShiftSummary { ///

    The identifier for the resource to include in a zonal shift. The identifier is the Amazon Resource Name (ARN) for the resource.

    ///

    At this time, you can only start a zonal shift for Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.

    pub resource_identifier: ::std::string::String, - ///

    The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

    + ///

    The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

    pub away_from: ::std::string::String, - ///

    The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

    + ///

    The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

    ///

    When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

    pub expiry_time: ::aws_smithy_types::DateTime, ///

    The time (UTC) when the zonal shift starts.

    @@ -56,12 +56,12 @@ impl ZonalShiftSummary { use std::ops::Deref; self.resource_identifier.deref() } - ///

    The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

    + ///

    The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

    pub fn away_from(&self) -> &str { use std::ops::Deref; self.away_from.deref() } - ///

    The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

    + ///

    The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

    ///

    When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

    pub fn expiry_time(&self) -> &::aws_smithy_types::DateTime { &self.expiry_time @@ -158,35 +158,35 @@ impl ZonalShiftSummaryBuilder { pub fn get_resource_identifier(&self) -> &::std::option::Option<::std::string::String> { &self.resource_identifier } - ///

    The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

    + ///

    The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

    /// This field is required. pub fn away_from(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.away_from = ::std::option::Option::Some(input.into()); self } - ///

    The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

    + ///

    The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

    pub fn set_away_from(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.away_from = input; self } - ///

    The Availability Zone that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

    + ///

    The Availability Zone (for example, use1-az1) that traffic is moved away from for a resource when you start a zonal shift. Until the zonal shift expires or you cancel it, traffic for the resource is instead moved to other Availability Zones in the Amazon Web Services Region.

    pub fn get_away_from(&self) -> &::std::option::Option<::std::string::String> { &self.away_from } - ///

    The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

    + ///

    The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

    ///

    When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

    /// This field is required. pub fn expiry_time(mut self, input: ::aws_smithy_types::DateTime) -> Self { self.expiry_time = ::std::option::Option::Some(input); self } - ///

    The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

    + ///

    The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

    ///

    When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

    pub fn set_expiry_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { self.expiry_time = input; self } - ///

    The expiry time (expiration time) for a customer-started zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

    + ///

    The expiry time (expiration time) for a customer-initiated zonal shift. A zonal shift is temporary and must be set to expire when you start the zonal shift. You can initially set a zonal shift to expire in a maximum of three days (72 hours). However, you can update a zonal shift to set a new expiration at any time.

    ///

    When you start a zonal shift, you specify how long you want it to be active, which Route 53 ARC converts to an expiry time (expiration time). You can cancel a zonal shift when you're ready to restore traffic to the Availability Zone, or just wait for it to expire. Or you can update the zonal shift to specify another length of time to expire in.

    pub fn get_expiry_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { &self.expiry_time diff --git a/sdk/globalaccelerator/src/error_meta.rs b/sdk/globalaccelerator/src/error_meta.rs index eaa25db40012..a53dc3648fba 100644 --- a/sdk/globalaccelerator/src/error_meta.rs +++ b/sdk/globalaccelerator/src/error_meta.rs @@ -276,11 +276,15 @@ where impl From for Error { fn from(err: crate::operation::create_accelerator::CreateAcceleratorError) -> Self { match err { + crate::operation::create_accelerator::CreateAcceleratorError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), crate::operation::create_accelerator::CreateAcceleratorError::InternalServiceErrorException(inner) => { Error::InternalServiceErrorException(inner) } crate::operation::create_accelerator::CreateAcceleratorError::InvalidArgumentException(inner) => Error::InvalidArgumentException(inner), crate::operation::create_accelerator::CreateAcceleratorError::LimitExceededException(inner) => Error::LimitExceededException(inner), + crate::operation::create_accelerator::CreateAcceleratorError::TransactionInProgressException(inner) => { + Error::TransactionInProgressException(inner) + } crate::operation::create_accelerator::CreateAcceleratorError::Unhandled(inner) => Error::Unhandled(inner), } } @@ -368,6 +372,9 @@ impl From { Error::LimitExceededException(inner) } + crate::operation::create_custom_routing_accelerator::CreateCustomRoutingAcceleratorError::TransactionInProgressException(inner) => { + Error::TransactionInProgressException(inner) + } crate::operation::create_custom_routing_accelerator::CreateCustomRoutingAcceleratorError::Unhandled(inner) => Error::Unhandled(inner), } } @@ -569,6 +576,9 @@ impl From for Erro Error::InternalServiceErrorException(inner) } crate::operation::delete_accelerator::DeleteAcceleratorError::InvalidArgumentException(inner) => Error::InvalidArgumentException(inner), + crate::operation::delete_accelerator::DeleteAcceleratorError::TransactionInProgressException(inner) => { + Error::TransactionInProgressException(inner) + } crate::operation::delete_accelerator::DeleteAcceleratorError::Unhandled(inner) => Error::Unhandled(inner), } } @@ -659,6 +669,9 @@ impl From { Error::InvalidArgumentException(inner) } + crate::operation::delete_custom_routing_accelerator::DeleteCustomRoutingAcceleratorError::TransactionInProgressException(inner) => { + Error::TransactionInProgressException(inner) + } crate::operation::delete_custom_routing_accelerator::DeleteCustomRoutingAcceleratorError::Unhandled(inner) => Error::Unhandled(inner), } } @@ -1649,12 +1662,21 @@ impl From fo crate::operation::list_tags_for_resource::ListTagsForResourceError::AcceleratorNotFoundException(inner) => { Error::AcceleratorNotFoundException(inner) } + crate::operation::list_tags_for_resource::ListTagsForResourceError::AttachmentNotFoundException(inner) => { + Error::AttachmentNotFoundException(inner) + } + crate::operation::list_tags_for_resource::ListTagsForResourceError::EndpointGroupNotFoundException(inner) => { + Error::EndpointGroupNotFoundException(inner) + } crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServiceErrorException(inner) => { Error::InternalServiceErrorException(inner) } crate::operation::list_tags_for_resource::ListTagsForResourceError::InvalidArgumentException(inner) => { Error::InvalidArgumentException(inner) } + crate::operation::list_tags_for_resource::ListTagsForResourceError::ListenerNotFoundException(inner) => { + Error::ListenerNotFoundException(inner) + } crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner), } } @@ -1838,10 +1860,14 @@ impl From for Erro Error::AcceleratorNotFoundException(inner) } crate::operation::update_accelerator::UpdateAcceleratorError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), + crate::operation::update_accelerator::UpdateAcceleratorError::ConflictException(inner) => Error::ConflictException(inner), crate::operation::update_accelerator::UpdateAcceleratorError::InternalServiceErrorException(inner) => { Error::InternalServiceErrorException(inner) } crate::operation::update_accelerator::UpdateAcceleratorError::InvalidArgumentException(inner) => Error::InvalidArgumentException(inner), + crate::operation::update_accelerator::UpdateAcceleratorError::TransactionInProgressException(inner) => { + Error::TransactionInProgressException(inner) + } crate::operation::update_accelerator::UpdateAcceleratorError::Unhandled(inner) => Error::Unhandled(inner), } } @@ -1878,6 +1904,9 @@ impl From { Error::InvalidArgumentException(inner) } + crate::operation::update_accelerator_attributes::UpdateAcceleratorAttributesError::TransactionInProgressException(inner) => { + Error::TransactionInProgressException(inner) + } crate::operation::update_accelerator_attributes::UpdateAcceleratorAttributesError::Unhandled(inner) => Error::Unhandled(inner), } } @@ -1959,12 +1988,18 @@ impl From { Error::AcceleratorNotFoundException(inner) } + crate::operation::update_custom_routing_accelerator::UpdateCustomRoutingAcceleratorError::ConflictException(inner) => { + Error::ConflictException(inner) + } crate::operation::update_custom_routing_accelerator::UpdateCustomRoutingAcceleratorError::InternalServiceErrorException(inner) => { Error::InternalServiceErrorException(inner) } crate::operation::update_custom_routing_accelerator::UpdateCustomRoutingAcceleratorError::InvalidArgumentException(inner) => { Error::InvalidArgumentException(inner) } + crate::operation::update_custom_routing_accelerator::UpdateCustomRoutingAcceleratorError::TransactionInProgressException(inner) => { + Error::TransactionInProgressException(inner) + } crate::operation::update_custom_routing_accelerator::UpdateCustomRoutingAcceleratorError::Unhandled(inner) => Error::Unhandled(inner), } } @@ -2001,6 +2036,7 @@ impl From Error::AccessDeniedException(inner), crate::operation::update_custom_routing_accelerator_attributes::UpdateCustomRoutingAcceleratorAttributesError::InternalServiceErrorException(inner) => Error::InternalServiceErrorException(inner), crate::operation::update_custom_routing_accelerator_attributes::UpdateCustomRoutingAcceleratorAttributesError::InvalidArgumentException(inner) => Error::InvalidArgumentException(inner), + crate::operation::update_custom_routing_accelerator_attributes::UpdateCustomRoutingAcceleratorAttributesError::TransactionInProgressException(inner) => Error::TransactionInProgressException(inner), crate::operation::update_custom_routing_accelerator_attributes::UpdateCustomRoutingAcceleratorAttributesError::Unhandled(inner) => Error::Unhandled(inner), } } diff --git a/sdk/globalaccelerator/src/operation/create_accelerator.rs b/sdk/globalaccelerator/src/operation/create_accelerator.rs index 67281a605b14..e528b324ef4a 100644 --- a/sdk/globalaccelerator/src/operation/create_accelerator.rs +++ b/sdk/globalaccelerator/src/operation/create_accelerator.rs @@ -260,12 +260,16 @@ impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateAcceler #[non_exhaustive] #[derive(::std::fmt::Debug)] pub enum CreateAcceleratorError { + ///

    You don't have access permission.

    + AccessDeniedException(crate::types::error::AccessDeniedException), ///

    There was an internal error for Global Accelerator.

    InternalServiceErrorException(crate::types::error::InternalServiceErrorException), ///

    An argument that you specified is invalid.

    InvalidArgumentException(crate::types::error::InvalidArgumentException), ///

    Processing your request would cause you to exceed an Global Accelerator limit.

    LimitExceededException(crate::types::error::LimitExceededException), + ///

    There's already a transaction in progress. Another transaction can't be processed.

    + TransactionInProgressException(crate::types::error::TransactionInProgressException), /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ variable wildcard pattern and check `.code()`: @@ -299,12 +303,18 @@ impl CreateAcceleratorError { /// pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { match self { + Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::InternalServiceErrorException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::InvalidArgumentException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::LimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::TransactionInProgressException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::Unhandled(e) => &e.meta, } } + /// Returns `true` if the error kind is `CreateAcceleratorError::AccessDeniedException`. + pub fn is_access_denied_exception(&self) -> bool { + matches!(self, Self::AccessDeniedException(_)) + } /// Returns `true` if the error kind is `CreateAcceleratorError::InternalServiceErrorException`. pub fn is_internal_service_error_exception(&self) -> bool { matches!(self, Self::InternalServiceErrorException(_)) @@ -317,13 +327,19 @@ impl CreateAcceleratorError { pub fn is_limit_exceeded_exception(&self) -> bool { matches!(self, Self::LimitExceededException(_)) } + /// Returns `true` if the error kind is `CreateAcceleratorError::TransactionInProgressException`. + pub fn is_transaction_in_progress_exception(&self) -> bool { + matches!(self, Self::TransactionInProgressException(_)) + } } impl ::std::error::Error for CreateAcceleratorError { fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { match self { + Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), Self::InternalServiceErrorException(_inner) => ::std::option::Option::Some(_inner), Self::InvalidArgumentException(_inner) => ::std::option::Option::Some(_inner), Self::LimitExceededException(_inner) => ::std::option::Option::Some(_inner), + Self::TransactionInProgressException(_inner) => ::std::option::Option::Some(_inner), Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), } } @@ -331,9 +347,11 @@ impl ::std::error::Error for CreateAcceleratorError { impl ::std::fmt::Display for CreateAcceleratorError { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { match self { + Self::AccessDeniedException(_inner) => _inner.fmt(f), Self::InternalServiceErrorException(_inner) => _inner.fmt(f), Self::InvalidArgumentException(_inner) => _inner.fmt(f), Self::LimitExceededException(_inner) => _inner.fmt(f), + Self::TransactionInProgressException(_inner) => _inner.fmt(f), Self::Unhandled(_inner) => { if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { write!(f, "unhandled error ({code})") @@ -355,9 +373,11 @@ impl ::aws_smithy_types::retry::ProvideErrorKind for CreateAcceleratorError { impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CreateAcceleratorError { fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { match self { + Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::InternalServiceErrorException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::InvalidArgumentException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::LimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::TransactionInProgressException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::Unhandled(_inner) => &_inner.meta, } } diff --git a/sdk/globalaccelerator/src/operation/create_custom_routing_accelerator.rs b/sdk/globalaccelerator/src/operation/create_custom_routing_accelerator.rs index be446a3d3c80..8d978d3bb726 100644 --- a/sdk/globalaccelerator/src/operation/create_custom_routing_accelerator.rs +++ b/sdk/globalaccelerator/src/operation/create_custom_routing_accelerator.rs @@ -271,6 +271,8 @@ pub enum CreateCustomRoutingAcceleratorError { InvalidArgumentException(crate::types::error::InvalidArgumentException), ///

    Processing your request would cause you to exceed an Global Accelerator limit.

    LimitExceededException(crate::types::error::LimitExceededException), + ///

    There's already a transaction in progress. Another transaction can't be processed.

    + TransactionInProgressException(crate::types::error::TransactionInProgressException), /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ variable wildcard pattern and check `.code()`: @@ -308,6 +310,7 @@ impl CreateCustomRoutingAcceleratorError { Self::InternalServiceErrorException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::InvalidArgumentException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::LimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::TransactionInProgressException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::Unhandled(e) => &e.meta, } } @@ -327,6 +330,10 @@ impl CreateCustomRoutingAcceleratorError { pub fn is_limit_exceeded_exception(&self) -> bool { matches!(self, Self::LimitExceededException(_)) } + /// Returns `true` if the error kind is `CreateCustomRoutingAcceleratorError::TransactionInProgressException`. + pub fn is_transaction_in_progress_exception(&self) -> bool { + matches!(self, Self::TransactionInProgressException(_)) + } } impl ::std::error::Error for CreateCustomRoutingAcceleratorError { fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { @@ -335,6 +342,7 @@ impl ::std::error::Error for CreateCustomRoutingAcceleratorError { Self::InternalServiceErrorException(_inner) => ::std::option::Option::Some(_inner), Self::InvalidArgumentException(_inner) => ::std::option::Option::Some(_inner), Self::LimitExceededException(_inner) => ::std::option::Option::Some(_inner), + Self::TransactionInProgressException(_inner) => ::std::option::Option::Some(_inner), Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), } } @@ -346,6 +354,7 @@ impl ::std::fmt::Display for CreateCustomRoutingAcceleratorError { Self::InternalServiceErrorException(_inner) => _inner.fmt(f), Self::InvalidArgumentException(_inner) => _inner.fmt(f), Self::LimitExceededException(_inner) => _inner.fmt(f), + Self::TransactionInProgressException(_inner) => _inner.fmt(f), Self::Unhandled(_inner) => { if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { write!(f, "unhandled error ({code})") @@ -371,6 +380,7 @@ impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CreateCustomR Self::InternalServiceErrorException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::InvalidArgumentException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::LimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::TransactionInProgressException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::Unhandled(_inner) => &_inner.meta, } } diff --git a/sdk/globalaccelerator/src/operation/delete_accelerator.rs b/sdk/globalaccelerator/src/operation/delete_accelerator.rs index 78decd0cb5fd..2ce4a24d4bc8 100644 --- a/sdk/globalaccelerator/src/operation/delete_accelerator.rs +++ b/sdk/globalaccelerator/src/operation/delete_accelerator.rs @@ -261,6 +261,8 @@ pub enum DeleteAcceleratorError { InternalServiceErrorException(crate::types::error::InternalServiceErrorException), ///

    An argument that you specified is invalid.

    InvalidArgumentException(crate::types::error::InvalidArgumentException), + ///

    There's already a transaction in progress. Another transaction can't be processed.

    + TransactionInProgressException(crate::types::error::TransactionInProgressException), /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ variable wildcard pattern and check `.code()`: @@ -299,6 +301,7 @@ impl DeleteAcceleratorError { Self::AssociatedListenerFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::InternalServiceErrorException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::InvalidArgumentException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::TransactionInProgressException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::Unhandled(e) => &e.meta, } } @@ -322,6 +325,10 @@ impl DeleteAcceleratorError { pub fn is_invalid_argument_exception(&self) -> bool { matches!(self, Self::InvalidArgumentException(_)) } + /// Returns `true` if the error kind is `DeleteAcceleratorError::TransactionInProgressException`. + pub fn is_transaction_in_progress_exception(&self) -> bool { + matches!(self, Self::TransactionInProgressException(_)) + } } impl ::std::error::Error for DeleteAcceleratorError { fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { @@ -331,6 +338,7 @@ impl ::std::error::Error for DeleteAcceleratorError { Self::AssociatedListenerFoundException(_inner) => ::std::option::Option::Some(_inner), Self::InternalServiceErrorException(_inner) => ::std::option::Option::Some(_inner), Self::InvalidArgumentException(_inner) => ::std::option::Option::Some(_inner), + Self::TransactionInProgressException(_inner) => ::std::option::Option::Some(_inner), Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), } } @@ -343,6 +351,7 @@ impl ::std::fmt::Display for DeleteAcceleratorError { Self::AssociatedListenerFoundException(_inner) => _inner.fmt(f), Self::InternalServiceErrorException(_inner) => _inner.fmt(f), Self::InvalidArgumentException(_inner) => _inner.fmt(f), + Self::TransactionInProgressException(_inner) => _inner.fmt(f), Self::Unhandled(_inner) => { if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { write!(f, "unhandled error ({code})") @@ -369,6 +378,7 @@ impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for DeleteAcceler Self::AssociatedListenerFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::InternalServiceErrorException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::InvalidArgumentException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::TransactionInProgressException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::Unhandled(_inner) => &_inner.meta, } } diff --git a/sdk/globalaccelerator/src/operation/delete_custom_routing_accelerator.rs b/sdk/globalaccelerator/src/operation/delete_custom_routing_accelerator.rs index 5e02a09e73ec..89dac6c709a1 100644 --- a/sdk/globalaccelerator/src/operation/delete_custom_routing_accelerator.rs +++ b/sdk/globalaccelerator/src/operation/delete_custom_routing_accelerator.rs @@ -263,6 +263,8 @@ pub enum DeleteCustomRoutingAcceleratorError { InternalServiceErrorException(crate::types::error::InternalServiceErrorException), ///

    An argument that you specified is invalid.

    InvalidArgumentException(crate::types::error::InvalidArgumentException), + ///

    There's already a transaction in progress. Another transaction can't be processed.

    + TransactionInProgressException(crate::types::error::TransactionInProgressException), /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ variable wildcard pattern and check `.code()`: @@ -301,6 +303,7 @@ impl DeleteCustomRoutingAcceleratorError { Self::AssociatedListenerFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::InternalServiceErrorException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::InvalidArgumentException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::TransactionInProgressException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::Unhandled(e) => &e.meta, } } @@ -324,6 +327,10 @@ impl DeleteCustomRoutingAcceleratorError { pub fn is_invalid_argument_exception(&self) -> bool { matches!(self, Self::InvalidArgumentException(_)) } + /// Returns `true` if the error kind is `DeleteCustomRoutingAcceleratorError::TransactionInProgressException`. + pub fn is_transaction_in_progress_exception(&self) -> bool { + matches!(self, Self::TransactionInProgressException(_)) + } } impl ::std::error::Error for DeleteCustomRoutingAcceleratorError { fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { @@ -333,6 +340,7 @@ impl ::std::error::Error for DeleteCustomRoutingAcceleratorError { Self::AssociatedListenerFoundException(_inner) => ::std::option::Option::Some(_inner), Self::InternalServiceErrorException(_inner) => ::std::option::Option::Some(_inner), Self::InvalidArgumentException(_inner) => ::std::option::Option::Some(_inner), + Self::TransactionInProgressException(_inner) => ::std::option::Option::Some(_inner), Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), } } @@ -345,6 +353,7 @@ impl ::std::fmt::Display for DeleteCustomRoutingAcceleratorError { Self::AssociatedListenerFoundException(_inner) => _inner.fmt(f), Self::InternalServiceErrorException(_inner) => _inner.fmt(f), Self::InvalidArgumentException(_inner) => _inner.fmt(f), + Self::TransactionInProgressException(_inner) => _inner.fmt(f), Self::Unhandled(_inner) => { if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { write!(f, "unhandled error ({code})") @@ -371,6 +380,7 @@ impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for DeleteCustomR Self::AssociatedListenerFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::InternalServiceErrorException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::InvalidArgumentException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::TransactionInProgressException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::Unhandled(_inner) => &_inner.meta, } } diff --git a/sdk/globalaccelerator/src/operation/list_tags_for_resource.rs b/sdk/globalaccelerator/src/operation/list_tags_for_resource.rs index ac61b238b6c3..fa6a1593787a 100644 --- a/sdk/globalaccelerator/src/operation/list_tags_for_resource.rs +++ b/sdk/globalaccelerator/src/operation/list_tags_for_resource.rs @@ -255,10 +255,16 @@ impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListTagsForRe pub enum ListTagsForResourceError { ///

    The accelerator that you specified doesn't exist.

    AcceleratorNotFoundException(crate::types::error::AcceleratorNotFoundException), + ///

    No cross-account attachment was found.

    + AttachmentNotFoundException(crate::types::error::AttachmentNotFoundException), + ///

    The endpoint group that you specified doesn't exist.

    + EndpointGroupNotFoundException(crate::types::error::EndpointGroupNotFoundException), ///

    There was an internal error for Global Accelerator.

    InternalServiceErrorException(crate::types::error::InternalServiceErrorException), ///

    An argument that you specified is invalid.

    InvalidArgumentException(crate::types::error::InvalidArgumentException), + ///

    The listener that you specified doesn't exist.

    + ListenerNotFoundException(crate::types::error::ListenerNotFoundException), /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ variable wildcard pattern and check `.code()`: @@ -293,8 +299,11 @@ impl ListTagsForResourceError { pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { match self { Self::AcceleratorNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::AttachmentNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::EndpointGroupNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::InternalServiceErrorException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::InvalidArgumentException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ListenerNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::Unhandled(e) => &e.meta, } } @@ -302,6 +311,14 @@ impl ListTagsForResourceError { pub fn is_accelerator_not_found_exception(&self) -> bool { matches!(self, Self::AcceleratorNotFoundException(_)) } + /// Returns `true` if the error kind is `ListTagsForResourceError::AttachmentNotFoundException`. + pub fn is_attachment_not_found_exception(&self) -> bool { + matches!(self, Self::AttachmentNotFoundException(_)) + } + /// Returns `true` if the error kind is `ListTagsForResourceError::EndpointGroupNotFoundException`. + pub fn is_endpoint_group_not_found_exception(&self) -> bool { + matches!(self, Self::EndpointGroupNotFoundException(_)) + } /// Returns `true` if the error kind is `ListTagsForResourceError::InternalServiceErrorException`. pub fn is_internal_service_error_exception(&self) -> bool { matches!(self, Self::InternalServiceErrorException(_)) @@ -310,13 +327,20 @@ impl ListTagsForResourceError { pub fn is_invalid_argument_exception(&self) -> bool { matches!(self, Self::InvalidArgumentException(_)) } + /// Returns `true` if the error kind is `ListTagsForResourceError::ListenerNotFoundException`. + pub fn is_listener_not_found_exception(&self) -> bool { + matches!(self, Self::ListenerNotFoundException(_)) + } } impl ::std::error::Error for ListTagsForResourceError { fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { match self { Self::AcceleratorNotFoundException(_inner) => ::std::option::Option::Some(_inner), + Self::AttachmentNotFoundException(_inner) => ::std::option::Option::Some(_inner), + Self::EndpointGroupNotFoundException(_inner) => ::std::option::Option::Some(_inner), Self::InternalServiceErrorException(_inner) => ::std::option::Option::Some(_inner), Self::InvalidArgumentException(_inner) => ::std::option::Option::Some(_inner), + Self::ListenerNotFoundException(_inner) => ::std::option::Option::Some(_inner), Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), } } @@ -325,8 +349,11 @@ impl ::std::fmt::Display for ListTagsForResourceError { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { match self { Self::AcceleratorNotFoundException(_inner) => _inner.fmt(f), + Self::AttachmentNotFoundException(_inner) => _inner.fmt(f), + Self::EndpointGroupNotFoundException(_inner) => _inner.fmt(f), Self::InternalServiceErrorException(_inner) => _inner.fmt(f), Self::InvalidArgumentException(_inner) => _inner.fmt(f), + Self::ListenerNotFoundException(_inner) => _inner.fmt(f), Self::Unhandled(_inner) => { if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { write!(f, "unhandled error ({code})") @@ -349,8 +376,11 @@ impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ListTagsForRe fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { match self { Self::AcceleratorNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::AttachmentNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::EndpointGroupNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::InternalServiceErrorException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::InvalidArgumentException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ListenerNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::Unhandled(_inner) => &_inner.meta, } } diff --git a/sdk/globalaccelerator/src/operation/update_accelerator.rs b/sdk/globalaccelerator/src/operation/update_accelerator.rs index 72d18ffb217f..f0c971326efc 100644 --- a/sdk/globalaccelerator/src/operation/update_accelerator.rs +++ b/sdk/globalaccelerator/src/operation/update_accelerator.rs @@ -255,10 +255,14 @@ pub enum UpdateAcceleratorError { AcceleratorNotFoundException(crate::types::error::AcceleratorNotFoundException), ///

    You don't have access permission.

    AccessDeniedException(crate::types::error::AccessDeniedException), + ///

    You can't use both of those options.

    + ConflictException(crate::types::error::ConflictException), ///

    There was an internal error for Global Accelerator.

    InternalServiceErrorException(crate::types::error::InternalServiceErrorException), ///

    An argument that you specified is invalid.

    InvalidArgumentException(crate::types::error::InvalidArgumentException), + ///

    There's already a transaction in progress. Another transaction can't be processed.

    + TransactionInProgressException(crate::types::error::TransactionInProgressException), /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ variable wildcard pattern and check `.code()`: @@ -294,8 +298,10 @@ impl UpdateAcceleratorError { match self { Self::AcceleratorNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::InternalServiceErrorException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::InvalidArgumentException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::TransactionInProgressException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::Unhandled(e) => &e.meta, } } @@ -307,6 +313,10 @@ impl UpdateAcceleratorError { pub fn is_access_denied_exception(&self) -> bool { matches!(self, Self::AccessDeniedException(_)) } + /// Returns `true` if the error kind is `UpdateAcceleratorError::ConflictException`. + pub fn is_conflict_exception(&self) -> bool { + matches!(self, Self::ConflictException(_)) + } /// Returns `true` if the error kind is `UpdateAcceleratorError::InternalServiceErrorException`. pub fn is_internal_service_error_exception(&self) -> bool { matches!(self, Self::InternalServiceErrorException(_)) @@ -315,14 +325,20 @@ impl UpdateAcceleratorError { pub fn is_invalid_argument_exception(&self) -> bool { matches!(self, Self::InvalidArgumentException(_)) } + /// Returns `true` if the error kind is `UpdateAcceleratorError::TransactionInProgressException`. + pub fn is_transaction_in_progress_exception(&self) -> bool { + matches!(self, Self::TransactionInProgressException(_)) + } } impl ::std::error::Error for UpdateAcceleratorError { fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { match self { Self::AcceleratorNotFoundException(_inner) => ::std::option::Option::Some(_inner), Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), + Self::ConflictException(_inner) => ::std::option::Option::Some(_inner), Self::InternalServiceErrorException(_inner) => ::std::option::Option::Some(_inner), Self::InvalidArgumentException(_inner) => ::std::option::Option::Some(_inner), + Self::TransactionInProgressException(_inner) => ::std::option::Option::Some(_inner), Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), } } @@ -332,8 +348,10 @@ impl ::std::fmt::Display for UpdateAcceleratorError { match self { Self::AcceleratorNotFoundException(_inner) => _inner.fmt(f), Self::AccessDeniedException(_inner) => _inner.fmt(f), + Self::ConflictException(_inner) => _inner.fmt(f), Self::InternalServiceErrorException(_inner) => _inner.fmt(f), Self::InvalidArgumentException(_inner) => _inner.fmt(f), + Self::TransactionInProgressException(_inner) => _inner.fmt(f), Self::Unhandled(_inner) => { if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { write!(f, "unhandled error ({code})") @@ -357,8 +375,10 @@ impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateAcceler match self { Self::AcceleratorNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::InternalServiceErrorException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::InvalidArgumentException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::TransactionInProgressException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::Unhandled(_inner) => &_inner.meta, } } diff --git a/sdk/globalaccelerator/src/operation/update_accelerator_attributes.rs b/sdk/globalaccelerator/src/operation/update_accelerator_attributes.rs index 5a40eb8df545..565317e70ee2 100644 --- a/sdk/globalaccelerator/src/operation/update_accelerator_attributes.rs +++ b/sdk/globalaccelerator/src/operation/update_accelerator_attributes.rs @@ -261,6 +261,8 @@ pub enum UpdateAcceleratorAttributesError { InternalServiceErrorException(crate::types::error::InternalServiceErrorException), ///

    An argument that you specified is invalid.

    InvalidArgumentException(crate::types::error::InvalidArgumentException), + ///

    There's already a transaction in progress. Another transaction can't be processed.

    + TransactionInProgressException(crate::types::error::TransactionInProgressException), /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ variable wildcard pattern and check `.code()`: @@ -298,6 +300,7 @@ impl UpdateAcceleratorAttributesError { Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::InternalServiceErrorException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::InvalidArgumentException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::TransactionInProgressException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::Unhandled(e) => &e.meta, } } @@ -317,6 +320,10 @@ impl UpdateAcceleratorAttributesError { pub fn is_invalid_argument_exception(&self) -> bool { matches!(self, Self::InvalidArgumentException(_)) } + /// Returns `true` if the error kind is `UpdateAcceleratorAttributesError::TransactionInProgressException`. + pub fn is_transaction_in_progress_exception(&self) -> bool { + matches!(self, Self::TransactionInProgressException(_)) + } } impl ::std::error::Error for UpdateAcceleratorAttributesError { fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { @@ -325,6 +332,7 @@ impl ::std::error::Error for UpdateAcceleratorAttributesError { Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), Self::InternalServiceErrorException(_inner) => ::std::option::Option::Some(_inner), Self::InvalidArgumentException(_inner) => ::std::option::Option::Some(_inner), + Self::TransactionInProgressException(_inner) => ::std::option::Option::Some(_inner), Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), } } @@ -336,6 +344,7 @@ impl ::std::fmt::Display for UpdateAcceleratorAttributesError { Self::AccessDeniedException(_inner) => _inner.fmt(f), Self::InternalServiceErrorException(_inner) => _inner.fmt(f), Self::InvalidArgumentException(_inner) => _inner.fmt(f), + Self::TransactionInProgressException(_inner) => _inner.fmt(f), Self::Unhandled(_inner) => { if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { write!(f, "unhandled error ({code})") @@ -361,6 +370,7 @@ impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateAcceler Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::InternalServiceErrorException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::InvalidArgumentException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::TransactionInProgressException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::Unhandled(_inner) => &_inner.meta, } } diff --git a/sdk/globalaccelerator/src/operation/update_custom_routing_accelerator.rs b/sdk/globalaccelerator/src/operation/update_custom_routing_accelerator.rs index 7ddebae5fe0c..f99191a6f547 100644 --- a/sdk/globalaccelerator/src/operation/update_custom_routing_accelerator.rs +++ b/sdk/globalaccelerator/src/operation/update_custom_routing_accelerator.rs @@ -255,10 +255,14 @@ impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateCustomR pub enum UpdateCustomRoutingAcceleratorError { ///

    The accelerator that you specified doesn't exist.

    AcceleratorNotFoundException(crate::types::error::AcceleratorNotFoundException), + ///

    You can't use both of those options.

    + ConflictException(crate::types::error::ConflictException), ///

    There was an internal error for Global Accelerator.

    InternalServiceErrorException(crate::types::error::InternalServiceErrorException), ///

    An argument that you specified is invalid.

    InvalidArgumentException(crate::types::error::InvalidArgumentException), + ///

    There's already a transaction in progress. Another transaction can't be processed.

    + TransactionInProgressException(crate::types::error::TransactionInProgressException), /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ variable wildcard pattern and check `.code()`: @@ -293,8 +297,10 @@ impl UpdateCustomRoutingAcceleratorError { pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { match self { Self::AcceleratorNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::InternalServiceErrorException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::InvalidArgumentException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::TransactionInProgressException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::Unhandled(e) => &e.meta, } } @@ -302,6 +308,10 @@ impl UpdateCustomRoutingAcceleratorError { pub fn is_accelerator_not_found_exception(&self) -> bool { matches!(self, Self::AcceleratorNotFoundException(_)) } + /// Returns `true` if the error kind is `UpdateCustomRoutingAcceleratorError::ConflictException`. + pub fn is_conflict_exception(&self) -> bool { + matches!(self, Self::ConflictException(_)) + } /// Returns `true` if the error kind is `UpdateCustomRoutingAcceleratorError::InternalServiceErrorException`. pub fn is_internal_service_error_exception(&self) -> bool { matches!(self, Self::InternalServiceErrorException(_)) @@ -310,13 +320,19 @@ impl UpdateCustomRoutingAcceleratorError { pub fn is_invalid_argument_exception(&self) -> bool { matches!(self, Self::InvalidArgumentException(_)) } + /// Returns `true` if the error kind is `UpdateCustomRoutingAcceleratorError::TransactionInProgressException`. + pub fn is_transaction_in_progress_exception(&self) -> bool { + matches!(self, Self::TransactionInProgressException(_)) + } } impl ::std::error::Error for UpdateCustomRoutingAcceleratorError { fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { match self { Self::AcceleratorNotFoundException(_inner) => ::std::option::Option::Some(_inner), + Self::ConflictException(_inner) => ::std::option::Option::Some(_inner), Self::InternalServiceErrorException(_inner) => ::std::option::Option::Some(_inner), Self::InvalidArgumentException(_inner) => ::std::option::Option::Some(_inner), + Self::TransactionInProgressException(_inner) => ::std::option::Option::Some(_inner), Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), } } @@ -325,8 +341,10 @@ impl ::std::fmt::Display for UpdateCustomRoutingAcceleratorError { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { match self { Self::AcceleratorNotFoundException(_inner) => _inner.fmt(f), + Self::ConflictException(_inner) => _inner.fmt(f), Self::InternalServiceErrorException(_inner) => _inner.fmt(f), Self::InvalidArgumentException(_inner) => _inner.fmt(f), + Self::TransactionInProgressException(_inner) => _inner.fmt(f), Self::Unhandled(_inner) => { if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { write!(f, "unhandled error ({code})") @@ -349,8 +367,10 @@ impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateCustomR fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { match self { Self::AcceleratorNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::InternalServiceErrorException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::InvalidArgumentException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::TransactionInProgressException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::Unhandled(_inner) => &_inner.meta, } } diff --git a/sdk/globalaccelerator/src/operation/update_custom_routing_accelerator_attributes.rs b/sdk/globalaccelerator/src/operation/update_custom_routing_accelerator_attributes.rs index fbf5ceb1b581..accaec25163c 100644 --- a/sdk/globalaccelerator/src/operation/update_custom_routing_accelerator_attributes.rs +++ b/sdk/globalaccelerator/src/operation/update_custom_routing_accelerator_attributes.rs @@ -267,6 +267,8 @@ pub enum UpdateCustomRoutingAcceleratorAttributesError { InternalServiceErrorException(crate::types::error::InternalServiceErrorException), ///

    An argument that you specified is invalid.

    InvalidArgumentException(crate::types::error::InvalidArgumentException), + ///

    There's already a transaction in progress. Another transaction can't be processed.

    + TransactionInProgressException(crate::types::error::TransactionInProgressException), /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ variable wildcard pattern and check `.code()`: @@ -304,6 +306,7 @@ impl UpdateCustomRoutingAcceleratorAttributesError { Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::InternalServiceErrorException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::InvalidArgumentException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::TransactionInProgressException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::Unhandled(e) => &e.meta, } } @@ -323,6 +326,10 @@ impl UpdateCustomRoutingAcceleratorAttributesError { pub fn is_invalid_argument_exception(&self) -> bool { matches!(self, Self::InvalidArgumentException(_)) } + /// Returns `true` if the error kind is `UpdateCustomRoutingAcceleratorAttributesError::TransactionInProgressException`. + pub fn is_transaction_in_progress_exception(&self) -> bool { + matches!(self, Self::TransactionInProgressException(_)) + } } impl ::std::error::Error for UpdateCustomRoutingAcceleratorAttributesError { fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { @@ -331,6 +338,7 @@ impl ::std::error::Error for UpdateCustomRoutingAcceleratorAttributesError { Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), Self::InternalServiceErrorException(_inner) => ::std::option::Option::Some(_inner), Self::InvalidArgumentException(_inner) => ::std::option::Option::Some(_inner), + Self::TransactionInProgressException(_inner) => ::std::option::Option::Some(_inner), Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), } } @@ -342,6 +350,7 @@ impl ::std::fmt::Display for UpdateCustomRoutingAcceleratorAttributesError { Self::AccessDeniedException(_inner) => _inner.fmt(f), Self::InternalServiceErrorException(_inner) => _inner.fmt(f), Self::InvalidArgumentException(_inner) => _inner.fmt(f), + Self::TransactionInProgressException(_inner) => _inner.fmt(f), Self::Unhandled(_inner) => { if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { write!(f, "unhandled error ({code})") @@ -367,6 +376,7 @@ impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateCustomR Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::InternalServiceErrorException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::InvalidArgumentException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::TransactionInProgressException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::Unhandled(_inner) => &_inner.meta, } } diff --git a/sdk/globalaccelerator/src/protocol_serde/shape_create_accelerator.rs b/sdk/globalaccelerator/src/protocol_serde/shape_create_accelerator.rs index 0d1a5559527c..d74e1a1e7a3c 100644 --- a/sdk/globalaccelerator/src/protocol_serde/shape_create_accelerator.rs +++ b/sdk/globalaccelerator/src/protocol_serde/shape_create_accelerator.rs @@ -18,6 +18,21 @@ pub fn de_create_accelerator_http_error( let _error_message = generic.message().map(|msg| msg.to_owned()); Err(match error_code { + "AccessDeniedException" => crate::operation::create_accelerator::CreateAcceleratorError::AccessDeniedException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); + output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) + .map_err(crate::operation::create_accelerator::CreateAcceleratorError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), "InternalServiceErrorException" => crate::operation::create_accelerator::CreateAcceleratorError::InternalServiceErrorException({ #[allow(unused_mut)] let mut tmp = { @@ -66,6 +81,24 @@ pub fn de_create_accelerator_http_error( } tmp }), + "TransactionInProgressException" => crate::operation::create_accelerator::CreateAcceleratorError::TransactionInProgressException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::TransactionInProgressExceptionBuilder::default(); + output = crate::protocol_serde::shape_transaction_in_progress_exception::de_transaction_in_progress_exception_json_err( + _response_body, + output, + ) + .map_err(crate::operation::create_accelerator::CreateAcceleratorError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), _ => crate::operation::create_accelerator::CreateAcceleratorError::generic(generic), }) } diff --git a/sdk/globalaccelerator/src/protocol_serde/shape_create_custom_routing_accelerator.rs b/sdk/globalaccelerator/src/protocol_serde/shape_create_custom_routing_accelerator.rs index a0cb6b391756..9b2dd25b50cf 100644 --- a/sdk/globalaccelerator/src/protocol_serde/shape_create_custom_routing_accelerator.rs +++ b/sdk/globalaccelerator/src/protocol_serde/shape_create_custom_routing_accelerator.rs @@ -89,6 +89,26 @@ pub fn de_create_custom_routing_accelerator_http_error( tmp }) } + "TransactionInProgressException" => { + crate::operation::create_custom_routing_accelerator::CreateCustomRoutingAcceleratorError::TransactionInProgressException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::TransactionInProgressExceptionBuilder::default(); + output = crate::protocol_serde::shape_transaction_in_progress_exception::de_transaction_in_progress_exception_json_err( + _response_body, + output, + ) + .map_err(crate::operation::create_custom_routing_accelerator::CreateCustomRoutingAcceleratorError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } _ => crate::operation::create_custom_routing_accelerator::CreateCustomRoutingAcceleratorError::generic(generic), }) } diff --git a/sdk/globalaccelerator/src/protocol_serde/shape_delete_accelerator.rs b/sdk/globalaccelerator/src/protocol_serde/shape_delete_accelerator.rs index e26c7dc591b3..9f302b8cb666 100644 --- a/sdk/globalaccelerator/src/protocol_serde/shape_delete_accelerator.rs +++ b/sdk/globalaccelerator/src/protocol_serde/shape_delete_accelerator.rs @@ -103,6 +103,24 @@ pub fn de_delete_accelerator_http_error( } tmp }), + "TransactionInProgressException" => crate::operation::delete_accelerator::DeleteAcceleratorError::TransactionInProgressException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::TransactionInProgressExceptionBuilder::default(); + output = crate::protocol_serde::shape_transaction_in_progress_exception::de_transaction_in_progress_exception_json_err( + _response_body, + output, + ) + .map_err(crate::operation::delete_accelerator::DeleteAcceleratorError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), _ => crate::operation::delete_accelerator::DeleteAcceleratorError::generic(generic), }) } diff --git a/sdk/globalaccelerator/src/protocol_serde/shape_delete_custom_routing_accelerator.rs b/sdk/globalaccelerator/src/protocol_serde/shape_delete_custom_routing_accelerator.rs index 703173cc4128..4a7302d89fec 100644 --- a/sdk/globalaccelerator/src/protocol_serde/shape_delete_custom_routing_accelerator.rs +++ b/sdk/globalaccelerator/src/protocol_serde/shape_delete_custom_routing_accelerator.rs @@ -117,6 +117,26 @@ pub fn de_delete_custom_routing_accelerator_http_error( tmp }) } + "TransactionInProgressException" => { + crate::operation::delete_custom_routing_accelerator::DeleteCustomRoutingAcceleratorError::TransactionInProgressException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::TransactionInProgressExceptionBuilder::default(); + output = crate::protocol_serde::shape_transaction_in_progress_exception::de_transaction_in_progress_exception_json_err( + _response_body, + output, + ) + .map_err(crate::operation::delete_custom_routing_accelerator::DeleteCustomRoutingAcceleratorError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } _ => crate::operation::delete_custom_routing_accelerator::DeleteCustomRoutingAcceleratorError::generic(generic), }) } diff --git a/sdk/globalaccelerator/src/protocol_serde/shape_list_tags_for_resource.rs b/sdk/globalaccelerator/src/protocol_serde/shape_list_tags_for_resource.rs index 7795ac3672ac..d855261af8b8 100644 --- a/sdk/globalaccelerator/src/protocol_serde/shape_list_tags_for_resource.rs +++ b/sdk/globalaccelerator/src/protocol_serde/shape_list_tags_for_resource.rs @@ -36,6 +36,40 @@ pub fn de_list_tags_for_resource_http_error( } tmp }), + "AttachmentNotFoundException" => crate::operation::list_tags_for_resource::ListTagsForResourceError::AttachmentNotFoundException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::AttachmentNotFoundExceptionBuilder::default(); + output = + crate::protocol_serde::shape_attachment_not_found_exception::de_attachment_not_found_exception_json_err(_response_body, output) + .map_err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "EndpointGroupNotFoundException" => crate::operation::list_tags_for_resource::ListTagsForResourceError::EndpointGroupNotFoundException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::EndpointGroupNotFoundExceptionBuilder::default(); + output = crate::protocol_serde::shape_endpoint_group_not_found_exception::de_endpoint_group_not_found_exception_json_err( + _response_body, + output, + ) + .map_err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), "InternalServiceErrorException" => crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServiceErrorException({ #[allow(unused_mut)] let mut tmp = { @@ -69,6 +103,21 @@ pub fn de_list_tags_for_resource_http_error( } tmp }), + "ListenerNotFoundException" => crate::operation::list_tags_for_resource::ListTagsForResourceError::ListenerNotFoundException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ListenerNotFoundExceptionBuilder::default(); + output = crate::protocol_serde::shape_listener_not_found_exception::de_listener_not_found_exception_json_err(_response_body, output) + .map_err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), _ => crate::operation::list_tags_for_resource::ListTagsForResourceError::generic(generic), }) } diff --git a/sdk/globalaccelerator/src/protocol_serde/shape_update_accelerator.rs b/sdk/globalaccelerator/src/protocol_serde/shape_update_accelerator.rs index ea928a4b13a1..a59c1d372bdb 100644 --- a/sdk/globalaccelerator/src/protocol_serde/shape_update_accelerator.rs +++ b/sdk/globalaccelerator/src/protocol_serde/shape_update_accelerator.rs @@ -49,6 +49,21 @@ pub fn de_update_accelerator_http_error( } tmp }), + "ConflictException" => crate::operation::update_accelerator::UpdateAcceleratorError::ConflictException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ConflictExceptionBuilder::default(); + output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output) + .map_err(crate::operation::update_accelerator::UpdateAcceleratorError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), "InternalServiceErrorException" => crate::operation::update_accelerator::UpdateAcceleratorError::InternalServiceErrorException({ #[allow(unused_mut)] let mut tmp = { @@ -82,6 +97,24 @@ pub fn de_update_accelerator_http_error( } tmp }), + "TransactionInProgressException" => crate::operation::update_accelerator::UpdateAcceleratorError::TransactionInProgressException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::TransactionInProgressExceptionBuilder::default(); + output = crate::protocol_serde::shape_transaction_in_progress_exception::de_transaction_in_progress_exception_json_err( + _response_body, + output, + ) + .map_err(crate::operation::update_accelerator::UpdateAcceleratorError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), _ => crate::operation::update_accelerator::UpdateAcceleratorError::generic(generic), }) } diff --git a/sdk/globalaccelerator/src/protocol_serde/shape_update_accelerator_attributes.rs b/sdk/globalaccelerator/src/protocol_serde/shape_update_accelerator_attributes.rs index 2031d209a805..d22e2f447219 100644 --- a/sdk/globalaccelerator/src/protocol_serde/shape_update_accelerator_attributes.rs +++ b/sdk/globalaccelerator/src/protocol_serde/shape_update_accelerator_attributes.rs @@ -90,6 +90,26 @@ pub fn de_update_accelerator_attributes_http_error( } tmp }), + "TransactionInProgressException" => { + crate::operation::update_accelerator_attributes::UpdateAcceleratorAttributesError::TransactionInProgressException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::TransactionInProgressExceptionBuilder::default(); + output = crate::protocol_serde::shape_transaction_in_progress_exception::de_transaction_in_progress_exception_json_err( + _response_body, + output, + ) + .map_err(crate::operation::update_accelerator_attributes::UpdateAcceleratorAttributesError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } _ => crate::operation::update_accelerator_attributes::UpdateAcceleratorAttributesError::generic(generic), }) } diff --git a/sdk/globalaccelerator/src/protocol_serde/shape_update_custom_routing_accelerator.rs b/sdk/globalaccelerator/src/protocol_serde/shape_update_custom_routing_accelerator.rs index 30acbc4ea7be..eae69442563c 100644 --- a/sdk/globalaccelerator/src/protocol_serde/shape_update_custom_routing_accelerator.rs +++ b/sdk/globalaccelerator/src/protocol_serde/shape_update_custom_routing_accelerator.rs @@ -40,6 +40,21 @@ pub fn de_update_custom_routing_accelerator_http_error( tmp }) } + "ConflictException" => crate::operation::update_custom_routing_accelerator::UpdateCustomRoutingAcceleratorError::ConflictException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ConflictExceptionBuilder::default(); + output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output) + .map_err(crate::operation::update_custom_routing_accelerator::UpdateCustomRoutingAcceleratorError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), "InternalServiceErrorException" => { crate::operation::update_custom_routing_accelerator::UpdateCustomRoutingAcceleratorError::InternalServiceErrorException({ #[allow(unused_mut)] @@ -77,6 +92,26 @@ pub fn de_update_custom_routing_accelerator_http_error( tmp }) } + "TransactionInProgressException" => { + crate::operation::update_custom_routing_accelerator::UpdateCustomRoutingAcceleratorError::TransactionInProgressException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::TransactionInProgressExceptionBuilder::default(); + output = crate::protocol_serde::shape_transaction_in_progress_exception::de_transaction_in_progress_exception_json_err( + _response_body, + output, + ) + .map_err(crate::operation::update_custom_routing_accelerator::UpdateCustomRoutingAcceleratorError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } _ => crate::operation::update_custom_routing_accelerator::UpdateCustomRoutingAcceleratorError::generic(generic), }) } diff --git a/sdk/globalaccelerator/src/protocol_serde/shape_update_custom_routing_accelerator_attributes.rs b/sdk/globalaccelerator/src/protocol_serde/shape_update_custom_routing_accelerator_attributes.rs index 45b2b7116c56..56e77e94822d 100644 --- a/sdk/globalaccelerator/src/protocol_serde/shape_update_custom_routing_accelerator_attributes.rs +++ b/sdk/globalaccelerator/src/protocol_serde/shape_update_custom_routing_accelerator_attributes.rs @@ -88,6 +88,22 @@ pub fn de_update_custom_routing_accelerator_attributes_http_error( } tmp }), + "TransactionInProgressException" => crate::operation::update_custom_routing_accelerator_attributes::UpdateCustomRoutingAcceleratorAttributesError::TransactionInProgressException({ + #[allow(unused_mut)] + let mut tmp = + { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::TransactionInProgressExceptionBuilder::default(); + output = crate::protocol_serde::shape_transaction_in_progress_exception::de_transaction_in_progress_exception_json_err(_response_body, output).map_err(crate::operation::update_custom_routing_accelerator_attributes::UpdateCustomRoutingAcceleratorAttributesError::unhandled)?; + let output = output.meta(generic); + output.build() + } + ; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), _ => crate::operation::update_custom_routing_accelerator_attributes::UpdateCustomRoutingAcceleratorAttributesError::generic(generic) }) } diff --git a/sdk/globalaccelerator/src/types/error.rs b/sdk/globalaccelerator/src/types/error.rs index c8dd0f0326be..02cabaddb813 100644 --- a/sdk/globalaccelerator/src/types/error.rs +++ b/sdk/globalaccelerator/src/types/error.rs @@ -17,16 +17,16 @@ pub use crate::types::error::_invalid_port_range_exception::InvalidPortRangeExce pub use crate::types::error::_endpoint_group_not_found_exception::EndpointGroupNotFoundException; +pub use crate::types::error::_transaction_in_progress_exception::TransactionInProgressException; + pub use crate::types::error::_accelerator_not_found_exception::AcceleratorNotFoundException; -pub use crate::types::error::_transaction_in_progress_exception::TransactionInProgressException; +pub use crate::types::error::_conflict_exception::ConflictException; pub use crate::types::error::_attachment_not_found_exception::AttachmentNotFoundException; pub use crate::types::error::_endpoint_not_found_exception::EndpointNotFoundException; -pub use crate::types::error::_conflict_exception::ConflictException; - pub use crate::types::error::_invalid_next_token_exception::InvalidNextTokenException; pub use crate::types::error::_associated_endpoint_group_found_exception::AssociatedEndpointGroupFoundException; diff --git a/sdk/globalaccelerator/src/types/error/builders.rs b/sdk/globalaccelerator/src/types/error/builders.rs index 19705fada06f..bc818e1d11e1 100644 --- a/sdk/globalaccelerator/src/types/error/builders.rs +++ b/sdk/globalaccelerator/src/types/error/builders.rs @@ -17,16 +17,16 @@ pub use crate::types::error::_invalid_port_range_exception::InvalidPortRangeExce pub use crate::types::error::_endpoint_group_not_found_exception::EndpointGroupNotFoundExceptionBuilder; +pub use crate::types::error::_transaction_in_progress_exception::TransactionInProgressExceptionBuilder; + pub use crate::types::error::_accelerator_not_found_exception::AcceleratorNotFoundExceptionBuilder; -pub use crate::types::error::_transaction_in_progress_exception::TransactionInProgressExceptionBuilder; +pub use crate::types::error::_conflict_exception::ConflictExceptionBuilder; pub use crate::types::error::_attachment_not_found_exception::AttachmentNotFoundExceptionBuilder; pub use crate::types::error::_endpoint_not_found_exception::EndpointNotFoundExceptionBuilder; -pub use crate::types::error::_conflict_exception::ConflictExceptionBuilder; - pub use crate::types::error::_invalid_next_token_exception::InvalidNextTokenExceptionBuilder; pub use crate::types::error::_associated_endpoint_group_found_exception::AssociatedEndpointGroupFoundExceptionBuilder; diff --git a/sdk/quicksight/src/client.rs b/sdk/quicksight/src/client.rs index 440721c66fcf..b21a17ed03f6 100644 --- a/sdk/quicksight/src/client.rs +++ b/sdk/quicksight/src/client.rs @@ -59,13 +59,13 @@ pub(crate) struct Handle { /// # Using the `Client` /// /// A client has a function for every operation that can be performed by the service. -/// For example, the [`CancelIngestion`](crate::operation::cancel_ingestion) operation has -/// a [`Client::cancel_ingestion`], function which returns a builder for that operation. +/// For example, the [`BatchCreateTopicReviewedAnswer`](crate::operation::batch_create_topic_reviewed_answer) operation has +/// a [`Client::batch_create_topic_reviewed_answer`], function which returns a builder for that operation. /// The fluent builder ultimately has a `send()` function that returns an async future that /// returns a result, as illustrated below: /// /// ```rust,ignore -/// let result = client.cancel_ingestion() +/// let result = client.batch_create_topic_reviewed_answer() /// .aws_account_id("example") /// .send() /// .await; @@ -136,6 +136,10 @@ impl Client { } } +mod batch_create_topic_reviewed_answer; + +mod batch_delete_topic_reviewed_answer; + mod cancel_ingestion; mod create_account_customization; @@ -193,7 +197,7 @@ mod create_vpc_connection; /// # let client: aws_sdk_quicksight::Client = unimplemented!(); /// use ::http::header::{HeaderName, HeaderValue}; /// -/// let result = client.cancel_ingestion() +/// let result = client.batch_create_topic_reviewed_answer() /// .customize() /// .mutate_request(|req| { /// // Add `x-example-header` with value @@ -407,6 +411,8 @@ mod list_themes; mod list_topic_refresh_schedules; +mod list_topic_reviewed_answers; + mod list_topics; mod list_user_groups; diff --git a/sdk/quicksight/src/client/batch_create_topic_reviewed_answer.rs b/sdk/quicksight/src/client/batch_create_topic_reviewed_answer.rs new file mode 100644 index 000000000000..2e2211d82517 --- /dev/null +++ b/sdk/quicksight/src/client/batch_create_topic_reviewed_answer.rs @@ -0,0 +1,22 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +impl super::Client { + /// Constructs a fluent builder for the [`BatchCreateTopicReviewedAnswer`](crate::operation::batch_create_topic_reviewed_answer::builders::BatchCreateTopicReviewedAnswerFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`aws_account_id(impl Into)`](crate::operation::batch_create_topic_reviewed_answer::builders::BatchCreateTopicReviewedAnswerFluentBuilder::aws_account_id) / [`set_aws_account_id(Option)`](crate::operation::batch_create_topic_reviewed_answer::builders::BatchCreateTopicReviewedAnswerFluentBuilder::set_aws_account_id):
    required: **true**

    The ID of the Amazon Web Services account that you want to create a reviewed answer in.


    + /// - [`topic_id(impl Into)`](crate::operation::batch_create_topic_reviewed_answer::builders::BatchCreateTopicReviewedAnswerFluentBuilder::topic_id) / [`set_topic_id(Option)`](crate::operation::batch_create_topic_reviewed_answer::builders::BatchCreateTopicReviewedAnswerFluentBuilder::set_topic_id):
    required: **true**

    The ID for the topic reviewed answer that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.


    + /// - [`answers(CreateTopicReviewedAnswer)`](crate::operation::batch_create_topic_reviewed_answer::builders::BatchCreateTopicReviewedAnswerFluentBuilder::answers) / [`set_answers(Option>)`](crate::operation::batch_create_topic_reviewed_answer::builders::BatchCreateTopicReviewedAnswerFluentBuilder::set_answers):
    required: **true**

    The definition of the Answers to be created.


    + /// - On success, responds with [`BatchCreateTopicReviewedAnswerOutput`](crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerOutput) with field(s): + /// - [`topic_id(Option)`](crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerOutput::topic_id):

    The ID for the topic reviewed answer that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + /// - [`topic_arn(Option)`](crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerOutput::topic_arn):

    The Amazon Resource Name (ARN) of the topic.

    + /// - [`succeeded_answers(Option>)`](crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerOutput::succeeded_answers):

    The definition of Answers that are successfully created.

    + /// - [`invalid_answers(Option>)`](crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerOutput::invalid_answers):

    The definition of Answers that are invalid and not created.

    + /// - [`status(i32)`](crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerOutput::status):

    The HTTP status of the request.

    + /// - [`request_id(Option)`](crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerOutput::request_id):

    The Amazon Web Services request ID for this operation.

    + /// - On failure, responds with [`SdkError`](crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError) + pub fn batch_create_topic_reviewed_answer( + &self, + ) -> crate::operation::batch_create_topic_reviewed_answer::builders::BatchCreateTopicReviewedAnswerFluentBuilder { + crate::operation::batch_create_topic_reviewed_answer::builders::BatchCreateTopicReviewedAnswerFluentBuilder::new(self.handle.clone()) + } +} diff --git a/sdk/quicksight/src/client/batch_delete_topic_reviewed_answer.rs b/sdk/quicksight/src/client/batch_delete_topic_reviewed_answer.rs new file mode 100644 index 000000000000..21b8f3151455 --- /dev/null +++ b/sdk/quicksight/src/client/batch_delete_topic_reviewed_answer.rs @@ -0,0 +1,22 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +impl super::Client { + /// Constructs a fluent builder for the [`BatchDeleteTopicReviewedAnswer`](crate::operation::batch_delete_topic_reviewed_answer::builders::BatchDeleteTopicReviewedAnswerFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`aws_account_id(impl Into)`](crate::operation::batch_delete_topic_reviewed_answer::builders::BatchDeleteTopicReviewedAnswerFluentBuilder::aws_account_id) / [`set_aws_account_id(Option)`](crate::operation::batch_delete_topic_reviewed_answer::builders::BatchDeleteTopicReviewedAnswerFluentBuilder::set_aws_account_id):
    required: **true**

    The ID of the Amazon Web Services account that you want to delete a reviewed answers in.


    + /// - [`topic_id(impl Into)`](crate::operation::batch_delete_topic_reviewed_answer::builders::BatchDeleteTopicReviewedAnswerFluentBuilder::topic_id) / [`set_topic_id(Option)`](crate::operation::batch_delete_topic_reviewed_answer::builders::BatchDeleteTopicReviewedAnswerFluentBuilder::set_topic_id):
    required: **true**

    The ID for the topic reviewed answer that you want to delete. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.


    + /// - [`answer_ids(impl Into)`](crate::operation::batch_delete_topic_reviewed_answer::builders::BatchDeleteTopicReviewedAnswerFluentBuilder::answer_ids) / [`set_answer_ids(Option>)`](crate::operation::batch_delete_topic_reviewed_answer::builders::BatchDeleteTopicReviewedAnswerFluentBuilder::set_answer_ids):
    required: **false**

    The Answer IDs of the Answers to be deleted.


    + /// - On success, responds with [`BatchDeleteTopicReviewedAnswerOutput`](crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerOutput) with field(s): + /// - [`topic_id(Option)`](crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerOutput::topic_id):

    The ID of the topic reviewed answer that you want to delete. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + /// - [`topic_arn(Option)`](crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerOutput::topic_arn):

    The Amazon Resource Name (ARN) of the topic.

    + /// - [`succeeded_answers(Option>)`](crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerOutput::succeeded_answers):

    The definition of Answers that are successfully deleted.

    + /// - [`invalid_answers(Option>)`](crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerOutput::invalid_answers):

    The definition of Answers that are invalid and not deleted.

    + /// - [`request_id(Option)`](crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerOutput::request_id):

    The Amazon Web Services request ID for this operation.

    + /// - [`status(i32)`](crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerOutput::status):

    The HTTP status of the request.

    + /// - On failure, responds with [`SdkError`](crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError) + pub fn batch_delete_topic_reviewed_answer( + &self, + ) -> crate::operation::batch_delete_topic_reviewed_answer::builders::BatchDeleteTopicReviewedAnswerFluentBuilder { + crate::operation::batch_delete_topic_reviewed_answer::builders::BatchDeleteTopicReviewedAnswerFluentBuilder::new(self.handle.clone()) + } +} diff --git a/sdk/quicksight/src/client/list_topic_reviewed_answers.rs b/sdk/quicksight/src/client/list_topic_reviewed_answers.rs new file mode 100644 index 000000000000..7bc206893a39 --- /dev/null +++ b/sdk/quicksight/src/client/list_topic_reviewed_answers.rs @@ -0,0 +1,18 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +impl super::Client { + /// Constructs a fluent builder for the [`ListTopicReviewedAnswers`](crate::operation::list_topic_reviewed_answers::builders::ListTopicReviewedAnswersFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`aws_account_id(impl Into)`](crate::operation::list_topic_reviewed_answers::builders::ListTopicReviewedAnswersFluentBuilder::aws_account_id) / [`set_aws_account_id(Option)`](crate::operation::list_topic_reviewed_answers::builders::ListTopicReviewedAnswersFluentBuilder::set_aws_account_id):
    required: **true**

    The ID of the Amazon Web Services account that containd the reviewed answers that you want listed.


    + /// - [`topic_id(impl Into)`](crate::operation::list_topic_reviewed_answers::builders::ListTopicReviewedAnswersFluentBuilder::topic_id) / [`set_topic_id(Option)`](crate::operation::list_topic_reviewed_answers::builders::ListTopicReviewedAnswersFluentBuilder::set_topic_id):
    required: **true**

    The ID for the topic that contains the reviewed answer that you want to list. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.


    + /// - On success, responds with [`ListTopicReviewedAnswersOutput`](crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersOutput) with field(s): + /// - [`topic_id(Option)`](crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersOutput::topic_id):

    The ID for the topic that contains the reviewed answer that you want to list. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + /// - [`topic_arn(Option)`](crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersOutput::topic_arn):

    The Amazon Resource Name (ARN) of the topic.

    + /// - [`answers(Option>)`](crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersOutput::answers):

    The definition of all Answers in the topic.

    + /// - [`status(i32)`](crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersOutput::status):

    The HTTP status of the request.

    + /// - [`request_id(Option)`](crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersOutput::request_id):

    The Amazon Web Services request ID for this operation.

    + /// - On failure, responds with [`SdkError`](crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError) + pub fn list_topic_reviewed_answers(&self) -> crate::operation::list_topic_reviewed_answers::builders::ListTopicReviewedAnswersFluentBuilder { + crate::operation::list_topic_reviewed_answers::builders::ListTopicReviewedAnswersFluentBuilder::new(self.handle.clone()) + } +} diff --git a/sdk/quicksight/src/error_meta.rs b/sdk/quicksight/src/error_meta.rs index 6e32a2f87fbe..85afb161d7e7 100644 --- a/sdk/quicksight/src/error_meta.rs +++ b/sdk/quicksight/src/error_meta.rs @@ -117,6 +117,103 @@ impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error { } } } +impl + From< + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError, + R, + >, + > for Error +where + R: Send + Sync + std::fmt::Debug + 'static, +{ + fn from( + err: ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError, + R, + >, + ) -> Self { + match err { + ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), + _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { + meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), + source: err.into(), + }), + } + } +} +impl From for Error { + fn from(err: crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError) -> Self { + match err { + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError::AccessDeniedException(inner) => { + Error::AccessDeniedException(inner) + } + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError::InternalFailureException(inner) => { + Error::InternalFailureException(inner) + } + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError::InvalidParameterValueException(inner) => { + Error::InvalidParameterValueException(inner) + } + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError::ResourceNotFoundException(inner) => { + Error::ResourceNotFoundException(inner) + } + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError::ThrottlingException(inner) => { + Error::ThrottlingException(inner) + } + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError::Unhandled(inner) => Error::Unhandled(inner), + } + } +} +impl + From< + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError, + R, + >, + > for Error +where + R: Send + Sync + std::fmt::Debug + 'static, +{ + fn from( + err: ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError, + R, + >, + ) -> Self { + match err { + ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), + _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { + meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), + source: err.into(), + }), + } + } +} +impl From for Error { + fn from(err: crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError) -> Self { + match err { + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::AccessDeniedException(inner) => { + Error::AccessDeniedException(inner) + } + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::ConflictException(inner) => { + Error::ConflictException(inner) + } + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::InternalFailureException(inner) => { + Error::InternalFailureException(inner) + } + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::InvalidParameterValueException(inner) => { + Error::InvalidParameterValueException(inner) + } + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::ResourceNotFoundException(inner) => { + Error::ResourceNotFoundException(inner) + } + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::ThrottlingException(inner) => { + Error::ThrottlingException(inner) + } + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::Unhandled(inner) => Error::Unhandled(inner), + } + } +} impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error where R: Send + Sync + std::fmt::Debug + 'static, @@ -4719,6 +4816,45 @@ impl From From<::aws_smithy_runtime_api::client::result::SdkError> + for Error +where + R: Send + Sync + std::fmt::Debug + 'static, +{ + fn from( + err: ::aws_smithy_runtime_api::client::result::SdkError, + ) -> Self { + match err { + ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), + _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { + meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), + source: err.into(), + }), + } + } +} +impl From for Error { + fn from(err: crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError) -> Self { + match err { + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError::AccessDeniedException(inner) => { + Error::AccessDeniedException(inner) + } + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError::InternalFailureException(inner) => { + Error::InternalFailureException(inner) + } + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError::InvalidParameterValueException(inner) => { + Error::InvalidParameterValueException(inner) + } + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError::ResourceNotFoundException(inner) => { + Error::ResourceNotFoundException(inner) + } + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError::ThrottlingException(inner) => { + Error::ThrottlingException(inner) + } + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError::Unhandled(inner) => Error::Unhandled(inner), + } + } +} impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error where R: Send + Sync + std::fmt::Debug + 'static, diff --git a/sdk/quicksight/src/lib.rs b/sdk/quicksight/src/lib.rs index 355578a6fb74..43a7def472af 100644 --- a/sdk/quicksight/src/lib.rs +++ b/sdk/quicksight/src/lib.rs @@ -148,13 +148,13 @@ pub use config::Config; /// # Using the `Client` /// /// A client has a function for every operation that can be performed by the service. -/// For example, the [`CancelIngestion`](crate::operation::cancel_ingestion) operation has -/// a [`Client::cancel_ingestion`], function which returns a builder for that operation. +/// For example, the [`BatchCreateTopicReviewedAnswer`](crate::operation::batch_create_topic_reviewed_answer) operation has +/// a [`Client::batch_create_topic_reviewed_answer`], function which returns a builder for that operation. /// The fluent builder ultimately has a `send()` function that returns an async future that /// returns a result, as illustrated below: /// /// ```rust,ignore -/// let result = client.cancel_ingestion() +/// let result = client.batch_create_topic_reviewed_answer() /// .aws_account_id("example") /// .send() /// .await; diff --git a/sdk/quicksight/src/operation.rs b/sdk/quicksight/src/operation.rs index 121b9bdb7bb4..75020d86a114 100644 --- a/sdk/quicksight/src/operation.rs +++ b/sdk/quicksight/src/operation.rs @@ -1,6 +1,12 @@ // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. pub use ::aws_types::request_id::RequestId; +/// Types for the `BatchCreateTopicReviewedAnswer` operation. +pub mod batch_create_topic_reviewed_answer; + +/// Types for the `BatchDeleteTopicReviewedAnswer` operation. +pub mod batch_delete_topic_reviewed_answer; + /// Types for the `CancelIngestion` operation. pub mod cancel_ingestion; @@ -367,6 +373,9 @@ pub mod list_themes; /// Types for the `ListTopicRefreshSchedules` operation. pub mod list_topic_refresh_schedules; +/// Types for the `ListTopicReviewedAnswers` operation. +pub mod list_topic_reviewed_answers; + /// Types for the `ListTopics` operation. pub mod list_topics; diff --git a/sdk/quicksight/src/operation/batch_create_topic_reviewed_answer.rs b/sdk/quicksight/src/operation/batch_create_topic_reviewed_answer.rs new file mode 100644 index 000000000000..de3de327e55f --- /dev/null +++ b/sdk/quicksight/src/operation/batch_create_topic_reviewed_answer.rs @@ -0,0 +1,429 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +/// Orchestration and serialization glue logic for `BatchCreateTopicReviewedAnswer`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct BatchCreateTopicReviewedAnswer; +impl BatchCreateTopicReviewedAnswer { + /// Creates a new `BatchCreateTopicReviewedAnswer` + pub fn new() -> Self { + Self + } + pub(crate) async fn orchestrate( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerInput, + ) -> ::std::result::Result< + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< + ::aws_smithy_runtime_api::client::interceptors::context::Error, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >| { + err.map_service_error(|err| { + err.downcast::() + .expect("correct error type") + }) + }; + let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) + .await + .map_err(map_err)?; + let output = context.finalize().map_err(map_err)?; + ::std::result::Result::Ok( + output + .downcast::() + .expect("correct output type"), + ) + } + + pub(crate) async fn orchestrate_with_stop_point( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerInput, + stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, + ) -> ::std::result::Result< + ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, + ::aws_smithy_runtime_api::client::result::SdkError< + ::aws_smithy_runtime_api::client::interceptors::context::Error, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); + ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point( + "quicksight", + "BatchCreateTopicReviewedAnswer", + input, + runtime_plugins, + stop_point, + ) + .await + } + + pub(crate) fn operation_runtime_plugins( + client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + client_config: &crate::config::Config, + config_override: ::std::option::Option, + ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { + let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); + runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ + ::aws_runtime::auth::sigv4::SCHEME_ID, + ])); + if let ::std::option::Option::Some(config_override) = config_override { + for plugin in config_override.runtime_plugins.iter().cloned() { + runtime_plugins = runtime_plugins.with_operation_plugin(plugin); + } + runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( + config_override, + client_config.config.clone(), + &client_config.runtime_components, + )); + } + runtime_plugins + } +} +impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for BatchCreateTopicReviewedAnswer { + fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { + let mut cfg = ::aws_smithy_types::config_bag::Layer::new("BatchCreateTopicReviewedAnswer"); + + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( + BatchCreateTopicReviewedAnswerRequestSerializer, + )); + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( + BatchCreateTopicReviewedAnswerResponseDeserializer, + )); + + cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( + ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), + )); + + cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( + "BatchCreateTopicReviewedAnswer", + "quicksight", + )); + let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); + signing_options.double_uri_encode = true; + signing_options.content_sha256_header = false; + signing_options.normalize_uri_path = true; + signing_options.payload_override = None; + + cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { + signing_options, + ..::std::default::Default::default() + }); + + ::std::option::Option::Some(cfg.freeze()) + } + + fn runtime_components( + &self, + _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, + ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { + #[allow(unused_mut)] + let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("BatchCreateTopicReviewedAnswer") + .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default()) + .with_interceptor(BatchCreateTopicReviewedAnswerEndpointParamsInterceptor) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError, + >::new()) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError, + >::new()) + .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError, + >::new()); + + ::std::borrow::Cow::Owned(rcb) + } +} + +#[derive(Debug)] +struct BatchCreateTopicReviewedAnswerResponseDeserializer; +impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for BatchCreateTopicReviewedAnswerResponseDeserializer { + fn deserialize_nonstreaming( + &self, + response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { + let (success, status) = (response.status().is_success(), response.status().as_u16()); + let headers = response.headers(); + let body = response.body().bytes().expect("body loaded"); + #[allow(unused_mut)] + let mut force_error = false; + ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); + let parse_result = if !success && status != 200 || force_error { + crate::protocol_serde::shape_batch_create_topic_reviewed_answer::de_batch_create_topic_reviewed_answer_http_error(status, headers, body) + } else { + crate::protocol_serde::shape_batch_create_topic_reviewed_answer::de_batch_create_topic_reviewed_answer_http_response( + status, headers, body, + ) + }; + crate::protocol_serde::type_erase_result(parse_result) + } +} +#[derive(Debug)] +struct BatchCreateTopicReviewedAnswerRequestSerializer; +impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for BatchCreateTopicReviewedAnswerRequestSerializer { + #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] + fn serialize_input( + &self, + input: ::aws_smithy_runtime_api::client::interceptors::context::Input, + _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, + ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { + let input = input + .downcast::() + .expect("correct type"); + let _header_serialization_settings = _cfg + .load::() + .cloned() + .unwrap_or_default(); + let mut request_builder = { + fn uri_base( + _input: &crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerInput, + output: &mut ::std::string::String, + ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { + use ::std::fmt::Write as _; + let input_1 = &_input.aws_account_id; + let input_1 = input_1 + .as_ref() + .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("aws_account_id", "cannot be empty or unset"))?; + let aws_account_id = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default); + if aws_account_id.is_empty() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "aws_account_id", + "cannot be empty or unset", + )); + } + let input_2 = &_input.topic_id; + let input_2 = input_2 + .as_ref() + .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("topic_id", "cannot be empty or unset"))?; + let topic_id = ::aws_smithy_http::label::fmt_string(input_2, ::aws_smithy_http::label::EncodingStrategy::Default); + if topic_id.is_empty() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "topic_id", + "cannot be empty or unset", + )); + } + ::std::write!( + output, + "/accounts/{AwsAccountId}/topics/{TopicId}/batch-create-reviewed-answers", + AwsAccountId = aws_account_id, + TopicId = topic_id + ) + .expect("formatting should succeed"); + ::std::result::Result::Ok(()) + } + #[allow(clippy::unnecessary_wraps)] + fn update_http_builder( + input: &crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerInput, + builder: ::http::request::Builder, + ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { + let mut uri = ::std::string::String::new(); + uri_base(input, &mut uri)?; + ::std::result::Result::Ok(builder.method("POST").uri(uri)) + } + let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; + builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json"); + builder + }; + let body = ::aws_smithy_types::body::SdkBody::from( + crate::protocol_serde::shape_batch_create_topic_reviewed_answer::ser_batch_create_topic_reviewed_answer_input(&input)?, + ); + if let Some(content_length) = body.content_length() { + let content_length = content_length.to_string(); + request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length); + } + ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) + } +} +#[derive(Debug)] +struct BatchCreateTopicReviewedAnswerEndpointParamsInterceptor; + +impl ::aws_smithy_runtime_api::client::interceptors::Intercept for BatchCreateTopicReviewedAnswerEndpointParamsInterceptor { + fn name(&self) -> &'static str { + "BatchCreateTopicReviewedAnswerEndpointParamsInterceptor" + } + + fn read_before_execution( + &self, + context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< + '_, + ::aws_smithy_runtime_api::client::interceptors::context::Input, + ::aws_smithy_runtime_api::client::interceptors::context::Output, + ::aws_smithy_runtime_api::client::interceptors::context::Error, + >, + cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, + ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { + let _input = context + .input() + .downcast_ref::() + .ok_or("failed to downcast to BatchCreateTopicReviewedAnswerInput")?; + + let params = crate::config::endpoint::Params::builder() + .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) + .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) + .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) + .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) + .build() + .map_err(|err| { + ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) + })?; + cfg.interceptor_state() + .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); + ::std::result::Result::Ok(()) + } +} + +/// Error type for the `BatchCreateTopicReviewedAnswerError` operation. +#[non_exhaustive] +#[derive(::std::fmt::Debug)] +pub enum BatchCreateTopicReviewedAnswerError { + ///

    You don't have access to this item. The provided credentials couldn't be validated. You might not be authorized to carry out the request. Make sure that your account is authorized to use the Amazon QuickSight service, that your policies have the correct permissions, and that you are using the correct credentials.

    + AccessDeniedException(crate::types::error::AccessDeniedException), + ///

    An internal failure occurred.

    + InternalFailureException(crate::types::error::InternalFailureException), + ///

    One or more parameters has a value that isn't valid.

    + InvalidParameterValueException(crate::types::error::InvalidParameterValueException), + ///

    One or more resources can't be found.

    + ResourceNotFoundException(crate::types::error::ResourceNotFoundException), + ///

    Access is throttled.

    + ThrottlingException(crate::types::error::ThrottlingException), + /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). + #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ + variable wildcard pattern and check `.code()`: + \ +    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` + \ + See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-BatchCreateTopicReviewedAnswerError) for what information is available for the error.")] + Unhandled(crate::error::sealed_unhandled::Unhandled), +} +impl BatchCreateTopicReviewedAnswerError { + /// Creates the `BatchCreateTopicReviewedAnswerError::Unhandled` variant from any error type. + pub fn unhandled( + err: impl ::std::convert::Into<::std::boxed::Box>, + ) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source: err.into(), + meta: ::std::default::Default::default(), + }) + } + + /// Creates the `BatchCreateTopicReviewedAnswerError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). + pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source: err.clone().into(), + meta: err, + }) + } + /// + /// Returns error metadata, which includes the error code, message, + /// request ID, and potentially additional information. + /// + pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InternalFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InvalidParameterValueException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::Unhandled(e) => &e.meta, + } + } + /// Returns `true` if the error kind is `BatchCreateTopicReviewedAnswerError::AccessDeniedException`. + pub fn is_access_denied_exception(&self) -> bool { + matches!(self, Self::AccessDeniedException(_)) + } + /// Returns `true` if the error kind is `BatchCreateTopicReviewedAnswerError::InternalFailureException`. + pub fn is_internal_failure_exception(&self) -> bool { + matches!(self, Self::InternalFailureException(_)) + } + /// Returns `true` if the error kind is `BatchCreateTopicReviewedAnswerError::InvalidParameterValueException`. + pub fn is_invalid_parameter_value_exception(&self) -> bool { + matches!(self, Self::InvalidParameterValueException(_)) + } + /// Returns `true` if the error kind is `BatchCreateTopicReviewedAnswerError::ResourceNotFoundException`. + pub fn is_resource_not_found_exception(&self) -> bool { + matches!(self, Self::ResourceNotFoundException(_)) + } + /// Returns `true` if the error kind is `BatchCreateTopicReviewedAnswerError::ThrottlingException`. + pub fn is_throttling_exception(&self) -> bool { + matches!(self, Self::ThrottlingException(_)) + } +} +impl ::std::error::Error for BatchCreateTopicReviewedAnswerError { + fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { + match self { + Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), + Self::InternalFailureException(_inner) => ::std::option::Option::Some(_inner), + Self::InvalidParameterValueException(_inner) => ::std::option::Option::Some(_inner), + Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), + Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), + Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), + } + } +} +impl ::std::fmt::Display for BatchCreateTopicReviewedAnswerError { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match self { + Self::AccessDeniedException(_inner) => _inner.fmt(f), + Self::InternalFailureException(_inner) => _inner.fmt(f), + Self::InvalidParameterValueException(_inner) => _inner.fmt(f), + Self::ResourceNotFoundException(_inner) => _inner.fmt(f), + Self::ThrottlingException(_inner) => _inner.fmt(f), + Self::Unhandled(_inner) => { + if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { + write!(f, "unhandled error ({code})") + } else { + f.write_str("unhandled error") + } + } + } + } +} +impl ::aws_smithy_types::retry::ProvideErrorKind for BatchCreateTopicReviewedAnswerError { + fn code(&self) -> ::std::option::Option<&str> { + ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) + } + fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { + ::std::option::Option::None + } +} +impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for BatchCreateTopicReviewedAnswerError { + fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InternalFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InvalidParameterValueException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::Unhandled(_inner) => &_inner.meta, + } + } +} +impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for BatchCreateTopicReviewedAnswerError { + fn create_unhandled_error( + source: ::std::boxed::Box, + meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, + ) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source, + meta: meta.unwrap_or_default(), + }) + } +} +impl ::aws_types::request_id::RequestId for crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError { + fn request_id(&self) -> Option<&str> { + self.meta().request_id() + } +} + +pub use crate::operation::batch_create_topic_reviewed_answer::_batch_create_topic_reviewed_answer_output::BatchCreateTopicReviewedAnswerOutput; + +pub use crate::operation::batch_create_topic_reviewed_answer::_batch_create_topic_reviewed_answer_input::BatchCreateTopicReviewedAnswerInput; + +mod _batch_create_topic_reviewed_answer_input; + +mod _batch_create_topic_reviewed_answer_output; + +/// Builders +pub mod builders; diff --git a/sdk/quicksight/src/operation/batch_create_topic_reviewed_answer/_batch_create_topic_reviewed_answer_input.rs b/sdk/quicksight/src/operation/batch_create_topic_reviewed_answer/_batch_create_topic_reviewed_answer_input.rs new file mode 100644 index 000000000000..e9b94421d0ff --- /dev/null +++ b/sdk/quicksight/src/operation/batch_create_topic_reviewed_answer/_batch_create_topic_reviewed_answer_input.rs @@ -0,0 +1,110 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct BatchCreateTopicReviewedAnswerInput { + ///

    The ID of the Amazon Web Services account that you want to create a reviewed answer in.

    + pub aws_account_id: ::std::option::Option<::std::string::String>, + ///

    The ID for the topic reviewed answer that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub topic_id: ::std::option::Option<::std::string::String>, + ///

    The definition of the Answers to be created.

    + pub answers: ::std::option::Option<::std::vec::Vec>, +} +impl BatchCreateTopicReviewedAnswerInput { + ///

    The ID of the Amazon Web Services account that you want to create a reviewed answer in.

    + pub fn aws_account_id(&self) -> ::std::option::Option<&str> { + self.aws_account_id.as_deref() + } + ///

    The ID for the topic reviewed answer that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn topic_id(&self) -> ::std::option::Option<&str> { + self.topic_id.as_deref() + } + ///

    The definition of the Answers to be created.

    + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.answers.is_none()`. + pub fn answers(&self) -> &[crate::types::CreateTopicReviewedAnswer] { + self.answers.as_deref().unwrap_or_default() + } +} +impl BatchCreateTopicReviewedAnswerInput { + /// Creates a new builder-style object to manufacture [`BatchCreateTopicReviewedAnswerInput`](crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerInput). + pub fn builder() -> crate::operation::batch_create_topic_reviewed_answer::builders::BatchCreateTopicReviewedAnswerInputBuilder { + crate::operation::batch_create_topic_reviewed_answer::builders::BatchCreateTopicReviewedAnswerInputBuilder::default() + } +} + +/// A builder for [`BatchCreateTopicReviewedAnswerInput`](crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerInput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct BatchCreateTopicReviewedAnswerInputBuilder { + pub(crate) aws_account_id: ::std::option::Option<::std::string::String>, + pub(crate) topic_id: ::std::option::Option<::std::string::String>, + pub(crate) answers: ::std::option::Option<::std::vec::Vec>, +} +impl BatchCreateTopicReviewedAnswerInputBuilder { + ///

    The ID of the Amazon Web Services account that you want to create a reviewed answer in.

    + /// This field is required. + pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.aws_account_id = ::std::option::Option::Some(input.into()); + self + } + ///

    The ID of the Amazon Web Services account that you want to create a reviewed answer in.

    + pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.aws_account_id = input; + self + } + ///

    The ID of the Amazon Web Services account that you want to create a reviewed answer in.

    + pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> { + &self.aws_account_id + } + ///

    The ID for the topic reviewed answer that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + /// This field is required. + pub fn topic_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.topic_id = ::std::option::Option::Some(input.into()); + self + } + ///

    The ID for the topic reviewed answer that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn set_topic_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.topic_id = input; + self + } + ///

    The ID for the topic reviewed answer that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn get_topic_id(&self) -> &::std::option::Option<::std::string::String> { + &self.topic_id + } + /// Appends an item to `answers`. + /// + /// To override the contents of this collection use [`set_answers`](Self::set_answers). + /// + ///

    The definition of the Answers to be created.

    + pub fn answers(mut self, input: crate::types::CreateTopicReviewedAnswer) -> Self { + let mut v = self.answers.unwrap_or_default(); + v.push(input); + self.answers = ::std::option::Option::Some(v); + self + } + ///

    The definition of the Answers to be created.

    + pub fn set_answers(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.answers = input; + self + } + ///

    The definition of the Answers to be created.

    + pub fn get_answers(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.answers + } + /// Consumes the builder and constructs a [`BatchCreateTopicReviewedAnswerInput`](crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok( + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerInput { + aws_account_id: self.aws_account_id, + topic_id: self.topic_id, + answers: self.answers, + }, + ) + } +} diff --git a/sdk/quicksight/src/operation/batch_create_topic_reviewed_answer/_batch_create_topic_reviewed_answer_output.rs b/sdk/quicksight/src/operation/batch_create_topic_reviewed_answer/_batch_create_topic_reviewed_answer_output.rs new file mode 100644 index 000000000000..65ebbab85c26 --- /dev/null +++ b/sdk/quicksight/src/operation/batch_create_topic_reviewed_answer/_batch_create_topic_reviewed_answer_output.rs @@ -0,0 +1,192 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct BatchCreateTopicReviewedAnswerOutput { + ///

    The ID for the topic reviewed answer that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub topic_id: ::std::option::Option<::std::string::String>, + ///

    The Amazon Resource Name (ARN) of the topic.

    + pub topic_arn: ::std::option::Option<::std::string::String>, + ///

    The definition of Answers that are successfully created.

    + pub succeeded_answers: ::std::option::Option<::std::vec::Vec>, + ///

    The definition of Answers that are invalid and not created.

    + pub invalid_answers: ::std::option::Option<::std::vec::Vec>, + ///

    The HTTP status of the request.

    + pub status: i32, + ///

    The Amazon Web Services request ID for this operation.

    + pub request_id: ::std::option::Option<::std::string::String>, + _request_id: Option, +} +impl BatchCreateTopicReviewedAnswerOutput { + ///

    The ID for the topic reviewed answer that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn topic_id(&self) -> ::std::option::Option<&str> { + self.topic_id.as_deref() + } + ///

    The Amazon Resource Name (ARN) of the topic.

    + pub fn topic_arn(&self) -> ::std::option::Option<&str> { + self.topic_arn.as_deref() + } + ///

    The definition of Answers that are successfully created.

    + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.succeeded_answers.is_none()`. + pub fn succeeded_answers(&self) -> &[crate::types::SucceededTopicReviewedAnswer] { + self.succeeded_answers.as_deref().unwrap_or_default() + } + ///

    The definition of Answers that are invalid and not created.

    + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.invalid_answers.is_none()`. + pub fn invalid_answers(&self) -> &[crate::types::InvalidTopicReviewedAnswer] { + self.invalid_answers.as_deref().unwrap_or_default() + } + ///

    The HTTP status of the request.

    + pub fn status(&self) -> i32 { + self.status + } + ///

    The Amazon Web Services request ID for this operation.

    + pub fn request_id(&self) -> ::std::option::Option<&str> { + self.request_id.as_deref() + } +} +impl ::aws_types::request_id::RequestId for BatchCreateTopicReviewedAnswerOutput { + fn request_id(&self) -> Option<&str> { + self._request_id.as_deref() + } +} +impl BatchCreateTopicReviewedAnswerOutput { + /// Creates a new builder-style object to manufacture [`BatchCreateTopicReviewedAnswerOutput`](crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerOutput). + pub fn builder() -> crate::operation::batch_create_topic_reviewed_answer::builders::BatchCreateTopicReviewedAnswerOutputBuilder { + crate::operation::batch_create_topic_reviewed_answer::builders::BatchCreateTopicReviewedAnswerOutputBuilder::default() + } +} + +/// A builder for [`BatchCreateTopicReviewedAnswerOutput`](crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerOutput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct BatchCreateTopicReviewedAnswerOutputBuilder { + pub(crate) topic_id: ::std::option::Option<::std::string::String>, + pub(crate) topic_arn: ::std::option::Option<::std::string::String>, + pub(crate) succeeded_answers: ::std::option::Option<::std::vec::Vec>, + pub(crate) invalid_answers: ::std::option::Option<::std::vec::Vec>, + pub(crate) status: ::std::option::Option, + pub(crate) request_id: ::std::option::Option<::std::string::String>, + _request_id: Option, +} +impl BatchCreateTopicReviewedAnswerOutputBuilder { + ///

    The ID for the topic reviewed answer that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn topic_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.topic_id = ::std::option::Option::Some(input.into()); + self + } + ///

    The ID for the topic reviewed answer that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn set_topic_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.topic_id = input; + self + } + ///

    The ID for the topic reviewed answer that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn get_topic_id(&self) -> &::std::option::Option<::std::string::String> { + &self.topic_id + } + ///

    The Amazon Resource Name (ARN) of the topic.

    + pub fn topic_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.topic_arn = ::std::option::Option::Some(input.into()); + self + } + ///

    The Amazon Resource Name (ARN) of the topic.

    + pub fn set_topic_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.topic_arn = input; + self + } + ///

    The Amazon Resource Name (ARN) of the topic.

    + pub fn get_topic_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.topic_arn + } + /// Appends an item to `succeeded_answers`. + /// + /// To override the contents of this collection use [`set_succeeded_answers`](Self::set_succeeded_answers). + /// + ///

    The definition of Answers that are successfully created.

    + pub fn succeeded_answers(mut self, input: crate::types::SucceededTopicReviewedAnswer) -> Self { + let mut v = self.succeeded_answers.unwrap_or_default(); + v.push(input); + self.succeeded_answers = ::std::option::Option::Some(v); + self + } + ///

    The definition of Answers that are successfully created.

    + pub fn set_succeeded_answers(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.succeeded_answers = input; + self + } + ///

    The definition of Answers that are successfully created.

    + pub fn get_succeeded_answers(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.succeeded_answers + } + /// Appends an item to `invalid_answers`. + /// + /// To override the contents of this collection use [`set_invalid_answers`](Self::set_invalid_answers). + /// + ///

    The definition of Answers that are invalid and not created.

    + pub fn invalid_answers(mut self, input: crate::types::InvalidTopicReviewedAnswer) -> Self { + let mut v = self.invalid_answers.unwrap_or_default(); + v.push(input); + self.invalid_answers = ::std::option::Option::Some(v); + self + } + ///

    The definition of Answers that are invalid and not created.

    + pub fn set_invalid_answers(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.invalid_answers = input; + self + } + ///

    The definition of Answers that are invalid and not created.

    + pub fn get_invalid_answers(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.invalid_answers + } + ///

    The HTTP status of the request.

    + pub fn status(mut self, input: i32) -> Self { + self.status = ::std::option::Option::Some(input); + self + } + ///

    The HTTP status of the request.

    + pub fn set_status(mut self, input: ::std::option::Option) -> Self { + self.status = input; + self + } + ///

    The HTTP status of the request.

    + pub fn get_status(&self) -> &::std::option::Option { + &self.status + } + ///

    The Amazon Web Services request ID for this operation.

    + pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.request_id = ::std::option::Option::Some(input.into()); + self + } + ///

    The Amazon Web Services request ID for this operation.

    + pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.request_id = input; + self + } + ///

    The Amazon Web Services request ID for this operation.

    + pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> { + &self.request_id + } + pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { + self._request_id = Some(request_id.into()); + self + } + + pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { + self._request_id = request_id; + self + } + /// Consumes the builder and constructs a [`BatchCreateTopicReviewedAnswerOutput`](crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerOutput). + pub fn build(self) -> crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerOutput { + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerOutput { + topic_id: self.topic_id, + topic_arn: self.topic_arn, + succeeded_answers: self.succeeded_answers, + invalid_answers: self.invalid_answers, + status: self.status.unwrap_or_default(), + request_id: self.request_id, + _request_id: self._request_id, + } + } +} diff --git a/sdk/quicksight/src/operation/batch_create_topic_reviewed_answer/builders.rs b/sdk/quicksight/src/operation/batch_create_topic_reviewed_answer/builders.rs new file mode 100644 index 000000000000..e39e31a94d82 --- /dev/null +++ b/sdk/quicksight/src/operation/batch_create_topic_reviewed_answer/builders.rs @@ -0,0 +1,158 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub use crate::operation::batch_create_topic_reviewed_answer::_batch_create_topic_reviewed_answer_output::BatchCreateTopicReviewedAnswerOutputBuilder; + +pub use crate::operation::batch_create_topic_reviewed_answer::_batch_create_topic_reviewed_answer_input::BatchCreateTopicReviewedAnswerInputBuilder; + +impl crate::operation::batch_create_topic_reviewed_answer::builders::BatchCreateTopicReviewedAnswerInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::Client, + ) -> ::std::result::Result< + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let mut fluent_builder = client.batch_create_topic_reviewed_answer(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `BatchCreateTopicReviewedAnswer`. +/// +///

    Creates new reviewed answers for a Q Topic.

    +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct BatchCreateTopicReviewedAnswerFluentBuilder { + handle: ::std::sync::Arc, + inner: crate::operation::batch_create_topic_reviewed_answer::builders::BatchCreateTopicReviewedAnswerInputBuilder, + config_override: ::std::option::Option, +} +impl + crate::client::customize::internal::CustomizableSend< + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerOutput, + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError, + > for BatchCreateTopicReviewedAnswerFluentBuilder +{ + fn send( + self, + config_override: crate::config::Builder, + ) -> crate::client::customize::internal::BoxFuture< + crate::client::customize::internal::SendResult< + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerOutput, + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError, + >, + > { + ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) + } +} +impl BatchCreateTopicReviewedAnswerFluentBuilder { + /// Creates a new `BatchCreateTopicReviewedAnswerFluentBuilder`. + pub(crate) fn new(handle: ::std::sync::Arc) -> Self { + Self { + handle, + inner: ::std::default::Default::default(), + config_override: ::std::option::Option::None, + } + } + /// Access the BatchCreateTopicReviewedAnswer as a reference. + pub fn as_input(&self) -> &crate::operation::batch_create_topic_reviewed_answer::builders::BatchCreateTopicReviewedAnswerInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + /// + /// If an error occurs, an `SdkError` will be returned with additional details that + /// can be matched against. + /// + /// By default, any retryable failures will be retried twice. Retry behavior + /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be + /// set when configuring the client. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let input = self + .inner + .build() + .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; + let runtime_plugins = crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswer::operation_runtime_plugins( + self.handle.runtime_plugins.clone(), + &self.handle.conf, + self.config_override, + ); + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswer::orchestrate(&runtime_plugins, input).await + } + + /// Consumes this builder, creating a customizable operation that can be modified before being sent. + pub fn customize( + self, + ) -> crate::client::customize::CustomizableOperation< + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerOutput, + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError, + Self, + > { + crate::client::customize::CustomizableOperation::new(self) + } + pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into) -> Self { + self.set_config_override(::std::option::Option::Some(config_override.into())); + self + } + + pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option) -> &mut Self { + self.config_override = config_override; + self + } + ///

    The ID of the Amazon Web Services account that you want to create a reviewed answer in.

    + pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.aws_account_id(input.into()); + self + } + ///

    The ID of the Amazon Web Services account that you want to create a reviewed answer in.

    + pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_aws_account_id(input); + self + } + ///

    The ID of the Amazon Web Services account that you want to create a reviewed answer in.

    + pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_aws_account_id() + } + ///

    The ID for the topic reviewed answer that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn topic_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.topic_id(input.into()); + self + } + ///

    The ID for the topic reviewed answer that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn set_topic_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_topic_id(input); + self + } + ///

    The ID for the topic reviewed answer that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn get_topic_id(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_topic_id() + } + /// + /// Appends an item to `Answers`. + /// + /// To override the contents of this collection use [`set_answers`](Self::set_answers). + /// + ///

    The definition of the Answers to be created.

    + pub fn answers(mut self, input: crate::types::CreateTopicReviewedAnswer) -> Self { + self.inner = self.inner.answers(input); + self + } + ///

    The definition of the Answers to be created.

    + pub fn set_answers(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.inner = self.inner.set_answers(input); + self + } + ///

    The definition of the Answers to be created.

    + pub fn get_answers(&self) -> &::std::option::Option<::std::vec::Vec> { + self.inner.get_answers() + } +} diff --git a/sdk/quicksight/src/operation/batch_delete_topic_reviewed_answer.rs b/sdk/quicksight/src/operation/batch_delete_topic_reviewed_answer.rs new file mode 100644 index 000000000000..5f346f9fafe5 --- /dev/null +++ b/sdk/quicksight/src/operation/batch_delete_topic_reviewed_answer.rs @@ -0,0 +1,439 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +/// Orchestration and serialization glue logic for `BatchDeleteTopicReviewedAnswer`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct BatchDeleteTopicReviewedAnswer; +impl BatchDeleteTopicReviewedAnswer { + /// Creates a new `BatchDeleteTopicReviewedAnswer` + pub fn new() -> Self { + Self + } + pub(crate) async fn orchestrate( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerInput, + ) -> ::std::result::Result< + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< + ::aws_smithy_runtime_api::client::interceptors::context::Error, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >| { + err.map_service_error(|err| { + err.downcast::() + .expect("correct error type") + }) + }; + let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) + .await + .map_err(map_err)?; + let output = context.finalize().map_err(map_err)?; + ::std::result::Result::Ok( + output + .downcast::() + .expect("correct output type"), + ) + } + + pub(crate) async fn orchestrate_with_stop_point( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerInput, + stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, + ) -> ::std::result::Result< + ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, + ::aws_smithy_runtime_api::client::result::SdkError< + ::aws_smithy_runtime_api::client::interceptors::context::Error, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); + ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point( + "quicksight", + "BatchDeleteTopicReviewedAnswer", + input, + runtime_plugins, + stop_point, + ) + .await + } + + pub(crate) fn operation_runtime_plugins( + client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + client_config: &crate::config::Config, + config_override: ::std::option::Option, + ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { + let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); + runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ + ::aws_runtime::auth::sigv4::SCHEME_ID, + ])); + if let ::std::option::Option::Some(config_override) = config_override { + for plugin in config_override.runtime_plugins.iter().cloned() { + runtime_plugins = runtime_plugins.with_operation_plugin(plugin); + } + runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( + config_override, + client_config.config.clone(), + &client_config.runtime_components, + )); + } + runtime_plugins + } +} +impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for BatchDeleteTopicReviewedAnswer { + fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { + let mut cfg = ::aws_smithy_types::config_bag::Layer::new("BatchDeleteTopicReviewedAnswer"); + + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( + BatchDeleteTopicReviewedAnswerRequestSerializer, + )); + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( + BatchDeleteTopicReviewedAnswerResponseDeserializer, + )); + + cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( + ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), + )); + + cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( + "BatchDeleteTopicReviewedAnswer", + "quicksight", + )); + let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); + signing_options.double_uri_encode = true; + signing_options.content_sha256_header = false; + signing_options.normalize_uri_path = true; + signing_options.payload_override = None; + + cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { + signing_options, + ..::std::default::Default::default() + }); + + ::std::option::Option::Some(cfg.freeze()) + } + + fn runtime_components( + &self, + _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, + ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { + #[allow(unused_mut)] + let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("BatchDeleteTopicReviewedAnswer") + .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default()) + .with_interceptor(BatchDeleteTopicReviewedAnswerEndpointParamsInterceptor) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError, + >::new()) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError, + >::new()) + .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError, + >::new()); + + ::std::borrow::Cow::Owned(rcb) + } +} + +#[derive(Debug)] +struct BatchDeleteTopicReviewedAnswerResponseDeserializer; +impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for BatchDeleteTopicReviewedAnswerResponseDeserializer { + fn deserialize_nonstreaming( + &self, + response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { + let (success, status) = (response.status().is_success(), response.status().as_u16()); + let headers = response.headers(); + let body = response.body().bytes().expect("body loaded"); + #[allow(unused_mut)] + let mut force_error = false; + ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); + let parse_result = if !success && status != 200 || force_error { + crate::protocol_serde::shape_batch_delete_topic_reviewed_answer::de_batch_delete_topic_reviewed_answer_http_error(status, headers, body) + } else { + crate::protocol_serde::shape_batch_delete_topic_reviewed_answer::de_batch_delete_topic_reviewed_answer_http_response( + status, headers, body, + ) + }; + crate::protocol_serde::type_erase_result(parse_result) + } +} +#[derive(Debug)] +struct BatchDeleteTopicReviewedAnswerRequestSerializer; +impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for BatchDeleteTopicReviewedAnswerRequestSerializer { + #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] + fn serialize_input( + &self, + input: ::aws_smithy_runtime_api::client::interceptors::context::Input, + _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, + ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { + let input = input + .downcast::() + .expect("correct type"); + let _header_serialization_settings = _cfg + .load::() + .cloned() + .unwrap_or_default(); + let mut request_builder = { + fn uri_base( + _input: &crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerInput, + output: &mut ::std::string::String, + ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { + use ::std::fmt::Write as _; + let input_1 = &_input.aws_account_id; + let input_1 = input_1 + .as_ref() + .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("aws_account_id", "cannot be empty or unset"))?; + let aws_account_id = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default); + if aws_account_id.is_empty() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "aws_account_id", + "cannot be empty or unset", + )); + } + let input_2 = &_input.topic_id; + let input_2 = input_2 + .as_ref() + .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("topic_id", "cannot be empty or unset"))?; + let topic_id = ::aws_smithy_http::label::fmt_string(input_2, ::aws_smithy_http::label::EncodingStrategy::Default); + if topic_id.is_empty() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "topic_id", + "cannot be empty or unset", + )); + } + ::std::write!( + output, + "/accounts/{AwsAccountId}/topics/{TopicId}/batch-delete-reviewed-answers", + AwsAccountId = aws_account_id, + TopicId = topic_id + ) + .expect("formatting should succeed"); + ::std::result::Result::Ok(()) + } + #[allow(clippy::unnecessary_wraps)] + fn update_http_builder( + input: &crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerInput, + builder: ::http::request::Builder, + ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { + let mut uri = ::std::string::String::new(); + uri_base(input, &mut uri)?; + ::std::result::Result::Ok(builder.method("POST").uri(uri)) + } + let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; + builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json"); + builder + }; + let body = ::aws_smithy_types::body::SdkBody::from( + crate::protocol_serde::shape_batch_delete_topic_reviewed_answer::ser_batch_delete_topic_reviewed_answer_input(&input)?, + ); + if let Some(content_length) = body.content_length() { + let content_length = content_length.to_string(); + request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length); + } + ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) + } +} +#[derive(Debug)] +struct BatchDeleteTopicReviewedAnswerEndpointParamsInterceptor; + +impl ::aws_smithy_runtime_api::client::interceptors::Intercept for BatchDeleteTopicReviewedAnswerEndpointParamsInterceptor { + fn name(&self) -> &'static str { + "BatchDeleteTopicReviewedAnswerEndpointParamsInterceptor" + } + + fn read_before_execution( + &self, + context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< + '_, + ::aws_smithy_runtime_api::client::interceptors::context::Input, + ::aws_smithy_runtime_api::client::interceptors::context::Output, + ::aws_smithy_runtime_api::client::interceptors::context::Error, + >, + cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, + ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { + let _input = context + .input() + .downcast_ref::() + .ok_or("failed to downcast to BatchDeleteTopicReviewedAnswerInput")?; + + let params = crate::config::endpoint::Params::builder() + .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) + .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) + .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) + .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) + .build() + .map_err(|err| { + ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) + })?; + cfg.interceptor_state() + .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); + ::std::result::Result::Ok(()) + } +} + +/// Error type for the `BatchDeleteTopicReviewedAnswerError` operation. +#[non_exhaustive] +#[derive(::std::fmt::Debug)] +pub enum BatchDeleteTopicReviewedAnswerError { + ///

    You don't have access to this item. The provided credentials couldn't be validated. You might not be authorized to carry out the request. Make sure that your account is authorized to use the Amazon QuickSight service, that your policies have the correct permissions, and that you are using the correct credentials.

    + AccessDeniedException(crate::types::error::AccessDeniedException), + ///

    Updating or deleting a resource can cause an inconsistent state.

    + ConflictException(crate::types::error::ConflictException), + ///

    An internal failure occurred.

    + InternalFailureException(crate::types::error::InternalFailureException), + ///

    One or more parameters has a value that isn't valid.

    + InvalidParameterValueException(crate::types::error::InvalidParameterValueException), + ///

    One or more resources can't be found.

    + ResourceNotFoundException(crate::types::error::ResourceNotFoundException), + ///

    Access is throttled.

    + ThrottlingException(crate::types::error::ThrottlingException), + /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). + #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ + variable wildcard pattern and check `.code()`: + \ +    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` + \ + See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-BatchDeleteTopicReviewedAnswerError) for what information is available for the error.")] + Unhandled(crate::error::sealed_unhandled::Unhandled), +} +impl BatchDeleteTopicReviewedAnswerError { + /// Creates the `BatchDeleteTopicReviewedAnswerError::Unhandled` variant from any error type. + pub fn unhandled( + err: impl ::std::convert::Into<::std::boxed::Box>, + ) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source: err.into(), + meta: ::std::default::Default::default(), + }) + } + + /// Creates the `BatchDeleteTopicReviewedAnswerError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). + pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source: err.clone().into(), + meta: err, + }) + } + /// + /// Returns error metadata, which includes the error code, message, + /// request ID, and potentially additional information. + /// + pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InternalFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InvalidParameterValueException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::Unhandled(e) => &e.meta, + } + } + /// Returns `true` if the error kind is `BatchDeleteTopicReviewedAnswerError::AccessDeniedException`. + pub fn is_access_denied_exception(&self) -> bool { + matches!(self, Self::AccessDeniedException(_)) + } + /// Returns `true` if the error kind is `BatchDeleteTopicReviewedAnswerError::ConflictException`. + pub fn is_conflict_exception(&self) -> bool { + matches!(self, Self::ConflictException(_)) + } + /// Returns `true` if the error kind is `BatchDeleteTopicReviewedAnswerError::InternalFailureException`. + pub fn is_internal_failure_exception(&self) -> bool { + matches!(self, Self::InternalFailureException(_)) + } + /// Returns `true` if the error kind is `BatchDeleteTopicReviewedAnswerError::InvalidParameterValueException`. + pub fn is_invalid_parameter_value_exception(&self) -> bool { + matches!(self, Self::InvalidParameterValueException(_)) + } + /// Returns `true` if the error kind is `BatchDeleteTopicReviewedAnswerError::ResourceNotFoundException`. + pub fn is_resource_not_found_exception(&self) -> bool { + matches!(self, Self::ResourceNotFoundException(_)) + } + /// Returns `true` if the error kind is `BatchDeleteTopicReviewedAnswerError::ThrottlingException`. + pub fn is_throttling_exception(&self) -> bool { + matches!(self, Self::ThrottlingException(_)) + } +} +impl ::std::error::Error for BatchDeleteTopicReviewedAnswerError { + fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { + match self { + Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), + Self::ConflictException(_inner) => ::std::option::Option::Some(_inner), + Self::InternalFailureException(_inner) => ::std::option::Option::Some(_inner), + Self::InvalidParameterValueException(_inner) => ::std::option::Option::Some(_inner), + Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), + Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), + Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), + } + } +} +impl ::std::fmt::Display for BatchDeleteTopicReviewedAnswerError { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match self { + Self::AccessDeniedException(_inner) => _inner.fmt(f), + Self::ConflictException(_inner) => _inner.fmt(f), + Self::InternalFailureException(_inner) => _inner.fmt(f), + Self::InvalidParameterValueException(_inner) => _inner.fmt(f), + Self::ResourceNotFoundException(_inner) => _inner.fmt(f), + Self::ThrottlingException(_inner) => _inner.fmt(f), + Self::Unhandled(_inner) => { + if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { + write!(f, "unhandled error ({code})") + } else { + f.write_str("unhandled error") + } + } + } + } +} +impl ::aws_smithy_types::retry::ProvideErrorKind for BatchDeleteTopicReviewedAnswerError { + fn code(&self) -> ::std::option::Option<&str> { + ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) + } + fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { + ::std::option::Option::None + } +} +impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for BatchDeleteTopicReviewedAnswerError { + fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InternalFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InvalidParameterValueException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::Unhandled(_inner) => &_inner.meta, + } + } +} +impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for BatchDeleteTopicReviewedAnswerError { + fn create_unhandled_error( + source: ::std::boxed::Box, + meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, + ) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source, + meta: meta.unwrap_or_default(), + }) + } +} +impl ::aws_types::request_id::RequestId for crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError { + fn request_id(&self) -> Option<&str> { + self.meta().request_id() + } +} + +pub use crate::operation::batch_delete_topic_reviewed_answer::_batch_delete_topic_reviewed_answer_output::BatchDeleteTopicReviewedAnswerOutput; + +pub use crate::operation::batch_delete_topic_reviewed_answer::_batch_delete_topic_reviewed_answer_input::BatchDeleteTopicReviewedAnswerInput; + +mod _batch_delete_topic_reviewed_answer_input; + +mod _batch_delete_topic_reviewed_answer_output; + +/// Builders +pub mod builders; diff --git a/sdk/quicksight/src/operation/batch_delete_topic_reviewed_answer/_batch_delete_topic_reviewed_answer_input.rs b/sdk/quicksight/src/operation/batch_delete_topic_reviewed_answer/_batch_delete_topic_reviewed_answer_input.rs new file mode 100644 index 000000000000..65dad1fb5649 --- /dev/null +++ b/sdk/quicksight/src/operation/batch_delete_topic_reviewed_answer/_batch_delete_topic_reviewed_answer_input.rs @@ -0,0 +1,110 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct BatchDeleteTopicReviewedAnswerInput { + ///

    The ID of the Amazon Web Services account that you want to delete a reviewed answers in.

    + pub aws_account_id: ::std::option::Option<::std::string::String>, + ///

    The ID for the topic reviewed answer that you want to delete. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub topic_id: ::std::option::Option<::std::string::String>, + ///

    The Answer IDs of the Answers to be deleted.

    + pub answer_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl BatchDeleteTopicReviewedAnswerInput { + ///

    The ID of the Amazon Web Services account that you want to delete a reviewed answers in.

    + pub fn aws_account_id(&self) -> ::std::option::Option<&str> { + self.aws_account_id.as_deref() + } + ///

    The ID for the topic reviewed answer that you want to delete. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn topic_id(&self) -> ::std::option::Option<&str> { + self.topic_id.as_deref() + } + ///

    The Answer IDs of the Answers to be deleted.

    + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.answer_ids.is_none()`. + pub fn answer_ids(&self) -> &[::std::string::String] { + self.answer_ids.as_deref().unwrap_or_default() + } +} +impl BatchDeleteTopicReviewedAnswerInput { + /// Creates a new builder-style object to manufacture [`BatchDeleteTopicReviewedAnswerInput`](crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerInput). + pub fn builder() -> crate::operation::batch_delete_topic_reviewed_answer::builders::BatchDeleteTopicReviewedAnswerInputBuilder { + crate::operation::batch_delete_topic_reviewed_answer::builders::BatchDeleteTopicReviewedAnswerInputBuilder::default() + } +} + +/// A builder for [`BatchDeleteTopicReviewedAnswerInput`](crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerInput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct BatchDeleteTopicReviewedAnswerInputBuilder { + pub(crate) aws_account_id: ::std::option::Option<::std::string::String>, + pub(crate) topic_id: ::std::option::Option<::std::string::String>, + pub(crate) answer_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl BatchDeleteTopicReviewedAnswerInputBuilder { + ///

    The ID of the Amazon Web Services account that you want to delete a reviewed answers in.

    + /// This field is required. + pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.aws_account_id = ::std::option::Option::Some(input.into()); + self + } + ///

    The ID of the Amazon Web Services account that you want to delete a reviewed answers in.

    + pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.aws_account_id = input; + self + } + ///

    The ID of the Amazon Web Services account that you want to delete a reviewed answers in.

    + pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> { + &self.aws_account_id + } + ///

    The ID for the topic reviewed answer that you want to delete. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + /// This field is required. + pub fn topic_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.topic_id = ::std::option::Option::Some(input.into()); + self + } + ///

    The ID for the topic reviewed answer that you want to delete. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn set_topic_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.topic_id = input; + self + } + ///

    The ID for the topic reviewed answer that you want to delete. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn get_topic_id(&self) -> &::std::option::Option<::std::string::String> { + &self.topic_id + } + /// Appends an item to `answer_ids`. + /// + /// To override the contents of this collection use [`set_answer_ids`](Self::set_answer_ids). + /// + ///

    The Answer IDs of the Answers to be deleted.

    + pub fn answer_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + let mut v = self.answer_ids.unwrap_or_default(); + v.push(input.into()); + self.answer_ids = ::std::option::Option::Some(v); + self + } + ///

    The Answer IDs of the Answers to be deleted.

    + pub fn set_answer_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.answer_ids = input; + self + } + ///

    The Answer IDs of the Answers to be deleted.

    + pub fn get_answer_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.answer_ids + } + /// Consumes the builder and constructs a [`BatchDeleteTopicReviewedAnswerInput`](crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok( + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerInput { + aws_account_id: self.aws_account_id, + topic_id: self.topic_id, + answer_ids: self.answer_ids, + }, + ) + } +} diff --git a/sdk/quicksight/src/operation/batch_delete_topic_reviewed_answer/_batch_delete_topic_reviewed_answer_output.rs b/sdk/quicksight/src/operation/batch_delete_topic_reviewed_answer/_batch_delete_topic_reviewed_answer_output.rs new file mode 100644 index 000000000000..19a6ed075f5a --- /dev/null +++ b/sdk/quicksight/src/operation/batch_delete_topic_reviewed_answer/_batch_delete_topic_reviewed_answer_output.rs @@ -0,0 +1,192 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct BatchDeleteTopicReviewedAnswerOutput { + ///

    The ID of the topic reviewed answer that you want to delete. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub topic_id: ::std::option::Option<::std::string::String>, + ///

    The Amazon Resource Name (ARN) of the topic.

    + pub topic_arn: ::std::option::Option<::std::string::String>, + ///

    The definition of Answers that are successfully deleted.

    + pub succeeded_answers: ::std::option::Option<::std::vec::Vec>, + ///

    The definition of Answers that are invalid and not deleted.

    + pub invalid_answers: ::std::option::Option<::std::vec::Vec>, + ///

    The Amazon Web Services request ID for this operation.

    + pub request_id: ::std::option::Option<::std::string::String>, + ///

    The HTTP status of the request.

    + pub status: i32, + _request_id: Option, +} +impl BatchDeleteTopicReviewedAnswerOutput { + ///

    The ID of the topic reviewed answer that you want to delete. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn topic_id(&self) -> ::std::option::Option<&str> { + self.topic_id.as_deref() + } + ///

    The Amazon Resource Name (ARN) of the topic.

    + pub fn topic_arn(&self) -> ::std::option::Option<&str> { + self.topic_arn.as_deref() + } + ///

    The definition of Answers that are successfully deleted.

    + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.succeeded_answers.is_none()`. + pub fn succeeded_answers(&self) -> &[crate::types::SucceededTopicReviewedAnswer] { + self.succeeded_answers.as_deref().unwrap_or_default() + } + ///

    The definition of Answers that are invalid and not deleted.

    + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.invalid_answers.is_none()`. + pub fn invalid_answers(&self) -> &[crate::types::InvalidTopicReviewedAnswer] { + self.invalid_answers.as_deref().unwrap_or_default() + } + ///

    The Amazon Web Services request ID for this operation.

    + pub fn request_id(&self) -> ::std::option::Option<&str> { + self.request_id.as_deref() + } + ///

    The HTTP status of the request.

    + pub fn status(&self) -> i32 { + self.status + } +} +impl ::aws_types::request_id::RequestId for BatchDeleteTopicReviewedAnswerOutput { + fn request_id(&self) -> Option<&str> { + self._request_id.as_deref() + } +} +impl BatchDeleteTopicReviewedAnswerOutput { + /// Creates a new builder-style object to manufacture [`BatchDeleteTopicReviewedAnswerOutput`](crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerOutput). + pub fn builder() -> crate::operation::batch_delete_topic_reviewed_answer::builders::BatchDeleteTopicReviewedAnswerOutputBuilder { + crate::operation::batch_delete_topic_reviewed_answer::builders::BatchDeleteTopicReviewedAnswerOutputBuilder::default() + } +} + +/// A builder for [`BatchDeleteTopicReviewedAnswerOutput`](crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerOutput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct BatchDeleteTopicReviewedAnswerOutputBuilder { + pub(crate) topic_id: ::std::option::Option<::std::string::String>, + pub(crate) topic_arn: ::std::option::Option<::std::string::String>, + pub(crate) succeeded_answers: ::std::option::Option<::std::vec::Vec>, + pub(crate) invalid_answers: ::std::option::Option<::std::vec::Vec>, + pub(crate) request_id: ::std::option::Option<::std::string::String>, + pub(crate) status: ::std::option::Option, + _request_id: Option, +} +impl BatchDeleteTopicReviewedAnswerOutputBuilder { + ///

    The ID of the topic reviewed answer that you want to delete. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn topic_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.topic_id = ::std::option::Option::Some(input.into()); + self + } + ///

    The ID of the topic reviewed answer that you want to delete. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn set_topic_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.topic_id = input; + self + } + ///

    The ID of the topic reviewed answer that you want to delete. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn get_topic_id(&self) -> &::std::option::Option<::std::string::String> { + &self.topic_id + } + ///

    The Amazon Resource Name (ARN) of the topic.

    + pub fn topic_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.topic_arn = ::std::option::Option::Some(input.into()); + self + } + ///

    The Amazon Resource Name (ARN) of the topic.

    + pub fn set_topic_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.topic_arn = input; + self + } + ///

    The Amazon Resource Name (ARN) of the topic.

    + pub fn get_topic_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.topic_arn + } + /// Appends an item to `succeeded_answers`. + /// + /// To override the contents of this collection use [`set_succeeded_answers`](Self::set_succeeded_answers). + /// + ///

    The definition of Answers that are successfully deleted.

    + pub fn succeeded_answers(mut self, input: crate::types::SucceededTopicReviewedAnswer) -> Self { + let mut v = self.succeeded_answers.unwrap_or_default(); + v.push(input); + self.succeeded_answers = ::std::option::Option::Some(v); + self + } + ///

    The definition of Answers that are successfully deleted.

    + pub fn set_succeeded_answers(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.succeeded_answers = input; + self + } + ///

    The definition of Answers that are successfully deleted.

    + pub fn get_succeeded_answers(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.succeeded_answers + } + /// Appends an item to `invalid_answers`. + /// + /// To override the contents of this collection use [`set_invalid_answers`](Self::set_invalid_answers). + /// + ///

    The definition of Answers that are invalid and not deleted.

    + pub fn invalid_answers(mut self, input: crate::types::InvalidTopicReviewedAnswer) -> Self { + let mut v = self.invalid_answers.unwrap_or_default(); + v.push(input); + self.invalid_answers = ::std::option::Option::Some(v); + self + } + ///

    The definition of Answers that are invalid and not deleted.

    + pub fn set_invalid_answers(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.invalid_answers = input; + self + } + ///

    The definition of Answers that are invalid and not deleted.

    + pub fn get_invalid_answers(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.invalid_answers + } + ///

    The Amazon Web Services request ID for this operation.

    + pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.request_id = ::std::option::Option::Some(input.into()); + self + } + ///

    The Amazon Web Services request ID for this operation.

    + pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.request_id = input; + self + } + ///

    The Amazon Web Services request ID for this operation.

    + pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> { + &self.request_id + } + ///

    The HTTP status of the request.

    + pub fn status(mut self, input: i32) -> Self { + self.status = ::std::option::Option::Some(input); + self + } + ///

    The HTTP status of the request.

    + pub fn set_status(mut self, input: ::std::option::Option) -> Self { + self.status = input; + self + } + ///

    The HTTP status of the request.

    + pub fn get_status(&self) -> &::std::option::Option { + &self.status + } + pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { + self._request_id = Some(request_id.into()); + self + } + + pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { + self._request_id = request_id; + self + } + /// Consumes the builder and constructs a [`BatchDeleteTopicReviewedAnswerOutput`](crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerOutput). + pub fn build(self) -> crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerOutput { + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerOutput { + topic_id: self.topic_id, + topic_arn: self.topic_arn, + succeeded_answers: self.succeeded_answers, + invalid_answers: self.invalid_answers, + request_id: self.request_id, + status: self.status.unwrap_or_default(), + _request_id: self._request_id, + } + } +} diff --git a/sdk/quicksight/src/operation/batch_delete_topic_reviewed_answer/builders.rs b/sdk/quicksight/src/operation/batch_delete_topic_reviewed_answer/builders.rs new file mode 100644 index 000000000000..b00b67323e6e --- /dev/null +++ b/sdk/quicksight/src/operation/batch_delete_topic_reviewed_answer/builders.rs @@ -0,0 +1,158 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub use crate::operation::batch_delete_topic_reviewed_answer::_batch_delete_topic_reviewed_answer_output::BatchDeleteTopicReviewedAnswerOutputBuilder; + +pub use crate::operation::batch_delete_topic_reviewed_answer::_batch_delete_topic_reviewed_answer_input::BatchDeleteTopicReviewedAnswerInputBuilder; + +impl crate::operation::batch_delete_topic_reviewed_answer::builders::BatchDeleteTopicReviewedAnswerInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::Client, + ) -> ::std::result::Result< + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let mut fluent_builder = client.batch_delete_topic_reviewed_answer(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `BatchDeleteTopicReviewedAnswer`. +/// +///

    Deletes reviewed answers for Q Topic.

    +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct BatchDeleteTopicReviewedAnswerFluentBuilder { + handle: ::std::sync::Arc, + inner: crate::operation::batch_delete_topic_reviewed_answer::builders::BatchDeleteTopicReviewedAnswerInputBuilder, + config_override: ::std::option::Option, +} +impl + crate::client::customize::internal::CustomizableSend< + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerOutput, + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError, + > for BatchDeleteTopicReviewedAnswerFluentBuilder +{ + fn send( + self, + config_override: crate::config::Builder, + ) -> crate::client::customize::internal::BoxFuture< + crate::client::customize::internal::SendResult< + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerOutput, + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError, + >, + > { + ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) + } +} +impl BatchDeleteTopicReviewedAnswerFluentBuilder { + /// Creates a new `BatchDeleteTopicReviewedAnswerFluentBuilder`. + pub(crate) fn new(handle: ::std::sync::Arc) -> Self { + Self { + handle, + inner: ::std::default::Default::default(), + config_override: ::std::option::Option::None, + } + } + /// Access the BatchDeleteTopicReviewedAnswer as a reference. + pub fn as_input(&self) -> &crate::operation::batch_delete_topic_reviewed_answer::builders::BatchDeleteTopicReviewedAnswerInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + /// + /// If an error occurs, an `SdkError` will be returned with additional details that + /// can be matched against. + /// + /// By default, any retryable failures will be retried twice. Retry behavior + /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be + /// set when configuring the client. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let input = self + .inner + .build() + .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; + let runtime_plugins = crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswer::operation_runtime_plugins( + self.handle.runtime_plugins.clone(), + &self.handle.conf, + self.config_override, + ); + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswer::orchestrate(&runtime_plugins, input).await + } + + /// Consumes this builder, creating a customizable operation that can be modified before being sent. + pub fn customize( + self, + ) -> crate::client::customize::CustomizableOperation< + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerOutput, + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError, + Self, + > { + crate::client::customize::CustomizableOperation::new(self) + } + pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into) -> Self { + self.set_config_override(::std::option::Option::Some(config_override.into())); + self + } + + pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option) -> &mut Self { + self.config_override = config_override; + self + } + ///

    The ID of the Amazon Web Services account that you want to delete a reviewed answers in.

    + pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.aws_account_id(input.into()); + self + } + ///

    The ID of the Amazon Web Services account that you want to delete a reviewed answers in.

    + pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_aws_account_id(input); + self + } + ///

    The ID of the Amazon Web Services account that you want to delete a reviewed answers in.

    + pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_aws_account_id() + } + ///

    The ID for the topic reviewed answer that you want to delete. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn topic_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.topic_id(input.into()); + self + } + ///

    The ID for the topic reviewed answer that you want to delete. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn set_topic_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_topic_id(input); + self + } + ///

    The ID for the topic reviewed answer that you want to delete. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn get_topic_id(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_topic_id() + } + /// + /// Appends an item to `AnswerIds`. + /// + /// To override the contents of this collection use [`set_answer_ids`](Self::set_answer_ids). + /// + ///

    The Answer IDs of the Answers to be deleted.

    + pub fn answer_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.answer_ids(input.into()); + self + } + ///

    The Answer IDs of the Answers to be deleted.

    + pub fn set_answer_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_answer_ids(input); + self + } + ///

    The Answer IDs of the Answers to be deleted.

    + pub fn get_answer_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_answer_ids() + } +} diff --git a/sdk/quicksight/src/operation/list_topic_reviewed_answers.rs b/sdk/quicksight/src/operation/list_topic_reviewed_answers.rs new file mode 100644 index 000000000000..366ca4066129 --- /dev/null +++ b/sdk/quicksight/src/operation/list_topic_reviewed_answers.rs @@ -0,0 +1,422 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +/// Orchestration and serialization glue logic for `ListTopicReviewedAnswers`. +#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct ListTopicReviewedAnswers; +impl ListTopicReviewedAnswers { + /// Creates a new `ListTopicReviewedAnswers` + pub fn new() -> Self { + Self + } + pub(crate) async fn orchestrate( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersInput, + ) -> ::std::result::Result< + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< + ::aws_smithy_runtime_api::client::interceptors::context::Error, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >| { + err.map_service_error(|err| { + err.downcast::() + .expect("correct error type") + }) + }; + let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) + .await + .map_err(map_err)?; + let output = context.finalize().map_err(map_err)?; + ::std::result::Result::Ok( + output + .downcast::() + .expect("correct output type"), + ) + } + + pub(crate) async fn orchestrate_with_stop_point( + runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + input: crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersInput, + stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, + ) -> ::std::result::Result< + ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, + ::aws_smithy_runtime_api::client::result::SdkError< + ::aws_smithy_runtime_api::client::interceptors::context::Error, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); + ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point( + "quicksight", + "ListTopicReviewedAnswers", + input, + runtime_plugins, + stop_point, + ) + .await + } + + pub(crate) fn operation_runtime_plugins( + client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, + client_config: &crate::config::Config, + config_override: ::std::option::Option, + ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { + let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); + runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ + ::aws_runtime::auth::sigv4::SCHEME_ID, + ])); + if let ::std::option::Option::Some(config_override) = config_override { + for plugin in config_override.runtime_plugins.iter().cloned() { + runtime_plugins = runtime_plugins.with_operation_plugin(plugin); + } + runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( + config_override, + client_config.config.clone(), + &client_config.runtime_components, + )); + } + runtime_plugins + } +} +impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ListTopicReviewedAnswers { + fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { + let mut cfg = ::aws_smithy_types::config_bag::Layer::new("ListTopicReviewedAnswers"); + + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( + ListTopicReviewedAnswersRequestSerializer, + )); + cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( + ListTopicReviewedAnswersResponseDeserializer, + )); + + cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( + ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), + )); + + cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput); + cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( + "ListTopicReviewedAnswers", + "quicksight", + )); + let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); + signing_options.double_uri_encode = true; + signing_options.content_sha256_header = false; + signing_options.normalize_uri_path = true; + signing_options.payload_override = None; + + cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { + signing_options, + ..::std::default::Default::default() + }); + + ::std::option::Option::Some(cfg.freeze()) + } + + fn runtime_components( + &self, + _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, + ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { + #[allow(unused_mut)] + let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ListTopicReviewedAnswers") + .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default()) + .with_interceptor(ListTopicReviewedAnswersEndpointParamsInterceptor) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError, + >::new()) + .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError, + >::new()) + .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError, + >::new()); + + ::std::borrow::Cow::Owned(rcb) + } +} + +#[derive(Debug)] +struct ListTopicReviewedAnswersResponseDeserializer; +impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListTopicReviewedAnswersResponseDeserializer { + fn deserialize_nonstreaming( + &self, + response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { + let (success, status) = (response.status().is_success(), response.status().as_u16()); + let headers = response.headers(); + let body = response.body().bytes().expect("body loaded"); + #[allow(unused_mut)] + let mut force_error = false; + ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); + let parse_result = if !success && status != 200 || force_error { + crate::protocol_serde::shape_list_topic_reviewed_answers::de_list_topic_reviewed_answers_http_error(status, headers, body) + } else { + crate::protocol_serde::shape_list_topic_reviewed_answers::de_list_topic_reviewed_answers_http_response(status, headers, body) + }; + crate::protocol_serde::type_erase_result(parse_result) + } +} +#[derive(Debug)] +struct ListTopicReviewedAnswersRequestSerializer; +impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListTopicReviewedAnswersRequestSerializer { + #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] + fn serialize_input( + &self, + input: ::aws_smithy_runtime_api::client::interceptors::context::Input, + _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, + ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { + let input = input + .downcast::() + .expect("correct type"); + let _header_serialization_settings = _cfg + .load::() + .cloned() + .unwrap_or_default(); + let mut request_builder = { + fn uri_base( + _input: &crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersInput, + output: &mut ::std::string::String, + ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { + use ::std::fmt::Write as _; + let input_1 = &_input.aws_account_id; + let input_1 = input_1 + .as_ref() + .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("aws_account_id", "cannot be empty or unset"))?; + let aws_account_id = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default); + if aws_account_id.is_empty() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "aws_account_id", + "cannot be empty or unset", + )); + } + let input_2 = &_input.topic_id; + let input_2 = input_2 + .as_ref() + .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("topic_id", "cannot be empty or unset"))?; + let topic_id = ::aws_smithy_http::label::fmt_string(input_2, ::aws_smithy_http::label::EncodingStrategy::Default); + if topic_id.is_empty() { + return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( + "topic_id", + "cannot be empty or unset", + )); + } + ::std::write!( + output, + "/accounts/{AwsAccountId}/topics/{TopicId}/reviewed-answers", + AwsAccountId = aws_account_id, + TopicId = topic_id + ) + .expect("formatting should succeed"); + ::std::result::Result::Ok(()) + } + #[allow(clippy::unnecessary_wraps)] + fn update_http_builder( + input: &crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersInput, + builder: ::http::request::Builder, + ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { + let mut uri = ::std::string::String::new(); + uri_base(input, &mut uri)?; + ::std::result::Result::Ok(builder.method("GET").uri(uri)) + } + let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; + builder + }; + let body = ::aws_smithy_types::body::SdkBody::from(""); + + ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) + } +} +#[derive(Debug)] +struct ListTopicReviewedAnswersEndpointParamsInterceptor; + +impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListTopicReviewedAnswersEndpointParamsInterceptor { + fn name(&self) -> &'static str { + "ListTopicReviewedAnswersEndpointParamsInterceptor" + } + + fn read_before_execution( + &self, + context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< + '_, + ::aws_smithy_runtime_api::client::interceptors::context::Input, + ::aws_smithy_runtime_api::client::interceptors::context::Output, + ::aws_smithy_runtime_api::client::interceptors::context::Error, + >, + cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, + ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { + let _input = context + .input() + .downcast_ref::() + .ok_or("failed to downcast to ListTopicReviewedAnswersInput")?; + + let params = crate::config::endpoint::Params::builder() + .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) + .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) + .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) + .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) + .build() + .map_err(|err| { + ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) + })?; + cfg.interceptor_state() + .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); + ::std::result::Result::Ok(()) + } +} + +/// Error type for the `ListTopicReviewedAnswersError` operation. +#[non_exhaustive] +#[derive(::std::fmt::Debug)] +pub enum ListTopicReviewedAnswersError { + ///

    You don't have access to this item. The provided credentials couldn't be validated. You might not be authorized to carry out the request. Make sure that your account is authorized to use the Amazon QuickSight service, that your policies have the correct permissions, and that you are using the correct credentials.

    + AccessDeniedException(crate::types::error::AccessDeniedException), + ///

    An internal failure occurred.

    + InternalFailureException(crate::types::error::InternalFailureException), + ///

    One or more parameters has a value that isn't valid.

    + InvalidParameterValueException(crate::types::error::InvalidParameterValueException), + ///

    One or more resources can't be found.

    + ResourceNotFoundException(crate::types::error::ResourceNotFoundException), + ///

    Access is throttled.

    + ThrottlingException(crate::types::error::ThrottlingException), + /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). + #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ + variable wildcard pattern and check `.code()`: + \ +    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` + \ + See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ListTopicReviewedAnswersError) for what information is available for the error.")] + Unhandled(crate::error::sealed_unhandled::Unhandled), +} +impl ListTopicReviewedAnswersError { + /// Creates the `ListTopicReviewedAnswersError::Unhandled` variant from any error type. + pub fn unhandled( + err: impl ::std::convert::Into<::std::boxed::Box>, + ) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source: err.into(), + meta: ::std::default::Default::default(), + }) + } + + /// Creates the `ListTopicReviewedAnswersError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). + pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source: err.clone().into(), + meta: err, + }) + } + /// + /// Returns error metadata, which includes the error code, message, + /// request ID, and potentially additional information. + /// + pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InternalFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InvalidParameterValueException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::Unhandled(e) => &e.meta, + } + } + /// Returns `true` if the error kind is `ListTopicReviewedAnswersError::AccessDeniedException`. + pub fn is_access_denied_exception(&self) -> bool { + matches!(self, Self::AccessDeniedException(_)) + } + /// Returns `true` if the error kind is `ListTopicReviewedAnswersError::InternalFailureException`. + pub fn is_internal_failure_exception(&self) -> bool { + matches!(self, Self::InternalFailureException(_)) + } + /// Returns `true` if the error kind is `ListTopicReviewedAnswersError::InvalidParameterValueException`. + pub fn is_invalid_parameter_value_exception(&self) -> bool { + matches!(self, Self::InvalidParameterValueException(_)) + } + /// Returns `true` if the error kind is `ListTopicReviewedAnswersError::ResourceNotFoundException`. + pub fn is_resource_not_found_exception(&self) -> bool { + matches!(self, Self::ResourceNotFoundException(_)) + } + /// Returns `true` if the error kind is `ListTopicReviewedAnswersError::ThrottlingException`. + pub fn is_throttling_exception(&self) -> bool { + matches!(self, Self::ThrottlingException(_)) + } +} +impl ::std::error::Error for ListTopicReviewedAnswersError { + fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { + match self { + Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), + Self::InternalFailureException(_inner) => ::std::option::Option::Some(_inner), + Self::InvalidParameterValueException(_inner) => ::std::option::Option::Some(_inner), + Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), + Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), + Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), + } + } +} +impl ::std::fmt::Display for ListTopicReviewedAnswersError { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match self { + Self::AccessDeniedException(_inner) => _inner.fmt(f), + Self::InternalFailureException(_inner) => _inner.fmt(f), + Self::InvalidParameterValueException(_inner) => _inner.fmt(f), + Self::ResourceNotFoundException(_inner) => _inner.fmt(f), + Self::ThrottlingException(_inner) => _inner.fmt(f), + Self::Unhandled(_inner) => { + if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { + write!(f, "unhandled error ({code})") + } else { + f.write_str("unhandled error") + } + } + } + } +} +impl ::aws_smithy_types::retry::ProvideErrorKind for ListTopicReviewedAnswersError { + fn code(&self) -> ::std::option::Option<&str> { + ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) + } + fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { + ::std::option::Option::None + } +} +impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ListTopicReviewedAnswersError { + fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { + match self { + Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InternalFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InvalidParameterValueException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::Unhandled(_inner) => &_inner.meta, + } + } +} +impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ListTopicReviewedAnswersError { + fn create_unhandled_error( + source: ::std::boxed::Box, + meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, + ) -> Self { + Self::Unhandled(crate::error::sealed_unhandled::Unhandled { + source, + meta: meta.unwrap_or_default(), + }) + } +} +impl ::aws_types::request_id::RequestId for crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError { + fn request_id(&self) -> Option<&str> { + self.meta().request_id() + } +} + +pub use crate::operation::list_topic_reviewed_answers::_list_topic_reviewed_answers_output::ListTopicReviewedAnswersOutput; + +pub use crate::operation::list_topic_reviewed_answers::_list_topic_reviewed_answers_input::ListTopicReviewedAnswersInput; + +mod _list_topic_reviewed_answers_input; + +mod _list_topic_reviewed_answers_output; + +/// Builders +pub mod builders; diff --git a/sdk/quicksight/src/operation/list_topic_reviewed_answers/_list_topic_reviewed_answers_input.rs b/sdk/quicksight/src/operation/list_topic_reviewed_answers/_list_topic_reviewed_answers_input.rs new file mode 100644 index 000000000000..8769ee77c83e --- /dev/null +++ b/sdk/quicksight/src/operation/list_topic_reviewed_answers/_list_topic_reviewed_answers_input.rs @@ -0,0 +1,78 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct ListTopicReviewedAnswersInput { + ///

    The ID of the Amazon Web Services account that containd the reviewed answers that you want listed.

    + pub aws_account_id: ::std::option::Option<::std::string::String>, + ///

    The ID for the topic that contains the reviewed answer that you want to list. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub topic_id: ::std::option::Option<::std::string::String>, +} +impl ListTopicReviewedAnswersInput { + ///

    The ID of the Amazon Web Services account that containd the reviewed answers that you want listed.

    + pub fn aws_account_id(&self) -> ::std::option::Option<&str> { + self.aws_account_id.as_deref() + } + ///

    The ID for the topic that contains the reviewed answer that you want to list. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn topic_id(&self) -> ::std::option::Option<&str> { + self.topic_id.as_deref() + } +} +impl ListTopicReviewedAnswersInput { + /// Creates a new builder-style object to manufacture [`ListTopicReviewedAnswersInput`](crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersInput). + pub fn builder() -> crate::operation::list_topic_reviewed_answers::builders::ListTopicReviewedAnswersInputBuilder { + crate::operation::list_topic_reviewed_answers::builders::ListTopicReviewedAnswersInputBuilder::default() + } +} + +/// A builder for [`ListTopicReviewedAnswersInput`](crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersInput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct ListTopicReviewedAnswersInputBuilder { + pub(crate) aws_account_id: ::std::option::Option<::std::string::String>, + pub(crate) topic_id: ::std::option::Option<::std::string::String>, +} +impl ListTopicReviewedAnswersInputBuilder { + ///

    The ID of the Amazon Web Services account that containd the reviewed answers that you want listed.

    + /// This field is required. + pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.aws_account_id = ::std::option::Option::Some(input.into()); + self + } + ///

    The ID of the Amazon Web Services account that containd the reviewed answers that you want listed.

    + pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.aws_account_id = input; + self + } + ///

    The ID of the Amazon Web Services account that containd the reviewed answers that you want listed.

    + pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> { + &self.aws_account_id + } + ///

    The ID for the topic that contains the reviewed answer that you want to list. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + /// This field is required. + pub fn topic_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.topic_id = ::std::option::Option::Some(input.into()); + self + } + ///

    The ID for the topic that contains the reviewed answer that you want to list. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn set_topic_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.topic_id = input; + self + } + ///

    The ID for the topic that contains the reviewed answer that you want to list. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn get_topic_id(&self) -> &::std::option::Option<::std::string::String> { + &self.topic_id + } + /// Consumes the builder and constructs a [`ListTopicReviewedAnswersInput`](crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok(crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersInput { + aws_account_id: self.aws_account_id, + topic_id: self.topic_id, + }) + } +} diff --git a/sdk/quicksight/src/operation/list_topic_reviewed_answers/_list_topic_reviewed_answers_output.rs b/sdk/quicksight/src/operation/list_topic_reviewed_answers/_list_topic_reviewed_answers_output.rs new file mode 100644 index 000000000000..31dbf93e7485 --- /dev/null +++ b/sdk/quicksight/src/operation/list_topic_reviewed_answers/_list_topic_reviewed_answers_output.rs @@ -0,0 +1,162 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct ListTopicReviewedAnswersOutput { + ///

    The ID for the topic that contains the reviewed answer that you want to list. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub topic_id: ::std::option::Option<::std::string::String>, + ///

    The Amazon Resource Name (ARN) of the topic.

    + pub topic_arn: ::std::option::Option<::std::string::String>, + ///

    The definition of all Answers in the topic.

    + pub answers: ::std::option::Option<::std::vec::Vec>, + ///

    The HTTP status of the request.

    + pub status: i32, + ///

    The Amazon Web Services request ID for this operation.

    + pub request_id: ::std::option::Option<::std::string::String>, + _request_id: Option, +} +impl ListTopicReviewedAnswersOutput { + ///

    The ID for the topic that contains the reviewed answer that you want to list. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn topic_id(&self) -> ::std::option::Option<&str> { + self.topic_id.as_deref() + } + ///

    The Amazon Resource Name (ARN) of the topic.

    + pub fn topic_arn(&self) -> ::std::option::Option<&str> { + self.topic_arn.as_deref() + } + ///

    The definition of all Answers in the topic.

    + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.answers.is_none()`. + pub fn answers(&self) -> &[crate::types::TopicReviewedAnswer] { + self.answers.as_deref().unwrap_or_default() + } + ///

    The HTTP status of the request.

    + pub fn status(&self) -> i32 { + self.status + } + ///

    The Amazon Web Services request ID for this operation.

    + pub fn request_id(&self) -> ::std::option::Option<&str> { + self.request_id.as_deref() + } +} +impl ::aws_types::request_id::RequestId for ListTopicReviewedAnswersOutput { + fn request_id(&self) -> Option<&str> { + self._request_id.as_deref() + } +} +impl ListTopicReviewedAnswersOutput { + /// Creates a new builder-style object to manufacture [`ListTopicReviewedAnswersOutput`](crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersOutput). + pub fn builder() -> crate::operation::list_topic_reviewed_answers::builders::ListTopicReviewedAnswersOutputBuilder { + crate::operation::list_topic_reviewed_answers::builders::ListTopicReviewedAnswersOutputBuilder::default() + } +} + +/// A builder for [`ListTopicReviewedAnswersOutput`](crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersOutput). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct ListTopicReviewedAnswersOutputBuilder { + pub(crate) topic_id: ::std::option::Option<::std::string::String>, + pub(crate) topic_arn: ::std::option::Option<::std::string::String>, + pub(crate) answers: ::std::option::Option<::std::vec::Vec>, + pub(crate) status: ::std::option::Option, + pub(crate) request_id: ::std::option::Option<::std::string::String>, + _request_id: Option, +} +impl ListTopicReviewedAnswersOutputBuilder { + ///

    The ID for the topic that contains the reviewed answer that you want to list. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn topic_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.topic_id = ::std::option::Option::Some(input.into()); + self + } + ///

    The ID for the topic that contains the reviewed answer that you want to list. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn set_topic_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.topic_id = input; + self + } + ///

    The ID for the topic that contains the reviewed answer that you want to list. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn get_topic_id(&self) -> &::std::option::Option<::std::string::String> { + &self.topic_id + } + ///

    The Amazon Resource Name (ARN) of the topic.

    + pub fn topic_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.topic_arn = ::std::option::Option::Some(input.into()); + self + } + ///

    The Amazon Resource Name (ARN) of the topic.

    + pub fn set_topic_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.topic_arn = input; + self + } + ///

    The Amazon Resource Name (ARN) of the topic.

    + pub fn get_topic_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.topic_arn + } + /// Appends an item to `answers`. + /// + /// To override the contents of this collection use [`set_answers`](Self::set_answers). + /// + ///

    The definition of all Answers in the topic.

    + pub fn answers(mut self, input: crate::types::TopicReviewedAnswer) -> Self { + let mut v = self.answers.unwrap_or_default(); + v.push(input); + self.answers = ::std::option::Option::Some(v); + self + } + ///

    The definition of all Answers in the topic.

    + pub fn set_answers(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.answers = input; + self + } + ///

    The definition of all Answers in the topic.

    + pub fn get_answers(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.answers + } + ///

    The HTTP status of the request.

    + pub fn status(mut self, input: i32) -> Self { + self.status = ::std::option::Option::Some(input); + self + } + ///

    The HTTP status of the request.

    + pub fn set_status(mut self, input: ::std::option::Option) -> Self { + self.status = input; + self + } + ///

    The HTTP status of the request.

    + pub fn get_status(&self) -> &::std::option::Option { + &self.status + } + ///

    The Amazon Web Services request ID for this operation.

    + pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.request_id = ::std::option::Option::Some(input.into()); + self + } + ///

    The Amazon Web Services request ID for this operation.

    + pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.request_id = input; + self + } + ///

    The Amazon Web Services request ID for this operation.

    + pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> { + &self.request_id + } + pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { + self._request_id = Some(request_id.into()); + self + } + + pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { + self._request_id = request_id; + self + } + /// Consumes the builder and constructs a [`ListTopicReviewedAnswersOutput`](crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersOutput). + pub fn build(self) -> crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersOutput { + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersOutput { + topic_id: self.topic_id, + topic_arn: self.topic_arn, + answers: self.answers, + status: self.status.unwrap_or_default(), + request_id: self.request_id, + _request_id: self._request_id, + } + } +} diff --git a/sdk/quicksight/src/operation/list_topic_reviewed_answers/builders.rs b/sdk/quicksight/src/operation/list_topic_reviewed_answers/builders.rs new file mode 100644 index 000000000000..87c8b902ce0c --- /dev/null +++ b/sdk/quicksight/src/operation/list_topic_reviewed_answers/builders.rs @@ -0,0 +1,139 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub use crate::operation::list_topic_reviewed_answers::_list_topic_reviewed_answers_output::ListTopicReviewedAnswersOutputBuilder; + +pub use crate::operation::list_topic_reviewed_answers::_list_topic_reviewed_answers_input::ListTopicReviewedAnswersInputBuilder; + +impl crate::operation::list_topic_reviewed_answers::builders::ListTopicReviewedAnswersInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::Client, + ) -> ::std::result::Result< + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let mut fluent_builder = client.list_topic_reviewed_answers(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `ListTopicReviewedAnswers`. +/// +///

    Lists all reviewed answers for a Q Topic.

    +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct ListTopicReviewedAnswersFluentBuilder { + handle: ::std::sync::Arc, + inner: crate::operation::list_topic_reviewed_answers::builders::ListTopicReviewedAnswersInputBuilder, + config_override: ::std::option::Option, +} +impl + crate::client::customize::internal::CustomizableSend< + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersOutput, + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError, + > for ListTopicReviewedAnswersFluentBuilder +{ + fn send( + self, + config_override: crate::config::Builder, + ) -> crate::client::customize::internal::BoxFuture< + crate::client::customize::internal::SendResult< + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersOutput, + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError, + >, + > { + ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) + } +} +impl ListTopicReviewedAnswersFluentBuilder { + /// Creates a new `ListTopicReviewedAnswersFluentBuilder`. + pub(crate) fn new(handle: ::std::sync::Arc) -> Self { + Self { + handle, + inner: ::std::default::Default::default(), + config_override: ::std::option::Option::None, + } + } + /// Access the ListTopicReviewedAnswers as a reference. + pub fn as_input(&self) -> &crate::operation::list_topic_reviewed_answers::builders::ListTopicReviewedAnswersInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + /// + /// If an error occurs, an `SdkError` will be returned with additional details that + /// can be matched against. + /// + /// By default, any retryable failures will be retried twice. Retry behavior + /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be + /// set when configuring the client. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let input = self + .inner + .build() + .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; + let runtime_plugins = crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswers::operation_runtime_plugins( + self.handle.runtime_plugins.clone(), + &self.handle.conf, + self.config_override, + ); + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswers::orchestrate(&runtime_plugins, input).await + } + + /// Consumes this builder, creating a customizable operation that can be modified before being sent. + pub fn customize( + self, + ) -> crate::client::customize::CustomizableOperation< + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersOutput, + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError, + Self, + > { + crate::client::customize::CustomizableOperation::new(self) + } + pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into) -> Self { + self.set_config_override(::std::option::Option::Some(config_override.into())); + self + } + + pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option) -> &mut Self { + self.config_override = config_override; + self + } + ///

    The ID of the Amazon Web Services account that containd the reviewed answers that you want listed.

    + pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.aws_account_id(input.into()); + self + } + ///

    The ID of the Amazon Web Services account that containd the reviewed answers that you want listed.

    + pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_aws_account_id(input); + self + } + ///

    The ID of the Amazon Web Services account that containd the reviewed answers that you want listed.

    + pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_aws_account_id() + } + ///

    The ID for the topic that contains the reviewed answer that you want to list. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn topic_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.topic_id(input.into()); + self + } + ///

    The ID for the topic that contains the reviewed answer that you want to list. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn set_topic_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_topic_id(input); + self + } + ///

    The ID for the topic that contains the reviewed answer that you want to list. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    + pub fn get_topic_id(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_topic_id() + } +} diff --git a/sdk/quicksight/src/protocol_serde.rs b/sdk/quicksight/src/protocol_serde.rs index c93485227956..4c133be74300 100644 --- a/sdk/quicksight/src/protocol_serde.rs +++ b/sdk/quicksight/src/protocol_serde.rs @@ -23,6 +23,10 @@ pub fn parse_http_error_metadata( crate::json_errors::parse_error_metadata(response_body, response_headers) } +pub(crate) mod shape_batch_create_topic_reviewed_answer; + +pub(crate) mod shape_batch_delete_topic_reviewed_answer; + pub(crate) mod shape_cancel_ingestion; pub(crate) mod shape_create_account_customization; @@ -267,6 +271,8 @@ pub(crate) mod shape_list_themes; pub(crate) mod shape_list_topic_refresh_schedules; +pub(crate) mod shape_list_topic_reviewed_answers; + pub(crate) mod shape_list_topics; pub(crate) mod shape_list_user_groups; @@ -381,6 +387,10 @@ pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] { pub(crate) mod shape_access_denied_exception; +pub(crate) mod shape_batch_create_topic_reviewed_answer_input; + +pub(crate) mod shape_batch_delete_topic_reviewed_answer_input; + pub(crate) mod shape_concurrent_updating_exception; pub(crate) mod shape_conflict_exception; @@ -607,6 +617,8 @@ pub(crate) mod shape_column_group; pub(crate) mod shape_column_level_permission_rule; +pub(crate) mod shape_create_topic_reviewed_answer; + pub(crate) mod shape_dashboard; pub(crate) mod shape_dashboard_error_list; @@ -683,6 +695,8 @@ pub(crate) mod shape_ingestion; pub(crate) mod shape_ingestions; +pub(crate) mod shape_invalid_topic_reviewed_answers; + pub(crate) mod shape_ip_restriction_rule_map; pub(crate) mod shape_key_registration; @@ -733,6 +747,8 @@ pub(crate) mod shape_snapshot_user_configuration_redacted; pub(crate) mod shape_ssl_properties; +pub(crate) mod shape_succeeded_topic_reviewed_answers; + pub(crate) mod shape_successful_key_registration_entries; pub(crate) mod shape_tag; @@ -775,6 +791,8 @@ pub(crate) mod shape_topic_refresh_schedule; pub(crate) mod shape_topic_refresh_schedule_summaries; +pub(crate) mod shape_topic_reviewed_answers; + pub(crate) mod shape_topic_summaries; pub(crate) mod shape_user; @@ -1047,6 +1065,8 @@ pub(crate) mod shape_integer_dataset_parameter; pub(crate) mod shape_integer_parameter; +pub(crate) mod shape_invalid_topic_reviewed_answer; + pub(crate) mod shape_jira_parameters; pub(crate) mod shape_logical_table_map; @@ -1149,6 +1169,8 @@ pub(crate) mod shape_string_list; pub(crate) mod shape_string_parameter; +pub(crate) mod shape_succeeded_topic_reviewed_answer; + pub(crate) mod shape_successful_key_registration_entry; pub(crate) mod shape_template_error; @@ -1171,10 +1193,18 @@ pub(crate) mod shape_theme_version; pub(crate) mod shape_theme_version_summary; +pub(crate) mod shape_topic_ir; + pub(crate) mod shape_topic_refresh_schedule_summary; +pub(crate) mod shape_topic_reviewed_answer; + pub(crate) mod shape_topic_summary; +pub(crate) mod shape_topic_template; + +pub(crate) mod shape_topic_visual; + pub(crate) mod shape_transform_operation; pub(crate) mod shape_trino_parameters; @@ -1299,6 +1329,8 @@ pub(crate) mod shape_sheet_control_layout; pub(crate) mod shape_sheet_text_box; +pub(crate) mod shape_slot; + pub(crate) mod shape_snapshot_anonymous_user_redacted; pub(crate) mod shape_snapshot_file; @@ -1327,16 +1359,34 @@ pub(crate) mod shape_topic_column; pub(crate) mod shape_topic_filter; +pub(crate) mod shape_topic_ir_contribution_analysis; + +pub(crate) mod shape_topic_ir_filter_option; + +pub(crate) mod shape_topic_ir_group_by; + +pub(crate) mod shape_topic_ir_metric; + pub(crate) mod shape_topic_named_entity; +pub(crate) mod shape_topic_sort_clause; + pub(crate) mod shape_untag_column_operation; pub(crate) mod shape_upload_settings; pub(crate) mod shape_visual; +pub(crate) mod shape_visual_options; + +pub(crate) mod shape_agg_function; + +pub(crate) mod shape_aggregation_partition_by; + pub(crate) mod shape_all_sheets_filter_scope_configuration; +pub(crate) mod shape_anchor; + pub(crate) mod shape_asset_bundle_export_job_analysis_property_to_override_list; pub(crate) mod shape_asset_bundle_export_job_dashboard_property_to_override_list; @@ -1383,6 +1433,10 @@ pub(crate) mod shape_combo_chart_visual; pub(crate) mod shape_comparative_order; +pub(crate) mod shape_contribution_analysis_factor; + +pub(crate) mod shape_contribution_analysis_time_ranges; + pub(crate) mod shape_custom_color; pub(crate) mod shape_custom_content_visual; @@ -1403,6 +1457,8 @@ pub(crate) mod shape_default_interactive_layout_configuration; pub(crate) mod shape_default_paginated_layout_configuration; +pub(crate) mod shape_display_format_options; + pub(crate) mod shape_dns_resolver_list; pub(crate) mod shape_empty_visual; @@ -1411,6 +1467,8 @@ pub(crate) mod shape_entity; pub(crate) mod shape_filled_map_visual; +pub(crate) mod shape_filter_agg_metrics; + pub(crate) mod shape_filter_control_list; pub(crate) mod shape_filter_cross_sheet_control; @@ -1445,6 +1503,8 @@ pub(crate) mod shape_heat_map_visual; pub(crate) mod shape_histogram_visual; +pub(crate) mod shape_identifier; + pub(crate) mod shape_insight_visual; pub(crate) mod shape_integer_default_values; @@ -1469,6 +1529,8 @@ pub(crate) mod shape_margin_style; pub(crate) mod shape_named_entity_definition; +pub(crate) mod shape_named_entity_ref; + pub(crate) mod shape_nested_filter; pub(crate) mod shape_new_default_values; @@ -1525,6 +1587,8 @@ pub(crate) mod shape_sheet_control_layout_list; pub(crate) mod shape_sheet_text_box_list; +pub(crate) mod shape_slots; + pub(crate) mod shape_snapshot_file_list; pub(crate) mod shape_snapshot_file_sheet_selection; @@ -1557,10 +1621,20 @@ pub(crate) mod shape_topic_category_filter; pub(crate) mod shape_topic_columns; +pub(crate) mod shape_topic_constant_value; + pub(crate) mod shape_topic_date_range_filter; pub(crate) mod shape_topic_filters; +pub(crate) mod shape_topic_ir_comparison_method; + +pub(crate) mod shape_topic_ir_filter_list; + +pub(crate) mod shape_topic_ir_group_by_list; + +pub(crate) mod shape_topic_ir_metric_list; + pub(crate) mod shape_topic_named_entities; pub(crate) mod shape_topic_numeric_equality_filter; @@ -1569,6 +1643,8 @@ pub(crate) mod shape_topic_numeric_range_filter; pub(crate) mod shape_topic_relative_date_filter; +pub(crate) mod shape_topic_visuals; + pub(crate) mod shape_transform_operation_list; pub(crate) mod shape_tree_map_visual; @@ -1595,6 +1671,8 @@ pub(crate) mod shape_cascading_control_configuration; pub(crate) mod shape_category_filter_configuration; +pub(crate) mod shape_collective_constant_entry; + pub(crate) mod shape_color_list; pub(crate) mod shape_column_description; @@ -1607,6 +1685,8 @@ pub(crate) mod shape_column_schema_list; pub(crate) mod shape_combo_chart_configuration; +pub(crate) mod shape_contribution_analysis_factors_list; + pub(crate) mod shape_custom_colors_list; pub(crate) mod shape_custom_content_configuration; @@ -1623,8 +1703,6 @@ pub(crate) mod shape_default_grid_layout_configuration; pub(crate) mod shape_default_section_based_layout_configuration; -pub(crate) mod shape_display_format_options; - pub(crate) mod shape_drop_down_control_display_options; pub(crate) mod shape_dynamic_default_value; @@ -1673,6 +1751,8 @@ pub(crate) mod shape_mapped_data_set_parameters; pub(crate) mod shape_named_entity_definition_metric; +pub(crate) mod shape_negative_format; + pub(crate) mod shape_null_value_format_configuration; pub(crate) mod shape_numeric_format_configuration; @@ -1725,6 +1805,8 @@ pub(crate) mod shape_time_range_filter_value; pub(crate) mod shape_topic_category_filter_constant; +pub(crate) mod shape_topic_ir_filter_entry; + pub(crate) mod shape_topic_range_filter_constant; pub(crate) mod shape_topic_singular_filter_constant; @@ -1759,6 +1841,8 @@ pub(crate) mod shape_box_plot_options; pub(crate) mod shape_box_plot_sort_configuration; +pub(crate) mod shape_calculated_field_reference_list; + pub(crate) mod shape_cascading_control_source; pub(crate) mod shape_category_inner_filter; @@ -1889,12 +1973,12 @@ pub(crate) mod shape_long_format_text; pub(crate) mod shape_named_entity_definitions; -pub(crate) mod shape_negative_format; - pub(crate) mod shape_number_display_format_configuration; pub(crate) mod shape_numerical_aggregation_function; +pub(crate) mod shape_operand_list; + pub(crate) mod shape_percentage_display_format_configuration; pub(crate) mod shape_pie_chart_field_wells; @@ -2003,6 +2087,10 @@ pub(crate) mod shape_word_cloud_options; pub(crate) mod shape_word_cloud_sort_configuration; +pub(crate) mod shape_agg_function_param_map; + +pub(crate) mod shape_aggregation_partition_by_list; + pub(crate) mod shape_aggregation_sort_configuration_list; pub(crate) mod shape_arc_axis_configuration; @@ -2097,6 +2185,8 @@ pub(crate) mod shape_filled_map_aggregated_field_wells; pub(crate) mod shape_filled_map_shape_conditional_formatting; +pub(crate) mod shape_filter_agg_metrics_list; + pub(crate) mod shape_font_configuration; pub(crate) mod shape_forecast_computation; @@ -2297,6 +2387,8 @@ pub(crate) mod shape_category_drill_down_filter; pub(crate) mod shape_cluster_marker; +pub(crate) mod shape_collective_constant_entry_list; + pub(crate) mod shape_column_sort; pub(crate) mod shape_comparison_format_configuration; diff --git a/sdk/quicksight/src/protocol_serde/shape_agg_function.rs b/sdk/quicksight/src/protocol_serde/shape_agg_function.rs new file mode 100644 index 000000000000..d62ea8afbde4 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_agg_function.rs @@ -0,0 +1,85 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_agg_function( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::AggFunction, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.aggregation { + object.key("Aggregation").string(var_1.as_str()); + } + if let Some(var_2) = &input.aggregation_function_parameters { + #[allow(unused_mut)] + let mut object_3 = object.key("AggregationFunctionParameters").start_object(); + for (key_4, value_5) in var_2 { + { + object_3.key(key_4.as_str()).string(value_5.as_str()); + } + } + object_3.finish(); + } + if let Some(var_6) = &input.period { + object.key("Period").string(var_6.as_str()); + } + if let Some(var_7) = &input.period_field { + object.key("PeriodField").string(var_7.as_str()); + } + Ok(()) +} + +pub(crate) fn de_agg_function<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::AggFunctionBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "Aggregation" => { + builder = builder.set_aggregation( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::AggType::from(u.as_ref()))) + .transpose()?, + ); + } + "AggregationFunctionParameters" => { + builder = builder.set_aggregation_function_parameters( + crate::protocol_serde::shape_agg_function_param_map::de_agg_function_param_map(tokens)?, + ); + } + "Period" => { + builder = builder.set_period( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::TopicTimeGranularity::from(u.as_ref()))) + .transpose()?, + ); + } + "PeriodField" => { + builder = builder.set_period_field( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_agg_function_param_map.rs b/sdk/quicksight/src/protocol_serde/shape_agg_function_param_map.rs new file mode 100644 index 000000000000..209fbe02e32e --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_agg_function_param_map.rs @@ -0,0 +1,38 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_agg_function_param_map<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + let mut map = ::std::collections::HashMap::new(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => { + let key = key.to_unescaped().map(|u| u.into_owned())?; + let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?; + if let Some(value) = value { + map.insert(key, value); + } + } + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(map)) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_aggregation_partition_by.rs b/sdk/quicksight/src/protocol_serde/shape_aggregation_partition_by.rs new file mode 100644 index 000000000000..9c1f4d2a278d --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_aggregation_partition_by.rs @@ -0,0 +1,60 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_aggregation_partition_by( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::AggregationPartitionBy, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.field_name { + object.key("FieldName").string(var_1.as_str()); + } + if let Some(var_2) = &input.time_granularity { + object.key("TimeGranularity").string(var_2.as_str()); + } + Ok(()) +} + +pub(crate) fn de_aggregation_partition_by<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::AggregationPartitionByBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "FieldName" => { + builder = builder.set_field_name( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "TimeGranularity" => { + builder = builder.set_time_granularity( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::TimeGranularity::from(u.as_ref()))) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_aggregation_partition_by_list.rs b/sdk/quicksight/src/protocol_serde/shape_aggregation_partition_by_list.rs new file mode 100644 index 000000000000..4b40423a4339 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_aggregation_partition_by_list.rs @@ -0,0 +1,32 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_aggregation_partition_by_list<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => { + let mut items = Vec::new(); + loop { + match tokens.peek() { + Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => { + tokens.next().transpose().unwrap(); + break; + } + _ => { + let value = crate::protocol_serde::shape_aggregation_partition_by::de_aggregation_partition_by(tokens)?; + if let Some(value) = value { + items.push(value); + } + } + } + } + Ok(Some(items)) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start array or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_anchor.rs b/sdk/quicksight/src/protocol_serde/shape_anchor.rs new file mode 100644 index 000000000000..cec858da8650 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_anchor.rs @@ -0,0 +1,73 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_anchor( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::Anchor, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.anchor_type { + object.key("AnchorType").string(var_1.as_str()); + } + if let Some(var_2) = &input.time_granularity { + object.key("TimeGranularity").string(var_2.as_str()); + } + if input.offset != 0 { + object.key("Offset").number( + #[allow(clippy::useless_conversion)] + ::aws_smithy_types::Number::NegInt((input.offset).into()), + ); + } + Ok(()) +} + +pub(crate) fn de_anchor<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::AnchorBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "AnchorType" => { + builder = builder.set_anchor_type( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::AnchorType::from(u.as_ref()))) + .transpose()?, + ); + } + "TimeGranularity" => { + builder = builder.set_time_granularity( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::TimeGranularity::from(u.as_ref()))) + .transpose()?, + ); + } + "Offset" => { + builder = builder.set_offset( + ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())? + .map(i32::try_from) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_batch_create_topic_reviewed_answer.rs b/sdk/quicksight/src/protocol_serde/shape_batch_create_topic_reviewed_answer.rs new file mode 100644 index 000000000000..9c4b8c41a1f9 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_batch_create_topic_reviewed_answer.rs @@ -0,0 +1,204 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(clippy::unnecessary_wraps)] +pub fn de_batch_create_topic_reviewed_answer_http_error( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerOutput, + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError, +> { + #[allow(unused_mut)] + let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) + .map_err(crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError::unhandled)?; + generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); + let generic = generic_builder.build(); + let error_code = match generic.code() { + Some(code) => code, + None => return Err(crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError::unhandled(generic)), + }; + + let _error_message = generic.message().map(|msg| msg.to_owned()); + Err(match error_code { + "AccessDeniedException" => { + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError::AccessDeniedException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); + output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) + .map_err(crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } + "InternalFailureException" => { + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError::InternalFailureException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InternalFailureExceptionBuilder::default(); + output = crate::protocol_serde::shape_internal_failure_exception::de_internal_failure_exception_json_err(_response_body, output) + .map_err(crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } + "InvalidParameterValueException" => { + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError::InvalidParameterValueException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default(); + output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err( + _response_body, + output, + ) + .map_err(crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } + "ResourceNotFoundException" => { + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError::ResourceNotFoundException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); + output = + crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) + .map_err(crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } + "ThrottlingException" => crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError::ThrottlingException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); + output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) + .map_err(crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + _ => crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError::generic(generic), + }) +} + +#[allow(clippy::unnecessary_wraps)] +pub fn de_batch_create_topic_reviewed_answer_http_response( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerOutput, + crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError, +> { + Ok({ + #[allow(unused_mut)] + let mut output = crate::operation::batch_create_topic_reviewed_answer::builders::BatchCreateTopicReviewedAnswerOutputBuilder::default(); + output = crate::protocol_serde::shape_batch_create_topic_reviewed_answer::de_batch_create_topic_reviewed_answer(_response_body, output) + .map_err(crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerError::unhandled)?; + output = output.set_status(Some(_response_status as _)); + output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); + output.build() + }) +} + +pub fn ser_batch_create_topic_reviewed_answer_input( + input: &crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerInput, +) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> { + let mut out = String::new(); + let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out); + crate::protocol_serde::shape_batch_create_topic_reviewed_answer_input::ser_batch_create_topic_reviewed_answer_input_input(&mut object, input)?; + object.finish(); + Ok(::aws_smithy_types::body::SdkBody::from(out)) +} + +pub(crate) fn de_batch_create_topic_reviewed_answer( + value: &[u8], + mut builder: crate::operation::batch_create_topic_reviewed_answer::builders::BatchCreateTopicReviewedAnswerOutputBuilder, +) -> Result< + crate::operation::batch_create_topic_reviewed_answer::builders::BatchCreateTopicReviewedAnswerOutputBuilder, + ::aws_smithy_json::deserialize::error::DeserializeError, +> { + let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); + let tokens = &mut tokens_owned; + ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "InvalidAnswers" => { + builder = builder + .set_invalid_answers(crate::protocol_serde::shape_invalid_topic_reviewed_answers::de_invalid_topic_reviewed_answers(tokens)?); + } + "RequestId" => { + builder = builder.set_request_id( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "SucceededAnswers" => { + builder = builder.set_succeeded_answers( + crate::protocol_serde::shape_succeeded_topic_reviewed_answers::de_succeeded_topic_reviewed_answers(tokens)?, + ); + } + "TopicArn" => { + builder = builder.set_topic_arn( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "TopicId" => { + builder = builder.set_topic_id( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + if tokens.next().is_some() { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "found more JSON tokens after completing parsing", + )); + } + Ok(builder) +} diff --git a/sdk/quicksight/src/protocol_serde/shape_batch_create_topic_reviewed_answer_input.rs b/sdk/quicksight/src/protocol_serde/shape_batch_create_topic_reviewed_answer_input.rs new file mode 100644 index 000000000000..b6dbb9f8fe6b --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_batch_create_topic_reviewed_answer_input.rs @@ -0,0 +1,19 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_batch_create_topic_reviewed_answer_input_input( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::operation::batch_create_topic_reviewed_answer::BatchCreateTopicReviewedAnswerInput, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.answers { + let mut array_2 = object.key("Answers").start_array(); + for item_3 in var_1 { + { + #[allow(unused_mut)] + let mut object_4 = array_2.value().start_object(); + crate::protocol_serde::shape_create_topic_reviewed_answer::ser_create_topic_reviewed_answer(&mut object_4, item_3)?; + object_4.finish(); + } + } + array_2.finish(); + } + Ok(()) +} diff --git a/sdk/quicksight/src/protocol_serde/shape_batch_delete_topic_reviewed_answer.rs b/sdk/quicksight/src/protocol_serde/shape_batch_delete_topic_reviewed_answer.rs new file mode 100644 index 000000000000..0c6ffb481ed1 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_batch_delete_topic_reviewed_answer.rs @@ -0,0 +1,219 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(clippy::unnecessary_wraps)] +pub fn de_batch_delete_topic_reviewed_answer_http_error( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerOutput, + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError, +> { + #[allow(unused_mut)] + let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) + .map_err(crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::unhandled)?; + generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); + let generic = generic_builder.build(); + let error_code = match generic.code() { + Some(code) => code, + None => return Err(crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::unhandled(generic)), + }; + + let _error_message = generic.message().map(|msg| msg.to_owned()); + Err(match error_code { + "AccessDeniedException" => { + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::AccessDeniedException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); + output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) + .map_err(crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } + "ConflictException" => crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::ConflictException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ConflictExceptionBuilder::default(); + output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output) + .map_err(crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "InternalFailureException" => { + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::InternalFailureException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InternalFailureExceptionBuilder::default(); + output = crate::protocol_serde::shape_internal_failure_exception::de_internal_failure_exception_json_err(_response_body, output) + .map_err(crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } + "InvalidParameterValueException" => { + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::InvalidParameterValueException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default(); + output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err( + _response_body, + output, + ) + .map_err(crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } + "ResourceNotFoundException" => { + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::ResourceNotFoundException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); + output = + crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) + .map_err(crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } + "ThrottlingException" => crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::ThrottlingException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); + output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) + .map_err(crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + _ => crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::generic(generic), + }) +} + +#[allow(clippy::unnecessary_wraps)] +pub fn de_batch_delete_topic_reviewed_answer_http_response( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerOutput, + crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError, +> { + Ok({ + #[allow(unused_mut)] + let mut output = crate::operation::batch_delete_topic_reviewed_answer::builders::BatchDeleteTopicReviewedAnswerOutputBuilder::default(); + output = crate::protocol_serde::shape_batch_delete_topic_reviewed_answer::de_batch_delete_topic_reviewed_answer(_response_body, output) + .map_err(crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerError::unhandled)?; + output = output.set_status(Some(_response_status as _)); + output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); + output.build() + }) +} + +pub fn ser_batch_delete_topic_reviewed_answer_input( + input: &crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerInput, +) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> { + let mut out = String::new(); + let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out); + crate::protocol_serde::shape_batch_delete_topic_reviewed_answer_input::ser_batch_delete_topic_reviewed_answer_input_input(&mut object, input)?; + object.finish(); + Ok(::aws_smithy_types::body::SdkBody::from(out)) +} + +pub(crate) fn de_batch_delete_topic_reviewed_answer( + value: &[u8], + mut builder: crate::operation::batch_delete_topic_reviewed_answer::builders::BatchDeleteTopicReviewedAnswerOutputBuilder, +) -> Result< + crate::operation::batch_delete_topic_reviewed_answer::builders::BatchDeleteTopicReviewedAnswerOutputBuilder, + ::aws_smithy_json::deserialize::error::DeserializeError, +> { + let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); + let tokens = &mut tokens_owned; + ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "InvalidAnswers" => { + builder = builder + .set_invalid_answers(crate::protocol_serde::shape_invalid_topic_reviewed_answers::de_invalid_topic_reviewed_answers(tokens)?); + } + "RequestId" => { + builder = builder.set_request_id( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "SucceededAnswers" => { + builder = builder.set_succeeded_answers( + crate::protocol_serde::shape_succeeded_topic_reviewed_answers::de_succeeded_topic_reviewed_answers(tokens)?, + ); + } + "TopicArn" => { + builder = builder.set_topic_arn( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "TopicId" => { + builder = builder.set_topic_id( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + if tokens.next().is_some() { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "found more JSON tokens after completing parsing", + )); + } + Ok(builder) +} diff --git a/sdk/quicksight/src/protocol_serde/shape_batch_delete_topic_reviewed_answer_input.rs b/sdk/quicksight/src/protocol_serde/shape_batch_delete_topic_reviewed_answer_input.rs new file mode 100644 index 000000000000..da2769fa550f --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_batch_delete_topic_reviewed_answer_input.rs @@ -0,0 +1,16 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_batch_delete_topic_reviewed_answer_input_input( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::operation::batch_delete_topic_reviewed_answer::BatchDeleteTopicReviewedAnswerInput, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.answer_ids { + let mut array_2 = object.key("AnswerIds").start_array(); + for item_3 in var_1 { + { + array_2.value().string(item_3.as_str()); + } + } + array_2.finish(); + } + Ok(()) +} diff --git a/sdk/quicksight/src/protocol_serde/shape_calculated_field_reference_list.rs b/sdk/quicksight/src/protocol_serde/shape_calculated_field_reference_list.rs new file mode 100644 index 000000000000..c1ba9e2b5740 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_calculated_field_reference_list.rs @@ -0,0 +1,32 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_calculated_field_reference_list<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => { + let mut items = Vec::new(); + loop { + match tokens.peek() { + Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => { + tokens.next().transpose().unwrap(); + break; + } + _ => { + let value = crate::protocol_serde::shape_identifier::de_identifier(tokens)?; + if let Some(value) = value { + items.push(value); + } + } + } + } + Ok(Some(items)) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start array or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_collective_constant_entry.rs b/sdk/quicksight/src/protocol_serde/shape_collective_constant_entry.rs new file mode 100644 index 000000000000..9d0a29d35d2d --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_collective_constant_entry.rs @@ -0,0 +1,60 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_collective_constant_entry( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::CollectiveConstantEntry, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.constant_type { + object.key("ConstantType").string(var_1.as_str()); + } + if let Some(var_2) = &input.value { + object.key("Value").string(var_2.as_str()); + } + Ok(()) +} + +pub(crate) fn de_collective_constant_entry<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::CollectiveConstantEntryBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "ConstantType" => { + builder = builder.set_constant_type( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::ConstantType::from(u.as_ref()))) + .transpose()?, + ); + } + "Value" => { + builder = builder.set_value( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_collective_constant_entry_list.rs b/sdk/quicksight/src/protocol_serde/shape_collective_constant_entry_list.rs new file mode 100644 index 000000000000..f3d6e2c91ae0 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_collective_constant_entry_list.rs @@ -0,0 +1,32 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_collective_constant_entry_list<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => { + let mut items = Vec::new(); + loop { + match tokens.peek() { + Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => { + tokens.next().transpose().unwrap(); + break; + } + _ => { + let value = crate::protocol_serde::shape_collective_constant_entry::de_collective_constant_entry(tokens)?; + if let Some(value) = value { + items.push(value); + } + } + } + } + Ok(Some(items)) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start array or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_contribution_analysis_factor.rs b/sdk/quicksight/src/protocol_serde/shape_contribution_analysis_factor.rs new file mode 100644 index 000000000000..51fa335274b1 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_contribution_analysis_factor.rs @@ -0,0 +1,50 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_contribution_analysis_factor( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::ContributionAnalysisFactor, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.field_name { + object.key("FieldName").string(var_1.as_str()); + } + Ok(()) +} + +pub(crate) fn de_contribution_analysis_factor<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::ContributionAnalysisFactorBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "FieldName" => { + builder = builder.set_field_name( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_contribution_analysis_factors_list.rs b/sdk/quicksight/src/protocol_serde/shape_contribution_analysis_factors_list.rs new file mode 100644 index 000000000000..dd6b14d51378 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_contribution_analysis_factors_list.rs @@ -0,0 +1,32 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_contribution_analysis_factors_list<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => { + let mut items = Vec::new(); + loop { + match tokens.peek() { + Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => { + tokens.next().transpose().unwrap(); + break; + } + _ => { + let value = crate::protocol_serde::shape_contribution_analysis_factor::de_contribution_analysis_factor(tokens)?; + if let Some(value) = value { + items.push(value); + } + } + } + } + Ok(Some(items)) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start array or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_contribution_analysis_time_ranges.rs b/sdk/quicksight/src/protocol_serde/shape_contribution_analysis_time_ranges.rs new file mode 100644 index 000000000000..41c5de1db43c --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_contribution_analysis_time_ranges.rs @@ -0,0 +1,59 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_contribution_analysis_time_ranges( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::ContributionAnalysisTimeRanges, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.start_range { + #[allow(unused_mut)] + let mut object_2 = object.key("StartRange").start_object(); + crate::protocol_serde::shape_topic_ir_filter_option::ser_topic_ir_filter_option(&mut object_2, var_1)?; + object_2.finish(); + } + if let Some(var_3) = &input.end_range { + #[allow(unused_mut)] + let mut object_4 = object.key("EndRange").start_object(); + crate::protocol_serde::shape_topic_ir_filter_option::ser_topic_ir_filter_option(&mut object_4, var_3)?; + object_4.finish(); + } + Ok(()) +} + +pub(crate) fn de_contribution_analysis_time_ranges<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::ContributionAnalysisTimeRangesBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "StartRange" => { + builder = + builder.set_start_range(crate::protocol_serde::shape_topic_ir_filter_option::de_topic_ir_filter_option(tokens)?); + } + "EndRange" => { + builder = builder.set_end_range(crate::protocol_serde::shape_topic_ir_filter_option::de_topic_ir_filter_option(tokens)?); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_create_topic_reviewed_answer.rs b/sdk/quicksight/src/protocol_serde/shape_create_topic_reviewed_answer.rs new file mode 100644 index 000000000000..4c9d76fe883a --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_create_topic_reviewed_answer.rs @@ -0,0 +1,34 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_create_topic_reviewed_answer( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::CreateTopicReviewedAnswer, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + { + object.key("AnswerId").string(input.answer_id.as_str()); + } + { + object.key("DatasetArn").string(input.dataset_arn.as_str()); + } + { + object.key("Question").string(input.question.as_str()); + } + if let Some(var_1) = &input.mir { + #[allow(unused_mut)] + let mut object_2 = object.key("Mir").start_object(); + crate::protocol_serde::shape_topic_ir::ser_topic_ir(&mut object_2, var_1)?; + object_2.finish(); + } + if let Some(var_3) = &input.primary_visual { + #[allow(unused_mut)] + let mut object_4 = object.key("PrimaryVisual").start_object(); + crate::protocol_serde::shape_topic_visual::ser_topic_visual(&mut object_4, var_3)?; + object_4.finish(); + } + if let Some(var_5) = &input.template { + #[allow(unused_mut)] + let mut object_6 = object.key("Template").start_object(); + crate::protocol_serde::shape_topic_template::ser_topic_template(&mut object_6, var_5)?; + object_6.finish(); + } + Ok(()) +} diff --git a/sdk/quicksight/src/protocol_serde/shape_date_time_picker_control_display_options.rs b/sdk/quicksight/src/protocol_serde/shape_date_time_picker_control_display_options.rs index e31e41e3e3d7..ad92f5c5afee 100644 --- a/sdk/quicksight/src/protocol_serde/shape_date_time_picker_control_display_options.rs +++ b/sdk/quicksight/src/protocol_serde/shape_date_time_picker_control_display_options.rs @@ -18,6 +18,12 @@ pub fn ser_date_time_picker_control_display_options( crate::protocol_serde::shape_sheet_control_info_icon_label_options::ser_sheet_control_info_icon_label_options(&mut object_5, var_4)?; object_5.finish(); } + if let Some(var_6) = &input.helper_text_visibility { + object.key("HelperTextVisibility").string(var_6.as_str()); + } + if let Some(var_7) = &input.date_icon_visibility { + object.key("DateIconVisibility").string(var_7.as_str()); + } Ok(()) } @@ -51,6 +57,20 @@ where crate::protocol_serde::shape_sheet_control_info_icon_label_options::de_sheet_control_info_icon_label_options(tokens)?, ); } + "HelperTextVisibility" => { + builder = builder.set_helper_text_visibility( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::Visibility::from(u.as_ref()))) + .transpose()?, + ); + } + "DateIconVisibility" => { + builder = builder.set_date_icon_visibility( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::Visibility::from(u.as_ref()))) + .transpose()?, + ); + } _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, }, other => { diff --git a/sdk/quicksight/src/protocol_serde/shape_filter_agg_metrics.rs b/sdk/quicksight/src/protocol_serde/shape_filter_agg_metrics.rs new file mode 100644 index 000000000000..936dbcf3b76c --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_filter_agg_metrics.rs @@ -0,0 +1,69 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_filter_agg_metrics( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::FilterAggMetrics, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.metric_operand { + #[allow(unused_mut)] + let mut object_2 = object.key("MetricOperand").start_object(); + crate::protocol_serde::shape_identifier::ser_identifier(&mut object_2, var_1)?; + object_2.finish(); + } + if let Some(var_3) = &input.function { + object.key("Function").string(var_3.as_str()); + } + if let Some(var_4) = &input.sort_direction { + object.key("SortDirection").string(var_4.as_str()); + } + Ok(()) +} + +pub(crate) fn de_filter_agg_metrics<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::FilterAggMetricsBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "MetricOperand" => { + builder = builder.set_metric_operand(crate::protocol_serde::shape_identifier::de_identifier(tokens)?); + } + "Function" => { + builder = builder.set_function( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::AggType::from(u.as_ref()))) + .transpose()?, + ); + } + "SortDirection" => { + builder = builder.set_sort_direction( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::TopicSortDirection::from(u.as_ref()))) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_filter_agg_metrics_list.rs b/sdk/quicksight/src/protocol_serde/shape_filter_agg_metrics_list.rs new file mode 100644 index 000000000000..0c916cece20f --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_filter_agg_metrics_list.rs @@ -0,0 +1,32 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_filter_agg_metrics_list<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => { + let mut items = Vec::new(); + loop { + match tokens.peek() { + Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => { + tokens.next().transpose().unwrap(); + break; + } + _ => { + let value = crate::protocol_serde::shape_filter_agg_metrics::de_filter_agg_metrics(tokens)?; + if let Some(value) = value { + items.push(value); + } + } + } + } + Ok(Some(items)) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start array or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_identifier.rs b/sdk/quicksight/src/protocol_serde/shape_identifier.rs new file mode 100644 index 000000000000..c971fc35c18b --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_identifier.rs @@ -0,0 +1,52 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_identifier( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::Identifier, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + { + object.key("Identity").string(input.identity.as_str()); + } + Ok(()) +} + +pub(crate) fn de_identifier<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::IdentifierBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "Identity" => { + builder = builder.set_identity( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(crate::serde_util::identifier_correct_errors(builder).build().map_err(|err| { + ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err) + })?)) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_invalid_topic_reviewed_answer.rs b/sdk/quicksight/src/protocol_serde/shape_invalid_topic_reviewed_answer.rs new file mode 100644 index 000000000000..e24f5e35039d --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_invalid_topic_reviewed_answer.rs @@ -0,0 +1,47 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_invalid_topic_reviewed_answer<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::InvalidTopicReviewedAnswerBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "AnswerId" => { + builder = builder.set_answer_id( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "Error" => { + builder = builder.set_error( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::ReviewedAnswerErrorCode::from(u.as_ref()))) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_invalid_topic_reviewed_answers.rs b/sdk/quicksight/src/protocol_serde/shape_invalid_topic_reviewed_answers.rs new file mode 100644 index 000000000000..e38ca27074c8 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_invalid_topic_reviewed_answers.rs @@ -0,0 +1,32 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_invalid_topic_reviewed_answers<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => { + let mut items = Vec::new(); + loop { + match tokens.peek() { + Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => { + tokens.next().transpose().unwrap(); + break; + } + _ => { + let value = crate::protocol_serde::shape_invalid_topic_reviewed_answer::de_invalid_topic_reviewed_answer(tokens)?; + if let Some(value) = value { + items.push(value); + } + } + } + } + Ok(Some(items)) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start array or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_list_topic_reviewed_answers.rs b/sdk/quicksight/src/protocol_serde/shape_list_topic_reviewed_answers.rs new file mode 100644 index 000000000000..70b2d79b8631 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_list_topic_reviewed_answers.rs @@ -0,0 +1,185 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(clippy::unnecessary_wraps)] +pub fn de_list_topic_reviewed_answers_http_error( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersOutput, + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError, +> { + #[allow(unused_mut)] + let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) + .map_err(crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError::unhandled)?; + generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); + let generic = generic_builder.build(); + let error_code = match generic.code() { + Some(code) => code, + None => { + return Err(crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError::unhandled( + generic, + )) + } + }; + + let _error_message = generic.message().map(|msg| msg.to_owned()); + Err(match error_code { + "AccessDeniedException" => crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError::AccessDeniedException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); + output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) + .map_err(crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "InternalFailureException" => crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError::InternalFailureException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InternalFailureExceptionBuilder::default(); + output = crate::protocol_serde::shape_internal_failure_exception::de_internal_failure_exception_json_err(_response_body, output) + .map_err(crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "InvalidParameterValueException" => { + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError::InvalidParameterValueException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InvalidParameterValueExceptionBuilder::default(); + output = crate::protocol_serde::shape_invalid_parameter_value_exception::de_invalid_parameter_value_exception_json_err( + _response_body, + output, + ) + .map_err(crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } + "ResourceNotFoundException" => crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError::ResourceNotFoundException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); + output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) + .map_err(crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "ThrottlingException" => crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError::ThrottlingException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); + output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) + .map_err(crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + _ => crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError::generic(generic), + }) +} + +#[allow(clippy::unnecessary_wraps)] +pub fn de_list_topic_reviewed_answers_http_response( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersOutput, + crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError, +> { + Ok({ + #[allow(unused_mut)] + let mut output = crate::operation::list_topic_reviewed_answers::builders::ListTopicReviewedAnswersOutputBuilder::default(); + output = crate::protocol_serde::shape_list_topic_reviewed_answers::de_list_topic_reviewed_answers(_response_body, output) + .map_err(crate::operation::list_topic_reviewed_answers::ListTopicReviewedAnswersError::unhandled)?; + output = output.set_status(Some(_response_status as _)); + output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); + output.build() + }) +} + +pub(crate) fn de_list_topic_reviewed_answers( + value: &[u8], + mut builder: crate::operation::list_topic_reviewed_answers::builders::ListTopicReviewedAnswersOutputBuilder, +) -> Result< + crate::operation::list_topic_reviewed_answers::builders::ListTopicReviewedAnswersOutputBuilder, + ::aws_smithy_json::deserialize::error::DeserializeError, +> { + let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); + let tokens = &mut tokens_owned; + ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "Answers" => { + builder = builder.set_answers(crate::protocol_serde::shape_topic_reviewed_answers::de_topic_reviewed_answers(tokens)?); + } + "RequestId" => { + builder = builder.set_request_id( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "TopicArn" => { + builder = builder.set_topic_arn( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "TopicId" => { + builder = builder.set_topic_id( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + if tokens.next().is_some() { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "found more JSON tokens after completing parsing", + )); + } + Ok(builder) +} diff --git a/sdk/quicksight/src/protocol_serde/shape_named_entity_ref.rs b/sdk/quicksight/src/protocol_serde/shape_named_entity_ref.rs new file mode 100644 index 000000000000..3790dd4778e1 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_named_entity_ref.rs @@ -0,0 +1,50 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_named_entity_ref( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::NamedEntityRef, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.named_entity_name { + object.key("NamedEntityName").string(var_1.as_str()); + } + Ok(()) +} + +pub(crate) fn de_named_entity_ref<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::NamedEntityRefBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "NamedEntityName" => { + builder = builder.set_named_entity_name( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_operand_list.rs b/sdk/quicksight/src/protocol_serde/shape_operand_list.rs new file mode 100644 index 000000000000..c984b07c300b --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_operand_list.rs @@ -0,0 +1,32 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_operand_list<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => { + let mut items = Vec::new(); + loop { + match tokens.peek() { + Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => { + tokens.next().transpose().unwrap(); + break; + } + _ => { + let value = crate::protocol_serde::shape_identifier::de_identifier(tokens)?; + if let Some(value) = value { + items.push(value); + } + } + } + } + Ok(Some(items)) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start array or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_slot.rs b/sdk/quicksight/src/protocol_serde/shape_slot.rs new file mode 100644 index 000000000000..3dd7644d63ed --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_slot.rs @@ -0,0 +1,60 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_slot( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::Slot, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.slot_id { + object.key("SlotId").string(var_1.as_str()); + } + if let Some(var_2) = &input.visual_id { + object.key("VisualId").string(var_2.as_str()); + } + Ok(()) +} + +pub(crate) fn de_slot<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::SlotBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "SlotId" => { + builder = builder.set_slot_id( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "VisualId" => { + builder = builder.set_visual_id( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_slots.rs b/sdk/quicksight/src/protocol_serde/shape_slots.rs new file mode 100644 index 000000000000..1a81df922d09 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_slots.rs @@ -0,0 +1,32 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_slots<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => { + let mut items = Vec::new(); + loop { + match tokens.peek() { + Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => { + tokens.next().transpose().unwrap(); + break; + } + _ => { + let value = crate::protocol_serde::shape_slot::de_slot(tokens)?; + if let Some(value) = value { + items.push(value); + } + } + } + } + Ok(Some(items)) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start array or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_succeeded_topic_reviewed_answer.rs b/sdk/quicksight/src/protocol_serde/shape_succeeded_topic_reviewed_answer.rs new file mode 100644 index 000000000000..b1bf011eb92c --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_succeeded_topic_reviewed_answer.rs @@ -0,0 +1,40 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_succeeded_topic_reviewed_answer<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::SucceededTopicReviewedAnswerBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "AnswerId" => { + builder = builder.set_answer_id( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_succeeded_topic_reviewed_answers.rs b/sdk/quicksight/src/protocol_serde/shape_succeeded_topic_reviewed_answers.rs new file mode 100644 index 000000000000..d40384b9a157 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_succeeded_topic_reviewed_answers.rs @@ -0,0 +1,32 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_succeeded_topic_reviewed_answers<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => { + let mut items = Vec::new(); + loop { + match tokens.peek() { + Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => { + tokens.next().transpose().unwrap(); + break; + } + _ => { + let value = crate::protocol_serde::shape_succeeded_topic_reviewed_answer::de_succeeded_topic_reviewed_answer(tokens)?; + if let Some(value) = value { + items.push(value); + } + } + } + } + Ok(Some(items)) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start array or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_topic_constant_value.rs b/sdk/quicksight/src/protocol_serde/shape_topic_constant_value.rs new file mode 100644 index 000000000000..6e7220413c3b --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_topic_constant_value.rs @@ -0,0 +1,97 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_topic_constant_value( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::TopicConstantValue, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.constant_type { + object.key("ConstantType").string(var_1.as_str()); + } + if let Some(var_2) = &input.value { + object.key("Value").string(var_2.as_str()); + } + if let Some(var_3) = &input.minimum { + object.key("Minimum").string(var_3.as_str()); + } + if let Some(var_4) = &input.maximum { + object.key("Maximum").string(var_4.as_str()); + } + if let Some(var_5) = &input.value_list { + let mut array_6 = object.key("ValueList").start_array(); + for item_7 in var_5 { + { + #[allow(unused_mut)] + let mut object_8 = array_6.value().start_object(); + crate::protocol_serde::shape_collective_constant_entry::ser_collective_constant_entry(&mut object_8, item_7)?; + object_8.finish(); + } + } + array_6.finish(); + } + Ok(()) +} + +pub(crate) fn de_topic_constant_value<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::TopicConstantValueBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "ConstantType" => { + builder = builder.set_constant_type( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::ConstantType::from(u.as_ref()))) + .transpose()?, + ); + } + "Value" => { + builder = builder.set_value( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "Minimum" => { + builder = builder.set_minimum( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "Maximum" => { + builder = builder.set_maximum( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "ValueList" => { + builder = builder.set_value_list( + crate::protocol_serde::shape_collective_constant_entry_list::de_collective_constant_entry_list(tokens)?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_topic_ir.rs b/sdk/quicksight/src/protocol_serde/shape_topic_ir.rs new file mode 100644 index 000000000000..6771164c57d7 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_topic_ir.rs @@ -0,0 +1,121 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_topic_ir( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::TopicIr, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.metrics { + let mut array_2 = object.key("Metrics").start_array(); + for item_3 in var_1 { + { + #[allow(unused_mut)] + let mut object_4 = array_2.value().start_object(); + crate::protocol_serde::shape_topic_ir_metric::ser_topic_ir_metric(&mut object_4, item_3)?; + object_4.finish(); + } + } + array_2.finish(); + } + if let Some(var_5) = &input.group_by_list { + let mut array_6 = object.key("GroupByList").start_array(); + for item_7 in var_5 { + { + #[allow(unused_mut)] + let mut object_8 = array_6.value().start_object(); + crate::protocol_serde::shape_topic_ir_group_by::ser_topic_ir_group_by(&mut object_8, item_7)?; + object_8.finish(); + } + } + array_6.finish(); + } + if let Some(var_9) = &input.filters { + let mut array_10 = object.key("Filters").start_array(); + for item_11 in var_9 { + { + let mut array_12 = array_10.value().start_array(); + for item_13 in item_11 { + { + #[allow(unused_mut)] + let mut object_14 = array_12.value().start_object(); + crate::protocol_serde::shape_topic_ir_filter_option::ser_topic_ir_filter_option(&mut object_14, item_13)?; + object_14.finish(); + } + } + array_12.finish(); + } + } + array_10.finish(); + } + if let Some(var_15) = &input.sort { + #[allow(unused_mut)] + let mut object_16 = object.key("Sort").start_object(); + crate::protocol_serde::shape_topic_sort_clause::ser_topic_sort_clause(&mut object_16, var_15)?; + object_16.finish(); + } + if let Some(var_17) = &input.contribution_analysis { + #[allow(unused_mut)] + let mut object_18 = object.key("ContributionAnalysis").start_object(); + crate::protocol_serde::shape_topic_ir_contribution_analysis::ser_topic_ir_contribution_analysis(&mut object_18, var_17)?; + object_18.finish(); + } + if let Some(var_19) = &input.visual { + #[allow(unused_mut)] + let mut object_20 = object.key("Visual").start_object(); + crate::protocol_serde::shape_visual_options::ser_visual_options(&mut object_20, var_19)?; + object_20.finish(); + } + Ok(()) +} + +pub(crate) fn de_topic_ir<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::TopicIrBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "Metrics" => { + builder = builder.set_metrics(crate::protocol_serde::shape_topic_ir_metric_list::de_topic_ir_metric_list(tokens)?); + } + "GroupByList" => { + builder = + builder.set_group_by_list(crate::protocol_serde::shape_topic_ir_group_by_list::de_topic_ir_group_by_list(tokens)?); + } + "Filters" => { + builder = builder.set_filters(crate::protocol_serde::shape_topic_ir_filter_list::de_topic_ir_filter_list(tokens)?); + } + "Sort" => { + builder = builder.set_sort(crate::protocol_serde::shape_topic_sort_clause::de_topic_sort_clause(tokens)?); + } + "ContributionAnalysis" => { + builder = builder.set_contribution_analysis( + crate::protocol_serde::shape_topic_ir_contribution_analysis::de_topic_ir_contribution_analysis(tokens)?, + ); + } + "Visual" => { + builder = builder.set_visual(crate::protocol_serde::shape_visual_options::de_visual_options(tokens)?); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_topic_ir_comparison_method.rs b/sdk/quicksight/src/protocol_serde/shape_topic_ir_comparison_method.rs new file mode 100644 index 000000000000..eaf441916366 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_topic_ir_comparison_method.rs @@ -0,0 +1,73 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_topic_ir_comparison_method( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::TopicIrComparisonMethod, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.r#type { + object.key("Type").string(var_1.as_str()); + } + if let Some(var_2) = &input.period { + object.key("Period").string(var_2.as_str()); + } + if input.window_size != 0 { + object.key("WindowSize").number( + #[allow(clippy::useless_conversion)] + ::aws_smithy_types::Number::NegInt((input.window_size).into()), + ); + } + Ok(()) +} + +pub(crate) fn de_topic_ir_comparison_method<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::TopicIrComparisonMethodBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "Type" => { + builder = builder.set_type( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::ComparisonMethodType::from(u.as_ref()))) + .transpose()?, + ); + } + "Period" => { + builder = builder.set_period( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::TopicTimeGranularity::from(u.as_ref()))) + .transpose()?, + ); + } + "WindowSize" => { + builder = builder.set_window_size( + ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())? + .map(i32::try_from) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_topic_ir_contribution_analysis.rs b/sdk/quicksight/src/protocol_serde/shape_topic_ir_contribution_analysis.rs new file mode 100644 index 000000000000..32ac06fc5b00 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_topic_ir_contribution_analysis.rs @@ -0,0 +1,88 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_topic_ir_contribution_analysis( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::TopicIrContributionAnalysis, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.factors { + let mut array_2 = object.key("Factors").start_array(); + for item_3 in var_1 { + { + #[allow(unused_mut)] + let mut object_4 = array_2.value().start_object(); + crate::protocol_serde::shape_contribution_analysis_factor::ser_contribution_analysis_factor(&mut object_4, item_3)?; + object_4.finish(); + } + } + array_2.finish(); + } + if let Some(var_5) = &input.time_ranges { + #[allow(unused_mut)] + let mut object_6 = object.key("TimeRanges").start_object(); + crate::protocol_serde::shape_contribution_analysis_time_ranges::ser_contribution_analysis_time_ranges(&mut object_6, var_5)?; + object_6.finish(); + } + if let Some(var_7) = &input.direction { + object.key("Direction").string(var_7.as_str()); + } + if let Some(var_8) = &input.sort_type { + object.key("SortType").string(var_8.as_str()); + } + Ok(()) +} + +pub(crate) fn de_topic_ir_contribution_analysis<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::TopicIrContributionAnalysisBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "Factors" => { + builder = builder.set_factors( + crate::protocol_serde::shape_contribution_analysis_factors_list::de_contribution_analysis_factors_list(tokens)?, + ); + } + "TimeRanges" => { + builder = builder.set_time_ranges( + crate::protocol_serde::shape_contribution_analysis_time_ranges::de_contribution_analysis_time_ranges(tokens)?, + ); + } + "Direction" => { + builder = builder.set_direction( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::ContributionAnalysisDirection::from(u.as_ref()))) + .transpose()?, + ); + } + "SortType" => { + builder = builder.set_sort_type( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::ContributionAnalysisSortType::from(u.as_ref()))) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_topic_ir_filter_entry.rs b/sdk/quicksight/src/protocol_serde/shape_topic_ir_filter_entry.rs new file mode 100644 index 000000000000..6d08bbc13321 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_topic_ir_filter_entry.rs @@ -0,0 +1,32 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_topic_ir_filter_entry<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => { + let mut items = Vec::new(); + loop { + match tokens.peek() { + Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => { + tokens.next().transpose().unwrap(); + break; + } + _ => { + let value = crate::protocol_serde::shape_topic_ir_filter_option::de_topic_ir_filter_option(tokens)?; + if let Some(value) = value { + items.push(value); + } + } + } + } + Ok(Some(items)) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start array or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_topic_ir_filter_list.rs b/sdk/quicksight/src/protocol_serde/shape_topic_ir_filter_list.rs new file mode 100644 index 000000000000..0c20df21c5d0 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_topic_ir_filter_list.rs @@ -0,0 +1,32 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_topic_ir_filter_list<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result>>, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => { + let mut items = Vec::new(); + loop { + match tokens.peek() { + Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => { + tokens.next().transpose().unwrap(); + break; + } + _ => { + let value = crate::protocol_serde::shape_topic_ir_filter_entry::de_topic_ir_filter_entry(tokens)?; + if let Some(value) = value { + items.push(value); + } + } + } + } + Ok(Some(items)) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start array or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_topic_ir_filter_option.rs b/sdk/quicksight/src/protocol_serde/shape_topic_ir_filter_option.rs new file mode 100644 index 000000000000..de164da46627 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_topic_ir_filter_option.rs @@ -0,0 +1,226 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_topic_ir_filter_option( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::TopicIrFilterOption, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.filter_type { + object.key("FilterType").string(var_1.as_str()); + } + if let Some(var_2) = &input.filter_class { + object.key("FilterClass").string(var_2.as_str()); + } + if let Some(var_3) = &input.operand_field { + #[allow(unused_mut)] + let mut object_4 = object.key("OperandField").start_object(); + crate::protocol_serde::shape_identifier::ser_identifier(&mut object_4, var_3)?; + object_4.finish(); + } + if let Some(var_5) = &input.function { + object.key("Function").string(var_5.as_str()); + } + if let Some(var_6) = &input.constant { + #[allow(unused_mut)] + let mut object_7 = object.key("Constant").start_object(); + crate::protocol_serde::shape_topic_constant_value::ser_topic_constant_value(&mut object_7, var_6)?; + object_7.finish(); + } + if input.inverse { + object.key("Inverse").boolean(input.inverse); + } + if let Some(var_8) = &input.null_filter { + object.key("NullFilter").string(var_8.as_str()); + } + if let Some(var_9) = &input.aggregation { + object.key("Aggregation").string(var_9.as_str()); + } + if let Some(var_10) = &input.aggregation_function_parameters { + #[allow(unused_mut)] + let mut object_11 = object.key("AggregationFunctionParameters").start_object(); + for (key_12, value_13) in var_10 { + { + object_11.key(key_12.as_str()).string(value_13.as_str()); + } + } + object_11.finish(); + } + if let Some(var_14) = &input.aggregation_partition_by { + let mut array_15 = object.key("AggregationPartitionBy").start_array(); + for item_16 in var_14 { + { + #[allow(unused_mut)] + let mut object_17 = array_15.value().start_object(); + crate::protocol_serde::shape_aggregation_partition_by::ser_aggregation_partition_by(&mut object_17, item_16)?; + object_17.finish(); + } + } + array_15.finish(); + } + if let Some(var_18) = &input.range { + #[allow(unused_mut)] + let mut object_19 = object.key("Range").start_object(); + crate::protocol_serde::shape_topic_constant_value::ser_topic_constant_value(&mut object_19, var_18)?; + object_19.finish(); + } + if input.inclusive { + object.key("Inclusive").boolean(input.inclusive); + } + if let Some(var_20) = &input.time_granularity { + object.key("TimeGranularity").string(var_20.as_str()); + } + if let Some(var_21) = &input.last_next_offset { + #[allow(unused_mut)] + let mut object_22 = object.key("LastNextOffset").start_object(); + crate::protocol_serde::shape_topic_constant_value::ser_topic_constant_value(&mut object_22, var_21)?; + object_22.finish(); + } + if let Some(var_23) = &input.agg_metrics { + let mut array_24 = object.key("AggMetrics").start_array(); + for item_25 in var_23 { + { + #[allow(unused_mut)] + let mut object_26 = array_24.value().start_object(); + crate::protocol_serde::shape_filter_agg_metrics::ser_filter_agg_metrics(&mut object_26, item_25)?; + object_26.finish(); + } + } + array_24.finish(); + } + if let Some(var_27) = &input.top_bottom_limit { + #[allow(unused_mut)] + let mut object_28 = object.key("TopBottomLimit").start_object(); + crate::protocol_serde::shape_topic_constant_value::ser_topic_constant_value(&mut object_28, var_27)?; + object_28.finish(); + } + if let Some(var_29) = &input.sort_direction { + object.key("SortDirection").string(var_29.as_str()); + } + if let Some(var_30) = &input.anchor { + #[allow(unused_mut)] + let mut object_31 = object.key("Anchor").start_object(); + crate::protocol_serde::shape_anchor::ser_anchor(&mut object_31, var_30)?; + object_31.finish(); + } + Ok(()) +} + +pub(crate) fn de_topic_ir_filter_option<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::TopicIrFilterOptionBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "FilterType" => { + builder = builder.set_filter_type( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::TopicIrFilterType::from(u.as_ref()))) + .transpose()?, + ); + } + "FilterClass" => { + builder = builder.set_filter_class( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::FilterClass::from(u.as_ref()))) + .transpose()?, + ); + } + "OperandField" => { + builder = builder.set_operand_field(crate::protocol_serde::shape_identifier::de_identifier(tokens)?); + } + "Function" => { + builder = builder.set_function( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::TopicIrFilterFunction::from(u.as_ref()))) + .transpose()?, + ); + } + "Constant" => { + builder = builder.set_constant(crate::protocol_serde::shape_topic_constant_value::de_topic_constant_value(tokens)?); + } + "Inverse" => { + builder = builder.set_inverse(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?); + } + "NullFilter" => { + builder = builder.set_null_filter( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::NullFilterOption::from(u.as_ref()))) + .transpose()?, + ); + } + "Aggregation" => { + builder = builder.set_aggregation( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::AggType::from(u.as_ref()))) + .transpose()?, + ); + } + "AggregationFunctionParameters" => { + builder = builder.set_aggregation_function_parameters( + crate::protocol_serde::shape_agg_function_param_map::de_agg_function_param_map(tokens)?, + ); + } + "AggregationPartitionBy" => { + builder = builder.set_aggregation_partition_by( + crate::protocol_serde::shape_aggregation_partition_by_list::de_aggregation_partition_by_list(tokens)?, + ); + } + "Range" => { + builder = builder.set_range(crate::protocol_serde::shape_topic_constant_value::de_topic_constant_value(tokens)?); + } + "Inclusive" => { + builder = builder.set_inclusive(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?); + } + "TimeGranularity" => { + builder = builder.set_time_granularity( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::TimeGranularity::from(u.as_ref()))) + .transpose()?, + ); + } + "LastNextOffset" => { + builder = + builder.set_last_next_offset(crate::protocol_serde::shape_topic_constant_value::de_topic_constant_value(tokens)?); + } + "AggMetrics" => { + builder = + builder.set_agg_metrics(crate::protocol_serde::shape_filter_agg_metrics_list::de_filter_agg_metrics_list(tokens)?); + } + "TopBottomLimit" => { + builder = + builder.set_top_bottom_limit(crate::protocol_serde::shape_topic_constant_value::de_topic_constant_value(tokens)?); + } + "SortDirection" => { + builder = builder.set_sort_direction( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::TopicSortDirection::from(u.as_ref()))) + .transpose()?, + ); + } + "Anchor" => { + builder = builder.set_anchor(crate::protocol_serde::shape_anchor::de_anchor(tokens)?); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_topic_ir_group_by.rs b/sdk/quicksight/src/protocol_serde/shape_topic_ir_group_by.rs new file mode 100644 index 000000000000..31296392f58b --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_topic_ir_group_by.rs @@ -0,0 +1,97 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_topic_ir_group_by( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::TopicIrGroupBy, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.field_name { + #[allow(unused_mut)] + let mut object_2 = object.key("FieldName").start_object(); + crate::protocol_serde::shape_identifier::ser_identifier(&mut object_2, var_1)?; + object_2.finish(); + } + if let Some(var_3) = &input.time_granularity { + object.key("TimeGranularity").string(var_3.as_str()); + } + if let Some(var_4) = &input.sort { + #[allow(unused_mut)] + let mut object_5 = object.key("Sort").start_object(); + crate::protocol_serde::shape_topic_sort_clause::ser_topic_sort_clause(&mut object_5, var_4)?; + object_5.finish(); + } + if let Some(var_6) = &input.display_format { + object.key("DisplayFormat").string(var_6.as_str()); + } + if let Some(var_7) = &input.display_format_options { + #[allow(unused_mut)] + let mut object_8 = object.key("DisplayFormatOptions").start_object(); + crate::protocol_serde::shape_display_format_options::ser_display_format_options(&mut object_8, var_7)?; + object_8.finish(); + } + if let Some(var_9) = &input.named_entity { + #[allow(unused_mut)] + let mut object_10 = object.key("NamedEntity").start_object(); + crate::protocol_serde::shape_named_entity_ref::ser_named_entity_ref(&mut object_10, var_9)?; + object_10.finish(); + } + Ok(()) +} + +pub(crate) fn de_topic_ir_group_by<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::TopicIrGroupByBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "FieldName" => { + builder = builder.set_field_name(crate::protocol_serde::shape_identifier::de_identifier(tokens)?); + } + "TimeGranularity" => { + builder = builder.set_time_granularity( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::TopicTimeGranularity::from(u.as_ref()))) + .transpose()?, + ); + } + "Sort" => { + builder = builder.set_sort(crate::protocol_serde::shape_topic_sort_clause::de_topic_sort_clause(tokens)?); + } + "DisplayFormat" => { + builder = builder.set_display_format( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::DisplayFormat::from(u.as_ref()))) + .transpose()?, + ); + } + "DisplayFormatOptions" => { + builder = builder + .set_display_format_options(crate::protocol_serde::shape_display_format_options::de_display_format_options(tokens)?); + } + "NamedEntity" => { + builder = builder.set_named_entity(crate::protocol_serde::shape_named_entity_ref::de_named_entity_ref(tokens)?); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_topic_ir_group_by_list.rs b/sdk/quicksight/src/protocol_serde/shape_topic_ir_group_by_list.rs new file mode 100644 index 000000000000..cc33d407d61c --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_topic_ir_group_by_list.rs @@ -0,0 +1,32 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_topic_ir_group_by_list<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => { + let mut items = Vec::new(); + loop { + match tokens.peek() { + Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => { + tokens.next().transpose().unwrap(); + break; + } + _ => { + let value = crate::protocol_serde::shape_topic_ir_group_by::de_topic_ir_group_by(tokens)?; + if let Some(value) = value { + items.push(value); + } + } + } + } + Ok(Some(items)) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start array or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_topic_ir_metric.rs b/sdk/quicksight/src/protocol_serde/shape_topic_ir_metric.rs new file mode 100644 index 000000000000..783cdeafe7dc --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_topic_ir_metric.rs @@ -0,0 +1,140 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_topic_ir_metric( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::TopicIrMetric, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.metric_id { + #[allow(unused_mut)] + let mut object_2 = object.key("MetricId").start_object(); + crate::protocol_serde::shape_identifier::ser_identifier(&mut object_2, var_1)?; + object_2.finish(); + } + if let Some(var_3) = &input.function { + #[allow(unused_mut)] + let mut object_4 = object.key("Function").start_object(); + crate::protocol_serde::shape_agg_function::ser_agg_function(&mut object_4, var_3)?; + object_4.finish(); + } + if let Some(var_5) = &input.operands { + let mut array_6 = object.key("Operands").start_array(); + for item_7 in var_5 { + { + #[allow(unused_mut)] + let mut object_8 = array_6.value().start_object(); + crate::protocol_serde::shape_identifier::ser_identifier(&mut object_8, item_7)?; + object_8.finish(); + } + } + array_6.finish(); + } + if let Some(var_9) = &input.comparison_method { + #[allow(unused_mut)] + let mut object_10 = object.key("ComparisonMethod").start_object(); + crate::protocol_serde::shape_topic_ir_comparison_method::ser_topic_ir_comparison_method(&mut object_10, var_9)?; + object_10.finish(); + } + if let Some(var_11) = &input.expression { + object.key("Expression").string(var_11.as_str()); + } + if let Some(var_12) = &input.calculated_field_references { + let mut array_13 = object.key("CalculatedFieldReferences").start_array(); + for item_14 in var_12 { + { + #[allow(unused_mut)] + let mut object_15 = array_13.value().start_object(); + crate::protocol_serde::shape_identifier::ser_identifier(&mut object_15, item_14)?; + object_15.finish(); + } + } + array_13.finish(); + } + if let Some(var_16) = &input.display_format { + object.key("DisplayFormat").string(var_16.as_str()); + } + if let Some(var_17) = &input.display_format_options { + #[allow(unused_mut)] + let mut object_18 = object.key("DisplayFormatOptions").start_object(); + crate::protocol_serde::shape_display_format_options::ser_display_format_options(&mut object_18, var_17)?; + object_18.finish(); + } + if let Some(var_19) = &input.named_entity { + #[allow(unused_mut)] + let mut object_20 = object.key("NamedEntity").start_object(); + crate::protocol_serde::shape_named_entity_ref::ser_named_entity_ref(&mut object_20, var_19)?; + object_20.finish(); + } + Ok(()) +} + +pub(crate) fn de_topic_ir_metric<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::TopicIrMetricBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "MetricId" => { + builder = builder.set_metric_id(crate::protocol_serde::shape_identifier::de_identifier(tokens)?); + } + "Function" => { + builder = builder.set_function(crate::protocol_serde::shape_agg_function::de_agg_function(tokens)?); + } + "Operands" => { + builder = builder.set_operands(crate::protocol_serde::shape_operand_list::de_operand_list(tokens)?); + } + "ComparisonMethod" => { + builder = builder.set_comparison_method( + crate::protocol_serde::shape_topic_ir_comparison_method::de_topic_ir_comparison_method(tokens)?, + ); + } + "Expression" => { + builder = builder.set_expression( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "CalculatedFieldReferences" => { + builder = builder.set_calculated_field_references( + crate::protocol_serde::shape_calculated_field_reference_list::de_calculated_field_reference_list(tokens)?, + ); + } + "DisplayFormat" => { + builder = builder.set_display_format( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::DisplayFormat::from(u.as_ref()))) + .transpose()?, + ); + } + "DisplayFormatOptions" => { + builder = builder + .set_display_format_options(crate::protocol_serde::shape_display_format_options::de_display_format_options(tokens)?); + } + "NamedEntity" => { + builder = builder.set_named_entity(crate::protocol_serde::shape_named_entity_ref::de_named_entity_ref(tokens)?); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_topic_ir_metric_list.rs b/sdk/quicksight/src/protocol_serde/shape_topic_ir_metric_list.rs new file mode 100644 index 000000000000..577a9d08722b --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_topic_ir_metric_list.rs @@ -0,0 +1,32 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_topic_ir_metric_list<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => { + let mut items = Vec::new(); + loop { + match tokens.peek() { + Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => { + tokens.next().transpose().unwrap(); + break; + } + _ => { + let value = crate::protocol_serde::shape_topic_ir_metric::de_topic_ir_metric(tokens)?; + if let Some(value) = value { + items.push(value); + } + } + } + } + Ok(Some(items)) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start array or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_topic_reviewed_answer.rs b/sdk/quicksight/src/protocol_serde/shape_topic_reviewed_answer.rs new file mode 100644 index 000000000000..b23a31adeceb --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_topic_reviewed_answer.rs @@ -0,0 +1,72 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_topic_reviewed_answer<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::TopicReviewedAnswerBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "Arn" => { + builder = builder.set_arn( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "AnswerId" => { + builder = builder.set_answer_id( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "DatasetArn" => { + builder = builder.set_dataset_arn( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "Question" => { + builder = builder.set_question( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "Mir" => { + builder = builder.set_mir(crate::protocol_serde::shape_topic_ir::de_topic_ir(tokens)?); + } + "PrimaryVisual" => { + builder = builder.set_primary_visual(crate::protocol_serde::shape_topic_visual::de_topic_visual(tokens)?); + } + "Template" => { + builder = builder.set_template(crate::protocol_serde::shape_topic_template::de_topic_template(tokens)?); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(crate::serde_util::topic_reviewed_answer_correct_errors(builder).build().map_err( + |err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err), + )?)) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_topic_reviewed_answers.rs b/sdk/quicksight/src/protocol_serde/shape_topic_reviewed_answers.rs new file mode 100644 index 000000000000..2c925ead152b --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_topic_reviewed_answers.rs @@ -0,0 +1,32 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_topic_reviewed_answers<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => { + let mut items = Vec::new(); + loop { + match tokens.peek() { + Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => { + tokens.next().transpose().unwrap(); + break; + } + _ => { + let value = crate::protocol_serde::shape_topic_reviewed_answer::de_topic_reviewed_answer(tokens)?; + if let Some(value) = value { + items.push(value); + } + } + } + } + Ok(Some(items)) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start array or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_topic_sort_clause.rs b/sdk/quicksight/src/protocol_serde/shape_topic_sort_clause.rs new file mode 100644 index 000000000000..909ee060d353 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_topic_sort_clause.rs @@ -0,0 +1,59 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_topic_sort_clause( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::TopicSortClause, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.operand { + #[allow(unused_mut)] + let mut object_2 = object.key("Operand").start_object(); + crate::protocol_serde::shape_identifier::ser_identifier(&mut object_2, var_1)?; + object_2.finish(); + } + if let Some(var_3) = &input.sort_direction { + object.key("SortDirection").string(var_3.as_str()); + } + Ok(()) +} + +pub(crate) fn de_topic_sort_clause<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::TopicSortClauseBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "Operand" => { + builder = builder.set_operand(crate::protocol_serde::shape_identifier::de_identifier(tokens)?); + } + "SortDirection" => { + builder = builder.set_sort_direction( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::TopicSortDirection::from(u.as_ref()))) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_topic_template.rs b/sdk/quicksight/src/protocol_serde/shape_topic_template.rs new file mode 100644 index 000000000000..a5a9b11d1bb7 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_topic_template.rs @@ -0,0 +1,65 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_topic_template( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::TopicTemplate, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.template_type { + object.key("TemplateType").string(var_1.as_str()); + } + if let Some(var_2) = &input.slots { + let mut array_3 = object.key("Slots").start_array(); + for item_4 in var_2 { + { + #[allow(unused_mut)] + let mut object_5 = array_3.value().start_object(); + crate::protocol_serde::shape_slot::ser_slot(&mut object_5, item_4)?; + object_5.finish(); + } + } + array_3.finish(); + } + Ok(()) +} + +pub(crate) fn de_topic_template<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::TopicTemplateBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "TemplateType" => { + builder = builder.set_template_type( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "Slots" => { + builder = builder.set_slots(crate::protocol_serde::shape_slots::de_slots(tokens)?); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_topic_visual.rs b/sdk/quicksight/src/protocol_serde/shape_topic_visual.rs new file mode 100644 index 000000000000..c75c859fd24d --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_topic_visual.rs @@ -0,0 +1,84 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_topic_visual( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::TopicVisual, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.visual_id { + object.key("VisualId").string(var_1.as_str()); + } + if let Some(var_2) = &input.role { + object.key("Role").string(var_2.as_str()); + } + if let Some(var_3) = &input.ir { + #[allow(unused_mut)] + let mut object_4 = object.key("Ir").start_object(); + crate::protocol_serde::shape_topic_ir::ser_topic_ir(&mut object_4, var_3)?; + object_4.finish(); + } + if let Some(var_5) = &input.supporting_visuals { + let mut array_6 = object.key("SupportingVisuals").start_array(); + for item_7 in var_5 { + { + #[allow(unused_mut)] + let mut object_8 = array_6.value().start_object(); + crate::protocol_serde::shape_topic_visual::ser_topic_visual(&mut object_8, item_7)?; + object_8.finish(); + } + } + array_6.finish(); + } + Ok(()) +} + +pub(crate) fn de_topic_visual<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::TopicVisualBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "VisualId" => { + builder = builder.set_visual_id( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "Role" => { + builder = builder.set_role( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| crate::types::VisualRole::from(u.as_ref()))) + .transpose()?, + ); + } + "Ir" => { + builder = builder.set_ir(crate::protocol_serde::shape_topic_ir::de_topic_ir(tokens)?); + } + "SupportingVisuals" => { + builder = builder.set_supporting_visuals(crate::protocol_serde::shape_topic_visuals::de_topic_visuals(tokens)?); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_topic_visuals.rs b/sdk/quicksight/src/protocol_serde/shape_topic_visuals.rs new file mode 100644 index 000000000000..a8643d7e6d0f --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_topic_visuals.rs @@ -0,0 +1,32 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub(crate) fn de_topic_visuals<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => { + let mut items = Vec::new(); + loop { + match tokens.peek() { + Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => { + tokens.next().transpose().unwrap(); + break; + } + _ => { + let value = crate::protocol_serde::shape_topic_visual::de_topic_visual(tokens)?; + if let Some(value) = value { + items.push(value); + } + } + } + } + Ok(Some(items)) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start array or null", + )), + } +} diff --git a/sdk/quicksight/src/protocol_serde/shape_visual_options.rs b/sdk/quicksight/src/protocol_serde/shape_visual_options.rs new file mode 100644 index 000000000000..28aebd0ac8b5 --- /dev/null +++ b/sdk/quicksight/src/protocol_serde/shape_visual_options.rs @@ -0,0 +1,50 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_visual_options( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::VisualOptions, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.r#type { + object.key("type").string(var_1.as_str()); + } + Ok(()) +} + +pub(crate) fn de_visual_options<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::VisualOptionsBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "type" => { + builder = builder.set_type( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/quicksight/src/serde_util.rs b/sdk/quicksight/src/serde_util.rs index fd1845de4524..a2fe5f5f86e3 100644 --- a/sdk/quicksight/src/serde_util.rs +++ b/sdk/quicksight/src/serde_util.rs @@ -236,6 +236,21 @@ pub(crate) fn tag_correct_errors(mut builder: crate::types::builders::TagBuilder builder } +pub(crate) fn topic_reviewed_answer_correct_errors( + mut builder: crate::types::builders::TopicReviewedAnswerBuilder, +) -> crate::types::builders::TopicReviewedAnswerBuilder { + if builder.answer_id.is_none() { + builder.answer_id = Some(Default::default()) + } + if builder.dataset_arn.is_none() { + builder.dataset_arn = Some(Default::default()) + } + if builder.question.is_none() { + builder.question = Some(Default::default()) + } + builder +} + pub(crate) fn vpc_connection_properties_correct_errors( mut builder: crate::types::builders::VpcConnectionPropertiesBuilder, ) -> crate::types::builders::VpcConnectionPropertiesBuilder { @@ -1288,6 +1303,13 @@ pub(crate) fn default_section_based_layout_configuration_correct_errors( builder } +pub(crate) fn identifier_correct_errors(mut builder: crate::types::builders::IdentifierBuilder) -> crate::types::builders::IdentifierBuilder { + if builder.identity.is_none() { + builder.identity = Some(Default::default()) + } + builder +} + pub(crate) fn join_instruction_correct_errors( mut builder: crate::types::builders::JoinInstructionBuilder, ) -> crate::types::builders::JoinInstructionBuilder { diff --git a/sdk/quicksight/src/types.rs b/sdk/quicksight/src/types.rs index e37926fb07c2..ab50be3b4105 100644 --- a/sdk/quicksight/src/types.rs +++ b/sdk/quicksight/src/types.rs @@ -1801,6 +1801,70 @@ pub use crate::types::_network_interface_status::NetworkInterfaceStatus; pub use crate::types::_topic_summary::TopicSummary; +pub use crate::types::_topic_reviewed_answer::TopicReviewedAnswer; + +pub use crate::types::_topic_template::TopicTemplate; + +pub use crate::types::_slot::Slot; + +pub use crate::types::_topic_visual::TopicVisual; + +pub use crate::types::_topic_ir::TopicIr; + +pub use crate::types::_visual_options::VisualOptions; + +pub use crate::types::_topic_ir_contribution_analysis::TopicIrContributionAnalysis; + +pub use crate::types::_contribution_analysis_sort_type::ContributionAnalysisSortType; + +pub use crate::types::_contribution_analysis_direction::ContributionAnalysisDirection; + +pub use crate::types::_contribution_analysis_time_ranges::ContributionAnalysisTimeRanges; + +pub use crate::types::_topic_ir_filter_option::TopicIrFilterOption; + +pub use crate::types::_anchor::Anchor; + +pub use crate::types::_anchor_type::AnchorType; + +pub use crate::types::_topic_sort_direction::TopicSortDirection; + +pub use crate::types::_topic_constant_value::TopicConstantValue; + +pub use crate::types::_collective_constant_entry::CollectiveConstantEntry; + +pub use crate::types::_filter_agg_metrics::FilterAggMetrics; + +pub use crate::types::_agg_type::AggType; + +pub use crate::types::_identifier::Identifier; + +pub use crate::types::_aggregation_partition_by::AggregationPartitionBy; + +pub use crate::types::_null_filter_option::NullFilterOption; + +pub use crate::types::_topic_ir_filter_function::TopicIrFilterFunction; + +pub use crate::types::_topic_ir_filter_type::TopicIrFilterType; + +pub use crate::types::_contribution_analysis_factor::ContributionAnalysisFactor; + +pub use crate::types::_topic_sort_clause::TopicSortClause; + +pub use crate::types::_topic_ir_group_by::TopicIrGroupBy; + +pub use crate::types::_named_entity_ref::NamedEntityRef; + +pub use crate::types::_topic_ir_metric::TopicIrMetric; + +pub use crate::types::_topic_ir_comparison_method::TopicIrComparisonMethod; + +pub use crate::types::_comparison_method_type::ComparisonMethodType; + +pub use crate::types::_agg_function::AggFunction; + +pub use crate::types::_visual_role::VisualRole; + pub use crate::types::_topic_refresh_schedule_summary::TopicRefreshScheduleSummary; pub use crate::types::_theme_version_summary::ThemeVersionSummary; @@ -1989,6 +2053,14 @@ pub use crate::types::_signup_response::SignupResponse; pub use crate::types::_authentication_method_option::AuthenticationMethodOption; +pub use crate::types::_invalid_topic_reviewed_answer::InvalidTopicReviewedAnswer; + +pub use crate::types::_reviewed_answer_error_code::ReviewedAnswerErrorCode; + +pub use crate::types::_succeeded_topic_reviewed_answer::SucceededTopicReviewedAnswer; + +pub use crate::types::_create_topic_reviewed_answer::CreateTopicReviewedAnswer; + mod _account_customization; mod _account_info; @@ -1999,8 +2071,14 @@ mod _active_iam_policy_assignment; mod _ad_hoc_filtering_option; +mod _agg_function; + +mod _agg_type; + mod _aggregation_function; +mod _aggregation_partition_by; + mod _aggregation_sort_configuration; mod _all_sheets_filter_scope_configuration; @@ -2029,10 +2107,14 @@ mod _analysis_source_template; mod _analysis_summary; +mod _anchor; + mod _anchor_date_configuration; mod _anchor_option; +mod _anchor_type; + mod _anonymous_user_dashboard_embedding_configuration; mod _anonymous_user_dashboard_visual_embedding_configuration; @@ -2313,6 +2395,8 @@ mod _cluster_marker_configuration; mod _collective_constant; +mod _collective_constant_entry; + mod _color_fill_type; mod _color_scale; @@ -2373,6 +2457,8 @@ mod _comparison_format_configuration; mod _comparison_method; +mod _comparison_method_type; + mod _computation; mod _conditional_formatting_color; @@ -2401,8 +2487,18 @@ mod _context_menu_option; mod _contribution_analysis_default; +mod _contribution_analysis_direction; + +mod _contribution_analysis_factor; + +mod _contribution_analysis_sort_type; + +mod _contribution_analysis_time_ranges; + mod _create_columns_operation; +mod _create_topic_reviewed_answer; + mod _credential_pair; mod _cross_dataset_types; @@ -2711,6 +2807,8 @@ mod _filled_map_visual; mod _filter; +mod _filter_agg_metrics; + mod _filter_class; mod _filter_control; @@ -2923,6 +3021,8 @@ mod _iam_policy_assignment_summary; mod _icon; +mod _identifier; + mod _identity_center_configuration; mod _identity_store; @@ -2965,6 +3065,8 @@ mod _integer_parameter_declaration; mod _integer_value_when_unset_configuration; +mod _invalid_topic_reviewed_answer; + mod _items_limit_configuration; mod _jira_parameters; @@ -3107,6 +3209,8 @@ mod _named_entity_definition; mod _named_entity_definition_metric; +mod _named_entity_ref; + mod _named_filter_agg_type; mod _named_filter_type; @@ -3133,6 +3237,8 @@ mod _network_interface_status; mod _new_default_values; +mod _null_filter_option; + mod _null_value_format_configuration; mod _number_display_format_configuration; @@ -3405,6 +3511,8 @@ mod _resource_permission; mod _resource_status; +mod _reviewed_answer_error_code; + mod _role; mod _rolling_date_configuration; @@ -3551,6 +3659,8 @@ mod _single_y_axis_option; mod _slider_control_display_options; +mod _slot; + mod _small_multiples_axis_placement; mod _small_multiples_axis_properties; @@ -3635,6 +3745,8 @@ mod _styled_cell_type; mod _subtotal_options; +mod _succeeded_topic_reviewed_answer; + mod _successful_key_registration_entry; mod _table_aggregated_field_wells; @@ -3807,12 +3919,30 @@ mod _topic_category_filter_constant; mod _topic_column; +mod _topic_constant_value; + mod _topic_date_range_filter; mod _topic_details; mod _topic_filter; +mod _topic_ir; + +mod _topic_ir_comparison_method; + +mod _topic_ir_contribution_analysis; + +mod _topic_ir_filter_function; + +mod _topic_ir_filter_option; + +mod _topic_ir_filter_type; + +mod _topic_ir_group_by; + +mod _topic_ir_metric; + mod _topic_named_entity; mod _topic_numeric_equality_filter; @@ -3835,16 +3965,26 @@ mod _topic_relative_date_filter; mod _topic_relative_date_filter_function; +mod _topic_reviewed_answer; + mod _topic_schedule_type; mod _topic_singular_filter_constant; +mod _topic_sort_clause; + +mod _topic_sort_direction; + mod _topic_summary; +mod _topic_template; + mod _topic_time_granularity; mod _topic_user_experience_version; +mod _topic_visual; + mod _total_aggregation_computation; mod _total_aggregation_function; @@ -3917,8 +4057,12 @@ mod _visual_interaction_options; mod _visual_menu_option; +mod _visual_options; + mod _visual_palette; +mod _visual_role; + mod _visual_subtitle_label_options; mod _visual_title_label_options; diff --git a/sdk/quicksight/src/types/_agg_function.rs b/sdk/quicksight/src/types/_agg_function.rs new file mode 100644 index 000000000000..307d99ad1d64 --- /dev/null +++ b/sdk/quicksight/src/types/_agg_function.rs @@ -0,0 +1,133 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition of an Agg function.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct AggFunction { + ///

    The aggregation of an Agg function.

    + pub aggregation: ::std::option::Option, + ///

    The aggregation parameters for an Agg function.

    + pub aggregation_function_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, + ///

    The period of an Agg function.

    + pub period: ::std::option::Option, + ///

    The period field for an Agg function.

    + pub period_field: ::std::option::Option<::std::string::String>, +} +impl AggFunction { + ///

    The aggregation of an Agg function.

    + pub fn aggregation(&self) -> ::std::option::Option<&crate::types::AggType> { + self.aggregation.as_ref() + } + ///

    The aggregation parameters for an Agg function.

    + pub fn aggregation_function_parameters( + &self, + ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> { + self.aggregation_function_parameters.as_ref() + } + ///

    The period of an Agg function.

    + pub fn period(&self) -> ::std::option::Option<&crate::types::TopicTimeGranularity> { + self.period.as_ref() + } + ///

    The period field for an Agg function.

    + pub fn period_field(&self) -> ::std::option::Option<&str> { + self.period_field.as_deref() + } +} +impl AggFunction { + /// Creates a new builder-style object to manufacture [`AggFunction`](crate::types::AggFunction). + pub fn builder() -> crate::types::builders::AggFunctionBuilder { + crate::types::builders::AggFunctionBuilder::default() + } +} + +/// A builder for [`AggFunction`](crate::types::AggFunction). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct AggFunctionBuilder { + pub(crate) aggregation: ::std::option::Option, + pub(crate) aggregation_function_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, + pub(crate) period: ::std::option::Option, + pub(crate) period_field: ::std::option::Option<::std::string::String>, +} +impl AggFunctionBuilder { + ///

    The aggregation of an Agg function.

    + pub fn aggregation(mut self, input: crate::types::AggType) -> Self { + self.aggregation = ::std::option::Option::Some(input); + self + } + ///

    The aggregation of an Agg function.

    + pub fn set_aggregation(mut self, input: ::std::option::Option) -> Self { + self.aggregation = input; + self + } + ///

    The aggregation of an Agg function.

    + pub fn get_aggregation(&self) -> &::std::option::Option { + &self.aggregation + } + /// Adds a key-value pair to `aggregation_function_parameters`. + /// + /// To override the contents of this collection use [`set_aggregation_function_parameters`](Self::set_aggregation_function_parameters). + /// + ///

    The aggregation parameters for an Agg function.

    + pub fn aggregation_function_parameters( + mut self, + k: impl ::std::convert::Into<::std::string::String>, + v: impl ::std::convert::Into<::std::string::String>, + ) -> Self { + let mut hash_map = self.aggregation_function_parameters.unwrap_or_default(); + hash_map.insert(k.into(), v.into()); + self.aggregation_function_parameters = ::std::option::Option::Some(hash_map); + self + } + ///

    The aggregation parameters for an Agg function.

    + pub fn set_aggregation_function_parameters( + mut self, + input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, + ) -> Self { + self.aggregation_function_parameters = input; + self + } + ///

    The aggregation parameters for an Agg function.

    + pub fn get_aggregation_function_parameters( + &self, + ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.aggregation_function_parameters + } + ///

    The period of an Agg function.

    + pub fn period(mut self, input: crate::types::TopicTimeGranularity) -> Self { + self.period = ::std::option::Option::Some(input); + self + } + ///

    The period of an Agg function.

    + pub fn set_period(mut self, input: ::std::option::Option) -> Self { + self.period = input; + self + } + ///

    The period of an Agg function.

    + pub fn get_period(&self) -> &::std::option::Option { + &self.period + } + ///

    The period field for an Agg function.

    + pub fn period_field(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.period_field = ::std::option::Option::Some(input.into()); + self + } + ///

    The period field for an Agg function.

    + pub fn set_period_field(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.period_field = input; + self + } + ///

    The period field for an Agg function.

    + pub fn get_period_field(&self) -> &::std::option::Option<::std::string::String> { + &self.period_field + } + /// Consumes the builder and constructs a [`AggFunction`](crate::types::AggFunction). + pub fn build(self) -> crate::types::AggFunction { + crate::types::AggFunction { + aggregation: self.aggregation, + aggregation_function_parameters: self.aggregation_function_parameters, + period: self.period, + period_field: self.period_field, + } + } +} diff --git a/sdk/quicksight/src/types/_agg_type.rs b/sdk/quicksight/src/types/_agg_type.rs new file mode 100644 index 000000000000..f31ecb0d39f7 --- /dev/null +++ b/sdk/quicksight/src/types/_agg_type.rs @@ -0,0 +1,236 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// When writing a match expression against `AggType`, it is important to ensure +/// your code is forward-compatible. That is, if a match arm handles a case for a +/// feature that is supported by the service but has not been represented as an enum +/// variant in a current version of SDK, your code should continue to work when you +/// upgrade SDK to a future version in which the enum does include a variant for that +/// feature. +/// +/// Here is an example of how you can make a match expression forward-compatible: +/// +/// ```text +/// # let aggtype = unimplemented!(); +/// match aggtype { +/// AggType::Average => { /* ... */ }, +/// AggType::Column => { /* ... */ }, +/// AggType::Count => { /* ... */ }, +/// AggType::Custom => { /* ... */ }, +/// AggType::DistinctCount => { /* ... */ }, +/// AggType::Max => { /* ... */ }, +/// AggType::Median => { /* ... */ }, +/// AggType::Min => { /* ... */ }, +/// AggType::Percentile => { /* ... */ }, +/// AggType::PtdAverage => { /* ... */ }, +/// AggType::PtdCount => { /* ... */ }, +/// AggType::PtdDistinctCount => { /* ... */ }, +/// AggType::PtdMax => { /* ... */ }, +/// AggType::PtdMin => { /* ... */ }, +/// AggType::PtdSum => { /* ... */ }, +/// AggType::Stdev => { /* ... */ }, +/// AggType::Stdevp => { /* ... */ }, +/// AggType::Sum => { /* ... */ }, +/// AggType::Var => { /* ... */ }, +/// AggType::Varp => { /* ... */ }, +/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, +/// _ => { /* ... */ }, +/// } +/// ``` +/// The above code demonstrates that when `aggtype` represents +/// `NewFeature`, the execution path will lead to the second last match arm, +/// even though the enum does not contain a variant `AggType::NewFeature` +/// in the current version of SDK. The reason is that the variable `other`, +/// created by the `@` operator, is bound to +/// `AggType::Unknown(UnknownVariantValue("NewFeature".to_owned()))` +/// and calling `as_str` on it yields `"NewFeature"`. +/// This match expression is forward-compatible when executed with a newer +/// version of SDK where the variant `AggType::NewFeature` is defined. +/// Specifically, when `aggtype` represents `NewFeature`, +/// the execution path will hit the second last match arm as before by virtue of +/// calling `as_str` on `AggType::NewFeature` also yielding `"NewFeature"`. +/// +/// Explicitly matching on the `Unknown` variant should +/// be avoided for two reasons: +/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted. +/// - It might inadvertently shadow other intended match arms. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash, +)] +pub enum AggType { + #[allow(missing_docs)] // documentation missing in model + Average, + #[allow(missing_docs)] // documentation missing in model + Column, + #[allow(missing_docs)] // documentation missing in model + Count, + #[allow(missing_docs)] // documentation missing in model + Custom, + #[allow(missing_docs)] // documentation missing in model + DistinctCount, + #[allow(missing_docs)] // documentation missing in model + Max, + #[allow(missing_docs)] // documentation missing in model + Median, + #[allow(missing_docs)] // documentation missing in model + Min, + #[allow(missing_docs)] // documentation missing in model + Percentile, + #[allow(missing_docs)] // documentation missing in model + PtdAverage, + #[allow(missing_docs)] // documentation missing in model + PtdCount, + #[allow(missing_docs)] // documentation missing in model + PtdDistinctCount, + #[allow(missing_docs)] // documentation missing in model + PtdMax, + #[allow(missing_docs)] // documentation missing in model + PtdMin, + #[allow(missing_docs)] // documentation missing in model + PtdSum, + #[allow(missing_docs)] // documentation missing in model + Stdev, + #[allow(missing_docs)] // documentation missing in model + Stdevp, + #[allow(missing_docs)] // documentation missing in model + Sum, + #[allow(missing_docs)] // documentation missing in model + Var, + #[allow(missing_docs)] // documentation missing in model + Varp, + /// `Unknown` contains new variants that have been added since this code was generated. + #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")] + Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), +} +impl ::std::convert::From<&str> for AggType { + fn from(s: &str) -> Self { + match s { + "AVERAGE" => AggType::Average, + "COLUMN" => AggType::Column, + "COUNT" => AggType::Count, + "CUSTOM" => AggType::Custom, + "DISTINCT_COUNT" => AggType::DistinctCount, + "MAX" => AggType::Max, + "MEDIAN" => AggType::Median, + "MIN" => AggType::Min, + "PERCENTILE" => AggType::Percentile, + "PTD_AVERAGE" => AggType::PtdAverage, + "PTD_COUNT" => AggType::PtdCount, + "PTD_DISTINCT_COUNT" => AggType::PtdDistinctCount, + "PTD_MAX" => AggType::PtdMax, + "PTD_MIN" => AggType::PtdMin, + "PTD_SUM" => AggType::PtdSum, + "STDEV" => AggType::Stdev, + "STDEVP" => AggType::Stdevp, + "SUM" => AggType::Sum, + "VAR" => AggType::Var, + "VARP" => AggType::Varp, + other => AggType::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), + } + } +} +impl ::std::str::FromStr for AggType { + type Err = ::std::convert::Infallible; + + fn from_str(s: &str) -> ::std::result::Result::Err> { + ::std::result::Result::Ok(AggType::from(s)) + } +} +impl AggType { + /// Returns the `&str` value of the enum member. + pub fn as_str(&self) -> &str { + match self { + AggType::Average => "AVERAGE", + AggType::Column => "COLUMN", + AggType::Count => "COUNT", + AggType::Custom => "CUSTOM", + AggType::DistinctCount => "DISTINCT_COUNT", + AggType::Max => "MAX", + AggType::Median => "MEDIAN", + AggType::Min => "MIN", + AggType::Percentile => "PERCENTILE", + AggType::PtdAverage => "PTD_AVERAGE", + AggType::PtdCount => "PTD_COUNT", + AggType::PtdDistinctCount => "PTD_DISTINCT_COUNT", + AggType::PtdMax => "PTD_MAX", + AggType::PtdMin => "PTD_MIN", + AggType::PtdSum => "PTD_SUM", + AggType::Stdev => "STDEV", + AggType::Stdevp => "STDEVP", + AggType::Sum => "SUM", + AggType::Var => "VAR", + AggType::Varp => "VARP", + AggType::Unknown(value) => value.as_str(), + } + } + /// Returns all the `&str` representations of the enum members. + pub const fn values() -> &'static [&'static str] { + &[ + "AVERAGE", + "COLUMN", + "COUNT", + "CUSTOM", + "DISTINCT_COUNT", + "MAX", + "MEDIAN", + "MIN", + "PERCENTILE", + "PTD_AVERAGE", + "PTD_COUNT", + "PTD_DISTINCT_COUNT", + "PTD_MAX", + "PTD_MIN", + "PTD_SUM", + "STDEV", + "STDEVP", + "SUM", + "VAR", + "VARP", + ] + } +} +impl ::std::convert::AsRef for AggType { + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl AggType { + /// Parses the enum value while disallowing unknown variants. + /// + /// Unknown variants will result in an error. + pub fn try_parse(value: &str) -> ::std::result::Result { + match Self::from(value) { + #[allow(deprecated)] + Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)), + known => Ok(known), + } + } +} +impl ::std::fmt::Display for AggType { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + AggType::Average => write!(f, "AVERAGE"), + AggType::Column => write!(f, "COLUMN"), + AggType::Count => write!(f, "COUNT"), + AggType::Custom => write!(f, "CUSTOM"), + AggType::DistinctCount => write!(f, "DISTINCT_COUNT"), + AggType::Max => write!(f, "MAX"), + AggType::Median => write!(f, "MEDIAN"), + AggType::Min => write!(f, "MIN"), + AggType::Percentile => write!(f, "PERCENTILE"), + AggType::PtdAverage => write!(f, "PTD_AVERAGE"), + AggType::PtdCount => write!(f, "PTD_COUNT"), + AggType::PtdDistinctCount => write!(f, "PTD_DISTINCT_COUNT"), + AggType::PtdMax => write!(f, "PTD_MAX"), + AggType::PtdMin => write!(f, "PTD_MIN"), + AggType::PtdSum => write!(f, "PTD_SUM"), + AggType::Stdev => write!(f, "STDEV"), + AggType::Stdevp => write!(f, "STDEVP"), + AggType::Sum => write!(f, "SUM"), + AggType::Var => write!(f, "VAR"), + AggType::Varp => write!(f, "VARP"), + AggType::Unknown(value) => write!(f, "{}", value), + } + } +} diff --git a/sdk/quicksight/src/types/_aggregation_partition_by.rs b/sdk/quicksight/src/types/_aggregation_partition_by.rs new file mode 100644 index 000000000000..01ea94ca45db --- /dev/null +++ b/sdk/quicksight/src/types/_aggregation_partition_by.rs @@ -0,0 +1,72 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition of an AggregationPartitionBy.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct AggregationPartitionBy { + ///

    The field Name for an AggregationPartitionBy.

    + pub field_name: ::std::option::Option<::std::string::String>, + ///

    The TimeGranularity for an AggregationPartitionBy.

    + pub time_granularity: ::std::option::Option, +} +impl AggregationPartitionBy { + ///

    The field Name for an AggregationPartitionBy.

    + pub fn field_name(&self) -> ::std::option::Option<&str> { + self.field_name.as_deref() + } + ///

    The TimeGranularity for an AggregationPartitionBy.

    + pub fn time_granularity(&self) -> ::std::option::Option<&crate::types::TimeGranularity> { + self.time_granularity.as_ref() + } +} +impl AggregationPartitionBy { + /// Creates a new builder-style object to manufacture [`AggregationPartitionBy`](crate::types::AggregationPartitionBy). + pub fn builder() -> crate::types::builders::AggregationPartitionByBuilder { + crate::types::builders::AggregationPartitionByBuilder::default() + } +} + +/// A builder for [`AggregationPartitionBy`](crate::types::AggregationPartitionBy). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct AggregationPartitionByBuilder { + pub(crate) field_name: ::std::option::Option<::std::string::String>, + pub(crate) time_granularity: ::std::option::Option, +} +impl AggregationPartitionByBuilder { + ///

    The field Name for an AggregationPartitionBy.

    + pub fn field_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.field_name = ::std::option::Option::Some(input.into()); + self + } + ///

    The field Name for an AggregationPartitionBy.

    + pub fn set_field_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.field_name = input; + self + } + ///

    The field Name for an AggregationPartitionBy.

    + pub fn get_field_name(&self) -> &::std::option::Option<::std::string::String> { + &self.field_name + } + ///

    The TimeGranularity for an AggregationPartitionBy.

    + pub fn time_granularity(mut self, input: crate::types::TimeGranularity) -> Self { + self.time_granularity = ::std::option::Option::Some(input); + self + } + ///

    The TimeGranularity for an AggregationPartitionBy.

    + pub fn set_time_granularity(mut self, input: ::std::option::Option) -> Self { + self.time_granularity = input; + self + } + ///

    The TimeGranularity for an AggregationPartitionBy.

    + pub fn get_time_granularity(&self) -> &::std::option::Option { + &self.time_granularity + } + /// Consumes the builder and constructs a [`AggregationPartitionBy`](crate::types::AggregationPartitionBy). + pub fn build(self) -> crate::types::AggregationPartitionBy { + crate::types::AggregationPartitionBy { + field_name: self.field_name, + time_granularity: self.time_granularity, + } + } +} diff --git a/sdk/quicksight/src/types/_anchor.rs b/sdk/quicksight/src/types/_anchor.rs new file mode 100644 index 000000000000..afc0b890150f --- /dev/null +++ b/sdk/quicksight/src/types/_anchor.rs @@ -0,0 +1,94 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition of the Anchor.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct Anchor { + ///

    The AnchorType for the Anchor.

    + pub anchor_type: ::std::option::Option, + ///

    The TimeGranularity of the Anchor.

    + pub time_granularity: ::std::option::Option, + ///

    The offset of the Anchor.

    + pub offset: i32, +} +impl Anchor { + ///

    The AnchorType for the Anchor.

    + pub fn anchor_type(&self) -> ::std::option::Option<&crate::types::AnchorType> { + self.anchor_type.as_ref() + } + ///

    The TimeGranularity of the Anchor.

    + pub fn time_granularity(&self) -> ::std::option::Option<&crate::types::TimeGranularity> { + self.time_granularity.as_ref() + } + ///

    The offset of the Anchor.

    + pub fn offset(&self) -> i32 { + self.offset + } +} +impl Anchor { + /// Creates a new builder-style object to manufacture [`Anchor`](crate::types::Anchor). + pub fn builder() -> crate::types::builders::AnchorBuilder { + crate::types::builders::AnchorBuilder::default() + } +} + +/// A builder for [`Anchor`](crate::types::Anchor). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct AnchorBuilder { + pub(crate) anchor_type: ::std::option::Option, + pub(crate) time_granularity: ::std::option::Option, + pub(crate) offset: ::std::option::Option, +} +impl AnchorBuilder { + ///

    The AnchorType for the Anchor.

    + pub fn anchor_type(mut self, input: crate::types::AnchorType) -> Self { + self.anchor_type = ::std::option::Option::Some(input); + self + } + ///

    The AnchorType for the Anchor.

    + pub fn set_anchor_type(mut self, input: ::std::option::Option) -> Self { + self.anchor_type = input; + self + } + ///

    The AnchorType for the Anchor.

    + pub fn get_anchor_type(&self) -> &::std::option::Option { + &self.anchor_type + } + ///

    The TimeGranularity of the Anchor.

    + pub fn time_granularity(mut self, input: crate::types::TimeGranularity) -> Self { + self.time_granularity = ::std::option::Option::Some(input); + self + } + ///

    The TimeGranularity of the Anchor.

    + pub fn set_time_granularity(mut self, input: ::std::option::Option) -> Self { + self.time_granularity = input; + self + } + ///

    The TimeGranularity of the Anchor.

    + pub fn get_time_granularity(&self) -> &::std::option::Option { + &self.time_granularity + } + ///

    The offset of the Anchor.

    + pub fn offset(mut self, input: i32) -> Self { + self.offset = ::std::option::Option::Some(input); + self + } + ///

    The offset of the Anchor.

    + pub fn set_offset(mut self, input: ::std::option::Option) -> Self { + self.offset = input; + self + } + ///

    The offset of the Anchor.

    + pub fn get_offset(&self) -> &::std::option::Option { + &self.offset + } + /// Consumes the builder and constructs a [`Anchor`](crate::types::Anchor). + pub fn build(self) -> crate::types::Anchor { + crate::types::Anchor { + anchor_type: self.anchor_type, + time_granularity: self.time_granularity, + offset: self.offset.unwrap_or_default(), + } + } +} diff --git a/sdk/quicksight/src/types/_anchor_type.rs b/sdk/quicksight/src/types/_anchor_type.rs new file mode 100644 index 000000000000..2fbe7ac1f751 --- /dev/null +++ b/sdk/quicksight/src/types/_anchor_type.rs @@ -0,0 +1,101 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// When writing a match expression against `AnchorType`, it is important to ensure +/// your code is forward-compatible. That is, if a match arm handles a case for a +/// feature that is supported by the service but has not been represented as an enum +/// variant in a current version of SDK, your code should continue to work when you +/// upgrade SDK to a future version in which the enum does include a variant for that +/// feature. +/// +/// Here is an example of how you can make a match expression forward-compatible: +/// +/// ```text +/// # let anchortype = unimplemented!(); +/// match anchortype { +/// AnchorType::Today => { /* ... */ }, +/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, +/// _ => { /* ... */ }, +/// } +/// ``` +/// The above code demonstrates that when `anchortype` represents +/// `NewFeature`, the execution path will lead to the second last match arm, +/// even though the enum does not contain a variant `AnchorType::NewFeature` +/// in the current version of SDK. The reason is that the variable `other`, +/// created by the `@` operator, is bound to +/// `AnchorType::Unknown(UnknownVariantValue("NewFeature".to_owned()))` +/// and calling `as_str` on it yields `"NewFeature"`. +/// This match expression is forward-compatible when executed with a newer +/// version of SDK where the variant `AnchorType::NewFeature` is defined. +/// Specifically, when `anchortype` represents `NewFeature`, +/// the execution path will hit the second last match arm as before by virtue of +/// calling `as_str` on `AnchorType::NewFeature` also yielding `"NewFeature"`. +/// +/// Explicitly matching on the `Unknown` variant should +/// be avoided for two reasons: +/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted. +/// - It might inadvertently shadow other intended match arms. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash, +)] +pub enum AnchorType { + #[allow(missing_docs)] // documentation missing in model + Today, + /// `Unknown` contains new variants that have been added since this code was generated. + #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")] + Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), +} +impl ::std::convert::From<&str> for AnchorType { + fn from(s: &str) -> Self { + match s { + "TODAY" => AnchorType::Today, + other => AnchorType::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), + } + } +} +impl ::std::str::FromStr for AnchorType { + type Err = ::std::convert::Infallible; + + fn from_str(s: &str) -> ::std::result::Result::Err> { + ::std::result::Result::Ok(AnchorType::from(s)) + } +} +impl AnchorType { + /// Returns the `&str` value of the enum member. + pub fn as_str(&self) -> &str { + match self { + AnchorType::Today => "TODAY", + AnchorType::Unknown(value) => value.as_str(), + } + } + /// Returns all the `&str` representations of the enum members. + pub const fn values() -> &'static [&'static str] { + &["TODAY"] + } +} +impl ::std::convert::AsRef for AnchorType { + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl AnchorType { + /// Parses the enum value while disallowing unknown variants. + /// + /// Unknown variants will result in an error. + pub fn try_parse(value: &str) -> ::std::result::Result { + match Self::from(value) { + #[allow(deprecated)] + Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)), + known => Ok(known), + } + } +} +impl ::std::fmt::Display for AnchorType { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + AnchorType::Today => write!(f, "TODAY"), + AnchorType::Unknown(value) => write!(f, "{}", value), + } + } +} diff --git a/sdk/quicksight/src/types/_collective_constant_entry.rs b/sdk/quicksight/src/types/_collective_constant_entry.rs new file mode 100644 index 000000000000..38b8d7609c8b --- /dev/null +++ b/sdk/quicksight/src/types/_collective_constant_entry.rs @@ -0,0 +1,72 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition for a CollectiveConstantEntry.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct CollectiveConstantEntry { + ///

    The ConstantType of a CollectiveConstantEntry.

    + pub constant_type: ::std::option::Option, + ///

    The value of a CollectiveConstantEntry.

    + pub value: ::std::option::Option<::std::string::String>, +} +impl CollectiveConstantEntry { + ///

    The ConstantType of a CollectiveConstantEntry.

    + pub fn constant_type(&self) -> ::std::option::Option<&crate::types::ConstantType> { + self.constant_type.as_ref() + } + ///

    The value of a CollectiveConstantEntry.

    + pub fn value(&self) -> ::std::option::Option<&str> { + self.value.as_deref() + } +} +impl CollectiveConstantEntry { + /// Creates a new builder-style object to manufacture [`CollectiveConstantEntry`](crate::types::CollectiveConstantEntry). + pub fn builder() -> crate::types::builders::CollectiveConstantEntryBuilder { + crate::types::builders::CollectiveConstantEntryBuilder::default() + } +} + +/// A builder for [`CollectiveConstantEntry`](crate::types::CollectiveConstantEntry). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CollectiveConstantEntryBuilder { + pub(crate) constant_type: ::std::option::Option, + pub(crate) value: ::std::option::Option<::std::string::String>, +} +impl CollectiveConstantEntryBuilder { + ///

    The ConstantType of a CollectiveConstantEntry.

    + pub fn constant_type(mut self, input: crate::types::ConstantType) -> Self { + self.constant_type = ::std::option::Option::Some(input); + self + } + ///

    The ConstantType of a CollectiveConstantEntry.

    + pub fn set_constant_type(mut self, input: ::std::option::Option) -> Self { + self.constant_type = input; + self + } + ///

    The ConstantType of a CollectiveConstantEntry.

    + pub fn get_constant_type(&self) -> &::std::option::Option { + &self.constant_type + } + ///

    The value of a CollectiveConstantEntry.

    + pub fn value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.value = ::std::option::Option::Some(input.into()); + self + } + ///

    The value of a CollectiveConstantEntry.

    + pub fn set_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.value = input; + self + } + ///

    The value of a CollectiveConstantEntry.

    + pub fn get_value(&self) -> &::std::option::Option<::std::string::String> { + &self.value + } + /// Consumes the builder and constructs a [`CollectiveConstantEntry`](crate::types::CollectiveConstantEntry). + pub fn build(self) -> crate::types::CollectiveConstantEntry { + crate::types::CollectiveConstantEntry { + constant_type: self.constant_type, + value: self.value, + } + } +} diff --git a/sdk/quicksight/src/types/_comparison_method_type.rs b/sdk/quicksight/src/types/_comparison_method_type.rs new file mode 100644 index 000000000000..3563241b6081 --- /dev/null +++ b/sdk/quicksight/src/types/_comparison_method_type.rs @@ -0,0 +1,166 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// When writing a match expression against `ComparisonMethodType`, it is important to ensure +/// your code is forward-compatible. That is, if a match arm handles a case for a +/// feature that is supported by the service but has not been represented as an enum +/// variant in a current version of SDK, your code should continue to work when you +/// upgrade SDK to a future version in which the enum does include a variant for that +/// feature. +/// +/// Here is an example of how you can make a match expression forward-compatible: +/// +/// ```text +/// # let comparisonmethodtype = unimplemented!(); +/// match comparisonmethodtype { +/// ComparisonMethodType::Diff => { /* ... */ }, +/// ComparisonMethodType::DiffAsPerc => { /* ... */ }, +/// ComparisonMethodType::MovingAverage => { /* ... */ }, +/// ComparisonMethodType::PercentOfTotal => { /* ... */ }, +/// ComparisonMethodType::PercDiff => { /* ... */ }, +/// ComparisonMethodType::PopCurrentDiff => { /* ... */ }, +/// ComparisonMethodType::PopCurrentDiffAsPerc => { /* ... */ }, +/// ComparisonMethodType::PopOvertimeDiff => { /* ... */ }, +/// ComparisonMethodType::PopOvertimeDiffAsPerc => { /* ... */ }, +/// ComparisonMethodType::RunningSum => { /* ... */ }, +/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, +/// _ => { /* ... */ }, +/// } +/// ``` +/// The above code demonstrates that when `comparisonmethodtype` represents +/// `NewFeature`, the execution path will lead to the second last match arm, +/// even though the enum does not contain a variant `ComparisonMethodType::NewFeature` +/// in the current version of SDK. The reason is that the variable `other`, +/// created by the `@` operator, is bound to +/// `ComparisonMethodType::Unknown(UnknownVariantValue("NewFeature".to_owned()))` +/// and calling `as_str` on it yields `"NewFeature"`. +/// This match expression is forward-compatible when executed with a newer +/// version of SDK where the variant `ComparisonMethodType::NewFeature` is defined. +/// Specifically, when `comparisonmethodtype` represents `NewFeature`, +/// the execution path will hit the second last match arm as before by virtue of +/// calling `as_str` on `ComparisonMethodType::NewFeature` also yielding `"NewFeature"`. +/// +/// Explicitly matching on the `Unknown` variant should +/// be avoided for two reasons: +/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted. +/// - It might inadvertently shadow other intended match arms. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash, +)] +pub enum ComparisonMethodType { + #[allow(missing_docs)] // documentation missing in model + Diff, + #[allow(missing_docs)] // documentation missing in model + DiffAsPerc, + #[allow(missing_docs)] // documentation missing in model + MovingAverage, + #[allow(missing_docs)] // documentation missing in model + PercentOfTotal, + #[allow(missing_docs)] // documentation missing in model + PercDiff, + #[allow(missing_docs)] // documentation missing in model + PopCurrentDiff, + #[allow(missing_docs)] // documentation missing in model + PopCurrentDiffAsPerc, + #[allow(missing_docs)] // documentation missing in model + PopOvertimeDiff, + #[allow(missing_docs)] // documentation missing in model + PopOvertimeDiffAsPerc, + #[allow(missing_docs)] // documentation missing in model + RunningSum, + /// `Unknown` contains new variants that have been added since this code was generated. + #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")] + Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), +} +impl ::std::convert::From<&str> for ComparisonMethodType { + fn from(s: &str) -> Self { + match s { + "DIFF" => ComparisonMethodType::Diff, + "DIFF_AS_PERC" => ComparisonMethodType::DiffAsPerc, + "MOVING_AVERAGE" => ComparisonMethodType::MovingAverage, + "PERCENT_OF_TOTAL" => ComparisonMethodType::PercentOfTotal, + "PERC_DIFF" => ComparisonMethodType::PercDiff, + "POP_CURRENT_DIFF" => ComparisonMethodType::PopCurrentDiff, + "POP_CURRENT_DIFF_AS_PERC" => ComparisonMethodType::PopCurrentDiffAsPerc, + "POP_OVERTIME_DIFF" => ComparisonMethodType::PopOvertimeDiff, + "POP_OVERTIME_DIFF_AS_PERC" => ComparisonMethodType::PopOvertimeDiffAsPerc, + "RUNNING_SUM" => ComparisonMethodType::RunningSum, + other => ComparisonMethodType::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), + } + } +} +impl ::std::str::FromStr for ComparisonMethodType { + type Err = ::std::convert::Infallible; + + fn from_str(s: &str) -> ::std::result::Result::Err> { + ::std::result::Result::Ok(ComparisonMethodType::from(s)) + } +} +impl ComparisonMethodType { + /// Returns the `&str` value of the enum member. + pub fn as_str(&self) -> &str { + match self { + ComparisonMethodType::Diff => "DIFF", + ComparisonMethodType::DiffAsPerc => "DIFF_AS_PERC", + ComparisonMethodType::MovingAverage => "MOVING_AVERAGE", + ComparisonMethodType::PercentOfTotal => "PERCENT_OF_TOTAL", + ComparisonMethodType::PercDiff => "PERC_DIFF", + ComparisonMethodType::PopCurrentDiff => "POP_CURRENT_DIFF", + ComparisonMethodType::PopCurrentDiffAsPerc => "POP_CURRENT_DIFF_AS_PERC", + ComparisonMethodType::PopOvertimeDiff => "POP_OVERTIME_DIFF", + ComparisonMethodType::PopOvertimeDiffAsPerc => "POP_OVERTIME_DIFF_AS_PERC", + ComparisonMethodType::RunningSum => "RUNNING_SUM", + ComparisonMethodType::Unknown(value) => value.as_str(), + } + } + /// Returns all the `&str` representations of the enum members. + pub const fn values() -> &'static [&'static str] { + &[ + "DIFF", + "DIFF_AS_PERC", + "MOVING_AVERAGE", + "PERCENT_OF_TOTAL", + "PERC_DIFF", + "POP_CURRENT_DIFF", + "POP_CURRENT_DIFF_AS_PERC", + "POP_OVERTIME_DIFF", + "POP_OVERTIME_DIFF_AS_PERC", + "RUNNING_SUM", + ] + } +} +impl ::std::convert::AsRef for ComparisonMethodType { + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl ComparisonMethodType { + /// Parses the enum value while disallowing unknown variants. + /// + /// Unknown variants will result in an error. + pub fn try_parse(value: &str) -> ::std::result::Result { + match Self::from(value) { + #[allow(deprecated)] + Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)), + known => Ok(known), + } + } +} +impl ::std::fmt::Display for ComparisonMethodType { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + ComparisonMethodType::Diff => write!(f, "DIFF"), + ComparisonMethodType::DiffAsPerc => write!(f, "DIFF_AS_PERC"), + ComparisonMethodType::MovingAverage => write!(f, "MOVING_AVERAGE"), + ComparisonMethodType::PercentOfTotal => write!(f, "PERCENT_OF_TOTAL"), + ComparisonMethodType::PercDiff => write!(f, "PERC_DIFF"), + ComparisonMethodType::PopCurrentDiff => write!(f, "POP_CURRENT_DIFF"), + ComparisonMethodType::PopCurrentDiffAsPerc => write!(f, "POP_CURRENT_DIFF_AS_PERC"), + ComparisonMethodType::PopOvertimeDiff => write!(f, "POP_OVERTIME_DIFF"), + ComparisonMethodType::PopOvertimeDiffAsPerc => write!(f, "POP_OVERTIME_DIFF_AS_PERC"), + ComparisonMethodType::RunningSum => write!(f, "RUNNING_SUM"), + ComparisonMethodType::Unknown(value) => write!(f, "{}", value), + } + } +} diff --git a/sdk/quicksight/src/types/_contribution_analysis_direction.rs b/sdk/quicksight/src/types/_contribution_analysis_direction.rs new file mode 100644 index 000000000000..394382ada67f --- /dev/null +++ b/sdk/quicksight/src/types/_contribution_analysis_direction.rs @@ -0,0 +1,113 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// When writing a match expression against `ContributionAnalysisDirection`, it is important to ensure +/// your code is forward-compatible. That is, if a match arm handles a case for a +/// feature that is supported by the service but has not been represented as an enum +/// variant in a current version of SDK, your code should continue to work when you +/// upgrade SDK to a future version in which the enum does include a variant for that +/// feature. +/// +/// Here is an example of how you can make a match expression forward-compatible: +/// +/// ```text +/// # let contributionanalysisdirection = unimplemented!(); +/// match contributionanalysisdirection { +/// ContributionAnalysisDirection::Decrease => { /* ... */ }, +/// ContributionAnalysisDirection::Increase => { /* ... */ }, +/// ContributionAnalysisDirection::Neutral => { /* ... */ }, +/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, +/// _ => { /* ... */ }, +/// } +/// ``` +/// The above code demonstrates that when `contributionanalysisdirection` represents +/// `NewFeature`, the execution path will lead to the second last match arm, +/// even though the enum does not contain a variant `ContributionAnalysisDirection::NewFeature` +/// in the current version of SDK. The reason is that the variable `other`, +/// created by the `@` operator, is bound to +/// `ContributionAnalysisDirection::Unknown(UnknownVariantValue("NewFeature".to_owned()))` +/// and calling `as_str` on it yields `"NewFeature"`. +/// This match expression is forward-compatible when executed with a newer +/// version of SDK where the variant `ContributionAnalysisDirection::NewFeature` is defined. +/// Specifically, when `contributionanalysisdirection` represents `NewFeature`, +/// the execution path will hit the second last match arm as before by virtue of +/// calling `as_str` on `ContributionAnalysisDirection::NewFeature` also yielding `"NewFeature"`. +/// +/// Explicitly matching on the `Unknown` variant should +/// be avoided for two reasons: +/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted. +/// - It might inadvertently shadow other intended match arms. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash, +)] +pub enum ContributionAnalysisDirection { + #[allow(missing_docs)] // documentation missing in model + Decrease, + #[allow(missing_docs)] // documentation missing in model + Increase, + #[allow(missing_docs)] // documentation missing in model + Neutral, + /// `Unknown` contains new variants that have been added since this code was generated. + #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")] + Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), +} +impl ::std::convert::From<&str> for ContributionAnalysisDirection { + fn from(s: &str) -> Self { + match s { + "DECREASE" => ContributionAnalysisDirection::Decrease, + "INCREASE" => ContributionAnalysisDirection::Increase, + "NEUTRAL" => ContributionAnalysisDirection::Neutral, + other => ContributionAnalysisDirection::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), + } + } +} +impl ::std::str::FromStr for ContributionAnalysisDirection { + type Err = ::std::convert::Infallible; + + fn from_str(s: &str) -> ::std::result::Result::Err> { + ::std::result::Result::Ok(ContributionAnalysisDirection::from(s)) + } +} +impl ContributionAnalysisDirection { + /// Returns the `&str` value of the enum member. + pub fn as_str(&self) -> &str { + match self { + ContributionAnalysisDirection::Decrease => "DECREASE", + ContributionAnalysisDirection::Increase => "INCREASE", + ContributionAnalysisDirection::Neutral => "NEUTRAL", + ContributionAnalysisDirection::Unknown(value) => value.as_str(), + } + } + /// Returns all the `&str` representations of the enum members. + pub const fn values() -> &'static [&'static str] { + &["DECREASE", "INCREASE", "NEUTRAL"] + } +} +impl ::std::convert::AsRef for ContributionAnalysisDirection { + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl ContributionAnalysisDirection { + /// Parses the enum value while disallowing unknown variants. + /// + /// Unknown variants will result in an error. + pub fn try_parse(value: &str) -> ::std::result::Result { + match Self::from(value) { + #[allow(deprecated)] + Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)), + known => Ok(known), + } + } +} +impl ::std::fmt::Display for ContributionAnalysisDirection { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + ContributionAnalysisDirection::Decrease => write!(f, "DECREASE"), + ContributionAnalysisDirection::Increase => write!(f, "INCREASE"), + ContributionAnalysisDirection::Neutral => write!(f, "NEUTRAL"), + ContributionAnalysisDirection::Unknown(value) => write!(f, "{}", value), + } + } +} diff --git a/sdk/quicksight/src/types/_contribution_analysis_factor.rs b/sdk/quicksight/src/types/_contribution_analysis_factor.rs new file mode 100644 index 000000000000..e0824d966053 --- /dev/null +++ b/sdk/quicksight/src/types/_contribution_analysis_factor.rs @@ -0,0 +1,48 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition for the ContributionAnalysisFactor.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct ContributionAnalysisFactor { + ///

    The field name of the ContributionAnalysisFactor.

    + pub field_name: ::std::option::Option<::std::string::String>, +} +impl ContributionAnalysisFactor { + ///

    The field name of the ContributionAnalysisFactor.

    + pub fn field_name(&self) -> ::std::option::Option<&str> { + self.field_name.as_deref() + } +} +impl ContributionAnalysisFactor { + /// Creates a new builder-style object to manufacture [`ContributionAnalysisFactor`](crate::types::ContributionAnalysisFactor). + pub fn builder() -> crate::types::builders::ContributionAnalysisFactorBuilder { + crate::types::builders::ContributionAnalysisFactorBuilder::default() + } +} + +/// A builder for [`ContributionAnalysisFactor`](crate::types::ContributionAnalysisFactor). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct ContributionAnalysisFactorBuilder { + pub(crate) field_name: ::std::option::Option<::std::string::String>, +} +impl ContributionAnalysisFactorBuilder { + ///

    The field name of the ContributionAnalysisFactor.

    + pub fn field_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.field_name = ::std::option::Option::Some(input.into()); + self + } + ///

    The field name of the ContributionAnalysisFactor.

    + pub fn set_field_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.field_name = input; + self + } + ///

    The field name of the ContributionAnalysisFactor.

    + pub fn get_field_name(&self) -> &::std::option::Option<::std::string::String> { + &self.field_name + } + /// Consumes the builder and constructs a [`ContributionAnalysisFactor`](crate::types::ContributionAnalysisFactor). + pub fn build(self) -> crate::types::ContributionAnalysisFactor { + crate::types::ContributionAnalysisFactor { field_name: self.field_name } + } +} diff --git a/sdk/quicksight/src/types/_contribution_analysis_sort_type.rs b/sdk/quicksight/src/types/_contribution_analysis_sort_type.rs new file mode 100644 index 000000000000..5c23a56499b5 --- /dev/null +++ b/sdk/quicksight/src/types/_contribution_analysis_sort_type.rs @@ -0,0 +1,124 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// When writing a match expression against `ContributionAnalysisSortType`, it is important to ensure +/// your code is forward-compatible. That is, if a match arm handles a case for a +/// feature that is supported by the service but has not been represented as an enum +/// variant in a current version of SDK, your code should continue to work when you +/// upgrade SDK to a future version in which the enum does include a variant for that +/// feature. +/// +/// Here is an example of how you can make a match expression forward-compatible: +/// +/// ```text +/// # let contributionanalysissorttype = unimplemented!(); +/// match contributionanalysissorttype { +/// ContributionAnalysisSortType::AbsoluteDifference => { /* ... */ }, +/// ContributionAnalysisSortType::ContributionPercentage => { /* ... */ }, +/// ContributionAnalysisSortType::DeviationFromExpected => { /* ... */ }, +/// ContributionAnalysisSortType::PercentageDifference => { /* ... */ }, +/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, +/// _ => { /* ... */ }, +/// } +/// ``` +/// The above code demonstrates that when `contributionanalysissorttype` represents +/// `NewFeature`, the execution path will lead to the second last match arm, +/// even though the enum does not contain a variant `ContributionAnalysisSortType::NewFeature` +/// in the current version of SDK. The reason is that the variable `other`, +/// created by the `@` operator, is bound to +/// `ContributionAnalysisSortType::Unknown(UnknownVariantValue("NewFeature".to_owned()))` +/// and calling `as_str` on it yields `"NewFeature"`. +/// This match expression is forward-compatible when executed with a newer +/// version of SDK where the variant `ContributionAnalysisSortType::NewFeature` is defined. +/// Specifically, when `contributionanalysissorttype` represents `NewFeature`, +/// the execution path will hit the second last match arm as before by virtue of +/// calling `as_str` on `ContributionAnalysisSortType::NewFeature` also yielding `"NewFeature"`. +/// +/// Explicitly matching on the `Unknown` variant should +/// be avoided for two reasons: +/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted. +/// - It might inadvertently shadow other intended match arms. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash, +)] +pub enum ContributionAnalysisSortType { + #[allow(missing_docs)] // documentation missing in model + AbsoluteDifference, + #[allow(missing_docs)] // documentation missing in model + ContributionPercentage, + #[allow(missing_docs)] // documentation missing in model + DeviationFromExpected, + #[allow(missing_docs)] // documentation missing in model + PercentageDifference, + /// `Unknown` contains new variants that have been added since this code was generated. + #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")] + Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), +} +impl ::std::convert::From<&str> for ContributionAnalysisSortType { + fn from(s: &str) -> Self { + match s { + "ABSOLUTE_DIFFERENCE" => ContributionAnalysisSortType::AbsoluteDifference, + "CONTRIBUTION_PERCENTAGE" => ContributionAnalysisSortType::ContributionPercentage, + "DEVIATION_FROM_EXPECTED" => ContributionAnalysisSortType::DeviationFromExpected, + "PERCENTAGE_DIFFERENCE" => ContributionAnalysisSortType::PercentageDifference, + other => ContributionAnalysisSortType::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), + } + } +} +impl ::std::str::FromStr for ContributionAnalysisSortType { + type Err = ::std::convert::Infallible; + + fn from_str(s: &str) -> ::std::result::Result::Err> { + ::std::result::Result::Ok(ContributionAnalysisSortType::from(s)) + } +} +impl ContributionAnalysisSortType { + /// Returns the `&str` value of the enum member. + pub fn as_str(&self) -> &str { + match self { + ContributionAnalysisSortType::AbsoluteDifference => "ABSOLUTE_DIFFERENCE", + ContributionAnalysisSortType::ContributionPercentage => "CONTRIBUTION_PERCENTAGE", + ContributionAnalysisSortType::DeviationFromExpected => "DEVIATION_FROM_EXPECTED", + ContributionAnalysisSortType::PercentageDifference => "PERCENTAGE_DIFFERENCE", + ContributionAnalysisSortType::Unknown(value) => value.as_str(), + } + } + /// Returns all the `&str` representations of the enum members. + pub const fn values() -> &'static [&'static str] { + &[ + "ABSOLUTE_DIFFERENCE", + "CONTRIBUTION_PERCENTAGE", + "DEVIATION_FROM_EXPECTED", + "PERCENTAGE_DIFFERENCE", + ] + } +} +impl ::std::convert::AsRef for ContributionAnalysisSortType { + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl ContributionAnalysisSortType { + /// Parses the enum value while disallowing unknown variants. + /// + /// Unknown variants will result in an error. + pub fn try_parse(value: &str) -> ::std::result::Result { + match Self::from(value) { + #[allow(deprecated)] + Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)), + known => Ok(known), + } + } +} +impl ::std::fmt::Display for ContributionAnalysisSortType { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + ContributionAnalysisSortType::AbsoluteDifference => write!(f, "ABSOLUTE_DIFFERENCE"), + ContributionAnalysisSortType::ContributionPercentage => write!(f, "CONTRIBUTION_PERCENTAGE"), + ContributionAnalysisSortType::DeviationFromExpected => write!(f, "DEVIATION_FROM_EXPECTED"), + ContributionAnalysisSortType::PercentageDifference => write!(f, "PERCENTAGE_DIFFERENCE"), + ContributionAnalysisSortType::Unknown(value) => write!(f, "{}", value), + } + } +} diff --git a/sdk/quicksight/src/types/_contribution_analysis_time_ranges.rs b/sdk/quicksight/src/types/_contribution_analysis_time_ranges.rs new file mode 100644 index 000000000000..a074d6779b65 --- /dev/null +++ b/sdk/quicksight/src/types/_contribution_analysis_time_ranges.rs @@ -0,0 +1,72 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition for the ContributionAnalysisTimeRanges.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct ContributionAnalysisTimeRanges { + ///

    The start range for the ContributionAnalysisTimeRanges.

    + pub start_range: ::std::option::Option, + ///

    The end range for the ContributionAnalysisTimeRanges.

    + pub end_range: ::std::option::Option, +} +impl ContributionAnalysisTimeRanges { + ///

    The start range for the ContributionAnalysisTimeRanges.

    + pub fn start_range(&self) -> ::std::option::Option<&crate::types::TopicIrFilterOption> { + self.start_range.as_ref() + } + ///

    The end range for the ContributionAnalysisTimeRanges.

    + pub fn end_range(&self) -> ::std::option::Option<&crate::types::TopicIrFilterOption> { + self.end_range.as_ref() + } +} +impl ContributionAnalysisTimeRanges { + /// Creates a new builder-style object to manufacture [`ContributionAnalysisTimeRanges`](crate::types::ContributionAnalysisTimeRanges). + pub fn builder() -> crate::types::builders::ContributionAnalysisTimeRangesBuilder { + crate::types::builders::ContributionAnalysisTimeRangesBuilder::default() + } +} + +/// A builder for [`ContributionAnalysisTimeRanges`](crate::types::ContributionAnalysisTimeRanges). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct ContributionAnalysisTimeRangesBuilder { + pub(crate) start_range: ::std::option::Option, + pub(crate) end_range: ::std::option::Option, +} +impl ContributionAnalysisTimeRangesBuilder { + ///

    The start range for the ContributionAnalysisTimeRanges.

    + pub fn start_range(mut self, input: crate::types::TopicIrFilterOption) -> Self { + self.start_range = ::std::option::Option::Some(input); + self + } + ///

    The start range for the ContributionAnalysisTimeRanges.

    + pub fn set_start_range(mut self, input: ::std::option::Option) -> Self { + self.start_range = input; + self + } + ///

    The start range for the ContributionAnalysisTimeRanges.

    + pub fn get_start_range(&self) -> &::std::option::Option { + &self.start_range + } + ///

    The end range for the ContributionAnalysisTimeRanges.

    + pub fn end_range(mut self, input: crate::types::TopicIrFilterOption) -> Self { + self.end_range = ::std::option::Option::Some(input); + self + } + ///

    The end range for the ContributionAnalysisTimeRanges.

    + pub fn set_end_range(mut self, input: ::std::option::Option) -> Self { + self.end_range = input; + self + } + ///

    The end range for the ContributionAnalysisTimeRanges.

    + pub fn get_end_range(&self) -> &::std::option::Option { + &self.end_range + } + /// Consumes the builder and constructs a [`ContributionAnalysisTimeRanges`](crate::types::ContributionAnalysisTimeRanges). + pub fn build(self) -> crate::types::ContributionAnalysisTimeRanges { + crate::types::ContributionAnalysisTimeRanges { + start_range: self.start_range, + end_range: self.end_range, + } + } +} diff --git a/sdk/quicksight/src/types/_create_topic_reviewed_answer.rs b/sdk/quicksight/src/types/_create_topic_reviewed_answer.rs new file mode 100644 index 000000000000..c4a7e13e6f8b --- /dev/null +++ b/sdk/quicksight/src/types/_create_topic_reviewed_answer.rs @@ -0,0 +1,185 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition for a CreateTopicReviewedAnswer.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct CreateTopicReviewedAnswer { + ///

    The answer ID for the CreateTopicReviewedAnswer.

    + pub answer_id: ::std::string::String, + ///

    The Dataset arn for the CreateTopicReviewedAnswer.

    + pub dataset_arn: ::std::string::String, + ///

    The Question to be created.

    + pub question: ::std::string::String, + ///

    The Mir for the CreateTopicReviewedAnswer.

    + pub mir: ::std::option::Option, + ///

    The PrimaryVisual for the CreateTopicReviewedAnswer.

    + pub primary_visual: ::std::option::Option, + ///

    The template for the CreateTopicReviewedAnswer.

    + pub template: ::std::option::Option, +} +impl CreateTopicReviewedAnswer { + ///

    The answer ID for the CreateTopicReviewedAnswer.

    + pub fn answer_id(&self) -> &str { + use std::ops::Deref; + self.answer_id.deref() + } + ///

    The Dataset arn for the CreateTopicReviewedAnswer.

    + pub fn dataset_arn(&self) -> &str { + use std::ops::Deref; + self.dataset_arn.deref() + } + ///

    The Question to be created.

    + pub fn question(&self) -> &str { + use std::ops::Deref; + self.question.deref() + } + ///

    The Mir for the CreateTopicReviewedAnswer.

    + pub fn mir(&self) -> ::std::option::Option<&crate::types::TopicIr> { + self.mir.as_ref() + } + ///

    The PrimaryVisual for the CreateTopicReviewedAnswer.

    + pub fn primary_visual(&self) -> ::std::option::Option<&crate::types::TopicVisual> { + self.primary_visual.as_ref() + } + ///

    The template for the CreateTopicReviewedAnswer.

    + pub fn template(&self) -> ::std::option::Option<&crate::types::TopicTemplate> { + self.template.as_ref() + } +} +impl CreateTopicReviewedAnswer { + /// Creates a new builder-style object to manufacture [`CreateTopicReviewedAnswer`](crate::types::CreateTopicReviewedAnswer). + pub fn builder() -> crate::types::builders::CreateTopicReviewedAnswerBuilder { + crate::types::builders::CreateTopicReviewedAnswerBuilder::default() + } +} + +/// A builder for [`CreateTopicReviewedAnswer`](crate::types::CreateTopicReviewedAnswer). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct CreateTopicReviewedAnswerBuilder { + pub(crate) answer_id: ::std::option::Option<::std::string::String>, + pub(crate) dataset_arn: ::std::option::Option<::std::string::String>, + pub(crate) question: ::std::option::Option<::std::string::String>, + pub(crate) mir: ::std::option::Option, + pub(crate) primary_visual: ::std::option::Option, + pub(crate) template: ::std::option::Option, +} +impl CreateTopicReviewedAnswerBuilder { + ///

    The answer ID for the CreateTopicReviewedAnswer.

    + /// This field is required. + pub fn answer_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.answer_id = ::std::option::Option::Some(input.into()); + self + } + ///

    The answer ID for the CreateTopicReviewedAnswer.

    + pub fn set_answer_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.answer_id = input; + self + } + ///

    The answer ID for the CreateTopicReviewedAnswer.

    + pub fn get_answer_id(&self) -> &::std::option::Option<::std::string::String> { + &self.answer_id + } + ///

    The Dataset arn for the CreateTopicReviewedAnswer.

    + /// This field is required. + pub fn dataset_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.dataset_arn = ::std::option::Option::Some(input.into()); + self + } + ///

    The Dataset arn for the CreateTopicReviewedAnswer.

    + pub fn set_dataset_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.dataset_arn = input; + self + } + ///

    The Dataset arn for the CreateTopicReviewedAnswer.

    + pub fn get_dataset_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.dataset_arn + } + ///

    The Question to be created.

    + /// This field is required. + pub fn question(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.question = ::std::option::Option::Some(input.into()); + self + } + ///

    The Question to be created.

    + pub fn set_question(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.question = input; + self + } + ///

    The Question to be created.

    + pub fn get_question(&self) -> &::std::option::Option<::std::string::String> { + &self.question + } + ///

    The Mir for the CreateTopicReviewedAnswer.

    + pub fn mir(mut self, input: crate::types::TopicIr) -> Self { + self.mir = ::std::option::Option::Some(input); + self + } + ///

    The Mir for the CreateTopicReviewedAnswer.

    + pub fn set_mir(mut self, input: ::std::option::Option) -> Self { + self.mir = input; + self + } + ///

    The Mir for the CreateTopicReviewedAnswer.

    + pub fn get_mir(&self) -> &::std::option::Option { + &self.mir + } + ///

    The PrimaryVisual for the CreateTopicReviewedAnswer.

    + pub fn primary_visual(mut self, input: crate::types::TopicVisual) -> Self { + self.primary_visual = ::std::option::Option::Some(input); + self + } + ///

    The PrimaryVisual for the CreateTopicReviewedAnswer.

    + pub fn set_primary_visual(mut self, input: ::std::option::Option) -> Self { + self.primary_visual = input; + self + } + ///

    The PrimaryVisual for the CreateTopicReviewedAnswer.

    + pub fn get_primary_visual(&self) -> &::std::option::Option { + &self.primary_visual + } + ///

    The template for the CreateTopicReviewedAnswer.

    + pub fn template(mut self, input: crate::types::TopicTemplate) -> Self { + self.template = ::std::option::Option::Some(input); + self + } + ///

    The template for the CreateTopicReviewedAnswer.

    + pub fn set_template(mut self, input: ::std::option::Option) -> Self { + self.template = input; + self + } + ///

    The template for the CreateTopicReviewedAnswer.

    + pub fn get_template(&self) -> &::std::option::Option { + &self.template + } + /// Consumes the builder and constructs a [`CreateTopicReviewedAnswer`](crate::types::CreateTopicReviewedAnswer). + /// This method will fail if any of the following fields are not set: + /// - [`answer_id`](crate::types::builders::CreateTopicReviewedAnswerBuilder::answer_id) + /// - [`dataset_arn`](crate::types::builders::CreateTopicReviewedAnswerBuilder::dataset_arn) + /// - [`question`](crate::types::builders::CreateTopicReviewedAnswerBuilder::question) + pub fn build(self) -> ::std::result::Result { + ::std::result::Result::Ok(crate::types::CreateTopicReviewedAnswer { + answer_id: self.answer_id.ok_or_else(|| { + ::aws_smithy_types::error::operation::BuildError::missing_field( + "answer_id", + "answer_id was not specified but it is required when building CreateTopicReviewedAnswer", + ) + })?, + dataset_arn: self.dataset_arn.ok_or_else(|| { + ::aws_smithy_types::error::operation::BuildError::missing_field( + "dataset_arn", + "dataset_arn was not specified but it is required when building CreateTopicReviewedAnswer", + ) + })?, + question: self.question.ok_or_else(|| { + ::aws_smithy_types::error::operation::BuildError::missing_field( + "question", + "question was not specified but it is required when building CreateTopicReviewedAnswer", + ) + })?, + mir: self.mir, + primary_visual: self.primary_visual, + template: self.template, + }) + } +} diff --git a/sdk/quicksight/src/types/_date_time_picker_control_display_options.rs b/sdk/quicksight/src/types/_date_time_picker_control_display_options.rs index ee28bcdb6a93..b043df086330 100644 --- a/sdk/quicksight/src/types/_date_time_picker_control_display_options.rs +++ b/sdk/quicksight/src/types/_date_time_picker_control_display_options.rs @@ -10,6 +10,10 @@ pub struct DateTimePickerControlDisplayOptions { pub date_time_format: ::std::option::Option<::std::string::String>, ///

    The configuration of info icon label options.

    pub info_icon_label_options: ::std::option::Option, + ///

    The helper text visibility of the DateTimePickerControlDisplayOptions.

    + pub helper_text_visibility: ::std::option::Option, + ///

    The date icon visibility of the DateTimePickerControlDisplayOptions.

    + pub date_icon_visibility: ::std::option::Option, } impl DateTimePickerControlDisplayOptions { ///

    The options to configure the title visibility, name, and font size.

    @@ -24,6 +28,14 @@ impl DateTimePickerControlDisplayOptions { pub fn info_icon_label_options(&self) -> ::std::option::Option<&crate::types::SheetControlInfoIconLabelOptions> { self.info_icon_label_options.as_ref() } + ///

    The helper text visibility of the DateTimePickerControlDisplayOptions.

    + pub fn helper_text_visibility(&self) -> ::std::option::Option<&crate::types::Visibility> { + self.helper_text_visibility.as_ref() + } + ///

    The date icon visibility of the DateTimePickerControlDisplayOptions.

    + pub fn date_icon_visibility(&self) -> ::std::option::Option<&crate::types::Visibility> { + self.date_icon_visibility.as_ref() + } } impl DateTimePickerControlDisplayOptions { /// Creates a new builder-style object to manufacture [`DateTimePickerControlDisplayOptions`](crate::types::DateTimePickerControlDisplayOptions). @@ -39,6 +51,8 @@ pub struct DateTimePickerControlDisplayOptionsBuilder { pub(crate) title_options: ::std::option::Option, pub(crate) date_time_format: ::std::option::Option<::std::string::String>, pub(crate) info_icon_label_options: ::std::option::Option, + pub(crate) helper_text_visibility: ::std::option::Option, + pub(crate) date_icon_visibility: ::std::option::Option, } impl DateTimePickerControlDisplayOptionsBuilder { ///

    The options to configure the title visibility, name, and font size.

    @@ -83,12 +97,42 @@ impl DateTimePickerControlDisplayOptionsBuilder { pub fn get_info_icon_label_options(&self) -> &::std::option::Option { &self.info_icon_label_options } + ///

    The helper text visibility of the DateTimePickerControlDisplayOptions.

    + pub fn helper_text_visibility(mut self, input: crate::types::Visibility) -> Self { + self.helper_text_visibility = ::std::option::Option::Some(input); + self + } + ///

    The helper text visibility of the DateTimePickerControlDisplayOptions.

    + pub fn set_helper_text_visibility(mut self, input: ::std::option::Option) -> Self { + self.helper_text_visibility = input; + self + } + ///

    The helper text visibility of the DateTimePickerControlDisplayOptions.

    + pub fn get_helper_text_visibility(&self) -> &::std::option::Option { + &self.helper_text_visibility + } + ///

    The date icon visibility of the DateTimePickerControlDisplayOptions.

    + pub fn date_icon_visibility(mut self, input: crate::types::Visibility) -> Self { + self.date_icon_visibility = ::std::option::Option::Some(input); + self + } + ///

    The date icon visibility of the DateTimePickerControlDisplayOptions.

    + pub fn set_date_icon_visibility(mut self, input: ::std::option::Option) -> Self { + self.date_icon_visibility = input; + self + } + ///

    The date icon visibility of the DateTimePickerControlDisplayOptions.

    + pub fn get_date_icon_visibility(&self) -> &::std::option::Option { + &self.date_icon_visibility + } /// Consumes the builder and constructs a [`DateTimePickerControlDisplayOptions`](crate::types::DateTimePickerControlDisplayOptions). pub fn build(self) -> crate::types::DateTimePickerControlDisplayOptions { crate::types::DateTimePickerControlDisplayOptions { title_options: self.title_options, date_time_format: self.date_time_format, info_icon_label_options: self.info_icon_label_options, + helper_text_visibility: self.helper_text_visibility, + date_icon_visibility: self.date_icon_visibility, } } } diff --git a/sdk/quicksight/src/types/_filter_agg_metrics.rs b/sdk/quicksight/src/types/_filter_agg_metrics.rs new file mode 100644 index 000000000000..e29ff9aa54f7 --- /dev/null +++ b/sdk/quicksight/src/types/_filter_agg_metrics.rs @@ -0,0 +1,94 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition for the FilterAggMetrics.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct FilterAggMetrics { + ///

    The metric operand of the FilterAggMetrics.

    + pub metric_operand: ::std::option::Option, + ///

    The function for the FilterAggMetrics.

    + pub function: ::std::option::Option, + ///

    The sort direction for FilterAggMetrics.

    + pub sort_direction: ::std::option::Option, +} +impl FilterAggMetrics { + ///

    The metric operand of the FilterAggMetrics.

    + pub fn metric_operand(&self) -> ::std::option::Option<&crate::types::Identifier> { + self.metric_operand.as_ref() + } + ///

    The function for the FilterAggMetrics.

    + pub fn function(&self) -> ::std::option::Option<&crate::types::AggType> { + self.function.as_ref() + } + ///

    The sort direction for FilterAggMetrics.

    + pub fn sort_direction(&self) -> ::std::option::Option<&crate::types::TopicSortDirection> { + self.sort_direction.as_ref() + } +} +impl FilterAggMetrics { + /// Creates a new builder-style object to manufacture [`FilterAggMetrics`](crate::types::FilterAggMetrics). + pub fn builder() -> crate::types::builders::FilterAggMetricsBuilder { + crate::types::builders::FilterAggMetricsBuilder::default() + } +} + +/// A builder for [`FilterAggMetrics`](crate::types::FilterAggMetrics). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct FilterAggMetricsBuilder { + pub(crate) metric_operand: ::std::option::Option, + pub(crate) function: ::std::option::Option, + pub(crate) sort_direction: ::std::option::Option, +} +impl FilterAggMetricsBuilder { + ///

    The metric operand of the FilterAggMetrics.

    + pub fn metric_operand(mut self, input: crate::types::Identifier) -> Self { + self.metric_operand = ::std::option::Option::Some(input); + self + } + ///

    The metric operand of the FilterAggMetrics.

    + pub fn set_metric_operand(mut self, input: ::std::option::Option) -> Self { + self.metric_operand = input; + self + } + ///

    The metric operand of the FilterAggMetrics.

    + pub fn get_metric_operand(&self) -> &::std::option::Option { + &self.metric_operand + } + ///

    The function for the FilterAggMetrics.

    + pub fn function(mut self, input: crate::types::AggType) -> Self { + self.function = ::std::option::Option::Some(input); + self + } + ///

    The function for the FilterAggMetrics.

    + pub fn set_function(mut self, input: ::std::option::Option) -> Self { + self.function = input; + self + } + ///

    The function for the FilterAggMetrics.

    + pub fn get_function(&self) -> &::std::option::Option { + &self.function + } + ///

    The sort direction for FilterAggMetrics.

    + pub fn sort_direction(mut self, input: crate::types::TopicSortDirection) -> Self { + self.sort_direction = ::std::option::Option::Some(input); + self + } + ///

    The sort direction for FilterAggMetrics.

    + pub fn set_sort_direction(mut self, input: ::std::option::Option) -> Self { + self.sort_direction = input; + self + } + ///

    The sort direction for FilterAggMetrics.

    + pub fn get_sort_direction(&self) -> &::std::option::Option { + &self.sort_direction + } + /// Consumes the builder and constructs a [`FilterAggMetrics`](crate::types::FilterAggMetrics). + pub fn build(self) -> crate::types::FilterAggMetrics { + crate::types::FilterAggMetrics { + metric_operand: self.metric_operand, + function: self.function, + sort_direction: self.sort_direction, + } + } +} diff --git a/sdk/quicksight/src/types/_identifier.rs b/sdk/quicksight/src/types/_identifier.rs new file mode 100644 index 000000000000..7a815e6305e6 --- /dev/null +++ b/sdk/quicksight/src/types/_identifier.rs @@ -0,0 +1,59 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition for the identifier.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct Identifier { + ///

    The identity of the identifier.

    + pub identity: ::std::string::String, +} +impl Identifier { + ///

    The identity of the identifier.

    + pub fn identity(&self) -> &str { + use std::ops::Deref; + self.identity.deref() + } +} +impl Identifier { + /// Creates a new builder-style object to manufacture [`Identifier`](crate::types::Identifier). + pub fn builder() -> crate::types::builders::IdentifierBuilder { + crate::types::builders::IdentifierBuilder::default() + } +} + +/// A builder for [`Identifier`](crate::types::Identifier). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct IdentifierBuilder { + pub(crate) identity: ::std::option::Option<::std::string::String>, +} +impl IdentifierBuilder { + ///

    The identity of the identifier.

    + /// This field is required. + pub fn identity(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.identity = ::std::option::Option::Some(input.into()); + self + } + ///

    The identity of the identifier.

    + pub fn set_identity(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.identity = input; + self + } + ///

    The identity of the identifier.

    + pub fn get_identity(&self) -> &::std::option::Option<::std::string::String> { + &self.identity + } + /// Consumes the builder and constructs a [`Identifier`](crate::types::Identifier). + /// This method will fail if any of the following fields are not set: + /// - [`identity`](crate::types::builders::IdentifierBuilder::identity) + pub fn build(self) -> ::std::result::Result { + ::std::result::Result::Ok(crate::types::Identifier { + identity: self.identity.ok_or_else(|| { + ::aws_smithy_types::error::operation::BuildError::missing_field( + "identity", + "identity was not specified but it is required when building Identifier", + ) + })?, + }) + } +} diff --git a/sdk/quicksight/src/types/_invalid_topic_reviewed_answer.rs b/sdk/quicksight/src/types/_invalid_topic_reviewed_answer.rs new file mode 100644 index 000000000000..44c4d2499f8b --- /dev/null +++ b/sdk/quicksight/src/types/_invalid_topic_reviewed_answer.rs @@ -0,0 +1,72 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition for a InvalidTopicReviewedAnswer.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct InvalidTopicReviewedAnswer { + ///

    The answer ID for the InvalidTopicReviewedAnswer.

    + pub answer_id: ::std::option::Option<::std::string::String>, + ///

    The error that is returned for the InvalidTopicReviewedAnswer.

    + pub error: ::std::option::Option, +} +impl InvalidTopicReviewedAnswer { + ///

    The answer ID for the InvalidTopicReviewedAnswer.

    + pub fn answer_id(&self) -> ::std::option::Option<&str> { + self.answer_id.as_deref() + } + ///

    The error that is returned for the InvalidTopicReviewedAnswer.

    + pub fn error(&self) -> ::std::option::Option<&crate::types::ReviewedAnswerErrorCode> { + self.error.as_ref() + } +} +impl InvalidTopicReviewedAnswer { + /// Creates a new builder-style object to manufacture [`InvalidTopicReviewedAnswer`](crate::types::InvalidTopicReviewedAnswer). + pub fn builder() -> crate::types::builders::InvalidTopicReviewedAnswerBuilder { + crate::types::builders::InvalidTopicReviewedAnswerBuilder::default() + } +} + +/// A builder for [`InvalidTopicReviewedAnswer`](crate::types::InvalidTopicReviewedAnswer). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct InvalidTopicReviewedAnswerBuilder { + pub(crate) answer_id: ::std::option::Option<::std::string::String>, + pub(crate) error: ::std::option::Option, +} +impl InvalidTopicReviewedAnswerBuilder { + ///

    The answer ID for the InvalidTopicReviewedAnswer.

    + pub fn answer_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.answer_id = ::std::option::Option::Some(input.into()); + self + } + ///

    The answer ID for the InvalidTopicReviewedAnswer.

    + pub fn set_answer_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.answer_id = input; + self + } + ///

    The answer ID for the InvalidTopicReviewedAnswer.

    + pub fn get_answer_id(&self) -> &::std::option::Option<::std::string::String> { + &self.answer_id + } + ///

    The error that is returned for the InvalidTopicReviewedAnswer.

    + pub fn error(mut self, input: crate::types::ReviewedAnswerErrorCode) -> Self { + self.error = ::std::option::Option::Some(input); + self + } + ///

    The error that is returned for the InvalidTopicReviewedAnswer.

    + pub fn set_error(mut self, input: ::std::option::Option) -> Self { + self.error = input; + self + } + ///

    The error that is returned for the InvalidTopicReviewedAnswer.

    + pub fn get_error(&self) -> &::std::option::Option { + &self.error + } + /// Consumes the builder and constructs a [`InvalidTopicReviewedAnswer`](crate::types::InvalidTopicReviewedAnswer). + pub fn build(self) -> crate::types::InvalidTopicReviewedAnswer { + crate::types::InvalidTopicReviewedAnswer { + answer_id: self.answer_id, + error: self.error, + } + } +} diff --git a/sdk/quicksight/src/types/_named_entity_ref.rs b/sdk/quicksight/src/types/_named_entity_ref.rs new file mode 100644 index 000000000000..75ca2a8e084d --- /dev/null +++ b/sdk/quicksight/src/types/_named_entity_ref.rs @@ -0,0 +1,50 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition for a NamedEntityRef.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct NamedEntityRef { + ///

    The NamedEntityName for the NamedEntityRef.

    + pub named_entity_name: ::std::option::Option<::std::string::String>, +} +impl NamedEntityRef { + ///

    The NamedEntityName for the NamedEntityRef.

    + pub fn named_entity_name(&self) -> ::std::option::Option<&str> { + self.named_entity_name.as_deref() + } +} +impl NamedEntityRef { + /// Creates a new builder-style object to manufacture [`NamedEntityRef`](crate::types::NamedEntityRef). + pub fn builder() -> crate::types::builders::NamedEntityRefBuilder { + crate::types::builders::NamedEntityRefBuilder::default() + } +} + +/// A builder for [`NamedEntityRef`](crate::types::NamedEntityRef). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct NamedEntityRefBuilder { + pub(crate) named_entity_name: ::std::option::Option<::std::string::String>, +} +impl NamedEntityRefBuilder { + ///

    The NamedEntityName for the NamedEntityRef.

    + pub fn named_entity_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.named_entity_name = ::std::option::Option::Some(input.into()); + self + } + ///

    The NamedEntityName for the NamedEntityRef.

    + pub fn set_named_entity_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.named_entity_name = input; + self + } + ///

    The NamedEntityName for the NamedEntityRef.

    + pub fn get_named_entity_name(&self) -> &::std::option::Option<::std::string::String> { + &self.named_entity_name + } + /// Consumes the builder and constructs a [`NamedEntityRef`](crate::types::NamedEntityRef). + pub fn build(self) -> crate::types::NamedEntityRef { + crate::types::NamedEntityRef { + named_entity_name: self.named_entity_name, + } + } +} diff --git a/sdk/quicksight/src/types/_null_filter_option.rs b/sdk/quicksight/src/types/_null_filter_option.rs new file mode 100644 index 000000000000..73992d84861f --- /dev/null +++ b/sdk/quicksight/src/types/_null_filter_option.rs @@ -0,0 +1,113 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// When writing a match expression against `NullFilterOption`, it is important to ensure +/// your code is forward-compatible. That is, if a match arm handles a case for a +/// feature that is supported by the service but has not been represented as an enum +/// variant in a current version of SDK, your code should continue to work when you +/// upgrade SDK to a future version in which the enum does include a variant for that +/// feature. +/// +/// Here is an example of how you can make a match expression forward-compatible: +/// +/// ```text +/// # let nullfilteroption = unimplemented!(); +/// match nullfilteroption { +/// NullFilterOption::AllValues => { /* ... */ }, +/// NullFilterOption::NonNullsOnly => { /* ... */ }, +/// NullFilterOption::NullsOnly => { /* ... */ }, +/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, +/// _ => { /* ... */ }, +/// } +/// ``` +/// The above code demonstrates that when `nullfilteroption` represents +/// `NewFeature`, the execution path will lead to the second last match arm, +/// even though the enum does not contain a variant `NullFilterOption::NewFeature` +/// in the current version of SDK. The reason is that the variable `other`, +/// created by the `@` operator, is bound to +/// `NullFilterOption::Unknown(UnknownVariantValue("NewFeature".to_owned()))` +/// and calling `as_str` on it yields `"NewFeature"`. +/// This match expression is forward-compatible when executed with a newer +/// version of SDK where the variant `NullFilterOption::NewFeature` is defined. +/// Specifically, when `nullfilteroption` represents `NewFeature`, +/// the execution path will hit the second last match arm as before by virtue of +/// calling `as_str` on `NullFilterOption::NewFeature` also yielding `"NewFeature"`. +/// +/// Explicitly matching on the `Unknown` variant should +/// be avoided for two reasons: +/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted. +/// - It might inadvertently shadow other intended match arms. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash, +)] +pub enum NullFilterOption { + #[allow(missing_docs)] // documentation missing in model + AllValues, + #[allow(missing_docs)] // documentation missing in model + NonNullsOnly, + #[allow(missing_docs)] // documentation missing in model + NullsOnly, + /// `Unknown` contains new variants that have been added since this code was generated. + #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")] + Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), +} +impl ::std::convert::From<&str> for NullFilterOption { + fn from(s: &str) -> Self { + match s { + "ALL_VALUES" => NullFilterOption::AllValues, + "NON_NULLS_ONLY" => NullFilterOption::NonNullsOnly, + "NULLS_ONLY" => NullFilterOption::NullsOnly, + other => NullFilterOption::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), + } + } +} +impl ::std::str::FromStr for NullFilterOption { + type Err = ::std::convert::Infallible; + + fn from_str(s: &str) -> ::std::result::Result::Err> { + ::std::result::Result::Ok(NullFilterOption::from(s)) + } +} +impl NullFilterOption { + /// Returns the `&str` value of the enum member. + pub fn as_str(&self) -> &str { + match self { + NullFilterOption::AllValues => "ALL_VALUES", + NullFilterOption::NonNullsOnly => "NON_NULLS_ONLY", + NullFilterOption::NullsOnly => "NULLS_ONLY", + NullFilterOption::Unknown(value) => value.as_str(), + } + } + /// Returns all the `&str` representations of the enum members. + pub const fn values() -> &'static [&'static str] { + &["ALL_VALUES", "NON_NULLS_ONLY", "NULLS_ONLY"] + } +} +impl ::std::convert::AsRef for NullFilterOption { + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl NullFilterOption { + /// Parses the enum value while disallowing unknown variants. + /// + /// Unknown variants will result in an error. + pub fn try_parse(value: &str) -> ::std::result::Result { + match Self::from(value) { + #[allow(deprecated)] + Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)), + known => Ok(known), + } + } +} +impl ::std::fmt::Display for NullFilterOption { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + NullFilterOption::AllValues => write!(f, "ALL_VALUES"), + NullFilterOption::NonNullsOnly => write!(f, "NON_NULLS_ONLY"), + NullFilterOption::NullsOnly => write!(f, "NULLS_ONLY"), + NullFilterOption::Unknown(value) => write!(f, "{}", value), + } + } +} diff --git a/sdk/quicksight/src/types/_reviewed_answer_error_code.rs b/sdk/quicksight/src/types/_reviewed_answer_error_code.rs new file mode 100644 index 000000000000..074ccc2d3adc --- /dev/null +++ b/sdk/quicksight/src/types/_reviewed_answer_error_code.rs @@ -0,0 +1,145 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// When writing a match expression against `ReviewedAnswerErrorCode`, it is important to ensure +/// your code is forward-compatible. That is, if a match arm handles a case for a +/// feature that is supported by the service but has not been represented as an enum +/// variant in a current version of SDK, your code should continue to work when you +/// upgrade SDK to a future version in which the enum does include a variant for that +/// feature. +/// +/// Here is an example of how you can make a match expression forward-compatible: +/// +/// ```text +/// # let reviewedanswererrorcode = unimplemented!(); +/// match reviewedanswererrorcode { +/// ReviewedAnswerErrorCode::DatasetDoesNotExist => { /* ... */ }, +/// ReviewedAnswerErrorCode::DuplicatedAnswer => { /* ... */ }, +/// ReviewedAnswerErrorCode::InternalError => { /* ... */ }, +/// ReviewedAnswerErrorCode::InvalidData => { /* ... */ }, +/// ReviewedAnswerErrorCode::InvalidDatasetArn => { /* ... */ }, +/// ReviewedAnswerErrorCode::MissingAnswer => { /* ... */ }, +/// ReviewedAnswerErrorCode::MissingRequiredFields => { /* ... */ }, +/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, +/// _ => { /* ... */ }, +/// } +/// ``` +/// The above code demonstrates that when `reviewedanswererrorcode` represents +/// `NewFeature`, the execution path will lead to the second last match arm, +/// even though the enum does not contain a variant `ReviewedAnswerErrorCode::NewFeature` +/// in the current version of SDK. The reason is that the variable `other`, +/// created by the `@` operator, is bound to +/// `ReviewedAnswerErrorCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))` +/// and calling `as_str` on it yields `"NewFeature"`. +/// This match expression is forward-compatible when executed with a newer +/// version of SDK where the variant `ReviewedAnswerErrorCode::NewFeature` is defined. +/// Specifically, when `reviewedanswererrorcode` represents `NewFeature`, +/// the execution path will hit the second last match arm as before by virtue of +/// calling `as_str` on `ReviewedAnswerErrorCode::NewFeature` also yielding `"NewFeature"`. +/// +/// Explicitly matching on the `Unknown` variant should +/// be avoided for two reasons: +/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted. +/// - It might inadvertently shadow other intended match arms. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash, +)] +pub enum ReviewedAnswerErrorCode { + #[allow(missing_docs)] // documentation missing in model + DatasetDoesNotExist, + #[allow(missing_docs)] // documentation missing in model + DuplicatedAnswer, + #[allow(missing_docs)] // documentation missing in model + InternalError, + #[allow(missing_docs)] // documentation missing in model + InvalidData, + #[allow(missing_docs)] // documentation missing in model + InvalidDatasetArn, + #[allow(missing_docs)] // documentation missing in model + MissingAnswer, + #[allow(missing_docs)] // documentation missing in model + MissingRequiredFields, + /// `Unknown` contains new variants that have been added since this code was generated. + #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")] + Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), +} +impl ::std::convert::From<&str> for ReviewedAnswerErrorCode { + fn from(s: &str) -> Self { + match s { + "DATASET_DOES_NOT_EXIST" => ReviewedAnswerErrorCode::DatasetDoesNotExist, + "DUPLICATED_ANSWER" => ReviewedAnswerErrorCode::DuplicatedAnswer, + "INTERNAL_ERROR" => ReviewedAnswerErrorCode::InternalError, + "INVALID_DATA" => ReviewedAnswerErrorCode::InvalidData, + "INVALID_DATASET_ARN" => ReviewedAnswerErrorCode::InvalidDatasetArn, + "MISSING_ANSWER" => ReviewedAnswerErrorCode::MissingAnswer, + "MISSING_REQUIRED_FIELDS" => ReviewedAnswerErrorCode::MissingRequiredFields, + other => ReviewedAnswerErrorCode::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), + } + } +} +impl ::std::str::FromStr for ReviewedAnswerErrorCode { + type Err = ::std::convert::Infallible; + + fn from_str(s: &str) -> ::std::result::Result::Err> { + ::std::result::Result::Ok(ReviewedAnswerErrorCode::from(s)) + } +} +impl ReviewedAnswerErrorCode { + /// Returns the `&str` value of the enum member. + pub fn as_str(&self) -> &str { + match self { + ReviewedAnswerErrorCode::DatasetDoesNotExist => "DATASET_DOES_NOT_EXIST", + ReviewedAnswerErrorCode::DuplicatedAnswer => "DUPLICATED_ANSWER", + ReviewedAnswerErrorCode::InternalError => "INTERNAL_ERROR", + ReviewedAnswerErrorCode::InvalidData => "INVALID_DATA", + ReviewedAnswerErrorCode::InvalidDatasetArn => "INVALID_DATASET_ARN", + ReviewedAnswerErrorCode::MissingAnswer => "MISSING_ANSWER", + ReviewedAnswerErrorCode::MissingRequiredFields => "MISSING_REQUIRED_FIELDS", + ReviewedAnswerErrorCode::Unknown(value) => value.as_str(), + } + } + /// Returns all the `&str` representations of the enum members. + pub const fn values() -> &'static [&'static str] { + &[ + "DATASET_DOES_NOT_EXIST", + "DUPLICATED_ANSWER", + "INTERNAL_ERROR", + "INVALID_DATA", + "INVALID_DATASET_ARN", + "MISSING_ANSWER", + "MISSING_REQUIRED_FIELDS", + ] + } +} +impl ::std::convert::AsRef for ReviewedAnswerErrorCode { + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl ReviewedAnswerErrorCode { + /// Parses the enum value while disallowing unknown variants. + /// + /// Unknown variants will result in an error. + pub fn try_parse(value: &str) -> ::std::result::Result { + match Self::from(value) { + #[allow(deprecated)] + Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)), + known => Ok(known), + } + } +} +impl ::std::fmt::Display for ReviewedAnswerErrorCode { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + ReviewedAnswerErrorCode::DatasetDoesNotExist => write!(f, "DATASET_DOES_NOT_EXIST"), + ReviewedAnswerErrorCode::DuplicatedAnswer => write!(f, "DUPLICATED_ANSWER"), + ReviewedAnswerErrorCode::InternalError => write!(f, "INTERNAL_ERROR"), + ReviewedAnswerErrorCode::InvalidData => write!(f, "INVALID_DATA"), + ReviewedAnswerErrorCode::InvalidDatasetArn => write!(f, "INVALID_DATASET_ARN"), + ReviewedAnswerErrorCode::MissingAnswer => write!(f, "MISSING_ANSWER"), + ReviewedAnswerErrorCode::MissingRequiredFields => write!(f, "MISSING_REQUIRED_FIELDS"), + ReviewedAnswerErrorCode::Unknown(value) => write!(f, "{}", value), + } + } +} diff --git a/sdk/quicksight/src/types/_slot.rs b/sdk/quicksight/src/types/_slot.rs new file mode 100644 index 000000000000..f679cbb9a6d0 --- /dev/null +++ b/sdk/quicksight/src/types/_slot.rs @@ -0,0 +1,72 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition for the slot.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct Slot { + ///

    The slot ID of the slot.

    + pub slot_id: ::std::option::Option<::std::string::String>, + ///

    The visual ID for the slot.

    + pub visual_id: ::std::option::Option<::std::string::String>, +} +impl Slot { + ///

    The slot ID of the slot.

    + pub fn slot_id(&self) -> ::std::option::Option<&str> { + self.slot_id.as_deref() + } + ///

    The visual ID for the slot.

    + pub fn visual_id(&self) -> ::std::option::Option<&str> { + self.visual_id.as_deref() + } +} +impl Slot { + /// Creates a new builder-style object to manufacture [`Slot`](crate::types::Slot). + pub fn builder() -> crate::types::builders::SlotBuilder { + crate::types::builders::SlotBuilder::default() + } +} + +/// A builder for [`Slot`](crate::types::Slot). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct SlotBuilder { + pub(crate) slot_id: ::std::option::Option<::std::string::String>, + pub(crate) visual_id: ::std::option::Option<::std::string::String>, +} +impl SlotBuilder { + ///

    The slot ID of the slot.

    + pub fn slot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.slot_id = ::std::option::Option::Some(input.into()); + self + } + ///

    The slot ID of the slot.

    + pub fn set_slot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.slot_id = input; + self + } + ///

    The slot ID of the slot.

    + pub fn get_slot_id(&self) -> &::std::option::Option<::std::string::String> { + &self.slot_id + } + ///

    The visual ID for the slot.

    + pub fn visual_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.visual_id = ::std::option::Option::Some(input.into()); + self + } + ///

    The visual ID for the slot.

    + pub fn set_visual_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.visual_id = input; + self + } + ///

    The visual ID for the slot.

    + pub fn get_visual_id(&self) -> &::std::option::Option<::std::string::String> { + &self.visual_id + } + /// Consumes the builder and constructs a [`Slot`](crate::types::Slot). + pub fn build(self) -> crate::types::Slot { + crate::types::Slot { + slot_id: self.slot_id, + visual_id: self.visual_id, + } + } +} diff --git a/sdk/quicksight/src/types/_succeeded_topic_reviewed_answer.rs b/sdk/quicksight/src/types/_succeeded_topic_reviewed_answer.rs new file mode 100644 index 000000000000..e5c23618a630 --- /dev/null +++ b/sdk/quicksight/src/types/_succeeded_topic_reviewed_answer.rs @@ -0,0 +1,48 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition for a SucceededTopicReviewedAnswer.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct SucceededTopicReviewedAnswer { + ///

    The answer ID for the SucceededTopicReviewedAnswer.

    + pub answer_id: ::std::option::Option<::std::string::String>, +} +impl SucceededTopicReviewedAnswer { + ///

    The answer ID for the SucceededTopicReviewedAnswer.

    + pub fn answer_id(&self) -> ::std::option::Option<&str> { + self.answer_id.as_deref() + } +} +impl SucceededTopicReviewedAnswer { + /// Creates a new builder-style object to manufacture [`SucceededTopicReviewedAnswer`](crate::types::SucceededTopicReviewedAnswer). + pub fn builder() -> crate::types::builders::SucceededTopicReviewedAnswerBuilder { + crate::types::builders::SucceededTopicReviewedAnswerBuilder::default() + } +} + +/// A builder for [`SucceededTopicReviewedAnswer`](crate::types::SucceededTopicReviewedAnswer). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct SucceededTopicReviewedAnswerBuilder { + pub(crate) answer_id: ::std::option::Option<::std::string::String>, +} +impl SucceededTopicReviewedAnswerBuilder { + ///

    The answer ID for the SucceededTopicReviewedAnswer.

    + pub fn answer_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.answer_id = ::std::option::Option::Some(input.into()); + self + } + ///

    The answer ID for the SucceededTopicReviewedAnswer.

    + pub fn set_answer_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.answer_id = input; + self + } + ///

    The answer ID for the SucceededTopicReviewedAnswer.

    + pub fn get_answer_id(&self) -> &::std::option::Option<::std::string::String> { + &self.answer_id + } + /// Consumes the builder and constructs a [`SucceededTopicReviewedAnswer`](crate::types::SucceededTopicReviewedAnswer). + pub fn build(self) -> crate::types::SucceededTopicReviewedAnswer { + crate::types::SucceededTopicReviewedAnswer { answer_id: self.answer_id } + } +} diff --git a/sdk/quicksight/src/types/_topic_constant_value.rs b/sdk/quicksight/src/types/_topic_constant_value.rs new file mode 100644 index 000000000000..9c680967b32c --- /dev/null +++ b/sdk/quicksight/src/types/_topic_constant_value.rs @@ -0,0 +1,146 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition for a TopicConstantValue.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct TopicConstantValue { + ///

    The constant type of a TopicConstantValue.

    + pub constant_type: ::std::option::Option, + ///

    The value of the TopicConstantValue.

    + pub value: ::std::option::Option<::std::string::String>, + ///

    The minimum for the TopicConstantValue.

    + pub minimum: ::std::option::Option<::std::string::String>, + ///

    The maximum for the TopicConstantValue.

    + pub maximum: ::std::option::Option<::std::string::String>, + ///

    The value list of the TopicConstantValue.

    + pub value_list: ::std::option::Option<::std::vec::Vec>, +} +impl TopicConstantValue { + ///

    The constant type of a TopicConstantValue.

    + pub fn constant_type(&self) -> ::std::option::Option<&crate::types::ConstantType> { + self.constant_type.as_ref() + } + ///

    The value of the TopicConstantValue.

    + pub fn value(&self) -> ::std::option::Option<&str> { + self.value.as_deref() + } + ///

    The minimum for the TopicConstantValue.

    + pub fn minimum(&self) -> ::std::option::Option<&str> { + self.minimum.as_deref() + } + ///

    The maximum for the TopicConstantValue.

    + pub fn maximum(&self) -> ::std::option::Option<&str> { + self.maximum.as_deref() + } + ///

    The value list of the TopicConstantValue.

    + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.value_list.is_none()`. + pub fn value_list(&self) -> &[crate::types::CollectiveConstantEntry] { + self.value_list.as_deref().unwrap_or_default() + } +} +impl TopicConstantValue { + /// Creates a new builder-style object to manufacture [`TopicConstantValue`](crate::types::TopicConstantValue). + pub fn builder() -> crate::types::builders::TopicConstantValueBuilder { + crate::types::builders::TopicConstantValueBuilder::default() + } +} + +/// A builder for [`TopicConstantValue`](crate::types::TopicConstantValue). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct TopicConstantValueBuilder { + pub(crate) constant_type: ::std::option::Option, + pub(crate) value: ::std::option::Option<::std::string::String>, + pub(crate) minimum: ::std::option::Option<::std::string::String>, + pub(crate) maximum: ::std::option::Option<::std::string::String>, + pub(crate) value_list: ::std::option::Option<::std::vec::Vec>, +} +impl TopicConstantValueBuilder { + ///

    The constant type of a TopicConstantValue.

    + pub fn constant_type(mut self, input: crate::types::ConstantType) -> Self { + self.constant_type = ::std::option::Option::Some(input); + self + } + ///

    The constant type of a TopicConstantValue.

    + pub fn set_constant_type(mut self, input: ::std::option::Option) -> Self { + self.constant_type = input; + self + } + ///

    The constant type of a TopicConstantValue.

    + pub fn get_constant_type(&self) -> &::std::option::Option { + &self.constant_type + } + ///

    The value of the TopicConstantValue.

    + pub fn value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.value = ::std::option::Option::Some(input.into()); + self + } + ///

    The value of the TopicConstantValue.

    + pub fn set_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.value = input; + self + } + ///

    The value of the TopicConstantValue.

    + pub fn get_value(&self) -> &::std::option::Option<::std::string::String> { + &self.value + } + ///

    The minimum for the TopicConstantValue.

    + pub fn minimum(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.minimum = ::std::option::Option::Some(input.into()); + self + } + ///

    The minimum for the TopicConstantValue.

    + pub fn set_minimum(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.minimum = input; + self + } + ///

    The minimum for the TopicConstantValue.

    + pub fn get_minimum(&self) -> &::std::option::Option<::std::string::String> { + &self.minimum + } + ///

    The maximum for the TopicConstantValue.

    + pub fn maximum(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.maximum = ::std::option::Option::Some(input.into()); + self + } + ///

    The maximum for the TopicConstantValue.

    + pub fn set_maximum(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.maximum = input; + self + } + ///

    The maximum for the TopicConstantValue.

    + pub fn get_maximum(&self) -> &::std::option::Option<::std::string::String> { + &self.maximum + } + /// Appends an item to `value_list`. + /// + /// To override the contents of this collection use [`set_value_list`](Self::set_value_list). + /// + ///

    The value list of the TopicConstantValue.

    + pub fn value_list(mut self, input: crate::types::CollectiveConstantEntry) -> Self { + let mut v = self.value_list.unwrap_or_default(); + v.push(input); + self.value_list = ::std::option::Option::Some(v); + self + } + ///

    The value list of the TopicConstantValue.

    + pub fn set_value_list(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.value_list = input; + self + } + ///

    The value list of the TopicConstantValue.

    + pub fn get_value_list(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.value_list + } + /// Consumes the builder and constructs a [`TopicConstantValue`](crate::types::TopicConstantValue). + pub fn build(self) -> crate::types::TopicConstantValue { + crate::types::TopicConstantValue { + constant_type: self.constant_type, + value: self.value, + minimum: self.minimum, + maximum: self.maximum, + value_list: self.value_list, + } + } +} diff --git a/sdk/quicksight/src/types/_topic_ir.rs b/sdk/quicksight/src/types/_topic_ir.rs new file mode 100644 index 000000000000..e2e06e728c7a --- /dev/null +++ b/sdk/quicksight/src/types/_topic_ir.rs @@ -0,0 +1,184 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition for a TopicIR.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct TopicIr { + ///

    The metrics for the TopicIR.

    + pub metrics: ::std::option::Option<::std::vec::Vec>, + ///

    The GroupBy list for the TopicIR.

    + pub group_by_list: ::std::option::Option<::std::vec::Vec>, + ///

    The filters for the TopicIR.

    + pub filters: ::std::option::Option<::std::vec::Vec<::std::vec::Vec>>, + ///

    The sort for the TopicIR.

    + pub sort: ::std::option::Option, + ///

    The contribution analysis for the TopicIR.

    + pub contribution_analysis: ::std::option::Option, + ///

    The visual for the TopicIR.

    + pub visual: ::std::option::Option, +} +impl TopicIr { + ///

    The metrics for the TopicIR.

    + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.metrics.is_none()`. + pub fn metrics(&self) -> &[crate::types::TopicIrMetric] { + self.metrics.as_deref().unwrap_or_default() + } + ///

    The GroupBy list for the TopicIR.

    + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.group_by_list.is_none()`. + pub fn group_by_list(&self) -> &[crate::types::TopicIrGroupBy] { + self.group_by_list.as_deref().unwrap_or_default() + } + ///

    The filters for the TopicIR.

    + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.filters.is_none()`. + pub fn filters(&self) -> &[::std::vec::Vec] { + self.filters.as_deref().unwrap_or_default() + } + ///

    The sort for the TopicIR.

    + pub fn sort(&self) -> ::std::option::Option<&crate::types::TopicSortClause> { + self.sort.as_ref() + } + ///

    The contribution analysis for the TopicIR.

    + pub fn contribution_analysis(&self) -> ::std::option::Option<&crate::types::TopicIrContributionAnalysis> { + self.contribution_analysis.as_ref() + } + ///

    The visual for the TopicIR.

    + pub fn visual(&self) -> ::std::option::Option<&crate::types::VisualOptions> { + self.visual.as_ref() + } +} +impl TopicIr { + /// Creates a new builder-style object to manufacture [`TopicIr`](crate::types::TopicIr). + pub fn builder() -> crate::types::builders::TopicIrBuilder { + crate::types::builders::TopicIrBuilder::default() + } +} + +/// A builder for [`TopicIr`](crate::types::TopicIr). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct TopicIrBuilder { + pub(crate) metrics: ::std::option::Option<::std::vec::Vec>, + pub(crate) group_by_list: ::std::option::Option<::std::vec::Vec>, + pub(crate) filters: ::std::option::Option<::std::vec::Vec<::std::vec::Vec>>, + pub(crate) sort: ::std::option::Option, + pub(crate) contribution_analysis: ::std::option::Option, + pub(crate) visual: ::std::option::Option, +} +impl TopicIrBuilder { + /// Appends an item to `metrics`. + /// + /// To override the contents of this collection use [`set_metrics`](Self::set_metrics). + /// + ///

    The metrics for the TopicIR.

    + pub fn metrics(mut self, input: crate::types::TopicIrMetric) -> Self { + let mut v = self.metrics.unwrap_or_default(); + v.push(input); + self.metrics = ::std::option::Option::Some(v); + self + } + ///

    The metrics for the TopicIR.

    + pub fn set_metrics(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.metrics = input; + self + } + ///

    The metrics for the TopicIR.

    + pub fn get_metrics(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.metrics + } + /// Appends an item to `group_by_list`. + /// + /// To override the contents of this collection use [`set_group_by_list`](Self::set_group_by_list). + /// + ///

    The GroupBy list for the TopicIR.

    + pub fn group_by_list(mut self, input: crate::types::TopicIrGroupBy) -> Self { + let mut v = self.group_by_list.unwrap_or_default(); + v.push(input); + self.group_by_list = ::std::option::Option::Some(v); + self + } + ///

    The GroupBy list for the TopicIR.

    + pub fn set_group_by_list(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.group_by_list = input; + self + } + ///

    The GroupBy list for the TopicIR.

    + pub fn get_group_by_list(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.group_by_list + } + /// Appends an item to `filters`. + /// + /// To override the contents of this collection use [`set_filters`](Self::set_filters). + /// + ///

    The filters for the TopicIR.

    + pub fn filters(mut self, input: ::std::vec::Vec) -> Self { + let mut v = self.filters.unwrap_or_default(); + v.push(input); + self.filters = ::std::option::Option::Some(v); + self + } + ///

    The filters for the TopicIR.

    + pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<::std::vec::Vec>>) -> Self { + self.filters = input; + self + } + ///

    The filters for the TopicIR.

    + pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<::std::vec::Vec>> { + &self.filters + } + ///

    The sort for the TopicIR.

    + pub fn sort(mut self, input: crate::types::TopicSortClause) -> Self { + self.sort = ::std::option::Option::Some(input); + self + } + ///

    The sort for the TopicIR.

    + pub fn set_sort(mut self, input: ::std::option::Option) -> Self { + self.sort = input; + self + } + ///

    The sort for the TopicIR.

    + pub fn get_sort(&self) -> &::std::option::Option { + &self.sort + } + ///

    The contribution analysis for the TopicIR.

    + pub fn contribution_analysis(mut self, input: crate::types::TopicIrContributionAnalysis) -> Self { + self.contribution_analysis = ::std::option::Option::Some(input); + self + } + ///

    The contribution analysis for the TopicIR.

    + pub fn set_contribution_analysis(mut self, input: ::std::option::Option) -> Self { + self.contribution_analysis = input; + self + } + ///

    The contribution analysis for the TopicIR.

    + pub fn get_contribution_analysis(&self) -> &::std::option::Option { + &self.contribution_analysis + } + ///

    The visual for the TopicIR.

    + pub fn visual(mut self, input: crate::types::VisualOptions) -> Self { + self.visual = ::std::option::Option::Some(input); + self + } + ///

    The visual for the TopicIR.

    + pub fn set_visual(mut self, input: ::std::option::Option) -> Self { + self.visual = input; + self + } + ///

    The visual for the TopicIR.

    + pub fn get_visual(&self) -> &::std::option::Option { + &self.visual + } + /// Consumes the builder and constructs a [`TopicIr`](crate::types::TopicIr). + pub fn build(self) -> crate::types::TopicIr { + crate::types::TopicIr { + metrics: self.metrics, + group_by_list: self.group_by_list, + filters: self.filters, + sort: self.sort, + contribution_analysis: self.contribution_analysis, + visual: self.visual, + } + } +} diff --git a/sdk/quicksight/src/types/_topic_ir_comparison_method.rs b/sdk/quicksight/src/types/_topic_ir_comparison_method.rs new file mode 100644 index 000000000000..1dd0fe85930e --- /dev/null +++ b/sdk/quicksight/src/types/_topic_ir_comparison_method.rs @@ -0,0 +1,94 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition of a TopicIRComparisonMethod.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct TopicIrComparisonMethod { + ///

    The type for the TopicIRComparisonMethod.

    + pub r#type: ::std::option::Option, + ///

    The period for the TopicIRComparisonMethod.

    + pub period: ::std::option::Option, + ///

    The window size for the TopicIRComparisonMethod.

    + pub window_size: i32, +} +impl TopicIrComparisonMethod { + ///

    The type for the TopicIRComparisonMethod.

    + pub fn r#type(&self) -> ::std::option::Option<&crate::types::ComparisonMethodType> { + self.r#type.as_ref() + } + ///

    The period for the TopicIRComparisonMethod.

    + pub fn period(&self) -> ::std::option::Option<&crate::types::TopicTimeGranularity> { + self.period.as_ref() + } + ///

    The window size for the TopicIRComparisonMethod.

    + pub fn window_size(&self) -> i32 { + self.window_size + } +} +impl TopicIrComparisonMethod { + /// Creates a new builder-style object to manufacture [`TopicIrComparisonMethod`](crate::types::TopicIrComparisonMethod). + pub fn builder() -> crate::types::builders::TopicIrComparisonMethodBuilder { + crate::types::builders::TopicIrComparisonMethodBuilder::default() + } +} + +/// A builder for [`TopicIrComparisonMethod`](crate::types::TopicIrComparisonMethod). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct TopicIrComparisonMethodBuilder { + pub(crate) r#type: ::std::option::Option, + pub(crate) period: ::std::option::Option, + pub(crate) window_size: ::std::option::Option, +} +impl TopicIrComparisonMethodBuilder { + ///

    The type for the TopicIRComparisonMethod.

    + pub fn r#type(mut self, input: crate::types::ComparisonMethodType) -> Self { + self.r#type = ::std::option::Option::Some(input); + self + } + ///

    The type for the TopicIRComparisonMethod.

    + pub fn set_type(mut self, input: ::std::option::Option) -> Self { + self.r#type = input; + self + } + ///

    The type for the TopicIRComparisonMethod.

    + pub fn get_type(&self) -> &::std::option::Option { + &self.r#type + } + ///

    The period for the TopicIRComparisonMethod.

    + pub fn period(mut self, input: crate::types::TopicTimeGranularity) -> Self { + self.period = ::std::option::Option::Some(input); + self + } + ///

    The period for the TopicIRComparisonMethod.

    + pub fn set_period(mut self, input: ::std::option::Option) -> Self { + self.period = input; + self + } + ///

    The period for the TopicIRComparisonMethod.

    + pub fn get_period(&self) -> &::std::option::Option { + &self.period + } + ///

    The window size for the TopicIRComparisonMethod.

    + pub fn window_size(mut self, input: i32) -> Self { + self.window_size = ::std::option::Option::Some(input); + self + } + ///

    The window size for the TopicIRComparisonMethod.

    + pub fn set_window_size(mut self, input: ::std::option::Option) -> Self { + self.window_size = input; + self + } + ///

    The window size for the TopicIRComparisonMethod.

    + pub fn get_window_size(&self) -> &::std::option::Option { + &self.window_size + } + /// Consumes the builder and constructs a [`TopicIrComparisonMethod`](crate::types::TopicIrComparisonMethod). + pub fn build(self) -> crate::types::TopicIrComparisonMethod { + crate::types::TopicIrComparisonMethod { + r#type: self.r#type, + period: self.period, + window_size: self.window_size.unwrap_or_default(), + } + } +} diff --git a/sdk/quicksight/src/types/_topic_ir_contribution_analysis.rs b/sdk/quicksight/src/types/_topic_ir_contribution_analysis.rs new file mode 100644 index 000000000000..0633d04f2f07 --- /dev/null +++ b/sdk/quicksight/src/types/_topic_ir_contribution_analysis.rs @@ -0,0 +1,124 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition for a TopicIRContributionAnalysis.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct TopicIrContributionAnalysis { + ///

    The factors for a TopicIRContributionAnalysis.

    + pub factors: ::std::option::Option<::std::vec::Vec>, + ///

    The time ranges for the TopicIRContributionAnalysis.

    + pub time_ranges: ::std::option::Option, + ///

    The direction for the TopicIRContributionAnalysis.

    + pub direction: ::std::option::Option, + ///

    The sort type for the TopicIRContributionAnalysis.

    + pub sort_type: ::std::option::Option, +} +impl TopicIrContributionAnalysis { + ///

    The factors for a TopicIRContributionAnalysis.

    + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.factors.is_none()`. + pub fn factors(&self) -> &[crate::types::ContributionAnalysisFactor] { + self.factors.as_deref().unwrap_or_default() + } + ///

    The time ranges for the TopicIRContributionAnalysis.

    + pub fn time_ranges(&self) -> ::std::option::Option<&crate::types::ContributionAnalysisTimeRanges> { + self.time_ranges.as_ref() + } + ///

    The direction for the TopicIRContributionAnalysis.

    + pub fn direction(&self) -> ::std::option::Option<&crate::types::ContributionAnalysisDirection> { + self.direction.as_ref() + } + ///

    The sort type for the TopicIRContributionAnalysis.

    + pub fn sort_type(&self) -> ::std::option::Option<&crate::types::ContributionAnalysisSortType> { + self.sort_type.as_ref() + } +} +impl TopicIrContributionAnalysis { + /// Creates a new builder-style object to manufacture [`TopicIrContributionAnalysis`](crate::types::TopicIrContributionAnalysis). + pub fn builder() -> crate::types::builders::TopicIrContributionAnalysisBuilder { + crate::types::builders::TopicIrContributionAnalysisBuilder::default() + } +} + +/// A builder for [`TopicIrContributionAnalysis`](crate::types::TopicIrContributionAnalysis). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct TopicIrContributionAnalysisBuilder { + pub(crate) factors: ::std::option::Option<::std::vec::Vec>, + pub(crate) time_ranges: ::std::option::Option, + pub(crate) direction: ::std::option::Option, + pub(crate) sort_type: ::std::option::Option, +} +impl TopicIrContributionAnalysisBuilder { + /// Appends an item to `factors`. + /// + /// To override the contents of this collection use [`set_factors`](Self::set_factors). + /// + ///

    The factors for a TopicIRContributionAnalysis.

    + pub fn factors(mut self, input: crate::types::ContributionAnalysisFactor) -> Self { + let mut v = self.factors.unwrap_or_default(); + v.push(input); + self.factors = ::std::option::Option::Some(v); + self + } + ///

    The factors for a TopicIRContributionAnalysis.

    + pub fn set_factors(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.factors = input; + self + } + ///

    The factors for a TopicIRContributionAnalysis.

    + pub fn get_factors(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.factors + } + ///

    The time ranges for the TopicIRContributionAnalysis.

    + pub fn time_ranges(mut self, input: crate::types::ContributionAnalysisTimeRanges) -> Self { + self.time_ranges = ::std::option::Option::Some(input); + self + } + ///

    The time ranges for the TopicIRContributionAnalysis.

    + pub fn set_time_ranges(mut self, input: ::std::option::Option) -> Self { + self.time_ranges = input; + self + } + ///

    The time ranges for the TopicIRContributionAnalysis.

    + pub fn get_time_ranges(&self) -> &::std::option::Option { + &self.time_ranges + } + ///

    The direction for the TopicIRContributionAnalysis.

    + pub fn direction(mut self, input: crate::types::ContributionAnalysisDirection) -> Self { + self.direction = ::std::option::Option::Some(input); + self + } + ///

    The direction for the TopicIRContributionAnalysis.

    + pub fn set_direction(mut self, input: ::std::option::Option) -> Self { + self.direction = input; + self + } + ///

    The direction for the TopicIRContributionAnalysis.

    + pub fn get_direction(&self) -> &::std::option::Option { + &self.direction + } + ///

    The sort type for the TopicIRContributionAnalysis.

    + pub fn sort_type(mut self, input: crate::types::ContributionAnalysisSortType) -> Self { + self.sort_type = ::std::option::Option::Some(input); + self + } + ///

    The sort type for the TopicIRContributionAnalysis.

    + pub fn set_sort_type(mut self, input: ::std::option::Option) -> Self { + self.sort_type = input; + self + } + ///

    The sort type for the TopicIRContributionAnalysis.

    + pub fn get_sort_type(&self) -> &::std::option::Option { + &self.sort_type + } + /// Consumes the builder and constructs a [`TopicIrContributionAnalysis`](crate::types::TopicIrContributionAnalysis). + pub fn build(self) -> crate::types::TopicIrContributionAnalysis { + crate::types::TopicIrContributionAnalysis { + factors: self.factors, + time_ranges: self.time_ranges, + direction: self.direction, + sort_type: self.sort_type, + } + } +} diff --git a/sdk/quicksight/src/types/_topic_ir_filter_function.rs b/sdk/quicksight/src/types/_topic_ir_filter_function.rs new file mode 100644 index 000000000000..69d0fbf36bb4 --- /dev/null +++ b/sdk/quicksight/src/types/_topic_ir_filter_function.rs @@ -0,0 +1,166 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// When writing a match expression against `TopicIrFilterFunction`, it is important to ensure +/// your code is forward-compatible. That is, if a match arm handles a case for a +/// feature that is supported by the service but has not been represented as an enum +/// variant in a current version of SDK, your code should continue to work when you +/// upgrade SDK to a future version in which the enum does include a variant for that +/// feature. +/// +/// Here is an example of how you can make a match expression forward-compatible: +/// +/// ```text +/// # let topicirfilterfunction = unimplemented!(); +/// match topicirfilterfunction { +/// TopicIrFilterFunction::Contains => { /* ... */ }, +/// TopicIrFilterFunction::ContainsString => { /* ... */ }, +/// TopicIrFilterFunction::EndsWith => { /* ... */ }, +/// TopicIrFilterFunction::Exact => { /* ... */ }, +/// TopicIrFilterFunction::Last => { /* ... */ }, +/// TopicIrFilterFunction::Next => { /* ... */ }, +/// TopicIrFilterFunction::Now => { /* ... */ }, +/// TopicIrFilterFunction::Previous => { /* ... */ }, +/// TopicIrFilterFunction::StartsWith => { /* ... */ }, +/// TopicIrFilterFunction::This => { /* ... */ }, +/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, +/// _ => { /* ... */ }, +/// } +/// ``` +/// The above code demonstrates that when `topicirfilterfunction` represents +/// `NewFeature`, the execution path will lead to the second last match arm, +/// even though the enum does not contain a variant `TopicIrFilterFunction::NewFeature` +/// in the current version of SDK. The reason is that the variable `other`, +/// created by the `@` operator, is bound to +/// `TopicIrFilterFunction::Unknown(UnknownVariantValue("NewFeature".to_owned()))` +/// and calling `as_str` on it yields `"NewFeature"`. +/// This match expression is forward-compatible when executed with a newer +/// version of SDK where the variant `TopicIrFilterFunction::NewFeature` is defined. +/// Specifically, when `topicirfilterfunction` represents `NewFeature`, +/// the execution path will hit the second last match arm as before by virtue of +/// calling `as_str` on `TopicIrFilterFunction::NewFeature` also yielding `"NewFeature"`. +/// +/// Explicitly matching on the `Unknown` variant should +/// be avoided for two reasons: +/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted. +/// - It might inadvertently shadow other intended match arms. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash, +)] +pub enum TopicIrFilterFunction { + #[allow(missing_docs)] // documentation missing in model + Contains, + #[allow(missing_docs)] // documentation missing in model + ContainsString, + #[allow(missing_docs)] // documentation missing in model + EndsWith, + #[allow(missing_docs)] // documentation missing in model + Exact, + #[allow(missing_docs)] // documentation missing in model + Last, + #[allow(missing_docs)] // documentation missing in model + Next, + #[allow(missing_docs)] // documentation missing in model + Now, + #[allow(missing_docs)] // documentation missing in model + Previous, + #[allow(missing_docs)] // documentation missing in model + StartsWith, + #[allow(missing_docs)] // documentation missing in model + This, + /// `Unknown` contains new variants that have been added since this code was generated. + #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")] + Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), +} +impl ::std::convert::From<&str> for TopicIrFilterFunction { + fn from(s: &str) -> Self { + match s { + "CONTAINS" => TopicIrFilterFunction::Contains, + "CONTAINS_STRING" => TopicIrFilterFunction::ContainsString, + "ENDS_WITH" => TopicIrFilterFunction::EndsWith, + "EXACT" => TopicIrFilterFunction::Exact, + "LAST" => TopicIrFilterFunction::Last, + "NEXT" => TopicIrFilterFunction::Next, + "NOW" => TopicIrFilterFunction::Now, + "PREVIOUS" => TopicIrFilterFunction::Previous, + "STARTS_WITH" => TopicIrFilterFunction::StartsWith, + "THIS" => TopicIrFilterFunction::This, + other => TopicIrFilterFunction::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), + } + } +} +impl ::std::str::FromStr for TopicIrFilterFunction { + type Err = ::std::convert::Infallible; + + fn from_str(s: &str) -> ::std::result::Result::Err> { + ::std::result::Result::Ok(TopicIrFilterFunction::from(s)) + } +} +impl TopicIrFilterFunction { + /// Returns the `&str` value of the enum member. + pub fn as_str(&self) -> &str { + match self { + TopicIrFilterFunction::Contains => "CONTAINS", + TopicIrFilterFunction::ContainsString => "CONTAINS_STRING", + TopicIrFilterFunction::EndsWith => "ENDS_WITH", + TopicIrFilterFunction::Exact => "EXACT", + TopicIrFilterFunction::Last => "LAST", + TopicIrFilterFunction::Next => "NEXT", + TopicIrFilterFunction::Now => "NOW", + TopicIrFilterFunction::Previous => "PREVIOUS", + TopicIrFilterFunction::StartsWith => "STARTS_WITH", + TopicIrFilterFunction::This => "THIS", + TopicIrFilterFunction::Unknown(value) => value.as_str(), + } + } + /// Returns all the `&str` representations of the enum members. + pub const fn values() -> &'static [&'static str] { + &[ + "CONTAINS", + "CONTAINS_STRING", + "ENDS_WITH", + "EXACT", + "LAST", + "NEXT", + "NOW", + "PREVIOUS", + "STARTS_WITH", + "THIS", + ] + } +} +impl ::std::convert::AsRef for TopicIrFilterFunction { + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl TopicIrFilterFunction { + /// Parses the enum value while disallowing unknown variants. + /// + /// Unknown variants will result in an error. + pub fn try_parse(value: &str) -> ::std::result::Result { + match Self::from(value) { + #[allow(deprecated)] + Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)), + known => Ok(known), + } + } +} +impl ::std::fmt::Display for TopicIrFilterFunction { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + TopicIrFilterFunction::Contains => write!(f, "CONTAINS"), + TopicIrFilterFunction::ContainsString => write!(f, "CONTAINS_STRING"), + TopicIrFilterFunction::EndsWith => write!(f, "ENDS_WITH"), + TopicIrFilterFunction::Exact => write!(f, "EXACT"), + TopicIrFilterFunction::Last => write!(f, "LAST"), + TopicIrFilterFunction::Next => write!(f, "NEXT"), + TopicIrFilterFunction::Now => write!(f, "NOW"), + TopicIrFilterFunction::Previous => write!(f, "PREVIOUS"), + TopicIrFilterFunction::StartsWith => write!(f, "STARTS_WITH"), + TopicIrFilterFunction::This => write!(f, "THIS"), + TopicIrFilterFunction::Unknown(value) => write!(f, "{}", value), + } + } +} diff --git a/sdk/quicksight/src/types/_topic_ir_filter_option.rs b/sdk/quicksight/src/types/_topic_ir_filter_option.rs new file mode 100644 index 000000000000..9f18456a49f3 --- /dev/null +++ b/sdk/quicksight/src/types/_topic_ir_filter_option.rs @@ -0,0 +1,457 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition for a TopicIRFilterOption.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct TopicIrFilterOption { + ///

    The filter type for the TopicIRFilterOption.

    + pub filter_type: ::std::option::Option, + ///

    The filter class for the TopicIRFilterOption.

    + pub filter_class: ::std::option::Option, + ///

    The operand field for the TopicIRFilterOption.

    + pub operand_field: ::std::option::Option, + ///

    The function for the TopicIRFilterOption.

    + pub function: ::std::option::Option, + ///

    The constant for the TopicIRFilterOption.

    + pub constant: ::std::option::Option, + ///

    The inverse for the TopicIRFilterOption.

    + pub inverse: bool, + ///

    The null filter for the TopicIRFilterOption.

    + pub null_filter: ::std::option::Option, + ///

    The aggregation for the TopicIRFilterOption.

    + pub aggregation: ::std::option::Option, + ///

    The aggregation function parameters for the TopicIRFilterOption.

    + pub aggregation_function_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, + ///

    The AggregationPartitionBy for the TopicIRFilterOption.

    + pub aggregation_partition_by: ::std::option::Option<::std::vec::Vec>, + ///

    The range for the TopicIRFilterOption.

    + pub range: ::std::option::Option, + ///

    The inclusive for the TopicIRFilterOption.

    + pub inclusive: bool, + ///

    The time granularity for the TopicIRFilterOption.

    + pub time_granularity: ::std::option::Option, + ///

    The last next offset for the TopicIRFilterOption.

    + pub last_next_offset: ::std::option::Option, + ///

    The agg metrics for the TopicIRFilterOption.

    + pub agg_metrics: ::std::option::Option<::std::vec::Vec>, + ///

    The TopBottomLimit for the TopicIRFilterOption.

    + pub top_bottom_limit: ::std::option::Option, + ///

    The sort direction for the TopicIRFilterOption.

    + pub sort_direction: ::std::option::Option, + ///

    The anchor for the TopicIRFilterOption.

    + pub anchor: ::std::option::Option, +} +impl TopicIrFilterOption { + ///

    The filter type for the TopicIRFilterOption.

    + pub fn filter_type(&self) -> ::std::option::Option<&crate::types::TopicIrFilterType> { + self.filter_type.as_ref() + } + ///

    The filter class for the TopicIRFilterOption.

    + pub fn filter_class(&self) -> ::std::option::Option<&crate::types::FilterClass> { + self.filter_class.as_ref() + } + ///

    The operand field for the TopicIRFilterOption.

    + pub fn operand_field(&self) -> ::std::option::Option<&crate::types::Identifier> { + self.operand_field.as_ref() + } + ///

    The function for the TopicIRFilterOption.

    + pub fn function(&self) -> ::std::option::Option<&crate::types::TopicIrFilterFunction> { + self.function.as_ref() + } + ///

    The constant for the TopicIRFilterOption.

    + pub fn constant(&self) -> ::std::option::Option<&crate::types::TopicConstantValue> { + self.constant.as_ref() + } + ///

    The inverse for the TopicIRFilterOption.

    + pub fn inverse(&self) -> bool { + self.inverse + } + ///

    The null filter for the TopicIRFilterOption.

    + pub fn null_filter(&self) -> ::std::option::Option<&crate::types::NullFilterOption> { + self.null_filter.as_ref() + } + ///

    The aggregation for the TopicIRFilterOption.

    + pub fn aggregation(&self) -> ::std::option::Option<&crate::types::AggType> { + self.aggregation.as_ref() + } + ///

    The aggregation function parameters for the TopicIRFilterOption.

    + pub fn aggregation_function_parameters( + &self, + ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> { + self.aggregation_function_parameters.as_ref() + } + ///

    The AggregationPartitionBy for the TopicIRFilterOption.

    + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.aggregation_partition_by.is_none()`. + pub fn aggregation_partition_by(&self) -> &[crate::types::AggregationPartitionBy] { + self.aggregation_partition_by.as_deref().unwrap_or_default() + } + ///

    The range for the TopicIRFilterOption.

    + pub fn range(&self) -> ::std::option::Option<&crate::types::TopicConstantValue> { + self.range.as_ref() + } + ///

    The inclusive for the TopicIRFilterOption.

    + pub fn inclusive(&self) -> bool { + self.inclusive + } + ///

    The time granularity for the TopicIRFilterOption.

    + pub fn time_granularity(&self) -> ::std::option::Option<&crate::types::TimeGranularity> { + self.time_granularity.as_ref() + } + ///

    The last next offset for the TopicIRFilterOption.

    + pub fn last_next_offset(&self) -> ::std::option::Option<&crate::types::TopicConstantValue> { + self.last_next_offset.as_ref() + } + ///

    The agg metrics for the TopicIRFilterOption.

    + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.agg_metrics.is_none()`. + pub fn agg_metrics(&self) -> &[crate::types::FilterAggMetrics] { + self.agg_metrics.as_deref().unwrap_or_default() + } + ///

    The TopBottomLimit for the TopicIRFilterOption.

    + pub fn top_bottom_limit(&self) -> ::std::option::Option<&crate::types::TopicConstantValue> { + self.top_bottom_limit.as_ref() + } + ///

    The sort direction for the TopicIRFilterOption.

    + pub fn sort_direction(&self) -> ::std::option::Option<&crate::types::TopicSortDirection> { + self.sort_direction.as_ref() + } + ///

    The anchor for the TopicIRFilterOption.

    + pub fn anchor(&self) -> ::std::option::Option<&crate::types::Anchor> { + self.anchor.as_ref() + } +} +impl TopicIrFilterOption { + /// Creates a new builder-style object to manufacture [`TopicIrFilterOption`](crate::types::TopicIrFilterOption). + pub fn builder() -> crate::types::builders::TopicIrFilterOptionBuilder { + crate::types::builders::TopicIrFilterOptionBuilder::default() + } +} + +/// A builder for [`TopicIrFilterOption`](crate::types::TopicIrFilterOption). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct TopicIrFilterOptionBuilder { + pub(crate) filter_type: ::std::option::Option, + pub(crate) filter_class: ::std::option::Option, + pub(crate) operand_field: ::std::option::Option, + pub(crate) function: ::std::option::Option, + pub(crate) constant: ::std::option::Option, + pub(crate) inverse: ::std::option::Option, + pub(crate) null_filter: ::std::option::Option, + pub(crate) aggregation: ::std::option::Option, + pub(crate) aggregation_function_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, + pub(crate) aggregation_partition_by: ::std::option::Option<::std::vec::Vec>, + pub(crate) range: ::std::option::Option, + pub(crate) inclusive: ::std::option::Option, + pub(crate) time_granularity: ::std::option::Option, + pub(crate) last_next_offset: ::std::option::Option, + pub(crate) agg_metrics: ::std::option::Option<::std::vec::Vec>, + pub(crate) top_bottom_limit: ::std::option::Option, + pub(crate) sort_direction: ::std::option::Option, + pub(crate) anchor: ::std::option::Option, +} +impl TopicIrFilterOptionBuilder { + ///

    The filter type for the TopicIRFilterOption.

    + pub fn filter_type(mut self, input: crate::types::TopicIrFilterType) -> Self { + self.filter_type = ::std::option::Option::Some(input); + self + } + ///

    The filter type for the TopicIRFilterOption.

    + pub fn set_filter_type(mut self, input: ::std::option::Option) -> Self { + self.filter_type = input; + self + } + ///

    The filter type for the TopicIRFilterOption.

    + pub fn get_filter_type(&self) -> &::std::option::Option { + &self.filter_type + } + ///

    The filter class for the TopicIRFilterOption.

    + pub fn filter_class(mut self, input: crate::types::FilterClass) -> Self { + self.filter_class = ::std::option::Option::Some(input); + self + } + ///

    The filter class for the TopicIRFilterOption.

    + pub fn set_filter_class(mut self, input: ::std::option::Option) -> Self { + self.filter_class = input; + self + } + ///

    The filter class for the TopicIRFilterOption.

    + pub fn get_filter_class(&self) -> &::std::option::Option { + &self.filter_class + } + ///

    The operand field for the TopicIRFilterOption.

    + pub fn operand_field(mut self, input: crate::types::Identifier) -> Self { + self.operand_field = ::std::option::Option::Some(input); + self + } + ///

    The operand field for the TopicIRFilterOption.

    + pub fn set_operand_field(mut self, input: ::std::option::Option) -> Self { + self.operand_field = input; + self + } + ///

    The operand field for the TopicIRFilterOption.

    + pub fn get_operand_field(&self) -> &::std::option::Option { + &self.operand_field + } + ///

    The function for the TopicIRFilterOption.

    + pub fn function(mut self, input: crate::types::TopicIrFilterFunction) -> Self { + self.function = ::std::option::Option::Some(input); + self + } + ///

    The function for the TopicIRFilterOption.

    + pub fn set_function(mut self, input: ::std::option::Option) -> Self { + self.function = input; + self + } + ///

    The function for the TopicIRFilterOption.

    + pub fn get_function(&self) -> &::std::option::Option { + &self.function + } + ///

    The constant for the TopicIRFilterOption.

    + pub fn constant(mut self, input: crate::types::TopicConstantValue) -> Self { + self.constant = ::std::option::Option::Some(input); + self + } + ///

    The constant for the TopicIRFilterOption.

    + pub fn set_constant(mut self, input: ::std::option::Option) -> Self { + self.constant = input; + self + } + ///

    The constant for the TopicIRFilterOption.

    + pub fn get_constant(&self) -> &::std::option::Option { + &self.constant + } + ///

    The inverse for the TopicIRFilterOption.

    + pub fn inverse(mut self, input: bool) -> Self { + self.inverse = ::std::option::Option::Some(input); + self + } + ///

    The inverse for the TopicIRFilterOption.

    + pub fn set_inverse(mut self, input: ::std::option::Option) -> Self { + self.inverse = input; + self + } + ///

    The inverse for the TopicIRFilterOption.

    + pub fn get_inverse(&self) -> &::std::option::Option { + &self.inverse + } + ///

    The null filter for the TopicIRFilterOption.

    + pub fn null_filter(mut self, input: crate::types::NullFilterOption) -> Self { + self.null_filter = ::std::option::Option::Some(input); + self + } + ///

    The null filter for the TopicIRFilterOption.

    + pub fn set_null_filter(mut self, input: ::std::option::Option) -> Self { + self.null_filter = input; + self + } + ///

    The null filter for the TopicIRFilterOption.

    + pub fn get_null_filter(&self) -> &::std::option::Option { + &self.null_filter + } + ///

    The aggregation for the TopicIRFilterOption.

    + pub fn aggregation(mut self, input: crate::types::AggType) -> Self { + self.aggregation = ::std::option::Option::Some(input); + self + } + ///

    The aggregation for the TopicIRFilterOption.

    + pub fn set_aggregation(mut self, input: ::std::option::Option) -> Self { + self.aggregation = input; + self + } + ///

    The aggregation for the TopicIRFilterOption.

    + pub fn get_aggregation(&self) -> &::std::option::Option { + &self.aggregation + } + /// Adds a key-value pair to `aggregation_function_parameters`. + /// + /// To override the contents of this collection use [`set_aggregation_function_parameters`](Self::set_aggregation_function_parameters). + /// + ///

    The aggregation function parameters for the TopicIRFilterOption.

    + pub fn aggregation_function_parameters( + mut self, + k: impl ::std::convert::Into<::std::string::String>, + v: impl ::std::convert::Into<::std::string::String>, + ) -> Self { + let mut hash_map = self.aggregation_function_parameters.unwrap_or_default(); + hash_map.insert(k.into(), v.into()); + self.aggregation_function_parameters = ::std::option::Option::Some(hash_map); + self + } + ///

    The aggregation function parameters for the TopicIRFilterOption.

    + pub fn set_aggregation_function_parameters( + mut self, + input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, + ) -> Self { + self.aggregation_function_parameters = input; + self + } + ///

    The aggregation function parameters for the TopicIRFilterOption.

    + pub fn get_aggregation_function_parameters( + &self, + ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.aggregation_function_parameters + } + /// Appends an item to `aggregation_partition_by`. + /// + /// To override the contents of this collection use [`set_aggregation_partition_by`](Self::set_aggregation_partition_by). + /// + ///

    The AggregationPartitionBy for the TopicIRFilterOption.

    + pub fn aggregation_partition_by(mut self, input: crate::types::AggregationPartitionBy) -> Self { + let mut v = self.aggregation_partition_by.unwrap_or_default(); + v.push(input); + self.aggregation_partition_by = ::std::option::Option::Some(v); + self + } + ///

    The AggregationPartitionBy for the TopicIRFilterOption.

    + pub fn set_aggregation_partition_by(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.aggregation_partition_by = input; + self + } + ///

    The AggregationPartitionBy for the TopicIRFilterOption.

    + pub fn get_aggregation_partition_by(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.aggregation_partition_by + } + ///

    The range for the TopicIRFilterOption.

    + pub fn range(mut self, input: crate::types::TopicConstantValue) -> Self { + self.range = ::std::option::Option::Some(input); + self + } + ///

    The range for the TopicIRFilterOption.

    + pub fn set_range(mut self, input: ::std::option::Option) -> Self { + self.range = input; + self + } + ///

    The range for the TopicIRFilterOption.

    + pub fn get_range(&self) -> &::std::option::Option { + &self.range + } + ///

    The inclusive for the TopicIRFilterOption.

    + pub fn inclusive(mut self, input: bool) -> Self { + self.inclusive = ::std::option::Option::Some(input); + self + } + ///

    The inclusive for the TopicIRFilterOption.

    + pub fn set_inclusive(mut self, input: ::std::option::Option) -> Self { + self.inclusive = input; + self + } + ///

    The inclusive for the TopicIRFilterOption.

    + pub fn get_inclusive(&self) -> &::std::option::Option { + &self.inclusive + } + ///

    The time granularity for the TopicIRFilterOption.

    + pub fn time_granularity(mut self, input: crate::types::TimeGranularity) -> Self { + self.time_granularity = ::std::option::Option::Some(input); + self + } + ///

    The time granularity for the TopicIRFilterOption.

    + pub fn set_time_granularity(mut self, input: ::std::option::Option) -> Self { + self.time_granularity = input; + self + } + ///

    The time granularity for the TopicIRFilterOption.

    + pub fn get_time_granularity(&self) -> &::std::option::Option { + &self.time_granularity + } + ///

    The last next offset for the TopicIRFilterOption.

    + pub fn last_next_offset(mut self, input: crate::types::TopicConstantValue) -> Self { + self.last_next_offset = ::std::option::Option::Some(input); + self + } + ///

    The last next offset for the TopicIRFilterOption.

    + pub fn set_last_next_offset(mut self, input: ::std::option::Option) -> Self { + self.last_next_offset = input; + self + } + ///

    The last next offset for the TopicIRFilterOption.

    + pub fn get_last_next_offset(&self) -> &::std::option::Option { + &self.last_next_offset + } + /// Appends an item to `agg_metrics`. + /// + /// To override the contents of this collection use [`set_agg_metrics`](Self::set_agg_metrics). + /// + ///

    The agg metrics for the TopicIRFilterOption.

    + pub fn agg_metrics(mut self, input: crate::types::FilterAggMetrics) -> Self { + let mut v = self.agg_metrics.unwrap_or_default(); + v.push(input); + self.agg_metrics = ::std::option::Option::Some(v); + self + } + ///

    The agg metrics for the TopicIRFilterOption.

    + pub fn set_agg_metrics(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.agg_metrics = input; + self + } + ///

    The agg metrics for the TopicIRFilterOption.

    + pub fn get_agg_metrics(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.agg_metrics + } + ///

    The TopBottomLimit for the TopicIRFilterOption.

    + pub fn top_bottom_limit(mut self, input: crate::types::TopicConstantValue) -> Self { + self.top_bottom_limit = ::std::option::Option::Some(input); + self + } + ///

    The TopBottomLimit for the TopicIRFilterOption.

    + pub fn set_top_bottom_limit(mut self, input: ::std::option::Option) -> Self { + self.top_bottom_limit = input; + self + } + ///

    The TopBottomLimit for the TopicIRFilterOption.

    + pub fn get_top_bottom_limit(&self) -> &::std::option::Option { + &self.top_bottom_limit + } + ///

    The sort direction for the TopicIRFilterOption.

    + pub fn sort_direction(mut self, input: crate::types::TopicSortDirection) -> Self { + self.sort_direction = ::std::option::Option::Some(input); + self + } + ///

    The sort direction for the TopicIRFilterOption.

    + pub fn set_sort_direction(mut self, input: ::std::option::Option) -> Self { + self.sort_direction = input; + self + } + ///

    The sort direction for the TopicIRFilterOption.

    + pub fn get_sort_direction(&self) -> &::std::option::Option { + &self.sort_direction + } + ///

    The anchor for the TopicIRFilterOption.

    + pub fn anchor(mut self, input: crate::types::Anchor) -> Self { + self.anchor = ::std::option::Option::Some(input); + self + } + ///

    The anchor for the TopicIRFilterOption.

    + pub fn set_anchor(mut self, input: ::std::option::Option) -> Self { + self.anchor = input; + self + } + ///

    The anchor for the TopicIRFilterOption.

    + pub fn get_anchor(&self) -> &::std::option::Option { + &self.anchor + } + /// Consumes the builder and constructs a [`TopicIrFilterOption`](crate::types::TopicIrFilterOption). + pub fn build(self) -> crate::types::TopicIrFilterOption { + crate::types::TopicIrFilterOption { + filter_type: self.filter_type, + filter_class: self.filter_class, + operand_field: self.operand_field, + function: self.function, + constant: self.constant, + inverse: self.inverse.unwrap_or_default(), + null_filter: self.null_filter, + aggregation: self.aggregation, + aggregation_function_parameters: self.aggregation_function_parameters, + aggregation_partition_by: self.aggregation_partition_by, + range: self.range, + inclusive: self.inclusive.unwrap_or_default(), + time_granularity: self.time_granularity, + last_next_offset: self.last_next_offset, + agg_metrics: self.agg_metrics, + top_bottom_limit: self.top_bottom_limit, + sort_direction: self.sort_direction, + anchor: self.anchor, + } + } +} diff --git a/sdk/quicksight/src/types/_topic_ir_filter_type.rs b/sdk/quicksight/src/types/_topic_ir_filter_type.rs new file mode 100644 index 000000000000..fa64246116c7 --- /dev/null +++ b/sdk/quicksight/src/types/_topic_ir_filter_type.rs @@ -0,0 +1,159 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// When writing a match expression against `TopicIrFilterType`, it is important to ensure +/// your code is forward-compatible. That is, if a match arm handles a case for a +/// feature that is supported by the service but has not been represented as an enum +/// variant in a current version of SDK, your code should continue to work when you +/// upgrade SDK to a future version in which the enum does include a variant for that +/// feature. +/// +/// Here is an example of how you can make a match expression forward-compatible: +/// +/// ```text +/// # let topicirfiltertype = unimplemented!(); +/// match topicirfiltertype { +/// TopicIrFilterType::AcceptAllFilter => { /* ... */ }, +/// TopicIrFilterType::CategoryFilter => { /* ... */ }, +/// TopicIrFilterType::DateRangeFilter => { /* ... */ }, +/// TopicIrFilterType::Equals => { /* ... */ }, +/// TopicIrFilterType::NumericEqualityFilter => { /* ... */ }, +/// TopicIrFilterType::NumericRangeFilter => { /* ... */ }, +/// TopicIrFilterType::RankLimitFilter => { /* ... */ }, +/// TopicIrFilterType::RelativeDateFilter => { /* ... */ }, +/// TopicIrFilterType::TopBottomFilter => { /* ... */ }, +/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, +/// _ => { /* ... */ }, +/// } +/// ``` +/// The above code demonstrates that when `topicirfiltertype` represents +/// `NewFeature`, the execution path will lead to the second last match arm, +/// even though the enum does not contain a variant `TopicIrFilterType::NewFeature` +/// in the current version of SDK. The reason is that the variable `other`, +/// created by the `@` operator, is bound to +/// `TopicIrFilterType::Unknown(UnknownVariantValue("NewFeature".to_owned()))` +/// and calling `as_str` on it yields `"NewFeature"`. +/// This match expression is forward-compatible when executed with a newer +/// version of SDK where the variant `TopicIrFilterType::NewFeature` is defined. +/// Specifically, when `topicirfiltertype` represents `NewFeature`, +/// the execution path will hit the second last match arm as before by virtue of +/// calling `as_str` on `TopicIrFilterType::NewFeature` also yielding `"NewFeature"`. +/// +/// Explicitly matching on the `Unknown` variant should +/// be avoided for two reasons: +/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted. +/// - It might inadvertently shadow other intended match arms. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash, +)] +pub enum TopicIrFilterType { + #[allow(missing_docs)] // documentation missing in model + AcceptAllFilter, + #[allow(missing_docs)] // documentation missing in model + CategoryFilter, + #[allow(missing_docs)] // documentation missing in model + DateRangeFilter, + #[allow(missing_docs)] // documentation missing in model + Equals, + #[allow(missing_docs)] // documentation missing in model + NumericEqualityFilter, + #[allow(missing_docs)] // documentation missing in model + NumericRangeFilter, + #[allow(missing_docs)] // documentation missing in model + RankLimitFilter, + #[allow(missing_docs)] // documentation missing in model + RelativeDateFilter, + #[allow(missing_docs)] // documentation missing in model + TopBottomFilter, + /// `Unknown` contains new variants that have been added since this code was generated. + #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")] + Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), +} +impl ::std::convert::From<&str> for TopicIrFilterType { + fn from(s: &str) -> Self { + match s { + "ACCEPT_ALL_FILTER" => TopicIrFilterType::AcceptAllFilter, + "CATEGORY_FILTER" => TopicIrFilterType::CategoryFilter, + "DATE_RANGE_FILTER" => TopicIrFilterType::DateRangeFilter, + "EQUALS" => TopicIrFilterType::Equals, + "NUMERIC_EQUALITY_FILTER" => TopicIrFilterType::NumericEqualityFilter, + "NUMERIC_RANGE_FILTER" => TopicIrFilterType::NumericRangeFilter, + "RANK_LIMIT_FILTER" => TopicIrFilterType::RankLimitFilter, + "RELATIVE_DATE_FILTER" => TopicIrFilterType::RelativeDateFilter, + "TOP_BOTTOM_FILTER" => TopicIrFilterType::TopBottomFilter, + other => TopicIrFilterType::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), + } + } +} +impl ::std::str::FromStr for TopicIrFilterType { + type Err = ::std::convert::Infallible; + + fn from_str(s: &str) -> ::std::result::Result::Err> { + ::std::result::Result::Ok(TopicIrFilterType::from(s)) + } +} +impl TopicIrFilterType { + /// Returns the `&str` value of the enum member. + pub fn as_str(&self) -> &str { + match self { + TopicIrFilterType::AcceptAllFilter => "ACCEPT_ALL_FILTER", + TopicIrFilterType::CategoryFilter => "CATEGORY_FILTER", + TopicIrFilterType::DateRangeFilter => "DATE_RANGE_FILTER", + TopicIrFilterType::Equals => "EQUALS", + TopicIrFilterType::NumericEqualityFilter => "NUMERIC_EQUALITY_FILTER", + TopicIrFilterType::NumericRangeFilter => "NUMERIC_RANGE_FILTER", + TopicIrFilterType::RankLimitFilter => "RANK_LIMIT_FILTER", + TopicIrFilterType::RelativeDateFilter => "RELATIVE_DATE_FILTER", + TopicIrFilterType::TopBottomFilter => "TOP_BOTTOM_FILTER", + TopicIrFilterType::Unknown(value) => value.as_str(), + } + } + /// Returns all the `&str` representations of the enum members. + pub const fn values() -> &'static [&'static str] { + &[ + "ACCEPT_ALL_FILTER", + "CATEGORY_FILTER", + "DATE_RANGE_FILTER", + "EQUALS", + "NUMERIC_EQUALITY_FILTER", + "NUMERIC_RANGE_FILTER", + "RANK_LIMIT_FILTER", + "RELATIVE_DATE_FILTER", + "TOP_BOTTOM_FILTER", + ] + } +} +impl ::std::convert::AsRef for TopicIrFilterType { + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl TopicIrFilterType { + /// Parses the enum value while disallowing unknown variants. + /// + /// Unknown variants will result in an error. + pub fn try_parse(value: &str) -> ::std::result::Result { + match Self::from(value) { + #[allow(deprecated)] + Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)), + known => Ok(known), + } + } +} +impl ::std::fmt::Display for TopicIrFilterType { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + TopicIrFilterType::AcceptAllFilter => write!(f, "ACCEPT_ALL_FILTER"), + TopicIrFilterType::CategoryFilter => write!(f, "CATEGORY_FILTER"), + TopicIrFilterType::DateRangeFilter => write!(f, "DATE_RANGE_FILTER"), + TopicIrFilterType::Equals => write!(f, "EQUALS"), + TopicIrFilterType::NumericEqualityFilter => write!(f, "NUMERIC_EQUALITY_FILTER"), + TopicIrFilterType::NumericRangeFilter => write!(f, "NUMERIC_RANGE_FILTER"), + TopicIrFilterType::RankLimitFilter => write!(f, "RANK_LIMIT_FILTER"), + TopicIrFilterType::RelativeDateFilter => write!(f, "RELATIVE_DATE_FILTER"), + TopicIrFilterType::TopBottomFilter => write!(f, "TOP_BOTTOM_FILTER"), + TopicIrFilterType::Unknown(value) => write!(f, "{}", value), + } + } +} diff --git a/sdk/quicksight/src/types/_topic_ir_group_by.rs b/sdk/quicksight/src/types/_topic_ir_group_by.rs new file mode 100644 index 000000000000..aa9a1882e88e --- /dev/null +++ b/sdk/quicksight/src/types/_topic_ir_group_by.rs @@ -0,0 +1,160 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition for a TopicIRGroupBy.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct TopicIrGroupBy { + ///

    The field name for the TopicIRGroupBy.

    + pub field_name: ::std::option::Option, + ///

    The time granularity for the TopicIRGroupBy.

    + pub time_granularity: ::std::option::Option, + ///

    The sort for the TopicIRGroupBy.

    + pub sort: ::std::option::Option, + ///

    The display format for the TopicIRGroupBy.

    + pub display_format: ::std::option::Option, + ///

    A structure that represents additional options for display formatting.

    + pub display_format_options: ::std::option::Option, + ///

    The named entity for the TopicIRGroupBy.

    + pub named_entity: ::std::option::Option, +} +impl TopicIrGroupBy { + ///

    The field name for the TopicIRGroupBy.

    + pub fn field_name(&self) -> ::std::option::Option<&crate::types::Identifier> { + self.field_name.as_ref() + } + ///

    The time granularity for the TopicIRGroupBy.

    + pub fn time_granularity(&self) -> ::std::option::Option<&crate::types::TopicTimeGranularity> { + self.time_granularity.as_ref() + } + ///

    The sort for the TopicIRGroupBy.

    + pub fn sort(&self) -> ::std::option::Option<&crate::types::TopicSortClause> { + self.sort.as_ref() + } + ///

    The display format for the TopicIRGroupBy.

    + pub fn display_format(&self) -> ::std::option::Option<&crate::types::DisplayFormat> { + self.display_format.as_ref() + } + ///

    A structure that represents additional options for display formatting.

    + pub fn display_format_options(&self) -> ::std::option::Option<&crate::types::DisplayFormatOptions> { + self.display_format_options.as_ref() + } + ///

    The named entity for the TopicIRGroupBy.

    + pub fn named_entity(&self) -> ::std::option::Option<&crate::types::NamedEntityRef> { + self.named_entity.as_ref() + } +} +impl TopicIrGroupBy { + /// Creates a new builder-style object to manufacture [`TopicIrGroupBy`](crate::types::TopicIrGroupBy). + pub fn builder() -> crate::types::builders::TopicIrGroupByBuilder { + crate::types::builders::TopicIrGroupByBuilder::default() + } +} + +/// A builder for [`TopicIrGroupBy`](crate::types::TopicIrGroupBy). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct TopicIrGroupByBuilder { + pub(crate) field_name: ::std::option::Option, + pub(crate) time_granularity: ::std::option::Option, + pub(crate) sort: ::std::option::Option, + pub(crate) display_format: ::std::option::Option, + pub(crate) display_format_options: ::std::option::Option, + pub(crate) named_entity: ::std::option::Option, +} +impl TopicIrGroupByBuilder { + ///

    The field name for the TopicIRGroupBy.

    + pub fn field_name(mut self, input: crate::types::Identifier) -> Self { + self.field_name = ::std::option::Option::Some(input); + self + } + ///

    The field name for the TopicIRGroupBy.

    + pub fn set_field_name(mut self, input: ::std::option::Option) -> Self { + self.field_name = input; + self + } + ///

    The field name for the TopicIRGroupBy.

    + pub fn get_field_name(&self) -> &::std::option::Option { + &self.field_name + } + ///

    The time granularity for the TopicIRGroupBy.

    + pub fn time_granularity(mut self, input: crate::types::TopicTimeGranularity) -> Self { + self.time_granularity = ::std::option::Option::Some(input); + self + } + ///

    The time granularity for the TopicIRGroupBy.

    + pub fn set_time_granularity(mut self, input: ::std::option::Option) -> Self { + self.time_granularity = input; + self + } + ///

    The time granularity for the TopicIRGroupBy.

    + pub fn get_time_granularity(&self) -> &::std::option::Option { + &self.time_granularity + } + ///

    The sort for the TopicIRGroupBy.

    + pub fn sort(mut self, input: crate::types::TopicSortClause) -> Self { + self.sort = ::std::option::Option::Some(input); + self + } + ///

    The sort for the TopicIRGroupBy.

    + pub fn set_sort(mut self, input: ::std::option::Option) -> Self { + self.sort = input; + self + } + ///

    The sort for the TopicIRGroupBy.

    + pub fn get_sort(&self) -> &::std::option::Option { + &self.sort + } + ///

    The display format for the TopicIRGroupBy.

    + pub fn display_format(mut self, input: crate::types::DisplayFormat) -> Self { + self.display_format = ::std::option::Option::Some(input); + self + } + ///

    The display format for the TopicIRGroupBy.

    + pub fn set_display_format(mut self, input: ::std::option::Option) -> Self { + self.display_format = input; + self + } + ///

    The display format for the TopicIRGroupBy.

    + pub fn get_display_format(&self) -> &::std::option::Option { + &self.display_format + } + ///

    A structure that represents additional options for display formatting.

    + pub fn display_format_options(mut self, input: crate::types::DisplayFormatOptions) -> Self { + self.display_format_options = ::std::option::Option::Some(input); + self + } + ///

    A structure that represents additional options for display formatting.

    + pub fn set_display_format_options(mut self, input: ::std::option::Option) -> Self { + self.display_format_options = input; + self + } + ///

    A structure that represents additional options for display formatting.

    + pub fn get_display_format_options(&self) -> &::std::option::Option { + &self.display_format_options + } + ///

    The named entity for the TopicIRGroupBy.

    + pub fn named_entity(mut self, input: crate::types::NamedEntityRef) -> Self { + self.named_entity = ::std::option::Option::Some(input); + self + } + ///

    The named entity for the TopicIRGroupBy.

    + pub fn set_named_entity(mut self, input: ::std::option::Option) -> Self { + self.named_entity = input; + self + } + ///

    The named entity for the TopicIRGroupBy.

    + pub fn get_named_entity(&self) -> &::std::option::Option { + &self.named_entity + } + /// Consumes the builder and constructs a [`TopicIrGroupBy`](crate::types::TopicIrGroupBy). + pub fn build(self) -> crate::types::TopicIrGroupBy { + crate::types::TopicIrGroupBy { + field_name: self.field_name, + time_granularity: self.time_granularity, + sort: self.sort, + display_format: self.display_format, + display_format_options: self.display_format_options, + named_entity: self.named_entity, + } + } +} diff --git a/sdk/quicksight/src/types/_topic_ir_metric.rs b/sdk/quicksight/src/types/_topic_ir_metric.rs new file mode 100644 index 000000000000..24a737853719 --- /dev/null +++ b/sdk/quicksight/src/types/_topic_ir_metric.rs @@ -0,0 +1,272 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition for a TopicIRMetric.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq)] +pub struct TopicIrMetric { + ///

    The metric ID for the TopicIRMetric.

    + pub metric_id: ::std::option::Option, + ///

    The function for the TopicIRMetric.

    + pub function: ::std::option::Option, + ///

    The operands for the TopicIRMetric.

    + pub operands: ::std::option::Option<::std::vec::Vec>, + ///

    The comparison method for the TopicIRMetric.

    + pub comparison_method: ::std::option::Option, + ///

    The expression for the TopicIRMetric.

    + pub expression: ::std::option::Option<::std::string::String>, + ///

    The calculated field references for the TopicIRMetric.

    + pub calculated_field_references: ::std::option::Option<::std::vec::Vec>, + ///

    The display format for the TopicIRMetric.

    + pub display_format: ::std::option::Option, + ///

    A structure that represents additional options for display formatting.

    + pub display_format_options: ::std::option::Option, + ///

    The named entity for the TopicIRMetric.

    + pub named_entity: ::std::option::Option, +} +impl TopicIrMetric { + ///

    The metric ID for the TopicIRMetric.

    + pub fn metric_id(&self) -> ::std::option::Option<&crate::types::Identifier> { + self.metric_id.as_ref() + } + ///

    The function for the TopicIRMetric.

    + pub fn function(&self) -> ::std::option::Option<&crate::types::AggFunction> { + self.function.as_ref() + } + ///

    The operands for the TopicIRMetric.

    + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.operands.is_none()`. + pub fn operands(&self) -> &[crate::types::Identifier] { + self.operands.as_deref().unwrap_or_default() + } + ///

    The comparison method for the TopicIRMetric.

    + pub fn comparison_method(&self) -> ::std::option::Option<&crate::types::TopicIrComparisonMethod> { + self.comparison_method.as_ref() + } + ///

    The expression for the TopicIRMetric.

    + pub fn expression(&self) -> ::std::option::Option<&str> { + self.expression.as_deref() + } + ///

    The calculated field references for the TopicIRMetric.

    + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.calculated_field_references.is_none()`. + pub fn calculated_field_references(&self) -> &[crate::types::Identifier] { + self.calculated_field_references.as_deref().unwrap_or_default() + } + ///

    The display format for the TopicIRMetric.

    + pub fn display_format(&self) -> ::std::option::Option<&crate::types::DisplayFormat> { + self.display_format.as_ref() + } + ///

    A structure that represents additional options for display formatting.

    + pub fn display_format_options(&self) -> ::std::option::Option<&crate::types::DisplayFormatOptions> { + self.display_format_options.as_ref() + } + ///

    The named entity for the TopicIRMetric.

    + pub fn named_entity(&self) -> ::std::option::Option<&crate::types::NamedEntityRef> { + self.named_entity.as_ref() + } +} +impl ::std::fmt::Debug for TopicIrMetric { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + let mut formatter = f.debug_struct("TopicIrMetric"); + formatter.field("metric_id", &self.metric_id); + formatter.field("function", &self.function); + formatter.field("operands", &self.operands); + formatter.field("comparison_method", &self.comparison_method); + formatter.field("expression", &"*** Sensitive Data Redacted ***"); + formatter.field("calculated_field_references", &self.calculated_field_references); + formatter.field("display_format", &self.display_format); + formatter.field("display_format_options", &self.display_format_options); + formatter.field("named_entity", &self.named_entity); + formatter.finish() + } +} +impl TopicIrMetric { + /// Creates a new builder-style object to manufacture [`TopicIrMetric`](crate::types::TopicIrMetric). + pub fn builder() -> crate::types::builders::TopicIrMetricBuilder { + crate::types::builders::TopicIrMetricBuilder::default() + } +} + +/// A builder for [`TopicIrMetric`](crate::types::TopicIrMetric). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)] +#[non_exhaustive] +pub struct TopicIrMetricBuilder { + pub(crate) metric_id: ::std::option::Option, + pub(crate) function: ::std::option::Option, + pub(crate) operands: ::std::option::Option<::std::vec::Vec>, + pub(crate) comparison_method: ::std::option::Option, + pub(crate) expression: ::std::option::Option<::std::string::String>, + pub(crate) calculated_field_references: ::std::option::Option<::std::vec::Vec>, + pub(crate) display_format: ::std::option::Option, + pub(crate) display_format_options: ::std::option::Option, + pub(crate) named_entity: ::std::option::Option, +} +impl TopicIrMetricBuilder { + ///

    The metric ID for the TopicIRMetric.

    + pub fn metric_id(mut self, input: crate::types::Identifier) -> Self { + self.metric_id = ::std::option::Option::Some(input); + self + } + ///

    The metric ID for the TopicIRMetric.

    + pub fn set_metric_id(mut self, input: ::std::option::Option) -> Self { + self.metric_id = input; + self + } + ///

    The metric ID for the TopicIRMetric.

    + pub fn get_metric_id(&self) -> &::std::option::Option { + &self.metric_id + } + ///

    The function for the TopicIRMetric.

    + pub fn function(mut self, input: crate::types::AggFunction) -> Self { + self.function = ::std::option::Option::Some(input); + self + } + ///

    The function for the TopicIRMetric.

    + pub fn set_function(mut self, input: ::std::option::Option) -> Self { + self.function = input; + self + } + ///

    The function for the TopicIRMetric.

    + pub fn get_function(&self) -> &::std::option::Option { + &self.function + } + /// Appends an item to `operands`. + /// + /// To override the contents of this collection use [`set_operands`](Self::set_operands). + /// + ///

    The operands for the TopicIRMetric.

    + pub fn operands(mut self, input: crate::types::Identifier) -> Self { + let mut v = self.operands.unwrap_or_default(); + v.push(input); + self.operands = ::std::option::Option::Some(v); + self + } + ///

    The operands for the TopicIRMetric.

    + pub fn set_operands(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.operands = input; + self + } + ///

    The operands for the TopicIRMetric.

    + pub fn get_operands(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.operands + } + ///

    The comparison method for the TopicIRMetric.

    + pub fn comparison_method(mut self, input: crate::types::TopicIrComparisonMethod) -> Self { + self.comparison_method = ::std::option::Option::Some(input); + self + } + ///

    The comparison method for the TopicIRMetric.

    + pub fn set_comparison_method(mut self, input: ::std::option::Option) -> Self { + self.comparison_method = input; + self + } + ///

    The comparison method for the TopicIRMetric.

    + pub fn get_comparison_method(&self) -> &::std::option::Option { + &self.comparison_method + } + ///

    The expression for the TopicIRMetric.

    + pub fn expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.expression = ::std::option::Option::Some(input.into()); + self + } + ///

    The expression for the TopicIRMetric.

    + pub fn set_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.expression = input; + self + } + ///

    The expression for the TopicIRMetric.

    + pub fn get_expression(&self) -> &::std::option::Option<::std::string::String> { + &self.expression + } + /// Appends an item to `calculated_field_references`. + /// + /// To override the contents of this collection use [`set_calculated_field_references`](Self::set_calculated_field_references). + /// + ///

    The calculated field references for the TopicIRMetric.

    + pub fn calculated_field_references(mut self, input: crate::types::Identifier) -> Self { + let mut v = self.calculated_field_references.unwrap_or_default(); + v.push(input); + self.calculated_field_references = ::std::option::Option::Some(v); + self + } + ///

    The calculated field references for the TopicIRMetric.

    + pub fn set_calculated_field_references(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.calculated_field_references = input; + self + } + ///

    The calculated field references for the TopicIRMetric.

    + pub fn get_calculated_field_references(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.calculated_field_references + } + ///

    The display format for the TopicIRMetric.

    + pub fn display_format(mut self, input: crate::types::DisplayFormat) -> Self { + self.display_format = ::std::option::Option::Some(input); + self + } + ///

    The display format for the TopicIRMetric.

    + pub fn set_display_format(mut self, input: ::std::option::Option) -> Self { + self.display_format = input; + self + } + ///

    The display format for the TopicIRMetric.

    + pub fn get_display_format(&self) -> &::std::option::Option { + &self.display_format + } + ///

    A structure that represents additional options for display formatting.

    + pub fn display_format_options(mut self, input: crate::types::DisplayFormatOptions) -> Self { + self.display_format_options = ::std::option::Option::Some(input); + self + } + ///

    A structure that represents additional options for display formatting.

    + pub fn set_display_format_options(mut self, input: ::std::option::Option) -> Self { + self.display_format_options = input; + self + } + ///

    A structure that represents additional options for display formatting.

    + pub fn get_display_format_options(&self) -> &::std::option::Option { + &self.display_format_options + } + ///

    The named entity for the TopicIRMetric.

    + pub fn named_entity(mut self, input: crate::types::NamedEntityRef) -> Self { + self.named_entity = ::std::option::Option::Some(input); + self + } + ///

    The named entity for the TopicIRMetric.

    + pub fn set_named_entity(mut self, input: ::std::option::Option) -> Self { + self.named_entity = input; + self + } + ///

    The named entity for the TopicIRMetric.

    + pub fn get_named_entity(&self) -> &::std::option::Option { + &self.named_entity + } + /// Consumes the builder and constructs a [`TopicIrMetric`](crate::types::TopicIrMetric). + pub fn build(self) -> crate::types::TopicIrMetric { + crate::types::TopicIrMetric { + metric_id: self.metric_id, + function: self.function, + operands: self.operands, + comparison_method: self.comparison_method, + expression: self.expression, + calculated_field_references: self.calculated_field_references, + display_format: self.display_format, + display_format_options: self.display_format_options, + named_entity: self.named_entity, + } + } +} +impl ::std::fmt::Debug for TopicIrMetricBuilder { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + let mut formatter = f.debug_struct("TopicIrMetricBuilder"); + formatter.field("metric_id", &self.metric_id); + formatter.field("function", &self.function); + formatter.field("operands", &self.operands); + formatter.field("comparison_method", &self.comparison_method); + formatter.field("expression", &"*** Sensitive Data Redacted ***"); + formatter.field("calculated_field_references", &self.calculated_field_references); + formatter.field("display_format", &self.display_format); + formatter.field("display_format_options", &self.display_format_options); + formatter.field("named_entity", &self.named_entity); + formatter.finish() + } +} diff --git a/sdk/quicksight/src/types/_topic_reviewed_answer.rs b/sdk/quicksight/src/types/_topic_reviewed_answer.rs new file mode 100644 index 000000000000..03549455fab0 --- /dev/null +++ b/sdk/quicksight/src/types/_topic_reviewed_answer.rs @@ -0,0 +1,207 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The deinition for a TopicReviewedAnswer.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct TopicReviewedAnswer { + ///

    The Amazon Resource Name (ARN) of the reviewed answer.

    + pub arn: ::std::option::Option<::std::string::String>, + ///

    The answer ID of the reviewed answer.

    + pub answer_id: ::std::string::String, + ///

    The Dataset ARN for the TopicReviewedAnswer.

    + pub dataset_arn: ::std::string::String, + ///

    The question for the TopicReviewedAnswer.

    + pub question: ::std::string::String, + ///

    The mir for the TopicReviewedAnswer.

    + pub mir: ::std::option::Option, + ///

    The primary visual for the TopicReviewedAnswer.

    + pub primary_visual: ::std::option::Option, + ///

    The template for the TopicReviewedAnswer.

    + pub template: ::std::option::Option, +} +impl TopicReviewedAnswer { + ///

    The Amazon Resource Name (ARN) of the reviewed answer.

    + pub fn arn(&self) -> ::std::option::Option<&str> { + self.arn.as_deref() + } + ///

    The answer ID of the reviewed answer.

    + pub fn answer_id(&self) -> &str { + use std::ops::Deref; + self.answer_id.deref() + } + ///

    The Dataset ARN for the TopicReviewedAnswer.

    + pub fn dataset_arn(&self) -> &str { + use std::ops::Deref; + self.dataset_arn.deref() + } + ///

    The question for the TopicReviewedAnswer.

    + pub fn question(&self) -> &str { + use std::ops::Deref; + self.question.deref() + } + ///

    The mir for the TopicReviewedAnswer.

    + pub fn mir(&self) -> ::std::option::Option<&crate::types::TopicIr> { + self.mir.as_ref() + } + ///

    The primary visual for the TopicReviewedAnswer.

    + pub fn primary_visual(&self) -> ::std::option::Option<&crate::types::TopicVisual> { + self.primary_visual.as_ref() + } + ///

    The template for the TopicReviewedAnswer.

    + pub fn template(&self) -> ::std::option::Option<&crate::types::TopicTemplate> { + self.template.as_ref() + } +} +impl TopicReviewedAnswer { + /// Creates a new builder-style object to manufacture [`TopicReviewedAnswer`](crate::types::TopicReviewedAnswer). + pub fn builder() -> crate::types::builders::TopicReviewedAnswerBuilder { + crate::types::builders::TopicReviewedAnswerBuilder::default() + } +} + +/// A builder for [`TopicReviewedAnswer`](crate::types::TopicReviewedAnswer). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct TopicReviewedAnswerBuilder { + pub(crate) arn: ::std::option::Option<::std::string::String>, + pub(crate) answer_id: ::std::option::Option<::std::string::String>, + pub(crate) dataset_arn: ::std::option::Option<::std::string::String>, + pub(crate) question: ::std::option::Option<::std::string::String>, + pub(crate) mir: ::std::option::Option, + pub(crate) primary_visual: ::std::option::Option, + pub(crate) template: ::std::option::Option, +} +impl TopicReviewedAnswerBuilder { + ///

    The Amazon Resource Name (ARN) of the reviewed answer.

    + pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.arn = ::std::option::Option::Some(input.into()); + self + } + ///

    The Amazon Resource Name (ARN) of the reviewed answer.

    + pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.arn = input; + self + } + ///

    The Amazon Resource Name (ARN) of the reviewed answer.

    + pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.arn + } + ///

    The answer ID of the reviewed answer.

    + /// This field is required. + pub fn answer_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.answer_id = ::std::option::Option::Some(input.into()); + self + } + ///

    The answer ID of the reviewed answer.

    + pub fn set_answer_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.answer_id = input; + self + } + ///

    The answer ID of the reviewed answer.

    + pub fn get_answer_id(&self) -> &::std::option::Option<::std::string::String> { + &self.answer_id + } + ///

    The Dataset ARN for the TopicReviewedAnswer.

    + /// This field is required. + pub fn dataset_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.dataset_arn = ::std::option::Option::Some(input.into()); + self + } + ///

    The Dataset ARN for the TopicReviewedAnswer.

    + pub fn set_dataset_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.dataset_arn = input; + self + } + ///

    The Dataset ARN for the TopicReviewedAnswer.

    + pub fn get_dataset_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.dataset_arn + } + ///

    The question for the TopicReviewedAnswer.

    + /// This field is required. + pub fn question(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.question = ::std::option::Option::Some(input.into()); + self + } + ///

    The question for the TopicReviewedAnswer.

    + pub fn set_question(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.question = input; + self + } + ///

    The question for the TopicReviewedAnswer.

    + pub fn get_question(&self) -> &::std::option::Option<::std::string::String> { + &self.question + } + ///

    The mir for the TopicReviewedAnswer.

    + pub fn mir(mut self, input: crate::types::TopicIr) -> Self { + self.mir = ::std::option::Option::Some(input); + self + } + ///

    The mir for the TopicReviewedAnswer.

    + pub fn set_mir(mut self, input: ::std::option::Option) -> Self { + self.mir = input; + self + } + ///

    The mir for the TopicReviewedAnswer.

    + pub fn get_mir(&self) -> &::std::option::Option { + &self.mir + } + ///

    The primary visual for the TopicReviewedAnswer.

    + pub fn primary_visual(mut self, input: crate::types::TopicVisual) -> Self { + self.primary_visual = ::std::option::Option::Some(input); + self + } + ///

    The primary visual for the TopicReviewedAnswer.

    + pub fn set_primary_visual(mut self, input: ::std::option::Option) -> Self { + self.primary_visual = input; + self + } + ///

    The primary visual for the TopicReviewedAnswer.

    + pub fn get_primary_visual(&self) -> &::std::option::Option { + &self.primary_visual + } + ///

    The template for the TopicReviewedAnswer.

    + pub fn template(mut self, input: crate::types::TopicTemplate) -> Self { + self.template = ::std::option::Option::Some(input); + self + } + ///

    The template for the TopicReviewedAnswer.

    + pub fn set_template(mut self, input: ::std::option::Option) -> Self { + self.template = input; + self + } + ///

    The template for the TopicReviewedAnswer.

    + pub fn get_template(&self) -> &::std::option::Option { + &self.template + } + /// Consumes the builder and constructs a [`TopicReviewedAnswer`](crate::types::TopicReviewedAnswer). + /// This method will fail if any of the following fields are not set: + /// - [`answer_id`](crate::types::builders::TopicReviewedAnswerBuilder::answer_id) + /// - [`dataset_arn`](crate::types::builders::TopicReviewedAnswerBuilder::dataset_arn) + /// - [`question`](crate::types::builders::TopicReviewedAnswerBuilder::question) + pub fn build(self) -> ::std::result::Result { + ::std::result::Result::Ok(crate::types::TopicReviewedAnswer { + arn: self.arn, + answer_id: self.answer_id.ok_or_else(|| { + ::aws_smithy_types::error::operation::BuildError::missing_field( + "answer_id", + "answer_id was not specified but it is required when building TopicReviewedAnswer", + ) + })?, + dataset_arn: self.dataset_arn.ok_or_else(|| { + ::aws_smithy_types::error::operation::BuildError::missing_field( + "dataset_arn", + "dataset_arn was not specified but it is required when building TopicReviewedAnswer", + ) + })?, + question: self.question.ok_or_else(|| { + ::aws_smithy_types::error::operation::BuildError::missing_field( + "question", + "question was not specified but it is required when building TopicReviewedAnswer", + ) + })?, + mir: self.mir, + primary_visual: self.primary_visual, + template: self.template, + }) + } +} diff --git a/sdk/quicksight/src/types/_topic_sort_clause.rs b/sdk/quicksight/src/types/_topic_sort_clause.rs new file mode 100644 index 000000000000..c251261dc401 --- /dev/null +++ b/sdk/quicksight/src/types/_topic_sort_clause.rs @@ -0,0 +1,72 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition for a TopicSortClause.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct TopicSortClause { + ///

    The operand for a TopicSortClause.

    + pub operand: ::std::option::Option, + ///

    The sort direction for the TopicSortClause.

    + pub sort_direction: ::std::option::Option, +} +impl TopicSortClause { + ///

    The operand for a TopicSortClause.

    + pub fn operand(&self) -> ::std::option::Option<&crate::types::Identifier> { + self.operand.as_ref() + } + ///

    The sort direction for the TopicSortClause.

    + pub fn sort_direction(&self) -> ::std::option::Option<&crate::types::TopicSortDirection> { + self.sort_direction.as_ref() + } +} +impl TopicSortClause { + /// Creates a new builder-style object to manufacture [`TopicSortClause`](crate::types::TopicSortClause). + pub fn builder() -> crate::types::builders::TopicSortClauseBuilder { + crate::types::builders::TopicSortClauseBuilder::default() + } +} + +/// A builder for [`TopicSortClause`](crate::types::TopicSortClause). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct TopicSortClauseBuilder { + pub(crate) operand: ::std::option::Option, + pub(crate) sort_direction: ::std::option::Option, +} +impl TopicSortClauseBuilder { + ///

    The operand for a TopicSortClause.

    + pub fn operand(mut self, input: crate::types::Identifier) -> Self { + self.operand = ::std::option::Option::Some(input); + self + } + ///

    The operand for a TopicSortClause.

    + pub fn set_operand(mut self, input: ::std::option::Option) -> Self { + self.operand = input; + self + } + ///

    The operand for a TopicSortClause.

    + pub fn get_operand(&self) -> &::std::option::Option { + &self.operand + } + ///

    The sort direction for the TopicSortClause.

    + pub fn sort_direction(mut self, input: crate::types::TopicSortDirection) -> Self { + self.sort_direction = ::std::option::Option::Some(input); + self + } + ///

    The sort direction for the TopicSortClause.

    + pub fn set_sort_direction(mut self, input: ::std::option::Option) -> Self { + self.sort_direction = input; + self + } + ///

    The sort direction for the TopicSortClause.

    + pub fn get_sort_direction(&self) -> &::std::option::Option { + &self.sort_direction + } + /// Consumes the builder and constructs a [`TopicSortClause`](crate::types::TopicSortClause). + pub fn build(self) -> crate::types::TopicSortClause { + crate::types::TopicSortClause { + operand: self.operand, + sort_direction: self.sort_direction, + } + } +} diff --git a/sdk/quicksight/src/types/_topic_sort_direction.rs b/sdk/quicksight/src/types/_topic_sort_direction.rs new file mode 100644 index 000000000000..bdc281d85d26 --- /dev/null +++ b/sdk/quicksight/src/types/_topic_sort_direction.rs @@ -0,0 +1,107 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// When writing a match expression against `TopicSortDirection`, it is important to ensure +/// your code is forward-compatible. That is, if a match arm handles a case for a +/// feature that is supported by the service but has not been represented as an enum +/// variant in a current version of SDK, your code should continue to work when you +/// upgrade SDK to a future version in which the enum does include a variant for that +/// feature. +/// +/// Here is an example of how you can make a match expression forward-compatible: +/// +/// ```text +/// # let topicsortdirection = unimplemented!(); +/// match topicsortdirection { +/// TopicSortDirection::Ascending => { /* ... */ }, +/// TopicSortDirection::Descending => { /* ... */ }, +/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, +/// _ => { /* ... */ }, +/// } +/// ``` +/// The above code demonstrates that when `topicsortdirection` represents +/// `NewFeature`, the execution path will lead to the second last match arm, +/// even though the enum does not contain a variant `TopicSortDirection::NewFeature` +/// in the current version of SDK. The reason is that the variable `other`, +/// created by the `@` operator, is bound to +/// `TopicSortDirection::Unknown(UnknownVariantValue("NewFeature".to_owned()))` +/// and calling `as_str` on it yields `"NewFeature"`. +/// This match expression is forward-compatible when executed with a newer +/// version of SDK where the variant `TopicSortDirection::NewFeature` is defined. +/// Specifically, when `topicsortdirection` represents `NewFeature`, +/// the execution path will hit the second last match arm as before by virtue of +/// calling `as_str` on `TopicSortDirection::NewFeature` also yielding `"NewFeature"`. +/// +/// Explicitly matching on the `Unknown` variant should +/// be avoided for two reasons: +/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted. +/// - It might inadvertently shadow other intended match arms. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash, +)] +pub enum TopicSortDirection { + #[allow(missing_docs)] // documentation missing in model + Ascending, + #[allow(missing_docs)] // documentation missing in model + Descending, + /// `Unknown` contains new variants that have been added since this code was generated. + #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")] + Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), +} +impl ::std::convert::From<&str> for TopicSortDirection { + fn from(s: &str) -> Self { + match s { + "ASCENDING" => TopicSortDirection::Ascending, + "DESCENDING" => TopicSortDirection::Descending, + other => TopicSortDirection::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), + } + } +} +impl ::std::str::FromStr for TopicSortDirection { + type Err = ::std::convert::Infallible; + + fn from_str(s: &str) -> ::std::result::Result::Err> { + ::std::result::Result::Ok(TopicSortDirection::from(s)) + } +} +impl TopicSortDirection { + /// Returns the `&str` value of the enum member. + pub fn as_str(&self) -> &str { + match self { + TopicSortDirection::Ascending => "ASCENDING", + TopicSortDirection::Descending => "DESCENDING", + TopicSortDirection::Unknown(value) => value.as_str(), + } + } + /// Returns all the `&str` representations of the enum members. + pub const fn values() -> &'static [&'static str] { + &["ASCENDING", "DESCENDING"] + } +} +impl ::std::convert::AsRef for TopicSortDirection { + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl TopicSortDirection { + /// Parses the enum value while disallowing unknown variants. + /// + /// Unknown variants will result in an error. + pub fn try_parse(value: &str) -> ::std::result::Result { + match Self::from(value) { + #[allow(deprecated)] + Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)), + known => Ok(known), + } + } +} +impl ::std::fmt::Display for TopicSortDirection { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + TopicSortDirection::Ascending => write!(f, "ASCENDING"), + TopicSortDirection::Descending => write!(f, "DESCENDING"), + TopicSortDirection::Unknown(value) => write!(f, "{}", value), + } + } +} diff --git a/sdk/quicksight/src/types/_topic_template.rs b/sdk/quicksight/src/types/_topic_template.rs new file mode 100644 index 000000000000..2f92ad3c194d --- /dev/null +++ b/sdk/quicksight/src/types/_topic_template.rs @@ -0,0 +1,80 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition for a TopicTemplate.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct TopicTemplate { + ///

    The template type for the TopicTemplate.

    + pub template_type: ::std::option::Option<::std::string::String>, + ///

    The slots for the TopicTemplate.

    + pub slots: ::std::option::Option<::std::vec::Vec>, +} +impl TopicTemplate { + ///

    The template type for the TopicTemplate.

    + pub fn template_type(&self) -> ::std::option::Option<&str> { + self.template_type.as_deref() + } + ///

    The slots for the TopicTemplate.

    + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.slots.is_none()`. + pub fn slots(&self) -> &[crate::types::Slot] { + self.slots.as_deref().unwrap_or_default() + } +} +impl TopicTemplate { + /// Creates a new builder-style object to manufacture [`TopicTemplate`](crate::types::TopicTemplate). + pub fn builder() -> crate::types::builders::TopicTemplateBuilder { + crate::types::builders::TopicTemplateBuilder::default() + } +} + +/// A builder for [`TopicTemplate`](crate::types::TopicTemplate). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct TopicTemplateBuilder { + pub(crate) template_type: ::std::option::Option<::std::string::String>, + pub(crate) slots: ::std::option::Option<::std::vec::Vec>, +} +impl TopicTemplateBuilder { + ///

    The template type for the TopicTemplate.

    + pub fn template_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.template_type = ::std::option::Option::Some(input.into()); + self + } + ///

    The template type for the TopicTemplate.

    + pub fn set_template_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.template_type = input; + self + } + ///

    The template type for the TopicTemplate.

    + pub fn get_template_type(&self) -> &::std::option::Option<::std::string::String> { + &self.template_type + } + /// Appends an item to `slots`. + /// + /// To override the contents of this collection use [`set_slots`](Self::set_slots). + /// + ///

    The slots for the TopicTemplate.

    + pub fn slots(mut self, input: crate::types::Slot) -> Self { + let mut v = self.slots.unwrap_or_default(); + v.push(input); + self.slots = ::std::option::Option::Some(v); + self + } + ///

    The slots for the TopicTemplate.

    + pub fn set_slots(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.slots = input; + self + } + ///

    The slots for the TopicTemplate.

    + pub fn get_slots(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.slots + } + /// Consumes the builder and constructs a [`TopicTemplate`](crate::types::TopicTemplate). + pub fn build(self) -> crate::types::TopicTemplate { + crate::types::TopicTemplate { + template_type: self.template_type, + slots: self.slots, + } + } +} diff --git a/sdk/quicksight/src/types/_topic_visual.rs b/sdk/quicksight/src/types/_topic_visual.rs new file mode 100644 index 000000000000..4473a110ad96 --- /dev/null +++ b/sdk/quicksight/src/types/_topic_visual.rs @@ -0,0 +1,124 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition for a TopicVisual.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct TopicVisual { + ///

    The visual ID for the TopicVisual.

    + pub visual_id: ::std::option::Option<::std::string::String>, + ///

    The role for the TopicVisual.

    + pub role: ::std::option::Option, + ///

    The ir for the TopicVisual.

    + pub ir: ::std::option::Option, + ///

    The supporting visuals for the TopicVisual.

    + pub supporting_visuals: ::std::option::Option<::std::vec::Vec>, +} +impl TopicVisual { + ///

    The visual ID for the TopicVisual.

    + pub fn visual_id(&self) -> ::std::option::Option<&str> { + self.visual_id.as_deref() + } + ///

    The role for the TopicVisual.

    + pub fn role(&self) -> ::std::option::Option<&crate::types::VisualRole> { + self.role.as_ref() + } + ///

    The ir for the TopicVisual.

    + pub fn ir(&self) -> ::std::option::Option<&crate::types::TopicIr> { + self.ir.as_ref() + } + ///

    The supporting visuals for the TopicVisual.

    + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.supporting_visuals.is_none()`. + pub fn supporting_visuals(&self) -> &[crate::types::TopicVisual] { + self.supporting_visuals.as_deref().unwrap_or_default() + } +} +impl TopicVisual { + /// Creates a new builder-style object to manufacture [`TopicVisual`](crate::types::TopicVisual). + pub fn builder() -> crate::types::builders::TopicVisualBuilder { + crate::types::builders::TopicVisualBuilder::default() + } +} + +/// A builder for [`TopicVisual`](crate::types::TopicVisual). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct TopicVisualBuilder { + pub(crate) visual_id: ::std::option::Option<::std::string::String>, + pub(crate) role: ::std::option::Option, + pub(crate) ir: ::std::option::Option, + pub(crate) supporting_visuals: ::std::option::Option<::std::vec::Vec>, +} +impl TopicVisualBuilder { + ///

    The visual ID for the TopicVisual.

    + pub fn visual_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.visual_id = ::std::option::Option::Some(input.into()); + self + } + ///

    The visual ID for the TopicVisual.

    + pub fn set_visual_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.visual_id = input; + self + } + ///

    The visual ID for the TopicVisual.

    + pub fn get_visual_id(&self) -> &::std::option::Option<::std::string::String> { + &self.visual_id + } + ///

    The role for the TopicVisual.

    + pub fn role(mut self, input: crate::types::VisualRole) -> Self { + self.role = ::std::option::Option::Some(input); + self + } + ///

    The role for the TopicVisual.

    + pub fn set_role(mut self, input: ::std::option::Option) -> Self { + self.role = input; + self + } + ///

    The role for the TopicVisual.

    + pub fn get_role(&self) -> &::std::option::Option { + &self.role + } + ///

    The ir for the TopicVisual.

    + pub fn ir(mut self, input: crate::types::TopicIr) -> Self { + self.ir = ::std::option::Option::Some(input); + self + } + ///

    The ir for the TopicVisual.

    + pub fn set_ir(mut self, input: ::std::option::Option) -> Self { + self.ir = input; + self + } + ///

    The ir for the TopicVisual.

    + pub fn get_ir(&self) -> &::std::option::Option { + &self.ir + } + /// Appends an item to `supporting_visuals`. + /// + /// To override the contents of this collection use [`set_supporting_visuals`](Self::set_supporting_visuals). + /// + ///

    The supporting visuals for the TopicVisual.

    + pub fn supporting_visuals(mut self, input: crate::types::TopicVisual) -> Self { + let mut v = self.supporting_visuals.unwrap_or_default(); + v.push(input); + self.supporting_visuals = ::std::option::Option::Some(v); + self + } + ///

    The supporting visuals for the TopicVisual.

    + pub fn set_supporting_visuals(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.supporting_visuals = input; + self + } + ///

    The supporting visuals for the TopicVisual.

    + pub fn get_supporting_visuals(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.supporting_visuals + } + /// Consumes the builder and constructs a [`TopicVisual`](crate::types::TopicVisual). + pub fn build(self) -> crate::types::TopicVisual { + crate::types::TopicVisual { + visual_id: self.visual_id, + role: self.role, + ir: self.ir, + supporting_visuals: self.supporting_visuals, + } + } +} diff --git a/sdk/quicksight/src/types/_visual_options.rs b/sdk/quicksight/src/types/_visual_options.rs new file mode 100644 index 000000000000..3ca8b13c8e6a --- /dev/null +++ b/sdk/quicksight/src/types/_visual_options.rs @@ -0,0 +1,48 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

    The definition for a VisualOptions.

    +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct VisualOptions { + ///

    The type for a VisualOptions.

    + pub r#type: ::std::option::Option<::std::string::String>, +} +impl VisualOptions { + ///

    The type for a VisualOptions.

    + pub fn r#type(&self) -> ::std::option::Option<&str> { + self.r#type.as_deref() + } +} +impl VisualOptions { + /// Creates a new builder-style object to manufacture [`VisualOptions`](crate::types::VisualOptions). + pub fn builder() -> crate::types::builders::VisualOptionsBuilder { + crate::types::builders::VisualOptionsBuilder::default() + } +} + +/// A builder for [`VisualOptions`](crate::types::VisualOptions). +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +#[non_exhaustive] +pub struct VisualOptionsBuilder { + pub(crate) r#type: ::std::option::Option<::std::string::String>, +} +impl VisualOptionsBuilder { + ///

    The type for a VisualOptions.

    + pub fn r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.r#type = ::std::option::Option::Some(input.into()); + self + } + ///

    The type for a VisualOptions.

    + pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.r#type = input; + self + } + ///

    The type for a VisualOptions.

    + pub fn get_type(&self) -> &::std::option::Option<::std::string::String> { + &self.r#type + } + /// Consumes the builder and constructs a [`VisualOptions`](crate::types::VisualOptions). + pub fn build(self) -> crate::types::VisualOptions { + crate::types::VisualOptions { r#type: self.r#type } + } +} diff --git a/sdk/quicksight/src/types/_visual_role.rs b/sdk/quicksight/src/types/_visual_role.rs new file mode 100644 index 000000000000..4596033a712c --- /dev/null +++ b/sdk/quicksight/src/types/_visual_role.rs @@ -0,0 +1,125 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// When writing a match expression against `VisualRole`, it is important to ensure +/// your code is forward-compatible. That is, if a match arm handles a case for a +/// feature that is supported by the service but has not been represented as an enum +/// variant in a current version of SDK, your code should continue to work when you +/// upgrade SDK to a future version in which the enum does include a variant for that +/// feature. +/// +/// Here is an example of how you can make a match expression forward-compatible: +/// +/// ```text +/// # let visualrole = unimplemented!(); +/// match visualrole { +/// VisualRole::Complimentary => { /* ... */ }, +/// VisualRole::Fallback => { /* ... */ }, +/// VisualRole::Fragment => { /* ... */ }, +/// VisualRole::MultiIntent => { /* ... */ }, +/// VisualRole::Primary => { /* ... */ }, +/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, +/// _ => { /* ... */ }, +/// } +/// ``` +/// The above code demonstrates that when `visualrole` represents +/// `NewFeature`, the execution path will lead to the second last match arm, +/// even though the enum does not contain a variant `VisualRole::NewFeature` +/// in the current version of SDK. The reason is that the variable `other`, +/// created by the `@` operator, is bound to +/// `VisualRole::Unknown(UnknownVariantValue("NewFeature".to_owned()))` +/// and calling `as_str` on it yields `"NewFeature"`. +/// This match expression is forward-compatible when executed with a newer +/// version of SDK where the variant `VisualRole::NewFeature` is defined. +/// Specifically, when `visualrole` represents `NewFeature`, +/// the execution path will hit the second last match arm as before by virtue of +/// calling `as_str` on `VisualRole::NewFeature` also yielding `"NewFeature"`. +/// +/// Explicitly matching on the `Unknown` variant should +/// be avoided for two reasons: +/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted. +/// - It might inadvertently shadow other intended match arms. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive( + ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash, +)] +pub enum VisualRole { + #[allow(missing_docs)] // documentation missing in model + Complimentary, + #[allow(missing_docs)] // documentation missing in model + Fallback, + #[allow(missing_docs)] // documentation missing in model + Fragment, + #[allow(missing_docs)] // documentation missing in model + MultiIntent, + #[allow(missing_docs)] // documentation missing in model + Primary, + /// `Unknown` contains new variants that have been added since this code was generated. + #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")] + Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), +} +impl ::std::convert::From<&str> for VisualRole { + fn from(s: &str) -> Self { + match s { + "COMPLIMENTARY" => VisualRole::Complimentary, + "FALLBACK" => VisualRole::Fallback, + "FRAGMENT" => VisualRole::Fragment, + "MULTI_INTENT" => VisualRole::MultiIntent, + "PRIMARY" => VisualRole::Primary, + other => VisualRole::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), + } + } +} +impl ::std::str::FromStr for VisualRole { + type Err = ::std::convert::Infallible; + + fn from_str(s: &str) -> ::std::result::Result::Err> { + ::std::result::Result::Ok(VisualRole::from(s)) + } +} +impl VisualRole { + /// Returns the `&str` value of the enum member. + pub fn as_str(&self) -> &str { + match self { + VisualRole::Complimentary => "COMPLIMENTARY", + VisualRole::Fallback => "FALLBACK", + VisualRole::Fragment => "FRAGMENT", + VisualRole::MultiIntent => "MULTI_INTENT", + VisualRole::Primary => "PRIMARY", + VisualRole::Unknown(value) => value.as_str(), + } + } + /// Returns all the `&str` representations of the enum members. + pub const fn values() -> &'static [&'static str] { + &["COMPLIMENTARY", "FALLBACK", "FRAGMENT", "MULTI_INTENT", "PRIMARY"] + } +} +impl ::std::convert::AsRef for VisualRole { + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl VisualRole { + /// Parses the enum value while disallowing unknown variants. + /// + /// Unknown variants will result in an error. + pub fn try_parse(value: &str) -> ::std::result::Result { + match Self::from(value) { + #[allow(deprecated)] + Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)), + known => Ok(known), + } + } +} +impl ::std::fmt::Display for VisualRole { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + match self { + VisualRole::Complimentary => write!(f, "COMPLIMENTARY"), + VisualRole::Fallback => write!(f, "FALLBACK"), + VisualRole::Fragment => write!(f, "FRAGMENT"), + VisualRole::MultiIntent => write!(f, "MULTI_INTENT"), + VisualRole::Primary => write!(f, "PRIMARY"), + VisualRole::Unknown(value) => write!(f, "{}", value), + } + } +} diff --git a/sdk/quicksight/src/types/builders.rs b/sdk/quicksight/src/types/builders.rs index 1e4db6c37b6b..81e1dedec248 100644 --- a/sdk/quicksight/src/types/builders.rs +++ b/sdk/quicksight/src/types/builders.rs @@ -1417,6 +1417,50 @@ pub use crate::types::_network_interface::NetworkInterfaceBuilder; pub use crate::types::_topic_summary::TopicSummaryBuilder; +pub use crate::types::_topic_reviewed_answer::TopicReviewedAnswerBuilder; + +pub use crate::types::_topic_template::TopicTemplateBuilder; + +pub use crate::types::_slot::SlotBuilder; + +pub use crate::types::_topic_visual::TopicVisualBuilder; + +pub use crate::types::_topic_ir::TopicIrBuilder; + +pub use crate::types::_visual_options::VisualOptionsBuilder; + +pub use crate::types::_topic_ir_contribution_analysis::TopicIrContributionAnalysisBuilder; + +pub use crate::types::_contribution_analysis_time_ranges::ContributionAnalysisTimeRangesBuilder; + +pub use crate::types::_topic_ir_filter_option::TopicIrFilterOptionBuilder; + +pub use crate::types::_anchor::AnchorBuilder; + +pub use crate::types::_topic_constant_value::TopicConstantValueBuilder; + +pub use crate::types::_collective_constant_entry::CollectiveConstantEntryBuilder; + +pub use crate::types::_filter_agg_metrics::FilterAggMetricsBuilder; + +pub use crate::types::_identifier::IdentifierBuilder; + +pub use crate::types::_aggregation_partition_by::AggregationPartitionByBuilder; + +pub use crate::types::_contribution_analysis_factor::ContributionAnalysisFactorBuilder; + +pub use crate::types::_topic_sort_clause::TopicSortClauseBuilder; + +pub use crate::types::_topic_ir_group_by::TopicIrGroupByBuilder; + +pub use crate::types::_named_entity_ref::NamedEntityRefBuilder; + +pub use crate::types::_topic_ir_metric::TopicIrMetricBuilder; + +pub use crate::types::_topic_ir_comparison_method::TopicIrComparisonMethodBuilder; + +pub use crate::types::_agg_function::AggFunctionBuilder; + pub use crate::types::_topic_refresh_schedule_summary::TopicRefreshScheduleSummaryBuilder; pub use crate::types::_theme_version_summary::ThemeVersionSummaryBuilder; @@ -1562,3 +1606,9 @@ pub use crate::types::_account_settings::AccountSettingsBuilder; pub use crate::types::_folder_member::FolderMemberBuilder; pub use crate::types::_signup_response::SignupResponseBuilder; + +pub use crate::types::_invalid_topic_reviewed_answer::InvalidTopicReviewedAnswerBuilder; + +pub use crate::types::_succeeded_topic_reviewed_answer::SucceededTopicReviewedAnswerBuilder; + +pub use crate::types::_create_topic_reviewed_answer::CreateTopicReviewedAnswerBuilder; diff --git a/versions.toml b/versions.toml index e524db2655d8..643866c224fc 100644 --- a/versions.toml +++ b/versions.toml @@ -59,8 +59,8 @@ model_hash = '707cde7caa30133c4d1e401decfb9815af0805b744e956c8cc125119a3691f83' [crates.aws-sdk-acmpca] category = 'AwsSdk' version = '1.37.0' -source_hash = 'e0d60c6f80c4416f5e9b83006430b8e2488d143e3ee726155ba1fed9d727dd9d' -model_hash = 'fac8ee7a799a009cb030290fc80084901a82569d0a47623b6057210617ecb1fc' +source_hash = 'd2295b324f0ab69bc268774ae0dd22e10818ad277173344f1513f17c1ef6817c' +model_hash = '0bd25e701da7061ac1a08b5fe3f6fd7ab7f7743d586aaf623d8f25e0e08fe838' [crates.aws-sdk-amp] category = 'AwsSdk' @@ -197,8 +197,8 @@ model_hash = 'f5961b5b71219d66def6b205f539e8794b44347c0dfd5ef2586f566754f74fe1' [crates.aws-sdk-arczonalshift] category = 'AwsSdk' version = '1.36.0' -source_hash = '689ff7cb9a354fc90559da98252fda18e8d60e5eab10ff44bfd6ac109672671a' -model_hash = '0a2b2dc5a0e53412f53f6ad90b53d033e4b4d85861c187b338ed49912a704210' +source_hash = '4cbe8126b2f8b657f198152cb9ddf999df7346f2a19898b8f343e23948ffc518' +model_hash = '44eb769636e65a66f6a327668b318a47c987fb8f6133ec1de72fc80cf31f2693' [crates.aws-sdk-artifact] category = 'AwsSdk' @@ -222,7 +222,7 @@ model_hash = '0d9610c5970f4cdbeb4da161ce893ee8e5d28ce3d1953f74b8b4f0075f43f81a' category = 'AwsSdk' version = '1.37.0' source_hash = 'ab2bd8afec1d7da0a9638ec9cce3d6a7194642e52b830f4b9086bbba4b4fe5b1' -model_hash = 'b51cd8256f37bd2b336694e118a85c1f355e90ff7994efa5b0af3d3b7c4c60f0' +model_hash = '8c5ebe6cff8751b4f7aa228788000c179979588bfffd596ad2f6aa77c7286d39' [crates.aws-sdk-autoscalingplans] category = 'AwsSdk' @@ -456,7 +456,7 @@ model_hash = '887fa8d62137a444faf49b35c87c543efb59d1b15a0f07414312be2410eb6c6c' category = 'AwsSdk' version = '1.44.0' source_hash = '56c7eb783444e3af8e7e5a370f1926622348a479787f89e9e1d33fad56558531' -model_hash = '9ec4a687f822a5b6497c6aa8c01182762aaa18ae68a43f94b40a9f5bca12de83' +model_hash = '4d0779ea4236b39b086d47fee4e849ec7ce37f50731477e9186b2040979456f0' [crates.aws-sdk-codecatalyst] category = 'AwsSdk' @@ -738,7 +738,7 @@ model_hash = '8fb73e1979de38a6fe2ffed3fd6295dac350ef807a1131d8cc093b73c3d80ece' category = 'AwsSdk' version = '1.38.0' source_hash = 'fe1f6b9717bd6c26ea32ebae3ec21d5b1de7b3c9fbd193412b99473df2f23e24' -model_hash = '6f3a7e60ebde3f22406ddf2cca4f1fd6d3347a20d6e73d7ef880bbb101c3fcd3' +model_hash = '54efc0f048d367e9e2d418f8d91e281fa6f28e954e9f3fb8c6b8751017d4a1e5' [crates.aws-sdk-dynamodbstreams] category = 'AwsSdk' @@ -953,8 +953,8 @@ model_hash = 'dca44bc00b97fbb20fbb7412538d6aa5f7ff23a66ea8ff12693cdd6c869ce299' [crates.aws-sdk-globalaccelerator] category = 'AwsSdk' version = '1.37.0' -source_hash = 'a334caaef737f1ac47eeb7573455bebdd7b33f051525aa3a1aa5b6f02718d42f' -model_hash = 'ffe726d22972fee40612bb9e1a435bd9b29a6e3dd43dcbf2fe03e081ff2570b8' +source_hash = 'bdf371665eeb4011bb0b9577aa8f87eb98b9860ff97a48430c56bf0abbe06b87' +model_hash = '7a8bc11f1498fcf202e15dad74c422522285ca4c8f290e50f7d08d42f31ccf26' [crates.aws-sdk-glue] category = 'AwsSdk' @@ -1686,7 +1686,7 @@ model_hash = '5dfd888b4e94afda3b90f4ecc015fb0dd206b6ce72c1950c34d89d9e540b19f8' category = 'AwsSdk' version = '1.37.0' source_hash = '747e0d8a2e44129b28d4bceb614bb95fdf026f8991c8bedf2affc90e6e6c5520' -model_hash = 'b38af0bd0ab78dda8f5f25951cee7cb893bd3f016bba9ffcca3c399431c1f939' +model_hash = '5dcd132f83db800cc081868f261520f370e7b489b27dfca65856eceee0456cfb' [crates.aws-sdk-pinpointemail] category = 'AwsSdk' @@ -1769,8 +1769,8 @@ model_hash = '27c9e9e5a0761cc6e79648630e51a0d6faf2ea5dea8826c722bcc5005fa36786' [crates.aws-sdk-quicksight] category = 'AwsSdk' version = '1.43.0' -source_hash = 'c70b0c9ed65a8ab765affcf9e699e4dcaf8509b8e90e7a5bf470f4bd77dbf6c9' -model_hash = 'c120dd772169e2c5c37de051d5262fd22a2eb120d6d1463838fdc1b2d23e865a' +source_hash = 'dfccdc42ebb9fe68e280b8d82644c5ecf130ed1c7f75a6edd6c971928a2058ce' +model_hash = '84e51919a8ff9c4ac67120899b81569ef13097e84e992db767d0eeeecd27f904' [crates.aws-sdk-ram] category = 'AwsSdk' @@ -1788,7 +1788,7 @@ model_hash = '33137a772550764a4312631b5ad37b61e0232d622a5d0bca86b20efd5bb76105' category = 'AwsSdk' version = '1.45.0' source_hash = 'ca50e973270e24c6ad5a511a847b99b7d9eb3420173020d391ad37e140c7f0aa' -model_hash = 'cd7a16eaff3540600bdf4e31900f8fd740affe788413ba73a583e8c0655a5be7' +model_hash = '857c0fa4bd9e30ab22dcc354811d207a0876d0712db06b08c8fa4da73c5320d6' [crates.aws-sdk-rdsdata] category = 'AwsSdk' @@ -2094,7 +2094,7 @@ model_hash = '171cb2c324ef8098f094220d7fe04469ccaadb534fa5658d8b9d7a816252815a' category = 'AwsSdk' version = '1.36.0' source_hash = 'd17afcf2b54335b4aa613ae3c7abd094f82ea4c192224725d681d95cda8be6f8' -model_hash = '92306e8fde823c78a7036b4431a5d05369334e7c1506d40011671f5581f7cb94' +model_hash = 'bf653eadb796f2eeff0c0277d293bc0b970f6de5aaea4f73229d70a87f0acf57' [crates.aws-sdk-sqs] category = 'AwsSdk'