From af5e138e30569c92ebb19066db3aa973e04c4bc9 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Thu, 14 Nov 2024 19:24:46 +0000 Subject: [PATCH] Regenerated Clients --- .../41575353444b40ffbf474f4155544f00.json | 8 + .../721a8b70805944d88cd6eb7d5f9beb3e.json | 8 + .../79f9753ebaf842a090345a87e34867df.json | 8 + .../7c0eff41e8964eacabe842b42a4b8e7f.json | 8 + .../7e1f7499964f48b78442815ebd0be8f0.json | 8 + .../7f7b098998bc46baba3dbe5b46b54bb0.json | 8 + .../8eb4e33dafcf42749dfcd4e06b371279.json | 8 + .../9ac04271ab2747019c6052cfc12b3080.json | 8 + .../9d893c93ad634d3caa4b9825c05a134a.json | 8 + .../adb73e9adf3946938a6ca8e0c4e988de.json | 8 + .../ca37627cb25e4750ad4feec0def644ba.json | 8 + .../cae5b68ad5014c38870a74a3936cae13.json | 8 + .../d52d1baf1bcc46e29a1244f54caf2a50.json | 8 + .../f4d160769d804d809058ff0c87e8eaf5.json | 8 + .../accessanalyzer/api_op_CreateAnalyzer.go | 12 +- .../accessanalyzer/api_op_GetArchiveRule.go | 3 +- .../api_op_ListAnalyzedResources.go | 3 +- .../accessanalyzer/api_op_UpdateAnalyzer.go | 162 + service/accessanalyzer/deserializers.go | 351 + service/accessanalyzer/generated.json | 1 + service/accessanalyzer/serializers.go | 178 + .../snapshot/api_op_UpdateAnalyzer.go.snap | 41 + service/accessanalyzer/snapshot_test.go | 24 + service/accessanalyzer/types/enums.go | 2 + service/accessanalyzer/types/types.go | 54 +- service/accessanalyzer/validators.go | 39 + .../api_op_GetResourceRequestStatus.go | 4 + service/cloudcontrol/deserializers.go | 158 + service/cloudcontrol/endpoints.go | 2 +- service/cloudcontrol/types/enums.go | 32 +- service/cloudcontrol/types/types.go | 55 + service/deadline/deserializers.go | 129 + service/deadline/serializers.go | 58 + service/deadline/types/enums.go | 23 + service/deadline/types/types.go | 45 +- service/deadline/validators.go | 61 + service/iam/api_op_CreateLoginProfile.go | 22 +- service/iam/api_op_DeactivateMFADevice.go | 7 +- service/iam/api_op_DeleteLoginProfile.go | 10 +- ...eOrganizationsRootCredentialsManagement.go | 155 + ...api_op_DisableOrganizationsRootSessions.go | 155 + ...eOrganizationsRootCredentialsManagement.go | 166 + .../api_op_EnableOrganizationsRootSessions.go | 165 + service/iam/api_op_GetLoginProfile.go | 10 +- service/iam/api_op_ListAccountAliases.go | 4 +- .../iam/api_op_ListOrganizationsFeatures.go | 154 + service/iam/deserializers.go | 1567 +- service/iam/generated.json | 5 + service/iam/serializers.go | 365 + .../api_op_CreateLoginProfile.go.snap | 1 - .../api_op_DeleteLoginProfile.go.snap | 1 - ...nizationsRootCredentialsManagement.go.snap | 40 + ...p_DisableOrganizationsRootSessions.go.snap | 40 + ...nizationsRootCredentialsManagement.go.snap | 40 + ...op_EnableOrganizationsRootSessions.go.snap | 40 + .../snapshot/api_op_GetLoginProfile.go.snap | 1 - .../api_op_ListOrganizationsFeatures.go.snap | 40 + service/iam/snapshot_test.go | 120 + service/iam/types/enums.go | 21 + service/iam/types/errors.go | 146 + service/iam/validators.go | 123 - service/iotwireless/api_op_CreateFuotaTask.go | 5 + service/iotwireless/api_op_GetFuotaTask.go | 5 + .../api_op_GetLogLevelsByResourceTypes.go | 3 + .../iotwireless/api_op_GetResourceLogLevel.go | 6 +- .../iotwireless/api_op_PutResourceLogLevel.go | 3 +- .../api_op_ResetAllResourceLogLevels.go | 4 +- .../api_op_ResetResourceLogLevel.go | 6 +- service/iotwireless/api_op_UpdateFuotaTask.go | 5 + .../api_op_UpdateLogLevelsByResourceTypes.go | 3 + service/iotwireless/deserializers.go | 275 + service/iotwireless/serializers.go | 121 + service/iotwireless/types/enums.go | 38 + service/iotwireless/types/types.go | 71 + service/iotwireless/validators.go | 80 + service/ivs/api_op_CreateChannel.go | 10 + service/ivs/api_op_UpdateChannel.go | 10 + service/ivs/deserializers.go | 222 + service/ivs/serializers.go | 46 + service/ivs/types/enums.go | 59 + service/ivs/types/types.go | 145 +- .../api_op_AssociateUser.go | 12 +- .../api_op_CreateLicenseServerEndpoint.go | 174 + .../api_op_DeleteLicenseServerEndpoint.go | 163 + .../api_op_DeregisterIdentityProvider.go | 14 +- .../api_op_DisassociateUser.go | 23 +- .../api_op_ListIdentityProviders.go | 23 +- .../api_op_ListInstances.go | 21 +- .../api_op_ListLicenseServerEndpoints.go | 263 + .../api_op_ListProductSubscriptions.go | 29 +- .../api_op_ListTagsForResource.go | 156 + .../api_op_ListUserAssociations.go | 20 +- .../api_op_RegisterIdentityProvider.go | 8 +- .../api_op_StartProductSubscription.go | 9 +- .../api_op_StopProductSubscription.go | 17 +- .../api_op_TagResource.go | 157 + .../api_op_UntagResource.go | 158 + .../api_op_UpdateIdentityProviderSettings.go | 22 +- .../deserializers.go | 2383 ++- .../endpoints.go | 2 +- .../generated.json | 7 + .../serializers.go | 1074 +- ...api_op_CreateLicenseServerEndpoint.go.snap | 41 + ...api_op_DeleteLicenseServerEndpoint.go.snap | 41 + .../api_op_ListLicenseServerEndpoints.go.snap | 40 + .../api_op_ListTagsForResource.go.snap | 41 + .../snapshot/api_op_TagResource.go.snap | 41 + .../snapshot/api_op_UntagResource.go.snap | 41 + .../snapshot_test.go | 144 + .../types/enums.go | 100 + .../types/types.go | 229 +- .../types/types_exported_test.go | 36 + .../validators.go | 396 +- service/mq/internal/endpoints/endpoints.go | 3 + service/partnercentralselling/LICENSE.txt | 202 + service/partnercentralselling/api_client.go | 929 ++ .../partnercentralselling/api_client_test.go | 127 + .../api_op_AssignOpportunity.go | 181 + .../api_op_AssociateOpportunity.go | 217 + .../api_op_CreateOpportunity.go | 345 + .../api_op_DisassociateOpportunity.go | 211 + .../api_op_GetAwsOpportunitySummary.go | 229 + .../api_op_GetEngagementInvitation.go | 219 + .../api_op_GetOpportunity.go | 285 + .../api_op_ListEngagementInvitations.go | 288 + .../api_op_ListOpportunities.go | 328 + .../api_op_ListSolutions.go | 296 + .../api_op_RejectEngagementInvitation.go | 181 + ...tartEngagementByAcceptingInvitationTask.go | 245 + ...i_op_StartEngagementFromOpportunityTask.go | 244 + .../api_op_UpdateOpportunity.go | 273 + service/partnercentralselling/auth.go | 313 + .../partnercentralselling/deserializers.go | 6132 +++++++ service/partnercentralselling/doc.go | 53 + service/partnercentralselling/endpoints.go | 537 + .../endpoints_config_test.go | 139 + .../partnercentralselling/endpoints_test.go | 820 + service/partnercentralselling/generated.json | 47 + service/partnercentralselling/go.mod | 16 + service/partnercentralselling/go.sum | 2 + .../go_module_metadata.go | 6 + .../internal/endpoints/endpoints.go | 296 + .../internal/endpoints/endpoints_test.go | 11 + service/partnercentralselling/options.go | 236 + .../partnercentralselling/protocol_test.go | 3 + service/partnercentralselling/serializers.go | 2079 +++ .../snapshot/api_op_AssignOpportunity.go.snap | 41 + .../api_op_AssociateOpportunity.go.snap | 41 + .../snapshot/api_op_CreateOpportunity.go.snap | 42 + .../api_op_DisassociateOpportunity.go.snap | 41 + .../api_op_GetAwsOpportunitySummary.go.snap | 41 + .../api_op_GetEngagementInvitation.go.snap | 41 + .../snapshot/api_op_GetOpportunity.go.snap | 41 + .../api_op_ListEngagementInvitations.go.snap | 41 + .../snapshot/api_op_ListOpportunities.go.snap | 41 + .../snapshot/api_op_ListSolutions.go.snap | 41 + .../api_op_RejectEngagementInvitation.go.snap | 41 + ...ngagementByAcceptingInvitationTask.go.snap | 42 + ...StartEngagementFromOpportunityTask.go.snap | 42 + .../snapshot/api_op_UpdateOpportunity.go.snap | 41 + .../partnercentralselling/snapshot_test.go | 398 + service/partnercentralselling/types/enums.go | 1959 +++ service/partnercentralselling/types/errors.go | 227 + service/partnercentralselling/types/types.go | 1497 ++ .../types/types_exported_test.go | 44 + service/partnercentralselling/validators.go | 953 ++ service/quicksight/api_op_CreateBrand.go | 174 + .../api_op_CreateCustomPermissions.go | 175 + service/quicksight/api_op_DeleteBrand.go | 161 + .../api_op_DeleteBrandAssignment.go | 156 + .../api_op_DeleteCustomPermissions.go | 168 + .../api_op_DeleteUserCustomPermission.go | 170 + service/quicksight/api_op_DescribeBrand.go | 171 + .../api_op_DescribeBrandAssignment.go | 159 + .../api_op_DescribeBrandPublishedVersion.go | 168 + .../api_op_DescribeCustomPermissions.go | 169 + service/quicksight/api_op_ListBrands.go | 260 + .../api_op_ListCustomPermissions.go | 267 + service/quicksight/api_op_UpdateBrand.go | 171 + .../api_op_UpdateBrandAssignment.go | 164 + .../api_op_UpdateBrandPublishedVersion.go | 169 + .../api_op_UpdateCustomPermissions.go | 172 + .../api_op_UpdateUserCustomPermission.go | 175 + service/quicksight/deserializers.go | 13519 ++++++++++------ service/quicksight/generated.json | 17 + service/quicksight/serializers.go | 5618 ++++--- .../snapshot/api_op_CreateBrand.go.snap | 41 + .../api_op_CreateCustomPermissions.go.snap | 41 + .../snapshot/api_op_DeleteBrand.go.snap | 41 + .../api_op_DeleteBrandAssignment.go.snap | 41 + .../api_op_DeleteCustomPermissions.go.snap | 41 + .../api_op_DeleteUserCustomPermission.go.snap | 41 + .../snapshot/api_op_DescribeBrand.go.snap | 41 + .../api_op_DescribeBrandAssignment.go.snap | 41 + ...i_op_DescribeBrandPublishedVersion.go.snap | 41 + .../api_op_DescribeCustomPermissions.go.snap | 41 + .../snapshot/api_op_ListBrands.go.snap | 41 + .../api_op_ListCustomPermissions.go.snap | 41 + .../snapshot/api_op_UpdateBrand.go.snap | 41 + .../api_op_UpdateBrandAssignment.go.snap | 41 + ...api_op_UpdateBrandPublishedVersion.go.snap | 41 + .../api_op_UpdateCustomPermissions.go.snap | 41 + .../api_op_UpdateUserCustomPermission.go.snap | 41 + service/quicksight/snapshot_test.go | 408 + service/quicksight/types/enums.go | 63 + service/quicksight/types/errors.go | 26 + service/quicksight/types/types.go | 370 + .../quicksight/types/types_exported_test.go | 21 + service/quicksight/validators.go | 835 +- service/redshift/deserializers.go | 166 + service/redshift/serializers.go | 50 + service/redshift/types/types.go | 40 + service/redshift/types/types_exported_test.go | 22 + service/redshift/validators.go | 56 + service/s3/api_op_AbortMultipartUpload.go | 2 +- service/s3/api_op_ListBuckets.go | 12 + service/s3/api_op_ListDirectoryBuckets.go | 3 + service/s3/api_op_ListMultipartUploads.go | 2 +- service/sagemaker/types/enums.go | 352 +- service/sts/api_op_AssumeRole.go | 50 +- service/sts/api_op_AssumeRoleWithSAML.go | 12 +- .../sts/api_op_AssumeRoleWithWebIdentity.go | 48 +- service/sts/api_op_AssumeRoot.go | 221 + service/sts/api_op_GetFederationToken.go | 4 +- service/sts/api_op_GetSessionToken.go | 4 +- service/sts/deserializers.go | 170 + service/sts/generated.json | 1 + service/sts/serializers.go | 94 + .../sts/snapshot/api_op_AssumeRoot.go.snap | 41 + service/sts/snapshot_test.go | 24 + service/sts/types/errors.go | 8 +- service/sts/validators.go | 42 + 232 files changed, 51506 insertions(+), 7638 deletions(-) create mode 100644 .changelog/41575353444b40ffbf474f4155544f00.json create mode 100644 .changelog/721a8b70805944d88cd6eb7d5f9beb3e.json create mode 100644 .changelog/79f9753ebaf842a090345a87e34867df.json create mode 100644 .changelog/7c0eff41e8964eacabe842b42a4b8e7f.json create mode 100644 .changelog/7e1f7499964f48b78442815ebd0be8f0.json create mode 100644 .changelog/7f7b098998bc46baba3dbe5b46b54bb0.json create mode 100644 .changelog/8eb4e33dafcf42749dfcd4e06b371279.json create mode 100644 .changelog/9ac04271ab2747019c6052cfc12b3080.json create mode 100644 .changelog/9d893c93ad634d3caa4b9825c05a134a.json create mode 100644 .changelog/adb73e9adf3946938a6ca8e0c4e988de.json create mode 100644 .changelog/ca37627cb25e4750ad4feec0def644ba.json create mode 100644 .changelog/cae5b68ad5014c38870a74a3936cae13.json create mode 100644 .changelog/d52d1baf1bcc46e29a1244f54caf2a50.json create mode 100644 .changelog/f4d160769d804d809058ff0c87e8eaf5.json create mode 100644 service/accessanalyzer/api_op_UpdateAnalyzer.go create mode 100644 service/accessanalyzer/snapshot/api_op_UpdateAnalyzer.go.snap create mode 100644 service/iam/api_op_DisableOrganizationsRootCredentialsManagement.go create mode 100644 service/iam/api_op_DisableOrganizationsRootSessions.go create mode 100644 service/iam/api_op_EnableOrganizationsRootCredentialsManagement.go create mode 100644 service/iam/api_op_EnableOrganizationsRootSessions.go create mode 100644 service/iam/api_op_ListOrganizationsFeatures.go create mode 100644 service/iam/snapshot/api_op_DisableOrganizationsRootCredentialsManagement.go.snap create mode 100644 service/iam/snapshot/api_op_DisableOrganizationsRootSessions.go.snap create mode 100644 service/iam/snapshot/api_op_EnableOrganizationsRootCredentialsManagement.go.snap create mode 100644 service/iam/snapshot/api_op_EnableOrganizationsRootSessions.go.snap create mode 100644 service/iam/snapshot/api_op_ListOrganizationsFeatures.go.snap create mode 100644 service/licensemanagerusersubscriptions/api_op_CreateLicenseServerEndpoint.go create mode 100644 service/licensemanagerusersubscriptions/api_op_DeleteLicenseServerEndpoint.go create mode 100644 service/licensemanagerusersubscriptions/api_op_ListLicenseServerEndpoints.go create mode 100644 service/licensemanagerusersubscriptions/api_op_ListTagsForResource.go create mode 100644 service/licensemanagerusersubscriptions/api_op_TagResource.go create mode 100644 service/licensemanagerusersubscriptions/api_op_UntagResource.go create mode 100644 service/licensemanagerusersubscriptions/snapshot/api_op_CreateLicenseServerEndpoint.go.snap create mode 100644 service/licensemanagerusersubscriptions/snapshot/api_op_DeleteLicenseServerEndpoint.go.snap create mode 100644 service/licensemanagerusersubscriptions/snapshot/api_op_ListLicenseServerEndpoints.go.snap create mode 100644 service/licensemanagerusersubscriptions/snapshot/api_op_ListTagsForResource.go.snap create mode 100644 service/licensemanagerusersubscriptions/snapshot/api_op_TagResource.go.snap create mode 100644 service/licensemanagerusersubscriptions/snapshot/api_op_UntagResource.go.snap create mode 100644 service/licensemanagerusersubscriptions/types/enums.go create mode 100644 service/partnercentralselling/LICENSE.txt create mode 100644 service/partnercentralselling/api_client.go create mode 100644 service/partnercentralselling/api_client_test.go create mode 100644 service/partnercentralselling/api_op_AssignOpportunity.go create mode 100644 service/partnercentralselling/api_op_AssociateOpportunity.go create mode 100644 service/partnercentralselling/api_op_CreateOpportunity.go create mode 100644 service/partnercentralselling/api_op_DisassociateOpportunity.go create mode 100644 service/partnercentralselling/api_op_GetAwsOpportunitySummary.go create mode 100644 service/partnercentralselling/api_op_GetEngagementInvitation.go create mode 100644 service/partnercentralselling/api_op_GetOpportunity.go create mode 100644 service/partnercentralselling/api_op_ListEngagementInvitations.go create mode 100644 service/partnercentralselling/api_op_ListOpportunities.go create mode 100644 service/partnercentralselling/api_op_ListSolutions.go create mode 100644 service/partnercentralselling/api_op_RejectEngagementInvitation.go create mode 100644 service/partnercentralselling/api_op_StartEngagementByAcceptingInvitationTask.go create mode 100644 service/partnercentralselling/api_op_StartEngagementFromOpportunityTask.go create mode 100644 service/partnercentralselling/api_op_UpdateOpportunity.go create mode 100644 service/partnercentralselling/auth.go create mode 100644 service/partnercentralselling/deserializers.go create mode 100644 service/partnercentralselling/doc.go create mode 100644 service/partnercentralselling/endpoints.go create mode 100644 service/partnercentralselling/endpoints_config_test.go create mode 100644 service/partnercentralselling/endpoints_test.go create mode 100644 service/partnercentralselling/generated.json create mode 100644 service/partnercentralselling/go.mod create mode 100644 service/partnercentralselling/go.sum create mode 100644 service/partnercentralselling/go_module_metadata.go create mode 100644 service/partnercentralselling/internal/endpoints/endpoints.go create mode 100644 service/partnercentralselling/internal/endpoints/endpoints_test.go create mode 100644 service/partnercentralselling/options.go create mode 100644 service/partnercentralselling/protocol_test.go create mode 100644 service/partnercentralselling/serializers.go create mode 100644 service/partnercentralselling/snapshot/api_op_AssignOpportunity.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_AssociateOpportunity.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_CreateOpportunity.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_DisassociateOpportunity.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_GetAwsOpportunitySummary.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_GetEngagementInvitation.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_GetOpportunity.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_ListEngagementInvitations.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_ListOpportunities.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_ListSolutions.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_RejectEngagementInvitation.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_StartEngagementByAcceptingInvitationTask.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_StartEngagementFromOpportunityTask.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_UpdateOpportunity.go.snap create mode 100644 service/partnercentralselling/snapshot_test.go create mode 100644 service/partnercentralselling/types/enums.go create mode 100644 service/partnercentralselling/types/errors.go create mode 100644 service/partnercentralselling/types/types.go create mode 100644 service/partnercentralselling/types/types_exported_test.go create mode 100644 service/partnercentralselling/validators.go create mode 100644 service/quicksight/api_op_CreateBrand.go create mode 100644 service/quicksight/api_op_CreateCustomPermissions.go create mode 100644 service/quicksight/api_op_DeleteBrand.go create mode 100644 service/quicksight/api_op_DeleteBrandAssignment.go create mode 100644 service/quicksight/api_op_DeleteCustomPermissions.go create mode 100644 service/quicksight/api_op_DeleteUserCustomPermission.go create mode 100644 service/quicksight/api_op_DescribeBrand.go create mode 100644 service/quicksight/api_op_DescribeBrandAssignment.go create mode 100644 service/quicksight/api_op_DescribeBrandPublishedVersion.go create mode 100644 service/quicksight/api_op_DescribeCustomPermissions.go create mode 100644 service/quicksight/api_op_ListBrands.go create mode 100644 service/quicksight/api_op_ListCustomPermissions.go create mode 100644 service/quicksight/api_op_UpdateBrand.go create mode 100644 service/quicksight/api_op_UpdateBrandAssignment.go create mode 100644 service/quicksight/api_op_UpdateBrandPublishedVersion.go create mode 100644 service/quicksight/api_op_UpdateCustomPermissions.go create mode 100644 service/quicksight/api_op_UpdateUserCustomPermission.go create mode 100644 service/quicksight/snapshot/api_op_CreateBrand.go.snap create mode 100644 service/quicksight/snapshot/api_op_CreateCustomPermissions.go.snap create mode 100644 service/quicksight/snapshot/api_op_DeleteBrand.go.snap create mode 100644 service/quicksight/snapshot/api_op_DeleteBrandAssignment.go.snap create mode 100644 service/quicksight/snapshot/api_op_DeleteCustomPermissions.go.snap create mode 100644 service/quicksight/snapshot/api_op_DeleteUserCustomPermission.go.snap create mode 100644 service/quicksight/snapshot/api_op_DescribeBrand.go.snap create mode 100644 service/quicksight/snapshot/api_op_DescribeBrandAssignment.go.snap create mode 100644 service/quicksight/snapshot/api_op_DescribeBrandPublishedVersion.go.snap create mode 100644 service/quicksight/snapshot/api_op_DescribeCustomPermissions.go.snap create mode 100644 service/quicksight/snapshot/api_op_ListBrands.go.snap create mode 100644 service/quicksight/snapshot/api_op_ListCustomPermissions.go.snap create mode 100644 service/quicksight/snapshot/api_op_UpdateBrand.go.snap create mode 100644 service/quicksight/snapshot/api_op_UpdateBrandAssignment.go.snap create mode 100644 service/quicksight/snapshot/api_op_UpdateBrandPublishedVersion.go.snap create mode 100644 service/quicksight/snapshot/api_op_UpdateCustomPermissions.go.snap create mode 100644 service/quicksight/snapshot/api_op_UpdateUserCustomPermission.go.snap create mode 100644 service/sts/api_op_AssumeRoot.go create mode 100644 service/sts/snapshot/api_op_AssumeRoot.go.snap diff --git a/.changelog/41575353444b40ffbf474f4155544f00.json b/.changelog/41575353444b40ffbf474f4155544f00.json new file mode 100644 index 00000000000..102334aa2ad --- /dev/null +++ b/.changelog/41575353444b40ffbf474f4155544f00.json @@ -0,0 +1,8 @@ +{ + "id": "41575353-444b-40ff-bf47-4f4155544f00", + "type": "release", + "description": "New AWS service client module", + "modules": [ + "service/partnercentralselling" + ] +} \ No newline at end of file diff --git a/.changelog/721a8b70805944d88cd6eb7d5f9beb3e.json b/.changelog/721a8b70805944d88cd6eb7d5f9beb3e.json new file mode 100644 index 00000000000..7b3a77ae6e2 --- /dev/null +++ b/.changelog/721a8b70805944d88cd6eb7d5f9beb3e.json @@ -0,0 +1,8 @@ +{ + "id": "721a8b70-8059-44d8-8cd6-eb7d5f9beb3e", + "type": "feature", + "description": "Expand analyzer configuration capabilities for unused access analyzers. Unused access analyzer configurations now support the ability to exclude accounts and resource tags from analysis providing more granular control over the scope of analysis.", + "modules": [ + "service/accessanalyzer" + ] +} \ No newline at end of file diff --git a/.changelog/79f9753ebaf842a090345a87e34867df.json b/.changelog/79f9753ebaf842a090345a87e34867df.json new file mode 100644 index 00000000000..db4c383e80a --- /dev/null +++ b/.changelog/79f9753ebaf842a090345a87e34867df.json @@ -0,0 +1,8 @@ +{ + "id": "79f9753e-baf8-42a0-9034-5a87e34867df", + "type": "feature", + "description": "Add support for Neuron instance types [ trn1/trn1n/inf2 ] on SageMaker Notebook Instances Platform.", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/.changelog/7c0eff41e8964eacabe842b42a4b8e7f.json b/.changelog/7c0eff41e8964eacabe842b42a4b8e7f.json new file mode 100644 index 00000000000..9d3c8df59bc --- /dev/null +++ b/.changelog/7c0eff41e8964eacabe842b42a4b8e7f.json @@ -0,0 +1,8 @@ +{ + "id": "7c0eff41-e896-4eac-abe8-42b42a4b8e7f", + "type": "feature", + "description": "This release adds APIs for Custom Permissions management in QuickSight, and APIs to support QuickSight Branding.", + "modules": [ + "service/quicksight" + ] +} \ No newline at end of file diff --git a/.changelog/7e1f7499964f48b78442815ebd0be8f0.json b/.changelog/7e1f7499964f48b78442815ebd0be8f0.json new file mode 100644 index 00000000000..1b902afa49b --- /dev/null +++ b/.changelog/7e1f7499964f48b78442815ebd0be8f0.json @@ -0,0 +1,8 @@ +{ + "id": "7e1f7499-964f-48b7-8442-815ebd0be8f0", + "type": "feature", + "description": "Adds support for Amazon Redshift S3AccessGrants", + "modules": [ + "service/redshift" + ] +} \ No newline at end of file diff --git a/.changelog/7f7b098998bc46baba3dbe5b46b54bb0.json b/.changelog/7f7b098998bc46baba3dbe5b46b54bb0.json new file mode 100644 index 00000000000..42fab34c9c5 --- /dev/null +++ b/.changelog/7f7b098998bc46baba3dbe5b46b54bb0.json @@ -0,0 +1,8 @@ +{ + "id": "7f7b0989-98bc-46ba-ba3d-be5b46b54bb0", + "type": "feature", + "description": "Added support for CloudFormation Hooks with Cloud Control API. The GetResourceRequestStatus API response now includes an optional HooksProgressEvent and HooksRequestToken parameter for Hooks Invocation Progress as part of resource operation with Cloud Control.", + "modules": [ + "service/cloudcontrol" + ] +} \ No newline at end of file diff --git a/.changelog/8eb4e33dafcf42749dfcd4e06b371279.json b/.changelog/8eb4e33dafcf42749dfcd4e06b371279.json new file mode 100644 index 00000000000..2643bc6ef51 --- /dev/null +++ b/.changelog/8eb4e33dafcf42749dfcd4e06b371279.json @@ -0,0 +1,8 @@ +{ + "id": "8eb4e33d-afcf-4274-9dfc-d4e06b371279", + "type": "feature", + "description": "New and updated API operations to support License Included User-based Subscription of Microsoft Remote Desktop Services (RDS).", + "modules": [ + "service/licensemanagerusersubscriptions" + ] +} \ No newline at end of file diff --git a/.changelog/9ac04271ab2747019c6052cfc12b3080.json b/.changelog/9ac04271ab2747019c6052cfc12b3080.json new file mode 100644 index 00000000000..2b4cdde82e2 --- /dev/null +++ b/.changelog/9ac04271ab2747019c6052cfc12b3080.json @@ -0,0 +1,8 @@ +{ + "id": "9ac04271-ab27-4701-9c60-52cfc12b3080", + "type": "feature", + "description": "Adds support for select GPU accelerated instance types when creating new service-managed fleets.", + "modules": [ + "service/deadline" + ] +} \ No newline at end of file diff --git a/.changelog/9d893c93ad634d3caa4b9825c05a134a.json b/.changelog/9d893c93ad634d3caa4b9825c05a134a.json new file mode 100644 index 00000000000..15aac1e41b8 --- /dev/null +++ b/.changelog/9d893c93ad634d3caa4b9825c05a134a.json @@ -0,0 +1,8 @@ +{ + "id": "9d893c93-ad63-4d3c-aa4b-9825c05a134a", + "type": "feature", + "description": "Announcing AWS Partner Central API for Selling: This service launch Introduces new APIs for co-selling opportunity management and related functions. Key features include notifications, a dynamic sandbox for testing, and streamlined validations.", + "modules": [ + "service/partnercentralselling" + ] +} \ No newline at end of file diff --git a/.changelog/adb73e9adf3946938a6ca8e0c4e988de.json b/.changelog/adb73e9adf3946938a6ca8e0c4e988de.json new file mode 100644 index 00000000000..bbe68a3a2fb --- /dev/null +++ b/.changelog/adb73e9adf3946938a6ca8e0c4e988de.json @@ -0,0 +1,8 @@ +{ + "id": "adb73e9a-df39-4693-8a6c-a8e0c4e988de", + "type": "feature", + "description": "This release introduces the new API 'AssumeRoot', which returns short-term credentials that you can use to perform privileged tasks.", + "modules": [ + "service/sts" + ] +} \ No newline at end of file diff --git a/.changelog/ca37627cb25e4750ad4feec0def644ba.json b/.changelog/ca37627cb25e4750ad4feec0def644ba.json new file mode 100644 index 00000000000..319b32f0b68 --- /dev/null +++ b/.changelog/ca37627cb25e4750ad4feec0def644ba.json @@ -0,0 +1,8 @@ +{ + "id": "ca37627c-b25e-4750-ad4f-eec0def644ba", + "type": "feature", + "description": "IVS now offers customers the ability to stream multitrack video to Channels.", + "modules": [ + "service/ivs" + ] +} \ No newline at end of file diff --git a/.changelog/cae5b68ad5014c38870a74a3936cae13.json b/.changelog/cae5b68ad5014c38870a74a3936cae13.json new file mode 100644 index 00000000000..7fb559638b2 --- /dev/null +++ b/.changelog/cae5b68ad5014c38870a74a3936cae13.json @@ -0,0 +1,8 @@ +{ + "id": "cae5b68a-d501-4c38-870a-74a3936cae13", + "type": "feature", + "description": "This release includes support for five new APIs and changes to existing APIs that give AWS Organizations customers the ability to use temporary root credentials, targeted to member accounts in the organization.", + "modules": [ + "service/iam" + ] +} \ No newline at end of file diff --git a/.changelog/d52d1baf1bcc46e29a1244f54caf2a50.json b/.changelog/d52d1baf1bcc46e29a1244f54caf2a50.json new file mode 100644 index 00000000000..a38c2aace1a --- /dev/null +++ b/.changelog/d52d1baf1bcc46e29a1244f54caf2a50.json @@ -0,0 +1,8 @@ +{ + "id": "d52d1baf-1bcc-46e2-9a12-44f54caf2a50", + "type": "feature", + "description": "New FuotaTask resource type to enable logging for your FUOTA tasks. A ParticipatingGatewaysforMulticast parameter to choose the list of gateways to receive the multicast downlink message and the transmission interval between them. Descriptor field which will be sent to devices during FUOTA transfer.", + "modules": [ + "service/iotwireless" + ] +} \ No newline at end of file diff --git a/.changelog/f4d160769d804d809058ff0c87e8eaf5.json b/.changelog/f4d160769d804d809058ff0c87e8eaf5.json new file mode 100644 index 00000000000..8f19089e363 --- /dev/null +++ b/.changelog/f4d160769d804d809058ff0c87e8eaf5.json @@ -0,0 +1,8 @@ +{ + "id": "f4d16076-9d80-4d80-9058-ff0c87e8eaf5", + "type": "feature", + "description": "This release updates the ListBuckets API Reference documentation in support of the new 10,000 general purpose bucket default quota on all AWS accounts. To increase your bucket quota from 10,000 to up to 1 million buckets, simply request a quota increase via Service Quotas.", + "modules": [ + "service/s3" + ] +} \ No newline at end of file diff --git a/service/accessanalyzer/api_op_CreateAnalyzer.go b/service/accessanalyzer/api_op_CreateAnalyzer.go index 65b5d1b389b..69231f977ce 100644 --- a/service/accessanalyzer/api_op_CreateAnalyzer.go +++ b/service/accessanalyzer/api_op_CreateAnalyzer.go @@ -52,11 +52,17 @@ type CreateAnalyzerInput struct { // Specifies the configuration of the analyzer. If the analyzer is an unused // access analyzer, the specified scope of unused access is used for the - // configuration. If the analyzer is an external access analyzer, this field is not - // used. + // configuration. Configuration types.AnalyzerConfiguration - // An array of key-value pairs to apply to the analyzer. + // An array of key-value pairs to apply to the analyzer. You can use the set of + // Unicode letters, digits, whitespace, _ , . , / , = , + , and - . + // + // For the tag key, you can specify a value that is 1 to 128 characters in length + // and cannot be prefixed with aws: . + // + // For the tag value, you can specify a value that is 0 to 256 characters in + // length. Tags map[string]string noSmithyDocumentSerde diff --git a/service/accessanalyzer/api_op_GetArchiveRule.go b/service/accessanalyzer/api_op_GetArchiveRule.go index 0de146b8580..dcb9a61ffca 100644 --- a/service/accessanalyzer/api_op_GetArchiveRule.go +++ b/service/accessanalyzer/api_op_GetArchiveRule.go @@ -51,7 +51,8 @@ type GetArchiveRuleInput struct { // The response to the request. type GetArchiveRuleOutput struct { - // Contains information about an archive rule. + // Contains information about an archive rule. Archive rules automatically archive + // new findings that meet the criteria you define when you create the rule. // // This member is required. ArchiveRule *types.ArchiveRuleSummary diff --git a/service/accessanalyzer/api_op_ListAnalyzedResources.go b/service/accessanalyzer/api_op_ListAnalyzedResources.go index 1b9f0a92bde..d806f2451dd 100644 --- a/service/accessanalyzer/api_op_ListAnalyzedResources.go +++ b/service/accessanalyzer/api_op_ListAnalyzedResources.go @@ -12,8 +12,7 @@ import ( ) // Retrieves a list of resources of the specified type that have been analyzed by -// the specified external access analyzer. This action is not supported for unused -// access analyzers. +// the specified analyzer. func (c *Client) ListAnalyzedResources(ctx context.Context, params *ListAnalyzedResourcesInput, optFns ...func(*Options)) (*ListAnalyzedResourcesOutput, error) { if params == nil { params = &ListAnalyzedResourcesInput{} diff --git a/service/accessanalyzer/api_op_UpdateAnalyzer.go b/service/accessanalyzer/api_op_UpdateAnalyzer.go new file mode 100644 index 00000000000..60d15c12595 --- /dev/null +++ b/service/accessanalyzer/api_op_UpdateAnalyzer.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package accessanalyzer + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/accessanalyzer/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Modifies the configuration of an existing analyzer. +func (c *Client) UpdateAnalyzer(ctx context.Context, params *UpdateAnalyzerInput, optFns ...func(*Options)) (*UpdateAnalyzerOutput, error) { + if params == nil { + params = &UpdateAnalyzerInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateAnalyzer", params, optFns, c.addOperationUpdateAnalyzerMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateAnalyzerOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateAnalyzerInput struct { + + // The name of the analyzer to modify. + // + // This member is required. + AnalyzerName *string + + // Contains information about the configuration of an analyzer for an Amazon Web + // Services organization or account. + Configuration types.AnalyzerConfiguration + + noSmithyDocumentSerde +} + +type UpdateAnalyzerOutput struct { + + // Contains information about the configuration of an analyzer for an Amazon Web + // Services organization or account. + Configuration types.AnalyzerConfiguration + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateAnalyzerMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateAnalyzer{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateAnalyzer{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateAnalyzer"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpUpdateAnalyzerValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAnalyzer(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateAnalyzer(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateAnalyzer", + } +} diff --git a/service/accessanalyzer/deserializers.go b/service/accessanalyzer/deserializers.go index 7a5bc1ebc8e..cf414e6a656 100644 --- a/service/accessanalyzer/deserializers.go +++ b/service/accessanalyzer/deserializers.go @@ -5072,6 +5072,173 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } +type awsRestjson1_deserializeOpUpdateAnalyzer struct { +} + +func (*awsRestjson1_deserializeOpUpdateAnalyzer) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateAnalyzer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAnalyzer(response, &metadata) + } + output := &UpdateAnalyzerOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateAnalyzerOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateAnalyzer(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateAnalyzerOutput(v **UpdateAnalyzerOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateAnalyzerOutput + if *v == nil { + sv = &UpdateAnalyzerOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "configuration": + if err := awsRestjson1_deserializeDocumentAnalyzerConfiguration(&sv.Configuration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpUpdateArchiveRule struct { } @@ -6286,6 +6453,42 @@ func awsRestjson1_deserializeDocumentAccessPreviewSummary(v **types.AccessPrevie return nil } +func awsRestjson1_deserializeDocumentAccountIdsList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentAclGrantee(v *types.AclGrantee, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6376,6 +6579,117 @@ func awsRestjson1_deserializeDocumentActionList(v *[]string, value interface{}) return nil } +func awsRestjson1_deserializeDocumentAnalysisRule(v **types.AnalysisRule, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AnalysisRule + if *v == nil { + sv = &types.AnalysisRule{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "exclusions": + if err := awsRestjson1_deserializeDocumentAnalysisRuleCriteriaList(&sv.Exclusions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAnalysisRuleCriteria(v **types.AnalysisRuleCriteria, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AnalysisRuleCriteria + if *v == nil { + sv = &types.AnalysisRuleCriteria{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountIds": + if err := awsRestjson1_deserializeDocumentAccountIdsList(&sv.AccountIds, value); err != nil { + return err + } + + case "resourceTags": + if err := awsRestjson1_deserializeDocumentTagsList(&sv.ResourceTags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAnalysisRuleCriteriaList(v *[]types.AnalysisRuleCriteria, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AnalysisRuleCriteria + if *v == nil { + cv = []types.AnalysisRuleCriteria{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AnalysisRuleCriteria + destAddr := &col + if err := awsRestjson1_deserializeDocumentAnalysisRuleCriteria(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentAnalyzedResource(v **types.AnalyzedResource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10965,6 +11279,38 @@ func awsRestjson1_deserializeDocumentSubstring(v **types.Substring, value interf return nil } +func awsRestjson1_deserializeDocumentTagsList(v *[]map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []map[string]string + if *v == nil { + cv = []map[string]string{} + } else { + cv = *v + } + + for _, value := range shape { + var col map[string]string + if err := awsRestjson1_deserializeDocumentTagsMap(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentTagsMap(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11204,6 +11550,11 @@ func awsRestjson1_deserializeDocumentUnusedAccessConfiguration(v **types.UnusedA for key, value := range shape { switch key { + case "analysisRule": + if err := awsRestjson1_deserializeDocumentAnalysisRule(&sv.AnalysisRule, value); err != nil { + return err + } + case "unusedAccessAge": if value != nil { jtv, ok := value.(json.Number) diff --git a/service/accessanalyzer/generated.json b/service/accessanalyzer/generated.json index 039771874ce..39bc7d46aaf 100644 --- a/service/accessanalyzer/generated.json +++ b/service/accessanalyzer/generated.json @@ -40,6 +40,7 @@ "api_op_StartResourceScan.go", "api_op_TagResource.go", "api_op_UntagResource.go", + "api_op_UpdateAnalyzer.go", "api_op_UpdateArchiveRule.go", "api_op_UpdateFindings.go", "api_op_ValidatePolicy.go", diff --git a/service/accessanalyzer/serializers.go b/service/accessanalyzer/serializers.go index 38aa54af9d2..bf753f0c3eb 100644 --- a/service/accessanalyzer/serializers.go +++ b/service/accessanalyzer/serializers.go @@ -2757,6 +2757,102 @@ func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInpu return nil } +type awsRestjson1_serializeOpUpdateAnalyzer struct { +} + +func (*awsRestjson1_serializeOpUpdateAnalyzer) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateAnalyzer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateAnalyzerInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/analyzer/{analyzerName}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateAnalyzerInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateAnalyzerInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateAnalyzerInput(v *UpdateAnalyzerInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AnalyzerName == nil || len(*v.AnalyzerName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member analyzerName must not be empty")} + } + if v.AnalyzerName != nil { + if err := encoder.SetURI("analyzerName").String(*v.AnalyzerName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateAnalyzerInput(v *UpdateAnalyzerInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Configuration != nil { + ok := object.Key("configuration") + if err := awsRestjson1_serializeDocumentAnalyzerConfiguration(v.Configuration, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpUpdateArchiveRule struct { } @@ -3112,6 +3208,17 @@ func awsRestjson1_serializeDocumentAccessList(v []types.Access, value smithyjson return nil } +func awsRestjson1_serializeDocumentAccountIdsList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentAclGrantee(v types.AclGrantee, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3143,6 +3250,54 @@ func awsRestjson1_serializeDocumentActionsList(v []string, value smithyjson.Valu return nil } +func awsRestjson1_serializeDocumentAnalysisRule(v *types.AnalysisRule, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Exclusions != nil { + ok := object.Key("exclusions") + if err := awsRestjson1_serializeDocumentAnalysisRuleCriteriaList(v.Exclusions, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentAnalysisRuleCriteria(v *types.AnalysisRuleCriteria, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountIds != nil { + ok := object.Key("accountIds") + if err := awsRestjson1_serializeDocumentAccountIdsList(v.AccountIds, ok); err != nil { + return err + } + } + + if v.ResourceTags != nil { + ok := object.Key("resourceTags") + if err := awsRestjson1_serializeDocumentTagsList(v.ResourceTags, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentAnalysisRuleCriteriaList(v []types.AnalysisRuleCriteria, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentAnalysisRuleCriteria(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentAnalyzerConfiguration(v types.AnalyzerConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4009,6 +4164,22 @@ func awsRestjson1_serializeDocumentSqsQueueConfiguration(v *types.SqsQueueConfig return nil } +func awsRestjson1_serializeDocumentTagsList(v []map[string]string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if vv := v[i]; vv == nil { + continue + } + if err := awsRestjson1_serializeDocumentTagsMap(v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentTagsMap(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4061,6 +4232,13 @@ func awsRestjson1_serializeDocumentUnusedAccessConfiguration(v *types.UnusedAcce object := value.Object() defer object.Close() + if v.AnalysisRule != nil { + ok := object.Key("analysisRule") + if err := awsRestjson1_serializeDocumentAnalysisRule(v.AnalysisRule, ok); err != nil { + return err + } + } + if v.UnusedAccessAge != nil { ok := object.Key("unusedAccessAge") ok.Integer(*v.UnusedAccessAge) diff --git a/service/accessanalyzer/snapshot/api_op_UpdateAnalyzer.go.snap b/service/accessanalyzer/snapshot/api_op_UpdateAnalyzer.go.snap new file mode 100644 index 00000000000..dad960ea368 --- /dev/null +++ b/service/accessanalyzer/snapshot/api_op_UpdateAnalyzer.go.snap @@ -0,0 +1,41 @@ +UpdateAnalyzer + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/accessanalyzer/snapshot_test.go b/service/accessanalyzer/snapshot_test.go index b263759fbb4..bf448956d73 100644 --- a/service/accessanalyzer/snapshot_test.go +++ b/service/accessanalyzer/snapshot_test.go @@ -446,6 +446,18 @@ func TestCheckSnapshot_UntagResource(t *testing.T) { } } +func TestCheckSnapshot_UpdateAnalyzer(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateAnalyzer(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateAnalyzer") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateArchiveRule(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateArchiveRule(context.Background(), nil, func(o *Options) { @@ -865,6 +877,18 @@ func TestUpdateSnapshot_UntagResource(t *testing.T) { } } +func TestUpdateSnapshot_UpdateAnalyzer(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateAnalyzer(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateAnalyzer") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateArchiveRule(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateArchiveRule(context.Background(), nil, func(o *Options) { diff --git a/service/accessanalyzer/types/enums.go b/service/accessanalyzer/types/enums.go index fa6f887f472..de9b3d7cf48 100644 --- a/service/accessanalyzer/types/enums.go +++ b/service/accessanalyzer/types/enums.go @@ -595,6 +595,7 @@ const ( ResourceTypeAwsS3expressDirectorybucket ResourceType = "AWS::S3Express::DirectoryBucket" ResourceTypeAwsDynamodbTable ResourceType = "AWS::DynamoDB::Table" ResourceTypeAwsDynamodbStream ResourceType = "AWS::DynamoDB::Stream" + ResourceTypeAwsIamUser ResourceType = "AWS::IAM::User" ) // Values returns all known values for ResourceType. Note that this can be @@ -619,6 +620,7 @@ func (ResourceType) Values() []ResourceType { "AWS::S3Express::DirectoryBucket", "AWS::DynamoDB::Table", "AWS::DynamoDB::Stream", + "AWS::IAM::User", } } diff --git a/service/accessanalyzer/types/types.go b/service/accessanalyzer/types/types.go index 8b2b6e90b3b..34b0e1fd101 100644 --- a/service/accessanalyzer/types/types.go +++ b/service/accessanalyzer/types/types.go @@ -244,6 +244,43 @@ type AclGranteeMemberUri struct { func (*AclGranteeMemberUri) isAclGrantee() {} +// Contains information about analysis rules for the analyzer. Analysis rules +// determine which entities will generate findings based on the criteria you define +// when you create the rule. +type AnalysisRule struct { + + // A list of rules for the analyzer containing criteria to exclude from analysis. + // Entities that meet the rule criteria will not generate findings. + Exclusions []AnalysisRuleCriteria + + noSmithyDocumentSerde +} + +// The criteria for an analysis rule for an analyzer. The criteria determine which +// entities will generate findings. +type AnalysisRuleCriteria struct { + + // A list of Amazon Web Services account IDs to apply to the analysis rule + // criteria. The accounts cannot include the organization analyzer owner account. + // Account IDs can only be applied to the analysis rule criteria for + // organization-level analyzers. The list cannot include more than 2,000 account + // IDs. + AccountIds []string + + // An array of key-value pairs to match for your resources. You can use the set of + // Unicode letters, digits, whitespace, _ , . , / , = , + , and - . + // + // For the tag key, you can specify a value that is 1 to 128 characters in length + // and cannot be prefixed with aws: . + // + // For the tag value, you can specify a value that is 0 to 256 characters in + // length. If the specified tag value is 0 characters, the rule is applied to all + // principals with the specified tag key. + ResourceTags []map[string]string + + noSmithyDocumentSerde +} + // Contains details about the analyzed resource. type AnalyzedResource struct { @@ -321,8 +358,8 @@ type AnalyzedResourceSummary struct { noSmithyDocumentSerde } -// Contains information about the configuration of an unused access analyzer for -// an Amazon Web Services organization or account. +// Contains information about the configuration of an analyzer for an Amazon Web +// Services organization or account. // // The following types satisfy this interface: // @@ -332,8 +369,7 @@ type AnalyzerConfiguration interface { } // Specifies the configuration of an unused access analyzer for an Amazon Web -// Services organization or account. External access analyzers do not support any -// configuration. +// Services organization or account. type AnalyzerConfigurationMemberUnusedAccess struct { Value UnusedAccessConfiguration @@ -398,7 +434,8 @@ type AnalyzerSummary struct { noSmithyDocumentSerde } -// Contains information about an archive rule. +// Contains information about an archive rule. Archive rules automatically archive +// new findings that meet the criteria you define when you create the rule. type ArchiveRuleSummary struct { // The time at which the archive rule was created. @@ -1999,11 +2036,16 @@ type TrailProperties struct { // Contains information about an unused access analyzer. type UnusedAccessConfiguration struct { + // Contains information about analysis rules for the analyzer. Analysis rules + // determine which entities will generate findings based on the criteria you define + // when you create the rule. + AnalysisRule *AnalysisRule + // The specified access age in days for which to generate findings for unused // access. For example, if you specify 90 days, the analyzer will generate findings // for IAM entities within the accounts of the selected organization for any access // that hasn't been used in 90 or more days since the analyzer's last scan. You can - // choose a value between 1 and 180 days. + // choose a value between 1 and 365 days. UnusedAccessAge *int32 noSmithyDocumentSerde diff --git a/service/accessanalyzer/validators.go b/service/accessanalyzer/validators.go index c273f11b044..d3a13e0d48c 100644 --- a/service/accessanalyzer/validators.go +++ b/service/accessanalyzer/validators.go @@ -610,6 +610,26 @@ func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpUpdateAnalyzer struct { +} + +func (*validateOpUpdateAnalyzer) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateAnalyzer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateAnalyzerInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateAnalyzerInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateArchiveRule struct { } @@ -790,6 +810,10 @@ func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } +func addOpUpdateAnalyzerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateAnalyzer{}, middleware.After) +} + func addOpUpdateArchiveRuleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateArchiveRule{}, middleware.After) } @@ -1693,6 +1717,21 @@ func validateOpUntagResourceInput(v *UntagResourceInput) error { } } +func validateOpUpdateAnalyzerInput(v *UpdateAnalyzerInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateAnalyzerInput"} + if v.AnalyzerName == nil { + invalidParams.Add(smithy.NewErrParamRequired("AnalyzerName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateArchiveRuleInput(v *UpdateArchiveRuleInput) error { if v == nil { return nil diff --git a/service/cloudcontrol/api_op_GetResourceRequestStatus.go b/service/cloudcontrol/api_op_GetResourceRequestStatus.go index afd590295cb..e21de822cf7 100644 --- a/service/cloudcontrol/api_op_GetResourceRequestStatus.go +++ b/service/cloudcontrol/api_op_GetResourceRequestStatus.go @@ -49,6 +49,10 @@ type GetResourceRequestStatusInput struct { type GetResourceRequestStatusOutput struct { + // Lists Hook invocations for the specified target in the request. This is a list + // since the same target can invoke multiple Hooks. + HooksProgressEvent []types.HookProgressEvent + // Represents the current status of the resource operation request. ProgressEvent *types.ProgressEvent diff --git a/service/cloudcontrol/deserializers.go b/service/cloudcontrol/deserializers.go index ae362df1963..ff0bf11b03c 100644 --- a/service/cloudcontrol/deserializers.go +++ b/service/cloudcontrol/deserializers.go @@ -2190,6 +2190,150 @@ func awsAwsjson10_deserializeDocumentHandlerInternalFailureException(v **types.H return nil } +func awsAwsjson10_deserializeDocumentHookProgressEvent(v **types.HookProgressEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.HookProgressEvent + if *v == nil { + sv = &types.HookProgressEvent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FailureMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HookFailureMode to be of type string, got %T instead", value) + } + sv.FailureMode = ptr.String(jtv) + } + + case "HookEventTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.HookEventTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "HookStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HookStatus to be of type string, got %T instead", value) + } + sv.HookStatus = ptr.String(jtv) + } + + case "HookStatusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) + } + sv.HookStatusMessage = ptr.String(jtv) + } + + case "HookTypeArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HookTypeArn to be of type string, got %T instead", value) + } + sv.HookTypeArn = ptr.String(jtv) + } + + case "HookTypeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TypeName to be of type string, got %T instead", value) + } + sv.HookTypeName = ptr.String(jtv) + } + + case "HookTypeVersionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TypeVersionId to be of type string, got %T instead", value) + } + sv.HookTypeVersionId = ptr.String(jtv) + } + + case "InvocationPoint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HookInvocationPoint to be of type string, got %T instead", value) + } + sv.InvocationPoint = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentHooksProgressEvent(v *[]types.HookProgressEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.HookProgressEvent + if *v == nil { + cv = []types.HookProgressEvent{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.HookProgressEvent + destAddr := &col + if err := awsAwsjson10_deserializeDocumentHookProgressEvent(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson10_deserializeDocumentInvalidCredentialsException(v **types.InvalidCredentialsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2477,6 +2621,15 @@ func awsAwsjson10_deserializeDocumentProgressEvent(v **types.ProgressEvent, valu } } + case "HooksRequestToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RequestToken to be of type string, got %T instead", value) + } + sv.HooksRequestToken = ptr.String(jtv) + } + case "Identifier": if value != nil { jtv, ok := value.(string) @@ -3177,6 +3330,11 @@ func awsAwsjson10_deserializeOpDocumentGetResourceRequestStatusOutput(v **GetRes for key, value := range shape { switch key { + case "HooksProgressEvent": + if err := awsAwsjson10_deserializeDocumentHooksProgressEvent(&sv.HooksProgressEvent, value); err != nil { + return err + } + case "ProgressEvent": if err := awsAwsjson10_deserializeDocumentProgressEvent(&sv.ProgressEvent, value); err != nil { return err diff --git a/service/cloudcontrol/endpoints.go b/service/cloudcontrol/endpoints.go index 2755b0dbb08..797242c6242 100644 --- a/service/cloudcontrol/endpoints.go +++ b/service/cloudcontrol/endpoints.go @@ -385,7 +385,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://cloudcontrolapi-fips.") diff --git a/service/cloudcontrol/types/enums.go b/service/cloudcontrol/types/enums.go index d7e8058c539..1fc5b38fb97 100644 --- a/service/cloudcontrol/types/enums.go +++ b/service/cloudcontrol/types/enums.go @@ -6,21 +6,22 @@ type HandlerErrorCode string // Enum values for HandlerErrorCode const ( - HandlerErrorCodeNotUpdatable HandlerErrorCode = "NotUpdatable" - HandlerErrorCodeInvalidRequest HandlerErrorCode = "InvalidRequest" - HandlerErrorCodeAccessDenied HandlerErrorCode = "AccessDenied" - HandlerErrorCodeInvalidCredentials HandlerErrorCode = "InvalidCredentials" - HandlerErrorCodeAlreadyExists HandlerErrorCode = "AlreadyExists" - HandlerErrorCodeNotFound HandlerErrorCode = "NotFound" - HandlerErrorCodeResourceConflict HandlerErrorCode = "ResourceConflict" - HandlerErrorCodeThrottling HandlerErrorCode = "Throttling" - HandlerErrorCodeServiceLimitExceeded HandlerErrorCode = "ServiceLimitExceeded" - HandlerErrorCodeNotStabilized HandlerErrorCode = "NotStabilized" - HandlerErrorCodeGeneralServiceException HandlerErrorCode = "GeneralServiceException" - HandlerErrorCodeServiceInternalError HandlerErrorCode = "ServiceInternalError" - HandlerErrorCodeServiceTimeout HandlerErrorCode = "ServiceTimeout" - HandlerErrorCodeNetworkFailure HandlerErrorCode = "NetworkFailure" - HandlerErrorCodeInternalFailure HandlerErrorCode = "InternalFailure" + HandlerErrorCodeNotUpdatable HandlerErrorCode = "NotUpdatable" + HandlerErrorCodeInvalidRequest HandlerErrorCode = "InvalidRequest" + HandlerErrorCodeAccessDenied HandlerErrorCode = "AccessDenied" + HandlerErrorCodeUnauthorizedTaggingOperation HandlerErrorCode = "UnauthorizedTaggingOperation" + HandlerErrorCodeInvalidCredentials HandlerErrorCode = "InvalidCredentials" + HandlerErrorCodeAlreadyExists HandlerErrorCode = "AlreadyExists" + HandlerErrorCodeNotFound HandlerErrorCode = "NotFound" + HandlerErrorCodeResourceConflict HandlerErrorCode = "ResourceConflict" + HandlerErrorCodeThrottling HandlerErrorCode = "Throttling" + HandlerErrorCodeServiceLimitExceeded HandlerErrorCode = "ServiceLimitExceeded" + HandlerErrorCodeNotStabilized HandlerErrorCode = "NotStabilized" + HandlerErrorCodeGeneralServiceException HandlerErrorCode = "GeneralServiceException" + HandlerErrorCodeServiceInternalError HandlerErrorCode = "ServiceInternalError" + HandlerErrorCodeServiceTimeout HandlerErrorCode = "ServiceTimeout" + HandlerErrorCodeNetworkFailure HandlerErrorCode = "NetworkFailure" + HandlerErrorCodeInternalFailure HandlerErrorCode = "InternalFailure" ) // Values returns all known values for HandlerErrorCode. Note that this can be @@ -32,6 +33,7 @@ func (HandlerErrorCode) Values() []HandlerErrorCode { "NotUpdatable", "InvalidRequest", "AccessDenied", + "UnauthorizedTaggingOperation", "InvalidCredentials", "AlreadyExists", "NotFound", diff --git a/service/cloudcontrol/types/types.go b/service/cloudcontrol/types/types.go index aaf4dd38688..76e4935627b 100644 --- a/service/cloudcontrol/types/types.go +++ b/service/cloudcontrol/types/types.go @@ -7,6 +7,58 @@ import ( "time" ) +// Represents the current status of applicable Hooks for a resource operation +// request. It contains list of Hook invocation information for the resource +// specified in the request since the same target can invoke multiple Hooks. For +// more information, see [Managing resource operation requests with Amazon Web Services Cloud Control API]. +// +// [Managing resource operation requests with Amazon Web Services Cloud Control API]: https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-manage-requests.html +type HookProgressEvent struct { + + // The failure mode of the invocation. The following are the potential statuses: + // + // - FAIL : This will fail the Hook invocation and the request associated with it. + // + // - WARN : This will fail the Hook invocation, but not the request associated + // with it. + FailureMode *string + + // The time that the Hook invocation request initiated. + HookEventTime *time.Time + + // The status of the Hook invocation. The following are potential statuses: + // + // - HOOK_PENDING : The Hook was added to the invocation plan, but not yet + // invoked. + // + // - HOOK_IN_PROGRESS : The Hook was invoked, but hasn't completed. + // + // - HOOK_COMPLETE_SUCCEEDED : The Hook invocation is complete with a successful + // result. + // + // - HOOK_COMPLETE_FAILED : The Hook invocation is complete with a failed result. + // + // - HOOK_FAILED : The Hook invocation didn't complete successfully. + HookStatus *string + + // The message explaining the current Hook status. + HookStatusMessage *string + + // The ARN of the Hook being invoked. + HookTypeArn *string + + // The type name of the Hook being invoked. + HookTypeName *string + + // The type version of the Hook being invoked. + HookTypeVersionId *string + + // States whether the Hook is invoked before or after resource provisioning. + InvocationPoint *string + + noSmithyDocumentSerde +} + // Represents the current status of a resource operation request. For more // information, see [Managing resource operation requests]in the Amazon Web Services Cloud Control API User Guide. // @@ -24,6 +76,9 @@ type ProgressEvent struct { // When the resource operation request was initiated. EventTime *time.Time + // The unique token representing the Hooks operation for the request. + HooksRequestToken *string + // The primary identifier for the resource. // // In some cases, the resource identifier may be available before the resource diff --git a/service/deadline/deserializers.go b/service/deadline/deserializers.go index f25f55f0210..337d73114ea 100644 --- a/service/deadline/deserializers.go +++ b/service/deadline/deserializers.go @@ -17193,6 +17193,47 @@ func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Respo return output } +func awsRestjson1_deserializeDocumentAcceleratorCapabilities(v **types.AcceleratorCapabilities, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AcceleratorCapabilities + if *v == nil { + sv = &types.AcceleratorCapabilities{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "count": + if err := awsRestjson1_deserializeDocumentAcceleratorCountRange(&sv.Count, value); err != nil { + return err + } + + case "selections": + if err := awsRestjson1_deserializeDocumentAcceleratorSelections(&sv.Selections, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentAcceleratorCountRange(v **types.AcceleratorCountRange, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -17250,6 +17291,89 @@ func awsRestjson1_deserializeDocumentAcceleratorCountRange(v **types.Accelerator return nil } +func awsRestjson1_deserializeDocumentAcceleratorSelection(v **types.AcceleratorSelection, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AcceleratorSelection + if *v == nil { + sv = &types.AcceleratorSelection{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AcceleratorName to be of type string, got %T instead", value) + } + sv.Name = types.AcceleratorName(jtv) + } + + case "runtime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AcceleratorRuntime to be of type string, got %T instead", value) + } + sv.Runtime = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAcceleratorSelections(v *[]types.AcceleratorSelection, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AcceleratorSelection + if *v == nil { + cv = []types.AcceleratorSelection{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AcceleratorSelection + destAddr := &col + if err := awsRestjson1_deserializeDocumentAcceleratorSelection(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentAcceleratorTotalMemoryMiBRange(v **types.AcceleratorTotalMemoryMiBRange, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -23533,6 +23657,11 @@ func awsRestjson1_deserializeDocumentServiceManagedEc2InstanceCapabilities(v **t for key, value := range shape { switch key { + case "acceleratorCapabilities": + if err := awsRestjson1_deserializeDocumentAcceleratorCapabilities(&sv.AcceleratorCapabilities, value); err != nil { + return err + } + case "allowedInstanceTypes": if err := awsRestjson1_deserializeDocumentInstanceTypes(&sv.AllowedInstanceTypes, value); err != nil { return err diff --git a/service/deadline/serializers.go b/service/deadline/serializers.go index ef1b99a4d36..ffb06b7a234 100644 --- a/service/deadline/serializers.go +++ b/service/deadline/serializers.go @@ -10244,6 +10244,27 @@ func awsRestjson1_serializeOpDocumentUpdateWorkerScheduleInput(v *UpdateWorkerSc return nil } +func awsRestjson1_serializeDocumentAcceleratorCapabilities(v *types.AcceleratorCapabilities, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Count != nil { + ok := object.Key("count") + if err := awsRestjson1_serializeDocumentAcceleratorCountRange(v.Count, ok); err != nil { + return err + } + } + + if v.Selections != nil { + ok := object.Key("selections") + if err := awsRestjson1_serializeDocumentAcceleratorSelections(v.Selections, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentAcceleratorCountRange(v *types.AcceleratorCountRange, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -10261,6 +10282,36 @@ func awsRestjson1_serializeDocumentAcceleratorCountRange(v *types.AcceleratorCou return nil } +func awsRestjson1_serializeDocumentAcceleratorSelection(v *types.AcceleratorSelection, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Name) > 0 { + ok := object.Key("name") + ok.String(string(v.Name)) + } + + if v.Runtime != nil { + ok := object.Key("runtime") + ok.String(*v.Runtime) + } + + return nil +} + +func awsRestjson1_serializeDocumentAcceleratorSelections(v []types.AcceleratorSelection, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentAcceleratorSelection(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentAcceleratorTotalMemoryMiBRange(v *types.AcceleratorTotalMemoryMiBRange, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -11369,6 +11420,13 @@ func awsRestjson1_serializeDocumentServiceManagedEc2InstanceCapabilities(v *type object := value.Object() defer object.Close() + if v.AcceleratorCapabilities != nil { + ok := object.Key("acceleratorCapabilities") + if err := awsRestjson1_serializeDocumentAcceleratorCapabilities(v.AcceleratorCapabilities, ok); err != nil { + return err + } + } + if v.AllowedInstanceTypes != nil { ok := object.Key("allowedInstanceTypes") if err := awsRestjson1_serializeDocumentInstanceTypes(v.AllowedInstanceTypes, ok); err != nil { diff --git a/service/deadline/types/enums.go b/service/deadline/types/enums.go index 9b709cb977d..0d14e83dc6d 100644 --- a/service/deadline/types/enums.go +++ b/service/deadline/types/enums.go @@ -2,6 +2,29 @@ package types +type AcceleratorName string + +// Enum values for AcceleratorName +const ( + AcceleratorNameT4 AcceleratorName = "t4" + AcceleratorNameA10g AcceleratorName = "a10g" + AcceleratorNameL4 AcceleratorName = "l4" + AcceleratorNameL40s AcceleratorName = "l40s" +) + +// Values returns all known values for AcceleratorName. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AcceleratorName) Values() []AcceleratorName { + return []AcceleratorName{ + "t4", + "a10g", + "l4", + "l40s", + } +} + type AcceleratorType string // Enum values for AcceleratorType diff --git a/service/deadline/types/types.go b/service/deadline/types/types.go index c93a29ab642..9247bfebdf1 100644 --- a/service/deadline/types/types.go +++ b/service/deadline/types/types.go @@ -8,20 +8,54 @@ import ( "time" ) +// Provides information about the GPU accelerators and drivers for the instance +// types in a fleet. If you include the acceleratorCapabilities property in the [ServiceManagedEc2InstanceCapabilities] +// object, all of the Amazon EC2 instances will have at least one accelerator. +// +// [ServiceManagedEc2InstanceCapabilities]: https://docs.aws.amazon.com/deadline-cloud/latest/APIReference/API_ServiceManagedEc2InstanceCapabilities +type AcceleratorCapabilities struct { + + // A list of objects that contain the GPU name of the accelerator and driver for + // the instance types that support the accelerator. + // + // This member is required. + Selections []AcceleratorSelection + + // The number of GPUs on each worker. The default is 1. + Count *AcceleratorCountRange + + noSmithyDocumentSerde +} + // The range for the GPU fleet acceleration. type AcceleratorCountRange struct { - // The minimum GPU for the accelerator. + // The minimum number of GPUs for the accelerator. If you set the value to 0, a + // worker will still have 1 GPU. // // This member is required. Min *int32 - // The maximum GPU for the accelerator. + // The maximum number of GPUs for the accelerator. Max *int32 noSmithyDocumentSerde } +// Values that you can use to select a particular Amazon EC2 instance type. +type AcceleratorSelection struct { + + // The name of the GPU accelerator. + // + // This member is required. + Name AcceleratorName + + // The driver version that the GPU accelerator uses. + Runtime *string + + noSmithyDocumentSerde +} + // The range for memory, in MiB, to use for the accelerator. type AcceleratorTotalMemoryMiBRange struct { @@ -2116,6 +2150,13 @@ type ServiceManagedEc2InstanceCapabilities struct { // This member is required. VCpuCount *VCpuCountRange + // The GPU accelerator capabilities required for the Amazon EC2 instances. If you + // include the acceleratorCapabilities property in the [ServiceManagedEc2InstanceCapabilities] object, all of the Amazon + // EC2 instances will have at least one accelerator. + // + // [ServiceManagedEc2InstanceCapabilities]: https://docs.aws.amazon.com/deadline-cloud/latest/APIReference/API_ServiceManagedEc2InstanceCapabilities + AcceleratorCapabilities *AcceleratorCapabilities + // The allowable Amazon EC2 instance types. AllowedInstanceTypes []string diff --git a/service/deadline/validators.go b/service/deadline/validators.go index 319192d168b..25258771167 100644 --- a/service/deadline/validators.go +++ b/service/deadline/validators.go @@ -2386,6 +2386,30 @@ func addOpUpdateWorkerScheduleValidationMiddleware(stack *middleware.Stack) erro return stack.Initialize.Add(&validateOpUpdateWorkerSchedule{}, middleware.After) } +func validateAcceleratorCapabilities(v *types.AcceleratorCapabilities) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AcceleratorCapabilities"} + if v.Selections == nil { + invalidParams.Add(smithy.NewErrParamRequired("Selections")) + } else if v.Selections != nil { + if err := validateAcceleratorSelections(v.Selections); err != nil { + invalidParams.AddNested("Selections", err.(smithy.InvalidParamsError)) + } + } + if v.Count != nil { + if err := validateAcceleratorCountRange(v.Count); err != nil { + invalidParams.AddNested("Count", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateAcceleratorCountRange(v *types.AcceleratorCountRange) error { if v == nil { return nil @@ -2401,6 +2425,38 @@ func validateAcceleratorCountRange(v *types.AcceleratorCountRange) error { } } +func validateAcceleratorSelection(v *types.AcceleratorSelection) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AcceleratorSelection"} + if len(v.Name) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAcceleratorSelections(v []types.AcceleratorSelection) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AcceleratorSelections"} + for i := range v { + if err := validateAcceleratorSelection(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateAcceleratorTotalMemoryMiBRange(v *types.AcceleratorTotalMemoryMiBRange) error { if v == nil { return nil @@ -3244,6 +3300,11 @@ func validateServiceManagedEc2InstanceCapabilities(v *types.ServiceManagedEc2Ins if len(v.CpuArchitectureType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("CpuArchitectureType")) } + if v.AcceleratorCapabilities != nil { + if err := validateAcceleratorCapabilities(v.AcceleratorCapabilities); err != nil { + invalidParams.AddNested("AcceleratorCapabilities", err.(smithy.InvalidParamsError)) + } + } if v.CustomAmounts != nil { if err := validateCustomFleetAmountCapabilities(v.CustomAmounts); err != nil { invalidParams.AddNested("CustomAmounts", err.(smithy.InvalidParamsError)) diff --git a/service/iam/api_op_CreateLoginProfile.go b/service/iam/api_op_CreateLoginProfile.go index 10228a0a0d8..63c5ed26209 100644 --- a/service/iam/api_op_CreateLoginProfile.go +++ b/service/iam/api_op_CreateLoginProfile.go @@ -42,6 +42,9 @@ type CreateLoginProfileInput struct { // The new password for the user. // + // This parameter must be omitted when you make the request with an [AssumeRoot] session. It + // is required in all other cases. + // // The [regex pattern] that is used to validate this parameter is a string of characters. That // string can include almost any printable ASCII character from the space ( \u0020 // ) through the end of the ASCII character range ( \u00FF ). You can also include @@ -51,25 +54,27 @@ type CreateLoginProfileInput struct { // ability to type certain characters because they have special meaning within that // tool. // + // [AssumeRoot]: https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoot.html // [regex pattern]: http://wikipedia.org/wiki/regex - // - // This member is required. Password *string + // Specifies whether the user is required to set a new password on next sign-in. + PasswordResetRequired bool + // The name of the IAM user to create a password for. The user must already exist. // + // This parameter is optional. If no user name is included, it defaults to the + // principal making the request. When you make this request with root user + // credentials, you must use an [AssumeRoot]session to omit the user name. + // // This parameter allows (through its [regex pattern]) a string of characters consisting of upper // and lowercase alphanumeric characters with no spaces. You can also include any // of the following characters: _+=,.@- // + // [AssumeRoot]: https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoot.html // [regex pattern]: http://wikipedia.org/wiki/regex - // - // This member is required. UserName *string - // Specifies whether the user is required to set a new password on next sign-in. - PasswordResetRequired bool - noSmithyDocumentSerde } @@ -151,9 +156,6 @@ func (c *Client) addOperationCreateLoginProfileMiddlewares(stack *middleware.Sta if err = addUserAgentRetryMode(stack, options); err != nil { return err } - if err = addOpCreateLoginProfileValidationMiddleware(stack); err != nil { - return err - } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLoginProfile(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iam/api_op_DeactivateMFADevice.go b/service/iam/api_op_DeactivateMFADevice.go index 4e0a893de72..f675e534120 100644 --- a/service/iam/api_op_DeactivateMFADevice.go +++ b/service/iam/api_op_DeactivateMFADevice.go @@ -48,13 +48,16 @@ type DeactivateMFADeviceInput struct { // The name of the user whose MFA device you want to deactivate. // + // This parameter is optional. If no user name is included, it defaults to the + // principal making the request. When you make this request with root user + // credentials, you must use an [AssumeRoot]session to omit the user name. + // // This parameter allows (through its [regex pattern]) a string of characters consisting of upper // and lowercase alphanumeric characters with no spaces. You can also include any // of the following characters: _+=,.@- // + // [AssumeRoot]: https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoot.html // [regex pattern]: http://wikipedia.org/wiki/regex - // - // This member is required. UserName *string noSmithyDocumentSerde diff --git a/service/iam/api_op_DeleteLoginProfile.go b/service/iam/api_op_DeleteLoginProfile.go index aabc6c083f8..f7c45ce4730 100644 --- a/service/iam/api_op_DeleteLoginProfile.go +++ b/service/iam/api_op_DeleteLoginProfile.go @@ -42,13 +42,16 @@ type DeleteLoginProfileInput struct { // The name of the user whose password you want to delete. // + // This parameter is optional. If no user name is included, it defaults to the + // principal making the request. When you make this request with root user + // credentials, you must use an [AssumeRoot]session to omit the user name. + // // This parameter allows (through its [regex pattern]) a string of characters consisting of upper // and lowercase alphanumeric characters with no spaces. You can also include any // of the following characters: _+=,.@- // + // [AssumeRoot]: https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoot.html // [regex pattern]: http://wikipedia.org/wiki/regex - // - // This member is required. UserName *string noSmithyDocumentSerde @@ -125,9 +128,6 @@ func (c *Client) addOperationDeleteLoginProfileMiddlewares(stack *middleware.Sta if err = addUserAgentRetryMode(stack, options); err != nil { return err } - if err = addOpDeleteLoginProfileValidationMiddleware(stack); err != nil { - return err - } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLoginProfile(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iam/api_op_DisableOrganizationsRootCredentialsManagement.go b/service/iam/api_op_DisableOrganizationsRootCredentialsManagement.go new file mode 100644 index 00000000000..5b24e78d53c --- /dev/null +++ b/service/iam/api_op_DisableOrganizationsRootCredentialsManagement.go @@ -0,0 +1,155 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Disables the management of privileged root user credentials across member +// accounts in your organization. When you disable this feature, the management +// account and the delegated admininstrator for IAM can no longer manage root user +// credentials for member accounts in your organization. +func (c *Client) DisableOrganizationsRootCredentialsManagement(ctx context.Context, params *DisableOrganizationsRootCredentialsManagementInput, optFns ...func(*Options)) (*DisableOrganizationsRootCredentialsManagementOutput, error) { + if params == nil { + params = &DisableOrganizationsRootCredentialsManagementInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DisableOrganizationsRootCredentialsManagement", params, optFns, c.addOperationDisableOrganizationsRootCredentialsManagementMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DisableOrganizationsRootCredentialsManagementOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DisableOrganizationsRootCredentialsManagementInput struct { + noSmithyDocumentSerde +} + +type DisableOrganizationsRootCredentialsManagementOutput struct { + + // The features enabled for centralized root access for member accounts in your + // organization. + EnabledFeatures []types.FeatureType + + // The unique identifier (ID) of an organization. + OrganizationId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDisableOrganizationsRootCredentialsManagementMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDisableOrganizationsRootCredentialsManagement{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDisableOrganizationsRootCredentialsManagement{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DisableOrganizationsRootCredentialsManagement"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableOrganizationsRootCredentialsManagement(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDisableOrganizationsRootCredentialsManagement(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DisableOrganizationsRootCredentialsManagement", + } +} diff --git a/service/iam/api_op_DisableOrganizationsRootSessions.go b/service/iam/api_op_DisableOrganizationsRootSessions.go new file mode 100644 index 00000000000..b0015fee6b1 --- /dev/null +++ b/service/iam/api_op_DisableOrganizationsRootSessions.go @@ -0,0 +1,155 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Disables root user sessions for privileged tasks across member accounts in your +// organization. When you disable this feature, the management account and the +// delegated admininstrator for IAM can no longer perform privileged tasks on +// member accounts in your organization. +func (c *Client) DisableOrganizationsRootSessions(ctx context.Context, params *DisableOrganizationsRootSessionsInput, optFns ...func(*Options)) (*DisableOrganizationsRootSessionsOutput, error) { + if params == nil { + params = &DisableOrganizationsRootSessionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DisableOrganizationsRootSessions", params, optFns, c.addOperationDisableOrganizationsRootSessionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DisableOrganizationsRootSessionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DisableOrganizationsRootSessionsInput struct { + noSmithyDocumentSerde +} + +type DisableOrganizationsRootSessionsOutput struct { + + // The features you have enabled for centralized root access of member accounts in + // your organization. + EnabledFeatures []types.FeatureType + + // The unique identifier (ID) of an organization. + OrganizationId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDisableOrganizationsRootSessionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDisableOrganizationsRootSessions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDisableOrganizationsRootSessions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DisableOrganizationsRootSessions"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableOrganizationsRootSessions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDisableOrganizationsRootSessions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DisableOrganizationsRootSessions", + } +} diff --git a/service/iam/api_op_EnableOrganizationsRootCredentialsManagement.go b/service/iam/api_op_EnableOrganizationsRootCredentialsManagement.go new file mode 100644 index 00000000000..d414fa214d0 --- /dev/null +++ b/service/iam/api_op_EnableOrganizationsRootCredentialsManagement.go @@ -0,0 +1,166 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Enables the management of privileged root user credentials across member +// accounts in your organization. When you enable root credentials management for [centralized root access] +// , the management account and the delegated admininstrator for IAM can manage +// root user credentials for member accounts in your organization. +// +// Before you enable centralized root access, you must have an account configured +// with the following settings: +// +// - You must manage your Amazon Web Services accounts in [Organizations]. +// +// - Enable trusted access for Identity and Access Management in Organizations. +// For details, see [IAM and Organizations]in the Organizations User Guide. +// +// [Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html +// [centralized root access]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html#id_root-user-access-management +// [IAM and Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/services-that-can-integrate-ra.html +func (c *Client) EnableOrganizationsRootCredentialsManagement(ctx context.Context, params *EnableOrganizationsRootCredentialsManagementInput, optFns ...func(*Options)) (*EnableOrganizationsRootCredentialsManagementOutput, error) { + if params == nil { + params = &EnableOrganizationsRootCredentialsManagementInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "EnableOrganizationsRootCredentialsManagement", params, optFns, c.addOperationEnableOrganizationsRootCredentialsManagementMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*EnableOrganizationsRootCredentialsManagementOutput) + out.ResultMetadata = metadata + return out, nil +} + +type EnableOrganizationsRootCredentialsManagementInput struct { + noSmithyDocumentSerde +} + +type EnableOrganizationsRootCredentialsManagementOutput struct { + + // The features you have enabled for centralized root access. + EnabledFeatures []types.FeatureType + + // The unique identifier (ID) of an organization. + OrganizationId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationEnableOrganizationsRootCredentialsManagementMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpEnableOrganizationsRootCredentialsManagement{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpEnableOrganizationsRootCredentialsManagement{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "EnableOrganizationsRootCredentialsManagement"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableOrganizationsRootCredentialsManagement(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opEnableOrganizationsRootCredentialsManagement(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "EnableOrganizationsRootCredentialsManagement", + } +} diff --git a/service/iam/api_op_EnableOrganizationsRootSessions.go b/service/iam/api_op_EnableOrganizationsRootSessions.go new file mode 100644 index 00000000000..07aacb0cdd0 --- /dev/null +++ b/service/iam/api_op_EnableOrganizationsRootSessions.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Allows the management account or delegated administrator to perform privileged +// tasks on member accounts in your organization. For more information, see [Centrally manage root access for member accounts]in the +// Identity and Access Management User Guide. +// +// Before you enable this feature, you must have an account configured with the +// following settings: +// +// - You must manage your Amazon Web Services accounts in [Organizations]. +// +// - Enable trusted access for Identity and Access Management in Organizations. +// For details, see [IAM and Organizations]in the Organizations User Guide. +// +// [Centrally manage root access for member accounts]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html#id_root-user-access-management +// [Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html +// [IAM and Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/services-that-can-integrate-ra.html +func (c *Client) EnableOrganizationsRootSessions(ctx context.Context, params *EnableOrganizationsRootSessionsInput, optFns ...func(*Options)) (*EnableOrganizationsRootSessionsOutput, error) { + if params == nil { + params = &EnableOrganizationsRootSessionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "EnableOrganizationsRootSessions", params, optFns, c.addOperationEnableOrganizationsRootSessionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*EnableOrganizationsRootSessionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type EnableOrganizationsRootSessionsInput struct { + noSmithyDocumentSerde +} + +type EnableOrganizationsRootSessionsOutput struct { + + // The features you have enabled for centralized root access. + EnabledFeatures []types.FeatureType + + // The unique identifier (ID) of an organization. + OrganizationId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationEnableOrganizationsRootSessionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpEnableOrganizationsRootSessions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpEnableOrganizationsRootSessions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "EnableOrganizationsRootSessions"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableOrganizationsRootSessions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opEnableOrganizationsRootSessions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "EnableOrganizationsRootSessions", + } +} diff --git a/service/iam/api_op_GetLoginProfile.go b/service/iam/api_op_GetLoginProfile.go index 51d78685b5c..4e16bb622d7 100644 --- a/service/iam/api_op_GetLoginProfile.go +++ b/service/iam/api_op_GetLoginProfile.go @@ -43,13 +43,16 @@ type GetLoginProfileInput struct { // The name of the user whose login profile you want to retrieve. // + // This parameter is optional. If no user name is included, it defaults to the + // principal making the request. When you make this request with root user + // credentials, you must use an [AssumeRoot]session to omit the user name. + // // This parameter allows (through its [regex pattern]) a string of characters consisting of upper // and lowercase alphanumeric characters with no spaces. You can also include any // of the following characters: _+=,.@- // + // [AssumeRoot]: https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoot.html // [regex pattern]: http://wikipedia.org/wiki/regex - // - // This member is required. UserName *string noSmithyDocumentSerde @@ -133,9 +136,6 @@ func (c *Client) addOperationGetLoginProfileMiddlewares(stack *middleware.Stack, if err = addUserAgentRetryMode(stack, options); err != nil { return err } - if err = addOpGetLoginProfileValidationMiddleware(stack); err != nil { - return err - } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLoginProfile(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iam/api_op_ListAccountAliases.go b/service/iam/api_op_ListAccountAliases.go index a65d49f20a0..28b0b9787b8 100644 --- a/service/iam/api_op_ListAccountAliases.go +++ b/service/iam/api_op_ListAccountAliases.go @@ -12,9 +12,9 @@ import ( // Lists the account alias associated with the Amazon Web Services account (Note: // you can have only one). For information about using an Amazon Web Services -// account alias, see [Creating, deleting, and listing an Amazon Web Services account alias]in the IAM User Guide. +// account alias, see [Creating, deleting, and listing an Amazon Web Services account alias]in the Amazon Web Services Sign-In User Guide. // -// [Creating, deleting, and listing an Amazon Web Services account alias]: https://docs.aws.amazon.com/IAM/latest/UserGuide/console_account-alias.html#CreateAccountAlias +// [Creating, deleting, and listing an Amazon Web Services account alias]: https://docs.aws.amazon.com/signin/latest/userguide/CreateAccountAlias.html func (c *Client) ListAccountAliases(ctx context.Context, params *ListAccountAliasesInput, optFns ...func(*Options)) (*ListAccountAliasesOutput, error) { if params == nil { params = &ListAccountAliasesInput{} diff --git a/service/iam/api_op_ListOrganizationsFeatures.go b/service/iam/api_op_ListOrganizationsFeatures.go new file mode 100644 index 00000000000..43d139733fd --- /dev/null +++ b/service/iam/api_op_ListOrganizationsFeatures.go @@ -0,0 +1,154 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iam + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/iam/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the centralized root access features enabled for your organization. For +// more information, see [Centrally manage root access for member accounts]. +// +// [Centrally manage root access for member accounts]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html#id_root-user-access-management +func (c *Client) ListOrganizationsFeatures(ctx context.Context, params *ListOrganizationsFeaturesInput, optFns ...func(*Options)) (*ListOrganizationsFeaturesOutput, error) { + if params == nil { + params = &ListOrganizationsFeaturesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListOrganizationsFeatures", params, optFns, c.addOperationListOrganizationsFeaturesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListOrganizationsFeaturesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListOrganizationsFeaturesInput struct { + noSmithyDocumentSerde +} + +type ListOrganizationsFeaturesOutput struct { + + // Specifies the features that are currently available in your organization. + EnabledFeatures []types.FeatureType + + // The unique identifier (ID) of an organization. + OrganizationId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListOrganizationsFeaturesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpListOrganizationsFeatures{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListOrganizationsFeatures{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListOrganizationsFeatures"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOrganizationsFeatures(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListOrganizationsFeatures(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListOrganizationsFeatures", + } +} diff --git a/service/iam/deserializers.go b/service/iam/deserializers.go index 7532c0e1922..8d836acd105 100644 --- a/service/iam/deserializers.go +++ b/service/iam/deserializers.go @@ -4682,14 +4682,475 @@ func awsAwsquery_deserializeOpErrorDetachUserPolicy(response *smithyhttp.Respons } } +type awsAwsquery_deserializeOpDisableOrganizationsRootCredentialsManagement struct { +} + +func (*awsAwsquery_deserializeOpDisableOrganizationsRootCredentialsManagement) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDisableOrganizationsRootCredentialsManagement) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsquery_deserializeOpErrorDisableOrganizationsRootCredentialsManagement(response, &metadata) + } + output := &DisableOrganizationsRootCredentialsManagementOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("DisableOrganizationsRootCredentialsManagementResult") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentDisableOrganizationsRootCredentialsManagementOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDisableOrganizationsRootCredentialsManagement(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccountNotManagementOrDelegatedAdministratorException", errorCode): + return awsAwsquery_deserializeErrorAccountNotManagementOrDelegatedAdministratorException(response, errorBody) + + case strings.EqualFold("OrganizationNotFoundException", errorCode): + return awsAwsquery_deserializeErrorOrganizationNotFoundException(response, errorBody) + + case strings.EqualFold("OrganizationNotInAllFeaturesModeException", errorCode): + return awsAwsquery_deserializeErrorOrganizationNotInAllFeaturesModeException(response, errorBody) + + case strings.EqualFold("ServiceAccessNotEnabledException", errorCode): + return awsAwsquery_deserializeErrorServiceAccessNotEnabledException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpDisableOrganizationsRootSessions struct { +} + +func (*awsAwsquery_deserializeOpDisableOrganizationsRootSessions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDisableOrganizationsRootSessions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsquery_deserializeOpErrorDisableOrganizationsRootSessions(response, &metadata) + } + output := &DisableOrganizationsRootSessionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("DisableOrganizationsRootSessionsResult") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentDisableOrganizationsRootSessionsOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDisableOrganizationsRootSessions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccountNotManagementOrDelegatedAdministratorException", errorCode): + return awsAwsquery_deserializeErrorAccountNotManagementOrDelegatedAdministratorException(response, errorBody) + + case strings.EqualFold("OrganizationNotFoundException", errorCode): + return awsAwsquery_deserializeErrorOrganizationNotFoundException(response, errorBody) + + case strings.EqualFold("OrganizationNotInAllFeaturesModeException", errorCode): + return awsAwsquery_deserializeErrorOrganizationNotInAllFeaturesModeException(response, errorBody) + + case strings.EqualFold("ServiceAccessNotEnabledException", errorCode): + return awsAwsquery_deserializeErrorServiceAccessNotEnabledException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsquery_deserializeOpEnableMFADevice struct { } -func (*awsAwsquery_deserializeOpEnableMFADevice) ID() string { +func (*awsAwsquery_deserializeOpEnableMFADevice) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpEnableMFADevice) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsquery_deserializeOpErrorEnableMFADevice(response, &metadata) + } + output := &EnableMFADeviceOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorEnableMFADevice(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ConcurrentModification", errorCode): + return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("EntityAlreadyExists", errorCode): + return awsAwsquery_deserializeErrorEntityAlreadyExistsException(response, errorBody) + + case strings.EqualFold("EntityTemporarilyUnmodifiable", errorCode): + return awsAwsquery_deserializeErrorEntityTemporarilyUnmodifiableException(response, errorBody) + + case strings.EqualFold("InvalidAuthenticationCode", errorCode): + return awsAwsquery_deserializeErrorInvalidAuthenticationCodeException(response, errorBody) + + case strings.EqualFold("LimitExceeded", errorCode): + return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NoSuchEntity", errorCode): + return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + + case strings.EqualFold("ServiceFailure", errorCode): + return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpEnableOrganizationsRootCredentialsManagement struct { +} + +func (*awsAwsquery_deserializeOpEnableOrganizationsRootCredentialsManagement) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpEnableOrganizationsRootCredentialsManagement) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsquery_deserializeOpErrorEnableOrganizationsRootCredentialsManagement(response, &metadata) + } + output := &EnableOrganizationsRootCredentialsManagementOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("EnableOrganizationsRootCredentialsManagementResult") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentEnableOrganizationsRootCredentialsManagementOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorEnableOrganizationsRootCredentialsManagement(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccountNotManagementOrDelegatedAdministratorException", errorCode): + return awsAwsquery_deserializeErrorAccountNotManagementOrDelegatedAdministratorException(response, errorBody) + + case strings.EqualFold("CallerIsNotManagementAccountException", errorCode): + return awsAwsquery_deserializeErrorCallerIsNotManagementAccountException(response, errorBody) + + case strings.EqualFold("OrganizationNotFoundException", errorCode): + return awsAwsquery_deserializeErrorOrganizationNotFoundException(response, errorBody) + + case strings.EqualFold("OrganizationNotInAllFeaturesModeException", errorCode): + return awsAwsquery_deserializeErrorOrganizationNotInAllFeaturesModeException(response, errorBody) + + case strings.EqualFold("ServiceAccessNotEnabledException", errorCode): + return awsAwsquery_deserializeErrorServiceAccessNotEnabledException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpEnableOrganizationsRootSessions struct { +} + +func (*awsAwsquery_deserializeOpEnableOrganizationsRootSessions) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpEnableMFADevice) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpEnableOrganizationsRootSessions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4707,21 +5168,56 @@ func (m *awsAwsquery_deserializeOpEnableMFADevice) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorEnableMFADevice(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorEnableOrganizationsRootSessions(response, &metadata) } - output := &EnableMFADeviceOutput{} + output := &EnableOrganizationsRootSessionsOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("EnableOrganizationsRootSessionsResult") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentEnableOrganizationsRootSessionsOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } + return out, metadata, err } return out, metadata, err } -func awsAwsquery_deserializeOpErrorEnableMFADevice(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorEnableOrganizationsRootSessions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4746,26 +5242,20 @@ func awsAwsquery_deserializeOpErrorEnableMFADevice(response *smithyhttp.Response } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("ConcurrentModification", errorCode): - return awsAwsquery_deserializeErrorConcurrentModificationException(response, errorBody) - - case strings.EqualFold("EntityAlreadyExists", errorCode): - return awsAwsquery_deserializeErrorEntityAlreadyExistsException(response, errorBody) - - case strings.EqualFold("EntityTemporarilyUnmodifiable", errorCode): - return awsAwsquery_deserializeErrorEntityTemporarilyUnmodifiableException(response, errorBody) + case strings.EqualFold("AccountNotManagementOrDelegatedAdministratorException", errorCode): + return awsAwsquery_deserializeErrorAccountNotManagementOrDelegatedAdministratorException(response, errorBody) - case strings.EqualFold("InvalidAuthenticationCode", errorCode): - return awsAwsquery_deserializeErrorInvalidAuthenticationCodeException(response, errorBody) + case strings.EqualFold("CallerIsNotManagementAccountException", errorCode): + return awsAwsquery_deserializeErrorCallerIsNotManagementAccountException(response, errorBody) - case strings.EqualFold("LimitExceeded", errorCode): - return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("OrganizationNotFoundException", errorCode): + return awsAwsquery_deserializeErrorOrganizationNotFoundException(response, errorBody) - case strings.EqualFold("NoSuchEntity", errorCode): - return awsAwsquery_deserializeErrorNoSuchEntityException(response, errorBody) + case strings.EqualFold("OrganizationNotInAllFeaturesModeException", errorCode): + return awsAwsquery_deserializeErrorOrganizationNotInAllFeaturesModeException(response, errorBody) - case strings.EqualFold("ServiceFailure", errorCode): - return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) + case strings.EqualFold("ServiceAccessNotEnabledException", errorCode): + return awsAwsquery_deserializeErrorServiceAccessNotEnabledException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -9958,6 +10448,127 @@ func awsAwsquery_deserializeOpErrorListOpenIDConnectProviderTags(response *smith } } +type awsAwsquery_deserializeOpListOrganizationsFeatures struct { +} + +func (*awsAwsquery_deserializeOpListOrganizationsFeatures) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListOrganizationsFeatures) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsquery_deserializeOpErrorListOrganizationsFeatures(response, &metadata) + } + output := &ListOrganizationsFeaturesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("ListOrganizationsFeaturesResult") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentListOrganizationsFeaturesOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorListOrganizationsFeatures(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccountNotManagementOrDelegatedAdministratorException", errorCode): + return awsAwsquery_deserializeErrorAccountNotManagementOrDelegatedAdministratorException(response, errorBody) + + case strings.EqualFold("OrganizationNotFoundException", errorCode): + return awsAwsquery_deserializeErrorOrganizationNotFoundException(response, errorBody) + + case strings.EqualFold("OrganizationNotInAllFeaturesModeException", errorCode): + return awsAwsquery_deserializeErrorOrganizationNotInAllFeaturesModeException(response, errorBody) + + case strings.EqualFold("ServiceAccessNotEnabledException", errorCode): + return awsAwsquery_deserializeErrorServiceAccessNotEnabledException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsquery_deserializeOpListPolicies struct { } @@ -16357,14 +16968,102 @@ func awsAwsquery_deserializeOpErrorUploadSSHPublicKey(response *smithyhttp.Respo case strings.EqualFold("UnrecognizedPublicKeyEncoding", errorCode): return awsAwsquery_deserializeErrorUnrecognizedPublicKeyEncodingException(response, errorBody) - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsAwsquery_deserializeErrorAccountNotManagementOrDelegatedAdministratorException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccountNotManagementOrDelegatedAdministratorException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeDocumentAccountNotManagementOrDelegatedAdministratorException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsAwsquery_deserializeErrorCallerIsNotManagementAccountException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CallerIsNotManagementAccountException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } - return genericError + } + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeDocumentCallerIsNotManagementAccountException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } } + + return output } func awsAwsquery_deserializeErrorConcurrentModificationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { @@ -17247,6 +17946,94 @@ func awsAwsquery_deserializeErrorOpenIdIdpCommunicationErrorException(response * return output } +func awsAwsquery_deserializeErrorOrganizationNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.OrganizationNotFoundException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeDocumentOrganizationNotFoundException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsAwsquery_deserializeErrorOrganizationNotInAllFeaturesModeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.OrganizationNotInAllFeaturesModeException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeDocumentOrganizationNotInAllFeaturesModeException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + func awsAwsquery_deserializeErrorPasswordPolicyViolationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.PasswordPolicyViolationException{} var buff [1024]byte @@ -17423,6 +18210,50 @@ func awsAwsquery_deserializeErrorReportGenerationLimitExceededException(response return output } +func awsAwsquery_deserializeErrorServiceAccessNotEnabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceAccessNotEnabledException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeDocumentServiceAccessNotEnabledException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + func awsAwsquery_deserializeErrorServiceFailureException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ServiceFailureException{} var buff [1024]byte @@ -18213,6 +19044,55 @@ func awsAwsquery_deserializeDocumentAccountAliasListTypeUnwrapped(v *[]string, d *v = sv return nil } +func awsAwsquery_deserializeDocumentAccountNotManagementOrDelegatedAdministratorException(v **types.AccountNotManagementOrDelegatedAdministratorException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.AccountNotManagementOrDelegatedAdministratorException + if *v == nil { + sv = &types.AccountNotManagementOrDelegatedAdministratorException{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentArnListType(v *[]string, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -18407,29 +19287,91 @@ func awsAwsquery_deserializeDocumentAttachedPoliciesListTypeUnwrapped(v *[]types sv = *v } - switch { - default: - var mv types.AttachedPolicy - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsAwsquery_deserializeDocumentAttachedPolicy(&destAddr, nodeDecoder); err != nil { - return err + switch { + default: + var mv types.AttachedPolicy + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentAttachedPolicy(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentAttachedPolicy(v **types.AttachedPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.AttachedPolicy + if *v == nil { + sv = &types.AttachedPolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("PolicyArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PolicyArn = ptr.String(xtv) + } + + case strings.EqualFold("PolicyName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PolicyName = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + } - mv = *destAddr - sv = append(sv, mv) + decoder = originalDecoder } *v = sv return nil } -func awsAwsquery_deserializeDocumentAttachedPolicy(v **types.AttachedPolicy, decoder smithyxml.NodeDecoder) error { + +func awsAwsquery_deserializeDocumentCallerIsNotManagementAccountException(v **types.CallerIsNotManagementAccountException, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.AttachedPolicy + var sv *types.CallerIsNotManagementAccountException if *v == nil { - sv = &types.AttachedPolicy{} + sv = &types.CallerIsNotManagementAccountException{} } else { sv = *v } @@ -18445,20 +19387,7 @@ func awsAwsquery_deserializeDocumentAttachedPolicy(v **types.AttachedPolicy, dec originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("PolicyArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PolicyArn = ptr.String(xtv) - } - - case strings.EqualFold("PolicyName", t.Name.Local): + case strings.EqualFold("Message", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -18468,7 +19397,7 @@ func awsAwsquery_deserializeDocumentAttachedPolicy(v **types.AttachedPolicy, dec } { xtv := string(val) - sv.PolicyName = ptr.String(xtv) + sv.Message = ptr.String(xtv) } default: @@ -19874,6 +20803,86 @@ func awsAwsquery_deserializeDocumentEvaluationResultsListTypeUnwrapped(v *[]type *v = sv return nil } +func awsAwsquery_deserializeDocumentFeaturesListType(v *[]types.FeatureType, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.FeatureType + if *v == nil { + sv = make([]types.FeatureType, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.FeatureType + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = types.FeatureType(xtv) + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentFeaturesListTypeUnwrapped(v *[]types.FeatureType, decoder smithyxml.NodeDecoder) error { + var sv []types.FeatureType + if *v == nil { + sv = make([]types.FeatureType, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.FeatureType + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = types.FeatureType(xtv) + } + sv = append(sv, mv) + } + *v = sv + return nil +} func awsAwsquery_deserializeDocumentGroup(v **types.Group, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -21777,6 +22786,104 @@ func awsAwsquery_deserializeDocumentOpenIdIdpCommunicationErrorException(v **typ return nil } +func awsAwsquery_deserializeDocumentOrganizationNotFoundException(v **types.OrganizationNotFoundException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OrganizationNotFoundException + if *v == nil { + sv = &types.OrganizationNotFoundException{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentOrganizationNotInAllFeaturesModeException(v **types.OrganizationNotInAllFeaturesModeException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OrganizationNotInAllFeaturesModeException + if *v == nil { + sv = &types.OrganizationNotInAllFeaturesModeException{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentOrganizationsDecisionDetail(v **types.OrganizationsDecisionDetail, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -24748,22 +25855,71 @@ func awsAwsquery_deserializeDocumentServerCertificateMetadataListTypeUnwrapped(v sv = *v } - switch { - default: - var mv types.ServerCertificateMetadata - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsAwsquery_deserializeDocumentServerCertificateMetadata(&destAddr, nodeDecoder); err != nil { - return err + switch { + default: + var mv types.ServerCertificateMetadata + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentServerCertificateMetadata(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentServiceAccessNotEnabledException(v **types.ServiceAccessNotEnabledException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ServiceAccessNotEnabledException + if *v == nil { + sv = &types.ServiceAccessNotEnabledException{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + } - mv = *destAddr - sv = append(sv, mv) + decoder = originalDecoder } *v = sv return nil } + func awsAwsquery_deserializeDocumentServiceFailureException(v **types.ServiceFailureException, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -27678,6 +28834,226 @@ func awsAwsquery_deserializeOpDocumentDeleteServiceLinkedRoleOutput(v **DeleteSe return nil } +func awsAwsquery_deserializeOpDocumentDisableOrganizationsRootCredentialsManagementOutput(v **DisableOrganizationsRootCredentialsManagementOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DisableOrganizationsRootCredentialsManagementOutput + if *v == nil { + sv = &DisableOrganizationsRootCredentialsManagementOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("EnabledFeatures", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentFeaturesListType(&sv.EnabledFeatures, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("OrganizationId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OrganizationId = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeOpDocumentDisableOrganizationsRootSessionsOutput(v **DisableOrganizationsRootSessionsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DisableOrganizationsRootSessionsOutput + if *v == nil { + sv = &DisableOrganizationsRootSessionsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("EnabledFeatures", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentFeaturesListType(&sv.EnabledFeatures, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("OrganizationId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OrganizationId = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeOpDocumentEnableOrganizationsRootCredentialsManagementOutput(v **EnableOrganizationsRootCredentialsManagementOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *EnableOrganizationsRootCredentialsManagementOutput + if *v == nil { + sv = &EnableOrganizationsRootCredentialsManagementOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("EnabledFeatures", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentFeaturesListType(&sv.EnabledFeatures, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("OrganizationId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OrganizationId = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeOpDocumentEnableOrganizationsRootSessionsOutput(v **EnableOrganizationsRootSessionsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *EnableOrganizationsRootSessionsOutput + if *v == nil { + sv = &EnableOrganizationsRootSessionsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("EnabledFeatures", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentFeaturesListType(&sv.EnabledFeatures, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("OrganizationId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OrganizationId = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeOpDocumentGenerateCredentialReportOutput(v **GenerateCredentialReportOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -30723,6 +32099,61 @@ func awsAwsquery_deserializeOpDocumentListOpenIDConnectProviderTagsOutput(v **Li return nil } +func awsAwsquery_deserializeOpDocumentListOrganizationsFeaturesOutput(v **ListOrganizationsFeaturesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListOrganizationsFeaturesOutput + if *v == nil { + sv = &ListOrganizationsFeaturesOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("EnabledFeatures", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentFeaturesListType(&sv.EnabledFeatures, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("OrganizationId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OrganizationId = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeOpDocumentListPoliciesGrantingServiceAccessOutput(v **ListPoliciesGrantingServiceAccessOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/iam/generated.json b/service/iam/generated.json index 26ce6bfcc09..0732bfb490a 100644 --- a/service/iam/generated.json +++ b/service/iam/generated.json @@ -56,7 +56,11 @@ "api_op_DetachGroupPolicy.go", "api_op_DetachRolePolicy.go", "api_op_DetachUserPolicy.go", + "api_op_DisableOrganizationsRootCredentialsManagement.go", + "api_op_DisableOrganizationsRootSessions.go", "api_op_EnableMFADevice.go", + "api_op_EnableOrganizationsRootCredentialsManagement.go", + "api_op_EnableOrganizationsRootSessions.go", "api_op_GenerateCredentialReport.go", "api_op_GenerateOrganizationsAccessReport.go", "api_op_GenerateServiceLastAccessedDetails.go", @@ -102,6 +106,7 @@ "api_op_ListMFADevices.go", "api_op_ListOpenIDConnectProviderTags.go", "api_op_ListOpenIDConnectProviders.go", + "api_op_ListOrganizationsFeatures.go", "api_op_ListPolicies.go", "api_op_ListPoliciesGrantingServiceAccess.go", "api_op_ListPolicyTags.go", diff --git a/service/iam/serializers.go b/service/iam/serializers.go index 14902486e2f..1213e9b0233 100644 --- a/service/iam/serializers.go +++ b/service/iam/serializers.go @@ -3372,6 +3372,138 @@ func (m *awsAwsquery_serializeOpDetachUserPolicy) HandleSerialize(ctx context.Co return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpDisableOrganizationsRootCredentialsManagement struct { +} + +func (*awsAwsquery_serializeOpDisableOrganizationsRootCredentialsManagement) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDisableOrganizationsRootCredentialsManagement) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DisableOrganizationsRootCredentialsManagementInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("DisableOrganizationsRootCredentialsManagement") + body.Key("Version").String("2010-05-08") + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpDisableOrganizationsRootSessions struct { +} + +func (*awsAwsquery_serializeOpDisableOrganizationsRootSessions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDisableOrganizationsRootSessions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DisableOrganizationsRootSessionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("DisableOrganizationsRootSessions") + body.Key("Version").String("2010-05-08") + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsquery_serializeOpEnableMFADevice struct { } @@ -3442,6 +3574,138 @@ func (m *awsAwsquery_serializeOpEnableMFADevice) HandleSerialize(ctx context.Con return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpEnableOrganizationsRootCredentialsManagement struct { +} + +func (*awsAwsquery_serializeOpEnableOrganizationsRootCredentialsManagement) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpEnableOrganizationsRootCredentialsManagement) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*EnableOrganizationsRootCredentialsManagementInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("EnableOrganizationsRootCredentialsManagement") + body.Key("Version").String("2010-05-08") + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsquery_serializeOpEnableOrganizationsRootSessions struct { +} + +func (*awsAwsquery_serializeOpEnableOrganizationsRootSessions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpEnableOrganizationsRootSessions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*EnableOrganizationsRootSessionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("EnableOrganizationsRootSessions") + body.Key("Version").String("2010-05-08") + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsquery_serializeOpGenerateCredentialReport struct { } @@ -6572,6 +6836,72 @@ func (m *awsAwsquery_serializeOpListOpenIDConnectProviderTags) HandleSerialize(c return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpListOrganizationsFeatures struct { +} + +func (*awsAwsquery_serializeOpListOrganizationsFeatures) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListOrganizationsFeatures) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListOrganizationsFeaturesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("ListOrganizationsFeatures") + body.Key("Version").String("2010-05-08") + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsquery_serializeOpListPolicies struct { } @@ -12099,6 +12429,20 @@ func awsAwsquery_serializeOpDocumentDetachUserPolicyInput(v *DetachUserPolicyInp return nil } +func awsAwsquery_serializeOpDocumentDisableOrganizationsRootCredentialsManagementInput(v *DisableOrganizationsRootCredentialsManagementInput, value query.Value) error { + object := value.Object() + _ = object + + return nil +} + +func awsAwsquery_serializeOpDocumentDisableOrganizationsRootSessionsInput(v *DisableOrganizationsRootSessionsInput, value query.Value) error { + object := value.Object() + _ = object + + return nil +} + func awsAwsquery_serializeOpDocumentEnableMFADeviceInput(v *EnableMFADeviceInput, value query.Value) error { object := value.Object() _ = object @@ -12126,6 +12470,20 @@ func awsAwsquery_serializeOpDocumentEnableMFADeviceInput(v *EnableMFADeviceInput return nil } +func awsAwsquery_serializeOpDocumentEnableOrganizationsRootCredentialsManagementInput(v *EnableOrganizationsRootCredentialsManagementInput, value query.Value) error { + object := value.Object() + _ = object + + return nil +} + +func awsAwsquery_serializeOpDocumentEnableOrganizationsRootSessionsInput(v *EnableOrganizationsRootSessionsInput, value query.Value) error { + object := value.Object() + _ = object + + return nil +} + func awsAwsquery_serializeOpDocumentGenerateOrganizationsAccessReportInput(v *GenerateOrganizationsAccessReportInput, value query.Value) error { object := value.Object() _ = object @@ -12904,6 +13262,13 @@ func awsAwsquery_serializeOpDocumentListOpenIDConnectProviderTagsInput(v *ListOp return nil } +func awsAwsquery_serializeOpDocumentListOrganizationsFeaturesInput(v *ListOrganizationsFeaturesInput, value query.Value) error { + object := value.Object() + _ = object + + return nil +} + func awsAwsquery_serializeOpDocumentListPoliciesGrantingServiceAccessInput(v *ListPoliciesGrantingServiceAccessInput, value query.Value) error { object := value.Object() _ = object diff --git a/service/iam/snapshot/api_op_CreateLoginProfile.go.snap b/service/iam/snapshot/api_op_CreateLoginProfile.go.snap index 0822e7cfcac..c7a2be1784e 100644 --- a/service/iam/snapshot/api_op_CreateLoginProfile.go.snap +++ b/service/iam/snapshot/api_op_CreateLoginProfile.go.snap @@ -4,7 +4,6 @@ CreateLoginProfile RegisterServiceMetadata legacyEndpointContextSetter SetLogger - OperationInputValidation spanInitializeEnd Serialize stack step spanBuildRequestStart diff --git a/service/iam/snapshot/api_op_DeleteLoginProfile.go.snap b/service/iam/snapshot/api_op_DeleteLoginProfile.go.snap index 234ccf308d7..69825d9cd09 100644 --- a/service/iam/snapshot/api_op_DeleteLoginProfile.go.snap +++ b/service/iam/snapshot/api_op_DeleteLoginProfile.go.snap @@ -4,7 +4,6 @@ DeleteLoginProfile RegisterServiceMetadata legacyEndpointContextSetter SetLogger - OperationInputValidation spanInitializeEnd Serialize stack step spanBuildRequestStart diff --git a/service/iam/snapshot/api_op_DisableOrganizationsRootCredentialsManagement.go.snap b/service/iam/snapshot/api_op_DisableOrganizationsRootCredentialsManagement.go.snap new file mode 100644 index 00000000000..a59ef1cf70b --- /dev/null +++ b/service/iam/snapshot/api_op_DisableOrganizationsRootCredentialsManagement.go.snap @@ -0,0 +1,40 @@ +DisableOrganizationsRootCredentialsManagement + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/iam/snapshot/api_op_DisableOrganizationsRootSessions.go.snap b/service/iam/snapshot/api_op_DisableOrganizationsRootSessions.go.snap new file mode 100644 index 00000000000..67aadc6ecaf --- /dev/null +++ b/service/iam/snapshot/api_op_DisableOrganizationsRootSessions.go.snap @@ -0,0 +1,40 @@ +DisableOrganizationsRootSessions + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/iam/snapshot/api_op_EnableOrganizationsRootCredentialsManagement.go.snap b/service/iam/snapshot/api_op_EnableOrganizationsRootCredentialsManagement.go.snap new file mode 100644 index 00000000000..4624db9d14e --- /dev/null +++ b/service/iam/snapshot/api_op_EnableOrganizationsRootCredentialsManagement.go.snap @@ -0,0 +1,40 @@ +EnableOrganizationsRootCredentialsManagement + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/iam/snapshot/api_op_EnableOrganizationsRootSessions.go.snap b/service/iam/snapshot/api_op_EnableOrganizationsRootSessions.go.snap new file mode 100644 index 00000000000..16b3a5620fe --- /dev/null +++ b/service/iam/snapshot/api_op_EnableOrganizationsRootSessions.go.snap @@ -0,0 +1,40 @@ +EnableOrganizationsRootSessions + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/iam/snapshot/api_op_GetLoginProfile.go.snap b/service/iam/snapshot/api_op_GetLoginProfile.go.snap index ba8af59d6fe..6ddd4a5a6c8 100644 --- a/service/iam/snapshot/api_op_GetLoginProfile.go.snap +++ b/service/iam/snapshot/api_op_GetLoginProfile.go.snap @@ -4,7 +4,6 @@ GetLoginProfile RegisterServiceMetadata legacyEndpointContextSetter SetLogger - OperationInputValidation spanInitializeEnd Serialize stack step spanBuildRequestStart diff --git a/service/iam/snapshot/api_op_ListOrganizationsFeatures.go.snap b/service/iam/snapshot/api_op_ListOrganizationsFeatures.go.snap new file mode 100644 index 00000000000..f205af361ab --- /dev/null +++ b/service/iam/snapshot/api_op_ListOrganizationsFeatures.go.snap @@ -0,0 +1,40 @@ +ListOrganizationsFeatures + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/iam/snapshot_test.go b/service/iam/snapshot_test.go index c97804f0d2e..3c3bd217ff2 100644 --- a/service/iam/snapshot_test.go +++ b/service/iam/snapshot_test.go @@ -638,6 +638,30 @@ func TestCheckSnapshot_DetachUserPolicy(t *testing.T) { } } +func TestCheckSnapshot_DisableOrganizationsRootCredentialsManagement(t *testing.T) { + svc := New(Options{}) + _, err := svc.DisableOrganizationsRootCredentialsManagement(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DisableOrganizationsRootCredentialsManagement") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_DisableOrganizationsRootSessions(t *testing.T) { + svc := New(Options{}) + _, err := svc.DisableOrganizationsRootSessions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DisableOrganizationsRootSessions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_EnableMFADevice(t *testing.T) { svc := New(Options{}) _, err := svc.EnableMFADevice(context.Background(), nil, func(o *Options) { @@ -650,6 +674,30 @@ func TestCheckSnapshot_EnableMFADevice(t *testing.T) { } } +func TestCheckSnapshot_EnableOrganizationsRootCredentialsManagement(t *testing.T) { + svc := New(Options{}) + _, err := svc.EnableOrganizationsRootCredentialsManagement(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "EnableOrganizationsRootCredentialsManagement") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_EnableOrganizationsRootSessions(t *testing.T) { + svc := New(Options{}) + _, err := svc.EnableOrganizationsRootSessions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "EnableOrganizationsRootSessions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GenerateCredentialReport(t *testing.T) { svc := New(Options{}) _, err := svc.GenerateCredentialReport(context.Background(), nil, func(o *Options) { @@ -1190,6 +1238,18 @@ func TestCheckSnapshot_ListOpenIDConnectProviderTags(t *testing.T) { } } +func TestCheckSnapshot_ListOrganizationsFeatures(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListOrganizationsFeatures(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListOrganizationsFeatures") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListPolicies(t *testing.T) { svc := New(Options{}) _, err := svc.ListPolicies(context.Background(), nil, func(o *Options) { @@ -2545,6 +2605,30 @@ func TestUpdateSnapshot_DetachUserPolicy(t *testing.T) { } } +func TestUpdateSnapshot_DisableOrganizationsRootCredentialsManagement(t *testing.T) { + svc := New(Options{}) + _, err := svc.DisableOrganizationsRootCredentialsManagement(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DisableOrganizationsRootCredentialsManagement") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_DisableOrganizationsRootSessions(t *testing.T) { + svc := New(Options{}) + _, err := svc.DisableOrganizationsRootSessions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DisableOrganizationsRootSessions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_EnableMFADevice(t *testing.T) { svc := New(Options{}) _, err := svc.EnableMFADevice(context.Background(), nil, func(o *Options) { @@ -2557,6 +2641,30 @@ func TestUpdateSnapshot_EnableMFADevice(t *testing.T) { } } +func TestUpdateSnapshot_EnableOrganizationsRootCredentialsManagement(t *testing.T) { + svc := New(Options{}) + _, err := svc.EnableOrganizationsRootCredentialsManagement(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "EnableOrganizationsRootCredentialsManagement") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_EnableOrganizationsRootSessions(t *testing.T) { + svc := New(Options{}) + _, err := svc.EnableOrganizationsRootSessions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "EnableOrganizationsRootSessions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GenerateCredentialReport(t *testing.T) { svc := New(Options{}) _, err := svc.GenerateCredentialReport(context.Background(), nil, func(o *Options) { @@ -3097,6 +3205,18 @@ func TestUpdateSnapshot_ListOpenIDConnectProviderTags(t *testing.T) { } } +func TestUpdateSnapshot_ListOrganizationsFeatures(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListOrganizationsFeatures(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListOrganizationsFeatures") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListPolicies(t *testing.T) { svc := New(Options{}) _, err := svc.ListPolicies(context.Background(), nil, func(o *Options) { diff --git a/service/iam/types/enums.go b/service/iam/types/enums.go index cc0dc2e0088..de2911e9eb9 100644 --- a/service/iam/types/enums.go +++ b/service/iam/types/enums.go @@ -149,6 +149,25 @@ func (EntityType) Values() []EntityType { } } +type FeatureType string + +// Enum values for FeatureType +const ( + FeatureTypeRootCredentialsManagement FeatureType = "RootCredentialsManagement" + FeatureTypeRootSessions FeatureType = "RootSessions" +) + +// Values returns all known values for FeatureType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (FeatureType) Values() []FeatureType { + return []FeatureType{ + "RootCredentialsManagement", + "RootSessions", + } +} + type GlobalEndpointTokenVersion string // Enum values for GlobalEndpointTokenVersion @@ -437,6 +456,7 @@ const ( SummaryKeyTypeMFADevicesInUse SummaryKeyType = "MFADevicesInUse" SummaryKeyTypeAccountMFAEnabled SummaryKeyType = "AccountMFAEnabled" SummaryKeyTypeAccountAccessKeysPresent SummaryKeyType = "AccountAccessKeysPresent" + SummaryKeyTypeAccountPasswordPresent SummaryKeyType = "AccountPasswordPresent" SummaryKeyTypeAccountSigningCertificatesPresent SummaryKeyType = "AccountSigningCertificatesPresent" SummaryKeyTypeAttachedPoliciesPerGroupQuota SummaryKeyType = "AttachedPoliciesPerGroupQuota" SummaryKeyTypeAttachedPoliciesPerRoleQuota SummaryKeyType = "AttachedPoliciesPerRoleQuota" @@ -471,6 +491,7 @@ func (SummaryKeyType) Values() []SummaryKeyType { "MFADevicesInUse", "AccountMFAEnabled", "AccountAccessKeysPresent", + "AccountPasswordPresent", "AccountSigningCertificatesPresent", "AttachedPoliciesPerGroupQuota", "AttachedPoliciesPerRoleQuota", diff --git a/service/iam/types/errors.go b/service/iam/types/errors.go index 1fc1d63b947..c93175ce330 100644 --- a/service/iam/types/errors.go +++ b/service/iam/types/errors.go @@ -7,6 +7,66 @@ import ( smithy "github.com/aws/smithy-go" ) +// The request was rejected because the account making the request is not the +// management account or delegated administrator account for [centralized root access]. +// +// [centralized root access]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html#id_root-user-access-management +type AccountNotManagementOrDelegatedAdministratorException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AccountNotManagementOrDelegatedAdministratorException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccountNotManagementOrDelegatedAdministratorException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccountNotManagementOrDelegatedAdministratorException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AccountNotManagementOrDelegatedAdministratorException" + } + return *e.ErrorCodeOverride +} +func (e *AccountNotManagementOrDelegatedAdministratorException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The request was rejected because the account making the request is not the +// management account for the organization. +type CallerIsNotManagementAccountException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CallerIsNotManagementAccountException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CallerIsNotManagementAccountException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CallerIsNotManagementAccountException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CallerIsNotManagementAccountException" + } + return *e.ErrorCodeOverride +} +func (e *CallerIsNotManagementAccountException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + // The request was rejected because multiple requests to change this object were // submitted simultaneously. Wait a few minutes and submit your request again. type ConcurrentModificationException struct { @@ -559,6 +619,64 @@ func (e *OpenIdIdpCommunicationErrorException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The request was rejected because no organization is associated with your +// account. +type OrganizationNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OrganizationNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OrganizationNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OrganizationNotFoundException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OrganizationNotFoundException" + } + return *e.ErrorCodeOverride +} +func (e *OrganizationNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was rejected because your organization does not have All features +// enabled. For more information, see [Available feature sets]in the Organizations User Guide. +// +// [Available feature sets]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set +type OrganizationNotInAllFeaturesModeException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OrganizationNotInAllFeaturesModeException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OrganizationNotInAllFeaturesModeException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OrganizationNotInAllFeaturesModeException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OrganizationNotInAllFeaturesModeException" + } + return *e.ErrorCodeOverride +} +func (e *OrganizationNotInAllFeaturesModeException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + // The request was rejected because the provided password did not meet the // requirements imposed by the account password policy. type PasswordPolicyViolationException struct { @@ -669,6 +787,34 @@ func (e *ReportGenerationLimitExceededException) ErrorFault() smithy.ErrorFault return smithy.FaultClient } +// The request was rejected because trusted access is not enabled for IAM in +// Organizations. For details, see IAM and Organizations in the Organizations User +// Guide. +type ServiceAccessNotEnabledException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ServiceAccessNotEnabledException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceAccessNotEnabledException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceAccessNotEnabledException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ServiceAccessNotEnabledException" + } + return *e.ErrorCodeOverride +} +func (e *ServiceAccessNotEnabledException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The request processing has failed because of an unknown error, exception or // failure. type ServiceFailureException struct { diff --git a/service/iam/validators.go b/service/iam/validators.go index 156f324ad1b..533364ef230 100644 --- a/service/iam/validators.go +++ b/service/iam/validators.go @@ -210,26 +210,6 @@ func (m *validateOpCreateInstanceProfile) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } -type validateOpCreateLoginProfile struct { -} - -func (*validateOpCreateLoginProfile) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateLoginProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateLoginProfileInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateLoginProfileInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - type validateOpCreateOpenIDConnectProvider struct { } @@ -530,26 +510,6 @@ func (m *validateOpDeleteInstanceProfile) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } -type validateOpDeleteLoginProfile struct { -} - -func (*validateOpDeleteLoginProfile) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteLoginProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteLoginProfileInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteLoginProfileInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - type validateOpDeleteOpenIDConnectProvider struct { } @@ -1110,26 +1070,6 @@ func (m *validateOpGetInstanceProfile) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } -type validateOpGetLoginProfile struct { -} - -func (*validateOpGetLoginProfile) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetLoginProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetLoginProfileInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetLoginProfileInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - type validateOpGetMFADevice struct { } @@ -2750,10 +2690,6 @@ func addOpCreateInstanceProfileValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpCreateInstanceProfile{}, middleware.After) } -func addOpCreateLoginProfileValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateLoginProfile{}, middleware.After) -} - func addOpCreateOpenIDConnectProviderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateOpenIDConnectProvider{}, middleware.After) } @@ -2814,10 +2750,6 @@ func addOpDeleteInstanceProfileValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpDeleteInstanceProfile{}, middleware.After) } -func addOpDeleteLoginProfileValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteLoginProfile{}, middleware.After) -} - func addOpDeleteOpenIDConnectProviderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteOpenIDConnectProvider{}, middleware.After) } @@ -2930,10 +2862,6 @@ func addOpGetInstanceProfileValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpGetInstanceProfile{}, middleware.After) } -func addOpGetLoginProfileValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetLoginProfile{}, middleware.After) -} - func addOpGetMFADeviceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetMFADevice{}, middleware.After) } @@ -3461,24 +3389,6 @@ func validateOpCreateInstanceProfileInput(v *CreateInstanceProfileInput) error { } } -func validateOpCreateLoginProfileInput(v *CreateLoginProfileInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateLoginProfileInput"} - if v.UserName == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserName")) - } - if v.Password == nil { - invalidParams.Add(smithy.NewErrParamRequired("Password")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - func validateOpCreateOpenIDConnectProviderInput(v *CreateOpenIDConnectProviderInput) error { if v == nil { return nil @@ -3664,9 +3574,6 @@ func validateOpDeactivateMFADeviceInput(v *DeactivateMFADeviceInput) error { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeactivateMFADeviceInput"} - if v.UserName == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserName")) - } if v.SerialNumber == nil { invalidParams.Add(smithy.NewErrParamRequired("SerialNumber")) } @@ -3755,21 +3662,6 @@ func validateOpDeleteInstanceProfileInput(v *DeleteInstanceProfileInput) error { } } -func validateOpDeleteLoginProfileInput(v *DeleteLoginProfileInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteLoginProfileInput"} - if v.UserName == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserName")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - func validateOpDeleteOpenIDConnectProviderInput(v *DeleteOpenIDConnectProviderInput) error { if v == nil { return nil @@ -4223,21 +4115,6 @@ func validateOpGetInstanceProfileInput(v *GetInstanceProfileInput) error { } } -func validateOpGetLoginProfileInput(v *GetLoginProfileInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetLoginProfileInput"} - if v.UserName == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserName")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - func validateOpGetMFADeviceInput(v *GetMFADeviceInput) error { if v == nil { return nil diff --git a/service/iotwireless/api_op_CreateFuotaTask.go b/service/iotwireless/api_op_CreateFuotaTask.go index ac8cd124fca..a3c78a7ba44 100644 --- a/service/iotwireless/api_op_CreateFuotaTask.go +++ b/service/iotwireless/api_op_CreateFuotaTask.go @@ -54,6 +54,11 @@ type CreateFuotaTaskInput struct { // The description of the new resource. Description *string + // The Descriptor specifies some metadata about the File being transferred using + // FUOTA e.g. the software version. It is sent transparently to the device. It is a + // binary field encoded in base64 + Descriptor *string + // The interval for sending fragments in milliseconds, rounded to the nearest // second. // diff --git a/service/iotwireless/api_op_GetFuotaTask.go b/service/iotwireless/api_op_GetFuotaTask.go index acabea2ede9..e63d26f3707 100644 --- a/service/iotwireless/api_op_GetFuotaTask.go +++ b/service/iotwireless/api_op_GetFuotaTask.go @@ -49,6 +49,11 @@ type GetFuotaTaskOutput struct { // The description of the new resource. Description *string + // The Descriptor specifies some metadata about the File being transferred using + // FUOTA e.g. the software version. It is sent transparently to the device. It is a + // binary field encoded in base64 + Descriptor *string + // The S3 URI points to a firmware update image that is to be used with a FUOTA // task. FirmwareUpdateImage *string diff --git a/service/iotwireless/api_op_GetLogLevelsByResourceTypes.go b/service/iotwireless/api_op_GetLogLevelsByResourceTypes.go index e29df263845..217ba6b6e66 100644 --- a/service/iotwireless/api_op_GetLogLevelsByResourceTypes.go +++ b/service/iotwireless/api_op_GetLogLevelsByResourceTypes.go @@ -40,6 +40,9 @@ type GetLogLevelsByResourceTypesOutput struct { // more detailed logs. DefaultLogLevel types.LogLevel + // The list of fuota task log options. + FuotaTaskLogOptions []types.FuotaTaskLogOption + // The list of wireless device log options. WirelessDeviceLogOptions []types.WirelessDeviceLogOption diff --git a/service/iotwireless/api_op_GetResourceLogLevel.go b/service/iotwireless/api_op_GetResourceLogLevel.go index 093e702c6ca..e7a75731456 100644 --- a/service/iotwireless/api_op_GetResourceLogLevel.go +++ b/service/iotwireless/api_op_GetResourceLogLevel.go @@ -12,7 +12,8 @@ import ( ) // Fetches the log-level override, if any, for a given resource-ID and -// resource-type. It can be used for a wireless device or a wireless gateway. +// resource-type. It can be used for a wireless device, wireless gateway or fuota +// task. func (c *Client) GetResourceLogLevel(ctx context.Context, params *GetResourceLogLevelInput, optFns ...func(*Options)) (*GetResourceLogLevelOutput, error) { if params == nil { params = &GetResourceLogLevelInput{} @@ -36,7 +37,8 @@ type GetResourceLogLevelInput struct { // This member is required. ResourceIdentifier *string - // The type of the resource, which can be WirelessDevice or WirelessGateway . + // The type of the resource, which can be WirelessDevice , WirelessGateway or + // FuotaTask . // // This member is required. ResourceType *string diff --git a/service/iotwireless/api_op_PutResourceLogLevel.go b/service/iotwireless/api_op_PutResourceLogLevel.go index 4b418c10978..9ee51672267 100644 --- a/service/iotwireless/api_op_PutResourceLogLevel.go +++ b/service/iotwireless/api_op_PutResourceLogLevel.go @@ -44,7 +44,8 @@ type PutResourceLogLevelInput struct { // This member is required. ResourceIdentifier *string - // The type of the resource, which can be WirelessDevice or WirelessGateway . + // The type of the resource, which can be WirelessDevice , WirelessGateway , or + // FuotaTask . // // This member is required. ResourceType *string diff --git a/service/iotwireless/api_op_ResetAllResourceLogLevels.go b/service/iotwireless/api_op_ResetAllResourceLogLevels.go index 0f2468f5fbc..1631799f151 100644 --- a/service/iotwireless/api_op_ResetAllResourceLogLevels.go +++ b/service/iotwireless/api_op_ResetAllResourceLogLevels.go @@ -10,8 +10,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Removes the log-level overrides for all resources; both wireless devices and -// wireless gateways. +// Removes the log-level overrides for all resources; wireless devices, wireless +// gateways, and fuota tasks. func (c *Client) ResetAllResourceLogLevels(ctx context.Context, params *ResetAllResourceLogLevelsInput, optFns ...func(*Options)) (*ResetAllResourceLogLevelsOutput, error) { if params == nil { params = &ResetAllResourceLogLevelsInput{} diff --git a/service/iotwireless/api_op_ResetResourceLogLevel.go b/service/iotwireless/api_op_ResetResourceLogLevel.go index aa1a4f7a58d..6c69786c0bb 100644 --- a/service/iotwireless/api_op_ResetResourceLogLevel.go +++ b/service/iotwireless/api_op_ResetResourceLogLevel.go @@ -11,7 +11,8 @@ import ( ) // Removes the log-level override, if any, for a specific resource-ID and -// resource-type. It can be used for a wireless device or a wireless gateway. +// resource-type. It can be used for a wireless device, a wireless gateway, or a +// fuota task. func (c *Client) ResetResourceLogLevel(ctx context.Context, params *ResetResourceLogLevelInput, optFns ...func(*Options)) (*ResetResourceLogLevelOutput, error) { if params == nil { params = &ResetResourceLogLevelInput{} @@ -35,7 +36,8 @@ type ResetResourceLogLevelInput struct { // This member is required. ResourceIdentifier *string - // The type of the resource, which can be WirelessDevice or WirelessGateway . + // The type of the resource, which can be WirelessDevice , WirelessGateway , or + // FuotaTask . // // This member is required. ResourceType *string diff --git a/service/iotwireless/api_op_UpdateFuotaTask.go b/service/iotwireless/api_op_UpdateFuotaTask.go index d96aab5843d..f887c652abf 100644 --- a/service/iotwireless/api_op_UpdateFuotaTask.go +++ b/service/iotwireless/api_op_UpdateFuotaTask.go @@ -37,6 +37,11 @@ type UpdateFuotaTaskInput struct { // The description of the new resource. Description *string + // The Descriptor specifies some metadata about the File being transferred using + // FUOTA e.g. the software version. It is sent transparently to the device. It is a + // binary field encoded in base64 + Descriptor *string + // The S3 URI points to a firmware update image that is to be used with a FUOTA // task. FirmwareUpdateImage *string diff --git a/service/iotwireless/api_op_UpdateLogLevelsByResourceTypes.go b/service/iotwireless/api_op_UpdateLogLevelsByResourceTypes.go index a30f792759f..5c49084c971 100644 --- a/service/iotwireless/api_op_UpdateLogLevelsByResourceTypes.go +++ b/service/iotwireless/api_op_UpdateLogLevelsByResourceTypes.go @@ -36,6 +36,9 @@ type UpdateLogLevelsByResourceTypesInput struct { // more detailed logs. DefaultLogLevel types.LogLevel + // The list of fuota task log options. + FuotaTaskLogOptions []types.FuotaTaskLogOption + // The list of wireless device log options. WirelessDeviceLogOptions []types.WirelessDeviceLogOption diff --git a/service/iotwireless/deserializers.go b/service/iotwireless/deserializers.go index 7ca9ba7c963..9e43304d926 100644 --- a/service/iotwireless/deserializers.go +++ b/service/iotwireless/deserializers.go @@ -5578,6 +5578,15 @@ func awsRestjson1_deserializeOpDocumentGetFuotaTaskOutput(v **GetFuotaTaskOutput sv.Description = ptr.String(jtv) } + case "Descriptor": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileDescriptor to be of type string, got %T instead", value) + } + sv.Descriptor = ptr.String(jtv) + } + case "FirmwareUpdateImage": if value != nil { jtv, ok := value.(string) @@ -5835,6 +5844,11 @@ func awsRestjson1_deserializeOpDocumentGetLogLevelsByResourceTypesOutput(v **Get sv.DefaultLogLevel = types.LogLevel(jtv) } + case "FuotaTaskLogOptions": + if err := awsRestjson1_deserializeDocumentFuotaTaskLogOptionList(&sv.FuotaTaskLogOptions, value); err != nil { + return err + } + case "WirelessDeviceLogOptions": if err := awsRestjson1_deserializeDocumentWirelessDeviceLogOptionList(&sv.WirelessDeviceLogOptions, value); err != nil { return err @@ -18229,6 +18243,89 @@ func awsRestjson1_deserializeDocumentFuotaTask(v **types.FuotaTask, value interf return nil } +func awsRestjson1_deserializeDocumentFuotaTaskEventLogOption(v **types.FuotaTaskEventLogOption, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.FuotaTaskEventLogOption + if *v == nil { + sv = &types.FuotaTaskEventLogOption{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Event": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FuotaTaskEvent to be of type string, got %T instead", value) + } + sv.Event = types.FuotaTaskEvent(jtv) + } + + case "LogLevel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogLevel to be of type string, got %T instead", value) + } + sv.LogLevel = types.LogLevel(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFuotaTaskEventLogOptionList(v *[]types.FuotaTaskEventLogOption, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.FuotaTaskEventLogOption + if *v == nil { + cv = []types.FuotaTaskEventLogOption{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FuotaTaskEventLogOption + destAddr := &col + if err := awsRestjson1_deserializeDocumentFuotaTaskEventLogOption(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentFuotaTaskList(v *[]types.FuotaTask, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -18263,6 +18360,94 @@ func awsRestjson1_deserializeDocumentFuotaTaskList(v *[]types.FuotaTask, value i return nil } +func awsRestjson1_deserializeDocumentFuotaTaskLogOption(v **types.FuotaTaskLogOption, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.FuotaTaskLogOption + if *v == nil { + sv = &types.FuotaTaskLogOption{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Events": + if err := awsRestjson1_deserializeDocumentFuotaTaskEventLogOptionList(&sv.Events, value); err != nil { + return err + } + + case "LogLevel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogLevel to be of type string, got %T instead", value) + } + sv.LogLevel = types.LogLevel(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FuotaTaskType to be of type string, got %T instead", value) + } + sv.Type = types.FuotaTaskType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFuotaTaskLogOptionList(v *[]types.FuotaTaskLogOption, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.FuotaTaskLogOption + if *v == nil { + cv = []types.FuotaTaskLogOption{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FuotaTaskLogOption + destAddr := &col + if err := awsRestjson1_deserializeDocumentFuotaTaskLogOption(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentGatewayList(v *[]types.GatewayListItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -18350,6 +18535,42 @@ func awsRestjson1_deserializeDocumentGatewayListItem(v **types.GatewayListItem, return nil } +func awsRestjson1_deserializeDocumentGatewayListMulticast(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WirelessGatewayId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentImportedSidewalkDevice(v **types.ImportedSidewalkDevice, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -19990,6 +20211,11 @@ func awsRestjson1_deserializeDocumentLoRaWANMulticastGet(v **types.LoRaWANMultic sv.NumberOfDevicesRequested = ptr.Int32(int32(i64)) } + case "ParticipatingGateways": + if err := awsRestjson1_deserializeDocumentParticipatingGatewaysMulticast(&sv.ParticipatingGateways, value); err != nil { + return err + } + case "RfRegion": if value != nil { jtv, ok := value.(string) @@ -21323,6 +21549,55 @@ func awsRestjson1_deserializeDocumentParticipatingGateways(v **types.Participati return nil } +func awsRestjson1_deserializeDocumentParticipatingGatewaysMulticast(v **types.ParticipatingGatewaysMulticast, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ParticipatingGatewaysMulticast + if *v == nil { + sv = &types.ParticipatingGatewaysMulticast{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "GatewayList": + if err := awsRestjson1_deserializeDocumentGatewayListMulticast(&sv.GatewayList, value); err != nil { + return err + } + + case "TransmissionInterval": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TransmissionIntervalMulticast to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TransmissionInterval = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentPositionConfigurationItem(v **types.PositionConfigurationItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/iotwireless/serializers.go b/service/iotwireless/serializers.go index f5447fa0620..6495d063509 100644 --- a/service/iotwireless/serializers.go +++ b/service/iotwireless/serializers.go @@ -1050,6 +1050,11 @@ func awsRestjson1_serializeOpDocumentCreateFuotaTaskInput(v *CreateFuotaTaskInpu ok.String(*v.Description) } + if v.Descriptor != nil { + ok := object.Key("Descriptor") + ok.String(*v.Descriptor) + } + if v.FirmwareUpdateImage != nil { ok := object.Key("FirmwareUpdateImage") ok.String(*v.FirmwareUpdateImage) @@ -8295,6 +8300,11 @@ func awsRestjson1_serializeOpDocumentUpdateFuotaTaskInput(v *UpdateFuotaTaskInpu ok.String(*v.Description) } + if v.Descriptor != nil { + ok := object.Key("Descriptor") + ok.String(*v.Descriptor) + } + if v.FirmwareUpdateImage != nil { ok := object.Key("FirmwareUpdateImage") ok.String(*v.FirmwareUpdateImage) @@ -8413,6 +8423,13 @@ func awsRestjson1_serializeOpDocumentUpdateLogLevelsByResourceTypesInput(v *Upda ok.String(string(v.DefaultLogLevel)) } + if v.FuotaTaskLogOptions != nil { + ok := object.Key("FuotaTaskLogOptions") + if err := awsRestjson1_serializeDocumentFuotaTaskLogOptionList(v.FuotaTaskLogOptions, ok); err != nil { + return err + } + } + if v.WirelessDeviceLogOptions != nil { ok := object.Key("WirelessDeviceLogOptions") if err := awsRestjson1_serializeDocumentWirelessDeviceLogOptionList(v.WirelessDeviceLogOptions, ok); err != nil { @@ -9998,6 +10015,73 @@ func awsRestjson1_serializeDocumentFPorts(v *types.FPorts, value smithyjson.Valu return nil } +func awsRestjson1_serializeDocumentFuotaTaskEventLogOption(v *types.FuotaTaskEventLogOption, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Event) > 0 { + ok := object.Key("Event") + ok.String(string(v.Event)) + } + + if len(v.LogLevel) > 0 { + ok := object.Key("LogLevel") + ok.String(string(v.LogLevel)) + } + + return nil +} + +func awsRestjson1_serializeDocumentFuotaTaskEventLogOptionList(v []types.FuotaTaskEventLogOption, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentFuotaTaskEventLogOption(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentFuotaTaskLogOption(v *types.FuotaTaskLogOption, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Events != nil { + ok := object.Key("Events") + if err := awsRestjson1_serializeDocumentFuotaTaskEventLogOptionList(v.Events, ok); err != nil { + return err + } + } + + if len(v.LogLevel) > 0 { + ok := object.Key("LogLevel") + ok.String(string(v.LogLevel)) + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsRestjson1_serializeDocumentFuotaTaskLogOptionList(v []types.FuotaTaskLogOption, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentFuotaTaskLogOption(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentGatewayList(v []types.GatewayListItem, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -10028,6 +10112,17 @@ func awsRestjson1_serializeDocumentGatewayListItem(v *types.GatewayListItem, val return nil } +func awsRestjson1_serializeDocumentGatewayListMulticast(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentGlobalIdentity(v *types.GlobalIdentity, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -10633,6 +10728,13 @@ func awsRestjson1_serializeDocumentLoRaWANMulticast(v *types.LoRaWANMulticast, v ok.String(string(v.DlClass)) } + if v.ParticipatingGateways != nil { + ok := object.Key("ParticipatingGateways") + if err := awsRestjson1_serializeDocumentParticipatingGatewaysMulticast(v.ParticipatingGateways, ok); err != nil { + return err + } + } + if len(v.RfRegion) > 0 { ok := object.Key("RfRegion") ok.String(string(v.RfRegion)) @@ -11121,6 +11223,25 @@ func awsRestjson1_serializeDocumentParticipatingGateways(v *types.ParticipatingG return nil } +func awsRestjson1_serializeDocumentParticipatingGatewaysMulticast(v *types.ParticipatingGatewaysMulticast, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.GatewayList != nil { + ok := object.Key("GatewayList") + if err := awsRestjson1_serializeDocumentGatewayListMulticast(v.GatewayList, ok); err != nil { + return err + } + } + + if v.TransmissionInterval != nil { + ok := object.Key("TransmissionInterval") + ok.Integer(*v.TransmissionInterval) + } + + return nil +} + func awsRestjson1_serializeDocumentPositionCoordinate(v []float32, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/iotwireless/types/enums.go b/service/iotwireless/types/enums.go index 4352795c71e..b9da21badd0 100644 --- a/service/iotwireless/types/enums.go +++ b/service/iotwireless/types/enums.go @@ -228,6 +228,7 @@ type EventNotificationResourceType string // Enum values for EventNotificationResourceType const ( + EventNotificationResourceTypeFuotaTask EventNotificationResourceType = "FuotaTask" EventNotificationResourceTypeSidewalkAccount EventNotificationResourceType = "SidewalkAccount" EventNotificationResourceTypeWirelessDevice EventNotificationResourceType = "WirelessDevice" EventNotificationResourceTypeWirelessGateway EventNotificationResourceType = "WirelessGateway" @@ -240,6 +241,7 @@ const ( // The ordering of this slice is not guaranteed to be stable across updates. func (EventNotificationResourceType) Values() []EventNotificationResourceType { return []EventNotificationResourceType{ + "FuotaTask", "SidewalkAccount", "WirelessDevice", "WirelessGateway", @@ -324,6 +326,23 @@ func (FuotaDeviceStatus) Values() []FuotaDeviceStatus { } } +type FuotaTaskEvent string + +// Enum values for FuotaTaskEvent +const ( + FuotaTaskEventFuota FuotaTaskEvent = "Fuota" +) + +// Values returns all known values for FuotaTaskEvent. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (FuotaTaskEvent) Values() []FuotaTaskEvent { + return []FuotaTaskEvent{ + "Fuota", + } +} + type FuotaTaskStatus string // Enum values for FuotaTaskStatus @@ -349,12 +368,30 @@ func (FuotaTaskStatus) Values() []FuotaTaskStatus { } } +type FuotaTaskType string + +// Enum values for FuotaTaskType +const ( + FuotaTaskTypeLoRaWAN FuotaTaskType = "LoRaWAN" +) + +// Values returns all known values for FuotaTaskType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (FuotaTaskType) Values() []FuotaTaskType { + return []FuotaTaskType{ + "LoRaWAN", + } +} + type IdentifierType string // Enum values for IdentifierType const ( IdentifierTypePartnerAccountId IdentifierType = "PartnerAccountId" IdentifierTypeDevEui IdentifierType = "DevEui" + IdentifierTypeFuotaTaskId IdentifierType = "FuotaTaskId" IdentifierTypeGatewayEui IdentifierType = "GatewayEui" IdentifierTypeWirelessDeviceId IdentifierType = "WirelessDeviceId" IdentifierTypeWirelessGatewayId IdentifierType = "WirelessGatewayId" @@ -368,6 +405,7 @@ func (IdentifierType) Values() []IdentifierType { return []IdentifierType{ "PartnerAccountId", "DevEui", + "FuotaTaskId", "GatewayEui", "WirelessDeviceId", "WirelessGatewayId", diff --git a/service/iotwireless/types/types.go b/service/iotwireless/types/types.go index e87bbe69745..f57859a87a6 100644 --- a/service/iotwireless/types/types.go +++ b/service/iotwireless/types/types.go @@ -423,6 +423,49 @@ type FuotaTask struct { noSmithyDocumentSerde } +// The log options for a FUOTA task event and can be used to set log levels for a +// specific fuota task event. +// +// For a LoRaWAN FuotaTask type, possible event for a log message is Fuota . +type FuotaTaskEventLogOption struct { + + // The event for a log message, if the log message is tied to a fuota task. + // + // This member is required. + Event FuotaTaskEvent + + // The log level for a log message. The log levels can be disabled, or set to ERROR + // to display less verbose logs containing only error information, or to INFO for + // more detailed logs. + // + // This member is required. + LogLevel LogLevel + + noSmithyDocumentSerde +} + +// The log options for fuota tasks and can be used to set log levels for a +// specific type of fuota task. +type FuotaTaskLogOption struct { + + // The log level for a log message. The log levels can be disabled, or set to ERROR + // to display less verbose logs containing only error information, or to INFO for + // more detailed logs. + // + // This member is required. + LogLevel LogLevel + + // The fuota task type. + // + // This member is required. + Type FuotaTaskType + + // The list of FUOTA task event log options. + Events []FuotaTaskEventLogOption + + noSmithyDocumentSerde +} + // Gateway list item object that specifies the frequency and list of gateways for // which the downlink message should be sent. type GatewayListItem struct { @@ -961,6 +1004,11 @@ type LoRaWANMulticast struct { // DlClass for LoRaWAM, valid values are ClassB and ClassC. DlClass DlClass + // Specify the list of gateways to which you want to send the multicast downlink + // messages. The multicast message will be sent to each gateway in the sequence + // provided in the list. + ParticipatingGateways *ParticipatingGatewaysMulticast + // Supported RfRegions RfRegion SupportedRfRegion @@ -980,6 +1028,11 @@ type LoRaWANMulticastGet struct { // Number of devices that are requested to be associated with the multicast group. NumberOfDevicesRequested *int32 + // Specify the list of gateways to which you want to send the multicast downlink + // messages. The multicast message will be sent to each gateway in the sequence + // provided in the list. + ParticipatingGateways *ParticipatingGatewaysMulticast + // Supported RfRegions RfRegion SupportedRfRegion @@ -1387,6 +1440,24 @@ type ParticipatingGateways struct { noSmithyDocumentSerde } +// Specify the list of gateways to which you want to send the multicast downlink +// messages. The multicast message will be sent to each gateway in the sequence +// provided in the list. +type ParticipatingGatewaysMulticast struct { + + // The list of gateways that you want to use for sending the multicast downlink. + // Each downlink will be sent to all the gateways in the list with transmission + // interval between them. If list is empty the gateway list will be dynamically + // selected similar to the case of no ParticipatingGateways + GatewayList []string + + // The duration of time for which AWS IoT Core for LoRaWAN will wait before + // transmitting the multicast payload to the next gateway in the list. + TransmissionInterval *int32 + + noSmithyDocumentSerde +} + // The wrapper for a position configuration. type PositionConfigurationItem struct { diff --git a/service/iotwireless/validators.go b/service/iotwireless/validators.go index 11357835e5b..ff7bc8e4ba9 100644 --- a/service/iotwireless/validators.go +++ b/service/iotwireless/validators.go @@ -2356,6 +2356,81 @@ func validateCellTowers(v *types.CellTowers) error { } } +func validateFuotaTaskEventLogOption(v *types.FuotaTaskEventLogOption) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FuotaTaskEventLogOption"} + if len(v.Event) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Event")) + } + if len(v.LogLevel) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("LogLevel")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFuotaTaskEventLogOptionList(v []types.FuotaTaskEventLogOption) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FuotaTaskEventLogOptionList"} + for i := range v { + if err := validateFuotaTaskEventLogOption(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFuotaTaskLogOption(v *types.FuotaTaskLogOption) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FuotaTaskLogOption"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if len(v.LogLevel) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("LogLevel")) + } + if v.Events != nil { + if err := validateFuotaTaskEventLogOptionList(v.Events); err != nil { + invalidParams.AddNested("Events", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFuotaTaskLogOptionList(v []types.FuotaTaskLogOption) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FuotaTaskLogOptionList"} + for i := range v { + if err := validateFuotaTaskLogOption(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateGatewayList(v []types.GatewayListItem) error { if v == nil { return nil @@ -4612,6 +4687,11 @@ func validateOpUpdateLogLevelsByResourceTypesInput(v *UpdateLogLevelsByResourceT return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateLogLevelsByResourceTypesInput"} + if v.FuotaTaskLogOptions != nil { + if err := validateFuotaTaskLogOptionList(v.FuotaTaskLogOptions); err != nil { + invalidParams.AddNested("FuotaTaskLogOptions", err.(smithy.InvalidParamsError)) + } + } if v.WirelessDeviceLogOptions != nil { if err := validateWirelessDeviceLogOptionList(v.WirelessDeviceLogOptions); err != nil { invalidParams.AddNested("WirelessDeviceLogOptions", err.(smithy.InvalidParamsError)) diff --git a/service/ivs/api_op_CreateChannel.go b/service/ivs/api_op_CreateChannel.go index fd766ed2dce..5246bb77f88 100644 --- a/service/ivs/api_op_CreateChannel.go +++ b/service/ivs/api_op_CreateChannel.go @@ -33,6 +33,12 @@ type CreateChannelInput struct { // false . Authorized bool + // Indicates which content-packaging format is used (MPEG-TS or fMP4). If + // multitrackInputConfiguration is specified and enabled is true , then + // containerFormat is required and must be set to FRAGMENTED_MP4 . Otherwise, + // containerFormat may be set to TS or FRAGMENTED_MP4 . Default: TS . + ContainerFormat types.ContainerFormat + // Whether the channel allows insecure RTMP and SRT ingest. Default: false . InsecureIngest bool @@ -40,6 +46,10 @@ type CreateChannelInput struct { // HD. Use LOW for near-real-time interaction with viewers. Default: LOW . LatencyMode types.ChannelLatencyMode + // Object specifying multitrack input configuration. Default: no multitrack input + // configuration is specified. + MultitrackInputConfiguration *types.MultitrackInputConfiguration + // Channel name. Name *string diff --git a/service/ivs/api_op_UpdateChannel.go b/service/ivs/api_op_UpdateChannel.go index 50bad26d6f1..3e13583c421 100644 --- a/service/ivs/api_op_UpdateChannel.go +++ b/service/ivs/api_op_UpdateChannel.go @@ -39,6 +39,12 @@ type UpdateChannelInput struct { // Whether the channel is private (enabled for playback authorization). Authorized bool + // Indicates which content-packaging format is used (MPEG-TS or fMP4). If + // multitrackInputConfiguration is specified and enabled is true , then + // containerFormat is required and must be set to FRAGMENTED_MP4 . Otherwise, + // containerFormat may be set to TS or FRAGMENTED_MP4 . Default: TS . + ContainerFormat types.ContainerFormat + // Whether the channel allows insecure RTMP and SRT ingest. Default: false . InsecureIngest bool @@ -46,6 +52,10 @@ type UpdateChannelInput struct { // HD. Use LOW for near-real-time interaction with viewers. LatencyMode types.ChannelLatencyMode + // Object specifying multitrack input configuration. Default: no multitrack input + // configuration is specified. + MultitrackInputConfiguration *types.MultitrackInputConfiguration + // Channel name. Name *string diff --git a/service/ivs/deserializers.go b/service/ivs/deserializers.go index e993381288f..70852c4af0c 100644 --- a/service/ivs/deserializers.go +++ b/service/ivs/deserializers.go @@ -5579,6 +5579,15 @@ func awsRestjson1_deserializeDocumentAudioConfiguration(v **types.AudioConfigura sv.TargetBitrate = i64 } + case "track": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Track = ptr.String(jtv) + } + default: _, _ = key, value @@ -5588,6 +5597,40 @@ func awsRestjson1_deserializeDocumentAudioConfiguration(v **types.AudioConfigura return nil } +func awsRestjson1_deserializeDocumentAudioConfigurationList(v *[]types.AudioConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AudioConfiguration + if *v == nil { + cv = []types.AudioConfiguration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AudioConfiguration + destAddr := &col + if err := awsRestjson1_deserializeDocumentAudioConfiguration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentBatchError(v **types.BatchError, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5821,6 +5864,15 @@ func awsRestjson1_deserializeDocumentChannel(v **types.Channel, value interface{ sv.Authorized = jtv } + case "containerFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContainerFormat to be of type string, got %T instead", value) + } + sv.ContainerFormat = types.ContainerFormat(jtv) + } + case "ingestEndpoint": if value != nil { jtv, ok := value.(string) @@ -5848,6 +5900,11 @@ func awsRestjson1_deserializeDocumentChannel(v **types.Channel, value interface{ sv.LatencyMode = types.ChannelLatencyMode(jtv) } + case "multitrackInputConfiguration": + if err := awsRestjson1_deserializeDocumentMultitrackInputConfiguration(&sv.MultitrackInputConfiguration, value); err != nil { + return err + } + case "name": if value != nil { jtv, ok := value.(string) @@ -6263,6 +6320,47 @@ func awsRestjson1_deserializeDocumentIngestConfiguration(v **types.IngestConfigu return nil } +func awsRestjson1_deserializeDocumentIngestConfigurations(v **types.IngestConfigurations, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.IngestConfigurations + if *v == nil { + sv = &types.IngestConfigurations{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "audioConfigurations": + if err := awsRestjson1_deserializeDocumentAudioConfigurationList(&sv.AudioConfigurations, value); err != nil { + return err + } + + case "videoConfigurations": + if err := awsRestjson1_deserializeDocumentVideoConfigurationList(&sv.VideoConfigurations, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6303,6 +6401,64 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS return nil } +func awsRestjson1_deserializeDocumentMultitrackInputConfiguration(v **types.MultitrackInputConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MultitrackInputConfiguration + if *v == nil { + sv = &types.MultitrackInputConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected IsMultitrackInputEnabled to be of type *bool, got %T instead", value) + } + sv.Enabled = jtv + } + + case "maximumResolution": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MultitrackMaximumResolution to be of type string, got %T instead", value) + } + sv.MaximumResolution = types.MultitrackMaximumResolution(jtv) + } + + case "policy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MultitrackPolicy to be of type string, got %T instead", value) + } + sv.Policy = types.MultitrackPolicy(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentPendingVerification(v **types.PendingVerification, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -7660,6 +7816,11 @@ func awsRestjson1_deserializeDocumentStreamSession(v **types.StreamSession, valu return err } + case "ingestConfigurations": + if err := awsRestjson1_deserializeDocumentIngestConfigurations(&sv.IngestConfigurations, value); err != nil { + return err + } + case "recordingConfiguration": if err := awsRestjson1_deserializeDocumentRecordingConfiguration(&sv.RecordingConfiguration, value); err != nil { return err @@ -8220,6 +8381,24 @@ func awsRestjson1_deserializeDocumentVideoConfiguration(v **types.VideoConfigura sv.Encoder = ptr.String(jtv) } + case "level": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Level = ptr.String(jtv) + } + + case "profile": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Profile = ptr.String(jtv) + } + case "targetBitrate": if value != nil { jtv, ok := value.(json.Number) @@ -8246,6 +8425,15 @@ func awsRestjson1_deserializeDocumentVideoConfiguration(v **types.VideoConfigura sv.TargetFramerate = i64 } + case "track": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Track = ptr.String(jtv) + } + case "videoHeight": if value != nil { jtv, ok := value.(json.Number) @@ -8280,3 +8468,37 @@ func awsRestjson1_deserializeDocumentVideoConfiguration(v **types.VideoConfigura *v = sv return nil } + +func awsRestjson1_deserializeDocumentVideoConfigurationList(v *[]types.VideoConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.VideoConfiguration + if *v == nil { + cv = []types.VideoConfiguration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.VideoConfiguration + destAddr := &col + if err := awsRestjson1_deserializeDocumentVideoConfiguration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} diff --git a/service/ivs/serializers.go b/service/ivs/serializers.go index 725367c0acd..213bd7fccbe 100644 --- a/service/ivs/serializers.go +++ b/service/ivs/serializers.go @@ -342,6 +342,11 @@ func awsRestjson1_serializeOpDocumentCreateChannelInput(v *CreateChannelInput, v ok.Boolean(v.Authorized) } + if len(v.ContainerFormat) > 0 { + ok := object.Key("containerFormat") + ok.String(string(v.ContainerFormat)) + } + if v.InsecureIngest { ok := object.Key("insecureIngest") ok.Boolean(v.InsecureIngest) @@ -352,6 +357,13 @@ func awsRestjson1_serializeOpDocumentCreateChannelInput(v *CreateChannelInput, v ok.String(string(v.LatencyMode)) } + if v.MultitrackInputConfiguration != nil { + ok := object.Key("multitrackInputConfiguration") + if err := awsRestjson1_serializeDocumentMultitrackInputConfiguration(v.MultitrackInputConfiguration, ok); err != nil { + return err + } + } + if v.Name != nil { ok := object.Key("name") ok.String(*v.Name) @@ -2985,6 +2997,11 @@ func awsRestjson1_serializeOpDocumentUpdateChannelInput(v *UpdateChannelInput, v ok.Boolean(v.Authorized) } + if len(v.ContainerFormat) > 0 { + ok := object.Key("containerFormat") + ok.String(string(v.ContainerFormat)) + } + if v.InsecureIngest { ok := object.Key("insecureIngest") ok.Boolean(v.InsecureIngest) @@ -2995,6 +3012,13 @@ func awsRestjson1_serializeOpDocumentUpdateChannelInput(v *UpdateChannelInput, v ok.String(string(v.LatencyMode)) } + if v.MultitrackInputConfiguration != nil { + ok := object.Key("multitrackInputConfiguration") + if err := awsRestjson1_serializeDocumentMultitrackInputConfiguration(v.MultitrackInputConfiguration, ok); err != nil { + return err + } + } + if v.Name != nil { ok := object.Key("name") ok.String(*v.Name) @@ -3188,6 +3212,28 @@ func awsRestjson1_serializeDocumentDestinationConfiguration(v *types.Destination return nil } +func awsRestjson1_serializeDocumentMultitrackInputConfiguration(v *types.MultitrackInputConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Enabled { + ok := object.Key("enabled") + ok.Boolean(v.Enabled) + } + + if len(v.MaximumResolution) > 0 { + ok := object.Key("maximumResolution") + ok.String(string(v.MaximumResolution)) + } + + if len(v.Policy) > 0 { + ok := object.Key("policy") + ok.String(string(v.Policy)) + } + + return nil +} + func awsRestjson1_serializeDocumentPlaybackRestrictionPolicyAllowedCountryList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/ivs/types/enums.go b/service/ivs/types/enums.go index 87654e5e975..871def55866 100644 --- a/service/ivs/types/enums.go +++ b/service/ivs/types/enums.go @@ -44,6 +44,65 @@ func (ChannelType) Values() []ChannelType { } } +type ContainerFormat string + +// Enum values for ContainerFormat +const ( + ContainerFormatTs ContainerFormat = "TS" + ContainerFormatFragmentedMP4 ContainerFormat = "FRAGMENTED_MP4" +) + +// Values returns all known values for ContainerFormat. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ContainerFormat) Values() []ContainerFormat { + return []ContainerFormat{ + "TS", + "FRAGMENTED_MP4", + } +} + +type MultitrackMaximumResolution string + +// Enum values for MultitrackMaximumResolution +const ( + MultitrackMaximumResolutionSd MultitrackMaximumResolution = "SD" + MultitrackMaximumResolutionHd MultitrackMaximumResolution = "HD" + MultitrackMaximumResolutionFullHd MultitrackMaximumResolution = "FULL_HD" +) + +// Values returns all known values for MultitrackMaximumResolution. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (MultitrackMaximumResolution) Values() []MultitrackMaximumResolution { + return []MultitrackMaximumResolution{ + "SD", + "HD", + "FULL_HD", + } +} + +type MultitrackPolicy string + +// Enum values for MultitrackPolicy +const ( + MultitrackPolicyAllow MultitrackPolicy = "ALLOW" + MultitrackPolicyRequire MultitrackPolicy = "REQUIRE" +) + +// Values returns all known values for MultitrackPolicy. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (MultitrackPolicy) Values() []MultitrackPolicy { + return []MultitrackPolicy{ + "ALLOW", + "REQUIRE", + } +} + type RecordingConfigurationState string // Enum values for RecordingConfigurationState diff --git a/service/ivs/types/types.go b/service/ivs/types/types.go index 37956f1646f..51d12def0e0 100644 --- a/service/ivs/types/types.go +++ b/service/ivs/types/types.go @@ -8,8 +8,8 @@ import ( ) // Object specifying a stream’s audio configuration, as set up by the broadcaster -// (usually in an encoder). This is part of the IngestConfigurationobject and used for monitoring -// stream health. +// (usually in an encoder). This is part of the IngestConfigurationsobject and the deprecated IngestConfiguration object. +// It is used for monitoring stream health. type AudioConfiguration struct { // Number of audio channels. @@ -25,6 +25,10 @@ type AudioConfiguration struct { // encoder. TargetBitrate int64 + // Name of the audio track (if the stream has an audio track). If multitrack is + // not enabled, this is track0 (the sole track). + Track *string + noSmithyDocumentSerde } @@ -98,6 +102,12 @@ type Channel struct { // false . Authorized bool + // Indicates which content-packaging format is used (MPEG-TS or fMP4). If + // multitrackInputConfiguration is specified and enabled is true , then + // containerFormat is required and must be set to FRAGMENTED_MP4 . Otherwise, + // containerFormat may be set to TS or FRAGMENTED_MP4 . Default: TS . + ContainerFormat ContainerFormat + // Channel ingest endpoint, part of the definition of an ingest server, used when // you set up streaming software. IngestEndpoint *string @@ -109,6 +119,10 @@ type Channel struct { // HD. Use LOW for near-real-time interaction with viewers. Default: LOW . LatencyMode ChannelLatencyMode + // Object specifying multitrack input configuration. Default: no multitrack input + // configuration is specified. + MultitrackInputConfiguration *MultitrackInputConfiguration + // Channel name. Name *string @@ -220,6 +234,13 @@ type DestinationConfiguration struct { // Object specifying the ingest configuration set up by the broadcaster, usually // in an encoder. +// +// Note: IngestConfiguration is deprecated in favor of IngestConfigurations but retained to ensure +// backward compatibility. If multitrack is not enabled, IngestConfiguration and +// IngestConfigurations contain the same data, namely information about track0 (the +// sole track). If multitrack is enabled, IngestConfiguration contains data for +// only the first track (track0) and IngestConfigurations contains data for all +// tracks. type IngestConfiguration struct { // Encoder settings for audio. @@ -231,6 +252,49 @@ type IngestConfiguration struct { noSmithyDocumentSerde } +// Object specifying the ingest configuration set up by the broadcaster, usually +// in an encoder. +// +// Note: Use IngestConfigurations instead of IngestConfiguration (which is deprecated). If multitrack +// is not enabled, IngestConfiguration and IngestConfigurations contain the same +// data, namely information about track0 (the sole track). If multitrack is +// enabled, IngestConfiguration contains data for only the first track (track0) and +// IngestConfigurations contains data for all tracks. +type IngestConfigurations struct { + + // Encoder settings for audio. + // + // This member is required. + AudioConfigurations []AudioConfiguration + + // Encoder settings for video + // + // This member is required. + VideoConfigurations []VideoConfiguration + + noSmithyDocumentSerde +} + +// A complex type that specifies multitrack input configuration. +type MultitrackInputConfiguration struct { + + // Indicates whether multitrack input is enabled. Can be set to true only if + // channel type is STANDARD . Setting enabled to true with any other channel type + // will cause an exception. If true , then policy , maximumResolution , and + // containerFormat are required, and containerFormat must be set to FRAGMENTED_MP4 + // . Default: false . + Enabled bool + + // Maximum resolution for multitrack input. Required if enabled is true . + MaximumResolution MultitrackMaximumResolution + + // Indicates whether multitrack input is allowed or required. Required if enabled + // is true . + Policy MultitrackPolicy + + noSmithyDocumentSerde +} + // A key pair used to sign and validate a playback authorization token. type PlaybackKeyPair struct { @@ -530,8 +594,33 @@ type Stream struct { type StreamEvent struct { // Provides additional details about the stream event. There are several values; - // note that the long descriptions are provided in the IVS console but not - // delivered through the IVS API or EventBridge: + // the long descriptions are provided in the IVS console but not delivered through + // the IVS API or EventBridge. Multitrack-related codes are used only for certain + // Session Ended events. + // + // - MultitrackInputNotAllowed — The broadcast client attempted to connect with + // multitrack input, but multitrack input was not enabled on the channel. Check + // your broadcast software settings or set MultitrackInputConfiguration.Policy to + // ALLOW or REQUIRE . + // + // - MultitrackInputRequired — The broadcast client attempted to connect with + // single-track video, but multitrack input is required on this channel. Enable + // multitrack video in your broadcast software or configure the channel’s + // MultitrackInputConfiguration.Policy to ALLOW . + // + // - InvalidGetClientConfigurationStreamKey — The broadcast client attempted to + // connect with an invalid, expired, or corrupt stream key. + // + // - GetClientConfigurationStreamKeyRequired — The broadcast client attempted to + // stream multitrack video without providing an authenticated stream key from + // GetClientConfiguration. + // + // - InvalidMultitrackInputTrackCount — The multitrack input stream contained an + // invalid number of tracks. + // + // - InvalidMultitrackInputVideoTrackMediaProperties — The multitrack input + // stream contained one or more tracks with an invalid codec, resolution, bitrate, + // or framerate. // // - StreamTakeoverMediaMismatch — The broadcast client attempted to take over // with different media properties (e.g., codec, resolution, or video track type) @@ -541,8 +630,8 @@ type StreamEvent struct { // with either a priority integer value equal to or lower than the original // stream's value or a value outside the allowed range of 1 to 2,147,483,647. // - // - StreamTakeoverLimitBreached — The broadcast client reached the maximum - // allowed takeover attempts for this stream. + // StreamTakeoverLimitBreached — The broadcast client reached the maximum allowed + // takeover attempts for this stream. Code *string // Time when the event occurred. This is an ISO 8601 timestamp; note that this is @@ -624,9 +713,21 @@ type StreamSession struct { // this is returned as a string. For live streams, this is NULL . EndTime *time.Time - // The properties of the incoming RTMP stream for the stream. + // The properties of the incoming RTMP stream. + // + // Note: ingestConfiguration is deprecated in favor of ingestConfigurations but + // retained to ensure backward compatibility. If multitrack is not enabled, + // ingestConfiguration and ingestConfigurations contain the same data, namely + // information about track0 (the sole track). If multitrack is enabled, + // ingestConfiguration contains data for only the first track (track0) and + // ingestConfigurations contains data for all tracks. IngestConfiguration *IngestConfiguration + // The properties of the incoming RTMP stream. If multitrack is enabled, + // ingestConfigurations contains data for all tracks; otherwise, it contains data + // only for track0 (the sole track). + IngestConfigurations *IngestConfigurations + // The properties of recording the live stream. RecordingConfiguration *RecordingConfiguration @@ -721,12 +822,13 @@ type ThumbnailConfiguration struct { // The targeted thumbnail-generation interval in seconds. This is configurable // (and required) only if recordingMode is INTERVAL . Default: 60. // - // Important: For the BASIC channel type, setting a value for targetIntervalSeconds - // does not guarantee that thumbnails are generated at the specified interval. For - // thumbnails to be generated at the targetIntervalSeconds interval, the - // IDR/Keyframe value for the input video must be less than the - // targetIntervalSeconds value. See [Amazon IVS Streaming Configuration] for information on setting IDR/Keyframe to - // the recommended value in video-encoder settings. + // Important: For the BASIC channel type, or the STANDARD channel type with + // multitrack input, setting a value for targetIntervalSeconds does not guarantee + // that thumbnails are generated at the specified interval. For thumbnails to be + // generated at the targetIntervalSeconds interval, the IDR/Keyframe value for the + // input video must be less than the targetIntervalSeconds value. See [Amazon IVS Streaming Configuration] for + // information on setting IDR/Keyframe to the recommended value in video-encoder + // settings. // // [Amazon IVS Streaming Configuration]: https://docs.aws.amazon.com/ivs/latest/userguide/streaming-config.html TargetIntervalSeconds *int64 @@ -735,8 +837,8 @@ type ThumbnailConfiguration struct { } // Object specifying a stream’s video configuration, as set up by the broadcaster -// (usually in an encoder). This is part of the IngestConfigurationobject and used for monitoring -// stream health. +// (usually in an encoder). This is part of the IngestConfigurationsobject and the deprecated IngestConfiguration object. +// It is used for monitoring stream health. type VideoConfiguration struct { // Indicates the degree of required decoder performance for a profile. Normally @@ -754,6 +856,15 @@ type VideoConfiguration struct { // Software or hardware used to encode the video. Encoder *string + // Indicates the degree of required decoder performance for a profile. Normally + // this is set automatically by the encoder. When an AVC codec is used, this field + // has the same value as avcLevel . + Level *string + + // Indicates to the decoder the requirements for decoding the stream. When an AVC + // codec is used, this field has the same value as avcProfile . + Profile *string + // The expected ingest bitrate (bits per second). This is configured in the // encoder. TargetBitrate int64 @@ -761,6 +872,10 @@ type VideoConfiguration struct { // The expected ingest framerate. This is configured in the encoder. TargetFramerate int64 + // Name of the video track. If multitrack is not enabled, this is track0 (the sole + // track). + Track *string + // Video-resolution height in pixels. VideoHeight int64 diff --git a/service/licensemanagerusersubscriptions/api_op_AssociateUser.go b/service/licensemanagerusersubscriptions/api_op_AssociateUser.go index b2f8514d173..0a9aafaac1e 100644 --- a/service/licensemanagerusersubscriptions/api_op_AssociateUser.go +++ b/service/licensemanagerusersubscriptions/api_op_AssociateUser.go @@ -36,24 +36,28 @@ func (c *Client) AssociateUser(ctx context.Context, params *AssociateUserInput, type AssociateUserInput struct { - // The identity provider of the user. + // The identity provider for the user. // // This member is required. IdentityProvider types.IdentityProvider - // The ID of the EC2 instance, which provides user-based subscriptions. + // The ID of the EC2 instance that provides the user-based subscription. // // This member is required. InstanceId *string - // The user name from the identity provider for the user. + // The user name from the identity provider. // // This member is required. Username *string - // The domain name of the user. + // The domain name of the Active Directory that contains information for the user + // to associate. Domain *string + // The tags that apply for the user association. + Tags map[string]string + noSmithyDocumentSerde } diff --git a/service/licensemanagerusersubscriptions/api_op_CreateLicenseServerEndpoint.go b/service/licensemanagerusersubscriptions/api_op_CreateLicenseServerEndpoint.go new file mode 100644 index 00000000000..86911ef4328 --- /dev/null +++ b/service/licensemanagerusersubscriptions/api_op_CreateLicenseServerEndpoint.go @@ -0,0 +1,174 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package licensemanagerusersubscriptions + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/licensemanagerusersubscriptions/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a network endpoint for the Remote Desktop Services (RDS) license server. +func (c *Client) CreateLicenseServerEndpoint(ctx context.Context, params *CreateLicenseServerEndpointInput, optFns ...func(*Options)) (*CreateLicenseServerEndpointOutput, error) { + if params == nil { + params = &CreateLicenseServerEndpointInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateLicenseServerEndpoint", params, optFns, c.addOperationCreateLicenseServerEndpointMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateLicenseServerEndpointOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateLicenseServerEndpointInput struct { + + // The Amazon Resource Name (ARN) that identifies the IdentityProvider resource + // that contains details about a registered identity provider. In the case of + // Active Directory, that can be a self-managed Active Directory or an Amazon Web + // Services Managed Active Directory that contains user identity details. + // + // This member is required. + IdentityProviderArn *string + + // The LicenseServerSettings resource to create for the endpoint. The settings + // include the type of license server and the Secrets Manager secret that enables + // administrators to add or remove users associated with the license server. + // + // This member is required. + LicenseServerSettings *types.LicenseServerSettings + + // The tags that apply for the license server endpoint. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateLicenseServerEndpointOutput struct { + + // The Amazon Resource Name (ARN) of the identity provider specified in the + // request. + IdentityProviderArn *string + + // The ARN of the LicenseServerEndpoint resource. + LicenseServerEndpointArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateLicenseServerEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateLicenseServerEndpoint{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateLicenseServerEndpoint{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateLicenseServerEndpoint"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpCreateLicenseServerEndpointValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLicenseServerEndpoint(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateLicenseServerEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateLicenseServerEndpoint", + } +} diff --git a/service/licensemanagerusersubscriptions/api_op_DeleteLicenseServerEndpoint.go b/service/licensemanagerusersubscriptions/api_op_DeleteLicenseServerEndpoint.go new file mode 100644 index 00000000000..992a9be84b2 --- /dev/null +++ b/service/licensemanagerusersubscriptions/api_op_DeleteLicenseServerEndpoint.go @@ -0,0 +1,163 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package licensemanagerusersubscriptions + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/licensemanagerusersubscriptions/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a LicenseServerEndpoint resource. +func (c *Client) DeleteLicenseServerEndpoint(ctx context.Context, params *DeleteLicenseServerEndpointInput, optFns ...func(*Options)) (*DeleteLicenseServerEndpointOutput, error) { + if params == nil { + params = &DeleteLicenseServerEndpointInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteLicenseServerEndpoint", params, optFns, c.addOperationDeleteLicenseServerEndpointMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteLicenseServerEndpointOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteLicenseServerEndpointInput struct { + + // The Amazon Resource Name (ARN) that identifies the LicenseServerEndpoint + // resource to delete. + // + // This member is required. + LicenseServerEndpointArn *string + + // The type of License Server that the delete request refers to. + // + // This member is required. + ServerType types.ServerType + + noSmithyDocumentSerde +} + +type DeleteLicenseServerEndpointOutput struct { + + // Shows details from the LicenseServerEndpoint resource that was deleted. + LicenseServerEndpoint *types.LicenseServerEndpoint + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteLicenseServerEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteLicenseServerEndpoint{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteLicenseServerEndpoint{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteLicenseServerEndpoint"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpDeleteLicenseServerEndpointValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLicenseServerEndpoint(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteLicenseServerEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteLicenseServerEndpoint", + } +} diff --git a/service/licensemanagerusersubscriptions/api_op_DeregisterIdentityProvider.go b/service/licensemanagerusersubscriptions/api_op_DeregisterIdentityProvider.go index 239a0071d5c..47137e80b03 100644 --- a/service/licensemanagerusersubscriptions/api_op_DeregisterIdentityProvider.go +++ b/service/licensemanagerusersubscriptions/api_op_DeregisterIdentityProvider.go @@ -11,7 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deregisters the identity provider from providing user-based subscriptions. +// Deregisters the Active Directory identity provider from License Manager +// user-based subscriptions. func (c *Client) DeregisterIdentityProvider(ctx context.Context, params *DeregisterIdentityProviderInput, optFns ...func(*Options)) (*DeregisterIdentityProviderOutput, error) { if params == nil { params = &DeregisterIdentityProviderInput{} @@ -29,14 +30,17 @@ func (c *Client) DeregisterIdentityProvider(ctx context.Context, params *Deregis type DeregisterIdentityProviderInput struct { - // An object that specifies details for the identity provider. - // - // This member is required. + // An object that specifies details for the Active Directory identity provider. IdentityProvider types.IdentityProvider + // The Amazon Resource Name (ARN) that identifies the identity provider to + // deregister. + IdentityProviderArn *string + // The name of the user-based subscription product. // - // This member is required. + // Valid values: VISUAL_STUDIO_ENTERPRISE | VISUAL_STUDIO_PROFESSIONAL | + // OFFICE_PROFESSIONAL_PLUS Product *string noSmithyDocumentSerde diff --git a/service/licensemanagerusersubscriptions/api_op_DisassociateUser.go b/service/licensemanagerusersubscriptions/api_op_DisassociateUser.go index d0cf50ffe63..c6169571b0c 100644 --- a/service/licensemanagerusersubscriptions/api_op_DisassociateUser.go +++ b/service/licensemanagerusersubscriptions/api_op_DisassociateUser.go @@ -29,23 +29,22 @@ func (c *Client) DisassociateUser(ctx context.Context, params *DisassociateUserI type DisassociateUserInput struct { - // An object that specifies details for the identity provider. - // - // This member is required. + // The domain name of the Active Directory that contains information for the user + // to disassociate. + Domain *string + + // An object that specifies details for the Active Directory identity provider. IdentityProvider types.IdentityProvider - // The ID of the EC2 instance, which provides user-based subscriptions. - // - // This member is required. + // The ID of the EC2 instance which provides user-based subscriptions. InstanceId *string - // The user name from the identity provider for the user. - // - // This member is required. - Username *string + // The Amazon Resource Name (ARN) of the user to disassociate from the EC2 + // instance. + InstanceUserArn *string - // The domain name of the user. - Domain *string + // The user name from the Active Directory identity provider for the user. + Username *string noSmithyDocumentSerde } diff --git a/service/licensemanagerusersubscriptions/api_op_ListIdentityProviders.go b/service/licensemanagerusersubscriptions/api_op_ListIdentityProviders.go index 62514b2b625..995ab00b600 100644 --- a/service/licensemanagerusersubscriptions/api_op_ListIdentityProviders.go +++ b/service/licensemanagerusersubscriptions/api_op_ListIdentityProviders.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the identity providers for user-based subscriptions. +// Lists the Active Directory identity providers for user-based subscriptions. func (c *Client) ListIdentityProviders(ctx context.Context, params *ListIdentityProvidersInput, optFns ...func(*Options)) (*ListIdentityProvidersOutput, error) { if params == nil { params = &ListIdentityProvidersInput{} @@ -29,10 +29,18 @@ func (c *Client) ListIdentityProviders(ctx context.Context, params *ListIdentity type ListIdentityProvidersInput struct { - // Maximum number of results to return in a single call. + // You can use the following filters to streamline results: + // + // - Product + // + // - DirectoryId + Filters []types.Filter + + // The maximum number of results to return from a single request. MaxResults *int32 - // Token for the next set of results. + // A token to specify where to start paginating. This is the nextToken from a + // previously truncated response. NextToken *string noSmithyDocumentSerde @@ -40,12 +48,15 @@ type ListIdentityProvidersInput struct { type ListIdentityProvidersOutput struct { - // Metadata that describes the list identity providers operation. + // An array of IdentityProviderSummary resources that contain details about the + // Active Directory identity providers that meet the request criteria. // // This member is required. IdentityProviderSummaries []types.IdentityProviderSummary - // Token for the next set of results. + // The next token used for paginated responses. When this field isn't empty, there + // are additional elements that the service hasn't included in this request. Use + // this token with the next request to retrieve additional objects. NextToken *string // Metadata pertaining to the operation's result. @@ -154,7 +165,7 @@ func (c *Client) addOperationListIdentityProvidersMiddlewares(stack *middleware. // ListIdentityProvidersPaginatorOptions is the paginator options for // ListIdentityProviders type ListIdentityProvidersPaginatorOptions struct { - // Maximum number of results to return in a single call. + // The maximum number of results to return from a single request. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/licensemanagerusersubscriptions/api_op_ListInstances.go b/service/licensemanagerusersubscriptions/api_op_ListInstances.go index 8b9f4f78a60..c811db71771 100644 --- a/service/licensemanagerusersubscriptions/api_op_ListInstances.go +++ b/service/licensemanagerusersubscriptions/api_op_ListInstances.go @@ -29,14 +29,18 @@ func (c *Client) ListInstances(ctx context.Context, params *ListInstancesInput, type ListInstancesInput struct { - // An array of structures that you can use to filter the results to those that - // match one or more sets of key-value pairs that you specify. + // You can use the following filters to streamline results: + // + // - Status + // + // - InstanceId Filters []types.Filter - // Maximum number of results to return in a single call. + // The maximum number of results to return from a single request. MaxResults *int32 - // Token for the next set of results. + // A token to specify where to start paginating. This is the nextToken from a + // previously truncated response. NextToken *string noSmithyDocumentSerde @@ -44,10 +48,13 @@ type ListInstancesInput struct { type ListInstancesOutput struct { - // Metadata that describes the list instances operation. + // An array of InstanceSummary resources that contain details about the instances + // that provide user-based subscriptions and also meet the request criteria. InstanceSummaries []types.InstanceSummary - // Token for the next set of results. + // The next token used for paginated responses. When this field isn't empty, there + // are additional elements that the service hasn't included in this request. Use + // this token with the next request to retrieve additional objects. NextToken *string // Metadata pertaining to the operation's result. @@ -155,7 +162,7 @@ func (c *Client) addOperationListInstancesMiddlewares(stack *middleware.Stack, o // ListInstancesPaginatorOptions is the paginator options for ListInstances type ListInstancesPaginatorOptions struct { - // Maximum number of results to return in a single call. + // The maximum number of results to return from a single request. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/licensemanagerusersubscriptions/api_op_ListLicenseServerEndpoints.go b/service/licensemanagerusersubscriptions/api_op_ListLicenseServerEndpoints.go new file mode 100644 index 00000000000..4257d266b7c --- /dev/null +++ b/service/licensemanagerusersubscriptions/api_op_ListLicenseServerEndpoints.go @@ -0,0 +1,263 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package licensemanagerusersubscriptions + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/licensemanagerusersubscriptions/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List the Remote Desktop Services (RDS) License Server endpoints +func (c *Client) ListLicenseServerEndpoints(ctx context.Context, params *ListLicenseServerEndpointsInput, optFns ...func(*Options)) (*ListLicenseServerEndpointsOutput, error) { + if params == nil { + params = &ListLicenseServerEndpointsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListLicenseServerEndpoints", params, optFns, c.addOperationListLicenseServerEndpointsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListLicenseServerEndpointsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListLicenseServerEndpointsInput struct { + + // You can use the following filters to streamline results: + // + // - IdentityProviderArn + Filters []types.Filter + + // The maximum number of results to return from a single request. + MaxResults *int32 + + // A token to specify where to start paginating. This is the nextToken from a + // previously truncated response. + NextToken *string + + noSmithyDocumentSerde +} + +type ListLicenseServerEndpointsOutput struct { + + // An array of LicenseServerEndpoint resources that contain detailed information + // about the RDS License Servers that meet the request criteria. + LicenseServerEndpoints []types.LicenseServerEndpoint + + // The next token used for paginated responses. When this field isn't empty, there + // are additional elements that the service hasn't included in this request. Use + // this token with the next request to retrieve additional objects. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListLicenseServerEndpointsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListLicenseServerEndpoints{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListLicenseServerEndpoints{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListLicenseServerEndpoints"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLicenseServerEndpoints(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListLicenseServerEndpointsPaginatorOptions is the paginator options for +// ListLicenseServerEndpoints +type ListLicenseServerEndpointsPaginatorOptions struct { + // The maximum number of results to return from a single request. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListLicenseServerEndpointsPaginator is a paginator for +// ListLicenseServerEndpoints +type ListLicenseServerEndpointsPaginator struct { + options ListLicenseServerEndpointsPaginatorOptions + client ListLicenseServerEndpointsAPIClient + params *ListLicenseServerEndpointsInput + nextToken *string + firstPage bool +} + +// NewListLicenseServerEndpointsPaginator returns a new +// ListLicenseServerEndpointsPaginator +func NewListLicenseServerEndpointsPaginator(client ListLicenseServerEndpointsAPIClient, params *ListLicenseServerEndpointsInput, optFns ...func(*ListLicenseServerEndpointsPaginatorOptions)) *ListLicenseServerEndpointsPaginator { + if params == nil { + params = &ListLicenseServerEndpointsInput{} + } + + options := ListLicenseServerEndpointsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListLicenseServerEndpointsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListLicenseServerEndpointsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListLicenseServerEndpoints page. +func (p *ListLicenseServerEndpointsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListLicenseServerEndpointsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListLicenseServerEndpoints(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListLicenseServerEndpointsAPIClient is a client that implements the +// ListLicenseServerEndpoints operation. +type ListLicenseServerEndpointsAPIClient interface { + ListLicenseServerEndpoints(context.Context, *ListLicenseServerEndpointsInput, ...func(*Options)) (*ListLicenseServerEndpointsOutput, error) +} + +var _ ListLicenseServerEndpointsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListLicenseServerEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListLicenseServerEndpoints", + } +} diff --git a/service/licensemanagerusersubscriptions/api_op_ListProductSubscriptions.go b/service/licensemanagerusersubscriptions/api_op_ListProductSubscriptions.go index 4b4d304595d..1eeac01111f 100644 --- a/service/licensemanagerusersubscriptions/api_op_ListProductSubscriptions.go +++ b/service/licensemanagerusersubscriptions/api_op_ListProductSubscriptions.go @@ -34,27 +34,36 @@ type ListProductSubscriptionsInput struct { // This member is required. IdentityProvider types.IdentityProvider - // The name of the user-based subscription product. + // You can use the following filters to streamline results: // - // This member is required. - Product *string - - // An array of structures that you can use to filter the results to those that - // match one or more sets of key-value pairs that you specify. + // - Status + // + // - Username + // + // - Domain Filters []types.Filter - // Maximum number of results to return in a single call. + // The maximum number of results to return from a single request. MaxResults *int32 - // Token for the next set of results. + // A token to specify where to start paginating. This is the nextToken from a + // previously truncated response. NextToken *string + // The name of the user-based subscription product. + // + // Valid values: VISUAL_STUDIO_ENTERPRISE | VISUAL_STUDIO_PROFESSIONAL | + // OFFICE_PROFESSIONAL_PLUS + Product *string + noSmithyDocumentSerde } type ListProductSubscriptionsOutput struct { - // Token for the next set of results. + // The next token used for paginated responses. When this field isn't empty, there + // are additional elements that the service hasn't included in this request. Use + // this token with the next request to retrieve additional objects. NextToken *string // Metadata that describes the list product subscriptions operation. @@ -169,7 +178,7 @@ func (c *Client) addOperationListProductSubscriptionsMiddlewares(stack *middlewa // ListProductSubscriptionsPaginatorOptions is the paginator options for // ListProductSubscriptions type ListProductSubscriptionsPaginatorOptions struct { - // Maximum number of results to return in a single call. + // The maximum number of results to return from a single request. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/licensemanagerusersubscriptions/api_op_ListTagsForResource.go b/service/licensemanagerusersubscriptions/api_op_ListTagsForResource.go new file mode 100644 index 00000000000..6a25a09b43a --- /dev/null +++ b/service/licensemanagerusersubscriptions/api_op_ListTagsForResource.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package licensemanagerusersubscriptions + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the list of tags for the specified resource. +func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { + if params == nil { + params = &ListTagsForResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsForResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTagsForResourceInput struct { + + // The Amazon Resource Name (ARN) of the resource whose tags you want to retrieve. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type ListTagsForResourceOutput struct { + + // The tags for the specified resource. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListTagsForResource"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListTagsForResource", + } +} diff --git a/service/licensemanagerusersubscriptions/api_op_ListUserAssociations.go b/service/licensemanagerusersubscriptions/api_op_ListUserAssociations.go index 2211a24ad5d..8b7b20044c5 100644 --- a/service/licensemanagerusersubscriptions/api_op_ListUserAssociations.go +++ b/service/licensemanagerusersubscriptions/api_op_ListUserAssociations.go @@ -39,14 +39,20 @@ type ListUserAssociationsInput struct { // This member is required. InstanceId *string - // An array of structures that you can use to filter the results to those that - // match one or more sets of key-value pairs that you specify. + // You can use the following filters to streamline results: + // + // - Status + // + // - Username + // + // - Domain Filters []types.Filter - // Maximum number of results to return in a single call. + // The maximum number of results to return from a single request. MaxResults *int32 - // Token for the next set of results. + // A token to specify where to start paginating. This is the nextToken from a + // previously truncated response. NextToken *string noSmithyDocumentSerde @@ -57,7 +63,9 @@ type ListUserAssociationsOutput struct { // Metadata that describes the list user association operation. InstanceUserSummaries []types.InstanceUserSummary - // Token for the next set of results. + // The next token used for paginated responses. When this field isn't empty, there + // are additional elements that the service hasn't included in this request. Use + // this token with the next request to retrieve additional objects. NextToken *string // Metadata pertaining to the operation's result. @@ -169,7 +177,7 @@ func (c *Client) addOperationListUserAssociationsMiddlewares(stack *middleware.S // ListUserAssociationsPaginatorOptions is the paginator options for // ListUserAssociations type ListUserAssociationsPaginatorOptions struct { - // Maximum number of results to return in a single call. + // The maximum number of results to return from a single request. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/licensemanagerusersubscriptions/api_op_RegisterIdentityProvider.go b/service/licensemanagerusersubscriptions/api_op_RegisterIdentityProvider.go index 1b326daf3fb..8b07096adb1 100644 --- a/service/licensemanagerusersubscriptions/api_op_RegisterIdentityProvider.go +++ b/service/licensemanagerusersubscriptions/api_op_RegisterIdentityProvider.go @@ -29,13 +29,16 @@ func (c *Client) RegisterIdentityProvider(ctx context.Context, params *RegisterI type RegisterIdentityProviderInput struct { - // An object that specifies details for the identity provider. + // An object that specifies details for the identity provider to register. // // This member is required. IdentityProvider types.IdentityProvider // The name of the user-based subscription product. // + // Valid values: VISUAL_STUDIO_ENTERPRISE | VISUAL_STUDIO_PROFESSIONAL | + // OFFICE_PROFESSIONAL_PLUS + // // This member is required. Product *string @@ -43,6 +46,9 @@ type RegisterIdentityProviderInput struct { // as the subnets to provision VPC endpoints. Settings *types.Settings + // The tags that apply to the identity provider's registration. + Tags map[string]string + noSmithyDocumentSerde } diff --git a/service/licensemanagerusersubscriptions/api_op_StartProductSubscription.go b/service/licensemanagerusersubscriptions/api_op_StartProductSubscription.go index 0647da74092..242553af371 100644 --- a/service/licensemanagerusersubscriptions/api_op_StartProductSubscription.go +++ b/service/licensemanagerusersubscriptions/api_op_StartProductSubscription.go @@ -43,6 +43,9 @@ type StartProductSubscriptionInput struct { // The name of the user-based subscription product. // + // Valid values: VISUAL_STUDIO_ENTERPRISE | VISUAL_STUDIO_PROFESSIONAL | + // OFFICE_PROFESSIONAL_PLUS + // // This member is required. Product *string @@ -51,9 +54,13 @@ type StartProductSubscriptionInput struct { // This member is required. Username *string - // The domain name of the user. + // The domain name of the Active Directory that contains the user for whom to + // start the product subscription. Domain *string + // The tags that apply to the product subscription. + Tags map[string]string + noSmithyDocumentSerde } diff --git a/service/licensemanagerusersubscriptions/api_op_StopProductSubscription.go b/service/licensemanagerusersubscriptions/api_op_StopProductSubscription.go index a77c21918fa..80b0324f764 100644 --- a/service/licensemanagerusersubscriptions/api_op_StopProductSubscription.go +++ b/service/licensemanagerusersubscriptions/api_op_StopProductSubscription.go @@ -29,24 +29,25 @@ func (c *Client) StopProductSubscription(ctx context.Context, params *StopProduc type StopProductSubscriptionInput struct { + // The domain name of the Active Directory that contains the user for whom to stop + // the product subscription. + Domain *string + // An object that specifies details for the identity provider. - // - // This member is required. IdentityProvider types.IdentityProvider // The name of the user-based subscription product. // - // This member is required. + // Valid values: VISUAL_STUDIO_ENTERPRISE | VISUAL_STUDIO_PROFESSIONAL | + // OFFICE_PROFESSIONAL_PLUS Product *string + // The Amazon Resource Name (ARN) of the product user. + ProductUserArn *string + // The user name from the identity provider for the user. - // - // This member is required. Username *string - // The domain name of the user. - Domain *string - noSmithyDocumentSerde } diff --git a/service/licensemanagerusersubscriptions/api_op_TagResource.go b/service/licensemanagerusersubscriptions/api_op_TagResource.go new file mode 100644 index 00000000000..4fdfe782ee7 --- /dev/null +++ b/service/licensemanagerusersubscriptions/api_op_TagResource.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package licensemanagerusersubscriptions + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds tags to a resource. +func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { + if params == nil { + params = &TagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagResourceInput struct { + + // The Amazon Resource Name (ARN) of the resource that you want to tag. + // + // This member is required. + ResourceArn *string + + // The tags to apply to the specified resource. + // + // This member is required. + Tags map[string]string + + noSmithyDocumentSerde +} + +type TagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "TagResource"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpTagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TagResource", + } +} diff --git a/service/licensemanagerusersubscriptions/api_op_UntagResource.go b/service/licensemanagerusersubscriptions/api_op_UntagResource.go new file mode 100644 index 00000000000..970cf998f4b --- /dev/null +++ b/service/licensemanagerusersubscriptions/api_op_UntagResource.go @@ -0,0 +1,158 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package licensemanagerusersubscriptions + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes tags from a resource. +func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { + if params == nil { + params = &UntagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagResourceInput struct { + + // The Amazon Resource Name (ARN) of the resource that you want to remove tags + // from. + // + // This member is required. + ResourceArn *string + + // The tag keys to remove from the resource. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UntagResource"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpUntagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UntagResource", + } +} diff --git a/service/licensemanagerusersubscriptions/api_op_UpdateIdentityProviderSettings.go b/service/licensemanagerusersubscriptions/api_op_UpdateIdentityProviderSettings.go index 3c12cd27941..2303d78f220 100644 --- a/service/licensemanagerusersubscriptions/api_op_UpdateIdentityProviderSettings.go +++ b/service/licensemanagerusersubscriptions/api_op_UpdateIdentityProviderSettings.go @@ -30,16 +30,6 @@ func (c *Client) UpdateIdentityProviderSettings(ctx context.Context, params *Upd type UpdateIdentityProviderSettingsInput struct { - // Details about an identity provider. - // - // This member is required. - IdentityProvider types.IdentityProvider - - // The name of the user-based subscription product. - // - // This member is required. - Product *string - // Updates the registered identity provider’s product related configuration // settings. You can update any combination of settings in a single operation such // as the: @@ -53,6 +43,18 @@ type UpdateIdentityProviderSettingsInput struct { // This member is required. UpdateSettings *types.UpdateSettings + // Refers to an identity provider. + IdentityProvider types.IdentityProvider + + // The Amazon Resource Name (ARN) of the identity provider to update. + IdentityProviderArn *string + + // The name of the user-based subscription product. + // + // Valid values: VISUAL_STUDIO_ENTERPRISE | VISUAL_STUDIO_PROFESSIONAL | + // OFFICE_PROFESSIONAL_PLUS + Product *string + noSmithyDocumentSerde } diff --git a/service/licensemanagerusersubscriptions/deserializers.go b/service/licensemanagerusersubscriptions/deserializers.go index 44a79437ce8..c0d930cea41 100644 --- a/service/licensemanagerusersubscriptions/deserializers.go +++ b/service/licensemanagerusersubscriptions/deserializers.go @@ -199,14 +199,14 @@ func awsRestjson1_deserializeOpDocumentAssociateUserOutput(v **AssociateUserOutp return nil } -type awsRestjson1_deserializeOpDeregisterIdentityProvider struct { +type awsRestjson1_deserializeOpCreateLicenseServerEndpoint struct { } -func (*awsRestjson1_deserializeOpDeregisterIdentityProvider) ID() string { +func (*awsRestjson1_deserializeOpCreateLicenseServerEndpoint) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeregisterIdentityProvider) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateLicenseServerEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -224,9 +224,9 @@ func (m *awsRestjson1_deserializeOpDeregisterIdentityProvider) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeregisterIdentityProvider(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateLicenseServerEndpoint(response, &metadata) } - output := &DeregisterIdentityProviderOutput{} + output := &CreateLicenseServerEndpointOutput{} out.Result = output var buff [1024]byte @@ -247,7 +247,7 @@ func (m *awsRestjson1_deserializeOpDeregisterIdentityProvider) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeregisterIdentityProviderOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateLicenseServerEndpointOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -261,7 +261,7 @@ func (m *awsRestjson1_deserializeOpDeregisterIdentityProvider) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeregisterIdentityProvider(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateLicenseServerEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -333,7 +333,7 @@ func awsRestjson1_deserializeOpErrorDeregisterIdentityProvider(response *smithyh } } -func awsRestjson1_deserializeOpDocumentDeregisterIdentityProviderOutput(v **DeregisterIdentityProviderOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateLicenseServerEndpointOutput(v **CreateLicenseServerEndpointOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -346,18 +346,31 @@ func awsRestjson1_deserializeOpDocumentDeregisterIdentityProviderOutput(v **Dere return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeregisterIdentityProviderOutput + var sv *CreateLicenseServerEndpointOutput if *v == nil { - sv = &DeregisterIdentityProviderOutput{} + sv = &CreateLicenseServerEndpointOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "IdentityProviderSummary": - if err := awsRestjson1_deserializeDocumentIdentityProviderSummary(&sv.IdentityProviderSummary, value); err != nil { - return err + case "IdentityProviderArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.IdentityProviderArn = ptr.String(jtv) + } + + case "LicenseServerEndpointArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.LicenseServerEndpointArn = ptr.String(jtv) } default: @@ -369,14 +382,14 @@ func awsRestjson1_deserializeOpDocumentDeregisterIdentityProviderOutput(v **Dere return nil } -type awsRestjson1_deserializeOpDisassociateUser struct { +type awsRestjson1_deserializeOpDeleteLicenseServerEndpoint struct { } -func (*awsRestjson1_deserializeOpDisassociateUser) ID() string { +func (*awsRestjson1_deserializeOpDeleteLicenseServerEndpoint) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDisassociateUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteLicenseServerEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -394,9 +407,9 @@ func (m *awsRestjson1_deserializeOpDisassociateUser) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDisassociateUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteLicenseServerEndpoint(response, &metadata) } - output := &DisassociateUserOutput{} + output := &DeleteLicenseServerEndpointOutput{} out.Result = output var buff [1024]byte @@ -417,7 +430,7 @@ func (m *awsRestjson1_deserializeOpDisassociateUser) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDisassociateUserOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteLicenseServerEndpointOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -431,7 +444,7 @@ func (m *awsRestjson1_deserializeOpDisassociateUser) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorDisassociateUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteLicenseServerEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -503,7 +516,7 @@ func awsRestjson1_deserializeOpErrorDisassociateUser(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentDisassociateUserOutput(v **DisassociateUserOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteLicenseServerEndpointOutput(v **DeleteLicenseServerEndpointOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -516,17 +529,17 @@ func awsRestjson1_deserializeOpDocumentDisassociateUserOutput(v **DisassociateUs return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DisassociateUserOutput + var sv *DeleteLicenseServerEndpointOutput if *v == nil { - sv = &DisassociateUserOutput{} + sv = &DeleteLicenseServerEndpointOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "InstanceUserSummary": - if err := awsRestjson1_deserializeDocumentInstanceUserSummary(&sv.InstanceUserSummary, value); err != nil { + case "LicenseServerEndpoint": + if err := awsRestjson1_deserializeDocumentLicenseServerEndpoint(&sv.LicenseServerEndpoint, value); err != nil { return err } @@ -539,14 +552,14 @@ func awsRestjson1_deserializeOpDocumentDisassociateUserOutput(v **DisassociateUs return nil } -type awsRestjson1_deserializeOpListIdentityProviders struct { +type awsRestjson1_deserializeOpDeregisterIdentityProvider struct { } -func (*awsRestjson1_deserializeOpListIdentityProviders) ID() string { +func (*awsRestjson1_deserializeOpDeregisterIdentityProvider) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListIdentityProviders) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeregisterIdentityProvider) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -564,9 +577,9 @@ func (m *awsRestjson1_deserializeOpListIdentityProviders) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListIdentityProviders(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeregisterIdentityProvider(response, &metadata) } - output := &ListIdentityProvidersOutput{} + output := &DeregisterIdentityProviderOutput{} out.Result = output var buff [1024]byte @@ -587,7 +600,7 @@ func (m *awsRestjson1_deserializeOpListIdentityProviders) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListIdentityProvidersOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeregisterIdentityProviderOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -601,7 +614,7 @@ func (m *awsRestjson1_deserializeOpListIdentityProviders) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListIdentityProviders(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeregisterIdentityProvider(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -673,7 +686,7 @@ func awsRestjson1_deserializeOpErrorListIdentityProviders(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentListIdentityProvidersOutput(v **ListIdentityProvidersOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeregisterIdentityProviderOutput(v **DeregisterIdentityProviderOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -686,29 +699,20 @@ func awsRestjson1_deserializeOpDocumentListIdentityProvidersOutput(v **ListIdent return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListIdentityProvidersOutput + var sv *DeregisterIdentityProviderOutput if *v == nil { - sv = &ListIdentityProvidersOutput{} + sv = &DeregisterIdentityProviderOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "IdentityProviderSummaries": - if err := awsRestjson1_deserializeDocumentIdentityProviderSummaryList(&sv.IdentityProviderSummaries, value); err != nil { + case "IdentityProviderSummary": + if err := awsRestjson1_deserializeDocumentIdentityProviderSummary(&sv.IdentityProviderSummary, value); err != nil { return err } - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - default: _, _ = key, value @@ -718,14 +722,14 @@ func awsRestjson1_deserializeOpDocumentListIdentityProvidersOutput(v **ListIdent return nil } -type awsRestjson1_deserializeOpListInstances struct { +type awsRestjson1_deserializeOpDisassociateUser struct { } -func (*awsRestjson1_deserializeOpListInstances) ID() string { +func (*awsRestjson1_deserializeOpDisassociateUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDisassociateUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -743,9 +747,9 @@ func (m *awsRestjson1_deserializeOpListInstances) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListInstances(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDisassociateUser(response, &metadata) } - output := &ListInstancesOutput{} + output := &DisassociateUserOutput{} out.Result = output var buff [1024]byte @@ -766,7 +770,7 @@ func (m *awsRestjson1_deserializeOpListInstances) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListInstancesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDisassociateUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -780,7 +784,7 @@ func (m *awsRestjson1_deserializeOpListInstances) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorListInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDisassociateUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -852,7 +856,7 @@ func awsRestjson1_deserializeOpErrorListInstances(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentListInstancesOutput(v **ListInstancesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDisassociateUserOutput(v **DisassociateUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -865,29 +869,20 @@ func awsRestjson1_deserializeOpDocumentListInstancesOutput(v **ListInstancesOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListInstancesOutput + var sv *DisassociateUserOutput if *v == nil { - sv = &ListInstancesOutput{} + sv = &DisassociateUserOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "InstanceSummaries": - if err := awsRestjson1_deserializeDocumentInstanceSummaryList(&sv.InstanceSummaries, value); err != nil { + case "InstanceUserSummary": + if err := awsRestjson1_deserializeDocumentInstanceUserSummary(&sv.InstanceUserSummary, value); err != nil { return err } - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - default: _, _ = key, value @@ -897,14 +892,14 @@ func awsRestjson1_deserializeOpDocumentListInstancesOutput(v **ListInstancesOutp return nil } -type awsRestjson1_deserializeOpListProductSubscriptions struct { +type awsRestjson1_deserializeOpListIdentityProviders struct { } -func (*awsRestjson1_deserializeOpListProductSubscriptions) ID() string { +func (*awsRestjson1_deserializeOpListIdentityProviders) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListProductSubscriptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListIdentityProviders) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -922,9 +917,9 @@ func (m *awsRestjson1_deserializeOpListProductSubscriptions) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListProductSubscriptions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListIdentityProviders(response, &metadata) } - output := &ListProductSubscriptionsOutput{} + output := &ListIdentityProvidersOutput{} out.Result = output var buff [1024]byte @@ -945,7 +940,7 @@ func (m *awsRestjson1_deserializeOpListProductSubscriptions) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListProductSubscriptionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListIdentityProvidersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -959,7 +954,7 @@ func (m *awsRestjson1_deserializeOpListProductSubscriptions) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListProductSubscriptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListIdentityProviders(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1031,7 +1026,7 @@ func awsRestjson1_deserializeOpErrorListProductSubscriptions(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentListProductSubscriptionsOutput(v **ListProductSubscriptionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListIdentityProvidersOutput(v **ListIdentityProvidersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1044,15 +1039,20 @@ func awsRestjson1_deserializeOpDocumentListProductSubscriptionsOutput(v **ListPr return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListProductSubscriptionsOutput + var sv *ListIdentityProvidersOutput if *v == nil { - sv = &ListProductSubscriptionsOutput{} + sv = &ListIdentityProvidersOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "IdentityProviderSummaries": + if err := awsRestjson1_deserializeDocumentIdentityProviderSummaryList(&sv.IdentityProviderSummaries, value); err != nil { + return err + } + case "NextToken": if value != nil { jtv, ok := value.(string) @@ -1062,11 +1062,6 @@ func awsRestjson1_deserializeOpDocumentListProductSubscriptionsOutput(v **ListPr sv.NextToken = ptr.String(jtv) } - case "ProductUserSummaries": - if err := awsRestjson1_deserializeDocumentProductUserSummaryList(&sv.ProductUserSummaries, value); err != nil { - return err - } - default: _, _ = key, value @@ -1076,14 +1071,14 @@ func awsRestjson1_deserializeOpDocumentListProductSubscriptionsOutput(v **ListPr return nil } -type awsRestjson1_deserializeOpListUserAssociations struct { +type awsRestjson1_deserializeOpListInstances struct { } -func (*awsRestjson1_deserializeOpListUserAssociations) ID() string { +func (*awsRestjson1_deserializeOpListInstances) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListUserAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1101,9 +1096,9 @@ func (m *awsRestjson1_deserializeOpListUserAssociations) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListUserAssociations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListInstances(response, &metadata) } - output := &ListUserAssociationsOutput{} + output := &ListInstancesOutput{} out.Result = output var buff [1024]byte @@ -1124,7 +1119,7 @@ func (m *awsRestjson1_deserializeOpListUserAssociations) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListUserAssociationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListInstancesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1138,7 +1133,7 @@ func (m *awsRestjson1_deserializeOpListUserAssociations) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListUserAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1210,7 +1205,7 @@ func awsRestjson1_deserializeOpErrorListUserAssociations(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentListUserAssociationsOutput(v **ListUserAssociationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListInstancesOutput(v **ListInstancesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1223,17 +1218,17 @@ func awsRestjson1_deserializeOpDocumentListUserAssociationsOutput(v **ListUserAs return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListUserAssociationsOutput + var sv *ListInstancesOutput if *v == nil { - sv = &ListUserAssociationsOutput{} + sv = &ListInstancesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "InstanceUserSummaries": - if err := awsRestjson1_deserializeDocumentInstanceUserSummaryList(&sv.InstanceUserSummaries, value); err != nil { + case "InstanceSummaries": + if err := awsRestjson1_deserializeDocumentInstanceSummaryList(&sv.InstanceSummaries, value); err != nil { return err } @@ -1255,14 +1250,14 @@ func awsRestjson1_deserializeOpDocumentListUserAssociationsOutput(v **ListUserAs return nil } -type awsRestjson1_deserializeOpRegisterIdentityProvider struct { +type awsRestjson1_deserializeOpListLicenseServerEndpoints struct { } -func (*awsRestjson1_deserializeOpRegisterIdentityProvider) ID() string { +func (*awsRestjson1_deserializeOpListLicenseServerEndpoints) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpRegisterIdentityProvider) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListLicenseServerEndpoints) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1280,9 +1275,9 @@ func (m *awsRestjson1_deserializeOpRegisterIdentityProvider) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRegisterIdentityProvider(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListLicenseServerEndpoints(response, &metadata) } - output := &RegisterIdentityProviderOutput{} + output := &ListLicenseServerEndpointsOutput{} out.Result = output var buff [1024]byte @@ -1303,7 +1298,7 @@ func (m *awsRestjson1_deserializeOpRegisterIdentityProvider) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentRegisterIdentityProviderOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListLicenseServerEndpointsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1317,7 +1312,7 @@ func (m *awsRestjson1_deserializeOpRegisterIdentityProvider) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorRegisterIdentityProvider(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListLicenseServerEndpoints(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1367,9 +1362,6 @@ func awsRestjson1_deserializeOpErrorRegisterIdentityProvider(response *smithyhtt case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -1389,7 +1381,7 @@ func awsRestjson1_deserializeOpErrorRegisterIdentityProvider(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentRegisterIdentityProviderOutput(v **RegisterIdentityProviderOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListLicenseServerEndpointsOutput(v **ListLicenseServerEndpointsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1402,20 +1394,29 @@ func awsRestjson1_deserializeOpDocumentRegisterIdentityProviderOutput(v **Regist return fmt.Errorf("unexpected JSON type %v", value) } - var sv *RegisterIdentityProviderOutput + var sv *ListLicenseServerEndpointsOutput if *v == nil { - sv = &RegisterIdentityProviderOutput{} + sv = &ListLicenseServerEndpointsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "IdentityProviderSummary": - if err := awsRestjson1_deserializeDocumentIdentityProviderSummary(&sv.IdentityProviderSummary, value); err != nil { + case "LicenseServerEndpoints": + if err := awsRestjson1_deserializeDocumentLicenseServerEndpointList(&sv.LicenseServerEndpoints, value); err != nil { return err } + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + default: _, _ = key, value @@ -1425,14 +1426,14 @@ func awsRestjson1_deserializeOpDocumentRegisterIdentityProviderOutput(v **Regist return nil } -type awsRestjson1_deserializeOpStartProductSubscription struct { +type awsRestjson1_deserializeOpListProductSubscriptions struct { } -func (*awsRestjson1_deserializeOpStartProductSubscription) ID() string { +func (*awsRestjson1_deserializeOpListProductSubscriptions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartProductSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListProductSubscriptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1450,9 +1451,9 @@ func (m *awsRestjson1_deserializeOpStartProductSubscription) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartProductSubscription(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListProductSubscriptions(response, &metadata) } - output := &StartProductSubscriptionOutput{} + output := &ListProductSubscriptionsOutput{} out.Result = output var buff [1024]byte @@ -1473,7 +1474,7 @@ func (m *awsRestjson1_deserializeOpStartProductSubscription) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartProductSubscriptionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListProductSubscriptionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1487,7 +1488,7 @@ func (m *awsRestjson1_deserializeOpStartProductSubscription) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartProductSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListProductSubscriptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1559,7 +1560,7 @@ func awsRestjson1_deserializeOpErrorStartProductSubscription(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentStartProductSubscriptionOutput(v **StartProductSubscriptionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListProductSubscriptionsOutput(v **ListProductSubscriptionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1572,17 +1573,26 @@ func awsRestjson1_deserializeOpDocumentStartProductSubscriptionOutput(v **StartP return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartProductSubscriptionOutput + var sv *ListProductSubscriptionsOutput if *v == nil { - sv = &StartProductSubscriptionOutput{} + sv = &ListProductSubscriptionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ProductUserSummary": - if err := awsRestjson1_deserializeDocumentProductUserSummary(&sv.ProductUserSummary, value); err != nil { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "ProductUserSummaries": + if err := awsRestjson1_deserializeDocumentProductUserSummaryList(&sv.ProductUserSummaries, value); err != nil { return err } @@ -1595,14 +1605,14 @@ func awsRestjson1_deserializeOpDocumentStartProductSubscriptionOutput(v **StartP return nil } -type awsRestjson1_deserializeOpStopProductSubscription struct { +type awsRestjson1_deserializeOpListTagsForResource struct { } -func (*awsRestjson1_deserializeOpStopProductSubscription) ID() string { +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStopProductSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1620,9 +1630,9 @@ func (m *awsRestjson1_deserializeOpStopProductSubscription) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStopProductSubscription(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &StopProductSubscriptionOutput{} + output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte @@ -1643,7 +1653,7 @@ func (m *awsRestjson1_deserializeOpStopProductSubscription) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStopProductSubscriptionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1657,7 +1667,7 @@ func (m *awsRestjson1_deserializeOpStopProductSubscription) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorStopProductSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1698,24 +1708,12 @@ func awsRestjson1_deserializeOpErrorStopProductSubscription(response *smithyhttp } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -1729,7 +1727,7 @@ func awsRestjson1_deserializeOpErrorStopProductSubscription(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentStopProductSubscriptionOutput(v **StopProductSubscriptionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1742,17 +1740,17 @@ func awsRestjson1_deserializeOpDocumentStopProductSubscriptionOutput(v **StopPro return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StopProductSubscriptionOutput + var sv *ListTagsForResourceOutput if *v == nil { - sv = &StopProductSubscriptionOutput{} + sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ProductUserSummary": - if err := awsRestjson1_deserializeDocumentProductUserSummary(&sv.ProductUserSummary, value); err != nil { + case "Tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } @@ -1765,14 +1763,14 @@ func awsRestjson1_deserializeOpDocumentStopProductSubscriptionOutput(v **StopPro return nil } -type awsRestjson1_deserializeOpUpdateIdentityProviderSettings struct { +type awsRestjson1_deserializeOpListUserAssociations struct { } -func (*awsRestjson1_deserializeOpUpdateIdentityProviderSettings) ID() string { +func (*awsRestjson1_deserializeOpListUserAssociations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateIdentityProviderSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListUserAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1790,9 +1788,9 @@ func (m *awsRestjson1_deserializeOpUpdateIdentityProviderSettings) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateIdentityProviderSettings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListUserAssociations(response, &metadata) } - output := &UpdateIdentityProviderSettingsOutput{} + output := &ListUserAssociationsOutput{} out.Result = output var buff [1024]byte @@ -1813,7 +1811,7 @@ func (m *awsRestjson1_deserializeOpUpdateIdentityProviderSettings) HandleDeseria return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateIdentityProviderSettingsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListUserAssociationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1827,7 +1825,7 @@ func (m *awsRestjson1_deserializeOpUpdateIdentityProviderSettings) HandleDeseria return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateIdentityProviderSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListUserAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1871,12 +1869,21 @@ func awsRestjson1_deserializeOpErrorUpdateIdentityProviderSettings(response *smi case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -1890,7 +1897,7 @@ func awsRestjson1_deserializeOpErrorUpdateIdentityProviderSettings(response *smi } } -func awsRestjson1_deserializeOpDocumentUpdateIdentityProviderSettingsOutput(v **UpdateIdentityProviderSettingsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListUserAssociationsOutput(v **ListUserAssociationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1903,20 +1910,29 @@ func awsRestjson1_deserializeOpDocumentUpdateIdentityProviderSettingsOutput(v ** return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateIdentityProviderSettingsOutput + var sv *ListUserAssociationsOutput if *v == nil { - sv = &UpdateIdentityProviderSettingsOutput{} + sv = &ListUserAssociationsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "IdentityProviderSummary": - if err := awsRestjson1_deserializeDocumentIdentityProviderSummary(&sv.IdentityProviderSummary, value); err != nil { + case "InstanceUserSummaries": + if err := awsRestjson1_deserializeDocumentInstanceUserSummaryList(&sv.InstanceUserSummaries, value); err != nil { return err } + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + default: _, _ = key, value @@ -1926,12 +1942,41 @@ func awsRestjson1_deserializeOpDocumentUpdateIdentityProviderSettingsOutput(v ** return nil } -func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AccessDeniedException{} +type awsRestjson1_deserializeOpRegisterIdentityProvider struct { +} + +func (*awsRestjson1_deserializeOpRegisterIdentityProvider) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpRegisterIdentityProvider) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorRegisterIdentityProvider(response, &metadata) + } + output := &RegisterIdentityProviderOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -1942,36 +1987,46 @@ func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Res Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentRegisterIdentityProviderOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } - return err } - errorBody.Seek(0, io.SeekStart) - - return output + span.End() + return out, metadata, err } -func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ConflictException{} +func awsRestjson1_deserializeOpErrorRegisterIdentityProvider(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -1981,29 +2036,117 @@ func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Respons return err } - err := awsRestjson1_deserializeDocumentConflictException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) +func awsRestjson1_deserializeOpDocumentRegisterIdentityProviderOutput(v **RegisterIdentityProviderOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - return output + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *RegisterIdentityProviderOutput + if *v == nil { + sv = &RegisterIdentityProviderOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "IdentityProviderSummary": + if err := awsRestjson1_deserializeDocumentIdentityProviderSummary(&sv.IdentityProviderSummary, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InternalServerException{} +type awsRestjson1_deserializeOpStartProductSubscription struct { +} + +func (*awsRestjson1_deserializeOpStartProductSubscription) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStartProductSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorStartProductSubscription(response, &metadata) + } + output := &StartProductSubscriptionOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -2014,36 +2157,46 @@ func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.R Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentStartProductSubscriptionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } - return err } - errorBody.Seek(0, io.SeekStart) - - return output + span.End() + return out, metadata, err } -func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResourceNotFoundException{} +func awsRestjson1_deserializeOpErrorStartProductSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -2053,29 +2206,117 @@ func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp return err } - err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) +func awsRestjson1_deserializeOpDocumentStartProductSubscriptionOutput(v **StartProductSubscriptionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - return output + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartProductSubscriptionOutput + if *v == nil { + sv = &StartProductSubscriptionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ProductUserSummary": + if err := awsRestjson1_deserializeDocumentProductUserSummary(&sv.ProductUserSummary, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ServiceQuotaExceededException{} +type awsRestjson1_deserializeOpStopProductSubscription struct { +} + +func (*awsRestjson1_deserializeOpStopProductSubscription) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStopProductSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorStopProductSubscription(response, &metadata) + } + output := &StopProductSubscriptionOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -2086,36 +2327,46 @@ func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithy Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentServiceQuotaExceededException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentStopProductSubscriptionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } - return err } - errorBody.Seek(0, io.SeekStart) - - return output + span.End() + return out, metadata, err } -func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ThrottlingException{} +func awsRestjson1_deserializeOpErrorStopProductSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -2125,60 +2376,1097 @@ func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Respo return err } - err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) +func awsRestjson1_deserializeOpDocumentStopProductSubscriptionOutput(v **StopProductSubscriptionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - return output -} + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } -func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ValidationException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + var sv *StopProductSubscriptionOutput + if *v == nil { + sv = &StopProductSubscriptionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ProductUserSummary": + if err := awsRestjson1_deserializeDocumentProductUserSummary(&sv.ProductUserSummary, value); err != nil { + return err + } + + default: + _, _ = key, value - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), } - return err + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpTagResource struct { +} + +func (*awsRestjson1_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUntagResource struct { +} + +func (*awsRestjson1_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateIdentityProviderSettings struct { +} + +func (*awsRestjson1_deserializeOpUpdateIdentityProviderSettings) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateIdentityProviderSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateIdentityProviderSettings(response, &metadata) + } + output := &UpdateIdentityProviderSettingsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateIdentityProviderSettingsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateIdentityProviderSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateIdentityProviderSettingsOutput(v **UpdateIdentityProviderSettingsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateIdentityProviderSettingsOutput + if *v == nil { + sv = &UpdateIdentityProviderSettingsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "IdentityProviderSummary": + if err := awsRestjson1_deserializeDocumentIdentityProviderSummary(&sv.IdentityProviderSummary, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceNotFoundException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceQuotaExceededException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentServiceQuotaExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottlingException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ValidationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentActiveDirectoryIdentityProvider(v **types.ActiveDirectoryIdentityProvider, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ActiveDirectoryIdentityProvider + if *v == nil { + sv = &types.ActiveDirectoryIdentityProvider{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ActiveDirectorySettings": + if err := awsRestjson1_deserializeDocumentActiveDirectorySettings(&sv.ActiveDirectorySettings, value); err != nil { + return err + } + + case "ActiveDirectoryType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActiveDirectoryType to be of type string, got %T instead", value) + } + sv.ActiveDirectoryType = types.ActiveDirectoryType(jtv) + } + + case "DirectoryId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Directory to be of type string, got %T instead", value) + } + sv.DirectoryId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentActiveDirectorySettings(v **types.ActiveDirectorySettings, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ActiveDirectorySettings + if *v == nil { + sv = &types.ActiveDirectorySettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DomainCredentialsProvider": + if err := awsRestjson1_deserializeDocumentCredentialsProvider(&sv.DomainCredentialsProvider, value); err != nil { + return err + } + + case "DomainIpv4List": + if err := awsRestjson1_deserializeDocumentIpV4List(&sv.DomainIpv4List, value); err != nil { + return err + } + + case "DomainName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DomainName = ptr.String(jtv) + } + + case "DomainNetworkSettings": + if err := awsRestjson1_deserializeDocumentDomainNetworkSettings(&sv.DomainNetworkSettings, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCredentialsProvider(v *types.CredentialsProvider, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var uv types.CredentialsProvider +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "SecretsManagerCredentialsProvider": + var mv types.SecretsManagerCredentialsProvider + destAddr := &mv + if err := awsRestjson1_deserializeDocumentSecretsManagerCredentialsProvider(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.CredentialsProviderMemberSecretsManagerCredentialsProvider{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsRestjson1_deserializeDocumentDomainNetworkSettings(v **types.DomainNetworkSettings, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DomainNetworkSettings + if *v == nil { + sv = &types.DomainNetworkSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Subnets": + if err := awsRestjson1_deserializeDocumentSubnets(&sv.Subnets, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIdentityProvider(v *types.IdentityProvider, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var uv types.IdentityProvider +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "ActiveDirectoryIdentityProvider": + var mv types.ActiveDirectoryIdentityProvider + destAddr := &mv + if err := awsRestjson1_deserializeDocumentActiveDirectoryIdentityProvider(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.IdentityProviderMemberActiveDirectoryIdentityProvider{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsRestjson1_deserializeDocumentIdentityProviderSummary(v **types.IdentityProviderSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.IdentityProviderSummary + if *v == nil { + sv = &types.IdentityProviderSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FailureMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FailureMessage = ptr.String(jtv) + } + + case "IdentityProvider": + if err := awsRestjson1_deserializeDocumentIdentityProvider(&sv.IdentityProvider, value); err != nil { + return err + } + + case "IdentityProviderArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.IdentityProviderArn = ptr.String(jtv) + } + + case "Product": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Product = ptr.String(jtv) + } + + case "Settings": + if err := awsRestjson1_deserializeDocumentSettings(&sv.Settings, value); err != nil { + return err + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIdentityProviderSummaryList(v *[]types.IdentityProviderSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) } - err := awsRestjson1_deserializeDocumentValidationException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + var cv []types.IdentityProviderSummary + if *v == nil { + cv = []types.IdentityProviderSummary{} + } else { + cv = *v } - errorBody.Seek(0, io.SeekStart) + for _, value := range shape { + var col types.IdentityProviderSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentIdentityProviderSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) - return output + } + *v = cv + return nil } -func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { +func awsRestjson1_deserializeDocumentInstanceSummary(v **types.InstanceSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2191,22 +3479,54 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AccessDeniedException + var sv *types.InstanceSummary if *v == nil { - sv = &types.AccessDeniedException{} + sv = &types.InstanceSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": + case "InstanceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.InstanceId = ptr.String(jtv) + } + + case "LastStatusCheckDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LastStatusCheckDate = ptr.String(jtv) + } + + case "Products": + if err := awsRestjson1_deserializeDocumentStringList(&sv.Products, value); err != nil { + return err + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + case "StatusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) } default: @@ -2218,7 +3538,7 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return nil } -func awsRestjson1_deserializeDocumentActiveDirectoryIdentityProvider(v **types.ActiveDirectoryIdentityProvider, value interface{}) error { +func awsRestjson1_deserializeDocumentInstanceSummaryList(v *[]types.InstanceSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2226,39 +3546,33 @@ func awsRestjson1_deserializeDocumentActiveDirectoryIdentityProvider(v **types.A return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ActiveDirectoryIdentityProvider + var cv []types.InstanceSummary if *v == nil { - sv = &types.ActiveDirectoryIdentityProvider{} + cv = []types.InstanceSummary{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "DirectoryId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.DirectoryId = ptr.String(jtv) - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.InstanceSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentInstanceSummary(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { +func awsRestjson1_deserializeDocumentInstanceUserSummary(v **types.InstanceUserSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2271,22 +3585,90 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ConflictException + var sv *types.InstanceUserSummary if *v == nil { - sv = &types.ConflictException{} + sv = &types.InstanceUserSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": + case "AssociationDate": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.AssociationDate = ptr.String(jtv) + } + + case "DisassociationDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DisassociationDate = ptr.String(jtv) + } + + case "Domain": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Domain = ptr.String(jtv) + } + + case "IdentityProvider": + if err := awsRestjson1_deserializeDocumentIdentityProvider(&sv.IdentityProvider, value); err != nil { + return err + } + + case "InstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + + case "InstanceUserArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.InstanceUserArn = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + case "StatusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + case "Username": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Username = ptr.String(jtv) } default: @@ -2298,7 +3680,7 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } -func awsRestjson1_deserializeDocumentIdentityProvider(v *types.IdentityProvider, value interface{}) error { +func awsRestjson1_deserializeDocumentInstanceUserSummaryList(v *[]types.InstanceUserSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2306,39 +3688,33 @@ func awsRestjson1_deserializeDocumentIdentityProvider(v *types.IdentityProvider, return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var uv types.IdentityProvider -loop: - for key, value := range shape { - if value == nil { - continue - } - switch key { - case "ActiveDirectoryIdentityProvider": - var mv types.ActiveDirectoryIdentityProvider - destAddr := &mv - if err := awsRestjson1_deserializeDocumentActiveDirectoryIdentityProvider(&destAddr, value); err != nil { - return err - } - mv = *destAddr - uv = &types.IdentityProviderMemberActiveDirectoryIdentityProvider{Value: mv} - break loop - - default: - uv = &types.UnknownUnionMember{Tag: key} - break loop + var cv []types.InstanceUserSummary + if *v == nil { + cv = []types.InstanceUserSummary{} + } else { + cv = *v + } + for _, value := range shape { + var col types.InstanceUserSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentInstanceUserSummary(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = uv + *v = cv return nil } -func awsRestjson1_deserializeDocumentIdentityProviderSummary(v **types.IdentityProviderSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2351,50 +3727,22 @@ func awsRestjson1_deserializeDocumentIdentityProviderSummary(v **types.IdentityP return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.IdentityProviderSummary + var sv *types.InternalServerException if *v == nil { - sv = &types.IdentityProviderSummary{} + sv = &types.InternalServerException{} } else { sv = *v } for key, value := range shape { - switch key { - case "FailureMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.FailureMessage = ptr.String(jtv) - } - - case "IdentityProvider": - if err := awsRestjson1_deserializeDocumentIdentityProvider(&sv.IdentityProvider, value); err != nil { - return err - } - - case "Product": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Product = ptr.String(jtv) - } - - case "Settings": - if err := awsRestjson1_deserializeDocumentSettings(&sv.Settings, value); err != nil { - return err - } - - case "Status": + switch key { + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Status = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -2406,7 +3754,7 @@ func awsRestjson1_deserializeDocumentIdentityProviderSummary(v **types.IdentityP return nil } -func awsRestjson1_deserializeDocumentIdentityProviderSummaryList(v *[]types.IdentityProviderSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentIpV4List(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2419,20 +3767,22 @@ func awsRestjson1_deserializeDocumentIdentityProviderSummaryList(v *[]types.Iden return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.IdentityProviderSummary + var cv []string if *v == nil { - cv = []types.IdentityProviderSummary{} + cv = []string{} } else { cv = *v } for _, value := range shape { - var col types.IdentityProviderSummary - destAddr := &col - if err := awsRestjson1_deserializeDocumentIdentityProviderSummary(&destAddr, value); err != nil { - return err + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IpV4 to be of type string, got %T instead", value) + } + col = jtv } - col = *destAddr cv = append(cv, col) } @@ -2440,7 +3790,7 @@ func awsRestjson1_deserializeDocumentIdentityProviderSummaryList(v *[]types.Iden return nil } -func awsRestjson1_deserializeDocumentInstanceSummary(v **types.InstanceSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentLicenseServer(v **types.LicenseServer, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2453,54 +3803,40 @@ func awsRestjson1_deserializeDocumentInstanceSummary(v **types.InstanceSummary, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InstanceSummary + var sv *types.LicenseServer if *v == nil { - sv = &types.InstanceSummary{} + sv = &types.LicenseServer{} } else { sv = *v } for key, value := range shape { switch key { - case "InstanceId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.InstanceId = ptr.String(jtv) - } - - case "LastStatusCheckDate": + case "HealthStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected LicenseServerHealthStatus to be of type string, got %T instead", value) } - sv.LastStatusCheckDate = ptr.String(jtv) - } - - case "Products": - if err := awsRestjson1_deserializeDocumentStringList(&sv.Products, value); err != nil { - return err + sv.HealthStatus = types.LicenseServerHealthStatus(jtv) } - case "Status": + case "Ipv4Address": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Status = ptr.String(jtv) + sv.Ipv4Address = ptr.String(jtv) } - case "StatusMessage": + case "ProvisioningStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected LicenseServerEndpointProvisioningStatus to be of type string, got %T instead", value) } - sv.StatusMessage = ptr.String(jtv) + sv.ProvisioningStatus = types.LicenseServerEndpointProvisioningStatus(jtv) } default: @@ -2512,41 +3848,7 @@ func awsRestjson1_deserializeDocumentInstanceSummary(v **types.InstanceSummary, return nil } -func awsRestjson1_deserializeDocumentInstanceSummaryList(v *[]types.InstanceSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.InstanceSummary - if *v == nil { - cv = []types.InstanceSummary{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.InstanceSummary - destAddr := &col - if err := awsRestjson1_deserializeDocumentInstanceSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentInstanceUserSummary(v **types.InstanceUserSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentLicenseServerEndpoint(v **types.LicenseServerEndpoint, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2559,81 +3861,93 @@ func awsRestjson1_deserializeDocumentInstanceUserSummary(v **types.InstanceUserS return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InstanceUserSummary + var sv *types.LicenseServerEndpoint if *v == nil { - sv = &types.InstanceUserSummary{} + sv = &types.LicenseServerEndpoint{} } else { sv = *v } for key, value := range shape { switch key { - case "AssociationDate": + case "CreationTime": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + } - sv.AssociationDate = ptr.String(jtv) } - case "DisassociationDate": + case "IdentityProviderArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.DisassociationDate = ptr.String(jtv) + sv.IdentityProviderArn = ptr.String(jtv) } - case "Domain": + case "LicenseServerEndpointArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.Domain = ptr.String(jtv) - } - - case "IdentityProvider": - if err := awsRestjson1_deserializeDocumentIdentityProvider(&sv.IdentityProvider, value); err != nil { - return err + sv.LicenseServerEndpointArn = ptr.String(jtv) } - case "InstanceId": + case "LicenseServerEndpointId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected LicenseServerEndpointId to be of type string, got %T instead", value) } - sv.InstanceId = ptr.String(jtv) + sv.LicenseServerEndpointId = ptr.String(jtv) } - case "Status": + case "LicenseServerEndpointProvisioningStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected LicenseServerEndpointProvisioningStatus to be of type string, got %T instead", value) } - sv.Status = ptr.String(jtv) + sv.LicenseServerEndpointProvisioningStatus = types.LicenseServerEndpointProvisioningStatus(jtv) } - case "StatusMessage": + case "LicenseServers": + if err := awsRestjson1_deserializeDocumentLicenseServerList(&sv.LicenseServers, value); err != nil { + return err + } + + case "ServerEndpoint": + if err := awsRestjson1_deserializeDocumentServerEndpoint(&sv.ServerEndpoint, value); err != nil { + return err + } + + case "ServerType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ServerType to be of type string, got %T instead", value) } - sv.StatusMessage = ptr.String(jtv) + sv.ServerType = types.ServerType(jtv) } - case "Username": + case "StatusMessage": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Username = ptr.String(jtv) + sv.StatusMessage = ptr.String(jtv) } default: @@ -2645,7 +3959,7 @@ func awsRestjson1_deserializeDocumentInstanceUserSummary(v **types.InstanceUserS return nil } -func awsRestjson1_deserializeDocumentInstanceUserSummaryList(v *[]types.InstanceUserSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentLicenseServerEndpointList(v *[]types.LicenseServerEndpoint, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2658,17 +3972,17 @@ func awsRestjson1_deserializeDocumentInstanceUserSummaryList(v *[]types.Instance return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.InstanceUserSummary + var cv []types.LicenseServerEndpoint if *v == nil { - cv = []types.InstanceUserSummary{} + cv = []types.LicenseServerEndpoint{} } else { cv = *v } for _, value := range shape { - var col types.InstanceUserSummary + var col types.LicenseServerEndpoint destAddr := &col - if err := awsRestjson1_deserializeDocumentInstanceUserSummary(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentLicenseServerEndpoint(&destAddr, value); err != nil { return err } col = *destAddr @@ -2679,7 +3993,7 @@ func awsRestjson1_deserializeDocumentInstanceUserSummaryList(v *[]types.Instance return nil } -func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { +func awsRestjson1_deserializeDocumentLicenseServerList(v *[]types.LicenseServer, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2687,35 +4001,29 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InternalServerException + var cv []types.LicenseServer if *v == nil { - sv = &types.InternalServerException{} + cv = []types.LicenseServer{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.LicenseServer + destAddr := &col + if err := awsRestjson1_deserializeDocumentLicenseServer(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } @@ -2764,6 +4072,15 @@ func awsRestjson1_deserializeDocumentProductUserSummary(v **types.ProductUserSum sv.Product = ptr.String(jtv) } + case "ProductUserArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ProductUserArn = ptr.String(jtv) + } + case "Status": if value != nil { jtv, ok := value.(string) @@ -2892,6 +4209,86 @@ func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.Resourc return nil } +func awsRestjson1_deserializeDocumentSecretsManagerCredentialsProvider(v **types.SecretsManagerCredentialsProvider, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SecretsManagerCredentialsProvider + if *v == nil { + sv = &types.SecretsManagerCredentialsProvider{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "SecretId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SecretId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentServerEndpoint(v **types.ServerEndpoint, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ServerEndpoint + if *v == nil { + sv = &types.ServerEndpoint{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Endpoint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Endpoint = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -3049,6 +4446,42 @@ func awsRestjson1_deserializeDocumentSubnets(v *[]string, value interface{}) err return nil } +func awsRestjson1_deserializeDocumentTags(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/licensemanagerusersubscriptions/endpoints.go b/service/licensemanagerusersubscriptions/endpoints.go index e84a74fa67c..e7b6a02ffc7 100644 --- a/service/licensemanagerusersubscriptions/endpoints.go +++ b/service/licensemanagerusersubscriptions/endpoints.go @@ -385,7 +385,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://license-manager-user-subscriptions-fips.") diff --git a/service/licensemanagerusersubscriptions/generated.json b/service/licensemanagerusersubscriptions/generated.json index b2ea6dae67e..4b39b45d40a 100644 --- a/service/licensemanagerusersubscriptions/generated.json +++ b/service/licensemanagerusersubscriptions/generated.json @@ -9,15 +9,21 @@ "api_client.go", "api_client_test.go", "api_op_AssociateUser.go", + "api_op_CreateLicenseServerEndpoint.go", + "api_op_DeleteLicenseServerEndpoint.go", "api_op_DeregisterIdentityProvider.go", "api_op_DisassociateUser.go", "api_op_ListIdentityProviders.go", "api_op_ListInstances.go", + "api_op_ListLicenseServerEndpoints.go", "api_op_ListProductSubscriptions.go", + "api_op_ListTagsForResource.go", "api_op_ListUserAssociations.go", "api_op_RegisterIdentityProvider.go", "api_op_StartProductSubscription.go", "api_op_StopProductSubscription.go", + "api_op_TagResource.go", + "api_op_UntagResource.go", "api_op_UpdateIdentityProviderSettings.go", "auth.go", "deserializers.go", @@ -32,6 +38,7 @@ "protocol_test.go", "serializers.go", "snapshot_test.go", + "types/enums.go", "types/errors.go", "types/types.go", "types/types_exported_test.go", diff --git a/service/licensemanagerusersubscriptions/serializers.go b/service/licensemanagerusersubscriptions/serializers.go index b721eeecbc0..5d910eddf6a 100644 --- a/service/licensemanagerusersubscriptions/serializers.go +++ b/service/licensemanagerusersubscriptions/serializers.go @@ -105,6 +105,13 @@ func awsRestjson1_serializeOpDocumentAssociateUserInput(v *AssociateUserInput, v ok.String(*v.InstanceId) } + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + if v.Username != nil { ok := object.Key("Username") ok.String(*v.Username) @@ -113,14 +120,14 @@ func awsRestjson1_serializeOpDocumentAssociateUserInput(v *AssociateUserInput, v return nil } -type awsRestjson1_serializeOpDeregisterIdentityProvider struct { +type awsRestjson1_serializeOpCreateLicenseServerEndpoint struct { } -func (*awsRestjson1_serializeOpDeregisterIdentityProvider) ID() string { +func (*awsRestjson1_serializeOpCreateLicenseServerEndpoint) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeregisterIdentityProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateLicenseServerEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -132,13 +139,13 @@ func (m *awsRestjson1_serializeOpDeregisterIdentityProvider) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeregisterIdentityProviderInput) + input, ok := in.Parameters.(*CreateLicenseServerEndpointInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/identity-provider/DeregisterIdentityProvider") + opPath, opQuery := httpbinding.SplitURI("/license-server/CreateLicenseServerEndpoint") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -157,7 +164,7 @@ func (m *awsRestjson1_serializeOpDeregisterIdentityProvider) HandleSerialize(ctx restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentDeregisterIdentityProviderInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentCreateLicenseServerEndpointInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -174,7 +181,7 @@ func (m *awsRestjson1_serializeOpDeregisterIdentityProvider) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeregisterIdentityProviderInput(v *DeregisterIdentityProviderInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateLicenseServerEndpointInput(v *CreateLicenseServerEndpointInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -182,33 +189,40 @@ func awsRestjson1_serializeOpHttpBindingsDeregisterIdentityProviderInput(v *Dere return nil } -func awsRestjson1_serializeOpDocumentDeregisterIdentityProviderInput(v *DeregisterIdentityProviderInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentCreateLicenseServerEndpointInput(v *CreateLicenseServerEndpointInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.IdentityProvider != nil { - ok := object.Key("IdentityProvider") - if err := awsRestjson1_serializeDocumentIdentityProvider(v.IdentityProvider, ok); err != nil { + if v.IdentityProviderArn != nil { + ok := object.Key("IdentityProviderArn") + ok.String(*v.IdentityProviderArn) + } + + if v.LicenseServerSettings != nil { + ok := object.Key("LicenseServerSettings") + if err := awsRestjson1_serializeDocumentLicenseServerSettings(v.LicenseServerSettings, ok); err != nil { return err } } - if v.Product != nil { - ok := object.Key("Product") - ok.String(*v.Product) + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpDisassociateUser struct { +type awsRestjson1_serializeOpDeleteLicenseServerEndpoint struct { } -func (*awsRestjson1_serializeOpDisassociateUser) ID() string { +func (*awsRestjson1_serializeOpDeleteLicenseServerEndpoint) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDisassociateUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeleteLicenseServerEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -220,13 +234,13 @@ func (m *awsRestjson1_serializeOpDisassociateUser) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DisassociateUserInput) + input, ok := in.Parameters.(*DeleteLicenseServerEndpointInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/user/DisassociateUser") + opPath, opQuery := httpbinding.SplitURI("/license-server/DeleteLicenseServerEndpoint") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -245,7 +259,7 @@ func (m *awsRestjson1_serializeOpDisassociateUser) HandleSerialize(ctx context.C restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentDisassociateUserInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentDeleteLicenseServerEndpointInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -262,7 +276,7 @@ func (m *awsRestjson1_serializeOpDisassociateUser) HandleSerialize(ctx context.C span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDisassociateUserInput(v *DisassociateUserInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeleteLicenseServerEndpointInput(v *DeleteLicenseServerEndpointInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -270,43 +284,31 @@ func awsRestjson1_serializeOpHttpBindingsDisassociateUserInput(v *DisassociateUs return nil } -func awsRestjson1_serializeOpDocumentDisassociateUserInput(v *DisassociateUserInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentDeleteLicenseServerEndpointInput(v *DeleteLicenseServerEndpointInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Domain != nil { - ok := object.Key("Domain") - ok.String(*v.Domain) - } - - if v.IdentityProvider != nil { - ok := object.Key("IdentityProvider") - if err := awsRestjson1_serializeDocumentIdentityProvider(v.IdentityProvider, ok); err != nil { - return err - } - } - - if v.InstanceId != nil { - ok := object.Key("InstanceId") - ok.String(*v.InstanceId) + if v.LicenseServerEndpointArn != nil { + ok := object.Key("LicenseServerEndpointArn") + ok.String(*v.LicenseServerEndpointArn) } - if v.Username != nil { - ok := object.Key("Username") - ok.String(*v.Username) + if len(v.ServerType) > 0 { + ok := object.Key("ServerType") + ok.String(string(v.ServerType)) } return nil } -type awsRestjson1_serializeOpListIdentityProviders struct { +type awsRestjson1_serializeOpDeregisterIdentityProvider struct { } -func (*awsRestjson1_serializeOpListIdentityProviders) ID() string { +func (*awsRestjson1_serializeOpDeregisterIdentityProvider) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListIdentityProviders) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeregisterIdentityProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -318,13 +320,13 @@ func (m *awsRestjson1_serializeOpListIdentityProviders) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListIdentityProvidersInput) + input, ok := in.Parameters.(*DeregisterIdentityProviderInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/identity-provider/ListIdentityProviders") + opPath, opQuery := httpbinding.SplitURI("/identity-provider/DeregisterIdentityProvider") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -343,7 +345,7 @@ func (m *awsRestjson1_serializeOpListIdentityProviders) HandleSerialize(ctx cont restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentListIdentityProvidersInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentDeregisterIdentityProviderInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -360,7 +362,7 @@ func (m *awsRestjson1_serializeOpListIdentityProviders) HandleSerialize(ctx cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListIdentityProvidersInput(v *ListIdentityProvidersInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeregisterIdentityProviderInput(v *DeregisterIdentityProviderInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -368,31 +370,38 @@ func awsRestjson1_serializeOpHttpBindingsListIdentityProvidersInput(v *ListIdent return nil } -func awsRestjson1_serializeOpDocumentListIdentityProvidersInput(v *ListIdentityProvidersInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentDeregisterIdentityProviderInput(v *DeregisterIdentityProviderInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.MaxResults != nil { - ok := object.Key("MaxResults") - ok.Integer(*v.MaxResults) + if v.IdentityProvider != nil { + ok := object.Key("IdentityProvider") + if err := awsRestjson1_serializeDocumentIdentityProvider(v.IdentityProvider, ok); err != nil { + return err + } } - if v.NextToken != nil { - ok := object.Key("NextToken") - ok.String(*v.NextToken) + if v.IdentityProviderArn != nil { + ok := object.Key("IdentityProviderArn") + ok.String(*v.IdentityProviderArn) + } + + if v.Product != nil { + ok := object.Key("Product") + ok.String(*v.Product) } return nil } -type awsRestjson1_serializeOpListInstances struct { +type awsRestjson1_serializeOpDisassociateUser struct { } -func (*awsRestjson1_serializeOpListInstances) ID() string { +func (*awsRestjson1_serializeOpDisassociateUser) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDisassociateUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -404,13 +413,13 @@ func (m *awsRestjson1_serializeOpListInstances) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListInstancesInput) + input, ok := in.Parameters.(*DisassociateUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/instance/ListInstances") + opPath, opQuery := httpbinding.SplitURI("/user/DisassociateUser") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -429,7 +438,7 @@ func (m *awsRestjson1_serializeOpListInstances) HandleSerialize(ctx context.Cont restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentListInstancesInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentDisassociateUserInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -446,7 +455,7 @@ func (m *awsRestjson1_serializeOpListInstances) HandleSerialize(ctx context.Cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListInstancesInput(v *ListInstancesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDisassociateUserInput(v *DisassociateUserInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -454,38 +463,48 @@ func awsRestjson1_serializeOpHttpBindingsListInstancesInput(v *ListInstancesInpu return nil } -func awsRestjson1_serializeOpDocumentListInstancesInput(v *ListInstancesInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentDisassociateUserInput(v *DisassociateUserInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Filters != nil { - ok := object.Key("Filters") - if err := awsRestjson1_serializeDocumentFilterList(v.Filters, ok); err != nil { + if v.Domain != nil { + ok := object.Key("Domain") + ok.String(*v.Domain) + } + + if v.IdentityProvider != nil { + ok := object.Key("IdentityProvider") + if err := awsRestjson1_serializeDocumentIdentityProvider(v.IdentityProvider, ok); err != nil { return err } } - if v.MaxResults != nil { - ok := object.Key("MaxResults") - ok.Integer(*v.MaxResults) + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) } - if v.NextToken != nil { - ok := object.Key("NextToken") - ok.String(*v.NextToken) + if v.InstanceUserArn != nil { + ok := object.Key("InstanceUserArn") + ok.String(*v.InstanceUserArn) + } + + if v.Username != nil { + ok := object.Key("Username") + ok.String(*v.Username) } return nil } -type awsRestjson1_serializeOpListProductSubscriptions struct { +type awsRestjson1_serializeOpListIdentityProviders struct { } -func (*awsRestjson1_serializeOpListProductSubscriptions) ID() string { +func (*awsRestjson1_serializeOpListIdentityProviders) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListProductSubscriptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListIdentityProviders) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -497,13 +516,13 @@ func (m *awsRestjson1_serializeOpListProductSubscriptions) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListProductSubscriptionsInput) + input, ok := in.Parameters.(*ListIdentityProvidersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/user/ListProductSubscriptions") + opPath, opQuery := httpbinding.SplitURI("/identity-provider/ListIdentityProviders") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -522,7 +541,7 @@ func (m *awsRestjson1_serializeOpListProductSubscriptions) HandleSerialize(ctx c restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentListProductSubscriptionsInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentListIdentityProvidersInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -539,7 +558,7 @@ func (m *awsRestjson1_serializeOpListProductSubscriptions) HandleSerialize(ctx c span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListProductSubscriptionsInput(v *ListProductSubscriptionsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListIdentityProvidersInput(v *ListIdentityProvidersInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -547,7 +566,7 @@ func awsRestjson1_serializeOpHttpBindingsListProductSubscriptionsInput(v *ListPr return nil } -func awsRestjson1_serializeOpDocumentListProductSubscriptionsInput(v *ListProductSubscriptionsInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentListIdentityProvidersInput(v *ListIdentityProvidersInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -558,13 +577,6 @@ func awsRestjson1_serializeOpDocumentListProductSubscriptionsInput(v *ListProduc } } - if v.IdentityProvider != nil { - ok := object.Key("IdentityProvider") - if err := awsRestjson1_serializeDocumentIdentityProvider(v.IdentityProvider, ok); err != nil { - return err - } - } - if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) @@ -575,22 +587,17 @@ func awsRestjson1_serializeOpDocumentListProductSubscriptionsInput(v *ListProduc ok.String(*v.NextToken) } - if v.Product != nil { - ok := object.Key("Product") - ok.String(*v.Product) - } - return nil } -type awsRestjson1_serializeOpListUserAssociations struct { +type awsRestjson1_serializeOpListInstances struct { } -func (*awsRestjson1_serializeOpListUserAssociations) ID() string { +func (*awsRestjson1_serializeOpListInstances) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListUserAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -602,13 +609,13 @@ func (m *awsRestjson1_serializeOpListUserAssociations) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListUserAssociationsInput) + input, ok := in.Parameters.(*ListInstancesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/user/ListUserAssociations") + opPath, opQuery := httpbinding.SplitURI("/instance/ListInstances") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -627,7 +634,7 @@ func (m *awsRestjson1_serializeOpListUserAssociations) HandleSerialize(ctx conte restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentListUserAssociationsInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentListInstancesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -644,7 +651,7 @@ func (m *awsRestjson1_serializeOpListUserAssociations) HandleSerialize(ctx conte span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListUserAssociationsInput(v *ListUserAssociationsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListInstancesInput(v *ListInstancesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -652,7 +659,7 @@ func awsRestjson1_serializeOpHttpBindingsListUserAssociationsInput(v *ListUserAs return nil } -func awsRestjson1_serializeOpDocumentListUserAssociationsInput(v *ListUserAssociationsInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentListInstancesInput(v *ListInstancesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -663,18 +670,6 @@ func awsRestjson1_serializeOpDocumentListUserAssociationsInput(v *ListUserAssoci } } - if v.IdentityProvider != nil { - ok := object.Key("IdentityProvider") - if err := awsRestjson1_serializeDocumentIdentityProvider(v.IdentityProvider, ok); err != nil { - return err - } - } - - if v.InstanceId != nil { - ok := object.Key("InstanceId") - ok.String(*v.InstanceId) - } - if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) @@ -688,14 +683,14 @@ func awsRestjson1_serializeOpDocumentListUserAssociationsInput(v *ListUserAssoci return nil } -type awsRestjson1_serializeOpRegisterIdentityProvider struct { +type awsRestjson1_serializeOpListLicenseServerEndpoints struct { } -func (*awsRestjson1_serializeOpRegisterIdentityProvider) ID() string { +func (*awsRestjson1_serializeOpListLicenseServerEndpoints) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpRegisterIdentityProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListLicenseServerEndpoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -707,13 +702,13 @@ func (m *awsRestjson1_serializeOpRegisterIdentityProvider) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*RegisterIdentityProviderInput) + input, ok := in.Parameters.(*ListLicenseServerEndpointsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/identity-provider/RegisterIdentityProvider") + opPath, opQuery := httpbinding.SplitURI("/license-server/ListLicenseServerEndpoints") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -732,7 +727,7 @@ func (m *awsRestjson1_serializeOpRegisterIdentityProvider) HandleSerialize(ctx c restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentRegisterIdentityProviderInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentListLicenseServerEndpointsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -749,7 +744,7 @@ func (m *awsRestjson1_serializeOpRegisterIdentityProvider) HandleSerialize(ctx c span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsRegisterIdentityProviderInput(v *RegisterIdentityProviderInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListLicenseServerEndpointsInput(v *ListLicenseServerEndpointsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -757,40 +752,38 @@ func awsRestjson1_serializeOpHttpBindingsRegisterIdentityProviderInput(v *Regist return nil } -func awsRestjson1_serializeOpDocumentRegisterIdentityProviderInput(v *RegisterIdentityProviderInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentListLicenseServerEndpointsInput(v *ListLicenseServerEndpointsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.IdentityProvider != nil { - ok := object.Key("IdentityProvider") - if err := awsRestjson1_serializeDocumentIdentityProvider(v.IdentityProvider, ok); err != nil { + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsRestjson1_serializeDocumentFilterList(v.Filters, ok); err != nil { return err } } - if v.Product != nil { - ok := object.Key("Product") - ok.String(*v.Product) + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) } - if v.Settings != nil { - ok := object.Key("Settings") - if err := awsRestjson1_serializeDocumentSettings(v.Settings, ok); err != nil { - return err - } + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) } return nil } -type awsRestjson1_serializeOpStartProductSubscription struct { +type awsRestjson1_serializeOpListProductSubscriptions struct { } -func (*awsRestjson1_serializeOpStartProductSubscription) ID() string { +func (*awsRestjson1_serializeOpListProductSubscriptions) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpStartProductSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListProductSubscriptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -802,13 +795,13 @@ func (m *awsRestjson1_serializeOpStartProductSubscription) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StartProductSubscriptionInput) + input, ok := in.Parameters.(*ListProductSubscriptionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/user/StartProductSubscription") + opPath, opQuery := httpbinding.SplitURI("/user/ListProductSubscriptions") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -827,7 +820,7 @@ func (m *awsRestjson1_serializeOpStartProductSubscription) HandleSerialize(ctx c restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentStartProductSubscriptionInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentListProductSubscriptionsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -844,7 +837,7 @@ func (m *awsRestjson1_serializeOpStartProductSubscription) HandleSerialize(ctx c span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsStartProductSubscriptionInput(v *StartProductSubscriptionInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListProductSubscriptionsInput(v *ListProductSubscriptionsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -852,13 +845,15 @@ func awsRestjson1_serializeOpHttpBindingsStartProductSubscriptionInput(v *StartP return nil } -func awsRestjson1_serializeOpDocumentStartProductSubscriptionInput(v *StartProductSubscriptionInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentListProductSubscriptionsInput(v *ListProductSubscriptionsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Domain != nil { - ok := object.Key("Domain") - ok.String(*v.Domain) + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsRestjson1_serializeDocumentFilterList(v.Filters, ok); err != nil { + return err + } } if v.IdentityProvider != nil { @@ -868,27 +863,32 @@ func awsRestjson1_serializeOpDocumentStartProductSubscriptionInput(v *StartProdu } } + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + if v.Product != nil { ok := object.Key("Product") ok.String(*v.Product) } - if v.Username != nil { - ok := object.Key("Username") - ok.String(*v.Username) - } - return nil } -type awsRestjson1_serializeOpStopProductSubscription struct { +type awsRestjson1_serializeOpListTagsForResource struct { } -func (*awsRestjson1_serializeOpStopProductSubscription) ID() string { +func (*awsRestjson1_serializeOpListTagsForResource) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpStopProductSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -900,16 +900,16 @@ func (m *awsRestjson1_serializeOpStopProductSubscription) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StopProductSubscriptionInput) + input, ok := in.Parameters.(*ListTagsForResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/user/StopProductSubscription") + opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -922,14 +922,504 @@ func (m *awsRestjson1_serializeOpStopProductSubscription) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: err} } - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentStopProductSubscriptionInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListUserAssociations struct { +} + +func (*awsRestjson1_serializeOpListUserAssociations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListUserAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListUserAssociationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/user/ListUserAssociations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListUserAssociationsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListUserAssociationsInput(v *ListUserAssociationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListUserAssociationsInput(v *ListUserAssociationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsRestjson1_serializeDocumentFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.IdentityProvider != nil { + ok := object.Key("IdentityProvider") + if err := awsRestjson1_serializeDocumentIdentityProvider(v.IdentityProvider, ok); err != nil { + return err + } + } + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpRegisterIdentityProvider struct { +} + +func (*awsRestjson1_serializeOpRegisterIdentityProvider) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpRegisterIdentityProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*RegisterIdentityProviderInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/identity-provider/RegisterIdentityProvider") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentRegisterIdentityProviderInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsRegisterIdentityProviderInput(v *RegisterIdentityProviderInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentRegisterIdentityProviderInput(v *RegisterIdentityProviderInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IdentityProvider != nil { + ok := object.Key("IdentityProvider") + if err := awsRestjson1_serializeDocumentIdentityProvider(v.IdentityProvider, ok); err != nil { + return err + } + } + + if v.Product != nil { + ok := object.Key("Product") + ok.String(*v.Product) + } + + if v.Settings != nil { + ok := object.Key("Settings") + if err := awsRestjson1_serializeDocumentSettings(v.Settings, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpStartProductSubscription struct { +} + +func (*awsRestjson1_serializeOpStartProductSubscription) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartProductSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartProductSubscriptionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/user/StartProductSubscription") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentStartProductSubscriptionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsStartProductSubscriptionInput(v *StartProductSubscriptionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentStartProductSubscriptionInput(v *StartProductSubscriptionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Domain != nil { + ok := object.Key("Domain") + ok.String(*v.Domain) + } + + if v.IdentityProvider != nil { + ok := object.Key("IdentityProvider") + if err := awsRestjson1_serializeDocumentIdentityProvider(v.IdentityProvider, ok); err != nil { + return err + } + } + + if v.Product != nil { + ok := object.Key("Product") + ok.String(*v.Product) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + if v.Username != nil { + ok := object.Key("Username") + ok.String(*v.Username) + } + + return nil +} + +type awsRestjson1_serializeOpStopProductSubscription struct { +} + +func (*awsRestjson1_serializeOpStopProductSubscription) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStopProductSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StopProductSubscriptionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/user/StopProductSubscription") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentStopProductSubscriptionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsStopProductSubscriptionInput(v *StopProductSubscriptionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentStopProductSubscriptionInput(v *StopProductSubscriptionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Domain != nil { + ok := object.Key("Domain") + ok.String(*v.Domain) + } + + if v.IdentityProvider != nil { + ok := object.Key("IdentityProvider") + if err := awsRestjson1_serializeDocumentIdentityProvider(v.IdentityProvider, ok); err != nil { + return err + } + } + + if v.Product != nil { + ok := object.Key("Product") + ok.String(*v.Product) + } + + if v.ProductUserArn != nil { + ok := object.Key("ProductUserArn") + ok.String(*v.ProductUserArn) + } + + if v.Username != nil { + ok := object.Key("Username") + ok.String(*v.Username) + } + + return nil +} + +type awsRestjson1_serializeOpTagResource struct { +} + +func (*awsRestjson1_serializeOpTagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*TagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -942,38 +1432,109 @@ func (m *awsRestjson1_serializeOpStopProductSubscription) HandleSerialize(ctx co span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsStopProductSubscriptionInput(v *StopProductSubscriptionInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + return nil } -func awsRestjson1_serializeOpDocumentStopProductSubscriptionInput(v *StopProductSubscriptionInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Domain != nil { - ok := object.Key("Domain") - ok.String(*v.Domain) - } - - if v.IdentityProvider != nil { - ok := object.Key("IdentityProvider") - if err := awsRestjson1_serializeDocumentIdentityProvider(v.IdentityProvider, ok); err != nil { + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { return err } } - if v.Product != nil { - ok := object.Key("Product") - ok.String(*v.Product) + return nil +} + +type awsRestjson1_serializeOpUntagResource struct { +} + +func (*awsRestjson1_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - if v.Username != nil { - ok := object.Key("Username") - ok.String(*v.Username) + input, ok := in.Parameters.(*UntagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + if v.TagKeys != nil { + for i := range v.TagKeys { + encoder.AddQuery("tagKeys").String(v.TagKeys[i]) + } } return nil @@ -1059,6 +1620,11 @@ func awsRestjson1_serializeOpDocumentUpdateIdentityProviderSettingsInput(v *Upda } } + if v.IdentityProviderArn != nil { + ok := object.Key("IdentityProviderArn") + ok.String(*v.IdentityProviderArn) + } + if v.Product != nil { ok := object.Key("Product") ok.String(*v.Product) @@ -1078,6 +1644,18 @@ func awsRestjson1_serializeDocumentActiveDirectoryIdentityProvider(v *types.Acti object := value.Object() defer object.Close() + if v.ActiveDirectorySettings != nil { + ok := object.Key("ActiveDirectorySettings") + if err := awsRestjson1_serializeDocumentActiveDirectorySettings(v.ActiveDirectorySettings, ok); err != nil { + return err + } + } + + if len(v.ActiveDirectoryType) > 0 { + ok := object.Key("ActiveDirectoryType") + ok.String(string(v.ActiveDirectoryType)) + } + if v.DirectoryId != nil { ok := object.Key("DirectoryId") ok.String(*v.DirectoryId) @@ -1086,6 +1664,71 @@ func awsRestjson1_serializeDocumentActiveDirectoryIdentityProvider(v *types.Acti return nil } +func awsRestjson1_serializeDocumentActiveDirectorySettings(v *types.ActiveDirectorySettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DomainCredentialsProvider != nil { + ok := object.Key("DomainCredentialsProvider") + if err := awsRestjson1_serializeDocumentCredentialsProvider(v.DomainCredentialsProvider, ok); err != nil { + return err + } + } + + if v.DomainIpv4List != nil { + ok := object.Key("DomainIpv4List") + if err := awsRestjson1_serializeDocumentIpV4List(v.DomainIpv4List, ok); err != nil { + return err + } + } + + if v.DomainName != nil { + ok := object.Key("DomainName") + ok.String(*v.DomainName) + } + + if v.DomainNetworkSettings != nil { + ok := object.Key("DomainNetworkSettings") + if err := awsRestjson1_serializeDocumentDomainNetworkSettings(v.DomainNetworkSettings, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentCredentialsProvider(v types.CredentialsProvider, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.CredentialsProviderMemberSecretsManagerCredentialsProvider: + av := object.Key("SecretsManagerCredentialsProvider") + if err := awsRestjson1_serializeDocumentSecretsManagerCredentialsProvider(&uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + +func awsRestjson1_serializeDocumentDomainNetworkSettings(v *types.DomainNetworkSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Subnets != nil { + ok := object.Key("Subnets") + if err := awsRestjson1_serializeDocumentSubnets(v.Subnets, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentFilter(v *types.Filter, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1139,6 +1782,80 @@ func awsRestjson1_serializeDocumentIdentityProvider(v types.IdentityProvider, va return nil } +func awsRestjson1_serializeDocumentIpV4List(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentLicenseServerSettings(v *types.LicenseServerSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ServerSettings != nil { + ok := object.Key("ServerSettings") + if err := awsRestjson1_serializeDocumentServerSettings(v.ServerSettings, ok); err != nil { + return err + } + } + + if len(v.ServerType) > 0 { + ok := object.Key("ServerType") + ok.String(string(v.ServerType)) + } + + return nil +} + +func awsRestjson1_serializeDocumentRdsSalSettings(v *types.RdsSalSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RdsSalCredentialsProvider != nil { + ok := object.Key("RdsSalCredentialsProvider") + if err := awsRestjson1_serializeDocumentCredentialsProvider(v.RdsSalCredentialsProvider, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentSecretsManagerCredentialsProvider(v *types.SecretsManagerCredentialsProvider, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SecretId != nil { + ok := object.Key("SecretId") + ok.String(*v.SecretId) + } + + return nil +} + +func awsRestjson1_serializeDocumentServerSettings(v types.ServerSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.ServerSettingsMemberRdsSalSettings: + av := object.Key("RdsSalSettings") + if err := awsRestjson1_serializeDocumentRdsSalSettings(&uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + func awsRestjson1_serializeDocumentSettings(v *types.Settings, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1169,6 +1886,17 @@ func awsRestjson1_serializeDocumentSubnets(v []string, value smithyjson.Value) e return nil } +func awsRestjson1_serializeDocumentTags(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + func awsRestjson1_serializeDocumentUpdateSettings(v *types.UpdateSettings, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/licensemanagerusersubscriptions/snapshot/api_op_CreateLicenseServerEndpoint.go.snap b/service/licensemanagerusersubscriptions/snapshot/api_op_CreateLicenseServerEndpoint.go.snap new file mode 100644 index 00000000000..a9c64d0b953 --- /dev/null +++ b/service/licensemanagerusersubscriptions/snapshot/api_op_CreateLicenseServerEndpoint.go.snap @@ -0,0 +1,41 @@ +CreateLicenseServerEndpoint + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/licensemanagerusersubscriptions/snapshot/api_op_DeleteLicenseServerEndpoint.go.snap b/service/licensemanagerusersubscriptions/snapshot/api_op_DeleteLicenseServerEndpoint.go.snap new file mode 100644 index 00000000000..b4ff3a8f11d --- /dev/null +++ b/service/licensemanagerusersubscriptions/snapshot/api_op_DeleteLicenseServerEndpoint.go.snap @@ -0,0 +1,41 @@ +DeleteLicenseServerEndpoint + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/licensemanagerusersubscriptions/snapshot/api_op_ListLicenseServerEndpoints.go.snap b/service/licensemanagerusersubscriptions/snapshot/api_op_ListLicenseServerEndpoints.go.snap new file mode 100644 index 00000000000..7785a476fa7 --- /dev/null +++ b/service/licensemanagerusersubscriptions/snapshot/api_op_ListLicenseServerEndpoints.go.snap @@ -0,0 +1,40 @@ +ListLicenseServerEndpoints + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/licensemanagerusersubscriptions/snapshot/api_op_ListTagsForResource.go.snap b/service/licensemanagerusersubscriptions/snapshot/api_op_ListTagsForResource.go.snap new file mode 100644 index 00000000000..071d3ac4e96 --- /dev/null +++ b/service/licensemanagerusersubscriptions/snapshot/api_op_ListTagsForResource.go.snap @@ -0,0 +1,41 @@ +ListTagsForResource + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/licensemanagerusersubscriptions/snapshot/api_op_TagResource.go.snap b/service/licensemanagerusersubscriptions/snapshot/api_op_TagResource.go.snap new file mode 100644 index 00000000000..ae6f8e0846c --- /dev/null +++ b/service/licensemanagerusersubscriptions/snapshot/api_op_TagResource.go.snap @@ -0,0 +1,41 @@ +TagResource + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/licensemanagerusersubscriptions/snapshot/api_op_UntagResource.go.snap b/service/licensemanagerusersubscriptions/snapshot/api_op_UntagResource.go.snap new file mode 100644 index 00000000000..c7bbe038d98 --- /dev/null +++ b/service/licensemanagerusersubscriptions/snapshot/api_op_UntagResource.go.snap @@ -0,0 +1,41 @@ +UntagResource + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/licensemanagerusersubscriptions/snapshot_test.go b/service/licensemanagerusersubscriptions/snapshot_test.go index 7522e929552..577ce50ffa1 100644 --- a/service/licensemanagerusersubscriptions/snapshot_test.go +++ b/service/licensemanagerusersubscriptions/snapshot_test.go @@ -74,6 +74,30 @@ func TestCheckSnapshot_AssociateUser(t *testing.T) { } } +func TestCheckSnapshot_CreateLicenseServerEndpoint(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateLicenseServerEndpoint(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateLicenseServerEndpoint") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_DeleteLicenseServerEndpoint(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteLicenseServerEndpoint(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteLicenseServerEndpoint") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeregisterIdentityProvider(t *testing.T) { svc := New(Options{}) _, err := svc.DeregisterIdentityProvider(context.Background(), nil, func(o *Options) { @@ -122,6 +146,18 @@ func TestCheckSnapshot_ListInstances(t *testing.T) { } } +func TestCheckSnapshot_ListLicenseServerEndpoints(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListLicenseServerEndpoints(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListLicenseServerEndpoints") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListProductSubscriptions(t *testing.T) { svc := New(Options{}) _, err := svc.ListProductSubscriptions(context.Background(), nil, func(o *Options) { @@ -134,6 +170,18 @@ func TestCheckSnapshot_ListProductSubscriptions(t *testing.T) { } } +func TestCheckSnapshot_ListTagsForResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListTagsForResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListTagsForResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListUserAssociations(t *testing.T) { svc := New(Options{}) _, err := svc.ListUserAssociations(context.Background(), nil, func(o *Options) { @@ -182,6 +230,30 @@ func TestCheckSnapshot_StopProductSubscription(t *testing.T) { } } +func TestCheckSnapshot_TagResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.TagResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "TagResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_UntagResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.UntagResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UntagResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateIdentityProviderSettings(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateIdentityProviderSettings(context.Background(), nil, func(o *Options) { @@ -205,6 +277,30 @@ func TestUpdateSnapshot_AssociateUser(t *testing.T) { } } +func TestUpdateSnapshot_CreateLicenseServerEndpoint(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateLicenseServerEndpoint(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateLicenseServerEndpoint") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_DeleteLicenseServerEndpoint(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteLicenseServerEndpoint(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteLicenseServerEndpoint") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeregisterIdentityProvider(t *testing.T) { svc := New(Options{}) _, err := svc.DeregisterIdentityProvider(context.Background(), nil, func(o *Options) { @@ -253,6 +349,18 @@ func TestUpdateSnapshot_ListInstances(t *testing.T) { } } +func TestUpdateSnapshot_ListLicenseServerEndpoints(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListLicenseServerEndpoints(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListLicenseServerEndpoints") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListProductSubscriptions(t *testing.T) { svc := New(Options{}) _, err := svc.ListProductSubscriptions(context.Background(), nil, func(o *Options) { @@ -265,6 +373,18 @@ func TestUpdateSnapshot_ListProductSubscriptions(t *testing.T) { } } +func TestUpdateSnapshot_ListTagsForResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListTagsForResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListTagsForResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListUserAssociations(t *testing.T) { svc := New(Options{}) _, err := svc.ListUserAssociations(context.Background(), nil, func(o *Options) { @@ -313,6 +433,30 @@ func TestUpdateSnapshot_StopProductSubscription(t *testing.T) { } } +func TestUpdateSnapshot_TagResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.TagResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "TagResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_UntagResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.UntagResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UntagResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateIdentityProviderSettings(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateIdentityProviderSettings(context.Background(), nil, func(o *Options) { diff --git a/service/licensemanagerusersubscriptions/types/enums.go b/service/licensemanagerusersubscriptions/types/enums.go new file mode 100644 index 00000000000..0c06c85f7e3 --- /dev/null +++ b/service/licensemanagerusersubscriptions/types/enums.go @@ -0,0 +1,100 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type ActiveDirectoryType string + +// Enum values for ActiveDirectoryType +const ( + // SELF_MANAGED type of Active Directory + ActiveDirectoryTypeSelfManaged ActiveDirectoryType = "SELF_MANAGED" + // AWS_MANAGED type of Active Directory + ActiveDirectoryTypeAwsManaged ActiveDirectoryType = "AWS_MANAGED" +) + +// Values returns all known values for ActiveDirectoryType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ActiveDirectoryType) Values() []ActiveDirectoryType { + return []ActiveDirectoryType{ + "SELF_MANAGED", + "AWS_MANAGED", + } +} + +type LicenseServerEndpointProvisioningStatus string + +// Enum values for LicenseServerEndpointProvisioningStatus +const ( + // + LicenseServerEndpointProvisioningStatusProvisioning LicenseServerEndpointProvisioningStatus = "PROVISIONING" + // + LicenseServerEndpointProvisioningStatusProvisioningFailed LicenseServerEndpointProvisioningStatus = "PROVISIONING_FAILED" + // + LicenseServerEndpointProvisioningStatusProvisioned LicenseServerEndpointProvisioningStatus = "PROVISIONED" + // + LicenseServerEndpointProvisioningStatusDeleting LicenseServerEndpointProvisioningStatus = "DELETING" + // + LicenseServerEndpointProvisioningStatusDeletionFailed LicenseServerEndpointProvisioningStatus = "DELETION_FAILED" + // + LicenseServerEndpointProvisioningStatusDeleted LicenseServerEndpointProvisioningStatus = "DELETED" +) + +// Values returns all known values for LicenseServerEndpointProvisioningStatus. +// Note that this can be expanded in the future, and so it is only as up to date as +// the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (LicenseServerEndpointProvisioningStatus) Values() []LicenseServerEndpointProvisioningStatus { + return []LicenseServerEndpointProvisioningStatus{ + "PROVISIONING", + "PROVISIONING_FAILED", + "PROVISIONED", + "DELETING", + "DELETION_FAILED", + "DELETED", + } +} + +type LicenseServerHealthStatus string + +// Enum values for LicenseServerHealthStatus +const ( + // + LicenseServerHealthStatusHealthy LicenseServerHealthStatus = "HEALTHY" + // + LicenseServerHealthStatusUnhealthy LicenseServerHealthStatus = "UNHEALTHY" + // + LicenseServerHealthStatusNotApplicable LicenseServerHealthStatus = "NOT_APPLICABLE" +) + +// Values returns all known values for LicenseServerHealthStatus. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (LicenseServerHealthStatus) Values() []LicenseServerHealthStatus { + return []LicenseServerHealthStatus{ + "HEALTHY", + "UNHEALTHY", + "NOT_APPLICABLE", + } +} + +type ServerType string + +// Enum values for ServerType +const ( + // + ServerTypeRdsSal ServerType = "RDS_SAL" +) + +// Values returns all known values for ServerType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ServerType) Values() []ServerType { + return []ServerType{ + "RDS_SAL", + } +} diff --git a/service/licensemanagerusersubscriptions/types/types.go b/service/licensemanagerusersubscriptions/types/types.go index 0b8e0ed2305..b78198afb73 100644 --- a/service/licensemanagerusersubscriptions/types/types.go +++ b/service/licensemanagerusersubscriptions/types/types.go @@ -4,20 +4,81 @@ package types import ( smithydocument "github.com/aws/smithy-go/document" + "time" ) // Details about an Active Directory identity provider. type ActiveDirectoryIdentityProvider struct { + // The ActiveDirectorySettings resource contains details about the Active + // Directory, including network access details such as domain name and IP + // addresses, and the credential provider for user administration. + ActiveDirectorySettings *ActiveDirectorySettings + + // The type of Active Directory – either a self-managed Active Directory or an + // Amazon Web Services Managed Active Directory. + ActiveDirectoryType ActiveDirectoryType + // The directory ID for an Active Directory identity provider. DirectoryId *string noSmithyDocumentSerde } +// Contains network access and credential details that are needed for user +// administration in the Active Directory. +type ActiveDirectorySettings struct { + + // Points to the CredentialsProvider resource that contains information about the + // credential provider for user administration. + DomainCredentialsProvider CredentialsProvider + + // A list of domain IPv4 addresses that are used for the Active Directory. + DomainIpv4List []string + + // The domain name for the Active Directory. + DomainName *string + + // The DomainNetworkSettings resource contains an array of subnets that apply for + // the Active Directory. + DomainNetworkSettings *DomainNetworkSettings + + noSmithyDocumentSerde +} + +// Contains information about the credential provider for user administration. +// +// The following types satisfy this interface: +// +// CredentialsProviderMemberSecretsManagerCredentialsProvider +type CredentialsProvider interface { + isCredentialsProvider() +} + +// Identifies the Secrets Manager secret that contains credentials needed for user +// administration in the Active Directory. +type CredentialsProviderMemberSecretsManagerCredentialsProvider struct { + Value SecretsManagerCredentialsProvider + + noSmithyDocumentSerde +} + +func (*CredentialsProviderMemberSecretsManagerCredentialsProvider) isCredentialsProvider() {} + +// Contains network settings for the Active Directory domain. +type DomainNetworkSettings struct { + + // Contains a list of subnets that apply for the Active Directory domain. + // + // This member is required. + Subnets []string + + noSmithyDocumentSerde +} + // A filter name and value pair that is used to return more specific results from -// a describe operation. Filters can be used to match a set of resources by -// specific criteria, such as tags, attributes, or IDs. +// a describe or list operation. You can use filters can be used to match a set of +// resources by specific criteria, such as tags, attributes, or IDs. type Filter struct { // The name of an attribute to use as a filter. @@ -32,7 +93,7 @@ type Filter struct { noSmithyDocumentSerde } -// Details about an identity provider. +// Refers to an identity provider. // // The following types satisfy this interface: // @@ -41,7 +102,8 @@ type IdentityProvider interface { isIdentityProvider() } -// An object that details an Active Directory identity provider. +// The ActiveDirectoryIdentityProvider resource contains settings and other +// details about a specific Active Directory identity provider. type IdentityProviderMemberActiveDirectoryIdentityProvider struct { Value ActiveDirectoryIdentityProvider @@ -53,7 +115,7 @@ func (*IdentityProviderMemberActiveDirectoryIdentityProvider) isIdentityProvider // Describes an identity provider. type IdentityProviderSummary struct { - // An object that specifies details for the identity provider. + // The IdentityProvider resource contains information about an identity provider. // // This member is required. IdentityProvider IdentityProvider @@ -63,13 +125,14 @@ type IdentityProviderSummary struct { // This member is required. Product *string - // An object that details the registered identity provider’s product related - // configuration settings such as the subnets to provision VPC endpoints. + // The Settings resource contains details about the registered identity provider’s + // product related configuration settings, such as the subnets to provision VPC + // endpoints. // // This member is required. Settings *Settings - // The status of an identity provider. + // The status of the identity provider. // // This member is required. Status *string @@ -77,6 +140,9 @@ type IdentityProviderSummary struct { // The failure message associated with an identity provider. FailureMessage *string + // The Amazon Resource Name (ARN) of the identity provider. + IdentityProviderArn *string + noSmithyDocumentSerde } @@ -110,12 +176,12 @@ type InstanceSummary struct { // Describes users of an EC2 instance providing user-based subscriptions. type InstanceUserSummary struct { - // An object that specifies details for the identity provider. + // The IdentityProvider resource specifies details about the identity provider. // // This member is required. IdentityProvider IdentityProvider - // The ID of the EC2 instance, which provides user-based subscriptions. + // The ID of the EC2 instance that provides user-based subscriptions. // // This member is required. InstanceId *string @@ -136,16 +202,89 @@ type InstanceUserSummary struct { // The date a user was disassociated from an EC2 instance. DisassociationDate *string - // The domain name of the user. + // The domain name of the Active Directory that contains the user information for + // the product subscription. Domain *string + // The Amazon Resource Name (ARN) that identifies the instance user. + InstanceUserArn *string + // The status message for users of an EC2 instance. StatusMessage *string noSmithyDocumentSerde } -// The summary of the user-based subscription products for a user. +// Information about a Remote Desktop Services (RDS) license server. +type LicenseServer struct { + + // The health status of the RDS license server. + HealthStatus LicenseServerHealthStatus + + // A list of domain IPv4 addresses that are used for the RDS license server. + Ipv4Address *string + + // The current state of the provisioning process for the RDS license server. + ProvisioningStatus LicenseServerEndpointProvisioningStatus + + noSmithyDocumentSerde +} + +// Contains details about a network endpoint for a Remote Desktop Services (RDS) +// license server. +type LicenseServerEndpoint struct { + + // The timestamp when License Manager created the license server endpoint. + CreationTime *time.Time + + // The Amazon Resource Name (ARN) of the identity provider that's associated with + // the RDS license server endpoint. + IdentityProviderArn *string + + // The ARN of the ServerEndpoint resource for the RDS license server. + LicenseServerEndpointArn *string + + // The ID of the license server endpoint. + LicenseServerEndpointId *string + + // The current state of the provisioning process for the RDS license server + // endpoint + LicenseServerEndpointProvisioningStatus LicenseServerEndpointProvisioningStatus + + // An array of LicenseServer resources that represent the license servers that are + // accessed through this endpoint. + LicenseServers []LicenseServer + + // The ServerEndpoint resource contains the network address of the RDS license + // server endpoint. + ServerEndpoint *ServerEndpoint + + // The type of license server. + ServerType ServerType + + // The message associated with the provisioning status, if there is one. + StatusMessage *string + + noSmithyDocumentSerde +} + +// The settings to configure your license server. +type LicenseServerSettings struct { + + // The ServerSettings resource contains the settings for your server. + // + // This member is required. + ServerSettings ServerSettings + + // The type of license server. + // + // This member is required. + ServerType ServerType + + noSmithyDocumentSerde +} + +// A summary of the user-based subscription products for a specific user. type ProductUserSummary struct { // An object that specifies details for the identity provider. @@ -158,20 +297,24 @@ type ProductUserSummary struct { // This member is required. Product *string - // The status of a product for a user. + // The status of a product for this user. // // This member is required. Status *string - // The user name from the identity provider of the user. + // The user name from the identity provider for this product user. // // This member is required. Username *string - // The domain name of the user. + // The domain name of the Active Directory that contains the user information for + // the product subscription. Domain *string - // The status message for a product for a user. + // The Amazon Resource Name (ARN) for this product user. + ProductUserArn *string + + // The status message for a product for this user. StatusMessage *string // The end date of a subscription. @@ -183,6 +326,56 @@ type ProductUserSummary struct { noSmithyDocumentSerde } +// Server settings that are specific to a Remote Desktop Services (RDS) license +// server. +type RdsSalSettings struct { + + // The CredentialsProvider resource contains a reference to the credentials + // provider that's used for RDS license server user administration. + // + // This member is required. + RdsSalCredentialsProvider CredentialsProvider + + noSmithyDocumentSerde +} + +// Contains a credentials secret that's stored in Secrets Manager. +type SecretsManagerCredentialsProvider struct { + + // The ID of the Secrets Manager secret that contains credentials. + SecretId *string + + noSmithyDocumentSerde +} + +// A network endpoint through which you can access one or more servers. +type ServerEndpoint struct { + + // The network address of the endpoint. + Endpoint *string + + noSmithyDocumentSerde +} + +// Contains settings for a specific server. +// +// The following types satisfy this interface: +// +// ServerSettingsMemberRdsSalSettings +type ServerSettings interface { + isServerSettings() +} + +// The RdsSalSettings resource contains settings to configure a specific Remote +// Desktop Services (RDS) license server. +type ServerSettingsMemberRdsSalSettings struct { + Value RdsSalSettings + + noSmithyDocumentSerde +} + +func (*ServerSettingsMemberRdsSalSettings) isServerSettings() {} + // The registered identity provider’s product related configuration settings such // as the subnets to provision VPC endpoints, and the security group ID that is // associated with the VPC endpoints. The security group should permit inbound TCP @@ -236,4 +429,6 @@ type UnknownUnionMember struct { noSmithyDocumentSerde } -func (*UnknownUnionMember) isIdentityProvider() {} +func (*UnknownUnionMember) isCredentialsProvider() {} +func (*UnknownUnionMember) isIdentityProvider() {} +func (*UnknownUnionMember) isServerSettings() {} diff --git a/service/licensemanagerusersubscriptions/types/types_exported_test.go b/service/licensemanagerusersubscriptions/types/types_exported_test.go index fd0c0979f5c..2fa5f47886f 100644 --- a/service/licensemanagerusersubscriptions/types/types_exported_test.go +++ b/service/licensemanagerusersubscriptions/types/types_exported_test.go @@ -7,6 +7,24 @@ import ( "github.com/aws/aws-sdk-go-v2/service/licensemanagerusersubscriptions/types" ) +func ExampleCredentialsProvider_outputUsage() { + var union types.CredentialsProvider + // type switches can be used to check the union value + switch v := union.(type) { + case *types.CredentialsProviderMemberSecretsManagerCredentialsProvider: + _ = v.Value // Value is types.SecretsManagerCredentialsProvider + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.SecretsManagerCredentialsProvider + func ExampleIdentityProvider_outputUsage() { var union types.IdentityProvider // type switches can be used to check the union value @@ -24,3 +42,21 @@ func ExampleIdentityProvider_outputUsage() { } var _ *types.ActiveDirectoryIdentityProvider + +func ExampleServerSettings_outputUsage() { + var union types.ServerSettings + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ServerSettingsMemberRdsSalSettings: + _ = v.Value // Value is types.RdsSalSettings + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.RdsSalSettings diff --git a/service/licensemanagerusersubscriptions/validators.go b/service/licensemanagerusersubscriptions/validators.go index 3e431a3939f..f69ffaf69cf 100644 --- a/service/licensemanagerusersubscriptions/validators.go +++ b/service/licensemanagerusersubscriptions/validators.go @@ -30,6 +30,46 @@ func (m *validateOpAssociateUser) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpCreateLicenseServerEndpoint struct { +} + +func (*validateOpCreateLicenseServerEndpoint) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateLicenseServerEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateLicenseServerEndpointInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateLicenseServerEndpointInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteLicenseServerEndpoint struct { +} + +func (*validateOpDeleteLicenseServerEndpoint) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteLicenseServerEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteLicenseServerEndpointInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteLicenseServerEndpointInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeregisterIdentityProvider struct { } @@ -90,6 +130,26 @@ func (m *validateOpListProductSubscriptions) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +type validateOpListTagsForResource struct { +} + +func (*validateOpListTagsForResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTagsForResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTagsForResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListUserAssociations struct { } @@ -170,6 +230,46 @@ func (m *validateOpStopProductSubscription) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpTagResource struct { +} + +func (*validateOpTagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagResource struct { +} + +func (*validateOpUntagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateIdentityProviderSettings struct { } @@ -194,6 +294,14 @@ func addOpAssociateUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAssociateUser{}, middleware.After) } +func addOpCreateLicenseServerEndpointValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateLicenseServerEndpoint{}, middleware.After) +} + +func addOpDeleteLicenseServerEndpointValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteLicenseServerEndpoint{}, middleware.After) +} + func addOpDeregisterIdentityProviderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeregisterIdentityProvider{}, middleware.After) } @@ -206,6 +314,10 @@ func addOpListProductSubscriptionsValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpListProductSubscriptions{}, middleware.After) } +func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +} + func addOpListUserAssociationsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListUserAssociations{}, middleware.After) } @@ -222,10 +334,142 @@ func addOpStopProductSubscriptionValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpStopProductSubscription{}, middleware.After) } +func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) +} + +func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) +} + func addOpUpdateIdentityProviderSettingsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateIdentityProviderSettings{}, middleware.After) } +func validateActiveDirectoryIdentityProvider(v *types.ActiveDirectoryIdentityProvider) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ActiveDirectoryIdentityProvider"} + if v.ActiveDirectorySettings != nil { + if err := validateActiveDirectorySettings(v.ActiveDirectorySettings); err != nil { + invalidParams.AddNested("ActiveDirectorySettings", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateActiveDirectorySettings(v *types.ActiveDirectorySettings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ActiveDirectorySettings"} + if v.DomainNetworkSettings != nil { + if err := validateDomainNetworkSettings(v.DomainNetworkSettings); err != nil { + invalidParams.AddNested("DomainNetworkSettings", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDomainNetworkSettings(v *types.DomainNetworkSettings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DomainNetworkSettings"} + if v.Subnets == nil { + invalidParams.Add(smithy.NewErrParamRequired("Subnets")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateIdentityProvider(v types.IdentityProvider) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IdentityProvider"} + switch uv := v.(type) { + case *types.IdentityProviderMemberActiveDirectoryIdentityProvider: + if err := validateActiveDirectoryIdentityProvider(&uv.Value); err != nil { + invalidParams.AddNested("[ActiveDirectoryIdentityProvider]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLicenseServerSettings(v *types.LicenseServerSettings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LicenseServerSettings"} + if len(v.ServerType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ServerType")) + } + if v.ServerSettings == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServerSettings")) + } else if v.ServerSettings != nil { + if err := validateServerSettings(v.ServerSettings); err != nil { + invalidParams.AddNested("ServerSettings", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRdsSalSettings(v *types.RdsSalSettings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RdsSalSettings"} + if v.RdsSalCredentialsProvider == nil { + invalidParams.Add(smithy.NewErrParamRequired("RdsSalCredentialsProvider")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateServerSettings(v types.ServerSettings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ServerSettings"} + switch uv := v.(type) { + case *types.ServerSettingsMemberRdsSalSettings: + if err := validateRdsSalSettings(&uv.Value); err != nil { + invalidParams.AddNested("[RdsSalSettings]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSettings(v *types.Settings) error { if v == nil { return nil @@ -275,6 +519,50 @@ func validateOpAssociateUserInput(v *AssociateUserInput) error { } if v.IdentityProvider == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityProvider")) + } else if v.IdentityProvider != nil { + if err := validateIdentityProvider(v.IdentityProvider); err != nil { + invalidParams.AddNested("IdentityProvider", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateLicenseServerEndpointInput(v *CreateLicenseServerEndpointInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateLicenseServerEndpointInput"} + if v.IdentityProviderArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("IdentityProviderArn")) + } + if v.LicenseServerSettings == nil { + invalidParams.Add(smithy.NewErrParamRequired("LicenseServerSettings")) + } else if v.LicenseServerSettings != nil { + if err := validateLicenseServerSettings(v.LicenseServerSettings); err != nil { + invalidParams.AddNested("LicenseServerSettings", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteLicenseServerEndpointInput(v *DeleteLicenseServerEndpointInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteLicenseServerEndpointInput"} + if v.LicenseServerEndpointArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("LicenseServerEndpointArn")) + } + if len(v.ServerType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ServerType")) } if invalidParams.Len() > 0 { return invalidParams @@ -288,11 +576,10 @@ func validateOpDeregisterIdentityProviderInput(v *DeregisterIdentityProviderInpu return nil } invalidParams := smithy.InvalidParamsError{Context: "DeregisterIdentityProviderInput"} - if v.IdentityProvider == nil { - invalidParams.Add(smithy.NewErrParamRequired("IdentityProvider")) - } - if v.Product == nil { - invalidParams.Add(smithy.NewErrParamRequired("Product")) + if v.IdentityProvider != nil { + if err := validateIdentityProvider(v.IdentityProvider); err != nil { + invalidParams.AddNested("IdentityProvider", err.(smithy.InvalidParamsError)) + } } if invalidParams.Len() > 0 { return invalidParams @@ -306,14 +593,10 @@ func validateOpDisassociateUserInput(v *DisassociateUserInput) error { return nil } invalidParams := smithy.InvalidParamsError{Context: "DisassociateUserInput"} - if v.Username == nil { - invalidParams.Add(smithy.NewErrParamRequired("Username")) - } - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if v.IdentityProvider == nil { - invalidParams.Add(smithy.NewErrParamRequired("IdentityProvider")) + if v.IdentityProvider != nil { + if err := validateIdentityProvider(v.IdentityProvider); err != nil { + invalidParams.AddNested("IdentityProvider", err.(smithy.InvalidParamsError)) + } } if invalidParams.Len() > 0 { return invalidParams @@ -327,11 +610,27 @@ func validateOpListProductSubscriptionsInput(v *ListProductSubscriptionsInput) e return nil } invalidParams := smithy.InvalidParamsError{Context: "ListProductSubscriptionsInput"} - if v.Product == nil { - invalidParams.Add(smithy.NewErrParamRequired("Product")) - } if v.IdentityProvider == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityProvider")) + } else if v.IdentityProvider != nil { + if err := validateIdentityProvider(v.IdentityProvider); err != nil { + invalidParams.AddNested("IdentityProvider", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if invalidParams.Len() > 0 { return invalidParams @@ -350,6 +649,10 @@ func validateOpListUserAssociationsInput(v *ListUserAssociationsInput) error { } if v.IdentityProvider == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityProvider")) + } else if v.IdentityProvider != nil { + if err := validateIdentityProvider(v.IdentityProvider); err != nil { + invalidParams.AddNested("IdentityProvider", err.(smithy.InvalidParamsError)) + } } if invalidParams.Len() > 0 { return invalidParams @@ -365,6 +668,10 @@ func validateOpRegisterIdentityProviderInput(v *RegisterIdentityProviderInput) e invalidParams := smithy.InvalidParamsError{Context: "RegisterIdentityProviderInput"} if v.IdentityProvider == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityProvider")) + } else if v.IdentityProvider != nil { + if err := validateIdentityProvider(v.IdentityProvider); err != nil { + invalidParams.AddNested("IdentityProvider", err.(smithy.InvalidParamsError)) + } } if v.Product == nil { invalidParams.Add(smithy.NewErrParamRequired("Product")) @@ -391,6 +698,10 @@ func validateOpStartProductSubscriptionInput(v *StartProductSubscriptionInput) e } if v.IdentityProvider == nil { invalidParams.Add(smithy.NewErrParamRequired("IdentityProvider")) + } else if v.IdentityProvider != nil { + if err := validateIdentityProvider(v.IdentityProvider); err != nil { + invalidParams.AddNested("IdentityProvider", err.(smithy.InvalidParamsError)) + } } if v.Product == nil { invalidParams.Add(smithy.NewErrParamRequired("Product")) @@ -407,14 +718,46 @@ func validateOpStopProductSubscriptionInput(v *StopProductSubscriptionInput) err return nil } invalidParams := smithy.InvalidParamsError{Context: "StopProductSubscriptionInput"} - if v.Username == nil { - invalidParams.Add(smithy.NewErrParamRequired("Username")) + if v.IdentityProvider != nil { + if err := validateIdentityProvider(v.IdentityProvider); err != nil { + invalidParams.AddNested("IdentityProvider", err.(smithy.InvalidParamsError)) + } } - if v.IdentityProvider == nil { - invalidParams.Add(smithy.NewErrParamRequired("IdentityProvider")) + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil } - if v.Product == nil { - invalidParams.Add(smithy.NewErrParamRequired("Product")) +} + +func validateOpTagResourceInput(v *TagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagResourceInput(v *UntagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams @@ -428,11 +771,10 @@ func validateOpUpdateIdentityProviderSettingsInput(v *UpdateIdentityProviderSett return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateIdentityProviderSettingsInput"} - if v.IdentityProvider == nil { - invalidParams.Add(smithy.NewErrParamRequired("IdentityProvider")) - } - if v.Product == nil { - invalidParams.Add(smithy.NewErrParamRequired("Product")) + if v.IdentityProvider != nil { + if err := validateIdentityProvider(v.IdentityProvider); err != nil { + invalidParams.AddNested("IdentityProvider", err.(smithy.InvalidParamsError)) + } } if v.UpdateSettings == nil { invalidParams.Add(smithy.NewErrParamRequired("UpdateSettings")) diff --git a/service/mq/internal/endpoints/endpoints.go b/service/mq/internal/endpoints/endpoints.go index d37f1ba8dc4..ce506e45840 100644 --- a/service/mq/internal/endpoints/endpoints.go +++ b/service/mq/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/partnercentralselling/LICENSE.txt b/service/partnercentralselling/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/service/partnercentralselling/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/service/partnercentralselling/api_client.go b/service/partnercentralselling/api_client.go new file mode 100644 index 00000000000..afb0309355d --- /dev/null +++ b/service/partnercentralselling/api_client.go @@ -0,0 +1,929 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + cryptorand "crypto/rand" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws/defaults" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/retry" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware" + smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" + smithydocument "github.com/aws/smithy-go/document" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" + "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net" + "net/http" + "sync/atomic" + "time" +) + +const ServiceID = "PartnerCentral Selling" +const ServiceAPIVersion = "2022-07-26" + +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/partnercentralselling") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + return ctx.Value(operationMetricsKey{}).(*operationMetrics) +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/partnercentralselling") +} + +// Client provides the API client to make operations call for Partner Central +// Selling API. +type Client struct { + options Options + + // Difference between the time reported by the server and the client + timeOffset *atomic.Int64 +} + +// New returns an initialized Client based on the functional options. Provide +// additional functional options to further configure the behavior of the client, +// such as changing the client's endpoint or adding custom middleware behavior. +func New(options Options, optFns ...func(*Options)) *Client { + options = options.Copy() + + resolveDefaultLogger(&options) + + setResolvedDefaultsMode(&options) + + resolveRetryer(&options) + + resolveHTTPClient(&options) + + resolveHTTPSignerV4(&options) + + resolveIdempotencyTokenProvider(&options) + + resolveEndpointResolverV2(&options) + + resolveTracerProvider(&options) + + resolveMeterProvider(&options) + + resolveAuthSchemeResolver(&options) + + for _, fn := range optFns { + fn(&options) + } + + finalizeRetryMaxAttempts(&options) + + ignoreAnonymousAuth(&options) + + wrapWithAnonymousAuth(&options) + + resolveAuthSchemes(&options) + + client := &Client{ + options: options, + } + + initializeTimeOffsetResolver(client) + + return client +} + +// Options returns a copy of the client configuration. +// +// Callers SHOULD NOT perform mutations on any inner structures within client +// config. Config overrides should instead be made on a per-operation basis through +// functional options. +func (c *Client) Options() Options { + return c.options.Copy() +} + +func (c *Client) invokeOperation( + ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error, +) ( + result interface{}, metadata middleware.Metadata, err error, +) { + ctx = middleware.ClearStackValues(ctx) + ctx = middleware.WithServiceID(ctx, ServiceID) + ctx = middleware.WithOperationName(ctx, opID) + + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) + options := c.options.Copy() + + for _, fn := range optFns { + fn(&options) + } + + finalizeOperationRetryMaxAttempts(&options, *c) + + finalizeClientEndpointResolverOptions(&options) + + for _, fn := range stackFns { + if err := fn(stack, options); err != nil { + return nil, metadata, err + } + } + + for _, fn := range options.APIOptions { + if err := fn(stack); err != nil { + return nil, metadata, err + } + } + + ctx, err = withOperationMetrics(ctx, options.MeterProvider) + if err != nil { + return nil, metadata, err + } + + tracer := operationTracer(options.TracerProvider) + spanName := fmt.Sprintf("%s.%s", ServiceID, opID) + + ctx = tracing.WithOperationTracer(ctx, tracer) + + ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { + o.Kind = tracing.SpanKindClient + o.Properties.Set("rpc.system", "aws-api") + o.Properties.Set("rpc.method", opID) + o.Properties.Set("rpc.service", ServiceID) + }) + endTimer := startMetricTimer(ctx, "client.call.duration") + defer endTimer() + defer span.End() + + handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { + o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/partnercentralselling") + }) + decorated := middleware.DecorateHandler(handler, stack) + result, metadata, err = decorated.Handle(ctx, params) + if err != nil { + span.SetProperty("exception.type", fmt.Sprintf("%T", err)) + span.SetProperty("exception.message", err.Error()) + + var aerr smithy.APIError + if errors.As(err, &aerr) { + span.SetProperty("api.error_code", aerr.ErrorCode()) + span.SetProperty("api.error_message", aerr.ErrorMessage()) + span.SetProperty("api.error_fault", aerr.ErrorFault().String()) + } + + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + + span.SetProperty("error", err != nil) + if err == nil { + span.SetStatus(tracing.SpanStatusOK) + } else { + span.SetStatus(tracing.SpanStatusError) + } + + return result, metadata, err +} + +type operationInputKey struct{} + +func setOperationInput(ctx context.Context, input interface{}) context.Context { + return middleware.WithStackValue(ctx, operationInputKey{}, input) +} + +func getOperationInput(ctx context.Context) interface{} { + return middleware.GetStackValue(ctx, operationInputKey{}) +} + +type setOperationInputMiddleware struct { +} + +func (*setOperationInputMiddleware) ID() string { + return "setOperationInput" +} + +func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + ctx = setOperationInput(ctx, in.Parameters) + return next.HandleSerialize(ctx, in) +} + +func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error { + if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil { + return fmt.Errorf("add ResolveAuthScheme: %w", err) + } + if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil { + return fmt.Errorf("add GetIdentity: %v", err) + } + if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { + return fmt.Errorf("add ResolveEndpointV2: %v", err) + } + if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { + return fmt.Errorf("add Signing: %w", err) + } + return nil +} +func resolveAuthSchemeResolver(options *Options) { + if options.AuthSchemeResolver == nil { + options.AuthSchemeResolver = &defaultAuthSchemeResolver{} + } +} + +func resolveAuthSchemes(options *Options) { + if options.AuthSchemes == nil { + options.AuthSchemes = []smithyhttp.AuthScheme{ + internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{ + Signer: options.HTTPSignerV4, + Logger: options.Logger, + LogSigning: options.ClientLogMode.IsSigning(), + }), + } + } +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +type legacyEndpointContextSetter struct { + LegacyResolver EndpointResolver +} + +func (*legacyEndpointContextSetter) ID() string { + return "legacyEndpointContextSetter" +} + +func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.LegacyResolver != nil { + ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true) + } + + return next.HandleInitialize(ctx, in) + +} +func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error { + return stack.Initialize.Add(&legacyEndpointContextSetter{ + LegacyResolver: o.EndpointResolver, + }, middleware.Before) +} + +func resolveDefaultLogger(o *Options) { + if o.Logger != nil { + return + } + o.Logger = logging.Nop{} +} + +func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { + return middleware.AddSetLoggerMiddleware(stack, o.Logger) +} + +func setResolvedDefaultsMode(o *Options) { + if len(o.resolvedDefaultsMode) > 0 { + return + } + + var mode aws.DefaultsMode + mode.SetFromString(string(o.DefaultsMode)) + + if mode == aws.DefaultsModeAuto { + mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) + } + + o.resolvedDefaultsMode = mode +} + +// NewFromConfig returns a new client from the provided config. +func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { + opts := Options{ + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSRetryMaxAttempts(cfg, &opts) + resolveAWSRetryMode(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + resolveUseDualStackEndpoint(cfg, &opts) + resolveUseFIPSEndpoint(cfg, &opts) + resolveBaseEndpoint(cfg, &opts) + return New(opts, optFns...) +} + +func resolveHTTPClient(o *Options) { + var buildable *awshttp.BuildableClient + + if o.HTTPClient != nil { + var ok bool + buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) + if !ok { + return + } + } else { + buildable = awshttp.NewBuildableClient() + } + + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { + if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { + dialer.Timeout = dialerTimeout + } + }) + + buildable = buildable.WithTransportOptions(func(transport *http.Transport) { + if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { + transport.TLSHandshakeTimeout = tlsHandshakeTimeout + } + }) + } + + o.HTTPClient = buildable +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + + if len(o.RetryMode) == 0 { + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + o.RetryMode = modeConfig.RetryMode + } + } + if len(o.RetryMode) == 0 { + o.RetryMode = aws.RetryModeStandard + } + + var standardOptions []func(*retry.StandardOptions) + if v := o.RetryMaxAttempts; v != 0 { + standardOptions = append(standardOptions, func(so *retry.StandardOptions) { + so.MaxAttempts = v + }) + } + + switch o.RetryMode { + case aws.RetryModeAdaptive: + var adaptiveOptions []func(*retry.AdaptiveModeOptions) + if len(standardOptions) != 0 { + adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { + ao.StandardOptions = append(ao.StandardOptions, standardOptions...) + }) + } + o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) + + default: + o.Retryer = retry.NewStandard(standardOptions...) + } +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSRetryMode(cfg aws.Config, o *Options) { + if len(cfg.RetryMode) == 0 { + return + } + o.RetryMode = cfg.RetryMode +} +func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { + if cfg.RetryMaxAttempts == 0 { + return + } + o.RetryMaxAttempts = cfg.RetryMaxAttempts +} + +func finalizeRetryMaxAttempts(o *Options) { + if o.RetryMaxAttempts == 0 { + return + } + + o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) +} + +func finalizeOperationRetryMaxAttempts(o *Options, client Client) { + if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { + return + } + + o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) +} + +func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { + if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { + return + } + o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions) +} + +func addClientUserAgent(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "partnercentralselling", goModuleVersion) + if len(options.AppID) > 0 { + ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID) + } + + return nil +} + +func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) { + id := (*awsmiddleware.RequestUserAgent)(nil).ID() + mw, ok := stack.Build.Get(id) + if !ok { + mw = awsmiddleware.NewRequestUserAgent() + if err := stack.Build.Add(mw, middleware.After); err != nil { + return nil, err + } + } + + ua, ok := mw.(*awsmiddleware.RequestUserAgent) + if !ok { + return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id) + } + + return ua, nil +} + +type HTTPSignerV4 interface { + SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error +} + +func resolveHTTPSignerV4(o *Options) { + if o.HTTPSignerV4 != nil { + return + } + o.HTTPSignerV4 = newDefaultV4Signer(*o) +} + +func newDefaultV4Signer(o Options) *v4.Signer { + return v4.NewSigner(func(so *v4.SignerOptions) { + so.Logger = o.Logger + so.LogSigning = o.ClientLogMode.IsSigning() + }) +} + +func addClientRequestID(stack *middleware.Stack) error { + return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After) +} + +func addComputeContentLength(stack *middleware.Stack) error { + return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After) +} + +func addRawResponseToMetadata(stack *middleware.Stack) error { + return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before) +} + +func addRecordResponseTiming(stack *middleware.Stack) error { + return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) +} + +func addSpanRetryLoop(stack *middleware.Stack, options Options) error { + return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) +} + +type spanRetryLoop struct { + options Options +} + +func (*spanRetryLoop) ID() string { + return "spanRetryLoop" +} + +func (m *spanRetryLoop) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + middleware.FinalizeOutput, middleware.Metadata, error, +) { + tracer := operationTracer(m.options.TracerProvider) + ctx, span := tracer.StartSpan(ctx, "RetryLoop") + defer span.End() + + return next.HandleFinalize(ctx, in) +} +func addStreamingEventsPayload(stack *middleware.Stack) error { + return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) +} + +func addUnsignedPayload(stack *middleware.Stack) error { + return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After) +} + +func addComputePayloadSHA256(stack *middleware.Stack) error { + return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After) +} + +func addContentSHA256Header(stack *middleware.Stack) error { + return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) +} + +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + +func resolveIdempotencyTokenProvider(o *Options) { + if o.IdempotencyTokenProvider != nil { + return + } + o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) +} + +func addRetry(stack *middleware.Stack, o Options) error { + attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { + m.LogAttempts = o.ClientLogMode.IsRetries() + m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/partnercentralselling") + }) + if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { + return err + } + if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { + return err + } + return nil +} + +// resolves dual-stack endpoint configuration +func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseDualStackEndpoint = value + } + return nil +} + +// resolves FIPS endpoint configuration +func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseFIPSEndpoint = value + } + return nil +} + +func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { + if mode == aws.AccountIDEndpointModeDisabled { + return nil + } + + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { + return aws.String(ca.Credentials.AccountID) + } + + return nil +} + +func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error { + mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset} + if err := stack.Build.Add(&mw, middleware.After); err != nil { + return err + } + return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before) +} +func initializeTimeOffsetResolver(c *Client) { + c.timeOffset = new(atomic.Int64) +} + +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + +func resolveTracerProvider(options *Options) { + if options.TracerProvider == nil { + options.TracerProvider = &tracing.NopTracerProvider{} + } +} + +func resolveMeterProvider(options *Options) { + if options.MeterProvider == nil { + options.MeterProvider = metrics.NopMeterProvider{} + } +} + +// IdempotencyTokenProvider interface for providing idempotency token +type IdempotencyTokenProvider interface { + GetIdempotencyToken() (string, error) +} + +func addRecursionDetection(stack *middleware.Stack) error { + return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) +} + +func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { + return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before) + +} + +func addResponseErrorMiddleware(stack *middleware.Stack) error { + return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) + +} + +func addRequestResponseLogging(stack *middleware.Stack, o Options) error { + return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ + LogRequest: o.ClientLogMode.IsRequest(), + LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), + LogResponse: o.ClientLogMode.IsResponse(), + LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), + }, middleware.After) +} + +type disableHTTPSMiddleware struct { + DisableHTTPS bool +} + +func (*disableHTTPSMiddleware) ID() string { + return "disableHTTPS" +} + +func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) { + req.URL.Scheme = "http" + } + + return next.HandleFinalize(ctx, in) +} + +func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { + return stack.Finalize.Insert(&disableHTTPSMiddleware{ + DisableHTTPS: o.EndpointOptions.DisableHTTPS, + }, "ResolveEndpointV2", middleware.After) +} + +type spanInitializeStart struct { +} + +func (*spanInitializeStart) ID() string { + return "spanInitializeStart" +} + +func (m *spanInitializeStart) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "Initialize") + + return next.HandleInitialize(ctx, in) +} + +type spanInitializeEnd struct { +} + +func (*spanInitializeEnd) ID() string { + return "spanInitializeEnd" +} + +func (m *spanInitializeEnd) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleInitialize(ctx, in) +} + +type spanBuildRequestStart struct { +} + +func (*spanBuildRequestStart) ID() string { + return "spanBuildRequestStart" +} + +func (m *spanBuildRequestStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + middleware.SerializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "BuildRequest") + + return next.HandleSerialize(ctx, in) +} + +type spanBuildRequestEnd struct { +} + +func (*spanBuildRequestEnd) ID() string { + return "spanBuildRequestEnd" +} + +func (m *spanBuildRequestEnd) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + middleware.BuildOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleBuild(ctx, in) +} + +func addSpanInitializeStart(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) +} + +func addSpanInitializeEnd(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) +} + +func addSpanBuildRequestStart(stack *middleware.Stack) error { + return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) +} + +func addSpanBuildRequestEnd(stack *middleware.Stack) error { + return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) +} diff --git a/service/partnercentralselling/api_client_test.go b/service/partnercentralselling/api_client_test.go new file mode 100644 index 00000000000..26d29e1d346 --- /dev/null +++ b/service/partnercentralselling/api_client_test.go @@ -0,0 +1,127 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io/ioutil" + "net/http" + "strings" + "testing" +) + +func TestClient_resolveRetryOptions(t *testing.T) { + nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) { + return &http.Response{ + StatusCode: 200, + Header: http.Header{}, + Body: ioutil.NopCloser(strings.NewReader("")), + }, nil + }) + + cases := map[string]struct { + defaultsMode aws.DefaultsMode + retryer aws.Retryer + retryMaxAttempts int + opRetryMaxAttempts *int + retryMode aws.RetryMode + expectClientRetryMode aws.RetryMode + expectClientMaxAttempts int + expectOpMaxAttempts int + }{ + "defaults": { + defaultsMode: aws.DefaultsModeStandard, + expectClientRetryMode: aws.RetryModeStandard, + expectClientMaxAttempts: 3, + expectOpMaxAttempts: 3, + }, + "custom default retry": { + retryMode: aws.RetryModeAdaptive, + retryMaxAttempts: 10, + expectClientRetryMode: aws.RetryModeAdaptive, + expectClientMaxAttempts: 10, + expectOpMaxAttempts: 10, + }, + "custom op max attempts": { + retryMode: aws.RetryModeAdaptive, + retryMaxAttempts: 10, + opRetryMaxAttempts: aws.Int(2), + expectClientRetryMode: aws.RetryModeAdaptive, + expectClientMaxAttempts: 10, + expectOpMaxAttempts: 2, + }, + "custom op no change max attempts": { + retryMode: aws.RetryModeAdaptive, + retryMaxAttempts: 10, + opRetryMaxAttempts: aws.Int(10), + expectClientRetryMode: aws.RetryModeAdaptive, + expectClientMaxAttempts: 10, + expectOpMaxAttempts: 10, + }, + "custom op 0 max attempts": { + retryMode: aws.RetryModeAdaptive, + retryMaxAttempts: 10, + opRetryMaxAttempts: aws.Int(0), + expectClientRetryMode: aws.RetryModeAdaptive, + expectClientMaxAttempts: 10, + expectOpMaxAttempts: 10, + }, + } + + for name, c := range cases { + t.Run(name, func(t *testing.T) { + client := NewFromConfig(aws.Config{ + DefaultsMode: c.defaultsMode, + Retryer: func() func() aws.Retryer { + if c.retryer == nil { + return nil + } + + return func() aws.Retryer { return c.retryer } + }(), + HTTPClient: nopClient, + RetryMaxAttempts: c.retryMaxAttempts, + RetryMode: c.retryMode, + }, func(o *Options) { + if o.Retryer == nil { + t.Errorf("retryer must not be nil in functional options") + } + }) + + if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a { + t.Errorf("expect %v retry mode, got %v", e, a) + } + if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a { + t.Errorf("expect %v max attempts, got %v", e, a) + } + + _, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{}, + []func(*Options){ + func(o *Options) { + if c.opRetryMaxAttempts == nil { + return + } + o.RetryMaxAttempts = *c.opRetryMaxAttempts + }, + }, + func(s *middleware.Stack, o Options) error { + s.Initialize.Clear() + s.Serialize.Clear() + s.Build.Clear() + s.Finalize.Clear() + s.Deserialize.Clear() + + if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a { + t.Errorf("expect %v op max attempts, got %v", e, a) + } + return nil + }) + if err != nil { + t.Fatalf("expect no operation error, got %v", err) + } + }) + } +} diff --git a/service/partnercentralselling/api_op_AssignOpportunity.go b/service/partnercentralselling/api_op_AssignOpportunity.go new file mode 100644 index 00000000000..d410da1eca8 --- /dev/null +++ b/service/partnercentralselling/api_op_AssignOpportunity.go @@ -0,0 +1,181 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Enables you to reassign an existing Opportunity to another user within your +// +// Partner Central account. The specified user receives the opportunity, and it +// appears on their Partner Central dashboard, allowing them to take necessary +// actions or proceed with the opportunity. +// +// This is useful for distributing opportunities to the appropriate team members +// or departments within your organization, ensuring that each opportunity is +// handled by the right person. By default, the opportunity owner is the one who +// creates it. Currently, there's no API to enumerate the list of available users. +func (c *Client) AssignOpportunity(ctx context.Context, params *AssignOpportunityInput, optFns ...func(*Options)) (*AssignOpportunityOutput, error) { + if params == nil { + params = &AssignOpportunityInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssignOpportunity", params, optFns, c.addOperationAssignOpportunityMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssignOpportunityOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AssignOpportunityInput struct { + + // Specifies the user or team member responsible for managing the assigned + // opportunity. This field identifies the Assignee based on the partner's internal + // team structure. Ensure that the email address is associated with a registered + // user in your Partner Central account. + // + // This member is required. + Assignee *types.AssigneeContact + + // Specifies the catalog associated with the request. This field takes a string + // value from a predefined list: AWS or Sandbox . The catalog determines which + // environment the opportunity is assigned in. Use AWS to assign real + // opportunities in the Amazon Web Services catalog, and Sandbox to test in a + // secure and isolated environment. + // + // This member is required. + Catalog *string + + // Requires the Opportunity 's unique identifier when you want to assign it to + // another user. Provide the correct identifier so the intended opportunity is + // reassigned. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type AssignOpportunityOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAssignOpportunityMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpAssignOpportunity{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpAssignOpportunity{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AssignOpportunity"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpAssignOpportunityValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssignOpportunity(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAssignOpportunity(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AssignOpportunity", + } +} diff --git a/service/partnercentralselling/api_op_AssociateOpportunity.go b/service/partnercentralselling/api_op_AssociateOpportunity.go new file mode 100644 index 00000000000..e63c271c858 --- /dev/null +++ b/service/partnercentralselling/api_op_AssociateOpportunity.go @@ -0,0 +1,217 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Enables you to create a formal association between an Opportunity and various +// +// related entities, enriching the context and details of the opportunity for +// better collaboration and decision-making. You can associate an opportunity with +// the following types of entities: +// +// - Partner Solution: A software product or consulting practice created and +// delivered by Partners. Partner Solutions help customers address specific +// business challenges or achieve particular goals using Amazon Web Services +// services. +// +// - Amazon Web Services Product: Amazon Web Services offers a wide range of +// products and services designed to provide scalable, reliable, and cost-effective +// infrastructure solutions. For the latest list of Amazon Web Services products, +// refer to [Amazon Web Services products]. +// +// - Amazon Web Services Marketplace private offer: Allows Amazon Web Services +// Marketplace sellers to extend custom pricing and terms to individual Amazon Web +// Services customers. Sellers can negotiate custom prices, payment schedules, and +// end user license terms through private offers, enabling Amazon Web Services +// customers to acquire software solutions tailored to their specific needs. For +// more information, refer to [Private offers in Amazon Web Services Marketplace]. +// +// To obtain identifiers for these entities, use the following methods: +// +// - Solution: Use the ListSolutions operation. +// +// - AWS products: For the latest list of Amazon Web Services products, refer to +// the Amazon Web Services products list. +// +// - Amazon Web Services Marketplace private offer: Use the [AWS Marketplace Catalog API]to list entities. +// Specifically, use the ListEntities operation to retrieve a list of private +// offers. The request to the ListEntities API returns the details of the private +// offers available to you. For more information, refer to [ListEntities]. +// +// [Private offers in Amazon Web Services Marketplace]: https://docs.aws.amazon.com/marketplace/latest/buyerguide/buyer-private-offers.html +// [AWS Marketplace Catalog API]: https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/welcome.html +// [ListEntities]: https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/API_ListEntities.html +// [Amazon Web Services products]: https://github.com/aws-samples/partner-crm-integration-samples/blob/main/resources/aws_products.json +func (c *Client) AssociateOpportunity(ctx context.Context, params *AssociateOpportunityInput, optFns ...func(*Options)) (*AssociateOpportunityOutput, error) { + if params == nil { + params = &AssociateOpportunityInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssociateOpportunity", params, optFns, c.addOperationAssociateOpportunityMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssociateOpportunityOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AssociateOpportunityInput struct { + + // Specifies the catalog associated with the request. This field takes a string + // value from a predefined list: AWS or Sandbox . The catalog determines + // whichenvironment the opportunity association is made in. Use AWS to associate + // opportunities in the Amazon Web Services catalog, and Sandbox to test in a + // secure and isolated environment. + // + // This member is required. + Catalog *string + + // Requires the Opportunity 's unique identifier when you want to associate it with + // a related entity. Provide the correct identifier so the intended opportunity is + // updated with the association. + // + // This member is required. + OpportunityIdentifier *string + + // Requires the related entity's unique identifier when you want to associate it + // with the Opportunity . For Amazon Web Services Marketplace entities, provide the + // Amazon Resource Name (ARN). Use the [Amazon Web Services Marketplace API]to obtain the ARN. + // + // [Amazon Web Services Marketplace API]: https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/welcome.html + // + // This member is required. + RelatedEntityIdentifier *string + + // Specifies the type of the related entity you're associating with the + // Opportunity . This helps to categorize and properly process the association. + // + // This member is required. + RelatedEntityType types.RelatedEntityType + + noSmithyDocumentSerde +} + +type AssociateOpportunityOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAssociateOpportunityMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpAssociateOpportunity{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpAssociateOpportunity{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateOpportunity"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpAssociateOpportunityValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateOpportunity(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAssociateOpportunity(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AssociateOpportunity", + } +} diff --git a/service/partnercentralselling/api_op_CreateOpportunity.go b/service/partnercentralselling/api_op_CreateOpportunity.go new file mode 100644 index 00000000000..83588bf348f --- /dev/null +++ b/service/partnercentralselling/api_op_CreateOpportunity.go @@ -0,0 +1,345 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates an Opportunity record in Partner Central. Use this operation to create +// +// a potential business opportunity intended to be submitted to Amazon Web +// Services. Creating an opportunity sets its Lifecycle.ReviewStatus to Pending +// Submission . +// +// To fully submit an opportunity, follow these steps: +// +// - To create the opportunity, use CreateOpportunity . +// +// - To associate a solution with the opportunity, use AssociateOpportunity . +// +// - To submit the opportunity, use SubmitOpportunity . +// +// After submission, you can't edit the opportunity until the review is complete. +// However, opportunities in the Pending Submission state still need all details +// completed. You can update the opportunity while it's in the Pending Submission +// state. +// +// There's a set of mandatory fields required to create opportunities, but +// consider providing optional fields to enrich the opportunity record. +func (c *Client) CreateOpportunity(ctx context.Context, params *CreateOpportunityInput, optFns ...func(*Options)) (*CreateOpportunityOutput, error) { + if params == nil { + params = &CreateOpportunityInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateOpportunity", params, optFns, c.addOperationCreateOpportunityMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateOpportunityOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateOpportunityInput struct { + + // Specifies the catalog associated with the request. This field takes a string + // value from a predefined list: AWS or Sandbox . The catalog determines which + // environment the opportunity is created in. Use AWS to create opportunities in + // the Amazon Web Services catalog, and Sandbox to test in a secure and isolated + // environment. + // + // This member is required. + Catalog *string + + // Required to be unique, and should be unchanging, it can be randomly generated + // or a meaningful string. + // + // Default: None + // + // Best practice: To ensure uniqueness and avoid collisions, we recommend you use + // a UUID (Universally Unique Identifier) as the ClientToken . You can use standard + // libraries available in most programming languages to generated this. If you use + // the same client token, the API throws this error: "Conflicting client token + // submitted for a new request body". + // + // This member is required. + ClientToken *string + + // Specifies customer details associated with the Opportunity . + Customer *types.Customer + + // An object that contains lifecycle details for the Opportunity . + LifeCycle *types.LifeCycle + + // This object contains marketing details and is optional for an opportunity. + Marketing *types.Marketing + + // Indicates whether the Opportunity pertains to a national security project. This + // field must be set to true only when the customer's industry is Government. + // Additional privacy and security measures apply during the review and management + // process for opportunities marked as NationalSecurity . + NationalSecurity types.NationalSecurity + + // Represents the internal team handling the opportunity. Specify the members + // involved in collaborating on this opportunity within the partner's organization. + OpportunityTeam []types.Contact + + // Specifies the opportunity type as a renewal, new, or expansion. + // + // Opportunity types: + // + // - New opportunity: Represents a new business opportunity with a potential + // customer that's not previously engaged with your solutions or services. + // + // - Renewal opportunity: Represents an opportunity to renew an existing + // contract or subscription with a current customer, ensuring continuity of + // service. + // + // - Expansion opportunity: Represents an opportunity to expand the scope of an + // existing contract or subscription, either by adding new services or increasing + // the volume of existing services for a current customer. + OpportunityType types.OpportunityType + + // Specifies the origin of the opportunity, indicating if it was sourced from + // Amazon Web Services or the partner. For all opportunities created with Catalog: + // AWS , this field must only be Partner Referral . However, when using Catalog: + // Sandbox , you can set this field to AWS Referral to simulate Amazon Web + // Services referral creation. This allows Amazon Web Services-originated flows + // testing in the sandbox catalog. + Origin types.OpportunityOrigin + + // Specifies the opportunity's unique identifier in the partner's CRM system. + // This value is essential to track and reconcile because it's included in the + // outbound payload sent back to the partner. + // + // This field allows partners to link an opportunity to their CRM, to ensure + // seamless integration and accurate synchronization between the Partner Central + // API and the partner's internal systems. + PartnerOpportunityIdentifier *string + + // Identifies the type of support the partner needs from Amazon Web Services. + // + // Valid values: + // + // - Co-Sell - Architectural Validation: Confirmation from Amazon Web Services + // that the partner's proposed solution architecture is aligned with Amazon Web + // Services best practices and poses minimal architectural risks. + // + // - Co-Sell - Business Presentation: Request Amazon Web Services seller's + // participation in a joint customer presentation. + // + // - Co-Sell - Competitive Information: Access to Amazon Web Services + // competitive resources and support for the partner's proposed solution. + // + // - Co-Sell - Pricing Assistance: Connect with an Amazon Web Services seller + // for support situations where a partner may be receiving an upfront discount on a + // service (for example: EDP deals). + // + // - Co-Sell - Technical Consultation: Connect with an Amazon Web Services + // Solutions Architect to address the partner's questions about the proposed + // solution. + // + // - Co-Sell - Total Cost of Ownership Evaluation: Assistance with quoting + // different cost savings of proposed solutions on Amazon Web Services versus + // on-premises or a traditional hosting environment. + // + // - Co-Sell - Deal Support: Request Amazon Web Services seller's support to + // progress the opportunity (for example: joint customer call, strategic + // positioning). + // + // - Co-Sell - Support for Public Tender / RFx: Opportunity related to the + // public sector where the partner needs Amazon Web Services RFx support. + // + // - Do Not Need Support from AWS Sales Rep: Indicates that a partner doesn't + // need support from an Amazon Web Services sales representative, and the partner + // solely manages the opportunity. It's possible to request co-selling support on + // these opportunities at any stage during their lifecycle. Also known as, + // for-visibility-only (FVO) opportunity. + PrimaryNeedsFromAws []types.PrimaryNeedFromAws + + // An object that contains project details for the Opportunity . + Project *types.Project + + // Specifies details of a customer's procurement terms. Required only for partners + // in eligible programs. + SoftwareRevenue *types.SoftwareRevenue + + noSmithyDocumentSerde +} + +type CreateOpportunityOutput struct { + + // Read-only, system-generated Opportunity unique identifier. Amazon Web Services + // creates this identifier, and it's used for all subsequent actions on the + // opportunity, such as updates, associations, and submissions. It ensures that + // each opportunity can be accurately tracked and managed within the system. + // + // This member is required. + Id *string + + // DateTime when the opportunity was last modified. When the Opportunity is + // created, its value is equal to CreatedDate . + LastModifiedDate *time.Time + + // Specifies the opportunity's unique identifier in the partner's CRM system. This + // value is essential to track and reconcile because it's included in the outbound + // payload sent back to the partner. + PartnerOpportunityIdentifier *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateOpportunityMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateOpportunity{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateOpportunity{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateOpportunity"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opCreateOpportunityMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateOpportunityValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOpportunity(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateOpportunity struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateOpportunity) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateOpportunity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateOpportunityInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateOpportunityInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateOpportunityMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateOpportunity{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateOpportunity(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateOpportunity", + } +} diff --git a/service/partnercentralselling/api_op_DisassociateOpportunity.go b/service/partnercentralselling/api_op_DisassociateOpportunity.go new file mode 100644 index 00000000000..f455524d40a --- /dev/null +++ b/service/partnercentralselling/api_op_DisassociateOpportunity.go @@ -0,0 +1,211 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Allows you to remove an existing association between an Opportunity and +// +// related entities such as a Partner Solution, Amazon Web Services product, or an +// Amazon Web Services Marketplace offer. This operation is the counterpart to +// AssociateOpportunity , and it provides flexibility to manage associations as +// business needs change. +// +// Use this operation to update the associations of an Opportunity due to changes +// in the related entities, or if an association was made in error. Ensuring +// accurate associations helps maintain clarity and accuracy to track and manage +// business opportunities. When you replace an entity, first attach the new entity +// and then disassociate the one to be removed, especially if it's the last +// remaining related entity that's required. +func (c *Client) DisassociateOpportunity(ctx context.Context, params *DisassociateOpportunityInput, optFns ...func(*Options)) (*DisassociateOpportunityOutput, error) { + if params == nil { + params = &DisassociateOpportunityInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DisassociateOpportunity", params, optFns, c.addOperationDisassociateOpportunityMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DisassociateOpportunityOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DisassociateOpportunityInput struct { + + // Specifies the catalog associated with the request. This field takes a string + // value from a predefined list: AWS or Sandbox . The catalog determines which + // environment the opportunity disassociation is made in. Use AWS to disassociate + // opportunities in the Amazon Web Services catalog, and Sandbox to test in a + // secure and isolated environment. + // + // This member is required. + Catalog *string + + // The opportunity's unique identifier for when you want to disassociate it from + // related entities. This identifier is crucial to ensure the correct opportunity + // is updated, especially in environments with numerous opportunities. + // + // Validation: Ensure that the identifier provided corresponds to an existing + // opportunity in the Amazon Web Services system because incorrect identifiers + // result in an error and no changes are made. + // + // This member is required. + OpportunityIdentifier *string + + // The related entity's identifier that you want to disassociate from the + // opportunity. Depending on the type of entity, this could be a simple identifier + // or an Amazon Resource Name (ARN) for entities managed through Amazon Web + // Services Marketplace. + // + // For Amazon Web Services Marketplace entities, use the Amazon Web Services + // Marketplace API to obtain the necessary ARNs. For guidance on retrieving these + // ARNs, refer to [Amazon Web Services Marketplace Catalog API]. + // + // Validation: Ensure the identifier or ARN is valid and corresponds to an + // existing related entity. An incorrect or invalid identifier results in an error. + // + // [Amazon Web Services Marketplace Catalog API]: https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/welcome.html + // + // This member is required. + RelatedEntityIdentifier *string + + // The type of the entity that you're disassociating from the opportunity. When + // you specify the entity type, it helps the system correctly process the + // disassociation request and ensures that the right connections are removed. + // + // Examples of entity types include Partner Solution, Amazon Web Services product, + // and Amazon Web Services Marketplace offer. Ensure that the value matches one of + // the expected entity types. + // + // Validation: Provide a valid entity type to ensure successful disassociation. + // Invalid or incorrect entity types result in an error. + // + // This member is required. + RelatedEntityType types.RelatedEntityType + + noSmithyDocumentSerde +} + +type DisassociateOpportunityOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDisassociateOpportunityMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpDisassociateOpportunity{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDisassociateOpportunity{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateOpportunity"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpDisassociateOpportunityValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateOpportunity(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDisassociateOpportunity(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DisassociateOpportunity", + } +} diff --git a/service/partnercentralselling/api_op_GetAwsOpportunitySummary.go b/service/partnercentralselling/api_op_GetAwsOpportunitySummary.go new file mode 100644 index 00000000000..76f780ddcad --- /dev/null +++ b/service/partnercentralselling/api_op_GetAwsOpportunitySummary.go @@ -0,0 +1,229 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a summary of an AWS Opportunity. This summary includes high-level +// +// details about the opportunity sourced from AWS, such as lifecycle information, +// customer details, and involvement type. It is useful for tracking updates on the +// AWS opportunity corresponding to an opportunity in the partner's account. +func (c *Client) GetAwsOpportunitySummary(ctx context.Context, params *GetAwsOpportunitySummaryInput, optFns ...func(*Options)) (*GetAwsOpportunitySummaryOutput, error) { + if params == nil { + params = &GetAwsOpportunitySummaryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetAwsOpportunitySummary", params, optFns, c.addOperationGetAwsOpportunitySummaryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetAwsOpportunitySummaryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetAwsOpportunitySummaryInput struct { + + // Specifies the catalog in which the AWS Opportunity is located. Accepted values + // include AWS for production opportunities or Sandbox for testing purposes. The + // catalog determines which environment the opportunity data is pulled from. + // + // This member is required. + Catalog *string + + // The unique identifier for the related partner opportunity. Use this field to + // correlate an AWS opportunity with its corresponding partner opportunity in your + // CRM system. + // + // This member is required. + RelatedOpportunityIdentifier *string + + noSmithyDocumentSerde +} + +type GetAwsOpportunitySummaryOutput struct { + + // Specifies the catalog in which the AWS Opportunity exists. This is the + // environment (e.g., AWS or Sandbox ) where the opportunity is being managed. + // + // This member is required. + Catalog *string + + // Provides details about the customer associated with the AWS Opportunity, + // including account information, industry, and other key customer data. These + // details help partners understand the business context of the opportunity. + Customer *types.AwsOpportunityCustomer + + // Provides insights into the AWS Opportunity, including engagement score and + // recommended actions that AWS suggests for the partner. + Insights *types.AwsOpportunityInsights + + // Specifies the type of involvement AWS has in the opportunity, such as direct + // co-sell or advisory support. This field helps partners understand the role AWS + // will play in advancing the opportunity. + InvolvementType types.SalesInvolvementType + + // Provides a reason for any changes in the involvement type of AWS in the + // opportunity. This field is used to track why the level of AWS engagement has + // changed from For Visibility Only to Co-sell offering transparency into the + // partnership dynamics. + InvolvementTypeChangeReason types.InvolvementTypeChangeReason + + // Contains lifecycle information for the AWS Opportunity, including review + // status, stage, and target close date. This field is crucial for partners to + // monitor the progression of the opportunity. + LifeCycle *types.AwsOpportunityLifeCycle + + // Details the AWS Opportunity team, including key members involved in the + // opportunity. This information helps partners know who from AWS is engaged and + // their roles in the opportunity. + OpportunityTeam []types.AwsTeamMember + + // Specifies whether the AWS Opportunity originated from AWS or the partner. This + // helps distinguish between opportunities that were sourced by AWS and those + // referred by the partner. + Origin types.OpportunityOrigin + + // Provides details about the project associated with the AWS Opportunity, + // including the customer’s business problem, expected outcomes, and project scope. + // This information is crucial for understanding the broader context of the + // opportunity. + Project *types.AwsOpportunityProject + + // Lists related entity identifiers, such as AWS products or partner solutions, + // associated with the AWS Opportunity. These identifiers provide additional + // context and help partners understand which AWS services are involved. + RelatedEntityIds *types.AwsOpportunityRelatedEntities + + // Provides the unique identifier of the related partner opportunity, allowing + // partners to link the AWS Opportunity to their corresponding opportunity in their + // CRM system. + RelatedOpportunityId *string + + // Defines the visibility level for the AWS Opportunity. Use Full visibility for + // most cases, while Limited visibility is reserved for special programs or + // sensitive opportunities. + Visibility types.Visibility + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetAwsOpportunitySummaryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetAwsOpportunitySummary{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetAwsOpportunitySummary{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetAwsOpportunitySummary"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpGetAwsOpportunitySummaryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAwsOpportunitySummary(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetAwsOpportunitySummary(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetAwsOpportunitySummary", + } +} diff --git a/service/partnercentralselling/api_op_GetEngagementInvitation.go b/service/partnercentralselling/api_op_GetEngagementInvitation.go new file mode 100644 index 00000000000..124616e9b25 --- /dev/null +++ b/service/partnercentralselling/api_op_GetEngagementInvitation.go @@ -0,0 +1,219 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves the details of an engagement invitation shared by AWS with a partner. +// The information includes key aspects such as the customer, project details, and +// lifecycle information related to the engagement. +func (c *Client) GetEngagementInvitation(ctx context.Context, params *GetEngagementInvitationInput, optFns ...func(*Options)) (*GetEngagementInvitationOutput, error) { + if params == nil { + params = &GetEngagementInvitationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetEngagementInvitation", params, optFns, c.addOperationGetEngagementInvitationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetEngagementInvitationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetEngagementInvitationInput struct { + + // Specifies the catalog associated with the request. The field accepts values + // from the predefined set: AWS for live operations or Sandbox for testing + // environments. + // + // This member is required. + Catalog *string + + // Specifies the unique identifier for the engagement invitation being retrieved. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type GetEngagementInvitationOutput struct { + + // Indicates the catalog from which the engagement invitation details are + // retrieved. This field helps in identifying the appropriate catalog (e.g., AWS + // or Sandbox ) used in the request. + // + // This member is required. + Catalog *string + + // Unique identifier assigned to the engagement invitation being retrieved. + // + // This member is required. + Id *string + + // The Amazon Resource Name (ARN) that uniquely identifies the engagement + // invitation. + Arn *string + + // The title of the engagement invitation, summarizing the purpose or key + // objectives of the opportunity shared by AWS. + EngagementTitle *string + + // Indicates the date on which the engagement invitation will expire if not + // accepted by the partner. + ExpirationDate *time.Time + + // The date when the engagement invitation was sent to the partner. + InvitationDate *time.Time + + // Details of the engagement invitation payload, including specific data relevant + // to the invitation's contents, such as customer information and opportunity + // insights. + Payload types.Payload + + // The type of payload contained in the engagement invitation, indicating what + // data or context the payload covers. + PayloadType types.EngagementInvitationPayloadType + + // Information about the partner organization or team that received the engagement + // invitation, including contact details and identifiers. + Receiver types.Receiver + + // If the engagement invitation was rejected, this field specifies the reason + // provided by the partner for the rejection. + RejectionReason *string + + // Specifies the AWS Account ID of the sender, which identifies the AWS team + // responsible for sharing the engagement invitation. + SenderAwsAccountId *string + + // The name of the AWS organization or team that sent the engagement invitation. + SenderCompanyName *string + + // The current status of the engagement invitation (e.g., Accepted , Pending , or + // Rejected ). + Status types.InvitationStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetEngagementInvitationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetEngagementInvitation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetEngagementInvitation{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetEngagementInvitation"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpGetEngagementInvitationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEngagementInvitation(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetEngagementInvitation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetEngagementInvitation", + } +} diff --git a/service/partnercentralselling/api_op_GetOpportunity.go b/service/partnercentralselling/api_op_GetOpportunity.go new file mode 100644 index 00000000000..5a7442fc114 --- /dev/null +++ b/service/partnercentralselling/api_op_GetOpportunity.go @@ -0,0 +1,285 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Fetches the Opportunity record from Partner Central by a given Identifier . +// +// Use the ListOpportunities action or the event notification (from Amazon +// EventBridge) to obtain this identifier. +func (c *Client) GetOpportunity(ctx context.Context, params *GetOpportunityInput, optFns ...func(*Options)) (*GetOpportunityOutput, error) { + if params == nil { + params = &GetOpportunityInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetOpportunity", params, optFns, c.addOperationGetOpportunityMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetOpportunityOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetOpportunityInput struct { + + // Specifies the catalog associated with the request. This field takes a string + // value from a predefined list: AWS or Sandbox . The catalog determines which + // environment the opportunity is fetched from. Use AWS to retrieve opportunities + // in the Amazon Web Services catalog, and Sandbox to retrieve opportunities in a + // secure and isolated testing environment. + // + // This member is required. + Catalog *string + + // Read-only, system generated Opportunity unique identifier. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type GetOpportunityOutput struct { + + // Specifies the catalog associated with the request. This field takes a string + // value from a predefined list: AWS or Sandbox . The catalog determines which + // environment the opportunity information is retrieved from. Use AWS to retrieve + // opportunities in the Amazon Web Services catalog, and Sandbox to retrieve + // opportunities in a secure and isolated testing environment. + // + // This member is required. + Catalog *string + + // DateTime when the Opportunity was last created. + // + // This member is required. + CreatedDate *time.Time + + // Read-only, system generated Opportunity unique identifier. + // + // This member is required. + Id *string + + // DateTime when the opportunity was last modified. + // + // This member is required. + LastModifiedDate *time.Time + + // Provides information about the associations of other entities with the + // opportunity. These entities include identifiers for AWSProducts , Partner + // Solutions , and AWSMarketplaceOffers . + // + // This member is required. + RelatedEntityIdentifiers *types.RelatedEntityIdentifiers + + // Specifies details of the customer associated with the Opportunity . + Customer *types.Customer + + // An object that contains lifecycle details for the Opportunity . + LifeCycle *types.LifeCycle + + // An object that contains marketing details for the Opportunity . + Marketing *types.Marketing + + // Indicates whether the Opportunity pertains to a national security project. This + // field must be set to true only when the customer's industry is Government. + // Additional privacy and security measures apply during the review and management + // process for opportunities marked as NationalSecurity . + NationalSecurity types.NationalSecurity + + // Represents the internal team handling the opportunity. Specify the members + // involved in collaborating on this opportunity within the partner's organization. + OpportunityTeam []types.Contact + + // Specifies the opportunity type as renewal, new, or expansion. + // + // Opportunity types: + // + // - New opportunity: Represents a new business opportunity with a potential + // customer that's not previously engaged with your solutions or services. + // + // - Renewal opportunity: Represents an opportunity to renew an existing + // contract or subscription with a current customer, ensuring continuity of + // service. + // + // - Expansion opportunity: Represents an opportunity to expand the scope of an + // existing contract or subscription, either by adding new services or increasing + // the volume of existing services for a current customer. + OpportunityType types.OpportunityType + + // Specifies the opportunity's unique identifier in the partner's CRM system. This + // value is essential to track and reconcile because it's included in the outbound + // payload sent back to the partner. + PartnerOpportunityIdentifier *string + + // Identifies the type of support the partner needs from Amazon Web Services. + // + // Valid values: + // + // - Co-Sell - Architectural Validation: Confirmation from Amazon Web Services + // that the partner's proposed solution architecture is aligned with Amazon Web + // Services best practices and poses minimal architectural risks. + // + // - Co-Sell - Business Presentation: Request Amazon Web Services seller's + // participation in a joint customer presentation. + // + // - Co-Sell - Competitive Information: Access to Amazon Web Services + // competitive resources and support for the partner's proposed solution. + // + // - Co-Sell - Pricing Assistance: Connect with an Amazon Web Services seller + // for support situations where a partner may be receiving an upfront discount on a + // service (for example: EDP deals). + // + // - Co-Sell - Technical Consultation: Connect with an Amazon Web Services + // Solutions Architect to address the partner's questions about the proposed + // solution. + // + // - Co-Sell - Total Cost of Ownership Evaluation: Assistance with quoting + // different cost savings of proposed solutions on Amazon Web Services versus + // on-premises or a traditional hosting environment. + // + // - Co-Sell - Deal Support: Request Amazon Web Services seller's support to + // progress the opportunity (for example: joint customer call, strategic + // positioning). + // + // - Co-Sell - Support for Public Tender / RFx: Opportunity related to the + // public sector where the partner needs Amazon Web Services RFx support. + // + // - Do Not Need Support from Amazon Web Services Sales Rep: Indicates that a + // partner doesn't need support from an Amazon Web Services sales representative, + // and the partner solely manages the opportunity. It's possible to request + // co-selling support on these opportunities at any stage during their lifecycle. + // Also known as, for-visibility-only (FVO) opportunity. + PrimaryNeedsFromAws []types.PrimaryNeedFromAws + + // An object that contains project details summary for the Opportunity . + Project *types.Project + + // Specifies details of a customer's procurement terms. Required only for partners + // in eligible programs. + SoftwareRevenue *types.SoftwareRevenue + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetOpportunityMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetOpportunity{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetOpportunity{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetOpportunity"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpGetOpportunityValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOpportunity(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetOpportunity(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetOpportunity", + } +} diff --git a/service/partnercentralselling/api_op_ListEngagementInvitations.go b/service/partnercentralselling/api_op_ListEngagementInvitations.go new file mode 100644 index 00000000000..547736e7505 --- /dev/null +++ b/service/partnercentralselling/api_op_ListEngagementInvitations.go @@ -0,0 +1,288 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of engagement invitations sent to the partner. This allows +// partners to view all pending or past engagement invitations, helping them track +// opportunities shared by AWS. +func (c *Client) ListEngagementInvitations(ctx context.Context, params *ListEngagementInvitationsInput, optFns ...func(*Options)) (*ListEngagementInvitationsOutput, error) { + if params == nil { + params = &ListEngagementInvitationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListEngagementInvitations", params, optFns, c.addOperationListEngagementInvitationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListEngagementInvitationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListEngagementInvitationsInput struct { + + // Specifies the catalog from which to list the engagement invitations. Use AWS + // for production invitations or Sandbox for testing environments. + // + // This member is required. + Catalog *string + + // Specifies the type of participant for which to list engagement invitations. + // Identifies the role of the participant. + // + // This member is required. + ParticipantType types.ParticipantType + + // Specifies the maximum number of engagement invitations to return in the + // response. If more results are available, a pagination token will be provided. + MaxResults *int32 + + // A pagination token used to retrieve additional pages of results when the + // response to a previous request was truncated. Pass this token to continue + // listing invitations from where the previous call left off. + NextToken *string + + // Defines the type of payload associated with the engagement invitations to be + // listed. The attributes in this payload help decide on acceptance or rejection of + // the invitation. + PayloadType []types.EngagementInvitationPayloadType + + // Specifies the sorting options for listing engagement invitations. Invitations + // can be sorted by fields such as InvitationDate or Status to help partners view + // results in their preferred order. + Sort *types.OpportunityEngagementInvitationSort + + noSmithyDocumentSerde +} + +type ListEngagementInvitationsOutput struct { + + // An array containing summaries of engagement invitations. Each summary includes + // key information such as the invitation title, invitation date, and the current + // status of the invitation. + EngagementInvitationSummaries []types.EngagementInvitationSummary + + // A pagination token returned when there are more results available than can be + // returned in a single call. Use this token to retrieve additional pages of + // engagement invitation summaries. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListEngagementInvitationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListEngagementInvitations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListEngagementInvitations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListEngagementInvitations"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpListEngagementInvitationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEngagementInvitations(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListEngagementInvitationsPaginatorOptions is the paginator options for +// ListEngagementInvitations +type ListEngagementInvitationsPaginatorOptions struct { + // Specifies the maximum number of engagement invitations to return in the + // response. If more results are available, a pagination token will be provided. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListEngagementInvitationsPaginator is a paginator for ListEngagementInvitations +type ListEngagementInvitationsPaginator struct { + options ListEngagementInvitationsPaginatorOptions + client ListEngagementInvitationsAPIClient + params *ListEngagementInvitationsInput + nextToken *string + firstPage bool +} + +// NewListEngagementInvitationsPaginator returns a new +// ListEngagementInvitationsPaginator +func NewListEngagementInvitationsPaginator(client ListEngagementInvitationsAPIClient, params *ListEngagementInvitationsInput, optFns ...func(*ListEngagementInvitationsPaginatorOptions)) *ListEngagementInvitationsPaginator { + if params == nil { + params = &ListEngagementInvitationsInput{} + } + + options := ListEngagementInvitationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListEngagementInvitationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListEngagementInvitationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListEngagementInvitations page. +func (p *ListEngagementInvitationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEngagementInvitationsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListEngagementInvitations(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListEngagementInvitationsAPIClient is a client that implements the +// ListEngagementInvitations operation. +type ListEngagementInvitationsAPIClient interface { + ListEngagementInvitations(context.Context, *ListEngagementInvitationsInput, ...func(*Options)) (*ListEngagementInvitationsOutput, error) +} + +var _ ListEngagementInvitationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListEngagementInvitations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListEngagementInvitations", + } +} diff --git a/service/partnercentralselling/api_op_ListOpportunities.go b/service/partnercentralselling/api_op_ListOpportunities.go new file mode 100644 index 00000000000..1f0d6107d20 --- /dev/null +++ b/service/partnercentralselling/api_op_ListOpportunities.go @@ -0,0 +1,328 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This request accepts a list of filters to use to retrieve a specific subset of +// opportunities, as well as sort options. This feature is available to partners +// from [Partner Central]using the ListOpportunities API action. +// +// To synchronize your system with Amazon Web Services, only list the +// opportunities that were newly created or updated. We recommend you rely on +// events emitted by the service into your Amazon Web Services account’s Amazon +// EventBridge default event bus, you can also use the ListOpportunities action. +// +// We recommend the following approach: +// +// - Find the latest LastModifiedDate that you stored, and only use the values +// that came from Amazon Web Services. Don’t use values generated by your system. +// +// - When you send a ListOpportunities request, submit the date in ISO 8601 +// format in the AfterLastModifiedDate filter. +// +// - Amazon Web Services only returns opportunities created or updated on or +// after that date and time. Use NextToken to iterate over all pages. +// +// [Partner Central]: https://partnercentral.awspartner.com/ +func (c *Client) ListOpportunities(ctx context.Context, params *ListOpportunitiesInput, optFns ...func(*Options)) (*ListOpportunitiesOutput, error) { + if params == nil { + params = &ListOpportunitiesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListOpportunities", params, optFns, c.addOperationListOpportunitiesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListOpportunitiesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListOpportunitiesInput struct { + + // Specifies the catalog associated with the request. This field takes a string + // value from a predefined list: AWS or Sandbox . The catalog determines which + // environment the opportunities are listed in. Use AWS for listing real + // opportunities in the Amazon Web Services catalog, and Sandbox for to test in a + // secure and isolated environment. + // + // This member is required. + Catalog *string + + // Filters the opportunities based on the customer's company name. This allows + // partners to search for opportunities associated with a specific customer by + // matching the provided company name string. + CustomerCompanyName []string + + // Filters the opportunities based on the opportunity identifier. This allows + // partners to retrieve specific opportunities by providing their unique + // identifiers, ensuring precise results. + Identifier []string + + // Filters the opportunities based on their last modified date. This filter helps + // retrieve opportunities that were updated after the specified date, allowing + // partners to track recent changes or updates. + LastModifiedDate *types.LastModifiedDate + + // Filters the opportunities based on their current lifecycle approval status. Use + // this filter to retrieve opportunities with statuses such as Pending Submission , + // In Review , Action Required , or Approved . + LifeCycleReviewStatus []types.ReviewStatus + + // Filters the opportunities based on their lifecycle stage. This filter allows + // partners to retrieve opportunities at various stages in the sales cycle, such as + // Qualified , Technical Validation , Business Validation , or Closed Won . + LifeCycleStage []types.Stage + + // Specifies the maximum number of results to return in a single call. This + // limits the number of opportunities returned in the response to avoid overloading + // with too many results at once. + // + // Default: 20 + MaxResults *int32 + + // A pagination token used to retrieve the next set of results in subsequent + // calls. This token is included in the response only if there are additional + // result pages available. + NextToken *string + + // An object that specifies how the response is sorted. The default Sort.SortBy + // value is LastModifiedDate . + Sort *types.OpportunitySort + + noSmithyDocumentSerde +} + +type ListOpportunitiesOutput struct { + + // An array that contains minimal details for opportunities that match the + // request criteria. This summary view provides a quick overview of relevant + // opportunities. + // + // This member is required. + OpportunitySummaries []types.OpportunitySummary + + // A pagination token used to retrieve the next set of results in subsequent + // calls. This token is included in the response only if there are additional + // result pages available. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListOpportunitiesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListOpportunities{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListOpportunities{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListOpportunities"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpListOpportunitiesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOpportunities(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListOpportunitiesPaginatorOptions is the paginator options for ListOpportunities +type ListOpportunitiesPaginatorOptions struct { + // Specifies the maximum number of results to return in a single call. This + // limits the number of opportunities returned in the response to avoid overloading + // with too many results at once. + // + // Default: 20 + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListOpportunitiesPaginator is a paginator for ListOpportunities +type ListOpportunitiesPaginator struct { + options ListOpportunitiesPaginatorOptions + client ListOpportunitiesAPIClient + params *ListOpportunitiesInput + nextToken *string + firstPage bool +} + +// NewListOpportunitiesPaginator returns a new ListOpportunitiesPaginator +func NewListOpportunitiesPaginator(client ListOpportunitiesAPIClient, params *ListOpportunitiesInput, optFns ...func(*ListOpportunitiesPaginatorOptions)) *ListOpportunitiesPaginator { + if params == nil { + params = &ListOpportunitiesInput{} + } + + options := ListOpportunitiesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListOpportunitiesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListOpportunitiesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListOpportunities page. +func (p *ListOpportunitiesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListOpportunitiesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListOpportunities(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListOpportunitiesAPIClient is a client that implements the ListOpportunities +// operation. +type ListOpportunitiesAPIClient interface { + ListOpportunities(context.Context, *ListOpportunitiesInput, ...func(*Options)) (*ListOpportunitiesOutput, error) +} + +var _ ListOpportunitiesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListOpportunities(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListOpportunities", + } +} diff --git a/service/partnercentralselling/api_op_ListSolutions.go b/service/partnercentralselling/api_op_ListSolutions.go new file mode 100644 index 00000000000..c23fb631f5d --- /dev/null +++ b/service/partnercentralselling/api_op_ListSolutions.go @@ -0,0 +1,296 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of Partner Solutions that the partner registered on Partner +// +// Central. This API is used to generate a list of solutions that an end user +// selects from for association with an opportunity. +func (c *Client) ListSolutions(ctx context.Context, params *ListSolutionsInput, optFns ...func(*Options)) (*ListSolutionsOutput, error) { + if params == nil { + params = &ListSolutionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListSolutions", params, optFns, c.addOperationListSolutionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListSolutionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListSolutionsInput struct { + + // Specifies the catalog associated with the request. This field takes a string + // value from a predefined list: AWS or Sandbox . The catalog determines which + // environment the solutions are listed in. Use AWS to list solutions in the + // Amazon Web Services catalog, and Sandbox to list solutions in a secure and + // isolated testing environment. + // + // This member is required. + Catalog *string + + // Filters the solutions based on the category to which they belong. This allows + // partners to search for solutions within specific categories, such as Software , + // Consulting , or Managed Services . + Category []string + + // Filters the solutions based on their unique identifier. Use this filter to + // retrieve specific solutions by providing the solution's identifier for accurate + // results. + Identifier []string + + // The maximum number of results returned by a single call. This value must be + // provided in the next call to retrieve the next set of results. + // + // Default: 20 + MaxResults *int32 + + // A pagination token used to retrieve the next set of results in subsequent + // calls. This token is included in the response only if there are additional + // result pages available. + NextToken *string + + // Object that configures sorting done on the response. Default Sort.SortBy is + // Identifier . + Sort *types.SolutionSort + + // Filters the solutions based on their status. This filter helps retrieve + // solutions with statuses such as Active , Inactive , or Pending Approval , + // allowing partners to manage their solution portfolios effectively. + Status []types.SolutionStatus + + noSmithyDocumentSerde +} + +type ListSolutionsOutput struct { + + // An array with minimal details for solutions matching the request criteria. + // + // This member is required. + SolutionSummaries []types.SolutionBase + + // A pagination token used to retrieve the next set of results in subsequent + // calls. This token is included in the response only if there are additional + // result pages available. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListSolutionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListSolutions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListSolutions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListSolutions"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpListSolutionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSolutions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListSolutionsPaginatorOptions is the paginator options for ListSolutions +type ListSolutionsPaginatorOptions struct { + // The maximum number of results returned by a single call. This value must be + // provided in the next call to retrieve the next set of results. + // + // Default: 20 + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListSolutionsPaginator is a paginator for ListSolutions +type ListSolutionsPaginator struct { + options ListSolutionsPaginatorOptions + client ListSolutionsAPIClient + params *ListSolutionsInput + nextToken *string + firstPage bool +} + +// NewListSolutionsPaginator returns a new ListSolutionsPaginator +func NewListSolutionsPaginator(client ListSolutionsAPIClient, params *ListSolutionsInput, optFns ...func(*ListSolutionsPaginatorOptions)) *ListSolutionsPaginator { + if params == nil { + params = &ListSolutionsInput{} + } + + options := ListSolutionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListSolutionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListSolutionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListSolutions page. +func (p *ListSolutionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSolutionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListSolutions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListSolutionsAPIClient is a client that implements the ListSolutions operation. +type ListSolutionsAPIClient interface { + ListSolutions(context.Context, *ListSolutionsInput, ...func(*Options)) (*ListSolutionsOutput, error) +} + +var _ ListSolutionsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListSolutions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListSolutions", + } +} diff --git a/service/partnercentralselling/api_op_RejectEngagementInvitation.go b/service/partnercentralselling/api_op_RejectEngagementInvitation.go new file mode 100644 index 00000000000..e0b21e9bd0f --- /dev/null +++ b/service/partnercentralselling/api_op_RejectEngagementInvitation.go @@ -0,0 +1,181 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Use this action to reject an EngagementInvitation that has been shared by AWS. +// Rejecting the engagement invitation indicates that the partner does not wish to +// pursue the opportunity, and all related data will be inaccessible after the +// rejection. +func (c *Client) RejectEngagementInvitation(ctx context.Context, params *RejectEngagementInvitationInput, optFns ...func(*Options)) (*RejectEngagementInvitationOutput, error) { + if params == nil { + params = &RejectEngagementInvitationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RejectEngagementInvitation", params, optFns, c.addOperationRejectEngagementInvitationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RejectEngagementInvitationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RejectEngagementInvitationInput struct { + + // Specifies the catalog related to the engagement invitation. Accepted values are + // AWS and Sandbox , which determine the environment in which the opportunity is + // managed. + // + // This member is required. + Catalog *string + + // Specifies the unique identifier of the EngagementInvitation to be rejected. + // Providing the correct identifier ensures that the intended invitation is + // rejected. + // + // This member is required. + Identifier *string + + // Specifies the reason for rejecting the engagement invitation. Providing a + // reason helps document the rationale behind the rejection and assists AWS in + // tracking patterns or issues. Possible values include: + // + // - Customer problem unclear: The customer's problem is not clearly defined. + // + // - Next steps unclear: The next steps required to proceed are not clear. + // + // - Unable to support: The partner is unable to provide support due to resource + // or capability constraints. + // + // - Duplicate of Partner Referral: The opportunity is a duplicate of an + // existing referral. + // + // - Other: Any other reason not covered by the specified values. + RejectionReason *string + + noSmithyDocumentSerde +} + +type RejectEngagementInvitationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRejectEngagementInvitationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpRejectEngagementInvitation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpRejectEngagementInvitation{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "RejectEngagementInvitation"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpRejectEngagementInvitationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRejectEngagementInvitation(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opRejectEngagementInvitation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "RejectEngagementInvitation", + } +} diff --git a/service/partnercentralselling/api_op_StartEngagementByAcceptingInvitationTask.go b/service/partnercentralselling/api_op_StartEngagementByAcceptingInvitationTask.go new file mode 100644 index 00000000000..fdc7f626520 --- /dev/null +++ b/service/partnercentralselling/api_op_StartEngagementByAcceptingInvitationTask.go @@ -0,0 +1,245 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// This action starts the engagement by accepting an EngagementInvitation . The +// task is asynchronous and involves several steps: accepting the invitation, +// creating an opportunity in the partner’s account from the AWS Opportunity, and +// copying over key details for tracking. Once completed, an Opportunity Created +// event is generated, indicating that the opportunity has been successfully +// created in the partner's account. +func (c *Client) StartEngagementByAcceptingInvitationTask(ctx context.Context, params *StartEngagementByAcceptingInvitationTaskInput, optFns ...func(*Options)) (*StartEngagementByAcceptingInvitationTaskOutput, error) { + if params == nil { + params = &StartEngagementByAcceptingInvitationTaskInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartEngagementByAcceptingInvitationTask", params, optFns, c.addOperationStartEngagementByAcceptingInvitationTaskMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartEngagementByAcceptingInvitationTaskOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartEngagementByAcceptingInvitationTaskInput struct { + + // Specifies the catalog related to the task. Use AWS for production engagements + // and Sandbox for testing scenarios. + // + // This member is required. + Catalog *string + + // A unique, case-sensitive identifier provided by the client to ensure the + // idempotency of the request. Can be a random or meaningful string, but must be + // unique for each request. + // + // This member is required. + ClientToken *string + + // Specifies the unique identifier of the EngagementInvitation to be accepted. + // Providing the correct identifier ensures the right engagement invitation is + // processed. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type StartEngagementByAcceptingInvitationTaskOutput struct { + + // Returns the identifier of the engagement invitation that was accepted and used + // to create the opportunity. + EngagementInvitationId *string + + // If the task fails, this field contains a detailed message describing the + // failure and possible recovery steps. + Message *string + + // Returns the original opportunity identifier passed in the request. This is the + // unique identifier for the opportunity. + OpportunityId *string + + // Indicates the reason for task failure using an enumerated code. Possible values + // are: ACCEPT_ENGAGEMENT_INVITATION_FAILED , GET_ENGAGEMENT_INVITATION_FAILED , + // CREATE_OPPORTUNITY_FAILED , CREATE_RESOURCE_VIEW_AUTOMATION_FAILED , + // SUBMIT_OPPORTUNITY_FAILED . + ReasonCode types.ReasonCode + + // The timestamp indicating when the task was initiated. The format follows RFC + // 3339 section 5.6. + StartTime *time.Time + + // The Amazon Resource Name (ARN) of the task, used for tracking and managing the + // task within AWS. + TaskArn *string + + // The unique identifier of the task, used to track the task’s progress. This + // value follows a specific pattern: ^oit-[0-9a-z]{13}$ . + TaskId *string + + // Indicates the current status of the task. Valid values include IN_PROGRESS , + // COMPLETE , and FAILED . + TaskStatus types.TaskStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartEngagementByAcceptingInvitationTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpStartEngagementByAcceptingInvitationTask{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpStartEngagementByAcceptingInvitationTask{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartEngagementByAcceptingInvitationTask"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opStartEngagementByAcceptingInvitationTaskMiddleware(stack, options); err != nil { + return err + } + if err = addOpStartEngagementByAcceptingInvitationTaskValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartEngagementByAcceptingInvitationTask(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpStartEngagementByAcceptingInvitationTask struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpStartEngagementByAcceptingInvitationTask) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpStartEngagementByAcceptingInvitationTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*StartEngagementByAcceptingInvitationTaskInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *StartEngagementByAcceptingInvitationTaskInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opStartEngagementByAcceptingInvitationTaskMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpStartEngagementByAcceptingInvitationTask{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opStartEngagementByAcceptingInvitationTask(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartEngagementByAcceptingInvitationTask", + } +} diff --git a/service/partnercentralselling/api_op_StartEngagementFromOpportunityTask.go b/service/partnercentralselling/api_op_StartEngagementFromOpportunityTask.go new file mode 100644 index 00000000000..90486197c1a --- /dev/null +++ b/service/partnercentralselling/api_op_StartEngagementFromOpportunityTask.go @@ -0,0 +1,244 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// This action initiates the engagement process from an existing opportunity by +// accepting the engagement invitation and creating a corresponding opportunity in +// the partner’s system. Similar to StartEngagementByAcceptingInvitationTask , this +// action is asynchronous and performs multiple steps before completion. +func (c *Client) StartEngagementFromOpportunityTask(ctx context.Context, params *StartEngagementFromOpportunityTaskInput, optFns ...func(*Options)) (*StartEngagementFromOpportunityTaskOutput, error) { + if params == nil { + params = &StartEngagementFromOpportunityTaskInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartEngagementFromOpportunityTask", params, optFns, c.addOperationStartEngagementFromOpportunityTaskMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartEngagementFromOpportunityTaskOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartEngagementFromOpportunityTaskInput struct { + + // Indicates the level of AWS involvement in the opportunity. This field helps + // track AWS's role and participation throughout the engagement, such as providing + // technical support, deal assistance, or sales support. + // + // This member is required. + AwsSubmission *types.AwsSubmission + + // Specifies the catalog in which the engagement is tracked. Acceptable values + // include AWS for production and Sandbox for testing environments. + // + // This member is required. + Catalog *string + + // A unique token provided by the client to ensure the idempotency of the request. + // It helps prevent the same task from being performed multiple times. + // + // This member is required. + ClientToken *string + + // The unique identifier of the opportunity from which the engagement task is to + // be initiated. This ensures the task is applied to the correct opportunity. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type StartEngagementFromOpportunityTaskOutput struct { + + // If the task fails, this field contains a detailed message describing the + // failure and possible recovery steps. + Message *string + + // Returns the original opportunity identifier passed in the request, which is the + // unique identifier for the opportunity created in the partner’s system. + OpportunityId *string + + // Indicates the reason for task failure using an enumerated code. Possible values + // are: ACCEPT_ENGAGEMENT_INVITATION_FAILED , GET_ENGAGEMENT_INVITATION_FAILED , + // CREATE_OPPORTUNITY_FAILED , CREATE_RESOURCE_VIEW_AUTOMATION_FAILED , + // SUBMIT_OPPORTUNITY_FAILED . + ReasonCode types.ReasonCode + + // The timestamp indicating when the task was initiated. The format follows RFC + // 3339 section 5.6. + StartTime *time.Time + + // The Amazon Resource Name (ARN) of the task, used for tracking and managing the + // task within AWS. + TaskArn *string + + // The unique identifier of the task, used to track the task’s progress. This + // value follows a specific pattern: ^oit-[0-9a-z]{13}$ . + TaskId *string + + // Indicates the current status of the task. Valid values include IN_PROGRESS , + // COMPLETE , and FAILED . + TaskStatus types.TaskStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartEngagementFromOpportunityTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpStartEngagementFromOpportunityTask{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpStartEngagementFromOpportunityTask{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartEngagementFromOpportunityTask"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opStartEngagementFromOpportunityTaskMiddleware(stack, options); err != nil { + return err + } + if err = addOpStartEngagementFromOpportunityTaskValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartEngagementFromOpportunityTask(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpStartEngagementFromOpportunityTask struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpStartEngagementFromOpportunityTask) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpStartEngagementFromOpportunityTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*StartEngagementFromOpportunityTaskInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *StartEngagementFromOpportunityTaskInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opStartEngagementFromOpportunityTaskMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpStartEngagementFromOpportunityTask{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opStartEngagementFromOpportunityTask(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartEngagementFromOpportunityTask", + } +} diff --git a/service/partnercentralselling/api_op_UpdateOpportunity.go b/service/partnercentralselling/api_op_UpdateOpportunity.go new file mode 100644 index 00000000000..e6fdec1a197 --- /dev/null +++ b/service/partnercentralselling/api_op_UpdateOpportunity.go @@ -0,0 +1,273 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Updates the Opportunity record identified by a given Identifier . This +// +// operation allows you to modify the details of an existing opportunity to reflect +// the latest information and progress. Use this action to keep the opportunity +// record up-to-date and accurate. +// +// When you perform updates, include the entire payload with each request. If any +// field is omitted, the API assumes that the field is set to null . The best +// practice is to always perform a GetOpportunity to retrieve the latest values, +// then send the complete payload with the updated values to be changed. +func (c *Client) UpdateOpportunity(ctx context.Context, params *UpdateOpportunityInput, optFns ...func(*Options)) (*UpdateOpportunityOutput, error) { + if params == nil { + params = &UpdateOpportunityInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateOpportunity", params, optFns, c.addOperationUpdateOpportunityMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateOpportunityOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateOpportunityInput struct { + + // Specifies the catalog associated with the request. This field takes a string + // value from a predefined list: AWS or Sandbox . The catalog determines which + // environment the opportunity is updated in. Use AWS to update real opportunities + // in the production environment, and Sandbox to test in a secure and isolated + // environment. When you use the Sandbox catalog, it allows you to simulate and + // validate your interactions with Amazon Web Services services without affecting + // live data or operations. + // + // This member is required. + Catalog *string + + // Read-only, system generated Opportunity unique identifier. + // + // This member is required. + Identifier *string + + // DateTime when the opportunity was last modified. + // + // This member is required. + LastModifiedDate *time.Time + + // Specifies details of the customer associated with the Opportunity . + Customer *types.Customer + + // An object that contains lifecycle details for the Opportunity . + LifeCycle *types.LifeCycle + + // An object that contains marketing details for the Opportunity . + Marketing *types.Marketing + + // Specifies if the opportunity is associated with national security concerns. + // This flag is only applicable when the industry is Government . For national + // security-related opportunities, specific validation and compliance rules may + // apply, impacting the opportunity's visibility and processing. + NationalSecurity types.NationalSecurity + + // Specifies the opportunity type as a renewal, new, or expansion. + // + // Opportunity types: + // + // - New opportunity: Represents a new business opportunity with a potential + // customer that's not previously engaged with your solutions or services. + // + // - Renewal opportunity: Represents an opportunity to renew an existing + // contract or subscription with a current customer, ensuring continuity of + // service. + // + // - Expansion opportunity: Represents an opportunity to expand the scope of an + // existing contract or subscription, either by adding new services or increasing + // the volume of existing services for a current customer. + OpportunityType types.OpportunityType + + // Specifies the opportunity's unique identifier in the partner's CRM system. This + // value is essential to track and reconcile because it's included in the outbound + // payload sent back to the partner. + PartnerOpportunityIdentifier *string + + // Identifies the type of support the partner needs from Amazon Web Services. + // + // Valid values: + // + // - Co-Sell - Architectural Validation: Confirmation from Amazon Web Services + // that the partner's proposed solution architecture is aligned with Amazon Web + // Services best practices and poses minimal architectural risks. + // + // - Co-Sell - Business Presentation: Request Amazon Web Services seller's + // participation in a joint customer presentation. + // + // - Co-Sell - Competitive Information: Access to Amazon Web Services + // competitive resources and support for the partner's proposed solution. + // + // - Co-Sell - Pricing Assistance: Connect with an AWS seller for support + // situations where a partner may be receiving an upfront discount on a service + // (for example: EDP deals). + // + // - Co-Sell - Technical Consultation: Connection with an Amazon Web Services + // Solutions Architect to address the partner's questions about the proposed + // solution. + // + // - Co-Sell - Total Cost of Ownership Evaluation: Assistance with quoting + // different cost savings of proposed solutions on Amazon Web Services versus + // on-premises or a traditional hosting environment. + // + // - Co-Sell - Deal Support: Request Amazon Web Services seller's support to + // progress the opportunity (for example: joint customer call, strategic + // positioning). + // + // - Co-Sell - Support for Public Tender / RFx: Opportunity related to the + // public sector where the partner needs RFx support from Amazon Web Services. + // + // - Do Not Need Support from AWS Sales Rep: Indicates that a partner doesn't + // need support from an Amazon Web Services Sales representative. The opportunity + // is managed solely by the partner. It's possible to request co-selling support on + // these opportunities at any stage during their lifecycle. Also known as, + // for-visibility-only (FVO) opportunity. + PrimaryNeedsFromAws []types.PrimaryNeedFromAws + + // An object that contains project details summary for the Opportunity . + Project *types.Project + + // Specifies details of a customer's procurement terms. Required only for partners + // in eligible programs. + SoftwareRevenue *types.SoftwareRevenue + + noSmithyDocumentSerde +} + +type UpdateOpportunityOutput struct { + + // Read-only, system generated Opportunity unique identifier. + // + // This member is required. + Id *string + + // DateTime when the opportunity was last modified. + // + // This member is required. + LastModifiedDate *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateOpportunityMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateOpportunity{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateOpportunity{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateOpportunity"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpUpdateOpportunityValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateOpportunity(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateOpportunity(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateOpportunity", + } +} diff --git a/service/partnercentralselling/auth.go b/service/partnercentralselling/auth.go new file mode 100644 index 00000000000..44a12e9115e --- /dev/null +++ b/service/partnercentralselling/auth.go @@ -0,0 +1,313 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { + params.Region = options.Region +} + +type setLegacyContextSigningOptionsMiddleware struct { +} + +func (*setLegacyContextSigningOptionsMiddleware) ID() string { + return "setLegacyContextSigningOptions" +} + +func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + rscheme := getResolvedAuthScheme(ctx) + schemeID := rscheme.Scheme.SchemeID() + + if sn := awsmiddleware.GetSigningName(ctx); sn != "" { + if schemeID == "aws.auth#sigv4" { + smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn) + } else if schemeID == "aws.auth#sigv4a" { + smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn) + } + } + + if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" { + if schemeID == "aws.auth#sigv4" { + smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr) + } else if schemeID == "aws.auth#sigv4a" { + smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr}) + } + } + + return next.HandleFinalize(ctx, in) +} + +func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before) +} + +type withAnonymous struct { + resolver AuthSchemeResolver +} + +var _ AuthSchemeResolver = (*withAnonymous)(nil) + +func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { + opts, err := v.resolver.ResolveAuthSchemes(ctx, params) + if err != nil { + return nil, err + } + + opts = append(opts, &smithyauth.Option{ + SchemeID: smithyauth.SchemeIDAnonymous, + }) + return opts, nil +} + +func wrapWithAnonymousAuth(options *Options) { + if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok { + return + } + + options.AuthSchemeResolver = &withAnonymous{ + resolver: options.AuthSchemeResolver, + } +} + +// AuthResolverParameters contains the set of inputs necessary for auth scheme +// resolution. +type AuthResolverParameters struct { + // The name of the operation being invoked. + Operation string + + // The region in which the operation is being invoked. + Region string +} + +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { + params := &AuthResolverParameters{ + Operation: operation, + } + + bindAuthParamsRegion(ctx, params, input, options) + + return params +} + +// AuthSchemeResolver returns a set of possible authentication options for an +// operation. +type AuthSchemeResolver interface { + ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error) +} + +type defaultAuthSchemeResolver struct{} + +var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil) + +func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { + if overrides, ok := operationAuthOptions[params.Operation]; ok { + return overrides(params), nil + } + return serviceAuthOptions(params), nil +} + +var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{} + +func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option { + return []*smithyauth.Option{ + { + SchemeID: smithyauth.SchemeIDSigV4, + SignerProperties: func() smithy.Properties { + var props smithy.Properties + smithyhttp.SetSigV4SigningName(&props, "partnercentral-selling") + smithyhttp.SetSigV4SigningRegion(&props, params.Region) + return props + }(), + }, + } +} + +type resolveAuthSchemeMiddleware struct { + operation string + options Options +} + +func (*resolveAuthSchemeMiddleware) ID() string { + return "ResolveAuthScheme" +} + +func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + + params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) + options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) + } + + scheme, ok := m.selectScheme(options) + if !ok { + return out, metadata, fmt.Errorf("could not select an auth scheme") + } + + ctx = setResolvedAuthScheme(ctx, scheme) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() + return next.HandleFinalize(ctx, in) +} + +func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) { + for _, option := range options { + if option.SchemeID == smithyauth.SchemeIDAnonymous { + return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true + } + + for _, scheme := range m.options.AuthSchemes { + if scheme.SchemeID() != option.SchemeID { + continue + } + + if scheme.IdentityResolver(m.options) != nil { + return newResolvedAuthScheme(scheme, option), true + } + } + } + + return nil, false +} + +type resolvedAuthSchemeKey struct{} + +type resolvedAuthScheme struct { + Scheme smithyhttp.AuthScheme + IdentityProperties smithy.Properties + SignerProperties smithy.Properties +} + +func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme { + return &resolvedAuthScheme{ + Scheme: scheme, + IdentityProperties: option.IdentityProperties, + SignerProperties: option.SignerProperties, + } +} + +func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context { + return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme) +} + +func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme { + v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme) + return v +} + +type getIdentityMiddleware struct { + options Options +} + +func (*getIdentityMiddleware) ID() string { + return "GetIdentity" +} + +func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + resolver := rscheme.Scheme.IdentityResolver(m.options) + if resolver == nil { + return out, metadata, fmt.Errorf("no identity resolver") + } + + identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration", + func() (smithyauth.Identity, error) { + return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) + }, + func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { + return out, metadata, fmt.Errorf("get identity: %w", err) + } + + ctx = setIdentity(ctx, identity) + + span.End() + return next.HandleFinalize(ctx, in) +} + +type identityKey struct{} + +func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context { + return middleware.WithStackValue(ctx, identityKey{}, identity) +} + +func getIdentity(ctx context.Context) smithyauth.Identity { + v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity) + return v +} + +type signRequestMiddleware struct { + options Options +} + +func (*signRequestMiddleware) ID() string { + return "Signing" +} + +func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "SignRequest") + defer span.End() + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) + } + + rscheme := getResolvedAuthScheme(ctx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + identity := getIdentity(ctx) + if identity == nil { + return out, metadata, fmt.Errorf("no identity") + } + + signer := rscheme.Scheme.Signer() + if signer == nil { + return out, metadata, fmt.Errorf("no signer") + } + + _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { + return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) + }, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { + return out, metadata, fmt.Errorf("sign request: %w", err) + } + + span.End() + return next.HandleFinalize(ctx, in) +} diff --git a/service/partnercentralselling/deserializers.go b/service/partnercentralselling/deserializers.go new file mode 100644 index 00000000000..82802ef5f1a --- /dev/null +++ b/service/partnercentralselling/deserializers.go @@ -0,0 +1,6132 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + smithy "github.com/aws/smithy-go" + smithyio "github.com/aws/smithy-go/io" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "io/ioutil" + "strings" + "time" +) + +func deserializeS3Expires(v string) (*time.Time, error) { + t, err := smithytime.ParseHTTPDate(v) + if err != nil { + return nil, nil + } + return &t, nil +} + +type awsAwsjson10_deserializeOpAssignOpportunity struct { +} + +func (*awsAwsjson10_deserializeOpAssignOpportunity) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpAssignOpportunity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorAssignOpportunity(response, &metadata) + } + output := &AssignOpportunityOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorAssignOpportunity(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpAssociateOpportunity struct { +} + +func (*awsAwsjson10_deserializeOpAssociateOpportunity) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpAssociateOpportunity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorAssociateOpportunity(response, &metadata) + } + output := &AssociateOpportunityOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorAssociateOpportunity(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpCreateOpportunity struct { +} + +func (*awsAwsjson10_deserializeOpCreateOpportunity) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpCreateOpportunity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorCreateOpportunity(response, &metadata) + } + output := &CreateOpportunityOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentCreateOpportunityOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorCreateOpportunity(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpDisassociateOpportunity struct { +} + +func (*awsAwsjson10_deserializeOpDisassociateOpportunity) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpDisassociateOpportunity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorDisassociateOpportunity(response, &metadata) + } + output := &DisassociateOpportunityOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorDisassociateOpportunity(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpGetAwsOpportunitySummary struct { +} + +func (*awsAwsjson10_deserializeOpGetAwsOpportunitySummary) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpGetAwsOpportunitySummary) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorGetAwsOpportunitySummary(response, &metadata) + } + output := &GetAwsOpportunitySummaryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentGetAwsOpportunitySummaryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorGetAwsOpportunitySummary(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpGetEngagementInvitation struct { +} + +func (*awsAwsjson10_deserializeOpGetEngagementInvitation) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpGetEngagementInvitation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorGetEngagementInvitation(response, &metadata) + } + output := &GetEngagementInvitationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentGetEngagementInvitationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorGetEngagementInvitation(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpGetOpportunity struct { +} + +func (*awsAwsjson10_deserializeOpGetOpportunity) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpGetOpportunity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorGetOpportunity(response, &metadata) + } + output := &GetOpportunityOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentGetOpportunityOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorGetOpportunity(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListEngagementInvitations struct { +} + +func (*awsAwsjson10_deserializeOpListEngagementInvitations) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListEngagementInvitations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorListEngagementInvitations(response, &metadata) + } + output := &ListEngagementInvitationsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentListEngagementInvitationsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorListEngagementInvitations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListOpportunities struct { +} + +func (*awsAwsjson10_deserializeOpListOpportunities) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListOpportunities) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorListOpportunities(response, &metadata) + } + output := &ListOpportunitiesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentListOpportunitiesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorListOpportunities(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListSolutions struct { +} + +func (*awsAwsjson10_deserializeOpListSolutions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListSolutions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorListSolutions(response, &metadata) + } + output := &ListSolutionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentListSolutionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorListSolutions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpRejectEngagementInvitation struct { +} + +func (*awsAwsjson10_deserializeOpRejectEngagementInvitation) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpRejectEngagementInvitation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorRejectEngagementInvitation(response, &metadata) + } + output := &RejectEngagementInvitationOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorRejectEngagementInvitation(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpStartEngagementByAcceptingInvitationTask struct { +} + +func (*awsAwsjson10_deserializeOpStartEngagementByAcceptingInvitationTask) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpStartEngagementByAcceptingInvitationTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorStartEngagementByAcceptingInvitationTask(response, &metadata) + } + output := &StartEngagementByAcceptingInvitationTaskOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentStartEngagementByAcceptingInvitationTaskOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorStartEngagementByAcceptingInvitationTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpStartEngagementFromOpportunityTask struct { +} + +func (*awsAwsjson10_deserializeOpStartEngagementFromOpportunityTask) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpStartEngagementFromOpportunityTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorStartEngagementFromOpportunityTask(response, &metadata) + } + output := &StartEngagementFromOpportunityTaskOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentStartEngagementFromOpportunityTaskOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorStartEngagementFromOpportunityTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateOpportunity struct { +} + +func (*awsAwsjson10_deserializeOpUpdateOpportunity) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateOpportunity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateOpportunity(response, &metadata) + } + output := &UpdateOpportunityOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentUpdateOpportunityOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorUpdateOpportunity(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsAwsjson10_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AccessDeniedException{} + err := awsAwsjson10_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ConflictException{} + err := awsAwsjson10_deserializeDocumentConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InternalServerException{} + err := awsAwsjson10_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourceNotFoundException{} + err := awsAwsjson10_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ServiceQuotaExceededException{} + err := awsAwsjson10_deserializeDocumentServiceQuotaExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ThrottlingException{} + err := awsAwsjson10_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ValidationException{} + err := awsAwsjson10_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAccount(v **types.Account, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Account + if *v == nil { + sv = &types.Account{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Address": + if err := awsAwsjson10_deserializeDocumentAddress(&sv.Address, value); err != nil { + return err + } + + case "AwsAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccount to be of type string, got %T instead", value) + } + sv.AwsAccountId = ptr.String(jtv) + } + + case "CompanyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.CompanyName = ptr.String(jtv) + } + + case "Duns": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DunsNumber to be of type string, got %T instead", value) + } + sv.Duns = ptr.String(jtv) + } + + case "Industry": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Industry to be of type string, got %T instead", value) + } + sv.Industry = types.Industry(jtv) + } + + case "OtherIndustry": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OtherIndustry = ptr.String(jtv) + } + + case "WebsiteUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WebsiteUrl to be of type string, got %T instead", value) + } + sv.WebsiteUrl = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAccountReceiver(v **types.AccountReceiver, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccountReceiver + if *v == nil { + sv = &types.AccountReceiver{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Alias": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Alias to be of type string, got %T instead", value) + } + sv.Alias = ptr.String(jtv) + } + + case "AwsAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccount to be of type string, got %T instead", value) + } + sv.AwsAccountId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAccountSummary(v **types.AccountSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccountSummary + if *v == nil { + sv = &types.AccountSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Address": + if err := awsAwsjson10_deserializeDocumentAddressSummary(&sv.Address, value); err != nil { + return err + } + + case "CompanyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.CompanyName = ptr.String(jtv) + } + + case "Industry": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Industry to be of type string, got %T instead", value) + } + sv.Industry = types.Industry(jtv) + } + + case "OtherIndustry": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OtherIndustry = ptr.String(jtv) + } + + case "WebsiteUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WebsiteUrl to be of type string, got %T instead", value) + } + sv.WebsiteUrl = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAddress(v **types.Address, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Address + if *v == nil { + sv = &types.Address{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "City": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressPart to be of type string, got %T instead", value) + } + sv.City = ptr.String(jtv) + } + + case "CountryCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CountryCode to be of type string, got %T instead", value) + } + sv.CountryCode = types.CountryCode(jtv) + } + + case "PostalCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressPart to be of type string, got %T instead", value) + } + sv.PostalCode = ptr.String(jtv) + } + + case "StateOrRegion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressPart to be of type string, got %T instead", value) + } + sv.StateOrRegion = ptr.String(jtv) + } + + case "StreetAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressPart to be of type string, got %T instead", value) + } + sv.StreetAddress = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAddressSummary(v **types.AddressSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AddressSummary + if *v == nil { + sv = &types.AddressSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "City": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressPart to be of type string, got %T instead", value) + } + sv.City = ptr.String(jtv) + } + + case "CountryCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CountryCode to be of type string, got %T instead", value) + } + sv.CountryCode = types.CountryCode(jtv) + } + + case "PostalCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressPart to be of type string, got %T instead", value) + } + sv.PostalCode = ptr.String(jtv) + } + + case "StateOrRegion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressPart to be of type string, got %T instead", value) + } + sv.StateOrRegion = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentApnPrograms(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentAwsMarketplaceOfferIdentifiers(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsMarketplaceOfferIdentifier to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentAwsOpportunityCustomer(v **types.AwsOpportunityCustomer, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AwsOpportunityCustomer + if *v == nil { + sv = &types.AwsOpportunityCustomer{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Contacts": + if err := awsAwsjson10_deserializeDocumentCustomerContactsList(&sv.Contacts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAwsOpportunityInsights(v **types.AwsOpportunityInsights, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AwsOpportunityInsights + if *v == nil { + sv = &types.AwsOpportunityInsights{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EngagementScore": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementScore to be of type string, got %T instead", value) + } + sv.EngagementScore = types.EngagementScore(jtv) + } + + case "NextBestActions": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextBestActions = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAwsOpportunityLifeCycle(v **types.AwsOpportunityLifeCycle, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AwsOpportunityLifeCycle + if *v == nil { + sv = &types.AwsOpportunityLifeCycle{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ClosedLostReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsClosedLostReason to be of type string, got %T instead", value) + } + sv.ClosedLostReason = types.AwsClosedLostReason(jtv) + } + + case "NextSteps": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PiiString to be of type string, got %T instead", value) + } + sv.NextSteps = ptr.String(jtv) + } + + case "NextStepsHistory": + if err := awsAwsjson10_deserializeDocumentProfileNextStepsHistories(&sv.NextStepsHistory, value); err != nil { + return err + } + + case "Stage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsOpportunityStage to be of type string, got %T instead", value) + } + sv.Stage = types.AwsOpportunityStage(jtv) + } + + case "TargetCloseDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Date to be of type string, got %T instead", value) + } + sv.TargetCloseDate = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAwsOpportunityProject(v **types.AwsOpportunityProject, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AwsOpportunityProject + if *v == nil { + sv = &types.AwsOpportunityProject{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ExpectedCustomerSpend": + if err := awsAwsjson10_deserializeDocumentExpectedCustomerSpendList(&sv.ExpectedCustomerSpend, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAwsOpportunityRelatedEntities(v **types.AwsOpportunityRelatedEntities, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AwsOpportunityRelatedEntities + if *v == nil { + sv = &types.AwsOpportunityRelatedEntities{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AwsProducts": + if err := awsAwsjson10_deserializeDocumentAwsProductIdentifiers(&sv.AwsProducts, value); err != nil { + return err + } + + case "Solutions": + if err := awsAwsjson10_deserializeDocumentSolutionIdentifiers(&sv.Solutions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAwsOpportunityTeamMembersList(v *[]types.AwsTeamMember, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AwsTeamMember + if *v == nil { + cv = []types.AwsTeamMember{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AwsTeamMember + destAddr := &col + if err := awsAwsjson10_deserializeDocumentAwsTeamMember(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentAwsProductIdentifiers(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsProductIdentifier to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentAwsTeamMember(v **types.AwsTeamMember, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AwsTeamMember + if *v == nil { + sv = &types.AwsTeamMember{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BusinessTitle": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsMemberBusinessTitle to be of type string, got %T instead", value) + } + sv.BusinessTitle = types.AwsMemberBusinessTitle(jtv) + } + + case "Email": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Email to be of type string, got %T instead", value) + } + sv.Email = ptr.String(jtv) + } + + case "FirstName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.FirstName = ptr.String(jtv) + } + + case "LastName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.LastName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentChannels(v *[]types.Channel, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Channel + if *v == nil { + cv = []types.Channel{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Channel + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Channel to be of type string, got %T instead", value) + } + col = types.Channel(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentContact(v **types.Contact, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Contact + if *v == nil { + sv = &types.Contact{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BusinessTitle": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobTitle to be of type string, got %T instead", value) + } + sv.BusinessTitle = ptr.String(jtv) + } + + case "Email": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Email to be of type string, got %T instead", value) + } + sv.Email = ptr.String(jtv) + } + + case "FirstName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.FirstName = ptr.String(jtv) + } + + case "LastName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.LastName = ptr.String(jtv) + } + + case "Phone": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PhoneNumber to be of type string, got %T instead", value) + } + sv.Phone = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentCustomer(v **types.Customer, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Customer + if *v == nil { + sv = &types.Customer{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Account": + if err := awsAwsjson10_deserializeDocumentAccount(&sv.Account, value); err != nil { + return err + } + + case "Contacts": + if err := awsAwsjson10_deserializeDocumentCustomerContactsList(&sv.Contacts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentCustomerContactsList(v *[]types.Contact, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Contact + if *v == nil { + cv = []types.Contact{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Contact + destAddr := &col + if err := awsAwsjson10_deserializeDocumentContact(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentCustomerSummary(v **types.CustomerSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CustomerSummary + if *v == nil { + sv = &types.CustomerSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Account": + if err := awsAwsjson10_deserializeDocumentAccountSummary(&sv.Account, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentDeliveryModels(v *[]types.DeliveryModel, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.DeliveryModel + if *v == nil { + cv = []types.DeliveryModel{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DeliveryModel + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeliveryModel to be of type string, got %T instead", value) + } + col = types.DeliveryModel(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentEngagementCustomer(v **types.EngagementCustomer, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EngagementCustomer + if *v == nil { + sv = &types.EngagementCustomer{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CompanyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CompanyName to be of type string, got %T instead", value) + } + sv.CompanyName = ptr.String(jtv) + } + + case "CountryCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CountryCode to be of type string, got %T instead", value) + } + sv.CountryCode = types.CountryCode(jtv) + } + + case "Industry": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Industry to be of type string, got %T instead", value) + } + sv.Industry = types.Industry(jtv) + } + + case "WebsiteUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CompanyWebsiteUrl to be of type string, got %T instead", value) + } + sv.WebsiteUrl = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentEngagementInvitationSummaries(v *[]types.EngagementInvitationSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.EngagementInvitationSummary + if *v == nil { + cv = []types.EngagementInvitationSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EngagementInvitationSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentEngagementInvitationSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentEngagementInvitationSummary(v **types.EngagementInvitationSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EngagementInvitationSummary + if *v == nil { + sv = &types.EngagementInvitationSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "Catalog": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogIdentifier to be of type string, got %T instead", value) + } + sv.Catalog = ptr.String(jtv) + } + + case "EngagementTitle": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementTitle to be of type string, got %T instead", value) + } + sv.EngagementTitle = ptr.String(jtv) + } + + case "ExpirationDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ExpirationDate = ptr.Time(t) + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementInvitationArnOrIdentifier to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "InvitationDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.InvitationDate = ptr.Time(t) + } + + case "PayloadType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementInvitationPayloadType to be of type string, got %T instead", value) + } + sv.PayloadType = types.EngagementInvitationPayloadType(jtv) + } + + case "Receiver": + if err := awsAwsjson10_deserializeDocumentReceiver(&sv.Receiver, value); err != nil { + return err + } + + case "SenderAwsAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountIdOrLabel to be of type string, got %T instead", value) + } + sv.SenderAwsAccountId = ptr.String(jtv) + } + + case "SenderCompanyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SenderCompanyName = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InvitationStatus to be of type string, got %T instead", value) + } + sv.Status = types.InvitationStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentExpectedCustomerSpend(v **types.ExpectedCustomerSpend, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ExpectedCustomerSpend + if *v == nil { + sv = &types.ExpectedCustomerSpend{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Amount": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Amount = ptr.String(jtv) + } + + case "CurrencyCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CurrencyCode to be of type string, got %T instead", value) + } + sv.CurrencyCode = types.CurrencyCode(jtv) + } + + case "Frequency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaymentFrequency to be of type string, got %T instead", value) + } + sv.Frequency = types.PaymentFrequency(jtv) + } + + case "TargetCompany": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TargetCompany = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentExpectedCustomerSpendList(v *[]types.ExpectedCustomerSpend, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ExpectedCustomerSpend + if *v == nil { + cv = []types.ExpectedCustomerSpend{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ExpectedCustomerSpend + destAddr := &col + if err := awsAwsjson10_deserializeDocumentExpectedCustomerSpend(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InternalServerException + if *v == nil { + sv = &types.InternalServerException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentLifeCycle(v **types.LifeCycle, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LifeCycle + if *v == nil { + sv = &types.LifeCycle{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ClosedLostReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ClosedLostReason to be of type string, got %T instead", value) + } + sv.ClosedLostReason = types.ClosedLostReason(jtv) + } + + case "NextSteps": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PiiString to be of type string, got %T instead", value) + } + sv.NextSteps = ptr.String(jtv) + } + + case "NextStepsHistory": + if err := awsAwsjson10_deserializeDocumentNextStepsHistories(&sv.NextStepsHistory, value); err != nil { + return err + } + + case "ReviewComments": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ReviewComments = ptr.String(jtv) + } + + case "ReviewStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReviewStatus to be of type string, got %T instead", value) + } + sv.ReviewStatus = types.ReviewStatus(jtv) + } + + case "ReviewStatusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ReviewStatusReason = ptr.String(jtv) + } + + case "Stage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Stage to be of type string, got %T instead", value) + } + sv.Stage = types.Stage(jtv) + } + + case "TargetCloseDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Date to be of type string, got %T instead", value) + } + sv.TargetCloseDate = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentLifeCycleSummary(v **types.LifeCycleSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LifeCycleSummary + if *v == nil { + sv = &types.LifeCycleSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ClosedLostReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ClosedLostReason to be of type string, got %T instead", value) + } + sv.ClosedLostReason = types.ClosedLostReason(jtv) + } + + case "NextSteps": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PiiString to be of type string, got %T instead", value) + } + sv.NextSteps = ptr.String(jtv) + } + + case "ReviewComments": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ReviewComments = ptr.String(jtv) + } + + case "ReviewStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReviewStatus to be of type string, got %T instead", value) + } + sv.ReviewStatus = types.ReviewStatus(jtv) + } + + case "ReviewStatusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ReviewStatusReason = ptr.String(jtv) + } + + case "Stage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Stage to be of type string, got %T instead", value) + } + sv.Stage = types.Stage(jtv) + } + + case "TargetCloseDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Date to be of type string, got %T instead", value) + } + sv.TargetCloseDate = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentMarketing(v **types.Marketing, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Marketing + if *v == nil { + sv = &types.Marketing{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AwsFundingUsed": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsFundingUsed to be of type string, got %T instead", value) + } + sv.AwsFundingUsed = types.AwsFundingUsed(jtv) + } + + case "CampaignName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CampaignName = ptr.String(jtv) + } + + case "Channels": + if err := awsAwsjson10_deserializeDocumentChannels(&sv.Channels, value); err != nil { + return err + } + + case "Source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MarketingSource to be of type string, got %T instead", value) + } + sv.Source = types.MarketingSource(jtv) + } + + case "UseCases": + if err := awsAwsjson10_deserializeDocumentUseCases(&sv.UseCases, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentMonetaryValue(v **types.MonetaryValue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MonetaryValue + if *v == nil { + sv = &types.MonetaryValue{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Amount": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Amount = ptr.String(jtv) + } + + case "CurrencyCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CurrencyCode to be of type string, got %T instead", value) + } + sv.CurrencyCode = types.CurrencyCode(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentNextStepsHistories(v *[]types.NextStepsHistory, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.NextStepsHistory + if *v == nil { + cv = []types.NextStepsHistory{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.NextStepsHistory + destAddr := &col + if err := awsAwsjson10_deserializeDocumentNextStepsHistory(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentNextStepsHistory(v **types.NextStepsHistory, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.NextStepsHistory + if *v == nil { + sv = &types.NextStepsHistory{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Time": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.Time = ptr.Time(t) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentOpportunityInvitationPayload(v **types.OpportunityInvitationPayload, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpportunityInvitationPayload + if *v == nil { + sv = &types.OpportunityInvitationPayload{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Customer": + if err := awsAwsjson10_deserializeDocumentEngagementCustomer(&sv.Customer, value); err != nil { + return err + } + + case "Project": + if err := awsAwsjson10_deserializeDocumentProjectDetails(&sv.Project, value); err != nil { + return err + } + + case "ReceiverResponsibilities": + if err := awsAwsjson10_deserializeDocumentReceiverResponsibilityList(&sv.ReceiverResponsibilities, value); err != nil { + return err + } + + case "SenderContacts": + if err := awsAwsjson10_deserializeDocumentSenderContactList(&sv.SenderContacts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentOpportunitySummaries(v *[]types.OpportunitySummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.OpportunitySummary + if *v == nil { + cv = []types.OpportunitySummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.OpportunitySummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentOpportunitySummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentOpportunitySummary(v **types.OpportunitySummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpportunitySummary + if *v == nil { + sv = &types.OpportunitySummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Catalog": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogIdentifier to be of type string, got %T instead", value) + } + sv.Catalog = ptr.String(jtv) + } + + case "CreatedDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedDate = ptr.Time(t) + } + + case "Customer": + if err := awsAwsjson10_deserializeDocumentCustomerSummary(&sv.Customer, value); err != nil { + return err + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpportunityIdentifier to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "LastModifiedDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Time(t) + } + + case "LifeCycle": + if err := awsAwsjson10_deserializeDocumentLifeCycleSummary(&sv.LifeCycle, value); err != nil { + return err + } + + case "OpportunityType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpportunityType to be of type string, got %T instead", value) + } + sv.OpportunityType = types.OpportunityType(jtv) + } + + case "PartnerOpportunityIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PartnerOpportunityIdentifier = ptr.String(jtv) + } + + case "Project": + if err := awsAwsjson10_deserializeDocumentProjectSummary(&sv.Project, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentPartnerOpportunityTeamMembersList(v *[]types.Contact, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Contact + if *v == nil { + cv = []types.Contact{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Contact + destAddr := &col + if err := awsAwsjson10_deserializeDocumentContact(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentPayload(v *types.Payload, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var uv types.Payload +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "OpportunityInvitation": + var mv types.OpportunityInvitationPayload + destAddr := &mv + if err := awsAwsjson10_deserializeDocumentOpportunityInvitationPayload(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.PayloadMemberOpportunityInvitation{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsAwsjson10_deserializeDocumentPrimaryNeedsFromAws(v *[]types.PrimaryNeedFromAws, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.PrimaryNeedFromAws + if *v == nil { + cv = []types.PrimaryNeedFromAws{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PrimaryNeedFromAws + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PrimaryNeedFromAws to be of type string, got %T instead", value) + } + col = types.PrimaryNeedFromAws(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentProfileNextStepsHistories(v *[]types.ProfileNextStepsHistory, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ProfileNextStepsHistory + if *v == nil { + cv = []types.ProfileNextStepsHistory{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ProfileNextStepsHistory + destAddr := &col + if err := awsAwsjson10_deserializeDocumentProfileNextStepsHistory(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentProfileNextStepsHistory(v **types.ProfileNextStepsHistory, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ProfileNextStepsHistory + if *v == nil { + sv = &types.ProfileNextStepsHistory{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Time": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.Time = ptr.Time(t) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentProject(v **types.Project, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Project + if *v == nil { + sv = &types.Project{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AdditionalComments": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AdditionalComments = ptr.String(jtv) + } + + case "ApnPrograms": + if err := awsAwsjson10_deserializeDocumentApnPrograms(&sv.ApnPrograms, value); err != nil { + return err + } + + case "CompetitorName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CompetitorName to be of type string, got %T instead", value) + } + sv.CompetitorName = types.CompetitorName(jtv) + } + + case "CustomerBusinessProblem": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PiiString to be of type string, got %T instead", value) + } + sv.CustomerBusinessProblem = ptr.String(jtv) + } + + case "CustomerUseCase": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CustomerUseCase = ptr.String(jtv) + } + + case "DeliveryModels": + if err := awsAwsjson10_deserializeDocumentDeliveryModels(&sv.DeliveryModels, value); err != nil { + return err + } + + case "ExpectedCustomerSpend": + if err := awsAwsjson10_deserializeDocumentExpectedCustomerSpendList(&sv.ExpectedCustomerSpend, value); err != nil { + return err + } + + case "OtherCompetitorNames": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OtherCompetitorNames = ptr.String(jtv) + } + + case "OtherSolutionDescription": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PiiString to be of type string, got %T instead", value) + } + sv.OtherSolutionDescription = ptr.String(jtv) + } + + case "RelatedOpportunityIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpportunityIdentifier to be of type string, got %T instead", value) + } + sv.RelatedOpportunityIdentifier = ptr.String(jtv) + } + + case "SalesActivities": + if err := awsAwsjson10_deserializeDocumentSalesActivities(&sv.SalesActivities, value); err != nil { + return err + } + + case "Title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PiiString to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentProjectDetails(v **types.ProjectDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ProjectDetails + if *v == nil { + sv = &types.ProjectDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BusinessProblem": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementCustomerBusinessProblem to be of type string, got %T instead", value) + } + sv.BusinessProblem = ptr.String(jtv) + } + + case "ExpectedCustomerSpend": + if err := awsAwsjson10_deserializeDocumentExpectedCustomerSpendList(&sv.ExpectedCustomerSpend, value); err != nil { + return err + } + + case "TargetCompletionDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Date to be of type string, got %T instead", value) + } + sv.TargetCompletionDate = ptr.String(jtv) + } + + case "Title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentProjectSummary(v **types.ProjectSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ProjectSummary + if *v == nil { + sv = &types.ProjectSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DeliveryModels": + if err := awsAwsjson10_deserializeDocumentDeliveryModels(&sv.DeliveryModels, value); err != nil { + return err + } + + case "ExpectedCustomerSpend": + if err := awsAwsjson10_deserializeDocumentExpectedCustomerSpendList(&sv.ExpectedCustomerSpend, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentReceiver(v *types.Receiver, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var uv types.Receiver +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "Account": + var mv types.AccountReceiver + destAddr := &mv + if err := awsAwsjson10_deserializeDocumentAccountReceiver(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.ReceiverMemberAccount{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsAwsjson10_deserializeDocumentReceiverResponsibilityList(v *[]types.ReceiverResponsibility, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ReceiverResponsibility + if *v == nil { + cv = []types.ReceiverResponsibility{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ReceiverResponsibility + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReceiverResponsibility to be of type string, got %T instead", value) + } + col = types.ReceiverResponsibility(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentRelatedEntityIdentifiers(v **types.RelatedEntityIdentifiers, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RelatedEntityIdentifiers + if *v == nil { + sv = &types.RelatedEntityIdentifiers{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AwsMarketplaceOffers": + if err := awsAwsjson10_deserializeDocumentAwsMarketplaceOfferIdentifiers(&sv.AwsMarketplaceOffers, value); err != nil { + return err + } + + case "AwsProducts": + if err := awsAwsjson10_deserializeDocumentAwsProductIdentifiers(&sv.AwsProducts, value); err != nil { + return err + } + + case "Solutions": + if err := awsAwsjson10_deserializeDocumentSolutionIdentifiers(&sv.Solutions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceNotFoundException + if *v == nil { + sv = &types.ResourceNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentSalesActivities(v *[]types.SalesActivity, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.SalesActivity + if *v == nil { + cv = []types.SalesActivity{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SalesActivity + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SalesActivity to be of type string, got %T instead", value) + } + col = types.SalesActivity(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentSenderContact(v **types.SenderContact, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SenderContact + if *v == nil { + sv = &types.SenderContact{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BusinessTitle": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobTitle to be of type string, got %T instead", value) + } + sv.BusinessTitle = ptr.String(jtv) + } + + case "Email": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SenderContactEmail to be of type string, got %T instead", value) + } + sv.Email = ptr.String(jtv) + } + + case "FirstName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.FirstName = ptr.String(jtv) + } + + case "LastName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.LastName = ptr.String(jtv) + } + + case "Phone": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PhoneNumber to be of type string, got %T instead", value) + } + sv.Phone = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentSenderContactList(v *[]types.SenderContact, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.SenderContact + if *v == nil { + cv = []types.SenderContact{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SenderContact + destAddr := &col + if err := awsAwsjson10_deserializeDocumentSenderContact(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ServiceQuotaExceededException + if *v == nil { + sv = &types.ServiceQuotaExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentSoftwareRevenue(v **types.SoftwareRevenue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SoftwareRevenue + if *v == nil { + sv = &types.SoftwareRevenue{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DeliveryModel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RevenueModel to be of type string, got %T instead", value) + } + sv.DeliveryModel = types.RevenueModel(jtv) + } + + case "EffectiveDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Date to be of type string, got %T instead", value) + } + sv.EffectiveDate = ptr.String(jtv) + } + + case "ExpirationDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Date to be of type string, got %T instead", value) + } + sv.ExpirationDate = ptr.String(jtv) + } + + case "Value": + if err := awsAwsjson10_deserializeDocumentMonetaryValue(&sv.Value, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentSolutionBase(v **types.SolutionBase, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SolutionBase + if *v == nil { + sv = &types.SolutionBase{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Catalog": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogIdentifier to be of type string, got %T instead", value) + } + sv.Catalog = ptr.String(jtv) + } + + case "Category": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Category = ptr.String(jtv) + } + + case "CreatedDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedDate = ptr.Time(t) + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SolutionIdentifier to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SolutionStatus to be of type string, got %T instead", value) + } + sv.Status = types.SolutionStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentSolutionIdentifiers(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SolutionIdentifier to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentSolutionList(v *[]types.SolutionBase, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.SolutionBase + if *v == nil { + cv = []types.SolutionBase{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SolutionBase + destAddr := &col + if err := awsAwsjson10_deserializeDocumentSolutionBase(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ThrottlingException + if *v == nil { + sv = &types.ThrottlingException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentUseCases(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ValidationException + if *v == nil { + sv = &types.ValidationException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorList": + if err := awsAwsjson10_deserializeDocumentValidationExceptionErrorList(&sv.ErrorList, value); err != nil { + return err + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "Reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ValidationExceptionReason to be of type string, got %T instead", value) + } + sv.Reason = types.ValidationExceptionReason(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentValidationExceptionError(v **types.ValidationExceptionError, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ValidationExceptionError + if *v == nil { + sv = &types.ValidationExceptionError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ValidationExceptionErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ValidationExceptionErrorCode(jtv) + } + + case "FieldName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FieldName = ptr.String(jtv) + } + + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentValidationExceptionErrorList(v *[]types.ValidationExceptionError, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ValidationExceptionError + if *v == nil { + cv = []types.ValidationExceptionError{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ValidationExceptionError + destAddr := &col + if err := awsAwsjson10_deserializeDocumentValidationExceptionError(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeOpDocumentCreateOpportunityOutput(v **CreateOpportunityOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateOpportunityOutput + if *v == nil { + sv = &CreateOpportunityOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpportunityIdentifier to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "LastModifiedDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Time(t) + } + + case "PartnerOpportunityIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PartnerOpportunityIdentifier = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentGetAwsOpportunitySummaryOutput(v **GetAwsOpportunitySummaryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetAwsOpportunitySummaryOutput + if *v == nil { + sv = &GetAwsOpportunitySummaryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Catalog": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogIdentifier to be of type string, got %T instead", value) + } + sv.Catalog = ptr.String(jtv) + } + + case "Customer": + if err := awsAwsjson10_deserializeDocumentAwsOpportunityCustomer(&sv.Customer, value); err != nil { + return err + } + + case "Insights": + if err := awsAwsjson10_deserializeDocumentAwsOpportunityInsights(&sv.Insights, value); err != nil { + return err + } + + case "InvolvementType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SalesInvolvementType to be of type string, got %T instead", value) + } + sv.InvolvementType = types.SalesInvolvementType(jtv) + } + + case "InvolvementTypeChangeReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InvolvementTypeChangeReason to be of type string, got %T instead", value) + } + sv.InvolvementTypeChangeReason = types.InvolvementTypeChangeReason(jtv) + } + + case "LifeCycle": + if err := awsAwsjson10_deserializeDocumentAwsOpportunityLifeCycle(&sv.LifeCycle, value); err != nil { + return err + } + + case "OpportunityTeam": + if err := awsAwsjson10_deserializeDocumentAwsOpportunityTeamMembersList(&sv.OpportunityTeam, value); err != nil { + return err + } + + case "Origin": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpportunityOrigin to be of type string, got %T instead", value) + } + sv.Origin = types.OpportunityOrigin(jtv) + } + + case "Project": + if err := awsAwsjson10_deserializeDocumentAwsOpportunityProject(&sv.Project, value); err != nil { + return err + } + + case "RelatedEntityIds": + if err := awsAwsjson10_deserializeDocumentAwsOpportunityRelatedEntities(&sv.RelatedEntityIds, value); err != nil { + return err + } + + case "RelatedOpportunityId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpportunityIdentifier to be of type string, got %T instead", value) + } + sv.RelatedOpportunityId = ptr.String(jtv) + } + + case "Visibility": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Visibility to be of type string, got %T instead", value) + } + sv.Visibility = types.Visibility(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentGetEngagementInvitationOutput(v **GetEngagementInvitationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetEngagementInvitationOutput + if *v == nil { + sv = &GetEngagementInvitationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "Catalog": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogIdentifier to be of type string, got %T instead", value) + } + sv.Catalog = ptr.String(jtv) + } + + case "EngagementTitle": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementTitle to be of type string, got %T instead", value) + } + sv.EngagementTitle = ptr.String(jtv) + } + + case "ExpirationDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ExpirationDate = ptr.Time(t) + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementInvitationArnOrIdentifier to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "InvitationDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.InvitationDate = ptr.Time(t) + } + + case "Payload": + if err := awsAwsjson10_deserializeDocumentPayload(&sv.Payload, value); err != nil { + return err + } + + case "PayloadType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementInvitationPayloadType to be of type string, got %T instead", value) + } + sv.PayloadType = types.EngagementInvitationPayloadType(jtv) + } + + case "Receiver": + if err := awsAwsjson10_deserializeDocumentReceiver(&sv.Receiver, value); err != nil { + return err + } + + case "RejectionReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RejectionReasonString to be of type string, got %T instead", value) + } + sv.RejectionReason = ptr.String(jtv) + } + + case "SenderAwsAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountIdOrLabel to be of type string, got %T instead", value) + } + sv.SenderAwsAccountId = ptr.String(jtv) + } + + case "SenderCompanyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SenderCompanyName = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InvitationStatus to be of type string, got %T instead", value) + } + sv.Status = types.InvitationStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentGetOpportunityOutput(v **GetOpportunityOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetOpportunityOutput + if *v == nil { + sv = &GetOpportunityOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Catalog": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogIdentifier to be of type string, got %T instead", value) + } + sv.Catalog = ptr.String(jtv) + } + + case "CreatedDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedDate = ptr.Time(t) + } + + case "Customer": + if err := awsAwsjson10_deserializeDocumentCustomer(&sv.Customer, value); err != nil { + return err + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpportunityIdentifier to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "LastModifiedDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Time(t) + } + + case "LifeCycle": + if err := awsAwsjson10_deserializeDocumentLifeCycle(&sv.LifeCycle, value); err != nil { + return err + } + + case "Marketing": + if err := awsAwsjson10_deserializeDocumentMarketing(&sv.Marketing, value); err != nil { + return err + } + + case "NationalSecurity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NationalSecurity to be of type string, got %T instead", value) + } + sv.NationalSecurity = types.NationalSecurity(jtv) + } + + case "OpportunityTeam": + if err := awsAwsjson10_deserializeDocumentPartnerOpportunityTeamMembersList(&sv.OpportunityTeam, value); err != nil { + return err + } + + case "OpportunityType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpportunityType to be of type string, got %T instead", value) + } + sv.OpportunityType = types.OpportunityType(jtv) + } + + case "PartnerOpportunityIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PartnerOpportunityIdentifier = ptr.String(jtv) + } + + case "PrimaryNeedsFromAws": + if err := awsAwsjson10_deserializeDocumentPrimaryNeedsFromAws(&sv.PrimaryNeedsFromAws, value); err != nil { + return err + } + + case "Project": + if err := awsAwsjson10_deserializeDocumentProject(&sv.Project, value); err != nil { + return err + } + + case "RelatedEntityIdentifiers": + if err := awsAwsjson10_deserializeDocumentRelatedEntityIdentifiers(&sv.RelatedEntityIdentifiers, value); err != nil { + return err + } + + case "SoftwareRevenue": + if err := awsAwsjson10_deserializeDocumentSoftwareRevenue(&sv.SoftwareRevenue, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentListEngagementInvitationsOutput(v **ListEngagementInvitationsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListEngagementInvitationsOutput + if *v == nil { + sv = &ListEngagementInvitationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EngagementInvitationSummaries": + if err := awsAwsjson10_deserializeDocumentEngagementInvitationSummaries(&sv.EngagementInvitationSummaries, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentListOpportunitiesOutput(v **ListOpportunitiesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListOpportunitiesOutput + if *v == nil { + sv = &ListOpportunitiesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "OpportunitySummaries": + if err := awsAwsjson10_deserializeDocumentOpportunitySummaries(&sv.OpportunitySummaries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentListSolutionsOutput(v **ListSolutionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListSolutionsOutput + if *v == nil { + sv = &ListSolutionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "SolutionSummaries": + if err := awsAwsjson10_deserializeDocumentSolutionList(&sv.SolutionSummaries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentStartEngagementByAcceptingInvitationTaskOutput(v **StartEngagementByAcceptingInvitationTaskOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartEngagementByAcceptingInvitationTaskOutput + if *v == nil { + sv = &StartEngagementByAcceptingInvitationTaskOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EngagementInvitationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementInvitationIdentifier to be of type string, got %T instead", value) + } + sv.EngagementInvitationId = ptr.String(jtv) + } + + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "OpportunityId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpportunityIdentifier to be of type string, got %T instead", value) + } + sv.OpportunityId = ptr.String(jtv) + } + + case "ReasonCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReasonCode to be of type string, got %T instead", value) + } + sv.ReasonCode = types.ReasonCode(jtv) + } + + case "StartTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.StartTime = ptr.Time(t) + } + + case "TaskArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskArn to be of type string, got %T instead", value) + } + sv.TaskArn = ptr.String(jtv) + } + + case "TaskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskIdentifier to be of type string, got %T instead", value) + } + sv.TaskId = ptr.String(jtv) + } + + case "TaskStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskStatus to be of type string, got %T instead", value) + } + sv.TaskStatus = types.TaskStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentStartEngagementFromOpportunityTaskOutput(v **StartEngagementFromOpportunityTaskOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartEngagementFromOpportunityTaskOutput + if *v == nil { + sv = &StartEngagementFromOpportunityTaskOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "OpportunityId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpportunityIdentifier to be of type string, got %T instead", value) + } + sv.OpportunityId = ptr.String(jtv) + } + + case "ReasonCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReasonCode to be of type string, got %T instead", value) + } + sv.ReasonCode = types.ReasonCode(jtv) + } + + case "StartTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.StartTime = ptr.Time(t) + } + + case "TaskArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskArn to be of type string, got %T instead", value) + } + sv.TaskArn = ptr.String(jtv) + } + + case "TaskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskIdentifier to be of type string, got %T instead", value) + } + sv.TaskId = ptr.String(jtv) + } + + case "TaskStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskStatus to be of type string, got %T instead", value) + } + sv.TaskStatus = types.TaskStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentUpdateOpportunityOutput(v **UpdateOpportunityOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateOpportunityOutput + if *v == nil { + sv = &UpdateOpportunityOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpportunityIdentifier to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "LastModifiedDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Time(t) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type protocolErrorInfo struct { + Type string `json:"__type"` + Message string + Code any // nonstandard for awsjson but some services do present the type here +} + +func getProtocolErrorInfo(decoder *json.Decoder) (protocolErrorInfo, error) { + var errInfo protocolErrorInfo + if err := decoder.Decode(&errInfo); err != nil { + if err == io.EOF { + return errInfo, nil + } + return errInfo, err + } + + return errInfo, nil +} + +func resolveProtocolErrorType(headerType string, bodyInfo protocolErrorInfo) (string, bool) { + if len(headerType) != 0 { + return headerType, true + } else if len(bodyInfo.Type) != 0 { + return bodyInfo.Type, true + } else if code, ok := bodyInfo.Code.(string); ok && len(code) != 0 { + return code, true + } + return "", false +} diff --git a/service/partnercentralselling/doc.go b/service/partnercentralselling/doc.go new file mode 100644 index 00000000000..c08ba59c162 --- /dev/null +++ b/service/partnercentralselling/doc.go @@ -0,0 +1,53 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package partnercentralselling provides the API client, operations, and +// parameter types for Partner Central Selling API. +// +// # AWS Partner Central API for Selling +// +// # AWS Partner Central API for Selling Reference Guide +// +// Amazon Web Services (AWS) Partner Central API reference guide is designed to +// help [AWS Partners]programmatically integrate their Customer Relationship Management (CRM) +// systems with AWS Partner Central. Through the Partner Central APIs, partners can +// automate and streamline their interactions with AWS Partner Central, ensuring a +// more efficient and effective engagement in joint business activities. +// +// The AWS Partner Central API service provides standard AWS API functionality. +// You can directly use the API [Actions], or you can use an AWS SDK to access an API +// that's tailored to the programming language or platform that you're using. For +// more information about AWS application development, see [Getting Started with AWS]. For more information +// about using AWS SDKs, see [AWS SDKs]. +// +// Features offered by AWS Partner Central API +// +// - Opportunity management: Facilitates the management of co-selling +// opportunities with AWS using API actions such as CreateOpportunity , +// UpdateOpportunity , ListOpportunities , GetOpportunity , and AssignOpportunity +// . +// +// - AWS referral management: Facilitates receiving referrals shared by AWS +// using actions like ListEngagementInvitations , GetEngagementInvitation , +// StartEngagementByAcceptingInvitation , and RejectEngagementInvitation . +// +// - Entity association: Associate related entities such as AWS Products, +// Partner Solutions, and AWS Marketplace Private Offers with opportunities using +// the actions AssociateOpportunity and DisassociateOpportunity . +// +// - View AWS opportunity details: Use the GetAWSOpportunitySummary action to +// retrieve real-time summaries of AWS opportunities that are linked to your +// opportunities. +// +// - List solutions: Provides list APIs for listing solutions partners offer +// using ListSolutions . +// +// - Event subscription: Partners can subscribe to real-time updates on +// opportunities by listening to events such as Opportunity Created, Opportunity +// Updated, Engagement Invitation Accepted, Engagement Invitation Rejected and +// Engagement Invitation Created using AWS EventBridge. +// +// [AWS Partners]: https://docs.aws.amazon.com/partners/programs/ +// [Actions]: https://docs.aws.amazon.com/partner-central/latest/selling-api/API_Operations.html +// [AWS SDKs]: https://docs.aws.amazon.com/aws-sdk +// [Getting Started with AWS]: https://docs.aws.amazon.com/getting-started +package partnercentralselling diff --git a/service/partnercentralselling/endpoints.go b/service/partnercentralselling/endpoints.go new file mode 100644 index 00000000000..f7c2724cfb4 --- /dev/null +++ b/service/partnercentralselling/endpoints.go @@ -0,0 +1,537 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + "github.com/aws/aws-sdk-go-v2/internal/endpoints" + "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn" + internalendpoints "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/internal/endpoints" + smithyauth "github.com/aws/smithy-go/auth" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" + "net/url" + "os" + "strings" +) + +// EndpointResolverOptions is the service endpoint resolver options +type EndpointResolverOptions = internalendpoints.Options + +// EndpointResolver interface for resolving service endpoints. +type EndpointResolver interface { + ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) +} + +var _ EndpointResolver = &internalendpoints.Resolver{} + +// NewDefaultEndpointResolver constructs a new service endpoint resolver +func NewDefaultEndpointResolver() *internalendpoints.Resolver { + return internalendpoints.New() +} + +// EndpointResolverFunc is a helper utility that wraps a function so it satisfies +// the EndpointResolver interface. This is useful when you want to add additional +// endpoint resolving logic, or stub out specific endpoints with custom values. +type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) + +func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return fn(region, options) +} + +// EndpointResolverFromURL returns an EndpointResolver configured using the +// provided endpoint url. By default, the resolved endpoint resolver uses the +// client region as signing region, and the endpoint source is set to +// EndpointSourceCustom.You can provide functional options to configure endpoint +// values for the resolved endpoint. +func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { + e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} + for _, fn := range optFns { + fn(&e) + } + + return EndpointResolverFunc( + func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { + if len(e.SigningRegion) == 0 { + e.SigningRegion = region + } + return e, nil + }, + ) +} + +type ResolveEndpoint struct { + Resolver EndpointResolver + Options EndpointResolverOptions +} + +func (*ResolveEndpoint) ID() string { + return "ResolveEndpoint" +} + +func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.Resolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + eo := m.Options + eo.Logger = middleware.GetLogger(ctx) + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) + if err != nil { + nf := (&aws.EndpointNotFoundError{}) + if errors.As(err, &nf) { + ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false) + return next.HandleSerialize(ctx, in) + } + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL, err = url.Parse(endpoint.URL) + if err != nil { + return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) + } + + if len(awsmiddleware.GetSigningName(ctx)) == 0 { + signingName := endpoint.SigningName + if len(signingName) == 0 { + signingName = "partnercentral" + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + } + ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) + ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) + ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) + ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) + return next.HandleSerialize(ctx, in) +} +func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { + return stack.Serialize.Insert(&ResolveEndpoint{ + Resolver: o.EndpointResolver, + Options: o.EndpointOptions, + }, "OperationSerializer", middleware.Before) +} + +func removeResolveEndpointMiddleware(stack *middleware.Stack) error { + _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) + return err +} + +type wrappedEndpointResolver struct { + awsResolver aws.EndpointResolverWithOptions +} + +func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return w.awsResolver.ResolveEndpoint(ServiceID, region, options) +} + +type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) + +func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { + return a(service, region) +} + +var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) + +// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver. +// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error, +// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked +// via its middleware. +// +// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated. +func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver { + var resolver aws.EndpointResolverWithOptions + + if awsResolverWithOptions != nil { + resolver = awsResolverWithOptions + } else if awsResolver != nil { + resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) + } + + return &wrappedEndpointResolver{ + awsResolver: resolver, + } +} + +func finalizeClientEndpointResolverOptions(options *Options) { + options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() + + if len(options.EndpointOptions.ResolvedRegion) == 0 { + const fipsInfix = "-fips-" + const fipsPrefix = "fips-" + const fipsSuffix = "-fips" + + if strings.Contains(options.Region, fipsInfix) || + strings.Contains(options.Region, fipsPrefix) || + strings.Contains(options.Region, fipsSuffix) { + options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( + options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") + options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled + } + } + +} + +func resolveEndpointResolverV2(options *Options) { + if options.EndpointResolverV2 == nil { + options.EndpointResolverV2 = NewDefaultEndpointResolverV2() + } +} + +func resolveBaseEndpoint(cfg aws.Config, o *Options) { + if cfg.BaseEndpoint != nil { + o.BaseEndpoint = cfg.BaseEndpoint + } + + _, g := os.LookupEnv("AWS_ENDPOINT_URL") + _, s := os.LookupEnv("AWS_ENDPOINT_URL_PARTNERCENTRAL_SELLING") + + if g && !s { + return + } + + value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "PartnerCentral Selling", cfg.ConfigSources) + if found && err == nil { + o.BaseEndpoint = &value + } +} + +func bindRegion(region string) *string { + if region == "" { + return nil + } + return aws.String(endpoints.MapFIPSRegion(region)) +} + +// EndpointParameters provides the parameters that influence how endpoints are +// resolved. +type EndpointParameters struct { + // The AWS region used to dispatch the request. + // + // Parameter is + // required. + // + // AWS::Region + Region *string + + // When true, use the dual-stack endpoint. If the configured endpoint does not + // support dual-stack, dispatching the request MAY return an error. + // + // Defaults to + // false if no value is provided. + // + // AWS::UseDualStack + UseDualStack *bool + + // When true, send this request to the FIPS-compliant regional endpoint. If the + // configured endpoint does not have a FIPS compliant endpoint, dispatching the + // request will return an error. + // + // Defaults to false if no value is + // provided. + // + // AWS::UseFIPS + UseFIPS *bool + + // Override the endpoint used to send this request + // + // Parameter is + // required. + // + // SDK::Endpoint + Endpoint *string +} + +// ValidateRequired validates required parameters are set. +func (p EndpointParameters) ValidateRequired() error { + if p.UseDualStack == nil { + return fmt.Errorf("parameter UseDualStack is required") + } + + if p.UseFIPS == nil { + return fmt.Errorf("parameter UseFIPS is required") + } + + return nil +} + +// WithDefaults returns a shallow copy of EndpointParameterswith default values +// applied to members where applicable. +func (p EndpointParameters) WithDefaults() EndpointParameters { + if p.UseDualStack == nil { + p.UseDualStack = ptr.Bool(false) + } + + if p.UseFIPS == nil { + p.UseFIPS = ptr.Bool(false) + } + return p +} + +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + +// EndpointResolverV2 provides the interface for resolving service endpoints. +type EndpointResolverV2 interface { + // ResolveEndpoint attempts to resolve the endpoint with the provided options, + // returning the endpoint if found. Otherwise an error is returned. + ResolveEndpoint(ctx context.Context, params EndpointParameters) ( + smithyendpoints.Endpoint, error, + ) +} + +// resolver provides the implementation for resolving endpoints. +type resolver struct{} + +func NewDefaultEndpointResolverV2() EndpointResolverV2 { + return &resolver{} +} + +// ResolveEndpoint attempts to resolve the endpoint with the provided options, +// returning the endpoint if found. Otherwise an error is returned. +func (r *resolver) ResolveEndpoint( + ctx context.Context, params EndpointParameters, +) ( + endpoint smithyendpoints.Endpoint, err error, +) { + params = params.WithDefaults() + if err = params.ValidateRequired(); err != nil { + return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err) + } + _UseDualStack := *params.UseDualStack + _UseFIPS := *params.UseFIPS + + if exprVal := params.Endpoint; exprVal != nil { + _Endpoint := *exprVal + _ = _Endpoint + if _UseFIPS == true { + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") + } + if _UseDualStack == true { + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") + } + uriString := _Endpoint + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + if exprVal := params.Region; exprVal != nil { + _Region := *exprVal + _ = _Region + if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { + _PartitionResult := *exprVal + _ = _PartitionResult + if _UseFIPS == true { + if _UseDualStack == true { + if true == _PartitionResult.SupportsFIPS { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://partnercentral-selling-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") + } + } + if _UseFIPS == true { + if _PartitionResult.SupportsFIPS == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://partnercentral-selling-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") + } + if _UseDualStack == true { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://partnercentral-selling.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") + } + uriString := func() string { + var out strings.Builder + out.WriteString("https://partnercentral-selling.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.") + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region") +} + +type endpointParamsBinder interface { + bindEndpointParams(*EndpointParameters) +} + +func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { + params := &EndpointParameters{} + + params.Region = bindRegion(options.Region) + params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) + params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) + params.Endpoint = options.BaseEndpoint + + if b, ok := input.(endpointParamsBinder); ok { + b.bindEndpointParams(params) + } + + return params +} + +type resolveEndpointV2Middleware struct { + options Options +} + +func (*resolveEndpointV2Middleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "ResolveEndpoint") + defer span.End() + + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.options.EndpointResolverV2 == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) + endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", + func() (smithyendpoints.Endpoint, error) { + return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + }) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) + + if endpt.URI.RawPath == "" && req.URL.RawPath != "" { + endpt.URI.RawPath = endpt.URI.Path + } + req.URL.Scheme = endpt.URI.Scheme + req.URL.Host = endpt.URI.Host + req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path) + req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath) + for k := range endpt.Headers { + req.Header.Set(k, endpt.Headers.Get(k)) + } + + rscheme := getResolvedAuthScheme(ctx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + opts, _ := smithyauth.GetAuthOptions(&endpt.Properties) + for _, o := range opts { + rscheme.SignerProperties.SetAll(&o.SignerProperties) + } + + span.End() + return next.HandleFinalize(ctx, in) +} diff --git a/service/partnercentralselling/endpoints_config_test.go b/service/partnercentralselling/endpoints_config_test.go new file mode 100644 index 00000000000..974b2c8324e --- /dev/null +++ b/service/partnercentralselling/endpoints_config_test.go @@ -0,0 +1,139 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + "os" + "reflect" + "testing" +) + +type mockConfigSource struct { + global string + service string + ignore bool +} + +// GetIgnoreConfiguredEndpoints is used in knowing when to disable configured +// endpoints feature. +func (m mockConfigSource) GetIgnoreConfiguredEndpoints(context.Context) (bool, bool, error) { + return m.ignore, m.ignore, nil +} + +// GetServiceBaseEndpoint is used to retrieve a normalized SDK ID for use +// with configured endpoints. +func (m mockConfigSource) GetServiceBaseEndpoint(ctx context.Context, sdkID string) (string, bool, error) { + if m.service != "" { + return m.service, true, nil + } + return "", false, nil +} + +func TestResolveBaseEndpoint(t *testing.T) { + cases := map[string]struct { + envGlobal string + envService string + envIgnore bool + configGlobal string + configService string + configIgnore bool + clientEndpoint *string + expectURL *string + }{ + "env ignore": { + envGlobal: "https://env-global.dev", + envService: "https://env-partnercentral-selling.dev", + envIgnore: true, + configGlobal: "http://config-global.dev", + configService: "http://config-partnercentral-selling.dev", + expectURL: nil, + }, + "env global": { + envGlobal: "https://env-global.dev", + configGlobal: "http://config-global.dev", + configService: "http://config-partnercentral-selling.dev", + expectURL: aws.String("https://env-global.dev"), + }, + "env service": { + envGlobal: "https://env-global.dev", + envService: "https://env-partnercentral-selling.dev", + configGlobal: "http://config-global.dev", + configService: "http://config-partnercentral-selling.dev", + expectURL: aws.String("https://env-partnercentral-selling.dev"), + }, + "config ignore": { + envGlobal: "https://env-global.dev", + envService: "https://env-partnercentral-selling.dev", + configGlobal: "http://config-global.dev", + configService: "http://config-partnercentral-selling.dev", + configIgnore: true, + expectURL: nil, + }, + "config global": { + configGlobal: "http://config-global.dev", + expectURL: aws.String("http://config-global.dev"), + }, + "config service": { + configGlobal: "http://config-global.dev", + configService: "http://config-partnercentral-selling.dev", + expectURL: aws.String("http://config-partnercentral-selling.dev"), + }, + "client": { + envGlobal: "https://env-global.dev", + envService: "https://env-partnercentral-selling.dev", + configGlobal: "http://config-global.dev", + configService: "http://config-partnercentral-selling.dev", + clientEndpoint: aws.String("https://client-partnercentral-selling.dev"), + expectURL: aws.String("https://client-partnercentral-selling.dev"), + }, + } + + for name, c := range cases { + t.Run(name, func(t *testing.T) { + os.Clearenv() + + awsConfig := aws.Config{} + ignore := c.envIgnore || c.configIgnore + + if c.configGlobal != "" && !ignore { + awsConfig.BaseEndpoint = aws.String(c.configGlobal) + } + + if c.envGlobal != "" { + t.Setenv("AWS_ENDPOINT_URL", c.envGlobal) + if !ignore { + awsConfig.BaseEndpoint = aws.String(c.envGlobal) + } + } + + if c.envService != "" { + t.Setenv("AWS_ENDPOINT_URL_PARTNERCENTRAL_SELLING", c.envService) + } + + awsConfig.ConfigSources = []interface{}{ + mockConfigSource{ + global: c.envGlobal, + service: c.envService, + ignore: c.envIgnore, + }, + mockConfigSource{ + global: c.configGlobal, + service: c.configService, + ignore: c.configIgnore, + }, + } + + client := NewFromConfig(awsConfig, func(o *Options) { + if c.clientEndpoint != nil { + o.BaseEndpoint = c.clientEndpoint + } + }) + + if e, a := c.expectURL, client.options.BaseEndpoint; !reflect.DeepEqual(e, a) { + t.Errorf("expect endpoint %v , got %v", e, a) + } + }) + } +} diff --git a/service/partnercentralselling/endpoints_test.go b/service/partnercentralselling/endpoints_test.go new file mode 100644 index 00000000000..c3212129ae9 --- /dev/null +++ b/service/partnercentralselling/endpoints_test.go @@ -0,0 +1,820 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + smithy "github.com/aws/smithy-go" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/ptr" + "net/http" + "net/url" + "reflect" + "strings" + "testing" +) + +// For region us-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase0(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://partnercentral-selling-fips.us-east-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase1(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://partnercentral-selling-fips.us-east-1.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase2(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://partnercentral-selling.us-east-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase3(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://partnercentral-selling.us-east-1.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region cn-north-1 with FIPS enabled and DualStack enabled +func TestEndpointCase4(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://partnercentral-selling-fips.cn-north-1.api.amazonwebservices.com.cn") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region cn-north-1 with FIPS enabled and DualStack disabled +func TestEndpointCase5(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://partnercentral-selling-fips.cn-north-1.amazonaws.com.cn") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region cn-north-1 with FIPS disabled and DualStack enabled +func TestEndpointCase6(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://partnercentral-selling.cn-north-1.api.amazonwebservices.com.cn") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region cn-north-1 with FIPS disabled and DualStack disabled +func TestEndpointCase7(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://partnercentral-selling.cn-north-1.amazonaws.com.cn") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-gov-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase8(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://partnercentral-selling-fips.us-gov-east-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://partnercentral-selling-fips.us-gov-east-1.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://partnercentral-selling.us-gov-east-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://partnercentral-selling.us-gov-east-1.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://partnercentral-selling-fips.us-iso-east-1.c2s.ic.gov") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase15(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://partnercentral-selling.us-iso-east-1.c2s.ic.gov") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-isob-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase17(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://partnercentral-selling-fips.us-isob-east-1.sc2s.sgov.gov") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-isob-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase19(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://partnercentral-selling.us-isob-east-1.sc2s.sgov.gov") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For custom endpoint with region set and fips disabled and dualstack disabled +func TestEndpointCase20(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For custom endpoint with region not set and fips disabled and dualstack disabled +func TestEndpointCase21(t *testing.T) { + var params = EndpointParameters{ + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: FIPS and custom endpoint are not supported", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For custom endpoint with fips disabled and dualstack enabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Dualstack and custom endpoint are not supported", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/partnercentralselling/generated.json b/service/partnercentralselling/generated.json new file mode 100644 index 00000000000..df8b69c7af9 --- /dev/null +++ b/service/partnercentralselling/generated.json @@ -0,0 +1,47 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", + "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", + "github.com/aws/smithy-go": "v1.4.0" + }, + "files": [ + "api_client.go", + "api_client_test.go", + "api_op_AssignOpportunity.go", + "api_op_AssociateOpportunity.go", + "api_op_CreateOpportunity.go", + "api_op_DisassociateOpportunity.go", + "api_op_GetAwsOpportunitySummary.go", + "api_op_GetEngagementInvitation.go", + "api_op_GetOpportunity.go", + "api_op_ListEngagementInvitations.go", + "api_op_ListOpportunities.go", + "api_op_ListSolutions.go", + "api_op_RejectEngagementInvitation.go", + "api_op_StartEngagementByAcceptingInvitationTask.go", + "api_op_StartEngagementFromOpportunityTask.go", + "api_op_UpdateOpportunity.go", + "auth.go", + "deserializers.go", + "doc.go", + "endpoints.go", + "endpoints_config_test.go", + "endpoints_test.go", + "generated.json", + "internal/endpoints/endpoints.go", + "internal/endpoints/endpoints_test.go", + "options.go", + "protocol_test.go", + "serializers.go", + "snapshot_test.go", + "types/enums.go", + "types/errors.go", + "types/types.go", + "types/types_exported_test.go", + "validators.go" + ], + "go": "1.15", + "module": "github.com/aws/aws-sdk-go-v2/service/partnercentralselling", + "unstable": false +} diff --git a/service/partnercentralselling/go.mod b/service/partnercentralselling/go.mod new file mode 100644 index 00000000000..6b03fe17d1b --- /dev/null +++ b/service/partnercentralselling/go.mod @@ -0,0 +1,16 @@ +module github.com/aws/aws-sdk-go-v2/service/partnercentralselling + +go 1.21 + +require ( + github.com/aws/aws-sdk-go-v2 v1.32.4 + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.23 + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.23 + github.com/aws/smithy-go v1.22.0 +) + +replace github.com/aws/aws-sdk-go-v2 => ../../ + +replace github.com/aws/aws-sdk-go-v2/internal/configsources => ../../internal/configsources/ + +replace github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => ../../internal/endpoints/v2/ diff --git a/service/partnercentralselling/go.sum b/service/partnercentralselling/go.sum new file mode 100644 index 00000000000..70a20636e37 --- /dev/null +++ b/service/partnercentralselling/go.sum @@ -0,0 +1,2 @@ +github.com/aws/smithy-go v1.22.0 h1:uunKnWlcoL3zO7q+gG2Pk53joueEOsnNB28QdMsmiMM= +github.com/aws/smithy-go v1.22.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= diff --git a/service/partnercentralselling/go_module_metadata.go b/service/partnercentralselling/go_module_metadata.go new file mode 100644 index 00000000000..9219e1c923f --- /dev/null +++ b/service/partnercentralselling/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package partnercentralselling + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/partnercentralselling/internal/endpoints/endpoints.go b/service/partnercentralselling/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..c2baf559ea5 --- /dev/null +++ b/service/partnercentralselling/internal/endpoints/endpoints.go @@ -0,0 +1,296 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" + "github.com/aws/smithy-go/logging" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + // Logger is a logging implementation that log events should be sent to. + Logger logging.Logger + + // LogDeprecated indicates that deprecated endpoints should be logged to the + // provided logger. + LogDeprecated bool + + // ResolvedRegion is used to override the region to be resolved, rather then the + // using the value passed to the ResolveEndpoint method. This value is used by the + // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative + // name. You must not set this value directly in your application. + ResolvedRegion string + + // DisableHTTPS informs the resolver to return an endpoint that does not use the + // HTTPS scheme. + DisableHTTPS bool + + // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. + UseDualStackEndpoint aws.DualStackEndpointState + + // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. + UseFIPSEndpoint aws.FIPSEndpointState +} + +func (o Options) GetResolvedRegion() string { + return o.ResolvedRegion +} + +func (o Options) GetDisableHTTPS() bool { + return o.DisableHTTPS +} + +func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { + return o.UseDualStackEndpoint +} + +func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { + return o.UseFIPSEndpoint +} + +func transformToSharedOptions(options Options) endpoints.Options { + return endpoints.Options{ + Logger: options.Logger, + LogDeprecated: options.LogDeprecated, + ResolvedRegion: options.ResolvedRegion, + DisableHTTPS: options.DisableHTTPS, + UseDualStackEndpoint: options.UseDualStackEndpoint, + UseFIPSEndpoint: options.UseFIPSEndpoint, + } +} + +// Resolver PartnerCentral Selling endpoint resolver +type Resolver struct { + partitions endpoints.Partitions +} + +// ResolveEndpoint resolves the service endpoint for the given region and options +func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { + if len(region) == 0 { + return endpoint, &aws.MissingRegionError{} + } + + opt := transformToSharedOptions(options) + return r.partitions.ResolveEndpoint(region, opt) +} + +// New returns a new Resolver +func New() *Resolver { + return &Resolver{ + partitions: defaultPartitions, + } +} + +var partitionRegexp = struct { + Aws *regexp.Regexp + AwsCn *regexp.Regexp + AwsIso *regexp.Regexp + AwsIsoB *regexp.Regexp + AwsIsoE *regexp.Regexp + AwsIsoF *regexp.Regexp + AwsUsGov *regexp.Regexp +}{ + + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), + AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), + AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), + AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), + AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), + AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), +} + +var defaultPartitions = endpoints.Partitions{ + { + ID: "aws", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "partnercentral-selling.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "partnercentral-selling-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "partnercentral-selling-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "partnercentral-selling.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + }, + { + ID: "aws-cn", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "partnercentral-selling.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "partnercentral-selling-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "partnercentral-selling-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "partnercentral-selling.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + }, + { + ID: "aws-iso", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "partnercentral-selling-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "partnercentral-selling.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + }, + { + ID: "aws-iso-b", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "partnercentral-selling-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "partnercentral-selling.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + }, + { + ID: "aws-iso-e", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "partnercentral-selling-fips.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "partnercentral-selling.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoE, + IsRegionalized: true, + }, + { + ID: "aws-iso-f", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "partnercentral-selling-fips.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "partnercentral-selling.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoF, + IsRegionalized: true, + }, + { + ID: "aws-us-gov", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "partnercentral-selling.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "partnercentral-selling-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "partnercentral-selling-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "partnercentral-selling.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/service/partnercentralselling/internal/endpoints/endpoints_test.go b/service/partnercentralselling/internal/endpoints/endpoints_test.go new file mode 100644 index 00000000000..08e5da2d833 --- /dev/null +++ b/service/partnercentralselling/internal/endpoints/endpoints_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "testing" +) + +func TestRegexCompile(t *testing.T) { + _ = defaultPartitions +} diff --git a/service/partnercentralselling/options.go b/service/partnercentralselling/options.go new file mode 100644 index 00000000000..770a34983d3 --- /dev/null +++ b/service/partnercentralselling/options.go @@ -0,0 +1,236 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" + smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" +) + +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +type Options struct { + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // The optional application specific identifier appended to the User-Agent header. + AppID string + + // This endpoint will be given as input to an EndpointResolverV2. It is used for + // providing a custom base endpoint that is subject to modifications by the + // processing EndpointResolverV2. + BaseEndpoint *string + + // Configures the events that will be sent to the configured logger. + ClientLogMode aws.ClientLogMode + + // The credentials object to use when signing requests. + Credentials aws.CredentialsProvider + + // The configuration DefaultsMode that the SDK should use when constructing the + // clients initial default settings. + DefaultsMode aws.DefaultsMode + + // The endpoint options to be used when attempting to resolve an endpoint. + EndpointOptions EndpointResolverOptions + + // The service endpoint resolver. + // + // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a + // value for this field will likely prevent you from using any endpoint-related + // service features released after the introduction of EndpointResolverV2 and + // BaseEndpoint. + // + // To migrate an EndpointResolver implementation that uses a custom endpoint, set + // the client option BaseEndpoint instead. + EndpointResolver EndpointResolver + + // Resolves the endpoint used for a particular service operation. This should be + // used over the deprecated EndpointResolver. + EndpointResolverV2 EndpointResolverV2 + + // Signature Version 4 (SigV4) Signer + HTTPSignerV4 HTTPSignerV4 + + // Provides idempotency tokens values that will be automatically populated into + // idempotent API operations. + IdempotencyTokenProvider IdempotencyTokenProvider + + // The logger writer interface to write logging messages to. + Logger logging.Logger + + // The client meter provider. + MeterProvider metrics.MeterProvider + + // The region to send requests to. (Required) + Region string + + // RetryMaxAttempts specifies the maximum number attempts an API client will call + // an operation that fails with a retryable error. A value of 0 is ignored, and + // will not be used to configure the API client created default retryer, or modify + // per operation call's retry max attempts. + // + // If specified in an operation call's functional options with a value that is + // different than the constructed client's Options, the Client's Retryer will be + // wrapped to use the operation's specific RetryMaxAttempts value. + RetryMaxAttempts int + + // RetryMode specifies the retry mode the API client will be created with, if + // Retryer option is not also specified. + // + // When creating a new API Clients this member will only be used if the Retryer + // Options member is nil. This value will be ignored if Retryer is not nil. + // + // Currently does not support per operation call overrides, may in the future. + RetryMode aws.RetryMode + + // Retryer guides how HTTP requests should be retried in case of recoverable + // failures. When nil the API client will use a default retryer. The kind of + // default retry created by the API client can be changed with the RetryMode + // option. + Retryer aws.Retryer + + // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set + // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You + // should not populate this structure programmatically, or rely on the values here + // within your applications. + RuntimeEnvironment aws.RuntimeEnvironment + + // The client tracer provider. + TracerProvider tracing.TracerProvider + + // The initial DefaultsMode used when the client options were constructed. If the + // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved + // value was at that point in time. + // + // Currently does not support per operation call overrides, may in the future. + resolvedDefaultsMode aws.DefaultsMode + + // The HTTP client to invoke API calls with. Defaults to client's default HTTP + // implementation if nil. + HTTPClient HTTPClient + + // The auth scheme resolver which determines how to authenticate for each + // operation. + AuthSchemeResolver AuthSchemeResolver + + // The list of auth schemes supported by the client. + AuthSchemes []smithyhttp.AuthScheme +} + +// Copy creates a clone where the APIOptions list is deep copied. +func (o Options) Copy() Options { + to := o + to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) + copy(to.APIOptions, o.APIOptions) + + return to +} + +func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver { + if schemeID == "aws.auth#sigv4" { + return getSigV4IdentityResolver(o) + } + if schemeID == "smithy.api#noAuth" { + return &smithyauth.AnonymousIdentityResolver{} + } + return nil +} + +// WithAPIOptions returns a functional option for setting the Client's APIOptions +// option. +func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { + return func(o *Options) { + o.APIOptions = append(o.APIOptions, optFns...) + } +} + +// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for +// this field will likely prevent you from using any endpoint-related service +// features released after the introduction of EndpointResolverV2 and BaseEndpoint. +// +// To migrate an EndpointResolver implementation that uses a custom endpoint, set +// the client option BaseEndpoint instead. +func WithEndpointResolver(v EndpointResolver) func(*Options) { + return func(o *Options) { + o.EndpointResolver = v + } +} + +// WithEndpointResolverV2 returns a functional option for setting the Client's +// EndpointResolverV2 option. +func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) { + return func(o *Options) { + o.EndpointResolverV2 = v + } +} + +func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver { + if o.Credentials != nil { + return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials} + } + return nil +} + +// WithSigV4SigningName applies an override to the authentication workflow to +// use the given signing name for SigV4-authenticated operations. +// +// This is an advanced setting. The value here is FINAL, taking precedence over +// the resolved signing name from both auth scheme resolution and endpoint +// resolution. +func WithSigV4SigningName(name string) func(*Options) { + fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, + ) { + return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in) + } + return func(o *Options) { + o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { + return s.Initialize.Add( + middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn), + middleware.Before, + ) + }) + } +} + +// WithSigV4SigningRegion applies an override to the authentication workflow to +// use the given signing region for SigV4-authenticated operations. +// +// This is an advanced setting. The value here is FINAL, taking precedence over +// the resolved signing region from both auth scheme resolution and endpoint +// resolution. +func WithSigV4SigningRegion(region string) func(*Options) { + fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, + ) { + return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in) + } + return func(o *Options) { + o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { + return s.Initialize.Add( + middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn), + middleware.Before, + ) + }) + } +} + +func ignoreAnonymousAuth(options *Options) { + if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) { + options.Credentials = nil + } +} diff --git a/service/partnercentralselling/protocol_test.go b/service/partnercentralselling/protocol_test.go new file mode 100644 index 00000000000..7378cb0b1f1 --- /dev/null +++ b/service/partnercentralselling/protocol_test.go @@ -0,0 +1,3 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling diff --git a/service/partnercentralselling/serializers.go b/service/partnercentralselling/serializers.go new file mode 100644 index 00000000000..24b19718ad6 --- /dev/null +++ b/service/partnercentralselling/serializers.go @@ -0,0 +1,2079 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/encoding/httpbinding" + smithyjson "github.com/aws/smithy-go/encoding/json" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "path" +) + +type awsAwsjson10_serializeOpAssignOpportunity struct { +} + +func (*awsAwsjson10_serializeOpAssignOpportunity) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpAssignOpportunity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*AssignOpportunityInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.AssignOpportunity") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentAssignOpportunityInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpAssociateOpportunity struct { +} + +func (*awsAwsjson10_serializeOpAssociateOpportunity) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpAssociateOpportunity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*AssociateOpportunityInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.AssociateOpportunity") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentAssociateOpportunityInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpCreateOpportunity struct { +} + +func (*awsAwsjson10_serializeOpCreateOpportunity) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpCreateOpportunity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateOpportunityInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.CreateOpportunity") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentCreateOpportunityInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpDisassociateOpportunity struct { +} + +func (*awsAwsjson10_serializeOpDisassociateOpportunity) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpDisassociateOpportunity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DisassociateOpportunityInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.DisassociateOpportunity") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentDisassociateOpportunityInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpGetAwsOpportunitySummary struct { +} + +func (*awsAwsjson10_serializeOpGetAwsOpportunitySummary) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpGetAwsOpportunitySummary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetAwsOpportunitySummaryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.GetAwsOpportunitySummary") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentGetAwsOpportunitySummaryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpGetEngagementInvitation struct { +} + +func (*awsAwsjson10_serializeOpGetEngagementInvitation) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpGetEngagementInvitation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetEngagementInvitationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.GetEngagementInvitation") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentGetEngagementInvitationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpGetOpportunity struct { +} + +func (*awsAwsjson10_serializeOpGetOpportunity) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpGetOpportunity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetOpportunityInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.GetOpportunity") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentGetOpportunityInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpListEngagementInvitations struct { +} + +func (*awsAwsjson10_serializeOpListEngagementInvitations) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListEngagementInvitations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListEngagementInvitationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.ListEngagementInvitations") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListEngagementInvitationsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpListOpportunities struct { +} + +func (*awsAwsjson10_serializeOpListOpportunities) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListOpportunities) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListOpportunitiesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.ListOpportunities") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListOpportunitiesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpListSolutions struct { +} + +func (*awsAwsjson10_serializeOpListSolutions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListSolutions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListSolutionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.ListSolutions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListSolutionsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpRejectEngagementInvitation struct { +} + +func (*awsAwsjson10_serializeOpRejectEngagementInvitation) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpRejectEngagementInvitation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*RejectEngagementInvitationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.RejectEngagementInvitation") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentRejectEngagementInvitationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpStartEngagementByAcceptingInvitationTask struct { +} + +func (*awsAwsjson10_serializeOpStartEngagementByAcceptingInvitationTask) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpStartEngagementByAcceptingInvitationTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartEngagementByAcceptingInvitationTaskInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.StartEngagementByAcceptingInvitationTask") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentStartEngagementByAcceptingInvitationTaskInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpStartEngagementFromOpportunityTask struct { +} + +func (*awsAwsjson10_serializeOpStartEngagementFromOpportunityTask) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpStartEngagementFromOpportunityTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartEngagementFromOpportunityTaskInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.StartEngagementFromOpportunityTask") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentStartEngagementFromOpportunityTaskInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpUpdateOpportunity struct { +} + +func (*awsAwsjson10_serializeOpUpdateOpportunity) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUpdateOpportunity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateOpportunityInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.UpdateOpportunity") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUpdateOpportunityInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsAwsjson10_serializeDocumentAccount(v *types.Account, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Address != nil { + ok := object.Key("Address") + if err := awsAwsjson10_serializeDocumentAddress(v.Address, ok); err != nil { + return err + } + } + + if v.AwsAccountId != nil { + ok := object.Key("AwsAccountId") + ok.String(*v.AwsAccountId) + } + + if v.CompanyName != nil { + ok := object.Key("CompanyName") + ok.String(*v.CompanyName) + } + + if v.Duns != nil { + ok := object.Key("Duns") + ok.String(*v.Duns) + } + + if len(v.Industry) > 0 { + ok := object.Key("Industry") + ok.String(string(v.Industry)) + } + + if v.OtherIndustry != nil { + ok := object.Key("OtherIndustry") + ok.String(*v.OtherIndustry) + } + + if v.WebsiteUrl != nil { + ok := object.Key("WebsiteUrl") + ok.String(*v.WebsiteUrl) + } + + return nil +} + +func awsAwsjson10_serializeDocumentAddress(v *types.Address, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.City != nil { + ok := object.Key("City") + ok.String(*v.City) + } + + if len(v.CountryCode) > 0 { + ok := object.Key("CountryCode") + ok.String(string(v.CountryCode)) + } + + if v.PostalCode != nil { + ok := object.Key("PostalCode") + ok.String(*v.PostalCode) + } + + if v.StateOrRegion != nil { + ok := object.Key("StateOrRegion") + ok.String(*v.StateOrRegion) + } + + if v.StreetAddress != nil { + ok := object.Key("StreetAddress") + ok.String(*v.StreetAddress) + } + + return nil +} + +func awsAwsjson10_serializeDocumentApnPrograms(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson10_serializeDocumentAssigneeContact(v *types.AssigneeContact, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BusinessTitle != nil { + ok := object.Key("BusinessTitle") + ok.String(*v.BusinessTitle) + } + + if v.Email != nil { + ok := object.Key("Email") + ok.String(*v.Email) + } + + if v.FirstName != nil { + ok := object.Key("FirstName") + ok.String(*v.FirstName) + } + + if v.LastName != nil { + ok := object.Key("LastName") + ok.String(*v.LastName) + } + + return nil +} + +func awsAwsjson10_serializeDocumentAwsSubmission(v *types.AwsSubmission, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.InvolvementType) > 0 { + ok := object.Key("InvolvementType") + ok.String(string(v.InvolvementType)) + } + + if len(v.Visibility) > 0 { + ok := object.Key("Visibility") + ok.String(string(v.Visibility)) + } + + return nil +} + +func awsAwsjson10_serializeDocumentChannels(v []types.Channel, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsAwsjson10_serializeDocumentContact(v *types.Contact, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BusinessTitle != nil { + ok := object.Key("BusinessTitle") + ok.String(*v.BusinessTitle) + } + + if v.Email != nil { + ok := object.Key("Email") + ok.String(*v.Email) + } + + if v.FirstName != nil { + ok := object.Key("FirstName") + ok.String(*v.FirstName) + } + + if v.LastName != nil { + ok := object.Key("LastName") + ok.String(*v.LastName) + } + + if v.Phone != nil { + ok := object.Key("Phone") + ok.String(*v.Phone) + } + + return nil +} + +func awsAwsjson10_serializeDocumentCustomer(v *types.Customer, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Account != nil { + ok := object.Key("Account") + if err := awsAwsjson10_serializeDocumentAccount(v.Account, ok); err != nil { + return err + } + } + + if v.Contacts != nil { + ok := object.Key("Contacts") + if err := awsAwsjson10_serializeDocumentCustomerContactsList(v.Contacts, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentCustomerContactsList(v []types.Contact, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentContact(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentDeliveryModels(v []types.DeliveryModel, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsAwsjson10_serializeDocumentEngagementInvitationsPayloadType(v []types.EngagementInvitationPayloadType, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsAwsjson10_serializeDocumentExpectedCustomerSpend(v *types.ExpectedCustomerSpend, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Amount != nil { + ok := object.Key("Amount") + ok.String(*v.Amount) + } + + if len(v.CurrencyCode) > 0 { + ok := object.Key("CurrencyCode") + ok.String(string(v.CurrencyCode)) + } + + if len(v.Frequency) > 0 { + ok := object.Key("Frequency") + ok.String(string(v.Frequency)) + } + + if v.TargetCompany != nil { + ok := object.Key("TargetCompany") + ok.String(*v.TargetCompany) + } + + return nil +} + +func awsAwsjson10_serializeDocumentExpectedCustomerSpendList(v []types.ExpectedCustomerSpend, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentExpectedCustomerSpend(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentFilterIdentifier(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson10_serializeDocumentFilterLifeCycleReviewStatus(v []types.ReviewStatus, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsAwsjson10_serializeDocumentFilterLifeCycleStage(v []types.Stage, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsAwsjson10_serializeDocumentFilterStatus(v []types.SolutionStatus, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsAwsjson10_serializeDocumentLastModifiedDate(v *types.LastModifiedDate, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AfterLastModifiedDate != nil { + ok := object.Key("AfterLastModifiedDate") + ok.String(smithytime.FormatDateTime(*v.AfterLastModifiedDate)) + } + + if v.BeforeLastModifiedDate != nil { + ok := object.Key("BeforeLastModifiedDate") + ok.String(smithytime.FormatDateTime(*v.BeforeLastModifiedDate)) + } + + return nil +} + +func awsAwsjson10_serializeDocumentLifeCycle(v *types.LifeCycle, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ClosedLostReason) > 0 { + ok := object.Key("ClosedLostReason") + ok.String(string(v.ClosedLostReason)) + } + + if v.NextSteps != nil { + ok := object.Key("NextSteps") + ok.String(*v.NextSteps) + } + + if v.NextStepsHistory != nil { + ok := object.Key("NextStepsHistory") + if err := awsAwsjson10_serializeDocumentNextStepsHistories(v.NextStepsHistory, ok); err != nil { + return err + } + } + + if v.ReviewComments != nil { + ok := object.Key("ReviewComments") + ok.String(*v.ReviewComments) + } + + if len(v.ReviewStatus) > 0 { + ok := object.Key("ReviewStatus") + ok.String(string(v.ReviewStatus)) + } + + if v.ReviewStatusReason != nil { + ok := object.Key("ReviewStatusReason") + ok.String(*v.ReviewStatusReason) + } + + if len(v.Stage) > 0 { + ok := object.Key("Stage") + ok.String(string(v.Stage)) + } + + if v.TargetCloseDate != nil { + ok := object.Key("TargetCloseDate") + ok.String(*v.TargetCloseDate) + } + + return nil +} + +func awsAwsjson10_serializeDocumentMarketing(v *types.Marketing, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.AwsFundingUsed) > 0 { + ok := object.Key("AwsFundingUsed") + ok.String(string(v.AwsFundingUsed)) + } + + if v.CampaignName != nil { + ok := object.Key("CampaignName") + ok.String(*v.CampaignName) + } + + if v.Channels != nil { + ok := object.Key("Channels") + if err := awsAwsjson10_serializeDocumentChannels(v.Channels, ok); err != nil { + return err + } + } + + if len(v.Source) > 0 { + ok := object.Key("Source") + ok.String(string(v.Source)) + } + + if v.UseCases != nil { + ok := object.Key("UseCases") + if err := awsAwsjson10_serializeDocumentUseCases(v.UseCases, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentMonetaryValue(v *types.MonetaryValue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Amount != nil { + ok := object.Key("Amount") + ok.String(*v.Amount) + } + + if len(v.CurrencyCode) > 0 { + ok := object.Key("CurrencyCode") + ok.String(string(v.CurrencyCode)) + } + + return nil +} + +func awsAwsjson10_serializeDocumentNextStepsHistories(v []types.NextStepsHistory, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentNextStepsHistory(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentNextStepsHistory(v *types.NextStepsHistory, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Time != nil { + ok := object.Key("Time") + ok.String(smithytime.FormatDateTime(*v.Time)) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson10_serializeDocumentOpportunityEngagementInvitationSort(v *types.OpportunityEngagementInvitationSort, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.SortBy) > 0 { + ok := object.Key("SortBy") + ok.String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("SortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsAwsjson10_serializeDocumentOpportunitySort(v *types.OpportunitySort, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.SortBy) > 0 { + ok := object.Key("SortBy") + ok.String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("SortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsAwsjson10_serializeDocumentPartnerOpportunityTeamMembersList(v []types.Contact, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentContact(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentPrimaryNeedsFromAws(v []types.PrimaryNeedFromAws, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsAwsjson10_serializeDocumentProject(v *types.Project, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AdditionalComments != nil { + ok := object.Key("AdditionalComments") + ok.String(*v.AdditionalComments) + } + + if v.ApnPrograms != nil { + ok := object.Key("ApnPrograms") + if err := awsAwsjson10_serializeDocumentApnPrograms(v.ApnPrograms, ok); err != nil { + return err + } + } + + if len(v.CompetitorName) > 0 { + ok := object.Key("CompetitorName") + ok.String(string(v.CompetitorName)) + } + + if v.CustomerBusinessProblem != nil { + ok := object.Key("CustomerBusinessProblem") + ok.String(*v.CustomerBusinessProblem) + } + + if v.CustomerUseCase != nil { + ok := object.Key("CustomerUseCase") + ok.String(*v.CustomerUseCase) + } + + if v.DeliveryModels != nil { + ok := object.Key("DeliveryModels") + if err := awsAwsjson10_serializeDocumentDeliveryModels(v.DeliveryModels, ok); err != nil { + return err + } + } + + if v.ExpectedCustomerSpend != nil { + ok := object.Key("ExpectedCustomerSpend") + if err := awsAwsjson10_serializeDocumentExpectedCustomerSpendList(v.ExpectedCustomerSpend, ok); err != nil { + return err + } + } + + if v.OtherCompetitorNames != nil { + ok := object.Key("OtherCompetitorNames") + ok.String(*v.OtherCompetitorNames) + } + + if v.OtherSolutionDescription != nil { + ok := object.Key("OtherSolutionDescription") + ok.String(*v.OtherSolutionDescription) + } + + if v.RelatedOpportunityIdentifier != nil { + ok := object.Key("RelatedOpportunityIdentifier") + ok.String(*v.RelatedOpportunityIdentifier) + } + + if v.SalesActivities != nil { + ok := object.Key("SalesActivities") + if err := awsAwsjson10_serializeDocumentSalesActivities(v.SalesActivities, ok); err != nil { + return err + } + } + + if v.Title != nil { + ok := object.Key("Title") + ok.String(*v.Title) + } + + return nil +} + +func awsAwsjson10_serializeDocumentSalesActivities(v []types.SalesActivity, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsAwsjson10_serializeDocumentSoftwareRevenue(v *types.SoftwareRevenue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DeliveryModel) > 0 { + ok := object.Key("DeliveryModel") + ok.String(string(v.DeliveryModel)) + } + + if v.EffectiveDate != nil { + ok := object.Key("EffectiveDate") + ok.String(*v.EffectiveDate) + } + + if v.ExpirationDate != nil { + ok := object.Key("ExpirationDate") + ok.String(*v.ExpirationDate) + } + + if v.Value != nil { + ok := object.Key("Value") + if err := awsAwsjson10_serializeDocumentMonetaryValue(v.Value, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentSolutionIdentifiers(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson10_serializeDocumentSolutionSort(v *types.SolutionSort, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.SortBy) > 0 { + ok := object.Key("SortBy") + ok.String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("SortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsAwsjson10_serializeDocumentStringList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson10_serializeDocumentUseCases(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson10_serializeOpDocumentAssignOpportunityInput(v *AssignOpportunityInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Assignee != nil { + ok := object.Key("Assignee") + if err := awsAwsjson10_serializeDocumentAssigneeContact(v.Assignee, ok); err != nil { + return err + } + } + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.Identifier != nil { + ok := object.Key("Identifier") + ok.String(*v.Identifier) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentAssociateOpportunityInput(v *AssociateOpportunityInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.OpportunityIdentifier != nil { + ok := object.Key("OpportunityIdentifier") + ok.String(*v.OpportunityIdentifier) + } + + if v.RelatedEntityIdentifier != nil { + ok := object.Key("RelatedEntityIdentifier") + ok.String(*v.RelatedEntityIdentifier) + } + + if len(v.RelatedEntityType) > 0 { + ok := object.Key("RelatedEntityType") + ok.String(string(v.RelatedEntityType)) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentCreateOpportunityInput(v *CreateOpportunityInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.Customer != nil { + ok := object.Key("Customer") + if err := awsAwsjson10_serializeDocumentCustomer(v.Customer, ok); err != nil { + return err + } + } + + if v.LifeCycle != nil { + ok := object.Key("LifeCycle") + if err := awsAwsjson10_serializeDocumentLifeCycle(v.LifeCycle, ok); err != nil { + return err + } + } + + if v.Marketing != nil { + ok := object.Key("Marketing") + if err := awsAwsjson10_serializeDocumentMarketing(v.Marketing, ok); err != nil { + return err + } + } + + if len(v.NationalSecurity) > 0 { + ok := object.Key("NationalSecurity") + ok.String(string(v.NationalSecurity)) + } + + if v.OpportunityTeam != nil { + ok := object.Key("OpportunityTeam") + if err := awsAwsjson10_serializeDocumentPartnerOpportunityTeamMembersList(v.OpportunityTeam, ok); err != nil { + return err + } + } + + if len(v.OpportunityType) > 0 { + ok := object.Key("OpportunityType") + ok.String(string(v.OpportunityType)) + } + + if len(v.Origin) > 0 { + ok := object.Key("Origin") + ok.String(string(v.Origin)) + } + + if v.PartnerOpportunityIdentifier != nil { + ok := object.Key("PartnerOpportunityIdentifier") + ok.String(*v.PartnerOpportunityIdentifier) + } + + if v.PrimaryNeedsFromAws != nil { + ok := object.Key("PrimaryNeedsFromAws") + if err := awsAwsjson10_serializeDocumentPrimaryNeedsFromAws(v.PrimaryNeedsFromAws, ok); err != nil { + return err + } + } + + if v.Project != nil { + ok := object.Key("Project") + if err := awsAwsjson10_serializeDocumentProject(v.Project, ok); err != nil { + return err + } + } + + if v.SoftwareRevenue != nil { + ok := object.Key("SoftwareRevenue") + if err := awsAwsjson10_serializeDocumentSoftwareRevenue(v.SoftwareRevenue, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentDisassociateOpportunityInput(v *DisassociateOpportunityInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.OpportunityIdentifier != nil { + ok := object.Key("OpportunityIdentifier") + ok.String(*v.OpportunityIdentifier) + } + + if v.RelatedEntityIdentifier != nil { + ok := object.Key("RelatedEntityIdentifier") + ok.String(*v.RelatedEntityIdentifier) + } + + if len(v.RelatedEntityType) > 0 { + ok := object.Key("RelatedEntityType") + ok.String(string(v.RelatedEntityType)) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentGetAwsOpportunitySummaryInput(v *GetAwsOpportunitySummaryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.RelatedOpportunityIdentifier != nil { + ok := object.Key("RelatedOpportunityIdentifier") + ok.String(*v.RelatedOpportunityIdentifier) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentGetEngagementInvitationInput(v *GetEngagementInvitationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.Identifier != nil { + ok := object.Key("Identifier") + ok.String(*v.Identifier) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentGetOpportunityInput(v *GetOpportunityInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.Identifier != nil { + ok := object.Key("Identifier") + ok.String(*v.Identifier) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListEngagementInvitationsInput(v *ListEngagementInvitationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if len(v.ParticipantType) > 0 { + ok := object.Key("ParticipantType") + ok.String(string(v.ParticipantType)) + } + + if v.PayloadType != nil { + ok := object.Key("PayloadType") + if err := awsAwsjson10_serializeDocumentEngagementInvitationsPayloadType(v.PayloadType, ok); err != nil { + return err + } + } + + if v.Sort != nil { + ok := object.Key("Sort") + if err := awsAwsjson10_serializeDocumentOpportunityEngagementInvitationSort(v.Sort, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListOpportunitiesInput(v *ListOpportunitiesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.CustomerCompanyName != nil { + ok := object.Key("CustomerCompanyName") + if err := awsAwsjson10_serializeDocumentStringList(v.CustomerCompanyName, ok); err != nil { + return err + } + } + + if v.Identifier != nil { + ok := object.Key("Identifier") + if err := awsAwsjson10_serializeDocumentFilterIdentifier(v.Identifier, ok); err != nil { + return err + } + } + + if v.LastModifiedDate != nil { + ok := object.Key("LastModifiedDate") + if err := awsAwsjson10_serializeDocumentLastModifiedDate(v.LastModifiedDate, ok); err != nil { + return err + } + } + + if v.LifeCycleReviewStatus != nil { + ok := object.Key("LifeCycleReviewStatus") + if err := awsAwsjson10_serializeDocumentFilterLifeCycleReviewStatus(v.LifeCycleReviewStatus, ok); err != nil { + return err + } + } + + if v.LifeCycleStage != nil { + ok := object.Key("LifeCycleStage") + if err := awsAwsjson10_serializeDocumentFilterLifeCycleStage(v.LifeCycleStage, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.Sort != nil { + ok := object.Key("Sort") + if err := awsAwsjson10_serializeDocumentOpportunitySort(v.Sort, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListSolutionsInput(v *ListSolutionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.Category != nil { + ok := object.Key("Category") + if err := awsAwsjson10_serializeDocumentStringList(v.Category, ok); err != nil { + return err + } + } + + if v.Identifier != nil { + ok := object.Key("Identifier") + if err := awsAwsjson10_serializeDocumentSolutionIdentifiers(v.Identifier, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.Sort != nil { + ok := object.Key("Sort") + if err := awsAwsjson10_serializeDocumentSolutionSort(v.Sort, ok); err != nil { + return err + } + } + + if v.Status != nil { + ok := object.Key("Status") + if err := awsAwsjson10_serializeDocumentFilterStatus(v.Status, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentRejectEngagementInvitationInput(v *RejectEngagementInvitationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.Identifier != nil { + ok := object.Key("Identifier") + ok.String(*v.Identifier) + } + + if v.RejectionReason != nil { + ok := object.Key("RejectionReason") + ok.String(*v.RejectionReason) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentStartEngagementByAcceptingInvitationTaskInput(v *StartEngagementByAcceptingInvitationTaskInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.Identifier != nil { + ok := object.Key("Identifier") + ok.String(*v.Identifier) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentStartEngagementFromOpportunityTaskInput(v *StartEngagementFromOpportunityTaskInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AwsSubmission != nil { + ok := object.Key("AwsSubmission") + if err := awsAwsjson10_serializeDocumentAwsSubmission(v.AwsSubmission, ok); err != nil { + return err + } + } + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.Identifier != nil { + ok := object.Key("Identifier") + ok.String(*v.Identifier) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentUpdateOpportunityInput(v *UpdateOpportunityInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.Customer != nil { + ok := object.Key("Customer") + if err := awsAwsjson10_serializeDocumentCustomer(v.Customer, ok); err != nil { + return err + } + } + + if v.Identifier != nil { + ok := object.Key("Identifier") + ok.String(*v.Identifier) + } + + if v.LastModifiedDate != nil { + ok := object.Key("LastModifiedDate") + ok.String(smithytime.FormatDateTime(*v.LastModifiedDate)) + } + + if v.LifeCycle != nil { + ok := object.Key("LifeCycle") + if err := awsAwsjson10_serializeDocumentLifeCycle(v.LifeCycle, ok); err != nil { + return err + } + } + + if v.Marketing != nil { + ok := object.Key("Marketing") + if err := awsAwsjson10_serializeDocumentMarketing(v.Marketing, ok); err != nil { + return err + } + } + + if len(v.NationalSecurity) > 0 { + ok := object.Key("NationalSecurity") + ok.String(string(v.NationalSecurity)) + } + + if len(v.OpportunityType) > 0 { + ok := object.Key("OpportunityType") + ok.String(string(v.OpportunityType)) + } + + if v.PartnerOpportunityIdentifier != nil { + ok := object.Key("PartnerOpportunityIdentifier") + ok.String(*v.PartnerOpportunityIdentifier) + } + + if v.PrimaryNeedsFromAws != nil { + ok := object.Key("PrimaryNeedsFromAws") + if err := awsAwsjson10_serializeDocumentPrimaryNeedsFromAws(v.PrimaryNeedsFromAws, ok); err != nil { + return err + } + } + + if v.Project != nil { + ok := object.Key("Project") + if err := awsAwsjson10_serializeDocumentProject(v.Project, ok); err != nil { + return err + } + } + + if v.SoftwareRevenue != nil { + ok := object.Key("SoftwareRevenue") + if err := awsAwsjson10_serializeDocumentSoftwareRevenue(v.SoftwareRevenue, ok); err != nil { + return err + } + } + + return nil +} diff --git a/service/partnercentralselling/snapshot/api_op_AssignOpportunity.go.snap b/service/partnercentralselling/snapshot/api_op_AssignOpportunity.go.snap new file mode 100644 index 00000000000..f9f8ce51791 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_AssignOpportunity.go.snap @@ -0,0 +1,41 @@ +AssignOpportunity + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_AssociateOpportunity.go.snap b/service/partnercentralselling/snapshot/api_op_AssociateOpportunity.go.snap new file mode 100644 index 00000000000..89576c8fb99 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_AssociateOpportunity.go.snap @@ -0,0 +1,41 @@ +AssociateOpportunity + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_CreateOpportunity.go.snap b/service/partnercentralselling/snapshot/api_op_CreateOpportunity.go.snap new file mode 100644 index 00000000000..c21118b9683 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_CreateOpportunity.go.snap @@ -0,0 +1,42 @@ +CreateOpportunity + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_DisassociateOpportunity.go.snap b/service/partnercentralselling/snapshot/api_op_DisassociateOpportunity.go.snap new file mode 100644 index 00000000000..6caa6023375 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_DisassociateOpportunity.go.snap @@ -0,0 +1,41 @@ +DisassociateOpportunity + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_GetAwsOpportunitySummary.go.snap b/service/partnercentralselling/snapshot/api_op_GetAwsOpportunitySummary.go.snap new file mode 100644 index 00000000000..54c67d760d5 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_GetAwsOpportunitySummary.go.snap @@ -0,0 +1,41 @@ +GetAwsOpportunitySummary + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_GetEngagementInvitation.go.snap b/service/partnercentralselling/snapshot/api_op_GetEngagementInvitation.go.snap new file mode 100644 index 00000000000..cb84cb46e03 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_GetEngagementInvitation.go.snap @@ -0,0 +1,41 @@ +GetEngagementInvitation + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_GetOpportunity.go.snap b/service/partnercentralselling/snapshot/api_op_GetOpportunity.go.snap new file mode 100644 index 00000000000..3c747328cc2 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_GetOpportunity.go.snap @@ -0,0 +1,41 @@ +GetOpportunity + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_ListEngagementInvitations.go.snap b/service/partnercentralselling/snapshot/api_op_ListEngagementInvitations.go.snap new file mode 100644 index 00000000000..ea91202cda1 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_ListEngagementInvitations.go.snap @@ -0,0 +1,41 @@ +ListEngagementInvitations + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_ListOpportunities.go.snap b/service/partnercentralselling/snapshot/api_op_ListOpportunities.go.snap new file mode 100644 index 00000000000..bfc6f30f328 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_ListOpportunities.go.snap @@ -0,0 +1,41 @@ +ListOpportunities + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_ListSolutions.go.snap b/service/partnercentralselling/snapshot/api_op_ListSolutions.go.snap new file mode 100644 index 00000000000..494e99064d6 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_ListSolutions.go.snap @@ -0,0 +1,41 @@ +ListSolutions + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_RejectEngagementInvitation.go.snap b/service/partnercentralselling/snapshot/api_op_RejectEngagementInvitation.go.snap new file mode 100644 index 00000000000..02aef2c287d --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_RejectEngagementInvitation.go.snap @@ -0,0 +1,41 @@ +RejectEngagementInvitation + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_StartEngagementByAcceptingInvitationTask.go.snap b/service/partnercentralselling/snapshot/api_op_StartEngagementByAcceptingInvitationTask.go.snap new file mode 100644 index 00000000000..ce039d18cd0 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_StartEngagementByAcceptingInvitationTask.go.snap @@ -0,0 +1,42 @@ +StartEngagementByAcceptingInvitationTask + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_StartEngagementFromOpportunityTask.go.snap b/service/partnercentralselling/snapshot/api_op_StartEngagementFromOpportunityTask.go.snap new file mode 100644 index 00000000000..e6bfe8888d3 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_StartEngagementFromOpportunityTask.go.snap @@ -0,0 +1,42 @@ +StartEngagementFromOpportunityTask + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_UpdateOpportunity.go.snap b/service/partnercentralselling/snapshot/api_op_UpdateOpportunity.go.snap new file mode 100644 index 00000000000..81d6e7764a2 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_UpdateOpportunity.go.snap @@ -0,0 +1,41 @@ +UpdateOpportunity + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot_test.go b/service/partnercentralselling/snapshot_test.go new file mode 100644 index 00000000000..3f856528be4 --- /dev/null +++ b/service/partnercentralselling/snapshot_test.go @@ -0,0 +1,398 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +//go:build snapshot + +package partnercentralselling + +import ( + "context" + "errors" + "fmt" + "github.com/aws/smithy-go/middleware" + "io" + "io/fs" + "os" + "testing" +) + +const ssprefix = "snapshot" + +type snapshotOK struct{} + +func (snapshotOK) Error() string { return "error: success" } + +func createp(path string) (*os.File, error) { + if err := os.Mkdir(ssprefix, 0700); err != nil && !errors.Is(err, fs.ErrExist) { + return nil, err + } + return os.Create(path) +} + +func sspath(op string) string { + return fmt.Sprintf("%s/api_op_%s.go.snap", ssprefix, op) +} + +func updateSnapshot(stack *middleware.Stack, operation string) error { + f, err := createp(sspath(operation)) + if err != nil { + return err + } + defer f.Close() + if _, err := f.Write([]byte(stack.String())); err != nil { + return err + } + return snapshotOK{} +} + +func testSnapshot(stack *middleware.Stack, operation string) error { + f, err := os.Open(sspath(operation)) + if errors.Is(err, fs.ErrNotExist) { + return snapshotOK{} + } + if err != nil { + return err + } + defer f.Close() + expected, err := io.ReadAll(f) + if err != nil { + return err + } + if actual := stack.String(); actual != string(expected) { + return fmt.Errorf("%s != %s", expected, actual) + } + return snapshotOK{} +} +func TestCheckSnapshot_AssignOpportunity(t *testing.T) { + svc := New(Options{}) + _, err := svc.AssignOpportunity(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "AssignOpportunity") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_AssociateOpportunity(t *testing.T) { + svc := New(Options{}) + _, err := svc.AssociateOpportunity(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "AssociateOpportunity") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_CreateOpportunity(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateOpportunity(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateOpportunity") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_DisassociateOpportunity(t *testing.T) { + svc := New(Options{}) + _, err := svc.DisassociateOpportunity(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DisassociateOpportunity") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_GetAwsOpportunitySummary(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetAwsOpportunitySummary(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetAwsOpportunitySummary") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_GetEngagementInvitation(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetEngagementInvitation(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetEngagementInvitation") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_GetOpportunity(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetOpportunity(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetOpportunity") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListEngagementInvitations(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListEngagementInvitations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListEngagementInvitations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListOpportunities(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListOpportunities(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListOpportunities") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListSolutions(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListSolutions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListSolutions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_RejectEngagementInvitation(t *testing.T) { + svc := New(Options{}) + _, err := svc.RejectEngagementInvitation(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "RejectEngagementInvitation") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_StartEngagementByAcceptingInvitationTask(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartEngagementByAcceptingInvitationTask(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "StartEngagementByAcceptingInvitationTask") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_StartEngagementFromOpportunityTask(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartEngagementFromOpportunityTask(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "StartEngagementFromOpportunityTask") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_UpdateOpportunity(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateOpportunity(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateOpportunity") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} +func TestUpdateSnapshot_AssignOpportunity(t *testing.T) { + svc := New(Options{}) + _, err := svc.AssignOpportunity(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "AssignOpportunity") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_AssociateOpportunity(t *testing.T) { + svc := New(Options{}) + _, err := svc.AssociateOpportunity(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "AssociateOpportunity") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_CreateOpportunity(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateOpportunity(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateOpportunity") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_DisassociateOpportunity(t *testing.T) { + svc := New(Options{}) + _, err := svc.DisassociateOpportunity(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DisassociateOpportunity") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_GetAwsOpportunitySummary(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetAwsOpportunitySummary(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetAwsOpportunitySummary") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_GetEngagementInvitation(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetEngagementInvitation(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetEngagementInvitation") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_GetOpportunity(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetOpportunity(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetOpportunity") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListEngagementInvitations(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListEngagementInvitations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListEngagementInvitations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListOpportunities(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListOpportunities(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListOpportunities") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListSolutions(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListSolutions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListSolutions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_RejectEngagementInvitation(t *testing.T) { + svc := New(Options{}) + _, err := svc.RejectEngagementInvitation(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "RejectEngagementInvitation") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_StartEngagementByAcceptingInvitationTask(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartEngagementByAcceptingInvitationTask(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "StartEngagementByAcceptingInvitationTask") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_StartEngagementFromOpportunityTask(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartEngagementFromOpportunityTask(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "StartEngagementFromOpportunityTask") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_UpdateOpportunity(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateOpportunity(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateOpportunity") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} diff --git a/service/partnercentralselling/types/enums.go b/service/partnercentralselling/types/enums.go new file mode 100644 index 00000000000..23528044ede --- /dev/null +++ b/service/partnercentralselling/types/enums.go @@ -0,0 +1,1959 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type AwsClosedLostReason string + +// Enum values for AwsClosedLostReason +const ( + AwsClosedLostReasonAdministrative AwsClosedLostReason = "Administrative" + AwsClosedLostReasonBusinessAssociateAgreement AwsClosedLostReason = "Business Associate Agreement" + AwsClosedLostReasonCompanyAcquiredDissolved AwsClosedLostReason = "Company Acquired/Dissolved" + AwsClosedLostReasonCompetitiveOffering AwsClosedLostReason = "Competitive Offering" + AwsClosedLostReasonCustomerDataRequirement AwsClosedLostReason = "Customer Data Requirement" + AwsClosedLostReasonCustomerDeficiency AwsClosedLostReason = "Customer Deficiency" + AwsClosedLostReasonCustomerExperience AwsClosedLostReason = "Customer Experience" + AwsClosedLostReasonDelayCancellationOfProject AwsClosedLostReason = "Delay / Cancellation of Project" + AwsClosedLostReasonDuplicate AwsClosedLostReason = "Duplicate" + AwsClosedLostReasonDuplicateOpportunity AwsClosedLostReason = "Duplicate Opportunity" + AwsClosedLostReasonExecutiveBlocker AwsClosedLostReason = "Executive Blocker" + AwsClosedLostReasonFailedVetting AwsClosedLostReason = "Failed Vetting" + AwsClosedLostReasonFeatureLimitation AwsClosedLostReason = "Feature Limitation" + AwsClosedLostReasonFinancialCommercial AwsClosedLostReason = "Financial/Commercial" + AwsClosedLostReasonInsufficientAmazonValue AwsClosedLostReason = "Insufficient Amazon Value" + AwsClosedLostReasonInsufficientAwsValue AwsClosedLostReason = "Insufficient AWS Value" + AwsClosedLostReasonInternationalConstraints AwsClosedLostReason = "International Constraints" + AwsClosedLostReasonLegalTaxRegulatory AwsClosedLostReason = "Legal / Tax / Regulatory" + AwsClosedLostReasonLegalTermsAndConditions AwsClosedLostReason = "Legal Terms and Conditions" + AwsClosedLostReasonLostToCompetitor AwsClosedLostReason = "Lost to Competitor" + AwsClosedLostReasonLostToCompetitorGoogle AwsClosedLostReason = "Lost to Competitor - Google" + AwsClosedLostReasonLostToCompetitorMicrosoft AwsClosedLostReason = "Lost to Competitor - Microsoft" + AwsClosedLostReasonLostToCompetitorOther AwsClosedLostReason = "Lost to Competitor - Other" + AwsClosedLostReasonLostToCompetitorRackspace AwsClosedLostReason = "Lost to Competitor - Rackspace" + AwsClosedLostReasonLostToCompetitorSoftlayer AwsClosedLostReason = "Lost to Competitor - SoftLayer" + AwsClosedLostReasonLostToCompetitorVmware AwsClosedLostReason = "Lost to Competitor - VMWare" + AwsClosedLostReasonNoCustomerReference AwsClosedLostReason = "No Customer Reference" + AwsClosedLostReasonNoIntegrationResources AwsClosedLostReason = "No Integration Resources" + AwsClosedLostReasonNoOpportunity AwsClosedLostReason = "No Opportunity" + AwsClosedLostReasonNoPerceivedValueOfMp AwsClosedLostReason = "No Perceived Value of MP" + AwsClosedLostReasonNoResponse AwsClosedLostReason = "No Response" + AwsClosedLostReasonNotCommittedToAws AwsClosedLostReason = "Not Committed to AWS" + AwsClosedLostReasonNoUpdate AwsClosedLostReason = "No Update" + AwsClosedLostReasonOnPremisesDeployment AwsClosedLostReason = "On Premises Deployment" + AwsClosedLostReasonOther AwsClosedLostReason = "Other" + AwsClosedLostReasonOtherDetailsInDescription AwsClosedLostReason = "Other (Details in Description)" + AwsClosedLostReasonPartnerGap AwsClosedLostReason = "Partner Gap" + AwsClosedLostReasonPastDue AwsClosedLostReason = "Past Due" + AwsClosedLostReasonPeopleRelationshipGovernance AwsClosedLostReason = "People/Relationship/Governance" + AwsClosedLostReasonPlatformTechnologyLimitation AwsClosedLostReason = "Platform Technology Limitation" + AwsClosedLostReasonPreferenceForCompetitor AwsClosedLostReason = "Preference for Competitor" + AwsClosedLostReasonPrice AwsClosedLostReason = "Price" + AwsClosedLostReasonProductTechnology AwsClosedLostReason = "Product/Technology" + AwsClosedLostReasonProductNotOnAws AwsClosedLostReason = "Product Not on AWS" + AwsClosedLostReasonSecurityCompliance AwsClosedLostReason = "Security / Compliance" + AwsClosedLostReasonSelfService AwsClosedLostReason = "Self-Service" + AwsClosedLostReasonTechnicalLimitations AwsClosedLostReason = "Technical Limitations" + AwsClosedLostReasonTermSheetImpasse AwsClosedLostReason = "Term Sheet Impasse" +) + +// Values returns all known values for AwsClosedLostReason. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AwsClosedLostReason) Values() []AwsClosedLostReason { + return []AwsClosedLostReason{ + "Administrative", + "Business Associate Agreement", + "Company Acquired/Dissolved", + "Competitive Offering", + "Customer Data Requirement", + "Customer Deficiency", + "Customer Experience", + "Delay / Cancellation of Project", + "Duplicate", + "Duplicate Opportunity", + "Executive Blocker", + "Failed Vetting", + "Feature Limitation", + "Financial/Commercial", + "Insufficient Amazon Value", + "Insufficient AWS Value", + "International Constraints", + "Legal / Tax / Regulatory", + "Legal Terms and Conditions", + "Lost to Competitor", + "Lost to Competitor - Google", + "Lost to Competitor - Microsoft", + "Lost to Competitor - Other", + "Lost to Competitor - Rackspace", + "Lost to Competitor - SoftLayer", + "Lost to Competitor - VMWare", + "No Customer Reference", + "No Integration Resources", + "No Opportunity", + "No Perceived Value of MP", + "No Response", + "Not Committed to AWS", + "No Update", + "On Premises Deployment", + "Other", + "Other (Details in Description)", + "Partner Gap", + "Past Due", + "People/Relationship/Governance", + "Platform Technology Limitation", + "Preference for Competitor", + "Price", + "Product/Technology", + "Product Not on AWS", + "Security / Compliance", + "Self-Service", + "Technical Limitations", + "Term Sheet Impasse", + } +} + +type AwsFundingUsed string + +// Enum values for AwsFundingUsed +const ( + AwsFundingUsedYes AwsFundingUsed = "Yes" + AwsFundingUsedNo AwsFundingUsed = "No" +) + +// Values returns all known values for AwsFundingUsed. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AwsFundingUsed) Values() []AwsFundingUsed { + return []AwsFundingUsed{ + "Yes", + "No", + } +} + +type AwsMemberBusinessTitle string + +// Enum values for AwsMemberBusinessTitle +const ( + AwsMemberBusinessTitleAwsSalesRep AwsMemberBusinessTitle = "AWSSalesRep" + AwsMemberBusinessTitleAwsAccountOwner AwsMemberBusinessTitle = "AWSAccountOwner" + AwsMemberBusinessTitleWwpspdm AwsMemberBusinessTitle = "WWPSPDM" + AwsMemberBusinessTitlePdm AwsMemberBusinessTitle = "PDM" + AwsMemberBusinessTitlePsm AwsMemberBusinessTitle = "PSM" + AwsMemberBusinessTitleIsvsm AwsMemberBusinessTitle = "ISVSM" +) + +// Values returns all known values for AwsMemberBusinessTitle. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AwsMemberBusinessTitle) Values() []AwsMemberBusinessTitle { + return []AwsMemberBusinessTitle{ + "AWSSalesRep", + "AWSAccountOwner", + "WWPSPDM", + "PDM", + "PSM", + "ISVSM", + } +} + +type AwsOpportunityStage string + +// Enum values for AwsOpportunityStage +const ( + AwsOpportunityStageNotStarted AwsOpportunityStage = "Not Started" + AwsOpportunityStageInProgress AwsOpportunityStage = "In Progress" + AwsOpportunityStageProspect AwsOpportunityStage = "Prospect" + AwsOpportunityStageEngaged AwsOpportunityStage = "Engaged" + AwsOpportunityStageIdentified AwsOpportunityStage = "Identified" + AwsOpportunityStageQualify AwsOpportunityStage = "Qualify" + AwsOpportunityStageResearch AwsOpportunityStage = "Research" + AwsOpportunityStageSellerEngaged AwsOpportunityStage = "Seller Engaged" + AwsOpportunityStageEvaluating AwsOpportunityStage = "Evaluating" + AwsOpportunityStageSellerRegistered AwsOpportunityStage = "Seller Registered" + AwsOpportunityStageTermSheetNegotiation AwsOpportunityStage = "Term Sheet Negotiation" + AwsOpportunityStageContractNegotiation AwsOpportunityStage = "Contract Negotiation" + AwsOpportunityStageOnboarding AwsOpportunityStage = "Onboarding" + AwsOpportunityStageBuildingIntegration AwsOpportunityStage = "Building Integration" + AwsOpportunityStageQualified AwsOpportunityStage = "Qualified" + AwsOpportunityStageOnHold AwsOpportunityStage = "On-hold" + AwsOpportunityStageTechnicalValidation AwsOpportunityStage = "Technical Validation" + AwsOpportunityStageBusinessValidation AwsOpportunityStage = "Business Validation" + AwsOpportunityStageCommitted AwsOpportunityStage = "Committed" + AwsOpportunityStageLaunched AwsOpportunityStage = "Launched" + AwsOpportunityStageDeferredToPartner AwsOpportunityStage = "Deferred to Partner" + AwsOpportunityStageClosedLost AwsOpportunityStage = "Closed Lost" + AwsOpportunityStageCompleted AwsOpportunityStage = "Completed" + AwsOpportunityStageClosedIncomplete AwsOpportunityStage = "Closed Incomplete" +) + +// Values returns all known values for AwsOpportunityStage. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AwsOpportunityStage) Values() []AwsOpportunityStage { + return []AwsOpportunityStage{ + "Not Started", + "In Progress", + "Prospect", + "Engaged", + "Identified", + "Qualify", + "Research", + "Seller Engaged", + "Evaluating", + "Seller Registered", + "Term Sheet Negotiation", + "Contract Negotiation", + "Onboarding", + "Building Integration", + "Qualified", + "On-hold", + "Technical Validation", + "Business Validation", + "Committed", + "Launched", + "Deferred to Partner", + "Closed Lost", + "Completed", + "Closed Incomplete", + } +} + +type Channel string + +// Enum values for Channel +const ( + ChannelAwsMarketingCentral Channel = "AWS Marketing Central" + ChannelContentSyndication Channel = "Content Syndication" + ChannelDisplay Channel = "Display" + ChannelEmail Channel = "Email" + ChannelLiveEvent Channel = "Live Event" + ChannelOutOfHome Channel = "Out Of Home (OOH)" + ChannelPrint Channel = "Print" + ChannelSearch Channel = "Search" + ChannelSocial Channel = "Social" + ChannelTelemarketing Channel = "Telemarketing" + ChannelTv Channel = "TV" + ChannelVideo Channel = "Video" + ChannelVirtualEvent Channel = "Virtual Event" +) + +// Values returns all known values for Channel. Note that this can be expanded in +// the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (Channel) Values() []Channel { + return []Channel{ + "AWS Marketing Central", + "Content Syndication", + "Display", + "Email", + "Live Event", + "Out Of Home (OOH)", + "Print", + "Search", + "Social", + "Telemarketing", + "TV", + "Video", + "Virtual Event", + } +} + +type ClosedLostReason string + +// Enum values for ClosedLostReason +const ( + ClosedLostReasonCustomerDeficiency ClosedLostReason = "Customer Deficiency" + ClosedLostReasonDelayCancellationOfProject ClosedLostReason = "Delay / Cancellation of Project" + ClosedLostReasonLegalTaxRegulatory ClosedLostReason = "Legal / Tax / Regulatory" + ClosedLostReasonLostToCompetitorGoogle ClosedLostReason = "Lost to Competitor - Google" + ClosedLostReasonLostToCompetitorMicrosoft ClosedLostReason = "Lost to Competitor - Microsoft" + ClosedLostReasonLostToCompetitorSoftlayer ClosedLostReason = "Lost to Competitor - SoftLayer" + ClosedLostReasonLostToCompetitorVmware ClosedLostReason = "Lost to Competitor - VMWare" + ClosedLostReasonLostToCompetitorOther ClosedLostReason = "Lost to Competitor - Other" + ClosedLostReasonNoOpportunity ClosedLostReason = "No Opportunity" + ClosedLostReasonOnPremisesDeployment ClosedLostReason = "On Premises Deployment" + ClosedLostReasonPartnerGap ClosedLostReason = "Partner Gap" + ClosedLostReasonPrice ClosedLostReason = "Price" + ClosedLostReasonSecurityCompliance ClosedLostReason = "Security / Compliance" + ClosedLostReasonTechnicalLimitations ClosedLostReason = "Technical Limitations" + ClosedLostReasonCustomerExperience ClosedLostReason = "Customer Experience" + ClosedLostReasonOther ClosedLostReason = "Other" + ClosedLostReasonPeoplerelationshipgovernance ClosedLostReason = "People/Relationship/Governance" + ClosedLostReasonProducttechnology ClosedLostReason = "Product/Technology" + ClosedLostReasonFinancialcommercial ClosedLostReason = "Financial/Commercial" +) + +// Values returns all known values for ClosedLostReason. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ClosedLostReason) Values() []ClosedLostReason { + return []ClosedLostReason{ + "Customer Deficiency", + "Delay / Cancellation of Project", + "Legal / Tax / Regulatory", + "Lost to Competitor - Google", + "Lost to Competitor - Microsoft", + "Lost to Competitor - SoftLayer", + "Lost to Competitor - VMWare", + "Lost to Competitor - Other", + "No Opportunity", + "On Premises Deployment", + "Partner Gap", + "Price", + "Security / Compliance", + "Technical Limitations", + "Customer Experience", + "Other", + "People/Relationship/Governance", + "Product/Technology", + "Financial/Commercial", + } +} + +type CompetitorName string + +// Enum values for CompetitorName +const ( + CompetitorNameOracleCloud CompetitorName = "Oracle Cloud" + CompetitorNameOnPrem CompetitorName = "On-Prem" + CompetitorNameCoLocation CompetitorName = "Co-location" + CompetitorNameAkamai CompetitorName = "Akamai" + CompetitorNameAlicloud CompetitorName = "AliCloud" + CompetitorNameGoogleCloudPlatform CompetitorName = "Google Cloud Platform" + CompetitorNameIbmSoftlayer CompetitorName = "IBM Softlayer" + CompetitorNameMicrosoftAzure CompetitorName = "Microsoft Azure" + CompetitorNameOtherCostOptimization CompetitorName = "Other- Cost Optimization" + CompetitorNameNoCompetition CompetitorName = "No Competition" + CompetitorNameOther CompetitorName = "*Other" +) + +// Values returns all known values for CompetitorName. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (CompetitorName) Values() []CompetitorName { + return []CompetitorName{ + "Oracle Cloud", + "On-Prem", + "Co-location", + "Akamai", + "AliCloud", + "Google Cloud Platform", + "IBM Softlayer", + "Microsoft Azure", + "Other- Cost Optimization", + "No Competition", + "*Other", + } +} + +type CountryCode string + +// Enum values for CountryCode +const ( + CountryCodeUs CountryCode = "US" + CountryCodeAf CountryCode = "AF" + CountryCodeAx CountryCode = "AX" + CountryCodeAl CountryCode = "AL" + CountryCodeDz CountryCode = "DZ" + CountryCodeAs CountryCode = "AS" + CountryCodeAd CountryCode = "AD" + CountryCodeAo CountryCode = "AO" + CountryCodeAi CountryCode = "AI" + CountryCodeAq CountryCode = "AQ" + CountryCodeAg CountryCode = "AG" + CountryCodeAr CountryCode = "AR" + CountryCodeAm CountryCode = "AM" + CountryCodeAw CountryCode = "AW" + CountryCodeAu CountryCode = "AU" + CountryCodeAt CountryCode = "AT" + CountryCodeAz CountryCode = "AZ" + CountryCodeBs CountryCode = "BS" + CountryCodeBh CountryCode = "BH" + CountryCodeBd CountryCode = "BD" + CountryCodeBb CountryCode = "BB" + CountryCodeBy CountryCode = "BY" + CountryCodeBe CountryCode = "BE" + CountryCodeBz CountryCode = "BZ" + CountryCodeBj CountryCode = "BJ" + CountryCodeBm CountryCode = "BM" + CountryCodeBt CountryCode = "BT" + CountryCodeBo CountryCode = "BO" + CountryCodeBq CountryCode = "BQ" + CountryCodeBa CountryCode = "BA" + CountryCodeBw CountryCode = "BW" + CountryCodeBv CountryCode = "BV" + CountryCodeBr CountryCode = "BR" + CountryCodeIo CountryCode = "IO" + CountryCodeBn CountryCode = "BN" + CountryCodeBg CountryCode = "BG" + CountryCodeBf CountryCode = "BF" + CountryCodeBi CountryCode = "BI" + CountryCodeKh CountryCode = "KH" + CountryCodeCm CountryCode = "CM" + CountryCodeCa CountryCode = "CA" + CountryCodeCv CountryCode = "CV" + CountryCodeKy CountryCode = "KY" + CountryCodeCf CountryCode = "CF" + CountryCodeTd CountryCode = "TD" + CountryCodeCl CountryCode = "CL" + CountryCodeCn CountryCode = "CN" + CountryCodeCx CountryCode = "CX" + CountryCodeCc CountryCode = "CC" + CountryCodeCo CountryCode = "CO" + CountryCodeKm CountryCode = "KM" + CountryCodeCg CountryCode = "CG" + CountryCodeCk CountryCode = "CK" + CountryCodeCr CountryCode = "CR" + CountryCodeCi CountryCode = "CI" + CountryCodeHr CountryCode = "HR" + CountryCodeCu CountryCode = "CU" + CountryCodeCw CountryCode = "CW" + CountryCodeCy CountryCode = "CY" + CountryCodeCz CountryCode = "CZ" + CountryCodeCd CountryCode = "CD" + CountryCodeDk CountryCode = "DK" + CountryCodeDj CountryCode = "DJ" + CountryCodeDm CountryCode = "DM" + CountryCodeDo CountryCode = "DO" + CountryCodeEc CountryCode = "EC" + CountryCodeEg CountryCode = "EG" + CountryCodeSv CountryCode = "SV" + CountryCodeGq CountryCode = "GQ" + CountryCodeEr CountryCode = "ER" + CountryCodeEe CountryCode = "EE" + CountryCodeEt CountryCode = "ET" + CountryCodeFk CountryCode = "FK" + CountryCodeFo CountryCode = "FO" + CountryCodeFj CountryCode = "FJ" + CountryCodeFi CountryCode = "FI" + CountryCodeFr CountryCode = "FR" + CountryCodeGf CountryCode = "GF" + CountryCodePf CountryCode = "PF" + CountryCodeTf CountryCode = "TF" + CountryCodeGa CountryCode = "GA" + CountryCodeGm CountryCode = "GM" + CountryCodeGe CountryCode = "GE" + CountryCodeDe CountryCode = "DE" + CountryCodeGh CountryCode = "GH" + CountryCodeGi CountryCode = "GI" + CountryCodeGr CountryCode = "GR" + CountryCodeGl CountryCode = "GL" + CountryCodeGd CountryCode = "GD" + CountryCodeGp CountryCode = "GP" + CountryCodeGu CountryCode = "GU" + CountryCodeGt CountryCode = "GT" + CountryCodeGg CountryCode = "GG" + CountryCodeGn CountryCode = "GN" + CountryCodeGw CountryCode = "GW" + CountryCodeGy CountryCode = "GY" + CountryCodeHt CountryCode = "HT" + CountryCodeHm CountryCode = "HM" + CountryCodeVa CountryCode = "VA" + CountryCodeHn CountryCode = "HN" + CountryCodeHk CountryCode = "HK" + CountryCodeHu CountryCode = "HU" + CountryCodeIs CountryCode = "IS" + CountryCodeIn CountryCode = "IN" + CountryCodeId CountryCode = "ID" + CountryCodeIr CountryCode = "IR" + CountryCodeIq CountryCode = "IQ" + CountryCodeIe CountryCode = "IE" + CountryCodeIm CountryCode = "IM" + CountryCodeIl CountryCode = "IL" + CountryCodeIt CountryCode = "IT" + CountryCodeJm CountryCode = "JM" + CountryCodeJp CountryCode = "JP" + CountryCodeJe CountryCode = "JE" + CountryCodeJo CountryCode = "JO" + CountryCodeKz CountryCode = "KZ" + CountryCodeKe CountryCode = "KE" + CountryCodeKi CountryCode = "KI" + CountryCodeKr CountryCode = "KR" + CountryCodeKw CountryCode = "KW" + CountryCodeKg CountryCode = "KG" + CountryCodeLa CountryCode = "LA" + CountryCodeLv CountryCode = "LV" + CountryCodeLb CountryCode = "LB" + CountryCodeLs CountryCode = "LS" + CountryCodeLr CountryCode = "LR" + CountryCodeLy CountryCode = "LY" + CountryCodeLi CountryCode = "LI" + CountryCodeLt CountryCode = "LT" + CountryCodeLu CountryCode = "LU" + CountryCodeMo CountryCode = "MO" + CountryCodeMk CountryCode = "MK" + CountryCodeMg CountryCode = "MG" + CountryCodeMw CountryCode = "MW" + CountryCodeMy CountryCode = "MY" + CountryCodeMv CountryCode = "MV" + CountryCodeMl CountryCode = "ML" + CountryCodeMt CountryCode = "MT" + CountryCodeMh CountryCode = "MH" + CountryCodeMq CountryCode = "MQ" + CountryCodeMr CountryCode = "MR" + CountryCodeMu CountryCode = "MU" + CountryCodeYt CountryCode = "YT" + CountryCodeMx CountryCode = "MX" + CountryCodeFm CountryCode = "FM" + CountryCodeMd CountryCode = "MD" + CountryCodeMc CountryCode = "MC" + CountryCodeMn CountryCode = "MN" + CountryCodeMe CountryCode = "ME" + CountryCodeMs CountryCode = "MS" + CountryCodeMa CountryCode = "MA" + CountryCodeMz CountryCode = "MZ" + CountryCodeMm CountryCode = "MM" + CountryCodeNa CountryCode = "NA" + CountryCodeNr CountryCode = "NR" + CountryCodeNp CountryCode = "NP" + CountryCodeNl CountryCode = "NL" + CountryCodeAn CountryCode = "AN" + CountryCodeNc CountryCode = "NC" + CountryCodeNz CountryCode = "NZ" + CountryCodeNi CountryCode = "NI" + CountryCodeNe CountryCode = "NE" + CountryCodeNg CountryCode = "NG" + CountryCodeNu CountryCode = "NU" + CountryCodeNf CountryCode = "NF" + CountryCodeMp CountryCode = "MP" + CountryCodeNo CountryCode = "NO" + CountryCodeOm CountryCode = "OM" + CountryCodePk CountryCode = "PK" + CountryCodePw CountryCode = "PW" + CountryCodePs CountryCode = "PS" + CountryCodePa CountryCode = "PA" + CountryCodePg CountryCode = "PG" + CountryCodePy CountryCode = "PY" + CountryCodePe CountryCode = "PE" + CountryCodePh CountryCode = "PH" + CountryCodePn CountryCode = "PN" + CountryCodePl CountryCode = "PL" + CountryCodePt CountryCode = "PT" + CountryCodePr CountryCode = "PR" + CountryCodeQa CountryCode = "QA" + CountryCodeRe CountryCode = "RE" + CountryCodeRo CountryCode = "RO" + CountryCodeRu CountryCode = "RU" + CountryCodeRw CountryCode = "RW" + CountryCodeBl CountryCode = "BL" + CountryCodeSh CountryCode = "SH" + CountryCodeKn CountryCode = "KN" + CountryCodeLc CountryCode = "LC" + CountryCodeMf CountryCode = "MF" + CountryCodePm CountryCode = "PM" + CountryCodeVc CountryCode = "VC" + CountryCodeWs CountryCode = "WS" + CountryCodeSm CountryCode = "SM" + CountryCodeSt CountryCode = "ST" + CountryCodeSa CountryCode = "SA" + CountryCodeSn CountryCode = "SN" + CountryCodeRs CountryCode = "RS" + CountryCodeSc CountryCode = "SC" + CountryCodeSl CountryCode = "SL" + CountryCodeSg CountryCode = "SG" + CountryCodeSx CountryCode = "SX" + CountryCodeSk CountryCode = "SK" + CountryCodeSi CountryCode = "SI" + CountryCodeSb CountryCode = "SB" + CountryCodeSo CountryCode = "SO" + CountryCodeZa CountryCode = "ZA" + CountryCodeGs CountryCode = "GS" + CountryCodeSs CountryCode = "SS" + CountryCodeEs CountryCode = "ES" + CountryCodeLk CountryCode = "LK" + CountryCodeSd CountryCode = "SD" + CountryCodeSr CountryCode = "SR" + CountryCodeSj CountryCode = "SJ" + CountryCodeSz CountryCode = "SZ" + CountryCodeSe CountryCode = "SE" + CountryCodeCh CountryCode = "CH" + CountryCodeSy CountryCode = "SY" + CountryCodeTw CountryCode = "TW" + CountryCodeTj CountryCode = "TJ" + CountryCodeTz CountryCode = "TZ" + CountryCodeTh CountryCode = "TH" + CountryCodeTl CountryCode = "TL" + CountryCodeTg CountryCode = "TG" + CountryCodeTk CountryCode = "TK" + CountryCodeTo CountryCode = "TO" + CountryCodeTt CountryCode = "TT" + CountryCodeTn CountryCode = "TN" + CountryCodeTr CountryCode = "TR" + CountryCodeTm CountryCode = "TM" + CountryCodeTc CountryCode = "TC" + CountryCodeTv CountryCode = "TV" + CountryCodeUg CountryCode = "UG" + CountryCodeUa CountryCode = "UA" + CountryCodeAe CountryCode = "AE" + CountryCodeGb CountryCode = "GB" + CountryCodeUm CountryCode = "UM" + CountryCodeUy CountryCode = "UY" + CountryCodeUz CountryCode = "UZ" + CountryCodeVu CountryCode = "VU" + CountryCodeVe CountryCode = "VE" + CountryCodeVn CountryCode = "VN" + CountryCodeVg CountryCode = "VG" + CountryCodeVi CountryCode = "VI" + CountryCodeWf CountryCode = "WF" + CountryCodeEh CountryCode = "EH" + CountryCodeYe CountryCode = "YE" + CountryCodeZm CountryCode = "ZM" + CountryCodeZw CountryCode = "ZW" +) + +// Values returns all known values for CountryCode. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (CountryCode) Values() []CountryCode { + return []CountryCode{ + "US", + "AF", + "AX", + "AL", + "DZ", + "AS", + "AD", + "AO", + "AI", + "AQ", + "AG", + "AR", + "AM", + "AW", + "AU", + "AT", + "AZ", + "BS", + "BH", + "BD", + "BB", + "BY", + "BE", + "BZ", + "BJ", + "BM", + "BT", + "BO", + "BQ", + "BA", + "BW", + "BV", + "BR", + "IO", + "BN", + "BG", + "BF", + "BI", + "KH", + "CM", + "CA", + "CV", + "KY", + "CF", + "TD", + "CL", + "CN", + "CX", + "CC", + "CO", + "KM", + "CG", + "CK", + "CR", + "CI", + "HR", + "CU", + "CW", + "CY", + "CZ", + "CD", + "DK", + "DJ", + "DM", + "DO", + "EC", + "EG", + "SV", + "GQ", + "ER", + "EE", + "ET", + "FK", + "FO", + "FJ", + "FI", + "FR", + "GF", + "PF", + "TF", + "GA", + "GM", + "GE", + "DE", + "GH", + "GI", + "GR", + "GL", + "GD", + "GP", + "GU", + "GT", + "GG", + "GN", + "GW", + "GY", + "HT", + "HM", + "VA", + "HN", + "HK", + "HU", + "IS", + "IN", + "ID", + "IR", + "IQ", + "IE", + "IM", + "IL", + "IT", + "JM", + "JP", + "JE", + "JO", + "KZ", + "KE", + "KI", + "KR", + "KW", + "KG", + "LA", + "LV", + "LB", + "LS", + "LR", + "LY", + "LI", + "LT", + "LU", + "MO", + "MK", + "MG", + "MW", + "MY", + "MV", + "ML", + "MT", + "MH", + "MQ", + "MR", + "MU", + "YT", + "MX", + "FM", + "MD", + "MC", + "MN", + "ME", + "MS", + "MA", + "MZ", + "MM", + "NA", + "NR", + "NP", + "NL", + "AN", + "NC", + "NZ", + "NI", + "NE", + "NG", + "NU", + "NF", + "MP", + "NO", + "OM", + "PK", + "PW", + "PS", + "PA", + "PG", + "PY", + "PE", + "PH", + "PN", + "PL", + "PT", + "PR", + "QA", + "RE", + "RO", + "RU", + "RW", + "BL", + "SH", + "KN", + "LC", + "MF", + "PM", + "VC", + "WS", + "SM", + "ST", + "SA", + "SN", + "RS", + "SC", + "SL", + "SG", + "SX", + "SK", + "SI", + "SB", + "SO", + "ZA", + "GS", + "SS", + "ES", + "LK", + "SD", + "SR", + "SJ", + "SZ", + "SE", + "CH", + "SY", + "TW", + "TJ", + "TZ", + "TH", + "TL", + "TG", + "TK", + "TO", + "TT", + "TN", + "TR", + "TM", + "TC", + "TV", + "UG", + "UA", + "AE", + "GB", + "UM", + "UY", + "UZ", + "VU", + "VE", + "VN", + "VG", + "VI", + "WF", + "EH", + "YE", + "ZM", + "ZW", + } +} + +type CurrencyCode string + +// Enum values for CurrencyCode +const ( + CurrencyCodeUsd CurrencyCode = "USD" + CurrencyCodeEur CurrencyCode = "EUR" + CurrencyCodeGbp CurrencyCode = "GBP" + CurrencyCodeAud CurrencyCode = "AUD" + CurrencyCodeCad CurrencyCode = "CAD" + CurrencyCodeCny CurrencyCode = "CNY" + CurrencyCodeNzd CurrencyCode = "NZD" + CurrencyCodeInr CurrencyCode = "INR" + CurrencyCodeJpy CurrencyCode = "JPY" + CurrencyCodeChf CurrencyCode = "CHF" + CurrencyCodeSek CurrencyCode = "SEK" + CurrencyCodeAed CurrencyCode = "AED" + CurrencyCodeAfn CurrencyCode = "AFN" + CurrencyCodeAll CurrencyCode = "ALL" + CurrencyCodeAmd CurrencyCode = "AMD" + CurrencyCodeAng CurrencyCode = "ANG" + CurrencyCodeAoa CurrencyCode = "AOA" + CurrencyCodeArs CurrencyCode = "ARS" + CurrencyCodeAwg CurrencyCode = "AWG" + CurrencyCodeAzn CurrencyCode = "AZN" + CurrencyCodeBam CurrencyCode = "BAM" + CurrencyCodeBbd CurrencyCode = "BBD" + CurrencyCodeBdt CurrencyCode = "BDT" + CurrencyCodeBgn CurrencyCode = "BGN" + CurrencyCodeBhd CurrencyCode = "BHD" + CurrencyCodeBif CurrencyCode = "BIF" + CurrencyCodeBmd CurrencyCode = "BMD" + CurrencyCodeBnd CurrencyCode = "BND" + CurrencyCodeBob CurrencyCode = "BOB" + CurrencyCodeBov CurrencyCode = "BOV" + CurrencyCodeBrl CurrencyCode = "BRL" + CurrencyCodeBsd CurrencyCode = "BSD" + CurrencyCodeBtn CurrencyCode = "BTN" + CurrencyCodeBwp CurrencyCode = "BWP" + CurrencyCodeByn CurrencyCode = "BYN" + CurrencyCodeBzd CurrencyCode = "BZD" + CurrencyCodeCdf CurrencyCode = "CDF" + CurrencyCodeChe CurrencyCode = "CHE" + CurrencyCodeChw CurrencyCode = "CHW" + CurrencyCodeClf CurrencyCode = "CLF" + CurrencyCodeClp CurrencyCode = "CLP" + CurrencyCodeCop CurrencyCode = "COP" + CurrencyCodeCou CurrencyCode = "COU" + CurrencyCodeCrc CurrencyCode = "CRC" + CurrencyCodeCuc CurrencyCode = "CUC" + CurrencyCodeCup CurrencyCode = "CUP" + CurrencyCodeCve CurrencyCode = "CVE" + CurrencyCodeCzk CurrencyCode = "CZK" + CurrencyCodeDjf CurrencyCode = "DJF" + CurrencyCodeDkk CurrencyCode = "DKK" + CurrencyCodeDop CurrencyCode = "DOP" + CurrencyCodeDzd CurrencyCode = "DZD" + CurrencyCodeEgp CurrencyCode = "EGP" + CurrencyCodeErn CurrencyCode = "ERN" + CurrencyCodeEtb CurrencyCode = "ETB" + CurrencyCodeFjd CurrencyCode = "FJD" + CurrencyCodeFkp CurrencyCode = "FKP" + CurrencyCodeGel CurrencyCode = "GEL" + CurrencyCodeGhs CurrencyCode = "GHS" + CurrencyCodeGip CurrencyCode = "GIP" + CurrencyCodeGmd CurrencyCode = "GMD" + CurrencyCodeGnf CurrencyCode = "GNF" + CurrencyCodeGtq CurrencyCode = "GTQ" + CurrencyCodeGyd CurrencyCode = "GYD" + CurrencyCodeHkd CurrencyCode = "HKD" + CurrencyCodeHnl CurrencyCode = "HNL" + CurrencyCodeHrk CurrencyCode = "HRK" + CurrencyCodeHtg CurrencyCode = "HTG" + CurrencyCodeHuf CurrencyCode = "HUF" + CurrencyCodeIdr CurrencyCode = "IDR" + CurrencyCodeIls CurrencyCode = "ILS" + CurrencyCodeIqd CurrencyCode = "IQD" + CurrencyCodeIrr CurrencyCode = "IRR" + CurrencyCodeIsk CurrencyCode = "ISK" + CurrencyCodeJmd CurrencyCode = "JMD" + CurrencyCodeJod CurrencyCode = "JOD" + CurrencyCodeKes CurrencyCode = "KES" + CurrencyCodeKgs CurrencyCode = "KGS" + CurrencyCodeKhr CurrencyCode = "KHR" + CurrencyCodeKmf CurrencyCode = "KMF" + CurrencyCodeKpw CurrencyCode = "KPW" + CurrencyCodeKrw CurrencyCode = "KRW" + CurrencyCodeKwd CurrencyCode = "KWD" + CurrencyCodeKyd CurrencyCode = "KYD" + CurrencyCodeKzt CurrencyCode = "KZT" + CurrencyCodeLak CurrencyCode = "LAK" + CurrencyCodeLbp CurrencyCode = "LBP" + CurrencyCodeLkr CurrencyCode = "LKR" + CurrencyCodeLrd CurrencyCode = "LRD" + CurrencyCodeLsl CurrencyCode = "LSL" + CurrencyCodeLyd CurrencyCode = "LYD" + CurrencyCodeMad CurrencyCode = "MAD" + CurrencyCodeMdl CurrencyCode = "MDL" + CurrencyCodeMga CurrencyCode = "MGA" + CurrencyCodeMkd CurrencyCode = "MKD" + CurrencyCodeMmk CurrencyCode = "MMK" + CurrencyCodeMnt CurrencyCode = "MNT" + CurrencyCodeMop CurrencyCode = "MOP" + CurrencyCodeMru CurrencyCode = "MRU" + CurrencyCodeMur CurrencyCode = "MUR" + CurrencyCodeMvr CurrencyCode = "MVR" + CurrencyCodeMwk CurrencyCode = "MWK" + CurrencyCodeMxn CurrencyCode = "MXN" + CurrencyCodeMxv CurrencyCode = "MXV" + CurrencyCodeMyr CurrencyCode = "MYR" + CurrencyCodeMzn CurrencyCode = "MZN" + CurrencyCodeNad CurrencyCode = "NAD" + CurrencyCodeNgn CurrencyCode = "NGN" + CurrencyCodeNio CurrencyCode = "NIO" + CurrencyCodeNok CurrencyCode = "NOK" + CurrencyCodeNpr CurrencyCode = "NPR" + CurrencyCodeOmr CurrencyCode = "OMR" + CurrencyCodePab CurrencyCode = "PAB" + CurrencyCodePen CurrencyCode = "PEN" + CurrencyCodePgk CurrencyCode = "PGK" + CurrencyCodePhp CurrencyCode = "PHP" + CurrencyCodePkr CurrencyCode = "PKR" + CurrencyCodePln CurrencyCode = "PLN" + CurrencyCodePyg CurrencyCode = "PYG" + CurrencyCodeQar CurrencyCode = "QAR" + CurrencyCodeRon CurrencyCode = "RON" + CurrencyCodeRsd CurrencyCode = "RSD" + CurrencyCodeRub CurrencyCode = "RUB" + CurrencyCodeRwf CurrencyCode = "RWF" + CurrencyCodeSar CurrencyCode = "SAR" + CurrencyCodeSbd CurrencyCode = "SBD" + CurrencyCodeScr CurrencyCode = "SCR" + CurrencyCodeSdg CurrencyCode = "SDG" + CurrencyCodeSgd CurrencyCode = "SGD" + CurrencyCodeShp CurrencyCode = "SHP" + CurrencyCodeSll CurrencyCode = "SLL" + CurrencyCodeSos CurrencyCode = "SOS" + CurrencyCodeSrd CurrencyCode = "SRD" + CurrencyCodeSsp CurrencyCode = "SSP" + CurrencyCodeStn CurrencyCode = "STN" + CurrencyCodeSvc CurrencyCode = "SVC" + CurrencyCodeSyp CurrencyCode = "SYP" + CurrencyCodeSzl CurrencyCode = "SZL" + CurrencyCodeThb CurrencyCode = "THB" + CurrencyCodeTjs CurrencyCode = "TJS" + CurrencyCodeTmt CurrencyCode = "TMT" + CurrencyCodeTnd CurrencyCode = "TND" + CurrencyCodeTop CurrencyCode = "TOP" + CurrencyCodeTry CurrencyCode = "TRY" + CurrencyCodeTtd CurrencyCode = "TTD" + CurrencyCodeTwd CurrencyCode = "TWD" + CurrencyCodeTzs CurrencyCode = "TZS" + CurrencyCodeUah CurrencyCode = "UAH" + CurrencyCodeUgx CurrencyCode = "UGX" + CurrencyCodeUsn CurrencyCode = "USN" + CurrencyCodeUyi CurrencyCode = "UYI" + CurrencyCodeUyu CurrencyCode = "UYU" + CurrencyCodeUzs CurrencyCode = "UZS" + CurrencyCodeVef CurrencyCode = "VEF" + CurrencyCodeVnd CurrencyCode = "VND" + CurrencyCodeVuv CurrencyCode = "VUV" + CurrencyCodeWst CurrencyCode = "WST" + CurrencyCodeXaf CurrencyCode = "XAF" + CurrencyCodeXcd CurrencyCode = "XCD" + CurrencyCodeXdr CurrencyCode = "XDR" + CurrencyCodeXof CurrencyCode = "XOF" + CurrencyCodeXpf CurrencyCode = "XPF" + CurrencyCodeXsu CurrencyCode = "XSU" + CurrencyCodeXua CurrencyCode = "XUA" + CurrencyCodeYer CurrencyCode = "YER" + CurrencyCodeZar CurrencyCode = "ZAR" + CurrencyCodeZmw CurrencyCode = "ZMW" + CurrencyCodeZwl CurrencyCode = "ZWL" +) + +// Values returns all known values for CurrencyCode. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (CurrencyCode) Values() []CurrencyCode { + return []CurrencyCode{ + "USD", + "EUR", + "GBP", + "AUD", + "CAD", + "CNY", + "NZD", + "INR", + "JPY", + "CHF", + "SEK", + "AED", + "AFN", + "ALL", + "AMD", + "ANG", + "AOA", + "ARS", + "AWG", + "AZN", + "BAM", + "BBD", + "BDT", + "BGN", + "BHD", + "BIF", + "BMD", + "BND", + "BOB", + "BOV", + "BRL", + "BSD", + "BTN", + "BWP", + "BYN", + "BZD", + "CDF", + "CHE", + "CHW", + "CLF", + "CLP", + "COP", + "COU", + "CRC", + "CUC", + "CUP", + "CVE", + "CZK", + "DJF", + "DKK", + "DOP", + "DZD", + "EGP", + "ERN", + "ETB", + "FJD", + "FKP", + "GEL", + "GHS", + "GIP", + "GMD", + "GNF", + "GTQ", + "GYD", + "HKD", + "HNL", + "HRK", + "HTG", + "HUF", + "IDR", + "ILS", + "IQD", + "IRR", + "ISK", + "JMD", + "JOD", + "KES", + "KGS", + "KHR", + "KMF", + "KPW", + "KRW", + "KWD", + "KYD", + "KZT", + "LAK", + "LBP", + "LKR", + "LRD", + "LSL", + "LYD", + "MAD", + "MDL", + "MGA", + "MKD", + "MMK", + "MNT", + "MOP", + "MRU", + "MUR", + "MVR", + "MWK", + "MXN", + "MXV", + "MYR", + "MZN", + "NAD", + "NGN", + "NIO", + "NOK", + "NPR", + "OMR", + "PAB", + "PEN", + "PGK", + "PHP", + "PKR", + "PLN", + "PYG", + "QAR", + "RON", + "RSD", + "RUB", + "RWF", + "SAR", + "SBD", + "SCR", + "SDG", + "SGD", + "SHP", + "SLL", + "SOS", + "SRD", + "SSP", + "STN", + "SVC", + "SYP", + "SZL", + "THB", + "TJS", + "TMT", + "TND", + "TOP", + "TRY", + "TTD", + "TWD", + "TZS", + "UAH", + "UGX", + "USN", + "UYI", + "UYU", + "UZS", + "VEF", + "VND", + "VUV", + "WST", + "XAF", + "XCD", + "XDR", + "XOF", + "XPF", + "XSU", + "XUA", + "YER", + "ZAR", + "ZMW", + "ZWL", + } +} + +type DeliveryModel string + +// Enum values for DeliveryModel +const ( + DeliveryModelSaasOrPaas DeliveryModel = "SaaS or PaaS" + DeliveryModelByolOrAmi DeliveryModel = "BYOL or AMI" + DeliveryModelManagedServices DeliveryModel = "Managed Services" + DeliveryModelProfessionalServices DeliveryModel = "Professional Services" + DeliveryModelResell DeliveryModel = "Resell" + DeliveryModelOther DeliveryModel = "Other" +) + +// Values returns all known values for DeliveryModel. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (DeliveryModel) Values() []DeliveryModel { + return []DeliveryModel{ + "SaaS or PaaS", + "BYOL or AMI", + "Managed Services", + "Professional Services", + "Resell", + "Other", + } +} + +type EngagementInvitationPayloadType string + +// Enum values for EngagementInvitationPayloadType +const ( + EngagementInvitationPayloadTypeOpportunityInvitation EngagementInvitationPayloadType = "OpportunityInvitation" +) + +// Values returns all known values for EngagementInvitationPayloadType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (EngagementInvitationPayloadType) Values() []EngagementInvitationPayloadType { + return []EngagementInvitationPayloadType{ + "OpportunityInvitation", + } +} + +type EngagementScore string + +// Enum values for EngagementScore +const ( + EngagementScoreHigh EngagementScore = "High" + EngagementScoreMedium EngagementScore = "Medium" + EngagementScoreLow EngagementScore = "Low" +) + +// Values returns all known values for EngagementScore. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (EngagementScore) Values() []EngagementScore { + return []EngagementScore{ + "High", + "Medium", + "Low", + } +} + +type Industry string + +// Enum values for Industry +const ( + IndustryAerospaceSatellite Industry = "Aerospace" + IndustryAgriculture Industry = "Agriculture" + IndustryAutomotive Industry = "Automotive" + IndustryComputersElectronics Industry = "Computers and Electronics" + IndustryConsumerGoods Industry = "Consumer Goods" + IndustryEducation Industry = "Education" + IndustryEnergyOilGas Industry = "Energy - Oil and Gas" + IndustryEnergyPowerUtilities Industry = "Energy - Power and Utilities" + IndustryFinancialServices Industry = "Financial Services" + IndustryGaming Industry = "Gaming" + IndustryGovernment Industry = "Government" + IndustryHealthcare Industry = "Healthcare" + IndustryHospitality Industry = "Hospitality" + IndustryLifeSciences Industry = "Life Sciences" + IndustryManufacturing Industry = "Manufacturing" + IndustryMarketingAdvertising Industry = "Marketing and Advertising" + IndustryMediaEntertainment Industry = "Media and Entertainment" + IndustryMining Industry = "Mining" + IndustryNonProfitOrganization Industry = "Non-Profit Organization" + IndustryProfessionalServices Industry = "Professional Services" + IndustryRealestateConstruction Industry = "Real Estate and Construction" + IndustryRetail Industry = "Retail" + IndustrySoftwareInternet Industry = "Software and Internet" + IndustryTelecommunications Industry = "Telecommunications" + IndustryTransportationLogistics Industry = "Transportation and Logistics" + IndustryTravel Industry = "Travel" + IndustryWholesaleDistribution Industry = "Wholesale and Distribution" + IndustryOther Industry = "Other" +) + +// Values returns all known values for Industry. Note that this can be expanded in +// the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (Industry) Values() []Industry { + return []Industry{ + "Aerospace", + "Agriculture", + "Automotive", + "Computers and Electronics", + "Consumer Goods", + "Education", + "Energy - Oil and Gas", + "Energy - Power and Utilities", + "Financial Services", + "Gaming", + "Government", + "Healthcare", + "Hospitality", + "Life Sciences", + "Manufacturing", + "Marketing and Advertising", + "Media and Entertainment", + "Mining", + "Non-Profit Organization", + "Professional Services", + "Real Estate and Construction", + "Retail", + "Software and Internet", + "Telecommunications", + "Transportation and Logistics", + "Travel", + "Wholesale and Distribution", + "Other", + } +} + +type InvitationStatus string + +// Enum values for InvitationStatus +const ( + InvitationStatusAccepted InvitationStatus = "ACCEPTED" + InvitationStatusPending InvitationStatus = "PENDING" + InvitationStatusRejected InvitationStatus = "REJECTED" + InvitationStatusExpired InvitationStatus = "EXPIRED" +) + +// Values returns all known values for InvitationStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (InvitationStatus) Values() []InvitationStatus { + return []InvitationStatus{ + "ACCEPTED", + "PENDING", + "REJECTED", + "EXPIRED", + } +} + +type InvolvementTypeChangeReason string + +// Enum values for InvolvementTypeChangeReason +const ( + InvolvementTypeChangeReasonExpansionOpportunity InvolvementTypeChangeReason = "Expansion Opportunity" + InvolvementTypeChangeReasonChangeInDealInformation InvolvementTypeChangeReason = "Change in Deal Information" + InvolvementTypeChangeReasonCustomerRequested InvolvementTypeChangeReason = "Customer Requested" + InvolvementTypeChangeReasonTechnicalComplexity InvolvementTypeChangeReason = "Technical Complexity" + InvolvementTypeChangeReasonRiskMitigation InvolvementTypeChangeReason = "Risk Mitigation" +) + +// Values returns all known values for InvolvementTypeChangeReason. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (InvolvementTypeChangeReason) Values() []InvolvementTypeChangeReason { + return []InvolvementTypeChangeReason{ + "Expansion Opportunity", + "Change in Deal Information", + "Customer Requested", + "Technical Complexity", + "Risk Mitigation", + } +} + +type MarketingSource string + +// Enum values for MarketingSource +const ( + MarketingSourceMarketingActivity MarketingSource = "Marketing Activity" + MarketingSourceNone MarketingSource = "None" +) + +// Values returns all known values for MarketingSource. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (MarketingSource) Values() []MarketingSource { + return []MarketingSource{ + "Marketing Activity", + "None", + } +} + +type NationalSecurity string + +// Enum values for NationalSecurity +const ( + NationalSecurityYes NationalSecurity = "Yes" + NationalSecurityNo NationalSecurity = "No" +) + +// Values returns all known values for NationalSecurity. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (NationalSecurity) Values() []NationalSecurity { + return []NationalSecurity{ + "Yes", + "No", + } +} + +type OpportunityEngagementInvitationSortName string + +// Enum values for OpportunityEngagementInvitationSortName +const ( + OpportunityEngagementInvitationSortNameInvitationDate OpportunityEngagementInvitationSortName = "InvitationDate" +) + +// Values returns all known values for OpportunityEngagementInvitationSortName. +// Note that this can be expanded in the future, and so it is only as up to date as +// the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (OpportunityEngagementInvitationSortName) Values() []OpportunityEngagementInvitationSortName { + return []OpportunityEngagementInvitationSortName{ + "InvitationDate", + } +} + +type OpportunityOrigin string + +// Enum values for OpportunityOrigin +const ( + OpportunityOriginAwsReferral OpportunityOrigin = "AWS Referral" + OpportunityOriginPartnerReferral OpportunityOrigin = "Partner Referral" +) + +// Values returns all known values for OpportunityOrigin. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (OpportunityOrigin) Values() []OpportunityOrigin { + return []OpportunityOrigin{ + "AWS Referral", + "Partner Referral", + } +} + +type OpportunitySortName string + +// Enum values for OpportunitySortName +const ( + OpportunitySortNameLastModifieddate OpportunitySortName = "LastModifiedDate" + OpportunitySortNameIdentifier OpportunitySortName = "Identifier" + OpportunitySortNameCustomerCompanyName OpportunitySortName = "CustomerCompanyName" +) + +// Values returns all known values for OpportunitySortName. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (OpportunitySortName) Values() []OpportunitySortName { + return []OpportunitySortName{ + "LastModifiedDate", + "Identifier", + "CustomerCompanyName", + } +} + +type OpportunityType string + +// Enum values for OpportunityType +const ( + OpportunityTypeNetNewBusiness OpportunityType = "Net New Business" + OpportunityTypeFlatRenewal OpportunityType = "Flat Renewal" + OpportunityTypeExpansion OpportunityType = "Expansion" +) + +// Values returns all known values for OpportunityType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (OpportunityType) Values() []OpportunityType { + return []OpportunityType{ + "Net New Business", + "Flat Renewal", + "Expansion", + } +} + +type ParticipantType string + +// Enum values for ParticipantType +const ( + ParticipantTypeReceiver ParticipantType = "RECEIVER" +) + +// Values returns all known values for ParticipantType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ParticipantType) Values() []ParticipantType { + return []ParticipantType{ + "RECEIVER", + } +} + +type PaymentFrequency string + +// Enum values for PaymentFrequency +const ( + PaymentFrequencyMonthly PaymentFrequency = "Monthly" +) + +// Values returns all known values for PaymentFrequency. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PaymentFrequency) Values() []PaymentFrequency { + return []PaymentFrequency{ + "Monthly", + } +} + +type PrimaryNeedFromAws string + +// Enum values for PrimaryNeedFromAws +const ( + PrimaryNeedFromAwsCoSellArchitecturalValidation PrimaryNeedFromAws = "Co-Sell - Architectural Validation" + PrimaryNeedFromAwsCoSellBusinessPresentation PrimaryNeedFromAws = "Co-Sell - Business Presentation" + PrimaryNeedFromAwsCoSellCompetitiveInformation PrimaryNeedFromAws = "Co-Sell - Competitive Information" + PrimaryNeedFromAwsCoSellPricingAssistance PrimaryNeedFromAws = "Co-Sell - Pricing Assistance" + PrimaryNeedFromAwsCoSellTechnicalConsultation PrimaryNeedFromAws = "Co-Sell - Technical Consultation" + PrimaryNeedFromAwsCoSellTotalCostOfOwnershipEvaluation PrimaryNeedFromAws = "Co-Sell - Total Cost of Ownership Evaluation" + PrimaryNeedFromAwsCoSellDealSupport PrimaryNeedFromAws = "Co-Sell - Deal Support" + PrimaryNeedFromAwsCoSellSupportForPublicTenderRfx PrimaryNeedFromAws = "Co-Sell - Support for Public Tender / RFx" +) + +// Values returns all known values for PrimaryNeedFromAws. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PrimaryNeedFromAws) Values() []PrimaryNeedFromAws { + return []PrimaryNeedFromAws{ + "Co-Sell - Architectural Validation", + "Co-Sell - Business Presentation", + "Co-Sell - Competitive Information", + "Co-Sell - Pricing Assistance", + "Co-Sell - Technical Consultation", + "Co-Sell - Total Cost of Ownership Evaluation", + "Co-Sell - Deal Support", + "Co-Sell - Support for Public Tender / RFx", + } +} + +type ReasonCode string + +// Enum values for ReasonCode +const ( + ReasonCodeInvitationAccessDenied ReasonCode = "InvitationAccessDenied" + ReasonCodeEngagementAccessDenied ReasonCode = "EngagementAccessDenied" + ReasonCodeOpportunityAccessDenied ReasonCode = "OpportunityAccessDenied" + ReasonCodeResourceSnapshotJobAccessDenied ReasonCode = "ResourceSnapshotJobAccessDenied" + ReasonCodeEngagementValidationFailed ReasonCode = "EngagementValidationFailed" + ReasonCodeOpportunitySubmissionFailed ReasonCode = "OpportunitySubmissionFailed" + ReasonCodeEngagementInvitationConflict ReasonCode = "EngagementInvitationConflict" + ReasonCodeInternalError ReasonCode = "InternalError" + ReasonCodeOpportunityValidationFailed ReasonCode = "OpportunityValidationFailed" + ReasonCodeOpportunityConflict ReasonCode = "OpportunityConflict" +) + +// Values returns all known values for ReasonCode. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ReasonCode) Values() []ReasonCode { + return []ReasonCode{ + "InvitationAccessDenied", + "EngagementAccessDenied", + "OpportunityAccessDenied", + "ResourceSnapshotJobAccessDenied", + "EngagementValidationFailed", + "OpportunitySubmissionFailed", + "EngagementInvitationConflict", + "InternalError", + "OpportunityValidationFailed", + "OpportunityConflict", + } +} + +type ReceiverResponsibility string + +// Enum values for ReceiverResponsibility +const ( + ReceiverResponsibilityDistributor ReceiverResponsibility = "Distributor" + ReceiverResponsibilityReseller ReceiverResponsibility = "Reseller" + ReceiverResponsibilityHardwarePartner ReceiverResponsibility = "Hardware Partner" + ReceiverResponsibilityManagedServiceProvider ReceiverResponsibility = "Managed Service Provider" + ReceiverResponsibilitySoftwarePartner ReceiverResponsibility = "Software Partner" + ReceiverResponsibilityServicesPartner ReceiverResponsibility = "Services Partner" + ReceiverResponsibilityTrainingPartner ReceiverResponsibility = "Training Partner" + ReceiverResponsibilityCoSellFacilitator ReceiverResponsibility = "Co-Sell Facilitator" + ReceiverResponsibilityFacilitator ReceiverResponsibility = "Facilitator" +) + +// Values returns all known values for ReceiverResponsibility. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ReceiverResponsibility) Values() []ReceiverResponsibility { + return []ReceiverResponsibility{ + "Distributor", + "Reseller", + "Hardware Partner", + "Managed Service Provider", + "Software Partner", + "Services Partner", + "Training Partner", + "Co-Sell Facilitator", + "Facilitator", + } +} + +type RelatedEntityType string + +// Enum values for RelatedEntityType +const ( + RelatedEntityTypeSolutions RelatedEntityType = "Solutions" + RelatedEntityTypeAwsProducts RelatedEntityType = "AwsProducts" + RelatedEntityTypeAwsMarketplaceOffers RelatedEntityType = "AwsMarketplaceOffers" +) + +// Values returns all known values for RelatedEntityType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RelatedEntityType) Values() []RelatedEntityType { + return []RelatedEntityType{ + "Solutions", + "AwsProducts", + "AwsMarketplaceOffers", + } +} + +type RevenueModel string + +// Enum values for RevenueModel +const ( + RevenueModelContract RevenueModel = "Contract" + RevenueModelPayAsYouGo RevenueModel = "Pay-as-you-go" + RevenueModelSubscription RevenueModel = "Subscription" +) + +// Values returns all known values for RevenueModel. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RevenueModel) Values() []RevenueModel { + return []RevenueModel{ + "Contract", + "Pay-as-you-go", + "Subscription", + } +} + +type ReviewStatus string + +// Enum values for ReviewStatus +const ( + ReviewStatusPendingSubmission ReviewStatus = "Pending Submission" + ReviewStatusSubmitted ReviewStatus = "Submitted" + ReviewStatusInReview ReviewStatus = "In review" + ReviewStatusApproved ReviewStatus = "Approved" + ReviewStatusRejected ReviewStatus = "Rejected" + ReviewStatusActionRequired ReviewStatus = "Action Required" +) + +// Values returns all known values for ReviewStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ReviewStatus) Values() []ReviewStatus { + return []ReviewStatus{ + "Pending Submission", + "Submitted", + "In review", + "Approved", + "Rejected", + "Action Required", + } +} + +type SalesActivity string + +// Enum values for SalesActivity +const ( + SalesActivityInitializedDiscussionsWithCustomer SalesActivity = "Initialized discussions with customer" + SalesActivityCustomerHasShownInterest SalesActivity = "Customer has shown interest in solution" + SalesActivityConductedPocDemo SalesActivity = "Conducted POC / Demo" + SalesActivityInEvaluationPlanningStage SalesActivity = "In evaluation / planning stage" + SalesActivityAgreedOnSolutionToBusinessProblem SalesActivity = "Agreed on solution to Business Problem" + SalesActivityCompletedActionPlan SalesActivity = "Completed Action Plan" + SalesActivityFinalizedDeploymentNeeds SalesActivity = "Finalized Deployment Need" + SalesActivitySowSigned SalesActivity = "SOW Signed" +) + +// Values returns all known values for SalesActivity. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SalesActivity) Values() []SalesActivity { + return []SalesActivity{ + "Initialized discussions with customer", + "Customer has shown interest in solution", + "Conducted POC / Demo", + "In evaluation / planning stage", + "Agreed on solution to Business Problem", + "Completed Action Plan", + "Finalized Deployment Need", + "SOW Signed", + } +} + +type SalesInvolvementType string + +// Enum values for SalesInvolvementType +const ( + SalesInvolvementTypeForVisibilityOnly SalesInvolvementType = "For Visibility Only" + SalesInvolvementTypeCoSell SalesInvolvementType = "Co-Sell" +) + +// Values returns all known values for SalesInvolvementType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SalesInvolvementType) Values() []SalesInvolvementType { + return []SalesInvolvementType{ + "For Visibility Only", + "Co-Sell", + } +} + +type SolutionSortName string + +// Enum values for SolutionSortName +const ( + SolutionSortNameIdentifier SolutionSortName = "Identifier" + SolutionSortNameName SolutionSortName = "Name" + SolutionSortNameStatus SolutionSortName = "Status" + SolutionSortNameCategory SolutionSortName = "Category" + SolutionSortNameCreateddate SolutionSortName = "CreatedDate" +) + +// Values returns all known values for SolutionSortName. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SolutionSortName) Values() []SolutionSortName { + return []SolutionSortName{ + "Identifier", + "Name", + "Status", + "Category", + "CreatedDate", + } +} + +type SolutionStatus string + +// Enum values for SolutionStatus +const ( + SolutionStatusActive SolutionStatus = "Active" + SolutionStatusInactive SolutionStatus = "Inactive" + SolutionStatusDraft SolutionStatus = "Draft" +) + +// Values returns all known values for SolutionStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SolutionStatus) Values() []SolutionStatus { + return []SolutionStatus{ + "Active", + "Inactive", + "Draft", + } +} + +type SortOrder string + +// Enum values for SortOrder +const ( + SortOrderAscending SortOrder = "ASCENDING" + SortOrderDescending SortOrder = "DESCENDING" +) + +// Values returns all known values for SortOrder. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SortOrder) Values() []SortOrder { + return []SortOrder{ + "ASCENDING", + "DESCENDING", + } +} + +type Stage string + +// Enum values for Stage +const ( + StageProspect Stage = "Prospect" + StageQualified Stage = "Qualified" + StageTechnicalValidation Stage = "Technical Validation" + StageBusinessValidation Stage = "Business Validation" + StageCommitted Stage = "Committed" + StageLaunched Stage = "Launched" + StageClosedLost Stage = "Closed Lost" +) + +// Values returns all known values for Stage. Note that this can be expanded in +// the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (Stage) Values() []Stage { + return []Stage{ + "Prospect", + "Qualified", + "Technical Validation", + "Business Validation", + "Committed", + "Launched", + "Closed Lost", + } +} + +type TaskStatus string + +// Enum values for TaskStatus +const ( + TaskStatusInProgress TaskStatus = "IN_PROGRESS" + TaskStatusComplete TaskStatus = "COMPLETE" + TaskStatusFailed TaskStatus = "FAILED" +) + +// Values returns all known values for TaskStatus. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (TaskStatus) Values() []TaskStatus { + return []TaskStatus{ + "IN_PROGRESS", + "COMPLETE", + "FAILED", + } +} + +type ValidationExceptionErrorCode string + +// Enum values for ValidationExceptionErrorCode +const ( + ValidationExceptionErrorCodeRequiredFieldMissing ValidationExceptionErrorCode = "REQUIRED_FIELD_MISSING" + ValidationExceptionErrorCodeInvalidEnumValue ValidationExceptionErrorCode = "INVALID_ENUM_VALUE" + ValidationExceptionErrorCodeInvalidStringFormat ValidationExceptionErrorCode = "INVALID_STRING_FORMAT" + ValidationExceptionErrorCodeInvalidValue ValidationExceptionErrorCode = "INVALID_VALUE" + ValidationExceptionErrorCodeTooManyValues ValidationExceptionErrorCode = "TOO_MANY_VALUES" + ValidationExceptionErrorCodeInvalidResourceState ValidationExceptionErrorCode = "INVALID_RESOURCE_STATE" + ValidationExceptionErrorCodeDuplicateKeyValue ValidationExceptionErrorCode = "DUPLICATE_KEY_VALUE" + ValidationExceptionErrorCodeValueOutOfRange ValidationExceptionErrorCode = "VALUE_OUT_OF_RANGE" + ValidationExceptionErrorCodeActionNotPermitted ValidationExceptionErrorCode = "ACTION_NOT_PERMITTED" +) + +// Values returns all known values for ValidationExceptionErrorCode. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ValidationExceptionErrorCode) Values() []ValidationExceptionErrorCode { + return []ValidationExceptionErrorCode{ + "REQUIRED_FIELD_MISSING", + "INVALID_ENUM_VALUE", + "INVALID_STRING_FORMAT", + "INVALID_VALUE", + "TOO_MANY_VALUES", + "INVALID_RESOURCE_STATE", + "DUPLICATE_KEY_VALUE", + "VALUE_OUT_OF_RANGE", + "ACTION_NOT_PERMITTED", + } +} + +type ValidationExceptionReason string + +// Enum values for ValidationExceptionReason +const ( + ValidationExceptionReasonRequestValidationFailed ValidationExceptionReason = "REQUEST_VALIDATION_FAILED" + ValidationExceptionReasonBusinessValidationFailed ValidationExceptionReason = "BUSINESS_VALIDATION_FAILED" +) + +// Values returns all known values for ValidationExceptionReason. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ValidationExceptionReason) Values() []ValidationExceptionReason { + return []ValidationExceptionReason{ + "REQUEST_VALIDATION_FAILED", + "BUSINESS_VALIDATION_FAILED", + } +} + +type Visibility string + +// Enum values for Visibility +const ( + VisibilityFull Visibility = "Full" + VisibilityLimited Visibility = "Limited" +) + +// Values returns all known values for Visibility. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (Visibility) Values() []Visibility { + return []Visibility{ + "Full", + "Limited", + } +} diff --git a/service/partnercentralselling/types/errors.go b/service/partnercentralselling/types/errors.go new file mode 100644 index 00000000000..d484663059b --- /dev/null +++ b/service/partnercentralselling/types/errors.go @@ -0,0 +1,227 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// This error occurs when you don't have permission to perform the requested +// action. +// +// You don’t have access to this action or resource. Review IAM policies or +// contact your AWS administrator for assistance. +type AccessDeniedException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccessDeniedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccessDeniedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AccessDeniedException" + } + return *e.ErrorCodeOverride +} +func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This error occurs when the request can’t be processed due to a conflict with +// the target resource's current state, which could result from updating or +// deleting the resource. +// +// Suggested action: Fetch the latest state of the resource, verify the state, and +// retry the request. +type ConflictException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConflictException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ConflictException" + } + return *e.ErrorCodeOverride +} +func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This error occurs when the specified resource can’t be found or doesn't exist. +// Resource ID and type might be incorrect. +// +// Suggested action: This is usually a transient error. Retry after the provided +// retry delay or a short interval. If the problem persists, contact AWS support. +type InternalServerException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InternalServerException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InternalServerException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InternalServerException" + } + return *e.ErrorCodeOverride +} +func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// This error occurs when the specified resource can't be found. The resource +// might not exist, or isn't visible with the current credentials. +// +// Suggested action: Verify that the resource ID is correct and the resource is in +// the expected AWS region. Check IAM permissions for accessing the resource. +type ResourceNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceNotFoundException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourceNotFoundException" + } + return *e.ErrorCodeOverride +} +func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This error occurs when the request would cause a service quota to be exceeded. +// Service quotas represent the maximum allowed use of a specific resource, and +// this error indicates that the request would surpass that limit. +// +// Suggested action: Review the [service quotas] for the specific resource, and reduce the usage +// or request a quota increase through support if necessary. +// +// [service quotas]: https://docs.aws.amazon.com/partner-central/latest/selling-api/quotas.html +type ServiceQuotaExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceQuotaExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceQuotaExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ServiceQuotaExceededException" + } + return *e.ErrorCodeOverride +} +func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This error occurs when there are too many requests sent. Review the provided +// quotas and adapt your usage to avoid throttling. +// +// This error occurs when there are too many requests sent. Review the provided [quotas] +// and retry after the provided delay. +// +// [quotas]: https://docs.aws.amazon.com/partner-central/latest/selling-api/quotas.html +type ThrottlingException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ThrottlingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ThrottlingException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ThrottlingException" + } + return *e.ErrorCodeOverride +} +func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The input fails to satisfy the constraints specified by the service or business +// validation rules. +// +// Suggested action: Review the error message, including the failed fields and +// reasons, to correct the request payload. +type ValidationException struct { + Message *string + + ErrorCodeOverride *string + + Reason ValidationExceptionReason + ErrorList []ValidationExceptionError + + noSmithyDocumentSerde +} + +func (e *ValidationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ValidationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ValidationException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ValidationException" + } + return *e.ErrorCodeOverride +} +func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/service/partnercentralselling/types/types.go b/service/partnercentralselling/types/types.go new file mode 100644 index 00000000000..7e30f182b7e --- /dev/null +++ b/service/partnercentralselling/types/types.go @@ -0,0 +1,1497 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" + "time" +) + +// Specifies the Customer 's account details associated with the Opportunity . +type Account struct { + + // Specifies the end Customer 's company name associated with the Opportunity . + // + // This member is required. + CompanyName *string + + // Specifies the end Customer 's address details associated with the Opportunity . + Address *Address + + // Specifies the Customer Amazon Web Services account ID associated with the + // Opportunity . + AwsAccountId *string + + // Indicates the Customer DUNS number, if available. + Duns *string + + // Specifies the industry the end Customer belongs to that's associated with the + // Opportunity . It refers to the category or sector where the customer's business + // operates. This is a required field. + Industry Industry + + // Specifies the end Customer 's industry associated with the Opportunity , when + // the selected value in the Industry field is Other . + OtherIndustry *string + + // Specifies the end customer's company website URL associated with the + // Opportunity . This value is crucial to map the customer within the Amazon Web + // Services CRM system. This field is required in all cases except when the + // opportunity is related to national security. + WebsiteUrl *string + + noSmithyDocumentSerde +} + +// Contains the account details of the partner who received the Engagement +// Invitation, including the AWS account ID and company name. +type AccountReceiver struct { + + // Indicates the AWS account ID of the partner who received the Engagement + // Invitation. This is a unique identifier for managing engagements with specific + // AWS accounts. + // + // This member is required. + AwsAccountId *string + + // Represents the alias of the partner account receiving the Engagement + // Invitation, making it easier to identify and track the recipient in reports or + // logs. + Alias *string + + noSmithyDocumentSerde +} + +// An object that contains an Account 's subset of fields. +type AccountSummary struct { + + // Specifies the end Customer 's company name associated with the Opportunity . + // + // This member is required. + CompanyName *string + + // Specifies the end Customer 's address details associated with the Opportunity . + Address *AddressSummary + + // Specifies which industry the end Customer belongs to associated with the + // Opportunity . It refers to the category or sector that the customer's business + // operates in. + // + // To submit a value outside the picklist, use Other . + // + // Conditionally mandatory if Other is selected for Industry Vertical in LOVs. + Industry Industry + + // Specifies the end Customer 's industry associated with the Opportunity , when + // the selected value in the Industry field is Other . This field is relevant when + // the customer's industry doesn't fall under the predefined picklist values and + // requires a custom description. + OtherIndustry *string + + // Specifies the end customer's company website URL associated with the Opportunity + // . This value is crucial to map the customer within the Amazon Web Services CRM + // system. + WebsiteUrl *string + + noSmithyDocumentSerde +} + +// Specifies the end Customer 's address details associated with the Opportunity . +type Address struct { + + // Specifies the end Customer 's city associated with the Opportunity . + City *string + + // Specifies the end Customer 's country associated with the Opportunity . + CountryCode CountryCode + + // Specifies the end Customer 's postal code associated with the Opportunity . + PostalCode *string + + // Specifies the end Customer 's state or region associated with the Opportunity . + // + // Valid values: Alabama | Alaska | American Samoa | Arizona | Arkansas | + // California | Colorado | Connecticut | Delaware | Dist. of Columbia | Federated + // States of Micronesia | Florida | Georgia | Guam | Hawaii | Idaho | Illinois | + // Indiana | Iowa | Kansas | Kentucky | Louisiana | Maine | Marshall Islands | + // Maryland | Massachusetts | Michigan | Minnesota | Mississippi | Missouri | + // Montana | Nebraska | Nevada | New Hampshire | New Jersey | New Mexico | New York + // | North Carolina | North Dakota | Northern Mariana Islands | Ohio | Oklahoma | + // Oregon | Palau | Pennsylvania | Puerto Rico | Rhode Island | South Carolina | + // South Dakota | Tennessee | Texas | Utah | Vermont | Virginia | Virgin Islands | + // Washington | West Virginia | Wisconsin | Wyoming | APO/AE | AFO/FPO | FPO, AP + StateOrRegion *string + + // Specifies the end Customer 's street address associated with the Opportunity . + StreetAddress *string + + noSmithyDocumentSerde +} + +// An object that contains an Address object's subset of fields. +type AddressSummary struct { + + // Specifies the end Customer 's city associated with the Opportunity . + City *string + + // Specifies the end Customer 's country associated with the Opportunity . + CountryCode CountryCode + + // Specifies the end Customer 's postal code associated with the Opportunity . + PostalCode *string + + // Specifies the end Customer 's state or region associated with the Opportunity . + // + // Valid values: Alabama | Alaska | American Samoa | Arizona | Arkansas | + // California | Colorado | Connecticut | Delaware | Dist. of Columbia | Federated + // States of Micronesia | Florida | Georgia | Guam | Hawaii | Idaho | Illinois | + // Indiana | Iowa | Kansas | Kentucky | Louisiana | Maine | Marshall Islands | + // Maryland | Massachusetts | Michigan | Minnesota | Mississippi | Missouri | + // Montana | Nebraska | Nevada | New Hampshire | New Jersey | New Mexico | New York + // | North Carolina | North Dakota | Northern Mariana Islands | Ohio | Oklahoma | + // Oregon | Palau | Pennsylvania | Puerto Rico | Rhode Island | South Carolina | + // South Dakota | Tennessee | Texas | Utah | Vermont | Virginia | Virgin Islands | + // Washington | West Virginia | Wisconsin | Wyoming | APO/AE | AFO/FPO | FPO, AP + StateOrRegion *string + + noSmithyDocumentSerde +} + +// Represents the contact details of the individual assigned to manage the +// opportunity within the partner organization. This ensures that there is a clear +// point of contact for the opportunity's progress and updates. +type AssigneeContact struct { + + // Specifies the business title of the assignee managing the opportunity. This + // helps clarify the individual's role and responsibilities within the + // organization. + // + // This member is required. + BusinessTitle *string + + // Provides the email address of the assignee. This email is used for + // communications and notifications related to the opportunity. + // + // This member is required. + Email *string + + // Specifies the first name of the assignee managing the opportunity. + // + // This member is required. + FirstName *string + + // Specifies the last name of the assignee managing the opportunity. + // + // This member is required. + LastName *string + + noSmithyDocumentSerde +} + +// Represents the customer associated with the AWS opportunity. This field +// captures key details about the customer that are necessary for managing the +// opportunity. +type AwsOpportunityCustomer struct { + + // Provides a list of customer contacts involved in the opportunity. These + // contacts may include decision-makers, influencers, and other key stakeholders + // within the customer's organization. + Contacts []Contact + + noSmithyDocumentSerde +} + +// Contains insights provided by AWS for the opportunity, offering recommendations +// and analysis that can help the partner optimize their engagement and strategy. +type AwsOpportunityInsights struct { + + // Represents a score assigned by AWS to indicate the level of engagement and + // potential success for the opportunity. This score helps partners prioritize + // their efforts. + EngagementScore EngagementScore + + // Provides recommendations from AWS on the next best actions to take in order to + // move the opportunity forward and increase the likelihood of success. + NextBestActions *string + + noSmithyDocumentSerde +} + +// Tracks the lifecycle of the AWS opportunity, including stages such as +// qualification, validation, and closure. This field helps partners understand the +// current status and progression of the opportunity. +type AwsOpportunityLifeCycle struct { + + // Indicates the reason why an opportunity was marked as Closed Lost . This helps + // in understanding the context behind the lost opportunity and aids in refining + // future strategies. + ClosedLostReason AwsClosedLostReason + + // Specifies the immediate next steps required to progress the opportunity. These + // steps are based on AWS's guidance and the current stage of the opportunity. + NextSteps *string + + // Provides a historical log of previous next steps that were taken to move the + // opportunity forward. This helps in tracking the decision-making process and + // identifying any delays or obstacles encountered. + NextStepsHistory []ProfileNextStepsHistory + + // Represents the current stage of the opportunity in its lifecycle, such as + // Qualification , Validation , or Closed Won . This helps in understanding the + // opportunity's progress. + Stage AwsOpportunityStage + + // Indicates the expected date by which the opportunity is projected to close. + // This field helps in planning resources and timelines for both the partner and + // AWS. + TargetCloseDate *string + + noSmithyDocumentSerde +} + +// Captures details about the project associated with the opportunity, including +// objectives, scope, and customer requirements. +type AwsOpportunityProject struct { + + // Indicates the expected spending by the customer over the course of the project. + // This value helps partners and AWS estimate the financial impact of the + // opportunity. Use the [AWS Pricing Calculator]to create an estimate of the customer’s total spend. If + // only annual recurring revenue (ARR) is available, distribute it across 12 months + // to provide an average monthly value. + // + // [AWS Pricing Calculator]: https://calculator.aws/#/ + ExpectedCustomerSpend []ExpectedCustomerSpend + + noSmithyDocumentSerde +} + +// Represents other entities related to the AWS opportunity, such as AWS products, +// partner solutions, and marketplace offers. These associations help build a +// complete picture of the solution being sold. +type AwsOpportunityRelatedEntities struct { + + // Specifies the AWS products associated with the opportunity. This field helps + // track the specific products that are part of the proposed solution. + AwsProducts []string + + // Specifies the partner solutions related to the opportunity. These solutions + // represent the partner's offerings that are being positioned as part of the + // overall AWS opportunity. + Solutions []string + + noSmithyDocumentSerde +} + +// Indicates the level of AWS involvement in the opportunity. This field helps +// track AWS's role and participation throughout the engagement, such as providing +// technical support, deal assistance, or sales support. +type AwsSubmission struct { + + // Specifies the type of AWS involvement in the opportunity, such as co-selling, + // deal support, or technical consultation. This helps categorize the nature of + // AWS's participation. + // + // This member is required. + InvolvementType SalesInvolvementType + + // Determines who can view AWS's involvement in the opportunity. Typically, this + // field is set to Full for most cases, but it may be restricted based on special + // program requirements or confidentiality needs. + Visibility Visibility + + noSmithyDocumentSerde +} + +// Represents an Amazon Web Services team member for the engagement. This +// +// structure includes details such as name, email, and business title. +type AwsTeamMember struct { + + // Specifies the Amazon Web Services team member's business title and indicates + // their organizational role. + BusinessTitle AwsMemberBusinessTitle + + // Provides the Amazon Web Services team member's email address. + Email *string + + // Provides the Amazon Web Services team member's first name. + FirstName *string + + // Provides the Amazon Web Services team member's last name. + LastName *string + + noSmithyDocumentSerde +} + +// An object that contains a Customer Partner 's contact details. +type Contact struct { + + // The partner contact's title (job title or role) associated with the Opportunity + // . + BusinessTitle *string + + // The contact's email address associated with the Opportunity . + Email *string + + // The contact's first name associated with the Opportunity . + FirstName *string + + // The contact's last name associated with the Opportunity . + LastName *string + + // The contact's phone number associated with the Opportunity . + Phone *string + + noSmithyDocumentSerde +} + +// An object that contains the customer's Account and Contact . +type Customer struct { + + // An object that contains the customer's account details. + Account *Account + + // Represents the contact details for individuals associated with the customer of + // the Opportunity . This field captures relevant contacts, including + // decision-makers, influencers, and technical stakeholders within the customer + // organization. These contacts are key to progressing the opportunity. + Contacts []Contact + + noSmithyDocumentSerde +} + +// An object that contains a Customer object's subset of fields. +type CustomerSummary struct { + + // An object that contains a customer's account details. + Account *AccountSummary + + noSmithyDocumentSerde +} + +// Contains details about the customer associated with the Engagement Invitation, +// including key company information and industry. +type EngagementCustomer struct { + + // Represents the name of the customer’s company associated with the Engagement + // Invitation. This field is used to identify the customer. + // + // This member is required. + CompanyName *string + + // Indicates the country in which the customer’s company operates. This field is + // useful for understanding regional requirements or compliance needs. + // + // This member is required. + CountryCode CountryCode + + // Specifies the industry to which the customer’s company belongs. This field + // helps categorize the opportunity based on the customer’s business sector. + // + // This member is required. + Industry Industry + + // Provides the website URL of the customer’s company. This field helps partners + // verify the legitimacy and size of the customer organization. + // + // This member is required. + WebsiteUrl *string + + noSmithyDocumentSerde +} + +// Provides a summarized view of the Engagement Invitation, including key details +// like the identifier, status, and sender information. This summary helps partners +// track and manage AWS-originated opportunities. +type EngagementInvitationSummary struct { + + // Specifies the catalog in which the Engagement Invitation resides. This can be + // either the AWS or Sandbox catalog, indicating whether the opportunity is live + // or being tested. + // + // This member is required. + Catalog *string + + // Represents the unique identifier of the Engagement Invitation. This identifier + // is used to track the invitation and to manage responses like acceptance or + // rejection. + // + // This member is required. + Id *string + + // The Amazon Resource Name (ARN) of the Engagement Invitation. The ARN is a + // unique identifier that allows partners to reference the invitation in their + // system and manage its lifecycle. + Arn *string + + // Provides a short title or description of the Engagement Invitation. This title + // helps partners quickly identify and differentiate between multiple engagement + // opportunities. + EngagementTitle *string + + // Indicates the date and time when the Engagement Invitation will expire. After + // this date, the invitation can no longer be accepted, and the opportunity will no + // longer be available for the partner to engage. + ExpirationDate *time.Time + + // Indicates the date when the Engagement Invitation was sent to the partner. This + // provides context for when the opportunity was shared and helps in tracking the + // timeline for engagement. + InvitationDate *time.Time + + // Describes the type of payload associated with the Engagement Invitation, such + // as Opportunity or MarketplaceOffer . This helps partners understand the nature + // of the engagement request from AWS. + PayloadType EngagementInvitationPayloadType + + // Specifies the partner company or individual that received the Engagement + // Invitation. This field is important for tracking who the invitation was sent to + // within the partner organization. + Receiver Receiver + + // Specifies the AWS account ID of the sender who initiated the Engagement + // Invitation. This allows the partner to identify the AWS entity or representative + // responsible for sharing the opportunity. + SenderAwsAccountId *string + + // Indicates the name of the company or AWS division that sent the Engagement + // Invitation. This information is useful for partners to know which part of AWS is + // requesting engagement. + SenderCompanyName *string + + // Represents the current status of the Engagement Invitation, such as Pending , + // Accepted , or Rejected . The status helps track the progress and response to the + // invitation. + Status InvitationStatus + + noSmithyDocumentSerde +} + +// Provides an estimate of the revenue that the partner is expected to generate +// from the opportunity. This information helps partners assess the financial value +// of the project. +type ExpectedCustomerSpend struct { + + // Represents the estimated monthly revenue that the partner expects to earn from + // the opportunity. This helps in forecasting financial returns. + // + // This member is required. + Amount *string + + // Indicates the currency in which the revenue estimate is provided. This helps in + // understanding the financial impact across different markets. + // + // This member is required. + CurrencyCode CurrencyCode + + // Indicates how frequently the customer is expected to spend the projected + // amount. This can include values such as Monthly , Quarterly , or Annually . The + // default value is Monthly , representing recurring monthly spend. + // + // This member is required. + Frequency PaymentFrequency + + // Specifies the name of the partner company that is expected to generate revenue + // from the opportunity. This field helps track the partner’s involvement in the + // opportunity. + // + // This member is required. + TargetCompany *string + + noSmithyDocumentSerde +} + +// Defines a filter to retrieve opportunities based on the last modified date. +// This filter is useful for tracking changes or updates to opportunities over +// time. +type LastModifiedDate struct { + + // Specifies the date after which the opportunities were modified. Use this filter + // to retrieve only those opportunities that were modified after a given timestamp. + AfterLastModifiedDate *time.Time + + // Specifies the date before which the opportunities were modified. Use this + // filter to retrieve only those opportunities that were modified before a given + // timestamp. + BeforeLastModifiedDate *time.Time + + noSmithyDocumentSerde +} + +// An object that contains the Opportunity lifecycle's details. +type LifeCycle struct { + + // Specifies the reason code when an opportunity is marked as Closed Lost. When + // you select an appropriate reason code, you communicate the context for closing + // the Opportunity , and aid in accurate reports and analysis of opportunity + // outcomes. The possible values are: + // + // - Customer Deficiency: The customer lacked necessary resources or + // capabilities. + // + // - Delay/Cancellation of Project: The project was delayed or canceled. + // + // - Legal/Tax/Regulatory: Legal, tax, or regulatory issues prevented progress. + // + // - Lost to Competitor - Google: The opportunity was lost to Google. + // + // - Lost to Competitor - Microsoft: The opportunity was lost to Microsoft. + // + // - Lost to Competitor - SoftLayer: The opportunity was lost to SoftLayer. + // + // - Lost to Competitor - VMWare: The opportunity was lost to VMWare. + // + // - Lost to Competitor - Other: The opportunity was lost to a competitor not + // listed above. + // + // - No Opportunity: There was no opportunity to pursue. + // + // - On Premises Deployment: The customer chose an on-premises solution. + // + // - Partner Gap: The partner lacked necessary resources or capabilities. + // + // - Price: The price was not competitive or acceptable to the customer. + // + // - Security/Compliance: Security or compliance issues prevented progress. + // + // - Technical Limitations: Technical limitations prevented progress. + // + // - Customer Experience: Issues related to the customer's experience impacted + // the decision. + // + // - Other: Any reason not covered by the other values. + // + // - People/Relationship/Governance: Issues related to people, relationships, or + // governance. + // + // - Product/Technology: Issues related to the product or technology. + // + // - Financial/Commercial: Financial or commercial issues impacted the decision. + ClosedLostReason ClosedLostReason + + // Specifies the upcoming actions or tasks for the Opportunity . This field is + // utilized to communicate to Amazon Web Services the next actions required for the + // Opportunity . + NextSteps *string + + // Captures a chronological record of the next steps or actions planned or taken + // for the current opportunity, along with the timestamp. + NextStepsHistory []NextStepsHistory + + // Indicates why an opportuntiy was sent back for further details. Partners must + // take corrective action based on the ReviewComments . + ReviewComments *string + + // Indicates the review status of an opportunity referred by a partner. This + // field is read-only and only applicable for partner referrals. The possible + // values are: + // + // - Pending Submission: Not submitted for validation (editable). + // + // - Submitted: Submitted for validation, and Amazon Web Services hasn't + // reviewed it (read-only). + // + // - In Review: Amazon Web Services is validating (read-only). + // + // - Action Required: Issues that Amazon Web Services highlights need to be + // addressed. Partners should use the UpdateOpportunity API action to update the + // opportunity, and ensure all required changes are made. Only these fields are + // editable when the Lifecycle.ReviewStatus is Action Required : + // + // - Customer.Account.Address.City + // + // - Customer.Account.Address.CountryCode + // + // - Customer.Account.Address.PostalCode + // + // - Customer.Account.Address.StateOrRegion + // + // - Customer.Account.Address.StreetAddress + // + // - Customer.Account.WebsiteUrl + // + // - LifeCycle.TargetCloseDate + // + // - Project.ExpectedMonthlyAWSRevenue.Amount + // + // - Project.ExpectedMonthlyAWSRevenue.CurrencyCode + // + // - Project.CustomerBusinessProblem + // + // - PartnerOpportunityIdentifier + // + // After updates, the opportunity re-enters the validation phase. This process + // repeats until all issues are resolved, and the opportunity's + // Lifecycle.ReviewStatus is set to Approved or Rejected . + // + // - Approved: Validated and converted into the Amazon Web Services seller's + // pipeline (editable). + // + // - Rejected: Disqualified (read-only). + ReviewStatus ReviewStatus + + // Indicates the reason a decision was made during the opportunity review + // process. This field combines the reasons for both disqualified and action + // required statuses, and provide clarity for why an opportunity was disqualified + // or requires further action. + ReviewStatusReason *string + + // Specifies the current stage of the Opportunity 's lifecycle as it maps to + // Amazon Web Services stages from the current stage in the partner CRM. This field + // provides a translated value of the stage, and offers insight into the + // Opportunity 's progression in the sales cycle, according to Amazon Web Services + // definitions. + // + // A lead and a prospect must be further matured to a Qualified opportunity before + // submission. Opportunities that were closed/lost before submission aren't + // suitable for submission. + // + // The descriptions of each sales stage are: + // + // - Prospect: Amazon Web Services identifies the opportunity. It can be active + // (Comes directly from the end customer through a lead) or latent (Your account + // team believes it exists based on research, account plans, sales plays). + // + // - Qualified: Your account team engaged with the prospect/end customer to + // discuss viability and understand requirements. The prospect/end customer agreed + // that the opportunity is real, of interest, and may solve key business/technical + // needs. + // + // - Technical Validation: All parties understand the implementation plan. + // + // - Business Validation: Pricing was proposed, and all parties agree to the + // steps to close. + // + // - Committed: The customer signed the contract, but Amazon Web Services hasn't + // started billing. + // + // - Launched: The workload is complete, and Amazon Web Services has started + // billing. + // + // - Closed Lost: The opportunity is lost, and there are no steps to move + // forward. + Stage Stage + + // Specifies the date when Amazon Web Services expects to start significant + // billing, when the project finishes, and when it moves into production. This + // field informs the Amazon Web Services seller about when the opportunity launches + // and starts to incur Amazon Web Services usage. + // + // Ensure the Target Close Date isn't in the past. + TargetCloseDate *string + + noSmithyDocumentSerde +} + +// An object that contains a LifeCycle object's subset of fields. +type LifeCycleSummary struct { + + // Specifies the reason code when an opportunity is marked as Closed Lost. When + // you select an appropriate reason code, you communicate the context for closing + // the Opportunity , and aid in accurate reports and analysis of opportunity + // outcomes. + ClosedLostReason ClosedLostReason + + // Specifies the upcoming actions or tasks for the Opportunity . This field is + // utilized to communicate to Amazon Web Services the next actions required for the + // Opportunity . + NextSteps *string + + // Indicates why an opportuntiy was sent back for further details. Partners must + // take corrective action based on the ReviewComments . + ReviewComments *string + + // Indicates the review status of a partner referred opportunity. This field is + // read-only and only applicable for partner referrals. Valid values: + // + // - Pending Submission: Not submitted for validation (editable). + // + // - Submitted: Submitted for validation and not yet Amazon Web Services + // reviewed (read-only). + // + // - In Review: Undergoing Amazon Web Services validation (read-only). + // + // - Action Required: Address any issues Amazon Web Services highlights. Use the + // UpdateOpportunity API action to update the opportunity, and ensure you make + // all required changes. Only these fields are editable when the + // Lifecycle.ReviewStatus is Action Required : + // + // - Customer.Account.Address.City + // + // - Customer.Account.Address.CountryCode + // + // - Customer.Account.Address.PostalCode + // + // - Customer.Account.Address.StateOrRegion + // + // - Customer.Account.Address.StreetAddress + // + // - Customer.Account.WebsiteUrl + // + // - LifeCycle.TargetCloseDate + // + // - Project.ExpectedCustomerSpend.Amount + // + // - Project.ExpectedCustomerSpend.CurrencyCode + // + // - Project.CustomerBusinessProblem + // + // - PartnerOpportunityIdentifier + // + // After updates, the opportunity re-enters the validation phase. This process + // repeats until all issues are resolved, and the opportunity's + // Lifecycle.ReviewStatus is set to Approved or Rejected . + // + // - Approved: Validated and converted into the Amazon Web Services seller's + // pipeline (editable). + // + // - Rejected: Disqualified (read-only). + ReviewStatus ReviewStatus + + // Indicates the reason a specific decision was taken during the opportunity + // review process. This field combines the reasons for both disqualified and action + // required statuses, and provides clarity for why an opportunity was disqualified + // or required further action. + ReviewStatusReason *string + + // Specifies the current stage of the Opportunity 's lifecycle as it maps to + // Amazon Web Services stages from the current stage in the partner CRM. This field + // provides a translated value of the stage, and offers insight into the + // Opportunity 's progression in the sales cycle, according to Amazon Web Services + // definitions. + // + // A lead and a prospect must be further matured to a Qualified opportunity before + // submission. Opportunities that were closed/lost before submission aren't + // suitable for submission. + // + // The descriptions of each sales stage are: + // + // - Prospect: Amazon Web Services identifies the opportunity. It can be active + // (Comes directly from the end customer through a lead) or latent (Your account + // team believes it exists based on research, account plans, sales plays). + // + // - Qualified: Your account team engaged with the prospect/end customer to + // discuss viability and understand requirements. The prospect/end customer agreed + // that the opportunity is real, of interest, and may solve key business/technical + // needs. + // + // - Technical Validation: All parties understand the implementation plan. + // + // - Business Validation: Pricing has been proposed, Pricing was proposed, and + // all parties agree to the steps to close. + // + // - Committed: The customer signed the contract, but Amazon Web Services hasn't + // started billing. + // + // - Launched: The workload is complete, and Amazon Web Services has started + // billing. + // + // - Closed Lost: The opportunity is lost, and there are no steps to move + // forward. + Stage Stage + + // Specifies the date when Amazon Web Services expects to start significant + // billing, when the project finishes, and when it moves into production. This + // field informs the Amazon Web Services seller about when the opportunity launches + // and starts to incur Amazon Web Services usage. + // + // Ensure the Target Close Date isn't in the past. + TargetCloseDate *string + + noSmithyDocumentSerde +} + +// An object that contains marketing details for the Opportunity . +type Marketing struct { + + // Indicates if the Opportunity is a marketing development fund (MDF) funded + // activity. + AwsFundingUsed AwsFundingUsed + + // Specifies the Opportunity 's unique marketing campaign name. The Amazon Web + // Services campaign name serves as a reference to specific marketing initiatives, + // promotions, or activities related to the Opportunity . This field captures the + // identifier used to track and categorize the Opportunity within Amazon Web + // Services's marketing campaigns. If you don't have a campaign name, reach out to + // your Amazon Web Services point of contact to obtain one. + CampaignName *string + + // Specifies the Opportunity 's channel that the marketing activity is associated + // with or was contacted through. This field provides information about the + // specific marketing channel that contributed to the generation of the lead or + // contact. + Channels []Channel + + // Indicates if the Opportunity was sourced from an Amazon Web Services marketing + // activity. Use the value Marketing Activity . Use None if it's not associated + // with an Amazon Web Services marketing activity. This field helps Amazon Web + // Services track the return on marketing investments and enables better + // distribution of marketing budgets among partners. + Source MarketingSource + + // Specifies the marketing activity use case or purpose that led to the + // Opportunity 's creation or contact. This field captures the context or marketing + // activity's execution's intention and the direct correlation to the generated + // opportunity or contact. Must be empty when Marketing.AWSFundingUsed = No . + // + // Valid values: AI/ML | Analytics | Application Integration | Blockchain | + // Business Applications | Cloud Financial Management | Compute | Containers | + // Customer Engagement | Databases | Developer Tools | End User Computing | Front + // End Web & Mobile | Game Tech | IoT | Management & Governance | Media Services | + // Migration & Transfer | Networking & Content Delivery | Quantum Technologies | + // Robotics | Satellite | Security | Serverless | Storage | VR & AR + UseCases []string + + noSmithyDocumentSerde +} + +// Specifies payments details. +type MonetaryValue struct { + + // Specifies the payment amount. + // + // This member is required. + Amount *string + + // Specifies the payment currency. + // + // This member is required. + CurrencyCode CurrencyCode + + noSmithyDocumentSerde +} + +// Read-only; shows the last 50 values and change dates for the NextSteps field. +type NextStepsHistory struct { + + // Indicates the step execution time. + // + // This member is required. + Time *time.Time + + // Indicates the step's execution details. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +// Defines sorting options for retrieving Engagement Invitations. Sorting can be +// done based on various criteria like the invitation date or status. +type OpportunityEngagementInvitationSort struct { + + // Specifies the field by which the Engagement Invitations are sorted. Common + // values include InvitationDate and Status . + // + // This member is required. + SortBy OpportunityEngagementInvitationSortName + + // Defines the order in which the Engagement Invitations are sorted. The values + // can be ASC (ascending) or DESC (descending). + // + // This member is required. + SortOrder SortOrder + + noSmithyDocumentSerde +} + +// Represents the data payload of an Engagement Invitation for a specific +// opportunity. This contains detailed information that partners use to evaluate +// the engagement. +type OpportunityInvitationPayload struct { + + // Contains information about the customer related to the opportunity in the + // Engagement Invitation. This data helps partners understand the customer’s + // profile and requirements. + // + // This member is required. + Customer *EngagementCustomer + + // Describes the project details associated with the opportunity, including the + // customer’s needs and the scope of work expected to be performed. + // + // This member is required. + Project *ProjectDetails + + // Outlines the responsibilities or expectations of the receiver in the context of + // the invitation. + // + // This member is required. + ReceiverResponsibilities []ReceiverResponsibility + + // Represents the contact details of the AWS representatives involved in sending + // the Engagement Invitation. These contacts are key stakeholders for the + // opportunity. + SenderContacts []SenderContact + + noSmithyDocumentSerde +} + +// Object that configures response sorting. +type OpportunitySort struct { + + // Field name to sort by. + // + // This member is required. + SortBy OpportunitySortName + + // Sort order. + // + // Default: Descending + // + // This member is required. + SortOrder SortOrder + + noSmithyDocumentSerde +} + +// An object that contains an Opportunity 's subset of fields. +type OpportunitySummary struct { + + // Specifies the catalog associated with the opportunity, either AWS or Sandbox . + // This indicates the environment in which the opportunity is managed. + // + // This member is required. + Catalog *string + + // DateTime when the Opportunity was last created. + CreatedDate *time.Time + + // An object that contains the Opportunity 's customer details. + Customer *CustomerSummary + + // Read-only, system-generated Opportunity unique identifier. + Id *string + + // DateTime when the Opportunity was last modified. + LastModifiedDate *time.Time + + // An object that contains the Opportunity 's lifecycle details. + LifeCycle *LifeCycleSummary + + // Specifies opportunity type as a renewal, new, or expansion. + // + // Opportunity types: + // + // - New Opportunity: Represents a new business opportunity with a potential + // customer that's not previously engaged with your solutions or services. + // + // - Renewal Opportunity: Represents an opportunity to renew an existing + // contract or subscription with a current customer, ensuring continuity of + // service. + // + // - Expansion Opportunity: Represents an opportunity to expand the scope of an + // existing contract or subscription, either by adding new services or increasing + // the volume of existing services for a current customer. + OpportunityType OpportunityType + + // Specifies the Opportunity 's unique identifier in the partner's CRM system. This + // value is essential to track and reconcile because it's included in the outbound + // payload sent back to the partner. It allows partners to link an opportunity to + // their CRM. + PartnerOpportunityIdentifier *string + + // An object that contains the Opportunity 's project details summary. + Project *ProjectSummary + + noSmithyDocumentSerde +} + +// Contains the data payload associated with the Engagement Invitation. This +// payload includes essential details related to the AWS opportunity and is used by +// partners to evaluate whether to accept or reject the engagement. +// +// The following types satisfy this interface: +// +// PayloadMemberOpportunityInvitation +type Payload interface { + isPayload() +} + +// Specifies the details of the opportunity invitation within the Engagement +// Invitation payload. This data helps partners understand the context, scope, and +// expected involvement for the opportunity from AWS. +type PayloadMemberOpportunityInvitation struct { + Value OpportunityInvitationPayload + + noSmithyDocumentSerde +} + +func (*PayloadMemberOpportunityInvitation) isPayload() {} + +// Tracks the history of next steps associated with the opportunity. This field +// captures the actions planned for the future and their timeline. +type ProfileNextStepsHistory struct { + + // Indicates the date and time when a particular next step was recorded or + // planned. This helps in managing the timeline for the opportunity. + // + // This member is required. + Time *time.Time + + // Represents the details of the next step recorded, such as follow-up actions or + // decisions made. This field helps in tracking progress and ensuring alignment + // with project goals. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +// An object that contains the Opportunity 's project details. +type Project struct { + + // Captures additional comments or information for the Opportunity that weren't + // captured in other fields. + AdditionalComments *string + + // Specifies the Amazon Partner Network (APN) program that influenced the + // Opportunity . APN programs refer to specific partner programs or initiatives + // that can impact the Opportunity . + // + // Valid values: APN Immersion Days | APN Solution Space | ATO (Authority to + // Operate) | AWS Marketplace Campaign | IS Immersion Day SFID Program | ISV + // Workload Migration | Migration Acceleration Program | P3 | Partner Launch + // Initiative | Partner Opportunity Acceleration Funded | The Next Smart | VMware + // Cloud on AWS | Well-Architected | Windows | Workspaces/AppStream Accelerator + // Program | WWPS NDPP + ApnPrograms []string + + // Name of the Opportunity 's competitor (if any). Use Other to submit a value not + // in the picklist. + CompetitorName CompetitorName + + // Describes the problem the end customer has, and how the partner is helping. + // Utilize this field to provide a clear and concise narrative that outlines the + // specific business challenge or issue the customer has. Elaborate on how the + // partner's solution or offerings align to resolve the customer's business + // problem. Include relevant information about the partner's value proposition, + // unique selling points, and expertise to tackle the issue. Offer insights on how + // the proposed solution meets the customer's needs and provides value. Use concise + // language and precise descriptions to convey the context and significance of the + // Opportunity . The content in this field helps Amazon Web Services understand the + // nature of the Opportunity and the strategic fit of the partner's solution. + CustomerBusinessProblem *string + + // Specifies the proposed solution focus or type of workload for the Opportunity. + // This field captures the primary use case or objective of the proposed solution, + // and provides context and clarity to the addressed workload. + // + // Valid values: AI Machine Learning and Analytics | Archiving | Big Data: Data + // Warehouse / Data Integration / ETL / Data Lake / BI | Blockchain | Business + // Applications: Mainframe Modernization | Business Applications & Contact Center | + // Business Applications & SAP Production | Centralized Operations Management | + // Cloud Management Tools | Cloud Management Tools & DevOps with Continuous + // Integration & Continuous Delivery (CICD) | Configuration, Compliance & Auditing + // | Connected Services | Containers & Serverless | Content Delivery & Edge + // Services | Database | Edge Computing / End User Computing | Energy | Enterprise + // Governance & Controls | Enterprise Resource Planning | Financial Services | + // Healthcare and Life Sciences | High Performance Computing | Hybrid Application + // Platform | Industrial Software | IOT | Manufacturing, Supply Chain and + // Operations | Media & High performance computing (HPC) | Migration / Database + // Migration | Monitoring, logging and performance | Monitoring & Observability | + // Networking | Outpost | SAP | Security & Compliance | Storage & Backup | Training + // | VMC | VMWare | Web development & DevOps + CustomerUseCase *string + + // Specifies the deployment or consumption model for your solution or service in + // the Opportunity 's context. You can select multiple options. + // + // Options' descriptions from the Delivery Model field are: + // + // - SaaS or PaaS: Your Amazon Web Services based solution deployed as SaaS or + // PaaS in your Amazon Web Services environment. + // + // - BYOL or AMI: Your Amazon Web Services based solution deployed as BYOL or + // AMI in the end customer's Amazon Web Services environment. + // + // - Managed Services: The end customer's Amazon Web Services business + // management (For example: Consulting, design, implementation, billing support, + // cost optimization, technical support). + // + // - Professional Services: Offerings to help enterprise end customers achieve + // specific business outcomes for enterprise cloud adoption (For example: Advisory + // or transformation planning). + // + // - Resell: Amazon Web Services accounts and billing management for your + // customers. + // + // - Other: Delivery model not described above. + DeliveryModels []DeliveryModel + + // Represents the estimated amount that the customer is expected to spend on AWS + // services related to the opportunity. This helps in evaluating the potential + // financial value of the opportunity for AWS. + ExpectedCustomerSpend []ExpectedCustomerSpend + + // Only allowed when CompetitorNames has Other selected. + OtherCompetitorNames *string + + // Specifies the offered solution for the customer's business problem when the + // RelatedEntityIdentifiers.Solutions field value is Other . + OtherSolutionDescription *string + + // Specifies the current opportunity's parent opportunity identifier. + RelatedOpportunityIdentifier *string + + // Specifies the Opportunity 's sales activities conducted with the end customer. + // These activities help drive Amazon Web Services assignment priority. + // + // Valid values: + // + // - Initialized discussions with customer: Initial conversations with the + // customer to understand their needs and introduce your solution. + // + // - Customer has shown interest in solution: After initial discussions, the + // customer is interested in your solution. + // + // - Conducted POC / Demo: You conducted a proof of concept (POC) or + // demonstration of the solution for the customer. + // + // - In evaluation / planning stage: The customer is evaluating the solution and + // planning potential implementation. + // + // - Agreed on solution to Business Problem: Both parties agree on how the + // solution addresses the customer's business problem. + // + // - Completed Action Plan: A detailed action plan is complete and outlines the + // steps for implementation. + // + // - Finalized Deployment Need: Both parties agree with and finalized the + // deployment needs. + // + // - SOW Signed: Both parties signed a statement of work (SOW), and formalize + // the agreement and detail the project scope and deliverables. + SalesActivities []SalesActivity + + // Specifies the Opportunity 's title or name. + Title *string + + noSmithyDocumentSerde +} + +// Contains details about the project associated with the Engagement Invitation, +// including the business problem and expected outcomes. +type ProjectDetails struct { + + // Describes the business problem that the project aims to solve. This information + // is crucial for understanding the project’s goals and objectives. + // + // This member is required. + BusinessProblem *string + + // Contains revenue estimates for the partner related to the project. This field + // provides an idea of the financial potential of the opportunity for the partner. + // + // This member is required. + ExpectedCustomerSpend []ExpectedCustomerSpend + + // Specifies the estimated date of project completion. This field helps track the + // project timeline and manage expectations. + // + // This member is required. + TargetCompletionDate *string + + // Specifies the title of the project. This title helps partners quickly identify + // and understand the focus of the project. + // + // This member is required. + Title *string + + noSmithyDocumentSerde +} + +// An object that contains a Project object's subset of fields. +type ProjectSummary struct { + + // Specifies your solution or service's deployment or consumption model in the + // Opportunity 's context. You can select multiple options. + // + // Options' descriptions from the Delivery Model field are: + // + // - SaaS or PaaS: Your Amazon Web Services based solution deployed as SaaS or + // PaaS in your Amazon Web Services environment. + // + // - BYOL or AMI: Your Amazon Web Services based solution deployed as BYOL or + // AMI in the end customer's Amazon Web Services environment. + // + // - Managed Services: The end customer's Amazon Web Services business + // management (For example: Consulting, design, implementation, billing support, + // cost optimization, technical support). + // + // - Professional Services: Offerings to help enterprise end customers achieve + // specific business outcomes for enterprise cloud adoption (For example: Advisory + // or transformation planning). + // + // - Resell: Amazon Web Services accounts and billing management for your + // customers. + // + // - Other: Delivery model not described above. + DeliveryModels []DeliveryModel + + // Provides a summary of the expected customer spend for the project, offering a + // high-level view of the potential financial impact. + ExpectedCustomerSpend []ExpectedCustomerSpend + + noSmithyDocumentSerde +} + +// Represents the entity that received the Engagement Invitation, including +// account and company details. This field is essential for tracking the partner +// who is being invited to collaborate. +// +// The following types satisfy this interface: +// +// ReceiverMemberAccount +type Receiver interface { + isReceiver() +} + +// Specifies the AWS account of the partner who received the Engagement +// Invitation. This field is used to track the invitation recipient within the AWS +// ecosystem. +type ReceiverMemberAccount struct { + Value AccountReceiver + + noSmithyDocumentSerde +} + +func (*ReceiverMemberAccount) isReceiver() {} + +// This field provides the associations' information for other entities with the +// +// opportunity. These entities include identifiers for AWSProducts , Partner +// Solutions , and AWSMarketplaceOffers . +type RelatedEntityIdentifiers struct { + + // Takes one value per opportunity. Each value is an Amazon Resource Name (ARN), + // in this format: "offers": + // ["arn:aws:aws-marketplace:us-east-1:999999999999:AWSMarketplace/Offer/offer-sampleOffer32"] + // . + // + // Use the [ListEntities] action in the Marketplace Catalog APIs for a list of offers in the + // associated Marketplace seller account. + // + // [ListEntities]: https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/API_ListEntities.html + AwsMarketplaceOffers []string + + // Enables the association of specific Amazon Web Services products with the + // Opportunity . Partners can indicate the relevant Amazon Web Services products + // for the Opportunity 's solution and align with the customer's needs. Returns + // multiple values separated by commas. For example, "AWSProducts" : + // ["AmazonRedshift", "AWSAppFabric", "AWSCleanRooms"] . + // + // Use the file with the list of Amazon Web Services products hosted on GitHub: [Amazon Web Services products]. + // + // [Amazon Web Services products]: https://github.com/aws-samples/partner-crm-integration-samples/blob/main/resources/aws_products.json + AwsProducts []string + + // Enables partner solutions or offerings' association with an opportunity. To + // associate a solution, provide the solution's unique identifier, which you can + // obtain with the ListSolutions operation. + // + // If the specific solution identifier is not available, you can use the value + // Other and provide details about the solution in the otherSolutionOffered field. + // However, once the opportunity reaches the Committed stage or beyond, the Other + // value cannot be used, and a valid solution identifier must be provided. + // + // By associating the relevant solutions with the opportunity, you can clearly + // communicate the offerings that are being considered or implemented to address + // the customer's business problem. + Solutions []string + + noSmithyDocumentSerde +} + +// An object that contains the details of the sender-provided contact person for +// the EngagementInvitation . +type SenderContact struct { + + // The sender-provided contact's email address associated with the + // EngagementInvitation . + // + // This member is required. + Email *string + + // The sender-provided contact's title (job title or role) associated with the + // EngagementInvitation . + BusinessTitle *string + + // The sender-provided contact's last name associated with the EngagementInvitation + // . + FirstName *string + + // The sender-provided contact's first name associated with the + // EngagementInvitation . + LastName *string + + // The sender-provided contact's phone number associated with the + // EngagementInvitation . + Phone *string + + noSmithyDocumentSerde +} + +// Specifies a customer's procurement terms details. Required only for partners in +// eligible programs. +type SoftwareRevenue struct { + + // Specifies the customer's intended payment type agreement or procurement method + // to acquire the solution or service outlined in the Opportunity . + DeliveryModel RevenueModel + + // Specifies the Opportunity 's customer engagement start date for the contract's + // effectiveness. + EffectiveDate *string + + // Specifies the expiration date for the contract between the customer and Amazon + // Web Services partner. It signifies the termination date of the agreed-upon + // engagement period between both parties. + ExpirationDate *string + + // Specifies the payment value (amount and currency). + Value *MonetaryValue + + noSmithyDocumentSerde +} + +// Specifies minimal information for the solution offered to solve the customer's +// business problem. +type SolutionBase struct { + + // Specifies the catalog in which the solution is hosted, either AWS or Sandbox . + // This helps partners differentiate between live solutions and those in testing + // environments. + // + // This member is required. + Catalog *string + + // Specifies the solution category, which helps to categorize and organize the + // solutions partners offer. Valid values: Software Product | Consulting Service | + // Hardware Product | Communications Product | Professional Service | Managed + // Service | Value-Added Resale Amazon Web Services Service | Distribution Service + // | Training Service | Merger and Acquisition Advising Service . + // + // This member is required. + Category *string + + // Indicates the solution creation date. This is useful to track and audit. + // + // This member is required. + CreatedDate *time.Time + + // Enables the association of solutions (offerings) to opportunities. + // + // This member is required. + Id *string + + // Specifies the solution name. + // + // This member is required. + Name *string + + // Specifies the solution's current status, which indicates its state in the + // system. Valid values: Active | Inactive | Draft . The status helps partners and + // Amazon Web Services track the solution's lifecycle and availability. Filter for + // Active solutions for association to an opportunity. + // + // This member is required. + Status SolutionStatus + + noSmithyDocumentSerde +} + +// Configures the solutions' response sorting that enables partners to order +// +// solutions based on specified attributes. +type SolutionSort struct { + + // Specifies the attribute to sort by, such as Name , CreatedDate , or Status . + // + // This member is required. + SortBy SolutionSortName + + // Specifies the sorting order, either Ascending or Descending . The default is + // Descending . + // + // This member is required. + SortOrder SortOrder + + noSmithyDocumentSerde +} + +// Indicates an invalid value for a field. +// +// - REQUIRED_FIELD_MISSING: The request is missing a required field. +// +// Fix: Verify your request payload includes all required fields. +// +// - INVALID_ENUM_VALUE: The enum field value isn't an accepted values. +// +// Fix: Check the documentation for the list of valid enum values, and update your +// +// request with a valid value. +// +// - INVALID_STRING_FORMAT: The string format is invalid. +// +// Fix: Confirm that the string is in the expected format (For example: email +// +// address, date). +// +// - INVALID_VALUE: The value isn't valid. +// +// Fix: Confirm that the value meets the expected criteria and is within the +// +// allowable range or set. +// +// - TOO_MANY_VALUES: There are too many values in a field that expects fewer +// entries. +// +// Fix: Reduce the number of values to match the expected limit. +// +// - ACTION_NOT_PERMITTED: The action isn't permitted due to current state or +// permissions. +// +// Fix: Verify that the action is appropriate for the current state, and that you +// +// have the necessary permissions to perform it. +// +// - DUPLICATE_KEY_VALUE: The value in a field duplicates a value that must be +// unique. +// +// Fix: Verify that the value is unique and doesn't duplicate an existing value in +// +// the system. +type ValidationExceptionError struct { + + // Specifies the error code for the invalid field value. + // + // This member is required. + Code ValidationExceptionErrorCode + + // Specifies the detailed error message for the invalid field value. + // + // This member is required. + Message *string + + // Specifies the field name with the invalid value. + FieldName *string + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +// UnknownUnionMember is returned when a union member is returned over the wire, +// but has an unknown tag. +type UnknownUnionMember struct { + Tag string + Value []byte + + noSmithyDocumentSerde +} + +func (*UnknownUnionMember) isPayload() {} +func (*UnknownUnionMember) isReceiver() {} diff --git a/service/partnercentralselling/types/types_exported_test.go b/service/partnercentralselling/types/types_exported_test.go new file mode 100644 index 00000000000..532e5ee2611 --- /dev/null +++ b/service/partnercentralselling/types/types_exported_test.go @@ -0,0 +1,44 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types_test + +import ( + "fmt" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" +) + +func ExamplePayload_outputUsage() { + var union types.Payload + // type switches can be used to check the union value + switch v := union.(type) { + case *types.PayloadMemberOpportunityInvitation: + _ = v.Value // Value is types.OpportunityInvitationPayload + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.OpportunityInvitationPayload + +func ExampleReceiver_outputUsage() { + var union types.Receiver + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ReceiverMemberAccount: + _ = v.Value // Value is types.AccountReceiver + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.AccountReceiver diff --git a/service/partnercentralselling/validators.go b/service/partnercentralselling/validators.go new file mode 100644 index 00000000000..79d1cf86b2d --- /dev/null +++ b/service/partnercentralselling/validators.go @@ -0,0 +1,953 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpAssignOpportunity struct { +} + +func (*validateOpAssignOpportunity) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssignOpportunity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssignOpportunityInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssignOpportunityInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpAssociateOpportunity struct { +} + +func (*validateOpAssociateOpportunity) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssociateOpportunity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssociateOpportunityInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssociateOpportunityInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateOpportunity struct { +} + +func (*validateOpCreateOpportunity) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateOpportunity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateOpportunityInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateOpportunityInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDisassociateOpportunity struct { +} + +func (*validateOpDisassociateOpportunity) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDisassociateOpportunity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DisassociateOpportunityInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDisassociateOpportunityInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetAwsOpportunitySummary struct { +} + +func (*validateOpGetAwsOpportunitySummary) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetAwsOpportunitySummary) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetAwsOpportunitySummaryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetAwsOpportunitySummaryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetEngagementInvitation struct { +} + +func (*validateOpGetEngagementInvitation) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetEngagementInvitation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetEngagementInvitationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetEngagementInvitationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetOpportunity struct { +} + +func (*validateOpGetOpportunity) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetOpportunity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetOpportunityInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetOpportunityInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListEngagementInvitations struct { +} + +func (*validateOpListEngagementInvitations) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListEngagementInvitations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListEngagementInvitationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListEngagementInvitationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListOpportunities struct { +} + +func (*validateOpListOpportunities) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListOpportunities) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListOpportunitiesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListOpportunitiesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListSolutions struct { +} + +func (*validateOpListSolutions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListSolutions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListSolutionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListSolutionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRejectEngagementInvitation struct { +} + +func (*validateOpRejectEngagementInvitation) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRejectEngagementInvitation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RejectEngagementInvitationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRejectEngagementInvitationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartEngagementByAcceptingInvitationTask struct { +} + +func (*validateOpStartEngagementByAcceptingInvitationTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartEngagementByAcceptingInvitationTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartEngagementByAcceptingInvitationTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartEngagementByAcceptingInvitationTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartEngagementFromOpportunityTask struct { +} + +func (*validateOpStartEngagementFromOpportunityTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartEngagementFromOpportunityTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartEngagementFromOpportunityTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartEngagementFromOpportunityTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateOpportunity struct { +} + +func (*validateOpUpdateOpportunity) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateOpportunity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateOpportunityInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateOpportunityInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpAssignOpportunityValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssignOpportunity{}, middleware.After) +} + +func addOpAssociateOpportunityValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateOpportunity{}, middleware.After) +} + +func addOpCreateOpportunityValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateOpportunity{}, middleware.After) +} + +func addOpDisassociateOpportunityValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisassociateOpportunity{}, middleware.After) +} + +func addOpGetAwsOpportunitySummaryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetAwsOpportunitySummary{}, middleware.After) +} + +func addOpGetEngagementInvitationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetEngagementInvitation{}, middleware.After) +} + +func addOpGetOpportunityValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetOpportunity{}, middleware.After) +} + +func addOpListEngagementInvitationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListEngagementInvitations{}, middleware.After) +} + +func addOpListOpportunitiesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListOpportunities{}, middleware.After) +} + +func addOpListSolutionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListSolutions{}, middleware.After) +} + +func addOpRejectEngagementInvitationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRejectEngagementInvitation{}, middleware.After) +} + +func addOpStartEngagementByAcceptingInvitationTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartEngagementByAcceptingInvitationTask{}, middleware.After) +} + +func addOpStartEngagementFromOpportunityTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartEngagementFromOpportunityTask{}, middleware.After) +} + +func addOpUpdateOpportunityValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateOpportunity{}, middleware.After) +} + +func validateAccount(v *types.Account) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Account"} + if v.CompanyName == nil { + invalidParams.Add(smithy.NewErrParamRequired("CompanyName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAssigneeContact(v *types.AssigneeContact) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssigneeContact"} + if v.Email == nil { + invalidParams.Add(smithy.NewErrParamRequired("Email")) + } + if v.FirstName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FirstName")) + } + if v.LastName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LastName")) + } + if v.BusinessTitle == nil { + invalidParams.Add(smithy.NewErrParamRequired("BusinessTitle")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAwsSubmission(v *types.AwsSubmission) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AwsSubmission"} + if len(v.InvolvementType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("InvolvementType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCustomer(v *types.Customer) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Customer"} + if v.Account != nil { + if err := validateAccount(v.Account); err != nil { + invalidParams.AddNested("Account", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateExpectedCustomerSpend(v *types.ExpectedCustomerSpend) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ExpectedCustomerSpend"} + if v.Amount == nil { + invalidParams.Add(smithy.NewErrParamRequired("Amount")) + } + if len(v.CurrencyCode) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("CurrencyCode")) + } + if len(v.Frequency) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Frequency")) + } + if v.TargetCompany == nil { + invalidParams.Add(smithy.NewErrParamRequired("TargetCompany")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateExpectedCustomerSpendList(v []types.ExpectedCustomerSpend) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ExpectedCustomerSpendList"} + for i := range v { + if err := validateExpectedCustomerSpend(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLifeCycle(v *types.LifeCycle) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LifeCycle"} + if v.NextStepsHistory != nil { + if err := validateNextStepsHistories(v.NextStepsHistory); err != nil { + invalidParams.AddNested("NextStepsHistory", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMonetaryValue(v *types.MonetaryValue) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MonetaryValue"} + if v.Amount == nil { + invalidParams.Add(smithy.NewErrParamRequired("Amount")) + } + if len(v.CurrencyCode) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("CurrencyCode")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateNextStepsHistories(v []types.NextStepsHistory) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NextStepsHistories"} + for i := range v { + if err := validateNextStepsHistory(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateNextStepsHistory(v *types.NextStepsHistory) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NextStepsHistory"} + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if v.Time == nil { + invalidParams.Add(smithy.NewErrParamRequired("Time")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpportunityEngagementInvitationSort(v *types.OpportunityEngagementInvitationSort) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpportunityEngagementInvitationSort"} + if len(v.SortOrder) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SortOrder")) + } + if len(v.SortBy) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SortBy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpportunitySort(v *types.OpportunitySort) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpportunitySort"} + if len(v.SortOrder) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SortOrder")) + } + if len(v.SortBy) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SortBy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateProject(v *types.Project) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Project"} + if v.ExpectedCustomerSpend != nil { + if err := validateExpectedCustomerSpendList(v.ExpectedCustomerSpend); err != nil { + invalidParams.AddNested("ExpectedCustomerSpend", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSoftwareRevenue(v *types.SoftwareRevenue) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SoftwareRevenue"} + if v.Value != nil { + if err := validateMonetaryValue(v.Value); err != nil { + invalidParams.AddNested("Value", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSolutionSort(v *types.SolutionSort) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SolutionSort"} + if len(v.SortOrder) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SortOrder")) + } + if len(v.SortBy) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SortBy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAssignOpportunityInput(v *AssignOpportunityInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssignOpportunityInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if v.Assignee == nil { + invalidParams.Add(smithy.NewErrParamRequired("Assignee")) + } else if v.Assignee != nil { + if err := validateAssigneeContact(v.Assignee); err != nil { + invalidParams.AddNested("Assignee", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAssociateOpportunityInput(v *AssociateOpportunityInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociateOpportunityInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.OpportunityIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpportunityIdentifier")) + } + if len(v.RelatedEntityType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("RelatedEntityType")) + } + if v.RelatedEntityIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("RelatedEntityIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateOpportunityInput(v *CreateOpportunityInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateOpportunityInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.Customer != nil { + if err := validateCustomer(v.Customer); err != nil { + invalidParams.AddNested("Customer", err.(smithy.InvalidParamsError)) + } + } + if v.Project != nil { + if err := validateProject(v.Project); err != nil { + invalidParams.AddNested("Project", err.(smithy.InvalidParamsError)) + } + } + if v.SoftwareRevenue != nil { + if err := validateSoftwareRevenue(v.SoftwareRevenue); err != nil { + invalidParams.AddNested("SoftwareRevenue", err.(smithy.InvalidParamsError)) + } + } + if v.ClientToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) + } + if v.LifeCycle != nil { + if err := validateLifeCycle(v.LifeCycle); err != nil { + invalidParams.AddNested("LifeCycle", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDisassociateOpportunityInput(v *DisassociateOpportunityInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DisassociateOpportunityInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.OpportunityIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpportunityIdentifier")) + } + if len(v.RelatedEntityType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("RelatedEntityType")) + } + if v.RelatedEntityIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("RelatedEntityIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetAwsOpportunitySummaryInput(v *GetAwsOpportunitySummaryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetAwsOpportunitySummaryInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.RelatedOpportunityIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("RelatedOpportunityIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetEngagementInvitationInput(v *GetEngagementInvitationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetEngagementInvitationInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetOpportunityInput(v *GetOpportunityInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetOpportunityInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListEngagementInvitationsInput(v *ListEngagementInvitationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListEngagementInvitationsInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.Sort != nil { + if err := validateOpportunityEngagementInvitationSort(v.Sort); err != nil { + invalidParams.AddNested("Sort", err.(smithy.InvalidParamsError)) + } + } + if len(v.ParticipantType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ParticipantType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListOpportunitiesInput(v *ListOpportunitiesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListOpportunitiesInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.Sort != nil { + if err := validateOpportunitySort(v.Sort); err != nil { + invalidParams.AddNested("Sort", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListSolutionsInput(v *ListSolutionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListSolutionsInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.Sort != nil { + if err := validateSolutionSort(v.Sort); err != nil { + invalidParams.AddNested("Sort", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpRejectEngagementInvitationInput(v *RejectEngagementInvitationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RejectEngagementInvitationInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStartEngagementByAcceptingInvitationTaskInput(v *StartEngagementByAcceptingInvitationTaskInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartEngagementByAcceptingInvitationTaskInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.ClientToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) + } + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStartEngagementFromOpportunityTaskInput(v *StartEngagementFromOpportunityTaskInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartEngagementFromOpportunityTaskInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.ClientToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) + } + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if v.AwsSubmission == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsSubmission")) + } else if v.AwsSubmission != nil { + if err := validateAwsSubmission(v.AwsSubmission); err != nil { + invalidParams.AddNested("AwsSubmission", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateOpportunityInput(v *UpdateOpportunityInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateOpportunityInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.Customer != nil { + if err := validateCustomer(v.Customer); err != nil { + invalidParams.AddNested("Customer", err.(smithy.InvalidParamsError)) + } + } + if v.Project != nil { + if err := validateProject(v.Project); err != nil { + invalidParams.AddNested("Project", err.(smithy.InvalidParamsError)) + } + } + if v.SoftwareRevenue != nil { + if err := validateSoftwareRevenue(v.SoftwareRevenue); err != nil { + invalidParams.AddNested("SoftwareRevenue", err.(smithy.InvalidParamsError)) + } + } + if v.LastModifiedDate == nil { + invalidParams.Add(smithy.NewErrParamRequired("LastModifiedDate")) + } + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if v.LifeCycle != nil { + if err := validateLifeCycle(v.LifeCycle); err != nil { + invalidParams.AddNested("LifeCycle", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/quicksight/api_op_CreateBrand.go b/service/quicksight/api_op_CreateBrand.go new file mode 100644 index 00000000000..651acb59ee1 --- /dev/null +++ b/service/quicksight/api_op_CreateBrand.go @@ -0,0 +1,174 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an Amazon QuickSight brand. +func (c *Client) CreateBrand(ctx context.Context, params *CreateBrandInput, optFns ...func(*Options)) (*CreateBrandOutput, error) { + if params == nil { + params = &CreateBrandInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateBrand", params, optFns, c.addOperationCreateBrandMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateBrandOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateBrandInput struct { + + // The ID of the Amazon Web Services account that owns the brand. + // + // This member is required. + AwsAccountId *string + + // The ID of the Amazon QuickSight brand. + // + // This member is required. + BrandId *string + + // The definition of the brand. + BrandDefinition *types.BrandDefinition + + // A map of the key-value pairs that are assigned to the brand. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateBrandOutput struct { + + // The definition of the brand. + BrandDefinition *types.BrandDefinition + + // The details of the brand. + BrandDetail *types.BrandDetail + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateBrandMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateBrand{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateBrand{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateBrand"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpCreateBrandValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateBrand(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateBrand(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateBrand", + } +} diff --git a/service/quicksight/api_op_CreateCustomPermissions.go b/service/quicksight/api_op_CreateCustomPermissions.go new file mode 100644 index 00000000000..95368a4760a --- /dev/null +++ b/service/quicksight/api_op_CreateCustomPermissions.go @@ -0,0 +1,175 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a custom permissions profile. +func (c *Client) CreateCustomPermissions(ctx context.Context, params *CreateCustomPermissionsInput, optFns ...func(*Options)) (*CreateCustomPermissionsOutput, error) { + if params == nil { + params = &CreateCustomPermissionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateCustomPermissions", params, optFns, c.addOperationCreateCustomPermissionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateCustomPermissionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateCustomPermissionsInput struct { + + // The ID of the Amazon Web Services account that you want to create the custom + // permissions profile in. + // + // This member is required. + AwsAccountId *string + + // The name of the custom permissions profile that you want to create. + // + // This member is required. + CustomPermissionsName *string + + // A set of actions to include in the custom permissions profile. + Capabilities *types.Capabilities + + // The tags to associate with the custom permissions profile. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateCustomPermissionsOutput struct { + + // The Amazon Resource Name (ARN) of the custom permissions profile. + Arn *string + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The HTTP status of the request. + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateCustomPermissionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateCustomPermissions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateCustomPermissions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateCustomPermissions"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpCreateCustomPermissionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCustomPermissions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateCustomPermissions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateCustomPermissions", + } +} diff --git a/service/quicksight/api_op_DeleteBrand.go b/service/quicksight/api_op_DeleteBrand.go new file mode 100644 index 00000000000..6dd6f664021 --- /dev/null +++ b/service/quicksight/api_op_DeleteBrand.go @@ -0,0 +1,161 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes an Amazon QuickSight brand. +func (c *Client) DeleteBrand(ctx context.Context, params *DeleteBrandInput, optFns ...func(*Options)) (*DeleteBrandOutput, error) { + if params == nil { + params = &DeleteBrandInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteBrand", params, optFns, c.addOperationDeleteBrandMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteBrandOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteBrandInput struct { + + // The ID of the Amazon Web Services account that owns the brand. + // + // This member is required. + AwsAccountId *string + + // The ID of the Amazon QuickSight brand. + // + // This member is required. + BrandId *string + + noSmithyDocumentSerde +} + +type DeleteBrandOutput struct { + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteBrandMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteBrand{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteBrand{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteBrand"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpDeleteBrandValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBrand(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteBrand(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteBrand", + } +} diff --git a/service/quicksight/api_op_DeleteBrandAssignment.go b/service/quicksight/api_op_DeleteBrandAssignment.go new file mode 100644 index 00000000000..3bb0c593f64 --- /dev/null +++ b/service/quicksight/api_op_DeleteBrandAssignment.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a brand assignment. +func (c *Client) DeleteBrandAssignment(ctx context.Context, params *DeleteBrandAssignmentInput, optFns ...func(*Options)) (*DeleteBrandAssignmentOutput, error) { + if params == nil { + params = &DeleteBrandAssignmentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteBrandAssignment", params, optFns, c.addOperationDeleteBrandAssignmentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteBrandAssignmentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteBrandAssignmentInput struct { + + // The ID of the Amazon Web Services account that owns the brand assignment. + // + // This member is required. + AwsAccountId *string + + noSmithyDocumentSerde +} + +type DeleteBrandAssignmentOutput struct { + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteBrandAssignmentMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteBrandAssignment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteBrandAssignment{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteBrandAssignment"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpDeleteBrandAssignmentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBrandAssignment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteBrandAssignment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteBrandAssignment", + } +} diff --git a/service/quicksight/api_op_DeleteCustomPermissions.go b/service/quicksight/api_op_DeleteCustomPermissions.go new file mode 100644 index 00000000000..2b6676d4bac --- /dev/null +++ b/service/quicksight/api_op_DeleteCustomPermissions.go @@ -0,0 +1,168 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a custom permissions profile. +func (c *Client) DeleteCustomPermissions(ctx context.Context, params *DeleteCustomPermissionsInput, optFns ...func(*Options)) (*DeleteCustomPermissionsOutput, error) { + if params == nil { + params = &DeleteCustomPermissionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteCustomPermissions", params, optFns, c.addOperationDeleteCustomPermissionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteCustomPermissionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteCustomPermissionsInput struct { + + // The ID of the Amazon Web Services account that contains the custom permissions + // profile that you want to delete. + // + // This member is required. + AwsAccountId *string + + // The name of the custom permissions profile that you want to delete. + // + // This member is required. + CustomPermissionsName *string + + noSmithyDocumentSerde +} + +type DeleteCustomPermissionsOutput struct { + + // The Amazon Resource Name (ARN) of the custom permissions profile. + Arn *string + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The HTTP status of the request. + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteCustomPermissionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteCustomPermissions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteCustomPermissions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteCustomPermissions"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpDeleteCustomPermissionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCustomPermissions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteCustomPermissions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteCustomPermissions", + } +} diff --git a/service/quicksight/api_op_DeleteUserCustomPermission.go b/service/quicksight/api_op_DeleteUserCustomPermission.go new file mode 100644 index 00000000000..ab3e73fb8e1 --- /dev/null +++ b/service/quicksight/api_op_DeleteUserCustomPermission.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a custom permissions profile from a user. +func (c *Client) DeleteUserCustomPermission(ctx context.Context, params *DeleteUserCustomPermissionInput, optFns ...func(*Options)) (*DeleteUserCustomPermissionOutput, error) { + if params == nil { + params = &DeleteUserCustomPermissionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteUserCustomPermission", params, optFns, c.addOperationDeleteUserCustomPermissionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteUserCustomPermissionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteUserCustomPermissionInput struct { + + // The ID of the Amazon Web Services account that contains the custom permission + // configuration that you want to delete. + // + // This member is required. + AwsAccountId *string + + // The namespace that the user belongs to. + // + // This member is required. + Namespace *string + + // The username of the user that you want to remove custom permissions from. + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +type DeleteUserCustomPermissionOutput struct { + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The HTTP status of the request. + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteUserCustomPermissionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteUserCustomPermission{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteUserCustomPermission{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteUserCustomPermission"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpDeleteUserCustomPermissionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteUserCustomPermission(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteUserCustomPermission(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteUserCustomPermission", + } +} diff --git a/service/quicksight/api_op_DescribeBrand.go b/service/quicksight/api_op_DescribeBrand.go new file mode 100644 index 00000000000..7c53dd21661 --- /dev/null +++ b/service/quicksight/api_op_DescribeBrand.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes a brand. +func (c *Client) DescribeBrand(ctx context.Context, params *DescribeBrandInput, optFns ...func(*Options)) (*DescribeBrandOutput, error) { + if params == nil { + params = &DescribeBrandInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeBrand", params, optFns, c.addOperationDescribeBrandMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeBrandOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeBrandInput struct { + + // The ID of the Amazon Web Services account that owns the brand. + // + // This member is required. + AwsAccountId *string + + // The ID of the Amazon QuickSight brand. + // + // This member is required. + BrandId *string + + // The ID of the specific version. The default value is the latest version. + VersionId *string + + noSmithyDocumentSerde +} + +type DescribeBrandOutput struct { + + // The definition of the brand. + BrandDefinition *types.BrandDefinition + + // The details of the brand. + BrandDetail *types.BrandDetail + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeBrandMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeBrand{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeBrand{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeBrand"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpDescribeBrandValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeBrand(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeBrand(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeBrand", + } +} diff --git a/service/quicksight/api_op_DescribeBrandAssignment.go b/service/quicksight/api_op_DescribeBrandAssignment.go new file mode 100644 index 00000000000..3a5b1366f49 --- /dev/null +++ b/service/quicksight/api_op_DescribeBrandAssignment.go @@ -0,0 +1,159 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes a brand assignment. +func (c *Client) DescribeBrandAssignment(ctx context.Context, params *DescribeBrandAssignmentInput, optFns ...func(*Options)) (*DescribeBrandAssignmentOutput, error) { + if params == nil { + params = &DescribeBrandAssignmentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeBrandAssignment", params, optFns, c.addOperationDescribeBrandAssignmentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeBrandAssignmentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeBrandAssignmentInput struct { + + // The ID of the Amazon Web Services account that owns the brand assignment. + // + // This member is required. + AwsAccountId *string + + noSmithyDocumentSerde +} + +type DescribeBrandAssignmentOutput struct { + + // The Amazon Resource Name (ARN) of the brand. + BrandArn *string + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeBrandAssignmentMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeBrandAssignment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeBrandAssignment{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeBrandAssignment"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpDescribeBrandAssignmentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeBrandAssignment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeBrandAssignment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeBrandAssignment", + } +} diff --git a/service/quicksight/api_op_DescribeBrandPublishedVersion.go b/service/quicksight/api_op_DescribeBrandPublishedVersion.go new file mode 100644 index 00000000000..41796d7e743 --- /dev/null +++ b/service/quicksight/api_op_DescribeBrandPublishedVersion.go @@ -0,0 +1,168 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes the published version of the brand. +func (c *Client) DescribeBrandPublishedVersion(ctx context.Context, params *DescribeBrandPublishedVersionInput, optFns ...func(*Options)) (*DescribeBrandPublishedVersionOutput, error) { + if params == nil { + params = &DescribeBrandPublishedVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeBrandPublishedVersion", params, optFns, c.addOperationDescribeBrandPublishedVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeBrandPublishedVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeBrandPublishedVersionInput struct { + + // The ID of the Amazon Web Services account that owns the brand. + // + // This member is required. + AwsAccountId *string + + // The ID of the Amazon QuickSight brand. + // + // This member is required. + BrandId *string + + noSmithyDocumentSerde +} + +type DescribeBrandPublishedVersionOutput struct { + + // The definition of the brand. + BrandDefinition *types.BrandDefinition + + // The details of the brand. + BrandDetail *types.BrandDetail + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeBrandPublishedVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeBrandPublishedVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeBrandPublishedVersion{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeBrandPublishedVersion"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpDescribeBrandPublishedVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeBrandPublishedVersion(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeBrandPublishedVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeBrandPublishedVersion", + } +} diff --git a/service/quicksight/api_op_DescribeCustomPermissions.go b/service/quicksight/api_op_DescribeCustomPermissions.go new file mode 100644 index 00000000000..438727bcad7 --- /dev/null +++ b/service/quicksight/api_op_DescribeCustomPermissions.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes a custom permissions profile. +func (c *Client) DescribeCustomPermissions(ctx context.Context, params *DescribeCustomPermissionsInput, optFns ...func(*Options)) (*DescribeCustomPermissionsOutput, error) { + if params == nil { + params = &DescribeCustomPermissionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeCustomPermissions", params, optFns, c.addOperationDescribeCustomPermissionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeCustomPermissionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeCustomPermissionsInput struct { + + // The ID of the Amazon Web Services account that contains the custom permissions + // profile that you want described. + // + // This member is required. + AwsAccountId *string + + // The name of the custom permissions profile to describe. + // + // This member is required. + CustomPermissionsName *string + + noSmithyDocumentSerde +} + +type DescribeCustomPermissionsOutput struct { + + // The custom permissions profile. + CustomPermissions *types.CustomPermissions + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The HTTP status of the request. + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeCustomPermissionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeCustomPermissions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeCustomPermissions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeCustomPermissions"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpDescribeCustomPermissionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCustomPermissions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeCustomPermissions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeCustomPermissions", + } +} diff --git a/service/quicksight/api_op_ListBrands.go b/service/quicksight/api_op_ListBrands.go new file mode 100644 index 00000000000..4f2544dced0 --- /dev/null +++ b/service/quicksight/api_op_ListBrands.go @@ -0,0 +1,260 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all brands in an Amazon QuickSight account. +func (c *Client) ListBrands(ctx context.Context, params *ListBrandsInput, optFns ...func(*Options)) (*ListBrandsOutput, error) { + if params == nil { + params = &ListBrandsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListBrands", params, optFns, c.addOperationListBrandsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListBrandsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListBrandsInput struct { + + // The ID of the Amazon Web Services account that owns the brands that you want to + // list. + // + // This member is required. + AwsAccountId *string + + // The maximum number of results to be returned in a single request. + MaxResults *int32 + + // The token for the next set of results, or null if there are no more results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListBrandsOutput struct { + + // A list of all brands in your Amazon Web Services account. This structure + // provides basic information about each brand. + Brands []types.BrandSummary + + // The token for the next set of results, or null if there are no more results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListBrandsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListBrands{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListBrands{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListBrands"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpListBrandsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBrands(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListBrandsPaginatorOptions is the paginator options for ListBrands +type ListBrandsPaginatorOptions struct { + // The maximum number of results to be returned in a single request. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListBrandsPaginator is a paginator for ListBrands +type ListBrandsPaginator struct { + options ListBrandsPaginatorOptions + client ListBrandsAPIClient + params *ListBrandsInput + nextToken *string + firstPage bool +} + +// NewListBrandsPaginator returns a new ListBrandsPaginator +func NewListBrandsPaginator(client ListBrandsAPIClient, params *ListBrandsInput, optFns ...func(*ListBrandsPaginatorOptions)) *ListBrandsPaginator { + if params == nil { + params = &ListBrandsInput{} + } + + options := ListBrandsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListBrandsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListBrandsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListBrands page. +func (p *ListBrandsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListBrandsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListBrands(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListBrandsAPIClient is a client that implements the ListBrands operation. +type ListBrandsAPIClient interface { + ListBrands(context.Context, *ListBrandsInput, ...func(*Options)) (*ListBrandsOutput, error) +} + +var _ ListBrandsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListBrands(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListBrands", + } +} diff --git a/service/quicksight/api_op_ListCustomPermissions.go b/service/quicksight/api_op_ListCustomPermissions.go new file mode 100644 index 00000000000..312ae9632ae --- /dev/null +++ b/service/quicksight/api_op_ListCustomPermissions.go @@ -0,0 +1,267 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of all the custom permissions profiles. +func (c *Client) ListCustomPermissions(ctx context.Context, params *ListCustomPermissionsInput, optFns ...func(*Options)) (*ListCustomPermissionsOutput, error) { + if params == nil { + params = &ListCustomPermissionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCustomPermissions", params, optFns, c.addOperationListCustomPermissionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCustomPermissionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListCustomPermissionsInput struct { + + // The ID of the Amazon Web Services account that contains the custom permissions + // profiles that you want to list. + // + // This member is required. + AwsAccountId *string + + // The maximum number of results to return. + MaxResults *int32 + + // The token for the next set of results, or null if there are no more results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListCustomPermissionsOutput struct { + + // A list of custom permissions profiles. + CustomPermissionsList []types.CustomPermissions + + // The token for the next set of results, or null if there are no more results. + NextToken *string + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The HTTP status of the request. + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCustomPermissionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListCustomPermissions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListCustomPermissions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListCustomPermissions"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpListCustomPermissionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCustomPermissions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListCustomPermissionsPaginatorOptions is the paginator options for +// ListCustomPermissions +type ListCustomPermissionsPaginatorOptions struct { + // The maximum number of results to return. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListCustomPermissionsPaginator is a paginator for ListCustomPermissions +type ListCustomPermissionsPaginator struct { + options ListCustomPermissionsPaginatorOptions + client ListCustomPermissionsAPIClient + params *ListCustomPermissionsInput + nextToken *string + firstPage bool +} + +// NewListCustomPermissionsPaginator returns a new ListCustomPermissionsPaginator +func NewListCustomPermissionsPaginator(client ListCustomPermissionsAPIClient, params *ListCustomPermissionsInput, optFns ...func(*ListCustomPermissionsPaginatorOptions)) *ListCustomPermissionsPaginator { + if params == nil { + params = &ListCustomPermissionsInput{} + } + + options := ListCustomPermissionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListCustomPermissionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListCustomPermissionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListCustomPermissions page. +func (p *ListCustomPermissionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCustomPermissionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListCustomPermissions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListCustomPermissionsAPIClient is a client that implements the +// ListCustomPermissions operation. +type ListCustomPermissionsAPIClient interface { + ListCustomPermissions(context.Context, *ListCustomPermissionsInput, ...func(*Options)) (*ListCustomPermissionsOutput, error) +} + +var _ ListCustomPermissionsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListCustomPermissions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListCustomPermissions", + } +} diff --git a/service/quicksight/api_op_UpdateBrand.go b/service/quicksight/api_op_UpdateBrand.go new file mode 100644 index 00000000000..85cbd91d4ed --- /dev/null +++ b/service/quicksight/api_op_UpdateBrand.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a brand. +func (c *Client) UpdateBrand(ctx context.Context, params *UpdateBrandInput, optFns ...func(*Options)) (*UpdateBrandOutput, error) { + if params == nil { + params = &UpdateBrandInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateBrand", params, optFns, c.addOperationUpdateBrandMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateBrandOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateBrandInput struct { + + // The ID of the Amazon Web Services account that owns the brand. + // + // This member is required. + AwsAccountId *string + + // The ID of the Amazon QuickSight brand. + // + // This member is required. + BrandId *string + + // The definition of the brand. + BrandDefinition *types.BrandDefinition + + noSmithyDocumentSerde +} + +type UpdateBrandOutput struct { + + // The definition of the brand. + BrandDefinition *types.BrandDefinition + + // The details of the brand. + BrandDetail *types.BrandDetail + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateBrandMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateBrand{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateBrand{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateBrand"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpUpdateBrandValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateBrand(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateBrand(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateBrand", + } +} diff --git a/service/quicksight/api_op_UpdateBrandAssignment.go b/service/quicksight/api_op_UpdateBrandAssignment.go new file mode 100644 index 00000000000..bb7aaad5e14 --- /dev/null +++ b/service/quicksight/api_op_UpdateBrandAssignment.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a brand assignment. +func (c *Client) UpdateBrandAssignment(ctx context.Context, params *UpdateBrandAssignmentInput, optFns ...func(*Options)) (*UpdateBrandAssignmentOutput, error) { + if params == nil { + params = &UpdateBrandAssignmentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateBrandAssignment", params, optFns, c.addOperationUpdateBrandAssignmentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateBrandAssignmentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateBrandAssignmentInput struct { + + // The ID of the Amazon Web Services account that owns the brand assignment. + // + // This member is required. + AwsAccountId *string + + // The Amazon Resource Name (ARN) of the brand. + // + // This member is required. + BrandArn *string + + noSmithyDocumentSerde +} + +type UpdateBrandAssignmentOutput struct { + + // The Amazon Resource Name (ARN) of the brand. + BrandArn *string + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateBrandAssignmentMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateBrandAssignment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateBrandAssignment{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateBrandAssignment"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpUpdateBrandAssignmentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateBrandAssignment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateBrandAssignment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateBrandAssignment", + } +} diff --git a/service/quicksight/api_op_UpdateBrandPublishedVersion.go b/service/quicksight/api_op_UpdateBrandPublishedVersion.go new file mode 100644 index 00000000000..9e78f15e224 --- /dev/null +++ b/service/quicksight/api_op_UpdateBrandPublishedVersion.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the published version of a brand. +func (c *Client) UpdateBrandPublishedVersion(ctx context.Context, params *UpdateBrandPublishedVersionInput, optFns ...func(*Options)) (*UpdateBrandPublishedVersionOutput, error) { + if params == nil { + params = &UpdateBrandPublishedVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateBrandPublishedVersion", params, optFns, c.addOperationUpdateBrandPublishedVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateBrandPublishedVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateBrandPublishedVersionInput struct { + + // The ID of the Amazon Web Services account that owns the brand. + // + // This member is required. + AwsAccountId *string + + // The ID of the Amazon QuickSight brand. + // + // This member is required. + BrandId *string + + // The ID of the published version. + // + // This member is required. + VersionId *string + + noSmithyDocumentSerde +} + +type UpdateBrandPublishedVersionOutput struct { + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The ID of the published version. + VersionId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateBrandPublishedVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateBrandPublishedVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateBrandPublishedVersion{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateBrandPublishedVersion"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpUpdateBrandPublishedVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateBrandPublishedVersion(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateBrandPublishedVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateBrandPublishedVersion", + } +} diff --git a/service/quicksight/api_op_UpdateCustomPermissions.go b/service/quicksight/api_op_UpdateCustomPermissions.go new file mode 100644 index 00000000000..f6f9c19e9ea --- /dev/null +++ b/service/quicksight/api_op_UpdateCustomPermissions.go @@ -0,0 +1,172 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a custom permissions profile. +func (c *Client) UpdateCustomPermissions(ctx context.Context, params *UpdateCustomPermissionsInput, optFns ...func(*Options)) (*UpdateCustomPermissionsOutput, error) { + if params == nil { + params = &UpdateCustomPermissionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateCustomPermissions", params, optFns, c.addOperationUpdateCustomPermissionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateCustomPermissionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateCustomPermissionsInput struct { + + // The ID of the Amazon Web Services account that contains the custom permissions + // profile that you want to update. + // + // This member is required. + AwsAccountId *string + + // The name of the custom permissions profile that you want to update. + // + // This member is required. + CustomPermissionsName *string + + // A set of actions to include in the custom permissions profile. + Capabilities *types.Capabilities + + noSmithyDocumentSerde +} + +type UpdateCustomPermissionsOutput struct { + + // The Amazon Resource Name (ARN) of the custom permissions profile. + Arn *string + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The HTTP status of the request. + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateCustomPermissionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateCustomPermissions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateCustomPermissions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateCustomPermissions"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpUpdateCustomPermissionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateCustomPermissions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateCustomPermissions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateCustomPermissions", + } +} diff --git a/service/quicksight/api_op_UpdateUserCustomPermission.go b/service/quicksight/api_op_UpdateUserCustomPermission.go new file mode 100644 index 00000000000..21c57ebc294 --- /dev/null +++ b/service/quicksight/api_op_UpdateUserCustomPermission.go @@ -0,0 +1,175 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a custom permissions profile for a user. +func (c *Client) UpdateUserCustomPermission(ctx context.Context, params *UpdateUserCustomPermissionInput, optFns ...func(*Options)) (*UpdateUserCustomPermissionOutput, error) { + if params == nil { + params = &UpdateUserCustomPermissionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateUserCustomPermission", params, optFns, c.addOperationUpdateUserCustomPermissionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateUserCustomPermissionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateUserCustomPermissionInput struct { + + // The ID of the Amazon Web Services account that contains the custom permission + // configuration that you want to update. + // + // This member is required. + AwsAccountId *string + + // The name of the custom permissions that you want to update. + // + // This member is required. + CustomPermissionsName *string + + // The namespace that the user belongs to. + // + // This member is required. + Namespace *string + + // The username of the user that you want to update custom permissions for. + // + // This member is required. + UserName *string + + noSmithyDocumentSerde +} + +type UpdateUserCustomPermissionOutput struct { + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The HTTP status of the request. + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateUserCustomPermissionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateUserCustomPermission{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateUserCustomPermission{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateUserCustomPermission"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpUpdateUserCustomPermissionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateUserCustomPermission(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateUserCustomPermission(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateUserCustomPermission", + } +} diff --git a/service/quicksight/deserializers.go b/service/quicksight/deserializers.go index 324d29d2351..dc6a5222289 100644 --- a/service/quicksight/deserializers.go +++ b/service/quicksight/deserializers.go @@ -1296,14 +1296,14 @@ func awsRestjson1_deserializeOpDocumentCreateAnalysisOutput(v **CreateAnalysisOu return nil } -type awsRestjson1_deserializeOpCreateDashboard struct { +type awsRestjson1_deserializeOpCreateBrand struct { } -func (*awsRestjson1_deserializeOpCreateDashboard) ID() string { +func (*awsRestjson1_deserializeOpCreateBrand) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateDashboard) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateBrand) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1321,16 +1321,11 @@ func (m *awsRestjson1_deserializeOpCreateDashboard) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateDashboard(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateBrand(response, &metadata) } - output := &CreateDashboardOutput{} + output := &CreateBrandOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateDashboardOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1349,7 +1344,7 @@ func (m *awsRestjson1_deserializeOpCreateDashboard) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateDashboardOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateBrandOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1363,7 +1358,7 @@ func (m *awsRestjson1_deserializeOpCreateDashboard) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateDashboard(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateBrand(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1404,30 +1399,24 @@ func awsRestjson1_deserializeOpErrorCreateDashboard(response *smithyhttp.Respons } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): - return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1438,16 +1427,7 @@ func awsRestjson1_deserializeOpErrorCreateDashboard(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpHttpBindingsCreateDashboardOutput(v *CreateDashboardOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - v.Status = int32(response.StatusCode) - - return nil -} -func awsRestjson1_deserializeOpDocumentCreateDashboardOutput(v **CreateDashboardOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateBrandOutput(v **CreateBrandOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1460,40 +1440,23 @@ func awsRestjson1_deserializeOpDocumentCreateDashboardOutput(v **CreateDashboard return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateDashboardOutput + var sv *CreateBrandOutput if *v == nil { - sv = &CreateDashboardOutput{} + sv = &CreateBrandOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "CreationStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) - } - sv.CreationStatus = types.ResourceStatus(jtv) + case "BrandDefinition": + if err := awsRestjson1_deserializeDocumentBrandDefinition(&sv.BrandDefinition, value); err != nil { + return err } - case "DashboardId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.DashboardId = ptr.String(jtv) + case "BrandDetail": + if err := awsRestjson1_deserializeDocumentBrandDetail(&sv.BrandDetail, value); err != nil { + return err } case "RequestId": @@ -1505,15 +1468,6 @@ func awsRestjson1_deserializeOpDocumentCreateDashboardOutput(v **CreateDashboard sv.RequestId = ptr.String(jtv) } - case "VersionArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.VersionArn = ptr.String(jtv) - } - default: _, _ = key, value @@ -1523,14 +1477,14 @@ func awsRestjson1_deserializeOpDocumentCreateDashboardOutput(v **CreateDashboard return nil } -type awsRestjson1_deserializeOpCreateDataSet struct { +type awsRestjson1_deserializeOpCreateCustomPermissions struct { } -func (*awsRestjson1_deserializeOpCreateDataSet) ID() string { +func (*awsRestjson1_deserializeOpCreateCustomPermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateDataSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateCustomPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1548,16 +1502,11 @@ func (m *awsRestjson1_deserializeOpCreateDataSet) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateDataSet(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateCustomPermissions(response, &metadata) } - output := &CreateDataSetOutput{} + output := &CreateCustomPermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateDataSetOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1576,7 +1525,7 @@ func (m *awsRestjson1_deserializeOpCreateDataSet) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateDataSetOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateCustomPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1590,7 +1539,7 @@ func (m *awsRestjson1_deserializeOpCreateDataSet) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateDataSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateCustomPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1646,18 +1595,21 @@ func awsRestjson1_deserializeOpErrorCreateDataSet(response *smithyhttp.Response, case strings.EqualFold("LimitExceededException", errorCode): return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1668,16 +1620,7 @@ func awsRestjson1_deserializeOpErrorCreateDataSet(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsCreateDataSetOutput(v *CreateDataSetOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - v.Status = int32(response.StatusCode) - - return nil -} -func awsRestjson1_deserializeOpDocumentCreateDataSetOutput(v **CreateDataSetOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateCustomPermissionsOutput(v **CreateCustomPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1690,9 +1633,9 @@ func awsRestjson1_deserializeOpDocumentCreateDataSetOutput(v **CreateDataSetOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateDataSetOutput + var sv *CreateCustomPermissionsOutput if *v == nil { - sv = &CreateDataSetOutput{} + sv = &CreateCustomPermissionsOutput{} } else { sv = *v } @@ -1708,40 +1651,26 @@ func awsRestjson1_deserializeOpDocumentCreateDataSetOutput(v **CreateDataSetOutp sv.Arn = ptr.String(jtv) } - case "DataSetId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) - } - sv.DataSetId = ptr.String(jtv) - } - - case "IngestionArn": + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.IngestionArn = ptr.String(jtv) + sv.RequestId = ptr.String(jtv) } - case "IngestionId": + case "Status": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) } - sv.IngestionId = ptr.String(jtv) - } - - case "RequestId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + i64, err := jtv.Int64() + if err != nil { + return err } - sv.RequestId = ptr.String(jtv) + sv.Status = int32(i64) } default: @@ -1753,14 +1682,14 @@ func awsRestjson1_deserializeOpDocumentCreateDataSetOutput(v **CreateDataSetOutp return nil } -type awsRestjson1_deserializeOpCreateDataSource struct { +type awsRestjson1_deserializeOpCreateDashboard struct { } -func (*awsRestjson1_deserializeOpCreateDataSource) ID() string { +func (*awsRestjson1_deserializeOpCreateDashboard) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateDashboard) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1778,12 +1707,12 @@ func (m *awsRestjson1_deserializeOpCreateDataSource) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateDataSource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateDashboard(response, &metadata) } - output := &CreateDataSourceOutput{} + output := &CreateDashboardOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateDataSourceOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateDashboardOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -1806,7 +1735,7 @@ func (m *awsRestjson1_deserializeOpCreateDataSource) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateDataSourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateDashboardOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1820,7 +1749,7 @@ func (m *awsRestjson1_deserializeOpCreateDataSource) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateDashboard(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1861,15 +1790,9 @@ func awsRestjson1_deserializeOpErrorCreateDataSource(response *smithyhttp.Respon } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("CustomerManagedKeyUnavailableException", errorCode): - return awsRestjson1_deserializeErrorCustomerManagedKeyUnavailableException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -1888,6 +1811,9 @@ func awsRestjson1_deserializeOpErrorCreateDataSource(response *smithyhttp.Respon case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1898,7 +1824,7 @@ func awsRestjson1_deserializeOpErrorCreateDataSource(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpHttpBindingsCreateDataSourceOutput(v *CreateDataSourceOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsCreateDashboardOutput(v *CreateDashboardOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -1907,7 +1833,7 @@ func awsRestjson1_deserializeOpHttpBindingsCreateDataSourceOutput(v *CreateDataS return nil } -func awsRestjson1_deserializeOpDocumentCreateDataSourceOutput(v **CreateDataSourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateDashboardOutput(v **CreateDashboardOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1920,9 +1846,9 @@ func awsRestjson1_deserializeOpDocumentCreateDataSourceOutput(v **CreateDataSour return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateDataSourceOutput + var sv *CreateDashboardOutput if *v == nil { - sv = &CreateDataSourceOutput{} + sv = &CreateDashboardOutput{} } else { sv = *v } @@ -1947,13 +1873,13 @@ func awsRestjson1_deserializeOpDocumentCreateDataSourceOutput(v **CreateDataSour sv.CreationStatus = types.ResourceStatus(jtv) } - case "DataSourceId": + case "DashboardId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) } - sv.DataSourceId = ptr.String(jtv) + sv.DashboardId = ptr.String(jtv) } case "RequestId": @@ -1965,6 +1891,15 @@ func awsRestjson1_deserializeOpDocumentCreateDataSourceOutput(v **CreateDataSour sv.RequestId = ptr.String(jtv) } + case "VersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.VersionArn = ptr.String(jtv) + } + default: _, _ = key, value @@ -1974,14 +1909,14 @@ func awsRestjson1_deserializeOpDocumentCreateDataSourceOutput(v **CreateDataSour return nil } -type awsRestjson1_deserializeOpCreateFolder struct { +type awsRestjson1_deserializeOpCreateDataSet struct { } -func (*awsRestjson1_deserializeOpCreateFolder) ID() string { +func (*awsRestjson1_deserializeOpCreateDataSet) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateFolder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateDataSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1999,12 +1934,12 @@ func (m *awsRestjson1_deserializeOpCreateFolder) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateFolder(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateDataSet(response, &metadata) } - output := &CreateFolderOutput{} + output := &CreateDataSetOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateFolderOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateDataSetOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -2027,7 +1962,7 @@ func (m *awsRestjson1_deserializeOpCreateFolder) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateFolderOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateDataSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2041,7 +1976,7 @@ func (m *awsRestjson1_deserializeOpCreateFolder) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateFolder(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateDataSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2119,7 +2054,7 @@ func awsRestjson1_deserializeOpErrorCreateFolder(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsCreateFolderOutput(v *CreateFolderOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsCreateDataSetOutput(v *CreateDataSetOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -2128,7 +2063,7 @@ func awsRestjson1_deserializeOpHttpBindingsCreateFolderOutput(v *CreateFolderOut return nil } -func awsRestjson1_deserializeOpDocumentCreateFolderOutput(v **CreateFolderOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateDataSetOutput(v **CreateDataSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2141,9 +2076,9 @@ func awsRestjson1_deserializeOpDocumentCreateFolderOutput(v **CreateFolderOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateFolderOutput + var sv *CreateDataSetOutput if *v == nil { - sv = &CreateFolderOutput{} + sv = &CreateDataSetOutput{} } else { sv = *v } @@ -2159,13 +2094,31 @@ func awsRestjson1_deserializeOpDocumentCreateFolderOutput(v **CreateFolderOutput sv.Arn = ptr.String(jtv) } - case "FolderId": + case "DataSetId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } - sv.FolderId = ptr.String(jtv) + sv.DataSetId = ptr.String(jtv) + } + + case "IngestionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.IngestionArn = ptr.String(jtv) + } + + case "IngestionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.IngestionId = ptr.String(jtv) } case "RequestId": @@ -2186,14 +2139,14 @@ func awsRestjson1_deserializeOpDocumentCreateFolderOutput(v **CreateFolderOutput return nil } -type awsRestjson1_deserializeOpCreateFolderMembership struct { +type awsRestjson1_deserializeOpCreateDataSource struct { } -func (*awsRestjson1_deserializeOpCreateFolderMembership) ID() string { +func (*awsRestjson1_deserializeOpCreateDataSource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateFolderMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2211,11 +2164,16 @@ func (m *awsRestjson1_deserializeOpCreateFolderMembership) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateFolderMembership(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateDataSource(response, &metadata) } - output := &CreateFolderMembershipOutput{} + output := &CreateDataSourceOutput{} out.Result = output + err = awsRestjson1_deserializeOpHttpBindingsCreateDataSourceOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2234,7 +2192,7 @@ func (m *awsRestjson1_deserializeOpCreateFolderMembership) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateFolderMembershipOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateDataSourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2248,7 +2206,7 @@ func (m *awsRestjson1_deserializeOpCreateFolderMembership) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateFolderMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2292,6 +2250,12 @@ func awsRestjson1_deserializeOpErrorCreateFolderMembership(response *smithyhttp. case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("CustomerManagedKeyUnavailableException", errorCode): + return awsRestjson1_deserializeErrorCustomerManagedKeyUnavailableException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -2310,9 +2274,6 @@ func awsRestjson1_deserializeOpErrorCreateFolderMembership(response *smithyhttp. case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2323,7 +2284,16 @@ func awsRestjson1_deserializeOpErrorCreateFolderMembership(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentCreateFolderMembershipOutput(v **CreateFolderMembershipOutput, value interface{}) error { +func awsRestjson1_deserializeOpHttpBindingsCreateDataSourceOutput(v *CreateDataSourceOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentCreateDataSourceOutput(v **CreateDataSourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2336,40 +2306,49 @@ func awsRestjson1_deserializeOpDocumentCreateFolderMembershipOutput(v **CreateFo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateFolderMembershipOutput + var sv *CreateDataSourceOutput if *v == nil { - sv = &CreateFolderMembershipOutput{} + sv = &CreateDataSourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "FolderMember": - if err := awsRestjson1_deserializeDocumentFolderMember(&sv.FolderMember, value); err != nil { - return err + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) } - case "RequestId": + case "CreationStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.CreationStatus = types.ResourceStatus(jtv) } - case "Status": + case "DataSourceId": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } - i64, err := jtv.Int64() - if err != nil { - return err + sv.DataSourceId = ptr.String(jtv) + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Status = int32(i64) + sv.RequestId = ptr.String(jtv) } default: @@ -2381,14 +2360,14 @@ func awsRestjson1_deserializeOpDocumentCreateFolderMembershipOutput(v **CreateFo return nil } -type awsRestjson1_deserializeOpCreateGroup struct { +type awsRestjson1_deserializeOpCreateFolder struct { } -func (*awsRestjson1_deserializeOpCreateGroup) ID() string { +func (*awsRestjson1_deserializeOpCreateFolder) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateFolder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2406,12 +2385,12 @@ func (m *awsRestjson1_deserializeOpCreateGroup) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateGroup(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateFolder(response, &metadata) } - output := &CreateGroupOutput{} + output := &CreateFolderOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateGroupOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateFolderOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -2434,7 +2413,7 @@ func (m *awsRestjson1_deserializeOpCreateGroup) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateGroupOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateFolderOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2448,7 +2427,7 @@ func (m *awsRestjson1_deserializeOpCreateGroup) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateFolder(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2492,6 +2471,9 @@ func awsRestjson1_deserializeOpErrorCreateGroup(response *smithyhttp.Response, m case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -2501,21 +2483,18 @@ func awsRestjson1_deserializeOpErrorCreateGroup(response *smithyhttp.Response, m case strings.EqualFold("LimitExceededException", errorCode): return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2526,7 +2505,7 @@ func awsRestjson1_deserializeOpErrorCreateGroup(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpHttpBindingsCreateGroupOutput(v *CreateGroupOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsCreateFolderOutput(v *CreateFolderOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -2535,7 +2514,7 @@ func awsRestjson1_deserializeOpHttpBindingsCreateGroupOutput(v *CreateGroupOutpu return nil } -func awsRestjson1_deserializeOpDocumentCreateGroupOutput(v **CreateGroupOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateFolderOutput(v **CreateFolderOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2548,18 +2527,31 @@ func awsRestjson1_deserializeOpDocumentCreateGroupOutput(v **CreateGroupOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateGroupOutput + var sv *CreateFolderOutput if *v == nil { - sv = &CreateGroupOutput{} + sv = &CreateFolderOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Group": - if err := awsRestjson1_deserializeDocumentGroup(&sv.Group, value); err != nil { - return err + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "FolderId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RestrictiveResourceId to be of type string, got %T instead", value) + } + sv.FolderId = ptr.String(jtv) } case "RequestId": @@ -2580,14 +2572,14 @@ func awsRestjson1_deserializeOpDocumentCreateGroupOutput(v **CreateGroupOutput, return nil } -type awsRestjson1_deserializeOpCreateGroupMembership struct { +type awsRestjson1_deserializeOpCreateFolderMembership struct { } -func (*awsRestjson1_deserializeOpCreateGroupMembership) ID() string { +func (*awsRestjson1_deserializeOpCreateFolderMembership) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateGroupMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateFolderMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2605,16 +2597,11 @@ func (m *awsRestjson1_deserializeOpCreateGroupMembership) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateGroupMembership(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateFolderMembership(response, &metadata) } - output := &CreateGroupMembershipOutput{} + output := &CreateFolderMembershipOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateGroupMembershipOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2633,7 +2620,7 @@ func (m *awsRestjson1_deserializeOpCreateGroupMembership) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateGroupMembershipOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateFolderMembershipOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2647,7 +2634,7 @@ func (m *awsRestjson1_deserializeOpCreateGroupMembership) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateGroupMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateFolderMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2697,18 +2684,21 @@ func awsRestjson1_deserializeOpErrorCreateGroupMembership(response *smithyhttp.R case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2719,16 +2709,7 @@ func awsRestjson1_deserializeOpErrorCreateGroupMembership(response *smithyhttp.R } } -func awsRestjson1_deserializeOpHttpBindingsCreateGroupMembershipOutput(v *CreateGroupMembershipOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - v.Status = int32(response.StatusCode) - - return nil -} -func awsRestjson1_deserializeOpDocumentCreateGroupMembershipOutput(v **CreateGroupMembershipOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateFolderMembershipOutput(v **CreateFolderMembershipOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2741,17 +2722,17 @@ func awsRestjson1_deserializeOpDocumentCreateGroupMembershipOutput(v **CreateGro return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateGroupMembershipOutput + var sv *CreateFolderMembershipOutput if *v == nil { - sv = &CreateGroupMembershipOutput{} + sv = &CreateFolderMembershipOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "GroupMember": - if err := awsRestjson1_deserializeDocumentGroupMember(&sv.GroupMember, value); err != nil { + case "FolderMember": + if err := awsRestjson1_deserializeDocumentFolderMember(&sv.FolderMember, value); err != nil { return err } @@ -2764,6 +2745,19 @@ func awsRestjson1_deserializeOpDocumentCreateGroupMembershipOutput(v **CreateGro sv.RequestId = ptr.String(jtv) } + case "Status": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Status = int32(i64) + } + default: _, _ = key, value @@ -2773,14 +2767,14 @@ func awsRestjson1_deserializeOpDocumentCreateGroupMembershipOutput(v **CreateGro return nil } -type awsRestjson1_deserializeOpCreateIAMPolicyAssignment struct { +type awsRestjson1_deserializeOpCreateGroup struct { } -func (*awsRestjson1_deserializeOpCreateIAMPolicyAssignment) ID() string { +func (*awsRestjson1_deserializeOpCreateGroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateIAMPolicyAssignment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2798,12 +2792,12 @@ func (m *awsRestjson1_deserializeOpCreateIAMPolicyAssignment) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateIAMPolicyAssignment(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateGroup(response, &metadata) } - output := &CreateIAMPolicyAssignmentOutput{} + output := &CreateGroupOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateIAMPolicyAssignmentOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateGroupOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -2826,7 +2820,7 @@ func (m *awsRestjson1_deserializeOpCreateIAMPolicyAssignment) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateIAMPolicyAssignmentOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2840,7 +2834,7 @@ func (m *awsRestjson1_deserializeOpCreateIAMPolicyAssignment) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateIAMPolicyAssignment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2884,21 +2878,27 @@ func awsRestjson1_deserializeOpErrorCreateIAMPolicyAssignment(response *smithyht case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConcurrentUpdatingException", errorCode): - return awsRestjson1_deserializeErrorConcurrentUpdatingException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -2912,7 +2912,7 @@ func awsRestjson1_deserializeOpErrorCreateIAMPolicyAssignment(response *smithyht } } -func awsRestjson1_deserializeOpHttpBindingsCreateIAMPolicyAssignmentOutput(v *CreateIAMPolicyAssignmentOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsCreateGroupOutput(v *CreateGroupOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -2921,7 +2921,7 @@ func awsRestjson1_deserializeOpHttpBindingsCreateIAMPolicyAssignmentOutput(v *Cr return nil } -func awsRestjson1_deserializeOpDocumentCreateIAMPolicyAssignmentOutput(v **CreateIAMPolicyAssignmentOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateGroupOutput(v **CreateGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2934,56 +2934,20 @@ func awsRestjson1_deserializeOpDocumentCreateIAMPolicyAssignmentOutput(v **Creat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateIAMPolicyAssignmentOutput + var sv *CreateGroupOutput if *v == nil { - sv = &CreateIAMPolicyAssignmentOutput{} + sv = &CreateGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AssignmentId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.AssignmentId = ptr.String(jtv) - } - - case "AssignmentName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected IAMPolicyAssignmentName to be of type string, got %T instead", value) - } - sv.AssignmentName = ptr.String(jtv) - } - - case "AssignmentStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AssignmentStatus to be of type string, got %T instead", value) - } - sv.AssignmentStatus = types.AssignmentStatus(jtv) - } - - case "Identities": - if err := awsRestjson1_deserializeDocumentIdentityMap(&sv.Identities, value); err != nil { + case "Group": + if err := awsRestjson1_deserializeDocumentGroup(&sv.Group, value); err != nil { return err } - case "PolicyArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.PolicyArn = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -3002,14 +2966,14 @@ func awsRestjson1_deserializeOpDocumentCreateIAMPolicyAssignmentOutput(v **Creat return nil } -type awsRestjson1_deserializeOpCreateIngestion struct { +type awsRestjson1_deserializeOpCreateGroupMembership struct { } -func (*awsRestjson1_deserializeOpCreateIngestion) ID() string { +func (*awsRestjson1_deserializeOpCreateGroupMembership) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateIngestion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateGroupMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3027,12 +2991,12 @@ func (m *awsRestjson1_deserializeOpCreateIngestion) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateIngestion(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateGroupMembership(response, &metadata) } - output := &CreateIngestionOutput{} + output := &CreateGroupMembershipOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateIngestionOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateGroupMembershipOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -3055,7 +3019,7 @@ func (m *awsRestjson1_deserializeOpCreateIngestion) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateIngestionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateGroupMembershipOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3069,7 +3033,7 @@ func (m *awsRestjson1_deserializeOpCreateIngestion) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateIngestion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateGroupMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3119,15 +3083,15 @@ func awsRestjson1_deserializeOpErrorCreateIngestion(response *smithyhttp.Respons case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -3141,7 +3105,7 @@ func awsRestjson1_deserializeOpErrorCreateIngestion(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpHttpBindingsCreateIngestionOutput(v *CreateIngestionOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsCreateGroupMembershipOutput(v *CreateGroupMembershipOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -3150,7 +3114,7 @@ func awsRestjson1_deserializeOpHttpBindingsCreateIngestionOutput(v *CreateIngest return nil } -func awsRestjson1_deserializeOpDocumentCreateIngestionOutput(v **CreateIngestionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateGroupMembershipOutput(v **CreateGroupMembershipOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3163,40 +3127,18 @@ func awsRestjson1_deserializeOpDocumentCreateIngestionOutput(v **CreateIngestion return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateIngestionOutput + var sv *CreateGroupMembershipOutput if *v == nil { - sv = &CreateIngestionOutput{} + sv = &CreateGroupMembershipOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "IngestionId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected IngestionId to be of type string, got %T instead", value) - } - sv.IngestionId = ptr.String(jtv) - } - - case "IngestionStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected IngestionStatus to be of type string, got %T instead", value) - } - sv.IngestionStatus = types.IngestionStatus(jtv) + case "GroupMember": + if err := awsRestjson1_deserializeDocumentGroupMember(&sv.GroupMember, value); err != nil { + return err } case "RequestId": @@ -3217,14 +3159,14 @@ func awsRestjson1_deserializeOpDocumentCreateIngestionOutput(v **CreateIngestion return nil } -type awsRestjson1_deserializeOpCreateNamespace struct { +type awsRestjson1_deserializeOpCreateIAMPolicyAssignment struct { } -func (*awsRestjson1_deserializeOpCreateNamespace) ID() string { +func (*awsRestjson1_deserializeOpCreateIAMPolicyAssignment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateNamespace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateIAMPolicyAssignment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3242,12 +3184,12 @@ func (m *awsRestjson1_deserializeOpCreateNamespace) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateNamespace(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateIAMPolicyAssignment(response, &metadata) } - output := &CreateNamespaceOutput{} + output := &CreateIAMPolicyAssignmentOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateNamespaceOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateIAMPolicyAssignmentOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -3270,7 +3212,7 @@ func (m *awsRestjson1_deserializeOpCreateNamespace) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateNamespaceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateIAMPolicyAssignmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3284,7 +3226,7 @@ func (m *awsRestjson1_deserializeOpCreateNamespace) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateNamespace(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateIAMPolicyAssignment(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3328,8 +3270,8 @@ func awsRestjson1_deserializeOpErrorCreateNamespace(response *smithyhttp.Respons case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ConcurrentUpdatingException", errorCode): + return awsRestjson1_deserializeErrorConcurrentUpdatingException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -3337,21 +3279,12 @@ func awsRestjson1_deserializeOpErrorCreateNamespace(response *smithyhttp.Respons case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -3365,7 +3298,7 @@ func awsRestjson1_deserializeOpErrorCreateNamespace(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpHttpBindingsCreateNamespaceOutput(v *CreateNamespaceOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsCreateIAMPolicyAssignmentOutput(v *CreateIAMPolicyAssignmentOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -3374,7 +3307,7 @@ func awsRestjson1_deserializeOpHttpBindingsCreateNamespaceOutput(v *CreateNamesp return nil } -func awsRestjson1_deserializeOpDocumentCreateNamespaceOutput(v **CreateNamespaceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateIAMPolicyAssignmentOutput(v **CreateIAMPolicyAssignmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3387,58 +3320,54 @@ func awsRestjson1_deserializeOpDocumentCreateNamespaceOutput(v **CreateNamespace return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateNamespaceOutput + var sv *CreateIAMPolicyAssignmentOutput if *v == nil { - sv = &CreateNamespaceOutput{} + sv = &CreateIAMPolicyAssignmentOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": + case "AssignmentId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Arn = ptr.String(jtv) + sv.AssignmentId = ptr.String(jtv) } - case "CapacityRegion": + case "AssignmentName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected IAMPolicyAssignmentName to be of type string, got %T instead", value) } - sv.CapacityRegion = ptr.String(jtv) + sv.AssignmentName = ptr.String(jtv) } - case "CreationStatus": + case "AssignmentStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NamespaceStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected AssignmentStatus to be of type string, got %T instead", value) } - sv.CreationStatus = types.NamespaceStatus(jtv) + sv.AssignmentStatus = types.AssignmentStatus(jtv) } - case "IdentityStore": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected IdentityStore to be of type string, got %T instead", value) - } - sv.IdentityStore = types.IdentityStore(jtv) + case "Identities": + if err := awsRestjson1_deserializeDocumentIdentityMap(&sv.Identities, value); err != nil { + return err } - case "Name": + case "PolicyArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Namespace to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.PolicyArn = ptr.String(jtv) } case "RequestId": @@ -3459,14 +3388,14 @@ func awsRestjson1_deserializeOpDocumentCreateNamespaceOutput(v **CreateNamespace return nil } -type awsRestjson1_deserializeOpCreateRefreshSchedule struct { +type awsRestjson1_deserializeOpCreateIngestion struct { } -func (*awsRestjson1_deserializeOpCreateRefreshSchedule) ID() string { +func (*awsRestjson1_deserializeOpCreateIngestion) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateRefreshSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateIngestion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3484,12 +3413,12 @@ func (m *awsRestjson1_deserializeOpCreateRefreshSchedule) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateRefreshSchedule(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateIngestion(response, &metadata) } - output := &CreateRefreshScheduleOutput{} + output := &CreateIngestionOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateRefreshScheduleOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateIngestionOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -3512,7 +3441,7 @@ func (m *awsRestjson1_deserializeOpCreateRefreshSchedule) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateRefreshScheduleOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateIngestionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3526,7 +3455,7 @@ func (m *awsRestjson1_deserializeOpCreateRefreshSchedule) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateRefreshSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateIngestion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3579,9 +3508,6 @@ func awsRestjson1_deserializeOpErrorCreateRefreshSchedule(response *smithyhttp.R case strings.EqualFold("LimitExceededException", errorCode): return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) @@ -3601,7 +3527,7 @@ func awsRestjson1_deserializeOpErrorCreateRefreshSchedule(response *smithyhttp.R } } -func awsRestjson1_deserializeOpHttpBindingsCreateRefreshScheduleOutput(v *CreateRefreshScheduleOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsCreateIngestionOutput(v *CreateIngestionOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -3610,7 +3536,7 @@ func awsRestjson1_deserializeOpHttpBindingsCreateRefreshScheduleOutput(v *Create return nil } -func awsRestjson1_deserializeOpDocumentCreateRefreshScheduleOutput(v **CreateRefreshScheduleOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateIngestionOutput(v **CreateIngestionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3623,9 +3549,9 @@ func awsRestjson1_deserializeOpDocumentCreateRefreshScheduleOutput(v **CreateRef return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateRefreshScheduleOutput + var sv *CreateIngestionOutput if *v == nil { - sv = &CreateRefreshScheduleOutput{} + sv = &CreateIngestionOutput{} } else { sv = *v } @@ -3641,22 +3567,31 @@ func awsRestjson1_deserializeOpDocumentCreateRefreshScheduleOutput(v **CreateRef sv.Arn = ptr.String(jtv) } - case "RequestId": + case "IngestionId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected IngestionId to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.IngestionId = ptr.String(jtv) } - case "ScheduleId": + case "IngestionStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IngestionStatus to be of type string, got %T instead", value) + } + sv.IngestionStatus = types.IngestionStatus(jtv) + } + + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ScheduleId = ptr.String(jtv) + sv.RequestId = ptr.String(jtv) } default: @@ -3668,14 +3603,14 @@ func awsRestjson1_deserializeOpDocumentCreateRefreshScheduleOutput(v **CreateRef return nil } -type awsRestjson1_deserializeOpCreateRoleMembership struct { +type awsRestjson1_deserializeOpCreateNamespace struct { } -func (*awsRestjson1_deserializeOpCreateRoleMembership) ID() string { +func (*awsRestjson1_deserializeOpCreateNamespace) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateRoleMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateNamespace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3693,12 +3628,12 @@ func (m *awsRestjson1_deserializeOpCreateRoleMembership) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateRoleMembership(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateNamespace(response, &metadata) } - output := &CreateRoleMembershipOutput{} + output := &CreateNamespaceOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateRoleMembershipOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateNamespaceOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -3721,7 +3656,7 @@ func (m *awsRestjson1_deserializeOpCreateRoleMembership) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateRoleMembershipOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateNamespaceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3735,7 +3670,7 @@ func (m *awsRestjson1_deserializeOpCreateRoleMembership) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateRoleMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateNamespace(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3779,15 +3714,24 @@ func awsRestjson1_deserializeOpErrorCreateRoleMembership(response *smithyhttp.Re case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -3807,7 +3751,7 @@ func awsRestjson1_deserializeOpErrorCreateRoleMembership(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpHttpBindingsCreateRoleMembershipOutput(v *CreateRoleMembershipOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsCreateNamespaceOutput(v *CreateNamespaceOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -3816,7 +3760,7 @@ func awsRestjson1_deserializeOpHttpBindingsCreateRoleMembershipOutput(v *CreateR return nil } -func awsRestjson1_deserializeOpDocumentCreateRoleMembershipOutput(v **CreateRoleMembershipOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateNamespaceOutput(v **CreateNamespaceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3829,15 +3773,60 @@ func awsRestjson1_deserializeOpDocumentCreateRoleMembershipOutput(v **CreateRole return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateRoleMembershipOutput + var sv *CreateNamespaceOutput if *v == nil { - sv = &CreateRoleMembershipOutput{} + sv = &CreateNamespaceOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CapacityRegion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CapacityRegion = ptr.String(jtv) + } + + case "CreationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NamespaceStatus to be of type string, got %T instead", value) + } + sv.CreationStatus = types.NamespaceStatus(jtv) + } + + case "IdentityStore": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdentityStore to be of type string, got %T instead", value) + } + sv.IdentityStore = types.IdentityStore(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Namespace to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -3856,14 +3845,14 @@ func awsRestjson1_deserializeOpDocumentCreateRoleMembershipOutput(v **CreateRole return nil } -type awsRestjson1_deserializeOpCreateTemplate struct { +type awsRestjson1_deserializeOpCreateRefreshSchedule struct { } -func (*awsRestjson1_deserializeOpCreateTemplate) ID() string { +func (*awsRestjson1_deserializeOpCreateRefreshSchedule) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateRefreshSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3881,12 +3870,12 @@ func (m *awsRestjson1_deserializeOpCreateTemplate) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateTemplate(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateRefreshSchedule(response, &metadata) } - output := &CreateTemplateOutput{} + output := &CreateRefreshScheduleOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateTemplateOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateRefreshScheduleOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -3909,7 +3898,7 @@ func (m *awsRestjson1_deserializeOpCreateTemplate) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateTemplateOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateRefreshScheduleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3923,7 +3912,7 @@ func (m *awsRestjson1_deserializeOpCreateTemplate) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateRefreshSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3967,9 +3956,6 @@ func awsRestjson1_deserializeOpErrorCreateTemplate(response *smithyhttp.Response case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -3979,6 +3965,9 @@ func awsRestjson1_deserializeOpErrorCreateTemplate(response *smithyhttp.Response case strings.EqualFold("LimitExceededException", errorCode): return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) @@ -3988,9 +3977,6 @@ func awsRestjson1_deserializeOpErrorCreateTemplate(response *smithyhttp.Response case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4001,7 +3987,7 @@ func awsRestjson1_deserializeOpErrorCreateTemplate(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsCreateTemplateOutput(v *CreateTemplateOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsCreateRefreshScheduleOutput(v *CreateRefreshScheduleOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -4010,7 +3996,7 @@ func awsRestjson1_deserializeOpHttpBindingsCreateTemplateOutput(v *CreateTemplat return nil } -func awsRestjson1_deserializeOpDocumentCreateTemplateOutput(v **CreateTemplateOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateRefreshScheduleOutput(v **CreateRefreshScheduleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4023,9 +4009,9 @@ func awsRestjson1_deserializeOpDocumentCreateTemplateOutput(v **CreateTemplateOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateTemplateOutput + var sv *CreateRefreshScheduleOutput if *v == nil { - sv = &CreateTemplateOutput{} + sv = &CreateRefreshScheduleOutput{} } else { sv = *v } @@ -4041,15 +4027,6 @@ func awsRestjson1_deserializeOpDocumentCreateTemplateOutput(v **CreateTemplateOu sv.Arn = ptr.String(jtv) } - case "CreationStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) - } - sv.CreationStatus = types.ResourceStatus(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -4059,22 +4036,13 @@ func awsRestjson1_deserializeOpDocumentCreateTemplateOutput(v **CreateTemplateOu sv.RequestId = ptr.String(jtv) } - case "TemplateId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.TemplateId = ptr.String(jtv) - } - - case "VersionArn": + case "ScheduleId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.VersionArn = ptr.String(jtv) + sv.ScheduleId = ptr.String(jtv) } default: @@ -4086,14 +4054,14 @@ func awsRestjson1_deserializeOpDocumentCreateTemplateOutput(v **CreateTemplateOu return nil } -type awsRestjson1_deserializeOpCreateTemplateAlias struct { +type awsRestjson1_deserializeOpCreateRoleMembership struct { } -func (*awsRestjson1_deserializeOpCreateTemplateAlias) ID() string { +func (*awsRestjson1_deserializeOpCreateRoleMembership) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateTemplateAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateRoleMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4111,12 +4079,12 @@ func (m *awsRestjson1_deserializeOpCreateTemplateAlias) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateTemplateAlias(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateRoleMembership(response, &metadata) } - output := &CreateTemplateAliasOutput{} + output := &CreateRoleMembershipOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateTemplateAliasOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateRoleMembershipOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -4139,7 +4107,7 @@ func (m *awsRestjson1_deserializeOpCreateTemplateAlias) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateTemplateAliasOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateRoleMembershipOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4153,7 +4121,7 @@ func (m *awsRestjson1_deserializeOpCreateTemplateAlias) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateTemplateAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateRoleMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4194,27 +4162,27 @@ func awsRestjson1_deserializeOpErrorCreateTemplateAlias(response *smithyhttp.Res } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4225,7 +4193,7 @@ func awsRestjson1_deserializeOpErrorCreateTemplateAlias(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpHttpBindingsCreateTemplateAliasOutput(v *CreateTemplateAliasOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsCreateRoleMembershipOutput(v *CreateRoleMembershipOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -4234,7 +4202,7 @@ func awsRestjson1_deserializeOpHttpBindingsCreateTemplateAliasOutput(v *CreateTe return nil } -func awsRestjson1_deserializeOpDocumentCreateTemplateAliasOutput(v **CreateTemplateAliasOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateRoleMembershipOutput(v **CreateRoleMembershipOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4247,9 +4215,9 @@ func awsRestjson1_deserializeOpDocumentCreateTemplateAliasOutput(v **CreateTempl return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateTemplateAliasOutput + var sv *CreateRoleMembershipOutput if *v == nil { - sv = &CreateTemplateAliasOutput{} + sv = &CreateRoleMembershipOutput{} } else { sv = *v } @@ -4265,11 +4233,6 @@ func awsRestjson1_deserializeOpDocumentCreateTemplateAliasOutput(v **CreateTempl sv.RequestId = ptr.String(jtv) } - case "TemplateAlias": - if err := awsRestjson1_deserializeDocumentTemplateAlias(&sv.TemplateAlias, value); err != nil { - return err - } - default: _, _ = key, value @@ -4279,14 +4242,14 @@ func awsRestjson1_deserializeOpDocumentCreateTemplateAliasOutput(v **CreateTempl return nil } -type awsRestjson1_deserializeOpCreateTheme struct { +type awsRestjson1_deserializeOpCreateTemplate struct { } -func (*awsRestjson1_deserializeOpCreateTheme) ID() string { +func (*awsRestjson1_deserializeOpCreateTemplate) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateTheme) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4304,12 +4267,12 @@ func (m *awsRestjson1_deserializeOpCreateTheme) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateTheme(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateTemplate(response, &metadata) } - output := &CreateThemeOutput{} + output := &CreateTemplateOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateThemeOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateTemplateOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -4332,7 +4295,7 @@ func (m *awsRestjson1_deserializeOpCreateTheme) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateThemeOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateTemplateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4346,7 +4309,7 @@ func (m *awsRestjson1_deserializeOpCreateTheme) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateTheme(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4390,6 +4353,9 @@ func awsRestjson1_deserializeOpErrorCreateTheme(response *smithyhttp.Response, m case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -4421,7 +4387,7 @@ func awsRestjson1_deserializeOpErrorCreateTheme(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpHttpBindingsCreateThemeOutput(v *CreateThemeOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsCreateTemplateOutput(v *CreateTemplateOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -4430,7 +4396,7 @@ func awsRestjson1_deserializeOpHttpBindingsCreateThemeOutput(v *CreateThemeOutpu return nil } -func awsRestjson1_deserializeOpDocumentCreateThemeOutput(v **CreateThemeOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateTemplateOutput(v **CreateTemplateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4443,9 +4409,9 @@ func awsRestjson1_deserializeOpDocumentCreateThemeOutput(v **CreateThemeOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateThemeOutput + var sv *CreateTemplateOutput if *v == nil { - sv = &CreateThemeOutput{} + sv = &CreateTemplateOutput{} } else { sv = *v } @@ -4479,13 +4445,13 @@ func awsRestjson1_deserializeOpDocumentCreateThemeOutput(v **CreateThemeOutput, sv.RequestId = ptr.String(jtv) } - case "ThemeId": + case "TemplateId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) } - sv.ThemeId = ptr.String(jtv) + sv.TemplateId = ptr.String(jtv) } case "VersionArn": @@ -4506,14 +4472,14 @@ func awsRestjson1_deserializeOpDocumentCreateThemeOutput(v **CreateThemeOutput, return nil } -type awsRestjson1_deserializeOpCreateThemeAlias struct { +type awsRestjson1_deserializeOpCreateTemplateAlias struct { } -func (*awsRestjson1_deserializeOpCreateThemeAlias) ID() string { +func (*awsRestjson1_deserializeOpCreateTemplateAlias) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateThemeAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateTemplateAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4531,12 +4497,12 @@ func (m *awsRestjson1_deserializeOpCreateThemeAlias) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateThemeAlias(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateTemplateAlias(response, &metadata) } - output := &CreateThemeAliasOutput{} + output := &CreateTemplateAliasOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateThemeAliasOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateTemplateAliasOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -4559,7 +4525,7 @@ func (m *awsRestjson1_deserializeOpCreateThemeAlias) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateThemeAliasOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateTemplateAliasOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4573,7 +4539,7 @@ func (m *awsRestjson1_deserializeOpCreateThemeAlias) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateThemeAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateTemplateAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4620,9 +4586,6 @@ func awsRestjson1_deserializeOpErrorCreateThemeAlias(response *smithyhttp.Respon case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) @@ -4648,7 +4611,7 @@ func awsRestjson1_deserializeOpErrorCreateThemeAlias(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpHttpBindingsCreateThemeAliasOutput(v *CreateThemeAliasOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsCreateTemplateAliasOutput(v *CreateTemplateAliasOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -4657,7 +4620,7 @@ func awsRestjson1_deserializeOpHttpBindingsCreateThemeAliasOutput(v *CreateTheme return nil } -func awsRestjson1_deserializeOpDocumentCreateThemeAliasOutput(v **CreateThemeAliasOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateTemplateAliasOutput(v **CreateTemplateAliasOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4670,9 +4633,9 @@ func awsRestjson1_deserializeOpDocumentCreateThemeAliasOutput(v **CreateThemeAli return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateThemeAliasOutput + var sv *CreateTemplateAliasOutput if *v == nil { - sv = &CreateThemeAliasOutput{} + sv = &CreateTemplateAliasOutput{} } else { sv = *v } @@ -4688,8 +4651,8 @@ func awsRestjson1_deserializeOpDocumentCreateThemeAliasOutput(v **CreateThemeAli sv.RequestId = ptr.String(jtv) } - case "ThemeAlias": - if err := awsRestjson1_deserializeDocumentThemeAlias(&sv.ThemeAlias, value); err != nil { + case "TemplateAlias": + if err := awsRestjson1_deserializeDocumentTemplateAlias(&sv.TemplateAlias, value); err != nil { return err } @@ -4702,14 +4665,14 @@ func awsRestjson1_deserializeOpDocumentCreateThemeAliasOutput(v **CreateThemeAli return nil } -type awsRestjson1_deserializeOpCreateTopic struct { +type awsRestjson1_deserializeOpCreateTheme struct { } -func (*awsRestjson1_deserializeOpCreateTopic) ID() string { +func (*awsRestjson1_deserializeOpCreateTheme) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateTopic) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateTheme) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4727,12 +4690,12 @@ func (m *awsRestjson1_deserializeOpCreateTopic) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateTopic(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateTheme(response, &metadata) } - output := &CreateTopicOutput{} + output := &CreateThemeOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateTopicOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateThemeOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -4755,7 +4718,7 @@ func (m *awsRestjson1_deserializeOpCreateTopic) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateTopicOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateThemeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4769,7 +4732,7 @@ func (m *awsRestjson1_deserializeOpCreateTopic) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateTopic(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateTheme(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4813,9 +4776,6 @@ func awsRestjson1_deserializeOpErrorCreateTopic(response *smithyhttp.Response, m case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -4834,6 +4794,9 @@ func awsRestjson1_deserializeOpErrorCreateTopic(response *smithyhttp.Response, m case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4844,7 +4807,7 @@ func awsRestjson1_deserializeOpErrorCreateTopic(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpHttpBindingsCreateTopicOutput(v *CreateTopicOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsCreateThemeOutput(v *CreateThemeOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -4853,7 +4816,7 @@ func awsRestjson1_deserializeOpHttpBindingsCreateTopicOutput(v *CreateTopicOutpu return nil } -func awsRestjson1_deserializeOpDocumentCreateTopicOutput(v **CreateTopicOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateThemeOutput(v **CreateThemeOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4866,9 +4829,9 @@ func awsRestjson1_deserializeOpDocumentCreateTopicOutput(v **CreateTopicOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateTopicOutput + var sv *CreateThemeOutput if *v == nil { - sv = &CreateTopicOutput{} + sv = &CreateThemeOutput{} } else { sv = *v } @@ -4884,13 +4847,13 @@ func awsRestjson1_deserializeOpDocumentCreateTopicOutput(v **CreateTopicOutput, sv.Arn = ptr.String(jtv) } - case "RefreshArn": + case "CreationStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) } - sv.RefreshArn = ptr.String(jtv) + sv.CreationStatus = types.ResourceStatus(jtv) } case "RequestId": @@ -4902,13 +4865,22 @@ func awsRestjson1_deserializeOpDocumentCreateTopicOutput(v **CreateTopicOutput, sv.RequestId = ptr.String(jtv) } - case "TopicId": + case "ThemeId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TopicId to be of type string, got %T instead", value) + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) } - sv.TopicId = ptr.String(jtv) + sv.ThemeId = ptr.String(jtv) + } + + case "VersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.VersionArn = ptr.String(jtv) } default: @@ -4920,14 +4892,14 @@ func awsRestjson1_deserializeOpDocumentCreateTopicOutput(v **CreateTopicOutput, return nil } -type awsRestjson1_deserializeOpCreateTopicRefreshSchedule struct { +type awsRestjson1_deserializeOpCreateThemeAlias struct { } -func (*awsRestjson1_deserializeOpCreateTopicRefreshSchedule) ID() string { +func (*awsRestjson1_deserializeOpCreateThemeAlias) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateTopicRefreshSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateThemeAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4945,12 +4917,12 @@ func (m *awsRestjson1_deserializeOpCreateTopicRefreshSchedule) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateTopicRefreshSchedule(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateThemeAlias(response, &metadata) } - output := &CreateTopicRefreshScheduleOutput{} + output := &CreateThemeAliasOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateTopicRefreshScheduleOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateThemeAliasOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -4973,7 +4945,7 @@ func (m *awsRestjson1_deserializeOpCreateTopicRefreshSchedule) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateTopicRefreshScheduleOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateThemeAliasOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4987,7 +4959,7 @@ func (m *awsRestjson1_deserializeOpCreateTopicRefreshSchedule) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateTopicRefreshSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateThemeAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5028,9 +5000,6 @@ func awsRestjson1_deserializeOpErrorCreateTopicRefreshSchedule(response *smithyh } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) @@ -5052,6 +5021,9 @@ func awsRestjson1_deserializeOpErrorCreateTopicRefreshSchedule(response *smithyh case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -5062,7 +5034,7 @@ func awsRestjson1_deserializeOpErrorCreateTopicRefreshSchedule(response *smithyh } } -func awsRestjson1_deserializeOpHttpBindingsCreateTopicRefreshScheduleOutput(v *CreateTopicRefreshScheduleOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsCreateThemeAliasOutput(v *CreateThemeAliasOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -5071,7 +5043,7 @@ func awsRestjson1_deserializeOpHttpBindingsCreateTopicRefreshScheduleOutput(v *C return nil } -func awsRestjson1_deserializeOpDocumentCreateTopicRefreshScheduleOutput(v **CreateTopicRefreshScheduleOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateThemeAliasOutput(v **CreateThemeAliasOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5084,24 +5056,15 @@ func awsRestjson1_deserializeOpDocumentCreateTopicRefreshScheduleOutput(v **Crea return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateTopicRefreshScheduleOutput + var sv *CreateThemeAliasOutput if *v == nil { - sv = &CreateTopicRefreshScheduleOutput{} + sv = &CreateThemeAliasOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DatasetArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.DatasetArn = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -5111,22 +5074,9 @@ func awsRestjson1_deserializeOpDocumentCreateTopicRefreshScheduleOutput(v **Crea sv.RequestId = ptr.String(jtv) } - case "TopicArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.TopicArn = ptr.String(jtv) - } - - case "TopicId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TopicId to be of type string, got %T instead", value) - } - sv.TopicId = ptr.String(jtv) + case "ThemeAlias": + if err := awsRestjson1_deserializeDocumentThemeAlias(&sv.ThemeAlias, value); err != nil { + return err } default: @@ -5138,14 +5088,14 @@ func awsRestjson1_deserializeOpDocumentCreateTopicRefreshScheduleOutput(v **Crea return nil } -type awsRestjson1_deserializeOpCreateVPCConnection struct { +type awsRestjson1_deserializeOpCreateTopic struct { } -func (*awsRestjson1_deserializeOpCreateVPCConnection) ID() string { +func (*awsRestjson1_deserializeOpCreateTopic) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateVPCConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateTopic) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5163,12 +5113,12 @@ func (m *awsRestjson1_deserializeOpCreateVPCConnection) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateVPCConnection(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateTopic(response, &metadata) } - output := &CreateVPCConnectionOutput{} + output := &CreateTopicOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsCreateVPCConnectionOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateTopicOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -5191,7 +5141,7 @@ func (m *awsRestjson1_deserializeOpCreateVPCConnection) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateVPCConnectionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateTopicOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5205,7 +5155,7 @@ func (m *awsRestjson1_deserializeOpCreateVPCConnection) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateVPCConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateTopic(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5264,12 +5214,12 @@ func awsRestjson1_deserializeOpErrorCreateVPCConnection(response *smithyhttp.Res case strings.EqualFold("ResourceExistsException", errorCode): return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -5280,7 +5230,7 @@ func awsRestjson1_deserializeOpErrorCreateVPCConnection(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpHttpBindingsCreateVPCConnectionOutput(v *CreateVPCConnectionOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsCreateTopicOutput(v *CreateTopicOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -5289,7 +5239,7 @@ func awsRestjson1_deserializeOpHttpBindingsCreateVPCConnectionOutput(v *CreateVP return nil } -func awsRestjson1_deserializeOpDocumentCreateVPCConnectionOutput(v **CreateVPCConnectionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateTopicOutput(v **CreateTopicOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5302,9 +5252,9 @@ func awsRestjson1_deserializeOpDocumentCreateVPCConnectionOutput(v **CreateVPCCo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateVPCConnectionOutput + var sv *CreateTopicOutput if *v == nil { - sv = &CreateVPCConnectionOutput{} + sv = &CreateTopicOutput{} } else { sv = *v } @@ -5320,22 +5270,13 @@ func awsRestjson1_deserializeOpDocumentCreateVPCConnectionOutput(v **CreateVPCCo sv.Arn = ptr.String(jtv) } - case "AvailabilityStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected VPCConnectionAvailabilityStatus to be of type string, got %T instead", value) - } - sv.AvailabilityStatus = types.VPCConnectionAvailabilityStatus(jtv) - } - - case "CreationStatus": + case "RefreshArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected VPCConnectionResourceStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.CreationStatus = types.VPCConnectionResourceStatus(jtv) + sv.RefreshArn = ptr.String(jtv) } case "RequestId": @@ -5347,13 +5288,13 @@ func awsRestjson1_deserializeOpDocumentCreateVPCConnectionOutput(v **CreateVPCCo sv.RequestId = ptr.String(jtv) } - case "VPCConnectionId": + case "TopicId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected VPCConnectionResourceIdRestricted to be of type string, got %T instead", value) + return fmt.Errorf("expected TopicId to be of type string, got %T instead", value) } - sv.VPCConnectionId = ptr.String(jtv) + sv.TopicId = ptr.String(jtv) } default: @@ -5365,14 +5306,14 @@ func awsRestjson1_deserializeOpDocumentCreateVPCConnectionOutput(v **CreateVPCCo return nil } -type awsRestjson1_deserializeOpDeleteAccountCustomization struct { +type awsRestjson1_deserializeOpCreateTopicRefreshSchedule struct { } -func (*awsRestjson1_deserializeOpDeleteAccountCustomization) ID() string { +func (*awsRestjson1_deserializeOpCreateTopicRefreshSchedule) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteAccountCustomization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateTopicRefreshSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5390,12 +5331,12 @@ func (m *awsRestjson1_deserializeOpDeleteAccountCustomization) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteAccountCustomization(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateTopicRefreshSchedule(response, &metadata) } - output := &DeleteAccountCustomizationOutput{} + output := &CreateTopicRefreshScheduleOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteAccountCustomizationOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateTopicRefreshScheduleOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -5418,7 +5359,7 @@ func (m *awsRestjson1_deserializeOpDeleteAccountCustomization) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteAccountCustomizationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateTopicRefreshScheduleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5432,7 +5373,7 @@ func (m *awsRestjson1_deserializeOpDeleteAccountCustomization) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteAccountCustomization(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateTopicRefreshSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5488,15 +5429,12 @@ func awsRestjson1_deserializeOpErrorDeleteAccountCustomization(response *smithyh case strings.EqualFold("LimitExceededException", errorCode): return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -5510,7 +5448,7 @@ func awsRestjson1_deserializeOpErrorDeleteAccountCustomization(response *smithyh } } -func awsRestjson1_deserializeOpHttpBindingsDeleteAccountCustomizationOutput(v *DeleteAccountCustomizationOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsCreateTopicRefreshScheduleOutput(v *CreateTopicRefreshScheduleOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -5519,7 +5457,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteAccountCustomizationOutput(v *D return nil } -func awsRestjson1_deserializeOpDocumentDeleteAccountCustomizationOutput(v **DeleteAccountCustomizationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateTopicRefreshScheduleOutput(v **CreateTopicRefreshScheduleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5532,15 +5470,24 @@ func awsRestjson1_deserializeOpDocumentDeleteAccountCustomizationOutput(v **Dele return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteAccountCustomizationOutput + var sv *CreateTopicRefreshScheduleOutput if *v == nil { - sv = &DeleteAccountCustomizationOutput{} + sv = &CreateTopicRefreshScheduleOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "DatasetArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.DatasetArn = ptr.String(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -5550,6 +5497,24 @@ func awsRestjson1_deserializeOpDocumentDeleteAccountCustomizationOutput(v **Dele sv.RequestId = ptr.String(jtv) } + case "TopicArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.TopicArn = ptr.String(jtv) + } + + case "TopicId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TopicId to be of type string, got %T instead", value) + } + sv.TopicId = ptr.String(jtv) + } + default: _, _ = key, value @@ -5559,14 +5524,14 @@ func awsRestjson1_deserializeOpDocumentDeleteAccountCustomizationOutput(v **Dele return nil } -type awsRestjson1_deserializeOpDeleteAccountSubscription struct { +type awsRestjson1_deserializeOpCreateVPCConnection struct { } -func (*awsRestjson1_deserializeOpDeleteAccountSubscription) ID() string { +func (*awsRestjson1_deserializeOpCreateVPCConnection) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteAccountSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateVPCConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5584,12 +5549,12 @@ func (m *awsRestjson1_deserializeOpDeleteAccountSubscription) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteAccountSubscription(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateVPCConnection(response, &metadata) } - output := &DeleteAccountSubscriptionOutput{} + output := &CreateVPCConnectionOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteAccountSubscriptionOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsCreateVPCConnectionOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -5612,7 +5577,7 @@ func (m *awsRestjson1_deserializeOpDeleteAccountSubscription) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteAccountSubscriptionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateVPCConnectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5626,7 +5591,7 @@ func (m *awsRestjson1_deserializeOpDeleteAccountSubscription) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteAccountSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateVPCConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5670,24 +5635,27 @@ func awsRestjson1_deserializeOpErrorDeleteAccountSubscription(response *smithyht case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -5698,7 +5666,7 @@ func awsRestjson1_deserializeOpErrorDeleteAccountSubscription(response *smithyht } } -func awsRestjson1_deserializeOpHttpBindingsDeleteAccountSubscriptionOutput(v *DeleteAccountSubscriptionOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsCreateVPCConnectionOutput(v *CreateVPCConnectionOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -5707,7 +5675,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteAccountSubscriptionOutput(v *De return nil } -func awsRestjson1_deserializeOpDocumentDeleteAccountSubscriptionOutput(v **DeleteAccountSubscriptionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateVPCConnectionOutput(v **CreateVPCConnectionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5720,15 +5688,42 @@ func awsRestjson1_deserializeOpDocumentDeleteAccountSubscriptionOutput(v **Delet return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteAccountSubscriptionOutput + var sv *CreateVPCConnectionOutput if *v == nil { - sv = &DeleteAccountSubscriptionOutput{} + sv = &CreateVPCConnectionOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "AvailabilityStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VPCConnectionAvailabilityStatus to be of type string, got %T instead", value) + } + sv.AvailabilityStatus = types.VPCConnectionAvailabilityStatus(jtv) + } + + case "CreationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VPCConnectionResourceStatus to be of type string, got %T instead", value) + } + sv.CreationStatus = types.VPCConnectionResourceStatus(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -5738,6 +5733,15 @@ func awsRestjson1_deserializeOpDocumentDeleteAccountSubscriptionOutput(v **Delet sv.RequestId = ptr.String(jtv) } + case "VPCConnectionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VPCConnectionResourceIdRestricted to be of type string, got %T instead", value) + } + sv.VPCConnectionId = ptr.String(jtv) + } + default: _, _ = key, value @@ -5747,14 +5751,14 @@ func awsRestjson1_deserializeOpDocumentDeleteAccountSubscriptionOutput(v **Delet return nil } -type awsRestjson1_deserializeOpDeleteAnalysis struct { +type awsRestjson1_deserializeOpDeleteAccountCustomization struct { } -func (*awsRestjson1_deserializeOpDeleteAnalysis) ID() string { +func (*awsRestjson1_deserializeOpDeleteAccountCustomization) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteAccountCustomization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5772,12 +5776,12 @@ func (m *awsRestjson1_deserializeOpDeleteAnalysis) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteAnalysis(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteAccountCustomization(response, &metadata) } - output := &DeleteAnalysisOutput{} + output := &DeleteAccountCustomizationOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteAnalysisOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteAccountCustomizationOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -5800,7 +5804,7 @@ func (m *awsRestjson1_deserializeOpDeleteAnalysis) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteAnalysisOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteAccountCustomizationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5814,7 +5818,7 @@ func (m *awsRestjson1_deserializeOpDeleteAnalysis) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteAccountCustomization(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5855,6 +5859,9 @@ func awsRestjson1_deserializeOpErrorDeleteAnalysis(response *smithyhttp.Response } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) @@ -5864,15 +5871,21 @@ func awsRestjson1_deserializeOpErrorDeleteAnalysis(response *smithyhttp.Response case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -5883,7 +5896,7 @@ func awsRestjson1_deserializeOpErrorDeleteAnalysis(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsDeleteAnalysisOutput(v *DeleteAnalysisOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteAccountCustomizationOutput(v *DeleteAccountCustomizationOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -5892,7 +5905,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteAnalysisOutput(v *DeleteAnalysi return nil } -func awsRestjson1_deserializeOpDocumentDeleteAnalysisOutput(v **DeleteAnalysisOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteAccountCustomizationOutput(v **DeleteAccountCustomizationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5905,49 +5918,15 @@ func awsRestjson1_deserializeOpDocumentDeleteAnalysisOutput(v **DeleteAnalysisOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteAnalysisOutput + var sv *DeleteAccountCustomizationOutput if *v == nil { - sv = &DeleteAnalysisOutput{} + sv = &DeleteAccountCustomizationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AnalysisId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.AnalysisId = ptr.String(jtv) - } - - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "DeletionTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.DeletionTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -5966,14 +5945,14 @@ func awsRestjson1_deserializeOpDocumentDeleteAnalysisOutput(v **DeleteAnalysisOu return nil } -type awsRestjson1_deserializeOpDeleteDashboard struct { +type awsRestjson1_deserializeOpDeleteAccountSubscription struct { } -func (*awsRestjson1_deserializeOpDeleteDashboard) ID() string { +func (*awsRestjson1_deserializeOpDeleteAccountSubscription) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteDashboard) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteAccountSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5991,12 +5970,12 @@ func (m *awsRestjson1_deserializeOpDeleteDashboard) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteDashboard(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteAccountSubscription(response, &metadata) } - output := &DeleteDashboardOutput{} + output := &DeleteAccountSubscriptionOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteDashboardOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteAccountSubscriptionOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -6019,7 +5998,7 @@ func (m *awsRestjson1_deserializeOpDeleteDashboard) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteDashboardOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteAccountSubscriptionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6033,7 +6012,7 @@ func (m *awsRestjson1_deserializeOpDeleteDashboard) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteDashboard(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteAccountSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6074,8 +6053,8 @@ func awsRestjson1_deserializeOpErrorDeleteDashboard(response *smithyhttp.Respons } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -6083,15 +6062,18 @@ func awsRestjson1_deserializeOpErrorDeleteDashboard(response *smithyhttp.Respons case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6102,7 +6084,7 @@ func awsRestjson1_deserializeOpErrorDeleteDashboard(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpHttpBindingsDeleteDashboardOutput(v *DeleteDashboardOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteAccountSubscriptionOutput(v *DeleteAccountSubscriptionOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -6111,7 +6093,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteDashboardOutput(v *DeleteDashbo return nil } -func awsRestjson1_deserializeOpDocumentDeleteDashboardOutput(v **DeleteDashboardOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteAccountSubscriptionOutput(v **DeleteAccountSubscriptionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6124,33 +6106,15 @@ func awsRestjson1_deserializeOpDocumentDeleteDashboardOutput(v **DeleteDashboard return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteDashboardOutput + var sv *DeleteAccountSubscriptionOutput if *v == nil { - sv = &DeleteDashboardOutput{} + sv = &DeleteAccountSubscriptionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "DashboardId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.DashboardId = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -6169,14 +6133,14 @@ func awsRestjson1_deserializeOpDocumentDeleteDashboardOutput(v **DeleteDashboard return nil } -type awsRestjson1_deserializeOpDeleteDataSet struct { +type awsRestjson1_deserializeOpDeleteAnalysis struct { } -func (*awsRestjson1_deserializeOpDeleteDataSet) ID() string { +func (*awsRestjson1_deserializeOpDeleteAnalysis) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteDataSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6194,12 +6158,12 @@ func (m *awsRestjson1_deserializeOpDeleteDataSet) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteDataSet(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteAnalysis(response, &metadata) } - output := &DeleteDataSetOutput{} + output := &DeleteAnalysisOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteDataSetOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteAnalysisOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -6222,7 +6186,7 @@ func (m *awsRestjson1_deserializeOpDeleteDataSet) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteDataSetOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteAnalysisOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6236,7 +6200,7 @@ func (m *awsRestjson1_deserializeOpDeleteDataSet) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteDataSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6277,8 +6241,8 @@ func awsRestjson1_deserializeOpErrorDeleteDataSet(response *smithyhttp.Response, } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -6292,6 +6256,9 @@ func awsRestjson1_deserializeOpErrorDeleteDataSet(response *smithyhttp.Response, case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6302,7 +6269,7 @@ func awsRestjson1_deserializeOpErrorDeleteDataSet(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsDeleteDataSetOutput(v *DeleteDataSetOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteAnalysisOutput(v *DeleteAnalysisOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -6311,7 +6278,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteDataSetOutput(v *DeleteDataSetO return nil } -func awsRestjson1_deserializeOpDocumentDeleteDataSetOutput(v **DeleteDataSetOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteAnalysisOutput(v **DeleteAnalysisOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6324,15 +6291,24 @@ func awsRestjson1_deserializeOpDocumentDeleteDataSetOutput(v **DeleteDataSetOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteDataSetOutput + var sv *DeleteAnalysisOutput if *v == nil { - sv = &DeleteDataSetOutput{} + sv = &DeleteAnalysisOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "AnalysisId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.AnalysisId = ptr.String(jtv) + } + case "Arn": if value != nil { jtv, ok := value.(string) @@ -6342,13 +6318,20 @@ func awsRestjson1_deserializeOpDocumentDeleteDataSetOutput(v **DeleteDataSetOutp sv.Arn = ptr.String(jtv) } - case "DataSetId": + case "DeletionTime": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DeletionTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + } - sv.DataSetId = ptr.String(jtv) } case "RequestId": @@ -6369,14 +6352,14 @@ func awsRestjson1_deserializeOpDocumentDeleteDataSetOutput(v **DeleteDataSetOutp return nil } -type awsRestjson1_deserializeOpDeleteDataSetRefreshProperties struct { +type awsRestjson1_deserializeOpDeleteBrand struct { } -func (*awsRestjson1_deserializeOpDeleteDataSetRefreshProperties) ID() string { +func (*awsRestjson1_deserializeOpDeleteBrand) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteDataSetRefreshProperties) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteBrand) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6394,16 +6377,11 @@ func (m *awsRestjson1_deserializeOpDeleteDataSetRefreshProperties) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteDataSetRefreshProperties(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteBrand(response, &metadata) } - output := &DeleteDataSetRefreshPropertiesOutput{} + output := &DeleteBrandOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteDataSetRefreshPropertiesOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6422,7 +6400,7 @@ func (m *awsRestjson1_deserializeOpDeleteDataSetRefreshProperties) HandleDeseria return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteDataSetRefreshPropertiesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteBrandOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6436,7 +6414,7 @@ func (m *awsRestjson1_deserializeOpDeleteDataSetRefreshProperties) HandleDeseria return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteDataSetRefreshProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteBrand(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6483,14 +6461,11 @@ func awsRestjson1_deserializeOpErrorDeleteDataSetRefreshProperties(response *smi case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): - return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -6508,16 +6483,7 @@ func awsRestjson1_deserializeOpErrorDeleteDataSetRefreshProperties(response *smi } } -func awsRestjson1_deserializeOpHttpBindingsDeleteDataSetRefreshPropertiesOutput(v *DeleteDataSetRefreshPropertiesOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - v.Status = int32(response.StatusCode) - - return nil -} -func awsRestjson1_deserializeOpDocumentDeleteDataSetRefreshPropertiesOutput(v **DeleteDataSetRefreshPropertiesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteBrandOutput(v **DeleteBrandOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6530,9 +6496,9 @@ func awsRestjson1_deserializeOpDocumentDeleteDataSetRefreshPropertiesOutput(v ** return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteDataSetRefreshPropertiesOutput + var sv *DeleteBrandOutput if *v == nil { - sv = &DeleteDataSetRefreshPropertiesOutput{} + sv = &DeleteBrandOutput{} } else { sv = *v } @@ -6557,14 +6523,14 @@ func awsRestjson1_deserializeOpDocumentDeleteDataSetRefreshPropertiesOutput(v ** return nil } -type awsRestjson1_deserializeOpDeleteDataSource struct { +type awsRestjson1_deserializeOpDeleteBrandAssignment struct { } -func (*awsRestjson1_deserializeOpDeleteDataSource) ID() string { +func (*awsRestjson1_deserializeOpDeleteBrandAssignment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteBrandAssignment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6582,16 +6548,11 @@ func (m *awsRestjson1_deserializeOpDeleteDataSource) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteDataSource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteBrandAssignment(response, &metadata) } - output := &DeleteDataSourceOutput{} + output := &DeleteBrandAssignmentOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteDataSourceOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6610,7 +6571,7 @@ func (m *awsRestjson1_deserializeOpDeleteDataSource) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteDataSourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteBrandAssignmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6624,7 +6585,7 @@ func (m *awsRestjson1_deserializeOpDeleteDataSource) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteBrandAssignment(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6668,11 +6629,14 @@ func awsRestjson1_deserializeOpErrorDeleteDataSource(response *smithyhttp.Respon case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): - return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -6690,16 +6654,7 @@ func awsRestjson1_deserializeOpErrorDeleteDataSource(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpHttpBindingsDeleteDataSourceOutput(v *DeleteDataSourceOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - v.Status = int32(response.StatusCode) - - return nil -} -func awsRestjson1_deserializeOpDocumentDeleteDataSourceOutput(v **DeleteDataSourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteBrandAssignmentOutput(v **DeleteBrandAssignmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6712,33 +6667,15 @@ func awsRestjson1_deserializeOpDocumentDeleteDataSourceOutput(v **DeleteDataSour return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteDataSourceOutput + var sv *DeleteBrandAssignmentOutput if *v == nil { - sv = &DeleteDataSourceOutput{} + sv = &DeleteBrandAssignmentOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "DataSourceId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) - } - sv.DataSourceId = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -6757,14 +6694,14 @@ func awsRestjson1_deserializeOpDocumentDeleteDataSourceOutput(v **DeleteDataSour return nil } -type awsRestjson1_deserializeOpDeleteFolder struct { +type awsRestjson1_deserializeOpDeleteCustomPermissions struct { } -func (*awsRestjson1_deserializeOpDeleteFolder) ID() string { +func (*awsRestjson1_deserializeOpDeleteCustomPermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteFolder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteCustomPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6782,16 +6719,11 @@ func (m *awsRestjson1_deserializeOpDeleteFolder) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteFolder(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteCustomPermissions(response, &metadata) } - output := &DeleteFolderOutput{} + output := &DeleteCustomPermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteFolderOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6810,7 +6742,7 @@ func (m *awsRestjson1_deserializeOpDeleteFolder) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteFolderOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteCustomPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6824,7 +6756,7 @@ func (m *awsRestjson1_deserializeOpDeleteFolder) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteFolder(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteCustomPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6880,15 +6812,18 @@ func awsRestjson1_deserializeOpErrorDeleteFolder(response *smithyhttp.Response, case strings.EqualFold("PreconditionNotMetException", errorCode): return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6899,16 +6834,7 @@ func awsRestjson1_deserializeOpErrorDeleteFolder(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsDeleteFolderOutput(v *DeleteFolderOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - v.Status = int32(response.StatusCode) - - return nil -} -func awsRestjson1_deserializeOpDocumentDeleteFolderOutput(v **DeleteFolderOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteCustomPermissionsOutput(v **DeleteCustomPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6921,9 +6847,9 @@ func awsRestjson1_deserializeOpDocumentDeleteFolderOutput(v **DeleteFolderOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteFolderOutput + var sv *DeleteCustomPermissionsOutput if *v == nil { - sv = &DeleteFolderOutput{} + sv = &DeleteCustomPermissionsOutput{} } else { sv = *v } @@ -6939,22 +6865,26 @@ func awsRestjson1_deserializeOpDocumentDeleteFolderOutput(v **DeleteFolderOutput sv.Arn = ptr.String(jtv) } - case "FolderId": + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.FolderId = ptr.String(jtv) + sv.RequestId = ptr.String(jtv) } - case "RequestId": + case "Status": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Status = int32(i64) } default: @@ -6966,14 +6896,14 @@ func awsRestjson1_deserializeOpDocumentDeleteFolderOutput(v **DeleteFolderOutput return nil } -type awsRestjson1_deserializeOpDeleteFolderMembership struct { +type awsRestjson1_deserializeOpDeleteDashboard struct { } -func (*awsRestjson1_deserializeOpDeleteFolderMembership) ID() string { +func (*awsRestjson1_deserializeOpDeleteDashboard) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteFolderMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteDashboard) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6991,11 +6921,16 @@ func (m *awsRestjson1_deserializeOpDeleteFolderMembership) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteFolderMembership(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteDashboard(response, &metadata) } - output := &DeleteFolderMembershipOutput{} + output := &DeleteDashboardOutput{} out.Result = output + err = awsRestjson1_deserializeOpHttpBindingsDeleteDashboardOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -7014,7 +6949,7 @@ func (m *awsRestjson1_deserializeOpDeleteFolderMembership) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteFolderMembershipOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteDashboardOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7028,7 +6963,7 @@ func (m *awsRestjson1_deserializeOpDeleteFolderMembership) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteFolderMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteDashboard(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7069,8 +7004,8 @@ func awsRestjson1_deserializeOpErrorDeleteFolderMembership(response *smithyhttp. } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -7097,7 +7032,16 @@ func awsRestjson1_deserializeOpErrorDeleteFolderMembership(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentDeleteFolderMembershipOutput(v **DeleteFolderMembershipOutput, value interface{}) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteDashboardOutput(v *DeleteDashboardOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentDeleteDashboardOutput(v **DeleteDashboardOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7110,35 +7054,40 @@ func awsRestjson1_deserializeOpDocumentDeleteFolderMembershipOutput(v **DeleteFo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteFolderMembershipOutput + var sv *DeleteDashboardOutput if *v == nil { - sv = &DeleteFolderMembershipOutput{} + sv = &DeleteDashboardOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "RequestId": + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } - case "Status": + case "DashboardId": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) } - i64, err := jtv.Int64() - if err != nil { - return err + sv.DashboardId = ptr.String(jtv) + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Status = int32(i64) + sv.RequestId = ptr.String(jtv) } default: @@ -7150,14 +7099,14 @@ func awsRestjson1_deserializeOpDocumentDeleteFolderMembershipOutput(v **DeleteFo return nil } -type awsRestjson1_deserializeOpDeleteGroup struct { +type awsRestjson1_deserializeOpDeleteDataSet struct { } -func (*awsRestjson1_deserializeOpDeleteGroup) ID() string { +func (*awsRestjson1_deserializeOpDeleteDataSet) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteDataSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7175,12 +7124,12 @@ func (m *awsRestjson1_deserializeOpDeleteGroup) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteGroup(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteDataSet(response, &metadata) } - output := &DeleteGroupOutput{} + output := &DeleteDataSetOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteGroupOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteDataSetOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -7203,7 +7152,7 @@ func (m *awsRestjson1_deserializeOpDeleteGroup) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteGroupOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteDataSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7217,7 +7166,7 @@ func (m *awsRestjson1_deserializeOpDeleteGroup) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteDataSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7267,15 +7216,9 @@ func awsRestjson1_deserializeOpErrorDeleteGroup(response *smithyhttp.Response, m case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -7289,7 +7232,7 @@ func awsRestjson1_deserializeOpErrorDeleteGroup(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpHttpBindingsDeleteGroupOutput(v *DeleteGroupOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteDataSetOutput(v *DeleteDataSetOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -7298,7 +7241,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteGroupOutput(v *DeleteGroupOutpu return nil } -func awsRestjson1_deserializeOpDocumentDeleteGroupOutput(v **DeleteGroupOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteDataSetOutput(v **DeleteDataSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7311,15 +7254,33 @@ func awsRestjson1_deserializeOpDocumentDeleteGroupOutput(v **DeleteGroupOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteGroupOutput + var sv *DeleteDataSetOutput if *v == nil { - sv = &DeleteGroupOutput{} + sv = &DeleteDataSetOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "DataSetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.DataSetId = ptr.String(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -7338,14 +7299,14 @@ func awsRestjson1_deserializeOpDocumentDeleteGroupOutput(v **DeleteGroupOutput, return nil } -type awsRestjson1_deserializeOpDeleteGroupMembership struct { +type awsRestjson1_deserializeOpDeleteDataSetRefreshProperties struct { } -func (*awsRestjson1_deserializeOpDeleteGroupMembership) ID() string { +func (*awsRestjson1_deserializeOpDeleteDataSetRefreshProperties) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteGroupMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteDataSetRefreshProperties) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7363,12 +7324,12 @@ func (m *awsRestjson1_deserializeOpDeleteGroupMembership) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteGroupMembership(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteDataSetRefreshProperties(response, &metadata) } - output := &DeleteGroupMembershipOutput{} + output := &DeleteDataSetRefreshPropertiesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteGroupMembershipOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteDataSetRefreshPropertiesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -7391,7 +7352,7 @@ func (m *awsRestjson1_deserializeOpDeleteGroupMembership) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteGroupMembershipOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteDataSetRefreshPropertiesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7405,7 +7366,7 @@ func (m *awsRestjson1_deserializeOpDeleteGroupMembership) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteGroupMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteDataSetRefreshProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7449,21 +7410,21 @@ func awsRestjson1_deserializeOpErrorDeleteGroupMembership(response *smithyhttp.R case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -7477,7 +7438,7 @@ func awsRestjson1_deserializeOpErrorDeleteGroupMembership(response *smithyhttp.R } } -func awsRestjson1_deserializeOpHttpBindingsDeleteGroupMembershipOutput(v *DeleteGroupMembershipOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteDataSetRefreshPropertiesOutput(v *DeleteDataSetRefreshPropertiesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -7486,7 +7447,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteGroupMembershipOutput(v *Delete return nil } -func awsRestjson1_deserializeOpDocumentDeleteGroupMembershipOutput(v **DeleteGroupMembershipOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteDataSetRefreshPropertiesOutput(v **DeleteDataSetRefreshPropertiesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7499,9 +7460,9 @@ func awsRestjson1_deserializeOpDocumentDeleteGroupMembershipOutput(v **DeleteGro return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteGroupMembershipOutput + var sv *DeleteDataSetRefreshPropertiesOutput if *v == nil { - sv = &DeleteGroupMembershipOutput{} + sv = &DeleteDataSetRefreshPropertiesOutput{} } else { sv = *v } @@ -7526,14 +7487,14 @@ func awsRestjson1_deserializeOpDocumentDeleteGroupMembershipOutput(v **DeleteGro return nil } -type awsRestjson1_deserializeOpDeleteIAMPolicyAssignment struct { +type awsRestjson1_deserializeOpDeleteDataSource struct { } -func (*awsRestjson1_deserializeOpDeleteIAMPolicyAssignment) ID() string { +func (*awsRestjson1_deserializeOpDeleteDataSource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteIAMPolicyAssignment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7551,12 +7512,12 @@ func (m *awsRestjson1_deserializeOpDeleteIAMPolicyAssignment) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteIAMPolicyAssignment(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteDataSource(response, &metadata) } - output := &DeleteIAMPolicyAssignmentOutput{} + output := &DeleteDataSourceOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteIAMPolicyAssignmentOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteDataSourceOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -7579,7 +7540,7 @@ func (m *awsRestjson1_deserializeOpDeleteIAMPolicyAssignment) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteIAMPolicyAssignmentOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteDataSourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7593,7 +7554,7 @@ func (m *awsRestjson1_deserializeOpDeleteIAMPolicyAssignment) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteIAMPolicyAssignment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7637,18 +7598,12 @@ func awsRestjson1_deserializeOpErrorDeleteIAMPolicyAssignment(response *smithyht case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConcurrentUpdatingException", errorCode): - return awsRestjson1_deserializeErrorConcurrentUpdatingException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -7665,7 +7620,7 @@ func awsRestjson1_deserializeOpErrorDeleteIAMPolicyAssignment(response *smithyht } } -func awsRestjson1_deserializeOpHttpBindingsDeleteIAMPolicyAssignmentOutput(v *DeleteIAMPolicyAssignmentOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteDataSourceOutput(v *DeleteDataSourceOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -7674,7 +7629,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteIAMPolicyAssignmentOutput(v *De return nil } -func awsRestjson1_deserializeOpDocumentDeleteIAMPolicyAssignmentOutput(v **DeleteIAMPolicyAssignmentOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteDataSourceOutput(v **DeleteDataSourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7687,22 +7642,31 @@ func awsRestjson1_deserializeOpDocumentDeleteIAMPolicyAssignmentOutput(v **Delet return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteIAMPolicyAssignmentOutput + var sv *DeleteDataSourceOutput if *v == nil { - sv = &DeleteIAMPolicyAssignmentOutput{} + sv = &DeleteDataSourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AssignmentName": + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected IAMPolicyAssignmentName to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.AssignmentName = ptr.String(jtv) + sv.Arn = ptr.String(jtv) + } + + case "DataSourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.DataSourceId = ptr.String(jtv) } case "RequestId": @@ -7723,14 +7687,14 @@ func awsRestjson1_deserializeOpDocumentDeleteIAMPolicyAssignmentOutput(v **Delet return nil } -type awsRestjson1_deserializeOpDeleteIdentityPropagationConfig struct { +type awsRestjson1_deserializeOpDeleteFolder struct { } -func (*awsRestjson1_deserializeOpDeleteIdentityPropagationConfig) ID() string { +func (*awsRestjson1_deserializeOpDeleteFolder) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteIdentityPropagationConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteFolder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7748,12 +7712,12 @@ func (m *awsRestjson1_deserializeOpDeleteIdentityPropagationConfig) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteIdentityPropagationConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteFolder(response, &metadata) } - output := &DeleteIdentityPropagationConfigOutput{} + output := &DeleteFolderOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteIdentityPropagationConfigOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteFolderOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -7776,7 +7740,7 @@ func (m *awsRestjson1_deserializeOpDeleteIdentityPropagationConfig) HandleDeseri return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteIdentityPropagationConfigOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteFolderOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7790,7 +7754,7 @@ func (m *awsRestjson1_deserializeOpDeleteIdentityPropagationConfig) HandleDeseri return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteIdentityPropagationConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteFolder(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7834,18 +7798,27 @@ func awsRestjson1_deserializeOpErrorDeleteIdentityPropagationConfig(response *sm case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7856,7 +7829,7 @@ func awsRestjson1_deserializeOpErrorDeleteIdentityPropagationConfig(response *sm } } -func awsRestjson1_deserializeOpHttpBindingsDeleteIdentityPropagationConfigOutput(v *DeleteIdentityPropagationConfigOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteFolderOutput(v *DeleteFolderOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -7865,7 +7838,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteIdentityPropagationConfigOutput return nil } -func awsRestjson1_deserializeOpDocumentDeleteIdentityPropagationConfigOutput(v **DeleteIdentityPropagationConfigOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteFolderOutput(v **DeleteFolderOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7878,15 +7851,33 @@ func awsRestjson1_deserializeOpDocumentDeleteIdentityPropagationConfigOutput(v * return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteIdentityPropagationConfigOutput + var sv *DeleteFolderOutput if *v == nil { - sv = &DeleteIdentityPropagationConfigOutput{} + sv = &DeleteFolderOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "FolderId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RestrictiveResourceId to be of type string, got %T instead", value) + } + sv.FolderId = ptr.String(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -7905,14 +7896,14 @@ func awsRestjson1_deserializeOpDocumentDeleteIdentityPropagationConfigOutput(v * return nil } -type awsRestjson1_deserializeOpDeleteNamespace struct { +type awsRestjson1_deserializeOpDeleteFolderMembership struct { } -func (*awsRestjson1_deserializeOpDeleteNamespace) ID() string { +func (*awsRestjson1_deserializeOpDeleteFolderMembership) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteNamespace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteFolderMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7930,16 +7921,11 @@ func (m *awsRestjson1_deserializeOpDeleteNamespace) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteNamespace(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteFolderMembership(response, &metadata) } - output := &DeleteNamespaceOutput{} + output := &DeleteFolderMembershipOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteNamespaceOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -7958,7 +7944,7 @@ func (m *awsRestjson1_deserializeOpDeleteNamespace) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteNamespaceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteFolderMembershipOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7972,7 +7958,7 @@ func (m *awsRestjson1_deserializeOpDeleteNamespace) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteNamespace(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteFolderMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8022,18 +8008,15 @@ func awsRestjson1_deserializeOpErrorDeleteNamespace(response *smithyhttp.Respons case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8044,16 +8027,7 @@ func awsRestjson1_deserializeOpErrorDeleteNamespace(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpHttpBindingsDeleteNamespaceOutput(v *DeleteNamespaceOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - v.Status = int32(response.StatusCode) - - return nil -} -func awsRestjson1_deserializeOpDocumentDeleteNamespaceOutput(v **DeleteNamespaceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteFolderMembershipOutput(v **DeleteFolderMembershipOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8066,9 +8040,9 @@ func awsRestjson1_deserializeOpDocumentDeleteNamespaceOutput(v **DeleteNamespace return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteNamespaceOutput + var sv *DeleteFolderMembershipOutput if *v == nil { - sv = &DeleteNamespaceOutput{} + sv = &DeleteFolderMembershipOutput{} } else { sv = *v } @@ -8084,6 +8058,19 @@ func awsRestjson1_deserializeOpDocumentDeleteNamespaceOutput(v **DeleteNamespace sv.RequestId = ptr.String(jtv) } + case "Status": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Status = int32(i64) + } + default: _, _ = key, value @@ -8093,14 +8080,14 @@ func awsRestjson1_deserializeOpDocumentDeleteNamespaceOutput(v **DeleteNamespace return nil } -type awsRestjson1_deserializeOpDeleteRefreshSchedule struct { +type awsRestjson1_deserializeOpDeleteGroup struct { } -func (*awsRestjson1_deserializeOpDeleteRefreshSchedule) ID() string { +func (*awsRestjson1_deserializeOpDeleteGroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteRefreshSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8118,12 +8105,12 @@ func (m *awsRestjson1_deserializeOpDeleteRefreshSchedule) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteRefreshSchedule(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteGroup(response, &metadata) } - output := &DeleteRefreshScheduleOutput{} + output := &DeleteGroupOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteRefreshScheduleOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteGroupOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -8146,7 +8133,7 @@ func (m *awsRestjson1_deserializeOpDeleteRefreshSchedule) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteRefreshScheduleOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8160,7 +8147,7 @@ func (m *awsRestjson1_deserializeOpDeleteRefreshSchedule) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteRefreshSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8210,12 +8197,15 @@ func awsRestjson1_deserializeOpErrorDeleteRefreshSchedule(response *smithyhttp.R case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -8229,7 +8219,7 @@ func awsRestjson1_deserializeOpErrorDeleteRefreshSchedule(response *smithyhttp.R } } -func awsRestjson1_deserializeOpHttpBindingsDeleteRefreshScheduleOutput(v *DeleteRefreshScheduleOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteGroupOutput(v *DeleteGroupOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -8238,7 +8228,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteRefreshScheduleOutput(v *Delete return nil } -func awsRestjson1_deserializeOpDocumentDeleteRefreshScheduleOutput(v **DeleteRefreshScheduleOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteGroupOutput(v **DeleteGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8251,24 +8241,15 @@ func awsRestjson1_deserializeOpDocumentDeleteRefreshScheduleOutput(v **DeleteRef return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteRefreshScheduleOutput + var sv *DeleteGroupOutput if *v == nil { - sv = &DeleteRefreshScheduleOutput{} + sv = &DeleteGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -8278,15 +8259,6 @@ func awsRestjson1_deserializeOpDocumentDeleteRefreshScheduleOutput(v **DeleteRef sv.RequestId = ptr.String(jtv) } - case "ScheduleId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.ScheduleId = ptr.String(jtv) - } - default: _, _ = key, value @@ -8296,14 +8268,14 @@ func awsRestjson1_deserializeOpDocumentDeleteRefreshScheduleOutput(v **DeleteRef return nil } -type awsRestjson1_deserializeOpDeleteRoleCustomPermission struct { +type awsRestjson1_deserializeOpDeleteGroupMembership struct { } -func (*awsRestjson1_deserializeOpDeleteRoleCustomPermission) ID() string { +func (*awsRestjson1_deserializeOpDeleteGroupMembership) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteRoleCustomPermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteGroupMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8321,11 +8293,16 @@ func (m *awsRestjson1_deserializeOpDeleteRoleCustomPermission) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteRoleCustomPermission(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteGroupMembership(response, &metadata) } - output := &DeleteRoleCustomPermissionOutput{} + output := &DeleteGroupMembershipOutput{} out.Result = output + err = awsRestjson1_deserializeOpHttpBindingsDeleteGroupMembershipOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -8344,7 +8321,7 @@ func (m *awsRestjson1_deserializeOpDeleteRoleCustomPermission) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteRoleCustomPermissionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteGroupMembershipOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8358,7 +8335,7 @@ func (m *awsRestjson1_deserializeOpDeleteRoleCustomPermission) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteRoleCustomPermission(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteGroupMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8430,7 +8407,16 @@ func awsRestjson1_deserializeOpErrorDeleteRoleCustomPermission(response *smithyh } } -func awsRestjson1_deserializeOpDocumentDeleteRoleCustomPermissionOutput(v **DeleteRoleCustomPermissionOutput, value interface{}) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteGroupMembershipOutput(v *DeleteGroupMembershipOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentDeleteGroupMembershipOutput(v **DeleteGroupMembershipOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8443,9 +8429,9 @@ func awsRestjson1_deserializeOpDocumentDeleteRoleCustomPermissionOutput(v **Dele return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteRoleCustomPermissionOutput + var sv *DeleteGroupMembershipOutput if *v == nil { - sv = &DeleteRoleCustomPermissionOutput{} + sv = &DeleteGroupMembershipOutput{} } else { sv = *v } @@ -8461,19 +8447,6 @@ func awsRestjson1_deserializeOpDocumentDeleteRoleCustomPermissionOutput(v **Dele sv.RequestId = ptr.String(jtv) } - case "Status": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Status = int32(i64) - } - default: _, _ = key, value @@ -8483,14 +8456,14 @@ func awsRestjson1_deserializeOpDocumentDeleteRoleCustomPermissionOutput(v **Dele return nil } -type awsRestjson1_deserializeOpDeleteRoleMembership struct { +type awsRestjson1_deserializeOpDeleteIAMPolicyAssignment struct { } -func (*awsRestjson1_deserializeOpDeleteRoleMembership) ID() string { +func (*awsRestjson1_deserializeOpDeleteIAMPolicyAssignment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteRoleMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteIAMPolicyAssignment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8508,12 +8481,12 @@ func (m *awsRestjson1_deserializeOpDeleteRoleMembership) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteRoleMembership(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteIAMPolicyAssignment(response, &metadata) } - output := &DeleteRoleMembershipOutput{} + output := &DeleteIAMPolicyAssignmentOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteRoleMembershipOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteIAMPolicyAssignmentOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -8536,7 +8509,7 @@ func (m *awsRestjson1_deserializeOpDeleteRoleMembership) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteRoleMembershipOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteIAMPolicyAssignmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8550,7 +8523,7 @@ func (m *awsRestjson1_deserializeOpDeleteRoleMembership) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteRoleMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteIAMPolicyAssignment(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8594,21 +8567,21 @@ func awsRestjson1_deserializeOpErrorDeleteRoleMembership(response *smithyhttp.Re case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConcurrentUpdatingException", errorCode): + return awsRestjson1_deserializeErrorConcurrentUpdatingException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -8622,7 +8595,7 @@ func awsRestjson1_deserializeOpErrorDeleteRoleMembership(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpHttpBindingsDeleteRoleMembershipOutput(v *DeleteRoleMembershipOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteIAMPolicyAssignmentOutput(v *DeleteIAMPolicyAssignmentOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -8631,7 +8604,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteRoleMembershipOutput(v *DeleteR return nil } -func awsRestjson1_deserializeOpDocumentDeleteRoleMembershipOutput(v **DeleteRoleMembershipOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteIAMPolicyAssignmentOutput(v **DeleteIAMPolicyAssignmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8644,15 +8617,24 @@ func awsRestjson1_deserializeOpDocumentDeleteRoleMembershipOutput(v **DeleteRole return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteRoleMembershipOutput + var sv *DeleteIAMPolicyAssignmentOutput if *v == nil { - sv = &DeleteRoleMembershipOutput{} + sv = &DeleteIAMPolicyAssignmentOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "AssignmentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IAMPolicyAssignmentName to be of type string, got %T instead", value) + } + sv.AssignmentName = ptr.String(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -8671,14 +8653,14 @@ func awsRestjson1_deserializeOpDocumentDeleteRoleMembershipOutput(v **DeleteRole return nil } -type awsRestjson1_deserializeOpDeleteTemplate struct { +type awsRestjson1_deserializeOpDeleteIdentityPropagationConfig struct { } -func (*awsRestjson1_deserializeOpDeleteTemplate) ID() string { +func (*awsRestjson1_deserializeOpDeleteIdentityPropagationConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteIdentityPropagationConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8696,12 +8678,12 @@ func (m *awsRestjson1_deserializeOpDeleteTemplate) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteTemplate(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteIdentityPropagationConfig(response, &metadata) } - output := &DeleteTemplateOutput{} + output := &DeleteIdentityPropagationConfigOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteTemplateOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteIdentityPropagationConfigOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -8724,7 +8706,7 @@ func (m *awsRestjson1_deserializeOpDeleteTemplate) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteTemplateOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteIdentityPropagationConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8738,7 +8720,7 @@ func (m *awsRestjson1_deserializeOpDeleteTemplate) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteIdentityPropagationConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8779,8 +8761,8 @@ func awsRestjson1_deserializeOpErrorDeleteTemplate(response *smithyhttp.Response } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -8788,18 +8770,12 @@ func awsRestjson1_deserializeOpErrorDeleteTemplate(response *smithyhttp.Response case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8810,7 +8786,7 @@ func awsRestjson1_deserializeOpErrorDeleteTemplate(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsDeleteTemplateOutput(v *DeleteTemplateOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteIdentityPropagationConfigOutput(v *DeleteIdentityPropagationConfigOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -8819,7 +8795,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteTemplateOutput(v *DeleteTemplat return nil } -func awsRestjson1_deserializeOpDocumentDeleteTemplateOutput(v **DeleteTemplateOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteIdentityPropagationConfigOutput(v **DeleteIdentityPropagationConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8832,24 +8808,15 @@ func awsRestjson1_deserializeOpDocumentDeleteTemplateOutput(v **DeleteTemplateOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteTemplateOutput + var sv *DeleteIdentityPropagationConfigOutput if *v == nil { - sv = &DeleteTemplateOutput{} + sv = &DeleteIdentityPropagationConfigOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -8859,15 +8826,6 @@ func awsRestjson1_deserializeOpDocumentDeleteTemplateOutput(v **DeleteTemplateOu sv.RequestId = ptr.String(jtv) } - case "TemplateId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.TemplateId = ptr.String(jtv) - } - default: _, _ = key, value @@ -8877,14 +8835,14 @@ func awsRestjson1_deserializeOpDocumentDeleteTemplateOutput(v **DeleteTemplateOu return nil } -type awsRestjson1_deserializeOpDeleteTemplateAlias struct { +type awsRestjson1_deserializeOpDeleteNamespace struct { } -func (*awsRestjson1_deserializeOpDeleteTemplateAlias) ID() string { +func (*awsRestjson1_deserializeOpDeleteNamespace) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteTemplateAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteNamespace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8902,12 +8860,12 @@ func (m *awsRestjson1_deserializeOpDeleteTemplateAlias) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteTemplateAlias(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteNamespace(response, &metadata) } - output := &DeleteTemplateAliasOutput{} + output := &DeleteNamespaceOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteTemplateAliasOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteNamespaceOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -8930,7 +8888,7 @@ func (m *awsRestjson1_deserializeOpDeleteTemplateAlias) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteTemplateAliasOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteNamespaceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8944,7 +8902,7 @@ func (m *awsRestjson1_deserializeOpDeleteTemplateAlias) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteTemplateAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteNamespace(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8985,21 +8943,27 @@ func awsRestjson1_deserializeOpErrorDeleteTemplateAlias(response *smithyhttp.Res } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -9010,7 +8974,7 @@ func awsRestjson1_deserializeOpErrorDeleteTemplateAlias(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpHttpBindingsDeleteTemplateAliasOutput(v *DeleteTemplateAliasOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteNamespaceOutput(v *DeleteNamespaceOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -9019,7 +8983,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteTemplateAliasOutput(v *DeleteTe return nil } -func awsRestjson1_deserializeOpDocumentDeleteTemplateAliasOutput(v **DeleteTemplateAliasOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteNamespaceOutput(v **DeleteNamespaceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9032,33 +8996,15 @@ func awsRestjson1_deserializeOpDocumentDeleteTemplateAliasOutput(v **DeleteTempl return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteTemplateAliasOutput + var sv *DeleteNamespaceOutput if *v == nil { - sv = &DeleteTemplateAliasOutput{} + sv = &DeleteNamespaceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AliasName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AliasName to be of type string, got %T instead", value) - } - sv.AliasName = ptr.String(jtv) - } - - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -9068,15 +9014,6 @@ func awsRestjson1_deserializeOpDocumentDeleteTemplateAliasOutput(v **DeleteTempl sv.RequestId = ptr.String(jtv) } - case "TemplateId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.TemplateId = ptr.String(jtv) - } - default: _, _ = key, value @@ -9086,14 +9023,14 @@ func awsRestjson1_deserializeOpDocumentDeleteTemplateAliasOutput(v **DeleteTempl return nil } -type awsRestjson1_deserializeOpDeleteTheme struct { +type awsRestjson1_deserializeOpDeleteRefreshSchedule struct { } -func (*awsRestjson1_deserializeOpDeleteTheme) ID() string { +func (*awsRestjson1_deserializeOpDeleteRefreshSchedule) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteTheme) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteRefreshSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9111,12 +9048,12 @@ func (m *awsRestjson1_deserializeOpDeleteTheme) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteTheme(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteRefreshSchedule(response, &metadata) } - output := &DeleteThemeOutput{} + output := &DeleteRefreshScheduleOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteThemeOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteRefreshScheduleOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -9139,7 +9076,7 @@ func (m *awsRestjson1_deserializeOpDeleteTheme) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteThemeOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteRefreshScheduleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9153,7 +9090,7 @@ func (m *awsRestjson1_deserializeOpDeleteTheme) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteTheme(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteRefreshSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9197,24 +9134,21 @@ func awsRestjson1_deserializeOpErrorDeleteTheme(response *smithyhttp.Response, m case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -9225,7 +9159,7 @@ func awsRestjson1_deserializeOpErrorDeleteTheme(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpHttpBindingsDeleteThemeOutput(v *DeleteThemeOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteRefreshScheduleOutput(v *DeleteRefreshScheduleOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -9234,7 +9168,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteThemeOutput(v *DeleteThemeOutpu return nil } -func awsRestjson1_deserializeOpDocumentDeleteThemeOutput(v **DeleteThemeOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteRefreshScheduleOutput(v **DeleteRefreshScheduleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9247,9 +9181,9 @@ func awsRestjson1_deserializeOpDocumentDeleteThemeOutput(v **DeleteThemeOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteThemeOutput + var sv *DeleteRefreshScheduleOutput if *v == nil { - sv = &DeleteThemeOutput{} + sv = &DeleteRefreshScheduleOutput{} } else { sv = *v } @@ -9274,13 +9208,13 @@ func awsRestjson1_deserializeOpDocumentDeleteThemeOutput(v **DeleteThemeOutput, sv.RequestId = ptr.String(jtv) } - case "ThemeId": + case "ScheduleId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ThemeId = ptr.String(jtv) + sv.ScheduleId = ptr.String(jtv) } default: @@ -9292,14 +9226,14 @@ func awsRestjson1_deserializeOpDocumentDeleteThemeOutput(v **DeleteThemeOutput, return nil } -type awsRestjson1_deserializeOpDeleteThemeAlias struct { +type awsRestjson1_deserializeOpDeleteRoleCustomPermission struct { } -func (*awsRestjson1_deserializeOpDeleteThemeAlias) ID() string { +func (*awsRestjson1_deserializeOpDeleteRoleCustomPermission) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteThemeAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteRoleCustomPermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9317,16 +9251,11 @@ func (m *awsRestjson1_deserializeOpDeleteThemeAlias) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteThemeAlias(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteRoleCustomPermission(response, &metadata) } - output := &DeleteThemeAliasOutput{} + output := &DeleteRoleCustomPermissionOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteThemeAliasOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -9345,7 +9274,7 @@ func (m *awsRestjson1_deserializeOpDeleteThemeAlias) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteThemeAliasOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteRoleCustomPermissionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9359,7 +9288,7 @@ func (m *awsRestjson1_deserializeOpDeleteThemeAlias) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteThemeAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteRoleCustomPermission(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9400,8 +9329,8 @@ func awsRestjson1_deserializeOpErrorDeleteThemeAlias(response *smithyhttp.Respon } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -9409,15 +9338,18 @@ func awsRestjson1_deserializeOpErrorDeleteThemeAlias(response *smithyhttp.Respon case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -9428,16 +9360,7 @@ func awsRestjson1_deserializeOpErrorDeleteThemeAlias(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpHttpBindingsDeleteThemeAliasOutput(v *DeleteThemeAliasOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - v.Status = int32(response.StatusCode) - - return nil -} -func awsRestjson1_deserializeOpDocumentDeleteThemeAliasOutput(v **DeleteThemeAliasOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteRoleCustomPermissionOutput(v **DeleteRoleCustomPermissionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9450,33 +9373,15 @@ func awsRestjson1_deserializeOpDocumentDeleteThemeAliasOutput(v **DeleteThemeAli return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteThemeAliasOutput + var sv *DeleteRoleCustomPermissionOutput if *v == nil { - sv = &DeleteThemeAliasOutput{} + sv = &DeleteRoleCustomPermissionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AliasName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AliasName to be of type string, got %T instead", value) - } - sv.AliasName = ptr.String(jtv) - } - - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -9486,13 +9391,17 @@ func awsRestjson1_deserializeOpDocumentDeleteThemeAliasOutput(v **DeleteThemeAli sv.RequestId = ptr.String(jtv) } - case "ThemeId": + case "Status": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) } - sv.ThemeId = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Status = int32(i64) } default: @@ -9504,14 +9413,14 @@ func awsRestjson1_deserializeOpDocumentDeleteThemeAliasOutput(v **DeleteThemeAli return nil } -type awsRestjson1_deserializeOpDeleteTopic struct { +type awsRestjson1_deserializeOpDeleteRoleMembership struct { } -func (*awsRestjson1_deserializeOpDeleteTopic) ID() string { +func (*awsRestjson1_deserializeOpDeleteRoleMembership) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteTopic) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteRoleMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9529,12 +9438,12 @@ func (m *awsRestjson1_deserializeOpDeleteTopic) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteTopic(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteRoleMembership(response, &metadata) } - output := &DeleteTopicOutput{} + output := &DeleteRoleMembershipOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteTopicOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteRoleMembershipOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -9557,7 +9466,7 @@ func (m *awsRestjson1_deserializeOpDeleteTopic) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteTopicOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteRoleMembershipOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9571,7 +9480,7 @@ func (m *awsRestjson1_deserializeOpDeleteTopic) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteTopic(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteRoleMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9615,18 +9524,21 @@ func awsRestjson1_deserializeOpErrorDeleteTopic(response *smithyhttp.Response, m case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -9640,7 +9552,7 @@ func awsRestjson1_deserializeOpErrorDeleteTopic(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpHttpBindingsDeleteTopicOutput(v *DeleteTopicOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteRoleMembershipOutput(v *DeleteRoleMembershipOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -9649,7 +9561,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteTopicOutput(v *DeleteTopicOutpu return nil } -func awsRestjson1_deserializeOpDocumentDeleteTopicOutput(v **DeleteTopicOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteRoleMembershipOutput(v **DeleteRoleMembershipOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9662,24 +9574,15 @@ func awsRestjson1_deserializeOpDocumentDeleteTopicOutput(v **DeleteTopicOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteTopicOutput + var sv *DeleteRoleMembershipOutput if *v == nil { - sv = &DeleteTopicOutput{} + sv = &DeleteRoleMembershipOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -9689,15 +9592,6 @@ func awsRestjson1_deserializeOpDocumentDeleteTopicOutput(v **DeleteTopicOutput, sv.RequestId = ptr.String(jtv) } - case "TopicId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TopicId to be of type string, got %T instead", value) - } - sv.TopicId = ptr.String(jtv) - } - default: _, _ = key, value @@ -9707,14 +9601,14 @@ func awsRestjson1_deserializeOpDocumentDeleteTopicOutput(v **DeleteTopicOutput, return nil } -type awsRestjson1_deserializeOpDeleteTopicRefreshSchedule struct { +type awsRestjson1_deserializeOpDeleteTemplate struct { } -func (*awsRestjson1_deserializeOpDeleteTopicRefreshSchedule) ID() string { +func (*awsRestjson1_deserializeOpDeleteTemplate) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteTopicRefreshSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9732,12 +9626,12 @@ func (m *awsRestjson1_deserializeOpDeleteTopicRefreshSchedule) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteTopicRefreshSchedule(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteTemplate(response, &metadata) } - output := &DeleteTopicRefreshScheduleOutput{} + output := &DeleteTemplateOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteTopicRefreshScheduleOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteTemplateOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -9760,7 +9654,7 @@ func (m *awsRestjson1_deserializeOpDeleteTopicRefreshSchedule) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteTopicRefreshScheduleOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteTemplateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9774,7 +9668,7 @@ func (m *awsRestjson1_deserializeOpDeleteTopicRefreshSchedule) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteTopicRefreshSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9815,9 +9709,6 @@ func awsRestjson1_deserializeOpErrorDeleteTopicRefreshSchedule(response *smithyh } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) @@ -9830,15 +9721,15 @@ func awsRestjson1_deserializeOpErrorDeleteTopicRefreshSchedule(response *smithyh case strings.EqualFold("LimitExceededException", errorCode): return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -9849,7 +9740,7 @@ func awsRestjson1_deserializeOpErrorDeleteTopicRefreshSchedule(response *smithyh } } -func awsRestjson1_deserializeOpHttpBindingsDeleteTopicRefreshScheduleOutput(v *DeleteTopicRefreshScheduleOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteTemplateOutput(v *DeleteTemplateOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -9858,7 +9749,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteTopicRefreshScheduleOutput(v *D return nil } -func awsRestjson1_deserializeOpDocumentDeleteTopicRefreshScheduleOutput(v **DeleteTopicRefreshScheduleOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteTemplateOutput(v **DeleteTemplateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9871,22 +9762,22 @@ func awsRestjson1_deserializeOpDocumentDeleteTopicRefreshScheduleOutput(v **Dele return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteTopicRefreshScheduleOutput + var sv *DeleteTemplateOutput if *v == nil { - sv = &DeleteTopicRefreshScheduleOutput{} + sv = &DeleteTemplateOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DatasetArn": + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.DatasetArn = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } case "RequestId": @@ -9898,22 +9789,13 @@ func awsRestjson1_deserializeOpDocumentDeleteTopicRefreshScheduleOutput(v **Dele sv.RequestId = ptr.String(jtv) } - case "TopicArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.TopicArn = ptr.String(jtv) - } - - case "TopicId": + case "TemplateId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TopicId to be of type string, got %T instead", value) + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) } - sv.TopicId = ptr.String(jtv) + sv.TemplateId = ptr.String(jtv) } default: @@ -9925,14 +9807,14 @@ func awsRestjson1_deserializeOpDocumentDeleteTopicRefreshScheduleOutput(v **Dele return nil } -type awsRestjson1_deserializeOpDeleteUser struct { +type awsRestjson1_deserializeOpDeleteTemplateAlias struct { } -func (*awsRestjson1_deserializeOpDeleteUser) ID() string { +func (*awsRestjson1_deserializeOpDeleteTemplateAlias) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteTemplateAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9950,12 +9832,12 @@ func (m *awsRestjson1_deserializeOpDeleteUser) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteTemplateAlias(response, &metadata) } - output := &DeleteUserOutput{} + output := &DeleteTemplateAliasOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteUserOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteTemplateAliasOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -9978,7 +9860,7 @@ func (m *awsRestjson1_deserializeOpDeleteUser) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteUserOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteTemplateAliasOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9992,7 +9874,7 @@ func (m *awsRestjson1_deserializeOpDeleteUser) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteTemplateAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -10033,27 +9915,21 @@ func awsRestjson1_deserializeOpErrorDeleteUser(response *smithyhttp.Response, me } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -10064,7 +9940,7 @@ func awsRestjson1_deserializeOpErrorDeleteUser(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpHttpBindingsDeleteUserOutput(v *DeleteUserOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteTemplateAliasOutput(v *DeleteTemplateAliasOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -10073,7 +9949,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteUserOutput(v *DeleteUserOutput, return nil } -func awsRestjson1_deserializeOpDocumentDeleteUserOutput(v **DeleteUserOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteTemplateAliasOutput(v **DeleteTemplateAliasOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10086,15 +9962,33 @@ func awsRestjson1_deserializeOpDocumentDeleteUserOutput(v **DeleteUserOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteUserOutput + var sv *DeleteTemplateAliasOutput if *v == nil { - sv = &DeleteUserOutput{} + sv = &DeleteTemplateAliasOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "AliasName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AliasName to be of type string, got %T instead", value) + } + sv.AliasName = ptr.String(jtv) + } + + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -10104,6 +9998,15 @@ func awsRestjson1_deserializeOpDocumentDeleteUserOutput(v **DeleteUserOutput, va sv.RequestId = ptr.String(jtv) } + case "TemplateId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.TemplateId = ptr.String(jtv) + } + default: _, _ = key, value @@ -10113,14 +10016,14 @@ func awsRestjson1_deserializeOpDocumentDeleteUserOutput(v **DeleteUserOutput, va return nil } -type awsRestjson1_deserializeOpDeleteUserByPrincipalId struct { +type awsRestjson1_deserializeOpDeleteTheme struct { } -func (*awsRestjson1_deserializeOpDeleteUserByPrincipalId) ID() string { +func (*awsRestjson1_deserializeOpDeleteTheme) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteUserByPrincipalId) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteTheme) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -10138,12 +10041,12 @@ func (m *awsRestjson1_deserializeOpDeleteUserByPrincipalId) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteUserByPrincipalId(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteTheme(response, &metadata) } - output := &DeleteUserByPrincipalIdOutput{} + output := &DeleteThemeOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteUserByPrincipalIdOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteThemeOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -10166,7 +10069,7 @@ func (m *awsRestjson1_deserializeOpDeleteUserByPrincipalId) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteUserByPrincipalIdOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteThemeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10180,7 +10083,7 @@ func (m *awsRestjson1_deserializeOpDeleteUserByPrincipalId) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteUserByPrincipalId(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteTheme(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -10224,24 +10127,24 @@ func awsRestjson1_deserializeOpErrorDeleteUserByPrincipalId(response *smithyhttp case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -10252,7 +10155,7 @@ func awsRestjson1_deserializeOpErrorDeleteUserByPrincipalId(response *smithyhttp } } -func awsRestjson1_deserializeOpHttpBindingsDeleteUserByPrincipalIdOutput(v *DeleteUserByPrincipalIdOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteThemeOutput(v *DeleteThemeOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -10261,7 +10164,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteUserByPrincipalIdOutput(v *Dele return nil } -func awsRestjson1_deserializeOpDocumentDeleteUserByPrincipalIdOutput(v **DeleteUserByPrincipalIdOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteThemeOutput(v **DeleteThemeOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10274,15 +10177,24 @@ func awsRestjson1_deserializeOpDocumentDeleteUserByPrincipalIdOutput(v **DeleteU return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteUserByPrincipalIdOutput + var sv *DeleteThemeOutput if *v == nil { - sv = &DeleteUserByPrincipalIdOutput{} + sv = &DeleteThemeOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -10292,6 +10204,15 @@ func awsRestjson1_deserializeOpDocumentDeleteUserByPrincipalIdOutput(v **DeleteU sv.RequestId = ptr.String(jtv) } + case "ThemeId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.ThemeId = ptr.String(jtv) + } + default: _, _ = key, value @@ -10301,14 +10222,14 @@ func awsRestjson1_deserializeOpDocumentDeleteUserByPrincipalIdOutput(v **DeleteU return nil } -type awsRestjson1_deserializeOpDeleteVPCConnection struct { +type awsRestjson1_deserializeOpDeleteThemeAlias struct { } -func (*awsRestjson1_deserializeOpDeleteVPCConnection) ID() string { +func (*awsRestjson1_deserializeOpDeleteThemeAlias) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteVPCConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteThemeAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -10326,12 +10247,12 @@ func (m *awsRestjson1_deserializeOpDeleteVPCConnection) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteVPCConnection(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteThemeAlias(response, &metadata) } - output := &DeleteVPCConnectionOutput{} + output := &DeleteThemeAliasOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDeleteVPCConnectionOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteThemeAliasOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -10354,7 +10275,7 @@ func (m *awsRestjson1_deserializeOpDeleteVPCConnection) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteVPCConnectionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteThemeAliasOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10368,7 +10289,7 @@ func (m *awsRestjson1_deserializeOpDeleteVPCConnection) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteVPCConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteThemeAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -10409,9 +10330,6 @@ func awsRestjson1_deserializeOpErrorDeleteVPCConnection(response *smithyhttp.Res } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) @@ -10440,7 +10358,7 @@ func awsRestjson1_deserializeOpErrorDeleteVPCConnection(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpHttpBindingsDeleteVPCConnectionOutput(v *DeleteVPCConnectionOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteThemeAliasOutput(v *DeleteThemeAliasOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -10449,7 +10367,7 @@ func awsRestjson1_deserializeOpHttpBindingsDeleteVPCConnectionOutput(v *DeleteVP return nil } -func awsRestjson1_deserializeOpDocumentDeleteVPCConnectionOutput(v **DeleteVPCConnectionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteThemeAliasOutput(v **DeleteThemeAliasOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10462,40 +10380,31 @@ func awsRestjson1_deserializeOpDocumentDeleteVPCConnectionOutput(v **DeleteVPCCo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteVPCConnectionOutput + var sv *DeleteThemeAliasOutput if *v == nil { - sv = &DeleteVPCConnectionOutput{} + sv = &DeleteThemeAliasOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "AvailabilityStatus": + case "AliasName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected VPCConnectionAvailabilityStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected AliasName to be of type string, got %T instead", value) } - sv.AvailabilityStatus = types.VPCConnectionAvailabilityStatus(jtv) + sv.AliasName = ptr.String(jtv) } - case "DeletionStatus": + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected VPCConnectionResourceStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.DeletionStatus = types.VPCConnectionResourceStatus(jtv) + sv.Arn = ptr.String(jtv) } case "RequestId": @@ -10507,13 +10416,13 @@ func awsRestjson1_deserializeOpDocumentDeleteVPCConnectionOutput(v **DeleteVPCCo sv.RequestId = ptr.String(jtv) } - case "VPCConnectionId": + case "ThemeId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected VPCConnectionResourceIdUnrestricted to be of type string, got %T instead", value) + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) } - sv.VPCConnectionId = ptr.String(jtv) + sv.ThemeId = ptr.String(jtv) } default: @@ -10525,14 +10434,14 @@ func awsRestjson1_deserializeOpDocumentDeleteVPCConnectionOutput(v **DeleteVPCCo return nil } -type awsRestjson1_deserializeOpDescribeAccountCustomization struct { +type awsRestjson1_deserializeOpDeleteTopic struct { } -func (*awsRestjson1_deserializeOpDescribeAccountCustomization) ID() string { +func (*awsRestjson1_deserializeOpDeleteTopic) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeAccountCustomization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteTopic) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -10550,12 +10459,12 @@ func (m *awsRestjson1_deserializeOpDescribeAccountCustomization) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeAccountCustomization(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteTopic(response, &metadata) } - output := &DescribeAccountCustomizationOutput{} + output := &DeleteTopicOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeAccountCustomizationOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteTopicOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -10578,7 +10487,7 @@ func (m *awsRestjson1_deserializeOpDescribeAccountCustomization) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeAccountCustomizationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteTopicOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10592,7 +10501,7 @@ func (m *awsRestjson1_deserializeOpDescribeAccountCustomization) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeAccountCustomization(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteTopic(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -10636,6 +10545,9 @@ func awsRestjson1_deserializeOpErrorDescribeAccountCustomization(response *smith case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -10645,9 +10557,6 @@ func awsRestjson1_deserializeOpErrorDescribeAccountCustomization(response *smith case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -10661,7 +10570,7 @@ func awsRestjson1_deserializeOpErrorDescribeAccountCustomization(response *smith } } -func awsRestjson1_deserializeOpHttpBindingsDescribeAccountCustomizationOutput(v *DescribeAccountCustomizationOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteTopicOutput(v *DeleteTopicOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -10670,7 +10579,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeAccountCustomizationOutput(v return nil } -func awsRestjson1_deserializeOpDocumentDescribeAccountCustomizationOutput(v **DescribeAccountCustomizationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteTopicOutput(v **DeleteTopicOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10683,20 +10592,15 @@ func awsRestjson1_deserializeOpDocumentDescribeAccountCustomizationOutput(v **De return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeAccountCustomizationOutput + var sv *DeleteTopicOutput if *v == nil { - sv = &DescribeAccountCustomizationOutput{} + sv = &DeleteTopicOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AccountCustomization": - if err := awsRestjson1_deserializeDocumentAccountCustomization(&sv.AccountCustomization, value); err != nil { - return err - } - case "Arn": if value != nil { jtv, ok := value.(string) @@ -10706,31 +10610,22 @@ func awsRestjson1_deserializeOpDocumentDescribeAccountCustomizationOutput(v **De sv.Arn = ptr.String(jtv) } - case "AwsAccountId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) - } - sv.AwsAccountId = ptr.String(jtv) - } - - case "Namespace": + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Namespace to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Namespace = ptr.String(jtv) + sv.RequestId = ptr.String(jtv) } - case "RequestId": + case "TopicId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected TopicId to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.TopicId = ptr.String(jtv) } default: @@ -10742,14 +10637,14 @@ func awsRestjson1_deserializeOpDocumentDescribeAccountCustomizationOutput(v **De return nil } -type awsRestjson1_deserializeOpDescribeAccountSettings struct { +type awsRestjson1_deserializeOpDeleteTopicRefreshSchedule struct { } -func (*awsRestjson1_deserializeOpDescribeAccountSettings) ID() string { +func (*awsRestjson1_deserializeOpDeleteTopicRefreshSchedule) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteTopicRefreshSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -10767,12 +10662,12 @@ func (m *awsRestjson1_deserializeOpDescribeAccountSettings) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeAccountSettings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteTopicRefreshSchedule(response, &metadata) } - output := &DescribeAccountSettingsOutput{} + output := &DeleteTopicRefreshScheduleOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeAccountSettingsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteTopicRefreshScheduleOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -10795,7 +10690,7 @@ func (m *awsRestjson1_deserializeOpDescribeAccountSettings) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeAccountSettingsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteTopicRefreshScheduleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10809,7 +10704,7 @@ func (m *awsRestjson1_deserializeOpDescribeAccountSettings) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteTopicRefreshSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -10853,18 +10748,24 @@ func awsRestjson1_deserializeOpErrorDescribeAccountSettings(response *smithyhttp case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -10878,7 +10779,7 @@ func awsRestjson1_deserializeOpErrorDescribeAccountSettings(response *smithyhttp } } -func awsRestjson1_deserializeOpHttpBindingsDescribeAccountSettingsOutput(v *DescribeAccountSettingsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteTopicRefreshScheduleOutput(v *DeleteTopicRefreshScheduleOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -10887,7 +10788,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeAccountSettingsOutput(v *Desc return nil } -func awsRestjson1_deserializeOpDocumentDescribeAccountSettingsOutput(v **DescribeAccountSettingsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteTopicRefreshScheduleOutput(v **DeleteTopicRefreshScheduleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10900,18 +10801,22 @@ func awsRestjson1_deserializeOpDocumentDescribeAccountSettingsOutput(v **Describ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeAccountSettingsOutput + var sv *DeleteTopicRefreshScheduleOutput if *v == nil { - sv = &DescribeAccountSettingsOutput{} + sv = &DeleteTopicRefreshScheduleOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AccountSettings": - if err := awsRestjson1_deserializeDocumentAccountSettings(&sv.AccountSettings, value); err != nil { - return err + case "DatasetArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.DatasetArn = ptr.String(jtv) } case "RequestId": @@ -10923,6 +10828,24 @@ func awsRestjson1_deserializeOpDocumentDescribeAccountSettingsOutput(v **Describ sv.RequestId = ptr.String(jtv) } + case "TopicArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.TopicArn = ptr.String(jtv) + } + + case "TopicId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TopicId to be of type string, got %T instead", value) + } + sv.TopicId = ptr.String(jtv) + } + default: _, _ = key, value @@ -10932,14 +10855,14 @@ func awsRestjson1_deserializeOpDocumentDescribeAccountSettingsOutput(v **Describ return nil } -type awsRestjson1_deserializeOpDescribeAccountSubscription struct { +type awsRestjson1_deserializeOpDeleteUser struct { } -func (*awsRestjson1_deserializeOpDescribeAccountSubscription) ID() string { +func (*awsRestjson1_deserializeOpDeleteUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeAccountSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -10957,12 +10880,12 @@ func (m *awsRestjson1_deserializeOpDescribeAccountSubscription) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeAccountSubscription(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteUser(response, &metadata) } - output := &DescribeAccountSubscriptionOutput{} + output := &DeleteUserOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeAccountSubscriptionOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteUserOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -10985,7 +10908,7 @@ func (m *awsRestjson1_deserializeOpDescribeAccountSubscription) HandleDeserializ return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeAccountSubscriptionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10999,7 +10922,7 @@ func (m *awsRestjson1_deserializeOpDescribeAccountSubscription) HandleDeserializ return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeAccountSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11049,6 +10972,9 @@ func awsRestjson1_deserializeOpErrorDescribeAccountSubscription(response *smithy case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -11068,7 +10994,7 @@ func awsRestjson1_deserializeOpErrorDescribeAccountSubscription(response *smithy } } -func awsRestjson1_deserializeOpHttpBindingsDescribeAccountSubscriptionOutput(v *DescribeAccountSubscriptionOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteUserOutput(v *DeleteUserOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -11077,7 +11003,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeAccountSubscriptionOutput(v * return nil } -func awsRestjson1_deserializeOpDocumentDescribeAccountSubscriptionOutput(v **DescribeAccountSubscriptionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteUserOutput(v **DeleteUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11090,20 +11016,15 @@ func awsRestjson1_deserializeOpDocumentDescribeAccountSubscriptionOutput(v **Des return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeAccountSubscriptionOutput + var sv *DeleteUserOutput if *v == nil { - sv = &DescribeAccountSubscriptionOutput{} + sv = &DeleteUserOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AccountInfo": - if err := awsRestjson1_deserializeDocumentAccountInfo(&sv.AccountInfo, value); err != nil { - return err - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -11122,14 +11043,14 @@ func awsRestjson1_deserializeOpDocumentDescribeAccountSubscriptionOutput(v **Des return nil } -type awsRestjson1_deserializeOpDescribeAnalysis struct { +type awsRestjson1_deserializeOpDeleteUserByPrincipalId struct { } -func (*awsRestjson1_deserializeOpDescribeAnalysis) ID() string { +func (*awsRestjson1_deserializeOpDeleteUserByPrincipalId) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteUserByPrincipalId) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11147,12 +11068,12 @@ func (m *awsRestjson1_deserializeOpDescribeAnalysis) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeAnalysis(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteUserByPrincipalId(response, &metadata) } - output := &DescribeAnalysisOutput{} + output := &DeleteUserByPrincipalIdOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeAnalysisOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteUserByPrincipalIdOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -11175,7 +11096,7 @@ func (m *awsRestjson1_deserializeOpDescribeAnalysis) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeAnalysisOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteUserByPrincipalIdOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11189,7 +11110,7 @@ func (m *awsRestjson1_deserializeOpDescribeAnalysis) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteUserByPrincipalId(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11239,15 +11160,18 @@ func awsRestjson1_deserializeOpErrorDescribeAnalysis(response *smithyhttp.Respon case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -11258,7 +11182,7 @@ func awsRestjson1_deserializeOpErrorDescribeAnalysis(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpHttpBindingsDescribeAnalysisOutput(v *DescribeAnalysisOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteUserByPrincipalIdOutput(v *DeleteUserByPrincipalIdOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -11267,7 +11191,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeAnalysisOutput(v *DescribeAna return nil } -func awsRestjson1_deserializeOpDocumentDescribeAnalysisOutput(v **DescribeAnalysisOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteUserByPrincipalIdOutput(v **DeleteUserByPrincipalIdOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11280,20 +11204,15 @@ func awsRestjson1_deserializeOpDocumentDescribeAnalysisOutput(v **DescribeAnalys return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeAnalysisOutput + var sv *DeleteUserByPrincipalIdOutput if *v == nil { - sv = &DescribeAnalysisOutput{} + sv = &DeleteUserByPrincipalIdOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Analysis": - if err := awsRestjson1_deserializeDocumentAnalysis(&sv.Analysis, value); err != nil { - return err - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -11312,14 +11231,14 @@ func awsRestjson1_deserializeOpDocumentDescribeAnalysisOutput(v **DescribeAnalys return nil } -type awsRestjson1_deserializeOpDescribeAnalysisDefinition struct { +type awsRestjson1_deserializeOpDeleteUserCustomPermission struct { } -func (*awsRestjson1_deserializeOpDescribeAnalysisDefinition) ID() string { +func (*awsRestjson1_deserializeOpDeleteUserCustomPermission) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeAnalysisDefinition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteUserCustomPermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11337,12 +11256,12 @@ func (m *awsRestjson1_deserializeOpDescribeAnalysisDefinition) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeAnalysisDefinition(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteUserCustomPermission(response, &metadata) } - output := &DescribeAnalysisDefinitionOutput{} + output := &DeleteUserCustomPermissionOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeAnalysisDefinitionOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteUserCustomPermissionOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -11365,7 +11284,7 @@ func (m *awsRestjson1_deserializeOpDescribeAnalysisDefinition) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeAnalysisDefinitionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteUserCustomPermissionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11379,7 +11298,7 @@ func (m *awsRestjson1_deserializeOpDescribeAnalysisDefinition) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeAnalysisDefinition(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteUserCustomPermission(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11432,18 +11351,18 @@ func awsRestjson1_deserializeOpErrorDescribeAnalysisDefinition(response *smithyh case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -11454,7 +11373,7 @@ func awsRestjson1_deserializeOpErrorDescribeAnalysisDefinition(response *smithyh } } -func awsRestjson1_deserializeOpHttpBindingsDescribeAnalysisDefinitionOutput(v *DescribeAnalysisDefinitionOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteUserCustomPermissionOutput(v *DeleteUserCustomPermissionOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -11463,7 +11382,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeAnalysisDefinitionOutput(v *D return nil } -func awsRestjson1_deserializeOpDocumentDescribeAnalysisDefinitionOutput(v **DescribeAnalysisDefinitionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteUserCustomPermissionOutput(v **DeleteUserCustomPermissionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11476,43 +11395,15 @@ func awsRestjson1_deserializeOpDocumentDescribeAnalysisDefinitionOutput(v **Desc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeAnalysisDefinitionOutput + var sv *DeleteUserCustomPermissionOutput if *v == nil { - sv = &DescribeAnalysisDefinitionOutput{} + sv = &DeleteUserCustomPermissionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AnalysisId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.AnalysisId = ptr.String(jtv) - } - - case "Definition": - if err := awsRestjson1_deserializeDocumentAnalysisDefinition(&sv.Definition, value); err != nil { - return err - } - - case "Errors": - if err := awsRestjson1_deserializeDocumentAnalysisErrorList(&sv.Errors, value); err != nil { - return err - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AnalysisName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -11522,24 +11413,6 @@ func awsRestjson1_deserializeOpDocumentDescribeAnalysisDefinitionOutput(v **Desc sv.RequestId = ptr.String(jtv) } - case "ResourceStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) - } - sv.ResourceStatus = types.ResourceStatus(jtv) - } - - case "ThemeArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.ThemeArn = ptr.String(jtv) - } - default: _, _ = key, value @@ -11549,14 +11422,14 @@ func awsRestjson1_deserializeOpDocumentDescribeAnalysisDefinitionOutput(v **Desc return nil } -type awsRestjson1_deserializeOpDescribeAnalysisPermissions struct { +type awsRestjson1_deserializeOpDeleteVPCConnection struct { } -func (*awsRestjson1_deserializeOpDescribeAnalysisPermissions) ID() string { +func (*awsRestjson1_deserializeOpDeleteVPCConnection) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeAnalysisPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteVPCConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11574,12 +11447,12 @@ func (m *awsRestjson1_deserializeOpDescribeAnalysisPermissions) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeAnalysisPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteVPCConnection(response, &metadata) } - output := &DescribeAnalysisPermissionsOutput{} + output := &DeleteVPCConnectionOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeAnalysisPermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDeleteVPCConnectionOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -11602,7 +11475,7 @@ func (m *awsRestjson1_deserializeOpDescribeAnalysisPermissions) HandleDeserializ return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeAnalysisPermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteVPCConnectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11616,7 +11489,7 @@ func (m *awsRestjson1_deserializeOpDescribeAnalysisPermissions) HandleDeserializ return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeAnalysisPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteVPCConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11657,6 +11530,12 @@ func awsRestjson1_deserializeOpErrorDescribeAnalysisPermissions(response *smithy } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -11682,7 +11561,7 @@ func awsRestjson1_deserializeOpErrorDescribeAnalysisPermissions(response *smithy } } -func awsRestjson1_deserializeOpHttpBindingsDescribeAnalysisPermissionsOutput(v *DescribeAnalysisPermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDeleteVPCConnectionOutput(v *DeleteVPCConnectionOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -11691,7 +11570,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeAnalysisPermissionsOutput(v * return nil } -func awsRestjson1_deserializeOpDocumentDescribeAnalysisPermissionsOutput(v **DescribeAnalysisPermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteVPCConnectionOutput(v **DeleteVPCConnectionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11704,36 +11583,40 @@ func awsRestjson1_deserializeOpDocumentDescribeAnalysisPermissionsOutput(v **Des return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeAnalysisPermissionsOutput + var sv *DeleteVPCConnectionOutput if *v == nil { - sv = &DescribeAnalysisPermissionsOutput{} + sv = &DeleteVPCConnectionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AnalysisArn": + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.AnalysisArn = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } - case "AnalysisId": + case "AvailabilityStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected VPCConnectionAvailabilityStatus to be of type string, got %T instead", value) } - sv.AnalysisId = ptr.String(jtv) + sv.AvailabilityStatus = types.VPCConnectionAvailabilityStatus(jtv) } - case "Permissions": - if err := awsRestjson1_deserializeDocumentUpdateResourcePermissionList(&sv.Permissions, value); err != nil { - return err + case "DeletionStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VPCConnectionResourceStatus to be of type string, got %T instead", value) + } + sv.DeletionStatus = types.VPCConnectionResourceStatus(jtv) } case "RequestId": @@ -11745,6 +11628,15 @@ func awsRestjson1_deserializeOpDocumentDescribeAnalysisPermissionsOutput(v **Des sv.RequestId = ptr.String(jtv) } + case "VPCConnectionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VPCConnectionResourceIdUnrestricted to be of type string, got %T instead", value) + } + sv.VPCConnectionId = ptr.String(jtv) + } + default: _, _ = key, value @@ -11754,14 +11646,14 @@ func awsRestjson1_deserializeOpDocumentDescribeAnalysisPermissionsOutput(v **Des return nil } -type awsRestjson1_deserializeOpDescribeAssetBundleExportJob struct { +type awsRestjson1_deserializeOpDescribeAccountCustomization struct { } -func (*awsRestjson1_deserializeOpDescribeAssetBundleExportJob) ID() string { +func (*awsRestjson1_deserializeOpDescribeAccountCustomization) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeAssetBundleExportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeAccountCustomization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11779,12 +11671,12 @@ func (m *awsRestjson1_deserializeOpDescribeAssetBundleExportJob) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeAssetBundleExportJob(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeAccountCustomization(response, &metadata) } - output := &DescribeAssetBundleExportJobOutput{} + output := &DescribeAccountCustomizationOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeAssetBundleExportJobOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeAccountCustomizationOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -11807,7 +11699,7 @@ func (m *awsRestjson1_deserializeOpDescribeAssetBundleExportJob) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeAssetBundleExportJobOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeAccountCustomizationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11821,7 +11713,7 @@ func (m *awsRestjson1_deserializeOpDescribeAssetBundleExportJob) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeAssetBundleExportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeAccountCustomization(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11862,15 +11754,24 @@ func awsRestjson1_deserializeOpErrorDescribeAssetBundleExportJob(response *smith } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -11881,7 +11782,7 @@ func awsRestjson1_deserializeOpErrorDescribeAssetBundleExportJob(response *smith } } -func awsRestjson1_deserializeOpHttpBindingsDescribeAssetBundleExportJobOutput(v *DescribeAssetBundleExportJobOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeAccountCustomizationOutput(v *DescribeAccountCustomizationOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -11890,7 +11791,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeAssetBundleExportJobOutput(v return nil } -func awsRestjson1_deserializeOpDocumentDescribeAssetBundleExportJobOutput(v **DescribeAssetBundleExportJobOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeAccountCustomizationOutput(v **DescribeAccountCustomizationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11903,15 +11804,20 @@ func awsRestjson1_deserializeOpDocumentDescribeAssetBundleExportJobOutput(v **De return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeAssetBundleExportJobOutput + var sv *DescribeAccountCustomizationOutput if *v == nil { - sv = &DescribeAssetBundleExportJobOutput{} + sv = &DescribeAccountCustomizationOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "AccountCustomization": + if err := awsRestjson1_deserializeDocumentAccountCustomization(&sv.AccountCustomization, value); err != nil { + return err + } + case "Arn": if value != nil { jtv, ok := value.(string) @@ -11921,15 +11827,6 @@ func awsRestjson1_deserializeOpDocumentDescribeAssetBundleExportJobOutput(v **De sv.Arn = ptr.String(jtv) } - case "AssetBundleExportJobId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.AssetBundleExportJobId = ptr.String(jtv) - } - case "AwsAccountId": if value != nil { jtv, ok := value.(string) @@ -11939,128 +11836,24 @@ func awsRestjson1_deserializeOpDocumentDescribeAssetBundleExportJobOutput(v **De sv.AwsAccountId = ptr.String(jtv) } - case "CloudFormationOverridePropertyConfiguration": - if err := awsRestjson1_deserializeDocumentAssetBundleCloudFormationOverridePropertyConfiguration(&sv.CloudFormationOverridePropertyConfiguration, value); err != nil { - return err - } - - case "CreatedTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "DownloadUrl": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveS3Uri to be of type string, got %T instead", value) - } - sv.DownloadUrl = ptr.String(jtv) - } - - case "Errors": - if err := awsRestjson1_deserializeDocumentAssetBundleExportJobErrorList(&sv.Errors, value); err != nil { - return err - } - - case "ExportFormat": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AssetBundleExportFormat to be of type string, got %T instead", value) - } - sv.ExportFormat = types.AssetBundleExportFormat(jtv) - } - - case "IncludeAllDependencies": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.IncludeAllDependencies = jtv - } - - case "IncludeFolderMembers": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected IncludeFolderMembers to be of type string, got %T instead", value) - } - sv.IncludeFolderMembers = types.IncludeFolderMembers(jtv) - } - - case "IncludeFolderMemberships": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.IncludeFolderMemberships = jtv - } - - case "IncludePermissions": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.IncludePermissions = jtv - } - - case "IncludeTags": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.IncludeTags = jtv - } - - case "JobStatus": + case "Namespace": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AssetBundleExportJobStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected Namespace to be of type string, got %T instead", value) } - sv.JobStatus = types.AssetBundleExportJobStatus(jtv) + sv.Namespace = ptr.String(jtv) } case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } - case "ResourceArns": - if err := awsRestjson1_deserializeDocumentAssetBundleResourceArns(&sv.ResourceArns, value); err != nil { - return err - } - - case "ValidationStrategy": - if err := awsRestjson1_deserializeDocumentAssetBundleExportJobValidationStrategy(&sv.ValidationStrategy, value); err != nil { - return err - } - - case "Warnings": - if err := awsRestjson1_deserializeDocumentAssetBundleExportJobWarningList(&sv.Warnings, value); err != nil { - return err - } - default: _, _ = key, value @@ -12070,14 +11863,14 @@ func awsRestjson1_deserializeOpDocumentDescribeAssetBundleExportJobOutput(v **De return nil } -type awsRestjson1_deserializeOpDescribeAssetBundleImportJob struct { +type awsRestjson1_deserializeOpDescribeAccountSettings struct { } -func (*awsRestjson1_deserializeOpDescribeAssetBundleImportJob) ID() string { +func (*awsRestjson1_deserializeOpDescribeAccountSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeAssetBundleImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -12095,12 +11888,12 @@ func (m *awsRestjson1_deserializeOpDescribeAssetBundleImportJob) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeAssetBundleImportJob(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeAccountSettings(response, &metadata) } - output := &DescribeAssetBundleImportJobOutput{} + output := &DescribeAccountSettingsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeAssetBundleImportJobOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeAccountSettingsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -12123,7 +11916,7 @@ func (m *awsRestjson1_deserializeOpDescribeAssetBundleImportJob) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeAssetBundleImportJobOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeAccountSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12137,7 +11930,7 @@ func (m *awsRestjson1_deserializeOpDescribeAssetBundleImportJob) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeAssetBundleImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -12178,15 +11971,24 @@ func awsRestjson1_deserializeOpErrorDescribeAssetBundleImportJob(response *smith } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -12197,7 +11999,7 @@ func awsRestjson1_deserializeOpErrorDescribeAssetBundleImportJob(response *smith } } -func awsRestjson1_deserializeOpHttpBindingsDescribeAssetBundleImportJobOutput(v *DescribeAssetBundleImportJobOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeAccountSettingsOutput(v *DescribeAccountSettingsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -12206,7 +12008,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeAssetBundleImportJobOutput(v return nil } -func awsRestjson1_deserializeOpDocumentDescribeAssetBundleImportJobOutput(v **DescribeAssetBundleImportJobOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeAccountSettingsOutput(v **DescribeAccountSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12219,103 +12021,17 @@ func awsRestjson1_deserializeOpDocumentDescribeAssetBundleImportJobOutput(v **De return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeAssetBundleImportJobOutput + var sv *DescribeAccountSettingsOutput if *v == nil { - sv = &DescribeAssetBundleImportJobOutput{} + sv = &DescribeAccountSettingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "AssetBundleImportJobId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.AssetBundleImportJobId = ptr.String(jtv) - } - - case "AssetBundleImportSource": - if err := awsRestjson1_deserializeDocumentAssetBundleImportSourceDescription(&sv.AssetBundleImportSource, value); err != nil { - return err - } - - case "AwsAccountId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) - } - sv.AwsAccountId = ptr.String(jtv) - } - - case "CreatedTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "Errors": - if err := awsRestjson1_deserializeDocumentAssetBundleImportJobErrorList(&sv.Errors, value); err != nil { - return err - } - - case "FailureAction": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AssetBundleImportFailureAction to be of type string, got %T instead", value) - } - sv.FailureAction = types.AssetBundleImportFailureAction(jtv) - } - - case "JobStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AssetBundleImportJobStatus to be of type string, got %T instead", value) - } - sv.JobStatus = types.AssetBundleImportJobStatus(jtv) - } - - case "OverrideParameters": - if err := awsRestjson1_deserializeDocumentAssetBundleImportJobOverrideParameters(&sv.OverrideParameters, value); err != nil { - return err - } - - case "OverridePermissions": - if err := awsRestjson1_deserializeDocumentAssetBundleImportJobOverridePermissions(&sv.OverridePermissions, value); err != nil { - return err - } - - case "OverrideTags": - if err := awsRestjson1_deserializeDocumentAssetBundleImportJobOverrideTags(&sv.OverrideTags, value); err != nil { - return err - } - - case "OverrideValidationStrategy": - if err := awsRestjson1_deserializeDocumentAssetBundleImportJobOverrideValidationStrategy(&sv.OverrideValidationStrategy, value); err != nil { + case "AccountSettings": + if err := awsRestjson1_deserializeDocumentAccountSettings(&sv.AccountSettings, value); err != nil { return err } @@ -12323,21 +12039,11 @@ func awsRestjson1_deserializeOpDocumentDescribeAssetBundleImportJobOutput(v **De if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } - case "RollbackErrors": - if err := awsRestjson1_deserializeDocumentAssetBundleImportJobErrorList(&sv.RollbackErrors, value); err != nil { - return err - } - - case "Warnings": - if err := awsRestjson1_deserializeDocumentAssetBundleImportJobWarningList(&sv.Warnings, value); err != nil { - return err - } - default: _, _ = key, value @@ -12347,14 +12053,14 @@ func awsRestjson1_deserializeOpDocumentDescribeAssetBundleImportJobOutput(v **De return nil } -type awsRestjson1_deserializeOpDescribeDashboard struct { +type awsRestjson1_deserializeOpDescribeAccountSubscription struct { } -func (*awsRestjson1_deserializeOpDescribeDashboard) ID() string { +func (*awsRestjson1_deserializeOpDescribeAccountSubscription) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDashboard) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeAccountSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -12372,12 +12078,12 @@ func (m *awsRestjson1_deserializeOpDescribeDashboard) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDashboard(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeAccountSubscription(response, &metadata) } - output := &DescribeDashboardOutput{} + output := &DescribeAccountSubscriptionOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeDashboardOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeAccountSubscriptionOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -12400,7 +12106,7 @@ func (m *awsRestjson1_deserializeOpDescribeDashboard) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDashboardOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeAccountSubscriptionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12414,7 +12120,7 @@ func (m *awsRestjson1_deserializeOpDescribeDashboard) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDashboard(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeAccountSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -12467,12 +12173,12 @@ func awsRestjson1_deserializeOpErrorDescribeDashboard(response *smithyhttp.Respo case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -12483,7 +12189,7 @@ func awsRestjson1_deserializeOpErrorDescribeDashboard(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpHttpBindingsDescribeDashboardOutput(v *DescribeDashboardOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeAccountSubscriptionOutput(v *DescribeAccountSubscriptionOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -12492,7 +12198,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeDashboardOutput(v *DescribeDa return nil } -func awsRestjson1_deserializeOpDocumentDescribeDashboardOutput(v **DescribeDashboardOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeAccountSubscriptionOutput(v **DescribeAccountSubscriptionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12505,17 +12211,17 @@ func awsRestjson1_deserializeOpDocumentDescribeDashboardOutput(v **DescribeDashb return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDashboardOutput + var sv *DescribeAccountSubscriptionOutput if *v == nil { - sv = &DescribeDashboardOutput{} + sv = &DescribeAccountSubscriptionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Dashboard": - if err := awsRestjson1_deserializeDocumentDashboard(&sv.Dashboard, value); err != nil { + case "AccountInfo": + if err := awsRestjson1_deserializeDocumentAccountInfo(&sv.AccountInfo, value); err != nil { return err } @@ -12537,14 +12243,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDashboardOutput(v **DescribeDashb return nil } -type awsRestjson1_deserializeOpDescribeDashboardDefinition struct { +type awsRestjson1_deserializeOpDescribeAnalysis struct { } -func (*awsRestjson1_deserializeOpDescribeDashboardDefinition) ID() string { +func (*awsRestjson1_deserializeOpDescribeAnalysis) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDashboardDefinition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -12562,12 +12268,12 @@ func (m *awsRestjson1_deserializeOpDescribeDashboardDefinition) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDashboardDefinition(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeAnalysis(response, &metadata) } - output := &DescribeDashboardDefinitionOutput{} + output := &DescribeAnalysisOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeDashboardDefinitionOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeAnalysisOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -12590,7 +12296,7 @@ func (m *awsRestjson1_deserializeOpDescribeDashboardDefinition) HandleDeserializ return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDashboardDefinitionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeAnalysisOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12604,7 +12310,7 @@ func (m *awsRestjson1_deserializeOpDescribeDashboardDefinition) HandleDeserializ return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDashboardDefinition(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -12648,18 +12354,12 @@ func awsRestjson1_deserializeOpErrorDescribeDashboardDefinition(response *smithy case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -12679,7 +12379,7 @@ func awsRestjson1_deserializeOpErrorDescribeDashboardDefinition(response *smithy } } -func awsRestjson1_deserializeOpHttpBindingsDescribeDashboardDefinitionOutput(v *DescribeDashboardDefinitionOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeAnalysisOutput(v *DescribeAnalysisOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -12688,7 +12388,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeDashboardDefinitionOutput(v * return nil } -func awsRestjson1_deserializeOpDocumentDescribeDashboardDefinitionOutput(v **DescribeDashboardDefinitionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeAnalysisOutput(v **DescribeAnalysisOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12701,48 +12401,20 @@ func awsRestjson1_deserializeOpDocumentDescribeDashboardDefinitionOutput(v **Des return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDashboardDefinitionOutput + var sv *DescribeAnalysisOutput if *v == nil { - sv = &DescribeDashboardDefinitionOutput{} + sv = &DescribeAnalysisOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DashboardId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.DashboardId = ptr.String(jtv) - } - - case "DashboardPublishOptions": - if err := awsRestjson1_deserializeDocumentDashboardPublishOptions(&sv.DashboardPublishOptions, value); err != nil { - return err - } - - case "Definition": - if err := awsRestjson1_deserializeDocumentDashboardVersionDefinition(&sv.Definition, value); err != nil { - return err - } - - case "Errors": - if err := awsRestjson1_deserializeDocumentDashboardErrorList(&sv.Errors, value); err != nil { + case "Analysis": + if err := awsRestjson1_deserializeDocumentAnalysis(&sv.Analysis, value); err != nil { return err } - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DashboardName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -12752,24 +12424,6 @@ func awsRestjson1_deserializeOpDocumentDescribeDashboardDefinitionOutput(v **Des sv.RequestId = ptr.String(jtv) } - case "ResourceStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) - } - sv.ResourceStatus = types.ResourceStatus(jtv) - } - - case "ThemeArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.ThemeArn = ptr.String(jtv) - } - default: _, _ = key, value @@ -12779,14 +12433,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDashboardDefinitionOutput(v **Des return nil } -type awsRestjson1_deserializeOpDescribeDashboardPermissions struct { +type awsRestjson1_deserializeOpDescribeAnalysisDefinition struct { } -func (*awsRestjson1_deserializeOpDescribeDashboardPermissions) ID() string { +func (*awsRestjson1_deserializeOpDescribeAnalysisDefinition) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDashboardPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeAnalysisDefinition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -12804,12 +12458,12 @@ func (m *awsRestjson1_deserializeOpDescribeDashboardPermissions) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDashboardPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeAnalysisDefinition(response, &metadata) } - output := &DescribeDashboardPermissionsOutput{} + output := &DescribeAnalysisDefinitionOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeDashboardPermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeAnalysisDefinitionOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -12832,7 +12486,7 @@ func (m *awsRestjson1_deserializeOpDescribeDashboardPermissions) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDashboardPermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeAnalysisDefinitionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12846,7 +12500,7 @@ func (m *awsRestjson1_deserializeOpDescribeDashboardPermissions) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDashboardPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeAnalysisDefinition(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -12887,12 +12541,21 @@ func awsRestjson1_deserializeOpErrorDescribeDashboardPermissions(response *smith } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -12912,7 +12575,7 @@ func awsRestjson1_deserializeOpErrorDescribeDashboardPermissions(response *smith } } -func awsRestjson1_deserializeOpHttpBindingsDescribeDashboardPermissionsOutput(v *DescribeDashboardPermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeAnalysisDefinitionOutput(v *DescribeAnalysisDefinitionOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -12921,7 +12584,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeDashboardPermissionsOutput(v return nil } -func awsRestjson1_deserializeOpDocumentDescribeDashboardPermissionsOutput(v **DescribeDashboardPermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeAnalysisDefinitionOutput(v **DescribeAnalysisDefinitionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12934,36 +12597,259 @@ func awsRestjson1_deserializeOpDocumentDescribeDashboardPermissionsOutput(v **De return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDashboardPermissionsOutput + var sv *DescribeAnalysisDefinitionOutput if *v == nil { - sv = &DescribeDashboardPermissionsOutput{} + sv = &DescribeAnalysisDefinitionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DashboardArn": + case "AnalysisId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.AnalysisId = ptr.String(jtv) + } + + case "Definition": + if err := awsRestjson1_deserializeDocumentAnalysisDefinition(&sv.Definition, value); err != nil { + return err + } + + case "Errors": + if err := awsRestjson1_deserializeDocumentAnalysisErrorList(&sv.Errors, value); err != nil { + return err + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AnalysisName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + case "ResourceStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) + } + sv.ResourceStatus = types.ResourceStatus(jtv) + } + + case "ThemeArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.DashboardArn = ptr.String(jtv) + sv.ThemeArn = ptr.String(jtv) } - case "DashboardId": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeAnalysisPermissions struct { +} + +func (*awsRestjson1_deserializeOpDescribeAnalysisPermissions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeAnalysisPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeAnalysisPermissions(response, &metadata) + } + output := &DescribeAnalysisPermissionsOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsDescribeAnalysisPermissionsOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeAnalysisPermissionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeAnalysisPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsDescribeAnalysisPermissionsOutput(v *DescribeAnalysisPermissionsOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentDescribeAnalysisPermissionsOutput(v **DescribeAnalysisPermissionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeAnalysisPermissionsOutput + if *v == nil { + sv = &DescribeAnalysisPermissionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AnalysisArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.DashboardId = ptr.String(jtv) + sv.AnalysisArn = ptr.String(jtv) } - case "LinkSharingConfiguration": - if err := awsRestjson1_deserializeDocumentLinkSharingConfiguration(&sv.LinkSharingConfiguration, value); err != nil { - return err + case "AnalysisId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.AnalysisId = ptr.String(jtv) } case "Permissions": @@ -12989,14 +12875,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDashboardPermissionsOutput(v **De return nil } -type awsRestjson1_deserializeOpDescribeDashboardSnapshotJob struct { +type awsRestjson1_deserializeOpDescribeAssetBundleExportJob struct { } -func (*awsRestjson1_deserializeOpDescribeDashboardSnapshotJob) ID() string { +func (*awsRestjson1_deserializeOpDescribeAssetBundleExportJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDashboardSnapshotJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeAssetBundleExportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -13014,11 +12900,16 @@ func (m *awsRestjson1_deserializeOpDescribeDashboardSnapshotJob) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDashboardSnapshotJob(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeAssetBundleExportJob(response, &metadata) } - output := &DescribeDashboardSnapshotJobOutput{} + output := &DescribeAssetBundleExportJobOutput{} out.Result = output + err = awsRestjson1_deserializeOpHttpBindingsDescribeAssetBundleExportJobOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -13037,7 +12928,7 @@ func (m *awsRestjson1_deserializeOpDescribeDashboardSnapshotJob) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDashboardSnapshotJobOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeAssetBundleExportJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13051,7 +12942,7 @@ func (m *awsRestjson1_deserializeOpDescribeDashboardSnapshotJob) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDashboardSnapshotJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeAssetBundleExportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -13092,12 +12983,6 @@ func awsRestjson1_deserializeOpErrorDescribeDashboardSnapshotJob(response *smith } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("InternalFailureException", errorCode): - return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -13117,7 +13002,16 @@ func awsRestjson1_deserializeOpErrorDescribeDashboardSnapshotJob(response *smith } } -func awsRestjson1_deserializeOpDocumentDescribeDashboardSnapshotJobOutput(v **DescribeDashboardSnapshotJobOutput, value interface{}) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeAssetBundleExportJobOutput(v *DescribeAssetBundleExportJobOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentDescribeAssetBundleExportJobOutput(v **DescribeAssetBundleExportJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -13130,9 +13024,9 @@ func awsRestjson1_deserializeOpDocumentDescribeDashboardSnapshotJobOutput(v **De return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDashboardSnapshotJobOutput + var sv *DescribeAssetBundleExportJobOutput if *v == nil { - sv = &DescribeDashboardSnapshotJobOutput{} + sv = &DescribeAssetBundleExportJobOutput{} } else { sv = *v } @@ -13148,6 +13042,15 @@ func awsRestjson1_deserializeOpDocumentDescribeDashboardSnapshotJobOutput(v **De sv.Arn = ptr.String(jtv) } + case "AssetBundleExportJobId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.AssetBundleExportJobId = ptr.String(jtv) + } + case "AwsAccountId": if value != nil { jtv, ok := value.(string) @@ -13157,6 +13060,11 @@ func awsRestjson1_deserializeOpDocumentDescribeDashboardSnapshotJobOutput(v **De sv.AwsAccountId = ptr.String(jtv) } + case "CloudFormationOverridePropertyConfiguration": + if err := awsRestjson1_deserializeDocumentAssetBundleCloudFormationOverridePropertyConfiguration(&sv.CloudFormationOverridePropertyConfiguration, value); err != nil { + return err + } + case "CreatedTime": if value != nil { switch jtv := value.(type) { @@ -13173,78 +13081,104 @@ func awsRestjson1_deserializeOpDocumentDescribeDashboardSnapshotJobOutput(v **De } } - case "DashboardId": + case "DownloadUrl": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected SensitiveS3Uri to be of type string, got %T instead", value) } - sv.DashboardId = ptr.String(jtv) + sv.DownloadUrl = ptr.String(jtv) } - case "JobStatus": + case "Errors": + if err := awsRestjson1_deserializeDocumentAssetBundleExportJobErrorList(&sv.Errors, value); err != nil { + return err + } + + case "ExportFormat": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SnapshotJobStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected AssetBundleExportFormat to be of type string, got %T instead", value) } - sv.JobStatus = types.SnapshotJobStatus(jtv) + sv.ExportFormat = types.AssetBundleExportFormat(jtv) } - case "LastUpdatedTime": + case "IncludeAllDependencies": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IncludeAllDependencies = jtv + } - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + case "IncludeFolderMembers": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IncludeFolderMembers to be of type string, got %T instead", value) + } + sv.IncludeFolderMembers = types.IncludeFolderMembers(jtv) + } + case "IncludeFolderMemberships": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } + sv.IncludeFolderMemberships = jtv } - case "RequestId": + case "IncludePermissions": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.IncludePermissions = jtv } - case "SnapshotConfiguration": - if err := awsRestjson1_deserializeDocumentSnapshotConfiguration(&sv.SnapshotConfiguration, value); err != nil { - return err + case "IncludeTags": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IncludeTags = jtv } - case "SnapshotJobId": + case "JobStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected AssetBundleExportJobStatus to be of type string, got %T instead", value) } - sv.SnapshotJobId = ptr.String(jtv) + sv.JobStatus = types.AssetBundleExportJobStatus(jtv) } - case "Status": + case "RequestId": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } - sv.Status = int32(i64) + sv.RequestId = ptr.String(jtv) } - case "UserConfiguration": - if err := awsRestjson1_deserializeDocumentSnapshotUserConfigurationRedacted(&sv.UserConfiguration, value); err != nil { + case "ResourceArns": + if err := awsRestjson1_deserializeDocumentAssetBundleResourceArns(&sv.ResourceArns, value); err != nil { + return err + } + + case "ValidationStrategy": + if err := awsRestjson1_deserializeDocumentAssetBundleExportJobValidationStrategy(&sv.ValidationStrategy, value); err != nil { + return err + } + + case "Warnings": + if err := awsRestjson1_deserializeDocumentAssetBundleExportJobWarningList(&sv.Warnings, value); err != nil { return err } @@ -13257,14 +13191,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDashboardSnapshotJobOutput(v **De return nil } -type awsRestjson1_deserializeOpDescribeDashboardSnapshotJobResult struct { +type awsRestjson1_deserializeOpDescribeAssetBundleImportJob struct { } -func (*awsRestjson1_deserializeOpDescribeDashboardSnapshotJobResult) ID() string { +func (*awsRestjson1_deserializeOpDescribeAssetBundleImportJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDashboardSnapshotJobResult) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeAssetBundleImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -13282,12 +13216,12 @@ func (m *awsRestjson1_deserializeOpDescribeDashboardSnapshotJobResult) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDashboardSnapshotJobResult(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeAssetBundleImportJob(response, &metadata) } - output := &DescribeDashboardSnapshotJobResultOutput{} + output := &DescribeAssetBundleImportJobOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeDashboardSnapshotJobResultOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeAssetBundleImportJobOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -13310,7 +13244,7 @@ func (m *awsRestjson1_deserializeOpDescribeDashboardSnapshotJobResult) HandleDes return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDashboardSnapshotJobResultOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeAssetBundleImportJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13324,7 +13258,3153 @@ func (m *awsRestjson1_deserializeOpDescribeDashboardSnapshotJobResult) HandleDes return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDashboardSnapshotJobResult(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeAssetBundleImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsDescribeAssetBundleImportJobOutput(v *DescribeAssetBundleImportJobOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentDescribeAssetBundleImportJobOutput(v **DescribeAssetBundleImportJobOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeAssetBundleImportJobOutput + if *v == nil { + sv = &DescribeAssetBundleImportJobOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "AssetBundleImportJobId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.AssetBundleImportJobId = ptr.String(jtv) + } + + case "AssetBundleImportSource": + if err := awsRestjson1_deserializeDocumentAssetBundleImportSourceDescription(&sv.AssetBundleImportSource, value); err != nil { + return err + } + + case "AwsAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.AwsAccountId = ptr.String(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Errors": + if err := awsRestjson1_deserializeDocumentAssetBundleImportJobErrorList(&sv.Errors, value); err != nil { + return err + } + + case "FailureAction": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssetBundleImportFailureAction to be of type string, got %T instead", value) + } + sv.FailureAction = types.AssetBundleImportFailureAction(jtv) + } + + case "JobStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssetBundleImportJobStatus to be of type string, got %T instead", value) + } + sv.JobStatus = types.AssetBundleImportJobStatus(jtv) + } + + case "OverrideParameters": + if err := awsRestjson1_deserializeDocumentAssetBundleImportJobOverrideParameters(&sv.OverrideParameters, value); err != nil { + return err + } + + case "OverridePermissions": + if err := awsRestjson1_deserializeDocumentAssetBundleImportJobOverridePermissions(&sv.OverridePermissions, value); err != nil { + return err + } + + case "OverrideTags": + if err := awsRestjson1_deserializeDocumentAssetBundleImportJobOverrideTags(&sv.OverrideTags, value); err != nil { + return err + } + + case "OverrideValidationStrategy": + if err := awsRestjson1_deserializeDocumentAssetBundleImportJobOverrideValidationStrategy(&sv.OverrideValidationStrategy, value); err != nil { + return err + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + case "RollbackErrors": + if err := awsRestjson1_deserializeDocumentAssetBundleImportJobErrorList(&sv.RollbackErrors, value); err != nil { + return err + } + + case "Warnings": + if err := awsRestjson1_deserializeDocumentAssetBundleImportJobWarningList(&sv.Warnings, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeBrand struct { +} + +func (*awsRestjson1_deserializeOpDescribeBrand) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeBrand) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeBrand(response, &metadata) + } + output := &DescribeBrandOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeBrandOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeBrand(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeBrandOutput(v **DescribeBrandOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeBrandOutput + if *v == nil { + sv = &DescribeBrandOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BrandDefinition": + if err := awsRestjson1_deserializeDocumentBrandDefinition(&sv.BrandDefinition, value); err != nil { + return err + } + + case "BrandDetail": + if err := awsRestjson1_deserializeDocumentBrandDetail(&sv.BrandDetail, value); err != nil { + return err + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeBrandAssignment struct { +} + +func (*awsRestjson1_deserializeOpDescribeBrandAssignment) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeBrandAssignment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeBrandAssignment(response, &metadata) + } + output := &DescribeBrandAssignmentOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeBrandAssignmentOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeBrandAssignment(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeBrandAssignmentOutput(v **DescribeBrandAssignmentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeBrandAssignmentOutput + if *v == nil { + sv = &DescribeBrandAssignmentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BrandArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.BrandArn = ptr.String(jtv) + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeBrandPublishedVersion struct { +} + +func (*awsRestjson1_deserializeOpDescribeBrandPublishedVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeBrandPublishedVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeBrandPublishedVersion(response, &metadata) + } + output := &DescribeBrandPublishedVersionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeBrandPublishedVersionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeBrandPublishedVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeBrandPublishedVersionOutput(v **DescribeBrandPublishedVersionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeBrandPublishedVersionOutput + if *v == nil { + sv = &DescribeBrandPublishedVersionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BrandDefinition": + if err := awsRestjson1_deserializeDocumentBrandDefinition(&sv.BrandDefinition, value); err != nil { + return err + } + + case "BrandDetail": + if err := awsRestjson1_deserializeDocumentBrandDetail(&sv.BrandDetail, value); err != nil { + return err + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeCustomPermissions struct { +} + +func (*awsRestjson1_deserializeOpDescribeCustomPermissions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeCustomPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeCustomPermissions(response, &metadata) + } + output := &DescribeCustomPermissionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeCustomPermissionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeCustomPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeCustomPermissionsOutput(v **DescribeCustomPermissionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeCustomPermissionsOutput + if *v == nil { + sv = &DescribeCustomPermissionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CustomPermissions": + if err := awsRestjson1_deserializeDocumentCustomPermissions(&sv.CustomPermissions, value); err != nil { + return err + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Status = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeDashboard struct { +} + +func (*awsRestjson1_deserializeOpDescribeDashboard) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeDashboard) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDashboard(response, &metadata) + } + output := &DescribeDashboardOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsDescribeDashboardOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeDashboardOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeDashboard(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsDescribeDashboardOutput(v *DescribeDashboardOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentDescribeDashboardOutput(v **DescribeDashboardOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeDashboardOutput + if *v == nil { + sv = &DescribeDashboardOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Dashboard": + if err := awsRestjson1_deserializeDocumentDashboard(&sv.Dashboard, value); err != nil { + return err + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeDashboardDefinition struct { +} + +func (*awsRestjson1_deserializeOpDescribeDashboardDefinition) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeDashboardDefinition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDashboardDefinition(response, &metadata) + } + output := &DescribeDashboardDefinitionOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsDescribeDashboardDefinitionOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeDashboardDefinitionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeDashboardDefinition(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsDescribeDashboardDefinitionOutput(v *DescribeDashboardDefinitionOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentDescribeDashboardDefinitionOutput(v **DescribeDashboardDefinitionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeDashboardDefinitionOutput + if *v == nil { + sv = &DescribeDashboardDefinitionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DashboardId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.DashboardId = ptr.String(jtv) + } + + case "DashboardPublishOptions": + if err := awsRestjson1_deserializeDocumentDashboardPublishOptions(&sv.DashboardPublishOptions, value); err != nil { + return err + } + + case "Definition": + if err := awsRestjson1_deserializeDocumentDashboardVersionDefinition(&sv.Definition, value); err != nil { + return err + } + + case "Errors": + if err := awsRestjson1_deserializeDocumentDashboardErrorList(&sv.Errors, value); err != nil { + return err + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DashboardName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + case "ResourceStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) + } + sv.ResourceStatus = types.ResourceStatus(jtv) + } + + case "ThemeArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ThemeArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeDashboardPermissions struct { +} + +func (*awsRestjson1_deserializeOpDescribeDashboardPermissions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeDashboardPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDashboardPermissions(response, &metadata) + } + output := &DescribeDashboardPermissionsOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsDescribeDashboardPermissionsOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeDashboardPermissionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeDashboardPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsDescribeDashboardPermissionsOutput(v *DescribeDashboardPermissionsOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentDescribeDashboardPermissionsOutput(v **DescribeDashboardPermissionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeDashboardPermissionsOutput + if *v == nil { + sv = &DescribeDashboardPermissionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DashboardArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.DashboardArn = ptr.String(jtv) + } + + case "DashboardId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.DashboardId = ptr.String(jtv) + } + + case "LinkSharingConfiguration": + if err := awsRestjson1_deserializeDocumentLinkSharingConfiguration(&sv.LinkSharingConfiguration, value); err != nil { + return err + } + + case "Permissions": + if err := awsRestjson1_deserializeDocumentUpdateResourcePermissionList(&sv.Permissions, value); err != nil { + return err + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeDashboardSnapshotJob struct { +} + +func (*awsRestjson1_deserializeOpDescribeDashboardSnapshotJob) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeDashboardSnapshotJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDashboardSnapshotJob(response, &metadata) + } + output := &DescribeDashboardSnapshotJobOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeDashboardSnapshotJobOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeDashboardSnapshotJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeDashboardSnapshotJobOutput(v **DescribeDashboardSnapshotJobOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeDashboardSnapshotJobOutput + if *v == nil { + sv = &DescribeDashboardSnapshotJobOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "AwsAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.AwsAccountId = ptr.String(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "DashboardId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.DashboardId = ptr.String(jtv) + } + + case "JobStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SnapshotJobStatus to be of type string, got %T instead", value) + } + sv.JobStatus = types.SnapshotJobStatus(jtv) + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + case "SnapshotConfiguration": + if err := awsRestjson1_deserializeDocumentSnapshotConfiguration(&sv.SnapshotConfiguration, value); err != nil { + return err + } + + case "SnapshotJobId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.SnapshotJobId = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Status = int32(i64) + } + + case "UserConfiguration": + if err := awsRestjson1_deserializeDocumentSnapshotUserConfigurationRedacted(&sv.UserConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeDashboardSnapshotJobResult struct { +} + +func (*awsRestjson1_deserializeOpDescribeDashboardSnapshotJobResult) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeDashboardSnapshotJobResult) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDashboardSnapshotJobResult(response, &metadata) + } + output := &DescribeDashboardSnapshotJobResultOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsDescribeDashboardSnapshotJobResultOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeDashboardSnapshotJobResultOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeDashboardSnapshotJobResult(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsDescribeDashboardSnapshotJobResultOutput(v *DescribeDashboardSnapshotJobResultOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentDescribeDashboardSnapshotJobResultOutput(v **DescribeDashboardSnapshotJobResultOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeDashboardSnapshotJobResultOutput + if *v == nil { + sv = &DescribeDashboardSnapshotJobResultOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "ErrorInfo": + if err := awsRestjson1_deserializeDocumentSnapshotJobErrorInfo(&sv.ErrorInfo, value); err != nil { + return err + } + + case "JobStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SnapshotJobStatus to be of type string, got %T instead", value) + } + sv.JobStatus = types.SnapshotJobStatus(jtv) + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + case "Result": + if err := awsRestjson1_deserializeDocumentSnapshotJobResult(&sv.Result, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeDataSet struct { +} + +func (*awsRestjson1_deserializeOpDescribeDataSet) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeDataSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSet(response, &metadata) + } + output := &DescribeDataSetOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSetOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeDataSetOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeDataSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetOutput(v *DescribeDataSetOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentDescribeDataSetOutput(v **DescribeDataSetOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeDataSetOutput + if *v == nil { + sv = &DescribeDataSetOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DataSet": + if err := awsRestjson1_deserializeDocumentDataSet(&sv.DataSet, value); err != nil { + return err + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeDataSetPermissions struct { +} + +func (*awsRestjson1_deserializeOpDescribeDataSetPermissions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeDataSetPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSetPermissions(response, &metadata) + } + output := &DescribeDataSetPermissionsOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSetPermissionsOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeDataSetPermissionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeDataSetPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetPermissionsOutput(v *DescribeDataSetPermissionsOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentDescribeDataSetPermissionsOutput(v **DescribeDataSetPermissionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeDataSetPermissionsOutput + if *v == nil { + sv = &DescribeDataSetPermissionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DataSetArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.DataSetArn = ptr.String(jtv) + } + + case "DataSetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.DataSetId = ptr.String(jtv) + } + + case "Permissions": + if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { + return err + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeDataSetRefreshProperties struct { +} + +func (*awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSetRefreshProperties(response, &metadata) + } + output := &DescribeDataSetRefreshPropertiesOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSetRefreshPropertiesOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeDataSetRefreshPropertiesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeDataSetRefreshProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetRefreshPropertiesOutput(v *DescribeDataSetRefreshPropertiesOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentDescribeDataSetRefreshPropertiesOutput(v **DescribeDataSetRefreshPropertiesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeDataSetRefreshPropertiesOutput + if *v == nil { + sv = &DescribeDataSetRefreshPropertiesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DataSetRefreshProperties": + if err := awsRestjson1_deserializeDocumentDataSetRefreshProperties(&sv.DataSetRefreshProperties, value); err != nil { + return err + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeDataSource struct { +} + +func (*awsRestjson1_deserializeOpDescribeDataSource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSource(response, &metadata) + } + output := &DescribeDataSourceOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSourceOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourceOutput(v *DescribeDataSourceOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(v **DescribeDataSourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeDataSourceOutput + if *v == nil { + sv = &DescribeDataSourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DataSource": + if err := awsRestjson1_deserializeDocumentDataSource(&sv.DataSource, value); err != nil { + return err + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeDataSourcePermissions struct { +} + +func (*awsRestjson1_deserializeOpDescribeDataSourcePermissions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeDataSourcePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSourcePermissions(response, &metadata) + } + output := &DescribeDataSourcePermissionsOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSourcePermissionsOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeDataSourcePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourcePermissionsOutput(v *DescribeDataSourcePermissionsOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(v **DescribeDataSourcePermissionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeDataSourcePermissionsOutput + if *v == nil { + sv = &DescribeDataSourcePermissionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DataSourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.DataSourceArn = ptr.String(jtv) + } + + case "DataSourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.DataSourceId = ptr.String(jtv) + } + + case "Permissions": + if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { + return err + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeFolder struct { +} + +func (*awsRestjson1_deserializeOpDescribeFolder) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeFolder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeFolder(response, &metadata) + } + output := &DescribeFolderOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeFolderOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeFolder(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -13374,9 +16454,6 @@ func awsRestjson1_deserializeOpErrorDescribeDashboardSnapshotJobResult(response case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -13396,7 +16473,7 @@ func awsRestjson1_deserializeOpErrorDescribeDashboardSnapshotJobResult(response } } -func awsRestjson1_deserializeOpHttpBindingsDescribeDashboardSnapshotJobResultOutput(v *DescribeDashboardSnapshotJobResultOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeFolderOutput(v *DescribeFolderOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -13405,7 +16482,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeDashboardSnapshotJobResultOut return nil } -func awsRestjson1_deserializeOpDocumentDescribeDashboardSnapshotJobResultOutput(v **DescribeDashboardSnapshotJobResultOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeFolderOutput(v **DescribeFolderOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -13418,84 +16495,29 @@ func awsRestjson1_deserializeOpDocumentDescribeDashboardSnapshotJobResultOutput( return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDashboardSnapshotJobResultOutput + var sv *DescribeFolderOutput if *v == nil { - sv = &DescribeDashboardSnapshotJobResultOutput{} + sv = &DescribeFolderOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "CreatedTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "ErrorInfo": - if err := awsRestjson1_deserializeDocumentSnapshotJobErrorInfo(&sv.ErrorInfo, value); err != nil { + case "Folder": + if err := awsRestjson1_deserializeDocumentFolder(&sv.Folder, value); err != nil { return err } - case "JobStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SnapshotJobStatus to be of type string, got %T instead", value) - } - sv.JobStatus = types.SnapshotJobStatus(jtv) - } - - case "LastUpdatedTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } - case "Result": - if err := awsRestjson1_deserializeDocumentSnapshotJobResult(&sv.Result, value); err != nil { - return err - } - default: _, _ = key, value @@ -13505,14 +16527,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDashboardSnapshotJobResultOutput( return nil } -type awsRestjson1_deserializeOpDescribeDataSet struct { +type awsRestjson1_deserializeOpDescribeFolderPermissions struct { } -func (*awsRestjson1_deserializeOpDescribeDataSet) ID() string { +func (*awsRestjson1_deserializeOpDescribeFolderPermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDataSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeFolderPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -13530,12 +16552,12 @@ func (m *awsRestjson1_deserializeOpDescribeDataSet) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSet(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeFolderPermissions(response, &metadata) } - output := &DescribeDataSetOutput{} + output := &DescribeFolderPermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSetOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderPermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -13558,7 +16580,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSet) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDataSetOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeFolderPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13572,7 +16594,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSet) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDataSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeFolderPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -13619,6 +16641,9 @@ func awsRestjson1_deserializeOpErrorDescribeDataSet(response *smithyhttp.Respons case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) @@ -13628,6 +16653,9 @@ func awsRestjson1_deserializeOpErrorDescribeDataSet(response *smithyhttp.Respons case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -13638,7 +16666,7 @@ func awsRestjson1_deserializeOpErrorDescribeDataSet(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetOutput(v *DescribeDataSetOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeFolderPermissionsOutput(v *DescribeFolderPermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -13647,7 +16675,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetOutput(v *DescribeData return nil } -func awsRestjson1_deserializeOpDocumentDescribeDataSetOutput(v **DescribeDataSetOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeFolderPermissionsOutput(v **DescribeFolderPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -13660,17 +16688,44 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSetOutput(v **DescribeDataSet return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDataSetOutput + var sv *DescribeFolderPermissionsOutput if *v == nil { - sv = &DescribeDataSetOutput{} + sv = &DescribeFolderPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSet": - if err := awsRestjson1_deserializeDocumentDataSet(&sv.DataSet, value); err != nil { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "FolderId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RestrictiveResourceId to be of type string, got %T instead", value) + } + sv.FolderId = ptr.String(jtv) + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Permissions": + if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { return err } @@ -13692,14 +16747,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSetOutput(v **DescribeDataSet return nil } -type awsRestjson1_deserializeOpDescribeDataSetPermissions struct { +type awsRestjson1_deserializeOpDescribeFolderResolvedPermissions struct { } -func (*awsRestjson1_deserializeOpDescribeDataSetPermissions) ID() string { +func (*awsRestjson1_deserializeOpDescribeFolderResolvedPermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDataSetPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeFolderResolvedPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -13717,12 +16772,12 @@ func (m *awsRestjson1_deserializeOpDescribeDataSetPermissions) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSetPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeFolderResolvedPermissions(response, &metadata) } - output := &DescribeDataSetPermissionsOutput{} + output := &DescribeFolderResolvedPermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSetPermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderResolvedPermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -13745,7 +16800,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSetPermissions) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDataSetPermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeFolderResolvedPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13759,7 +16814,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSetPermissions) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDataSetPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeFolderResolvedPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -13806,6 +16861,9 @@ func awsRestjson1_deserializeOpErrorDescribeDataSetPermissions(response *smithyh case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) @@ -13815,6 +16873,9 @@ func awsRestjson1_deserializeOpErrorDescribeDataSetPermissions(response *smithyh case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -13825,7 +16886,7 @@ func awsRestjson1_deserializeOpErrorDescribeDataSetPermissions(response *smithyh } } -func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetPermissionsOutput(v *DescribeDataSetPermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeFolderResolvedPermissionsOutput(v *DescribeFolderResolvedPermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -13834,7 +16895,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetPermissionsOutput(v *D return nil } -func awsRestjson1_deserializeOpDocumentDescribeDataSetPermissionsOutput(v **DescribeDataSetPermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeFolderResolvedPermissionsOutput(v **DescribeFolderResolvedPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -13847,31 +16908,40 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSetPermissionsOutput(v **Desc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDataSetPermissionsOutput + var sv *DescribeFolderResolvedPermissionsOutput if *v == nil { - sv = &DescribeDataSetPermissionsOutput{} + sv = &DescribeFolderResolvedPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSetArn": + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.DataSetArn = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } - case "DataSetId": + case "FolderId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected RestrictiveResourceId to be of type string, got %T instead", value) } - sv.DataSetId = ptr.String(jtv) + sv.FolderId = ptr.String(jtv) + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) } case "Permissions": @@ -13897,14 +16967,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSetPermissionsOutput(v **Desc return nil } -type awsRestjson1_deserializeOpDescribeDataSetRefreshProperties struct { +type awsRestjson1_deserializeOpDescribeGroup struct { } -func (*awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) ID() string { +func (*awsRestjson1_deserializeOpDescribeGroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -13922,12 +16992,12 @@ func (m *awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSetRefreshProperties(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeGroup(response, &metadata) } - output := &DescribeDataSetRefreshPropertiesOutput{} + output := &DescribeGroupOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSetRefreshPropertiesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeGroupOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -13950,7 +17020,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) HandleDeser return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDataSetRefreshPropertiesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13964,7 +17034,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) HandleDeser return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDataSetRefreshProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14014,15 +17084,15 @@ func awsRestjson1_deserializeOpErrorDescribeDataSetRefreshProperties(response *s case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -14036,7 +17106,7 @@ func awsRestjson1_deserializeOpErrorDescribeDataSetRefreshProperties(response *s } } -func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetRefreshPropertiesOutput(v *DescribeDataSetRefreshPropertiesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeGroupOutput(v *DescribeGroupOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -14045,7 +17115,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetRefreshPropertiesOutpu return nil } -func awsRestjson1_deserializeOpDocumentDescribeDataSetRefreshPropertiesOutput(v **DescribeDataSetRefreshPropertiesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeGroupOutput(v **DescribeGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14058,17 +17128,17 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSetRefreshPropertiesOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDataSetRefreshPropertiesOutput + var sv *DescribeGroupOutput if *v == nil { - sv = &DescribeDataSetRefreshPropertiesOutput{} + sv = &DescribeGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSetRefreshProperties": - if err := awsRestjson1_deserializeDocumentDataSetRefreshProperties(&sv.DataSetRefreshProperties, value); err != nil { + case "Group": + if err := awsRestjson1_deserializeDocumentGroup(&sv.Group, value); err != nil { return err } @@ -14090,14 +17160,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSetRefreshPropertiesOutput(v return nil } -type awsRestjson1_deserializeOpDescribeDataSource struct { +type awsRestjson1_deserializeOpDescribeGroupMembership struct { } -func (*awsRestjson1_deserializeOpDescribeDataSource) ID() string { +func (*awsRestjson1_deserializeOpDescribeGroupMembership) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeGroupMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14115,12 +17185,12 @@ func (m *awsRestjson1_deserializeOpDescribeDataSource) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeGroupMembership(response, &metadata) } - output := &DescribeDataSourceOutput{} + output := &DescribeGroupMembershipOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSourceOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeGroupMembershipOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -14143,7 +17213,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSource) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeGroupMembershipOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14157,7 +17227,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSource) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeGroupMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14207,9 +17277,15 @@ func awsRestjson1_deserializeOpErrorDescribeDataSource(response *smithyhttp.Resp case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -14223,7 +17299,7 @@ func awsRestjson1_deserializeOpErrorDescribeDataSource(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourceOutput(v *DescribeDataSourceOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeGroupMembershipOutput(v *DescribeGroupMembershipOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -14232,7 +17308,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourceOutput(v *DescribeD return nil } -func awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(v **DescribeDataSourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeGroupMembershipOutput(v **DescribeGroupMembershipOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14245,17 +17321,17 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(v **DescribeData return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDataSourceOutput + var sv *DescribeGroupMembershipOutput if *v == nil { - sv = &DescribeDataSourceOutput{} + sv = &DescribeGroupMembershipOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSource": - if err := awsRestjson1_deserializeDocumentDataSource(&sv.DataSource, value); err != nil { + case "GroupMember": + if err := awsRestjson1_deserializeDocumentGroupMember(&sv.GroupMember, value); err != nil { return err } @@ -14277,14 +17353,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(v **DescribeData return nil } -type awsRestjson1_deserializeOpDescribeDataSourcePermissions struct { +type awsRestjson1_deserializeOpDescribeIAMPolicyAssignment struct { } -func (*awsRestjson1_deserializeOpDescribeDataSourcePermissions) ID() string { +func (*awsRestjson1_deserializeOpDescribeIAMPolicyAssignment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDataSourcePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeIAMPolicyAssignment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14302,12 +17378,12 @@ func (m *awsRestjson1_deserializeOpDescribeDataSourcePermissions) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSourcePermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeIAMPolicyAssignment(response, &metadata) } - output := &DescribeDataSourcePermissionsOutput{} + output := &DescribeIAMPolicyAssignmentOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSourcePermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeIAMPolicyAssignmentOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -14330,7 +17406,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSourcePermissions) HandleDeserial return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeIAMPolicyAssignmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14344,7 +17420,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSourcePermissions) HandleDeserial return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDataSourcePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeIAMPolicyAssignment(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14391,6 +17467,9 @@ func awsRestjson1_deserializeOpErrorDescribeDataSourcePermissions(response *smit case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) @@ -14410,7 +17489,7 @@ func awsRestjson1_deserializeOpErrorDescribeDataSourcePermissions(response *smit } } -func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourcePermissionsOutput(v *DescribeDataSourcePermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeIAMPolicyAssignmentOutput(v *DescribeIAMPolicyAssignmentOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -14419,7 +17498,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourcePermissionsOutput(v return nil } -func awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(v **DescribeDataSourcePermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeIAMPolicyAssignmentOutput(v **DescribeIAMPolicyAssignmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14432,35 +17511,17 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(v **D return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDataSourcePermissionsOutput + var sv *DescribeIAMPolicyAssignmentOutput if *v == nil { - sv = &DescribeDataSourcePermissionsOutput{} + sv = &DescribeIAMPolicyAssignmentOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSourceArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.DataSourceArn = ptr.String(jtv) - } - - case "DataSourceId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) - } - sv.DataSourceId = ptr.String(jtv) - } - - case "Permissions": - if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { + case "IAMPolicyAssignment": + if err := awsRestjson1_deserializeDocumentIAMPolicyAssignment(&sv.IAMPolicyAssignment, value); err != nil { return err } @@ -14482,14 +17543,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(v **D return nil } -type awsRestjson1_deserializeOpDescribeFolder struct { +type awsRestjson1_deserializeOpDescribeIngestion struct { } -func (*awsRestjson1_deserializeOpDescribeFolder) ID() string { +func (*awsRestjson1_deserializeOpDescribeIngestion) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeFolder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeIngestion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14507,12 +17568,12 @@ func (m *awsRestjson1_deserializeOpDescribeFolder) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeFolder(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeIngestion(response, &metadata) } - output := &DescribeFolderOutput{} + output := &DescribeIngestionOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeIngestionOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -14535,7 +17596,7 @@ func (m *awsRestjson1_deserializeOpDescribeFolder) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeFolderOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeIngestionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14549,7 +17610,7 @@ func (m *awsRestjson1_deserializeOpDescribeFolder) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeFolder(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeIngestion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14599,15 +17660,15 @@ func awsRestjson1_deserializeOpErrorDescribeFolder(response *smithyhttp.Response case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -14618,7 +17679,7 @@ func awsRestjson1_deserializeOpErrorDescribeFolder(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsDescribeFolderOutput(v *DescribeFolderOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeIngestionOutput(v *DescribeIngestionOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -14627,7 +17688,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeFolderOutput(v *DescribeFolde return nil } -func awsRestjson1_deserializeOpDocumentDescribeFolderOutput(v **DescribeFolderOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeIngestionOutput(v **DescribeIngestionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14640,17 +17701,17 @@ func awsRestjson1_deserializeOpDocumentDescribeFolderOutput(v **DescribeFolderOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeFolderOutput + var sv *DescribeIngestionOutput if *v == nil { - sv = &DescribeFolderOutput{} + sv = &DescribeIngestionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Folder": - if err := awsRestjson1_deserializeDocumentFolder(&sv.Folder, value); err != nil { + case "Ingestion": + if err := awsRestjson1_deserializeDocumentIngestion(&sv.Ingestion, value); err != nil { return err } @@ -14672,14 +17733,14 @@ func awsRestjson1_deserializeOpDocumentDescribeFolderOutput(v **DescribeFolderOu return nil } -type awsRestjson1_deserializeOpDescribeFolderPermissions struct { +type awsRestjson1_deserializeOpDescribeIpRestriction struct { } -func (*awsRestjson1_deserializeOpDescribeFolderPermissions) ID() string { +func (*awsRestjson1_deserializeOpDescribeIpRestriction) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeFolderPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeIpRestriction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14697,12 +17758,12 @@ func (m *awsRestjson1_deserializeOpDescribeFolderPermissions) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeFolderPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeIpRestriction(response, &metadata) } - output := &DescribeFolderPermissionsOutput{} + output := &DescribeIpRestrictionOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderPermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeIpRestrictionOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -14725,7 +17786,7 @@ func (m *awsRestjson1_deserializeOpDescribeFolderPermissions) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeFolderPermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeIpRestrictionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14739,7 +17800,7 @@ func (m *awsRestjson1_deserializeOpDescribeFolderPermissions) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeFolderPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeIpRestriction(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14786,9 +17847,6 @@ func awsRestjson1_deserializeOpErrorDescribeFolderPermissions(response *smithyht case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) @@ -14798,9 +17856,6 @@ func awsRestjson1_deserializeOpErrorDescribeFolderPermissions(response *smithyht case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -14811,7 +17866,7 @@ func awsRestjson1_deserializeOpErrorDescribeFolderPermissions(response *smithyht } } -func awsRestjson1_deserializeOpHttpBindingsDescribeFolderPermissionsOutput(v *DescribeFolderPermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeIpRestrictionOutput(v *DescribeIpRestrictionOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -14820,7 +17875,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeFolderPermissionsOutput(v *De return nil } -func awsRestjson1_deserializeOpDocumentDescribeFolderPermissionsOutput(v **DescribeFolderPermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeIpRestrictionOutput(v **DescribeIpRestrictionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14833,44 +17888,35 @@ func awsRestjson1_deserializeOpDocumentDescribeFolderPermissionsOutput(v **Descr return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeFolderPermissionsOutput + var sv *DescribeIpRestrictionOutput if *v == nil { - sv = &DescribeFolderPermissionsOutput{} + sv = &DescribeIpRestrictionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "FolderId": + case "AwsAccountId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) } - sv.FolderId = ptr.String(jtv) + sv.AwsAccountId = ptr.String(jtv) } - case "NextToken": + case "Enabled": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.Enabled = ptr.Bool(jtv) } - case "Permissions": - if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { + case "IpRestrictionRuleMap": + if err := awsRestjson1_deserializeDocumentIpRestrictionRuleMap(&sv.IpRestrictionRuleMap, value); err != nil { return err } @@ -14883,6 +17929,16 @@ func awsRestjson1_deserializeOpDocumentDescribeFolderPermissionsOutput(v **Descr sv.RequestId = ptr.String(jtv) } + case "VpcEndpointIdRestrictionRuleMap": + if err := awsRestjson1_deserializeDocumentVpcEndpointIdRestrictionRuleMap(&sv.VpcEndpointIdRestrictionRuleMap, value); err != nil { + return err + } + + case "VpcIdRestrictionRuleMap": + if err := awsRestjson1_deserializeDocumentVpcIdRestrictionRuleMap(&sv.VpcIdRestrictionRuleMap, value); err != nil { + return err + } + default: _, _ = key, value @@ -14892,14 +17948,14 @@ func awsRestjson1_deserializeOpDocumentDescribeFolderPermissionsOutput(v **Descr return nil } -type awsRestjson1_deserializeOpDescribeFolderResolvedPermissions struct { +type awsRestjson1_deserializeOpDescribeKeyRegistration struct { } -func (*awsRestjson1_deserializeOpDescribeFolderResolvedPermissions) ID() string { +func (*awsRestjson1_deserializeOpDescribeKeyRegistration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeFolderResolvedPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeKeyRegistration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14917,16 +17973,11 @@ func (m *awsRestjson1_deserializeOpDescribeFolderResolvedPermissions) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeFolderResolvedPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeKeyRegistration(response, &metadata) } - output := &DescribeFolderResolvedPermissionsOutput{} + output := &DescribeKeyRegistrationOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderResolvedPermissionsOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14945,7 +17996,7 @@ func (m *awsRestjson1_deserializeOpDescribeFolderResolvedPermissions) HandleDese return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeFolderResolvedPermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeKeyRegistrationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14959,7 +18010,7 @@ func (m *awsRestjson1_deserializeOpDescribeFolderResolvedPermissions) HandleDese return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeFolderResolvedPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeKeyRegistration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15006,21 +18057,12 @@ func awsRestjson1_deserializeOpErrorDescribeFolderResolvedPermissions(response * case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -15031,16 +18073,7 @@ func awsRestjson1_deserializeOpErrorDescribeFolderResolvedPermissions(response * } } -func awsRestjson1_deserializeOpHttpBindingsDescribeFolderResolvedPermissionsOutput(v *DescribeFolderResolvedPermissionsOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - v.Status = int32(response.StatusCode) - - return nil -} -func awsRestjson1_deserializeOpDocumentDescribeFolderResolvedPermissionsOutput(v **DescribeFolderResolvedPermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeKeyRegistrationOutput(v **DescribeKeyRegistrationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15053,54 +18086,49 @@ func awsRestjson1_deserializeOpDocumentDescribeFolderResolvedPermissionsOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeFolderResolvedPermissionsOutput + var sv *DescribeKeyRegistrationOutput if *v == nil { - sv = &DescribeFolderResolvedPermissionsOutput{} + sv = &DescribeKeyRegistrationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": + case "AwsAccountId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) } - sv.Arn = ptr.String(jtv) + sv.AwsAccountId = ptr.String(jtv) } - case "FolderId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RestrictiveResourceId to be of type string, got %T instead", value) - } - sv.FolderId = ptr.String(jtv) + case "KeyRegistration": + if err := awsRestjson1_deserializeDocumentKeyRegistration(&sv.KeyRegistration, value); err != nil { + return err } - case "NextToken": + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) - } - - case "Permissions": - if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { - return err + sv.RequestId = ptr.String(jtv) } - case "RequestId": + case "Status": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Status = int32(i64) } default: @@ -15112,14 +18140,14 @@ func awsRestjson1_deserializeOpDocumentDescribeFolderResolvedPermissionsOutput(v return nil } -type awsRestjson1_deserializeOpDescribeGroup struct { +type awsRestjson1_deserializeOpDescribeNamespace struct { } -func (*awsRestjson1_deserializeOpDescribeGroup) ID() string { +func (*awsRestjson1_deserializeOpDescribeNamespace) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeNamespace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15137,12 +18165,12 @@ func (m *awsRestjson1_deserializeOpDescribeGroup) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeGroup(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeNamespace(response, &metadata) } - output := &DescribeGroupOutput{} + output := &DescribeNamespaceOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeGroupOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeNamespaceOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -15165,7 +18193,7 @@ func (m *awsRestjson1_deserializeOpDescribeGroup) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeGroupOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeNamespaceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -15179,7 +18207,7 @@ func (m *awsRestjson1_deserializeOpDescribeGroup) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeNamespace(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15229,9 +18257,6 @@ func awsRestjson1_deserializeOpErrorDescribeGroup(response *smithyhttp.Response, case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -15251,7 +18276,7 @@ func awsRestjson1_deserializeOpErrorDescribeGroup(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsDescribeGroupOutput(v *DescribeGroupOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeNamespaceOutput(v *DescribeNamespaceOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -15260,7 +18285,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeGroupOutput(v *DescribeGroupO return nil } -func awsRestjson1_deserializeOpDocumentDescribeGroupOutput(v **DescribeGroupOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeNamespaceOutput(v **DescribeNamespaceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15273,17 +18298,17 @@ func awsRestjson1_deserializeOpDocumentDescribeGroupOutput(v **DescribeGroupOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeGroupOutput + var sv *DescribeNamespaceOutput if *v == nil { - sv = &DescribeGroupOutput{} + sv = &DescribeNamespaceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Group": - if err := awsRestjson1_deserializeDocumentGroup(&sv.Group, value); err != nil { + case "Namespace": + if err := awsRestjson1_deserializeDocumentNamespaceInfoV2(&sv.Namespace, value); err != nil { return err } @@ -15305,14 +18330,14 @@ func awsRestjson1_deserializeOpDocumentDescribeGroupOutput(v **DescribeGroupOutp return nil } -type awsRestjson1_deserializeOpDescribeGroupMembership struct { +type awsRestjson1_deserializeOpDescribeQPersonalizationConfiguration struct { } -func (*awsRestjson1_deserializeOpDescribeGroupMembership) ID() string { +func (*awsRestjson1_deserializeOpDescribeQPersonalizationConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeGroupMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeQPersonalizationConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15330,12 +18355,12 @@ func (m *awsRestjson1_deserializeOpDescribeGroupMembership) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeGroupMembership(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeQPersonalizationConfiguration(response, &metadata) } - output := &DescribeGroupMembershipOutput{} + output := &DescribeQPersonalizationConfigurationOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeGroupMembershipOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeQPersonalizationConfigurationOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -15358,7 +18383,7 @@ func (m *awsRestjson1_deserializeOpDescribeGroupMembership) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeGroupMembershipOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeQPersonalizationConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -15372,7 +18397,7 @@ func (m *awsRestjson1_deserializeOpDescribeGroupMembership) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeGroupMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeQPersonalizationConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15416,21 +18441,18 @@ func awsRestjson1_deserializeOpErrorDescribeGroupMembership(response *smithyhttp case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -15444,7 +18466,7 @@ func awsRestjson1_deserializeOpErrorDescribeGroupMembership(response *smithyhttp } } -func awsRestjson1_deserializeOpHttpBindingsDescribeGroupMembershipOutput(v *DescribeGroupMembershipOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeQPersonalizationConfigurationOutput(v *DescribeQPersonalizationConfigurationOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -15453,7 +18475,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeGroupMembershipOutput(v *Desc return nil } -func awsRestjson1_deserializeOpDocumentDescribeGroupMembershipOutput(v **DescribeGroupMembershipOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeQPersonalizationConfigurationOutput(v **DescribeQPersonalizationConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15466,18 +18488,22 @@ func awsRestjson1_deserializeOpDocumentDescribeGroupMembershipOutput(v **Describ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeGroupMembershipOutput + var sv *DescribeQPersonalizationConfigurationOutput if *v == nil { - sv = &DescribeGroupMembershipOutput{} + sv = &DescribeQPersonalizationConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "GroupMember": - if err := awsRestjson1_deserializeDocumentGroupMember(&sv.GroupMember, value); err != nil { - return err + case "PersonalizationMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PersonalizationMode to be of type string, got %T instead", value) + } + sv.PersonalizationMode = types.PersonalizationMode(jtv) } case "RequestId": @@ -15498,14 +18524,14 @@ func awsRestjson1_deserializeOpDocumentDescribeGroupMembershipOutput(v **Describ return nil } -type awsRestjson1_deserializeOpDescribeIAMPolicyAssignment struct { +type awsRestjson1_deserializeOpDescribeRefreshSchedule struct { } -func (*awsRestjson1_deserializeOpDescribeIAMPolicyAssignment) ID() string { +func (*awsRestjson1_deserializeOpDescribeRefreshSchedule) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeIAMPolicyAssignment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeRefreshSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15523,12 +18549,12 @@ func (m *awsRestjson1_deserializeOpDescribeIAMPolicyAssignment) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeIAMPolicyAssignment(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeRefreshSchedule(response, &metadata) } - output := &DescribeIAMPolicyAssignmentOutput{} + output := &DescribeRefreshScheduleOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeIAMPolicyAssignmentOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeRefreshScheduleOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -15551,7 +18577,7 @@ func (m *awsRestjson1_deserializeOpDescribeIAMPolicyAssignment) HandleDeserializ return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeIAMPolicyAssignmentOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeRefreshScheduleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -15565,7 +18591,7 @@ func (m *awsRestjson1_deserializeOpDescribeIAMPolicyAssignment) HandleDeserializ return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeIAMPolicyAssignment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeRefreshSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15612,12 +18638,12 @@ func awsRestjson1_deserializeOpErrorDescribeIAMPolicyAssignment(response *smithy case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -15634,7 +18660,7 @@ func awsRestjson1_deserializeOpErrorDescribeIAMPolicyAssignment(response *smithy } } -func awsRestjson1_deserializeOpHttpBindingsDescribeIAMPolicyAssignmentOutput(v *DescribeIAMPolicyAssignmentOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeRefreshScheduleOutput(v *DescribeRefreshScheduleOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -15643,7 +18669,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeIAMPolicyAssignmentOutput(v * return nil } -func awsRestjson1_deserializeOpDocumentDescribeIAMPolicyAssignmentOutput(v **DescribeIAMPolicyAssignmentOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeRefreshScheduleOutput(v **DescribeRefreshScheduleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15656,17 +18682,26 @@ func awsRestjson1_deserializeOpDocumentDescribeIAMPolicyAssignmentOutput(v **Des return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeIAMPolicyAssignmentOutput + var sv *DescribeRefreshScheduleOutput if *v == nil { - sv = &DescribeIAMPolicyAssignmentOutput{} + sv = &DescribeRefreshScheduleOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "IAMPolicyAssignment": - if err := awsRestjson1_deserializeDocumentIAMPolicyAssignment(&sv.IAMPolicyAssignment, value); err != nil { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "RefreshSchedule": + if err := awsRestjson1_deserializeDocumentRefreshSchedule(&sv.RefreshSchedule, value); err != nil { return err } @@ -15688,14 +18723,14 @@ func awsRestjson1_deserializeOpDocumentDescribeIAMPolicyAssignmentOutput(v **Des return nil } -type awsRestjson1_deserializeOpDescribeIngestion struct { +type awsRestjson1_deserializeOpDescribeRoleCustomPermission struct { } -func (*awsRestjson1_deserializeOpDescribeIngestion) ID() string { +func (*awsRestjson1_deserializeOpDescribeRoleCustomPermission) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeIngestion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeRoleCustomPermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15713,16 +18748,11 @@ func (m *awsRestjson1_deserializeOpDescribeIngestion) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeIngestion(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeRoleCustomPermission(response, &metadata) } - output := &DescribeIngestionOutput{} + output := &DescribeRoleCustomPermissionOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeIngestionOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -15741,7 +18771,7 @@ func (m *awsRestjson1_deserializeOpDescribeIngestion) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeIngestionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeRoleCustomPermissionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -15755,7 +18785,7 @@ func (m *awsRestjson1_deserializeOpDescribeIngestion) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeIngestion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeRoleCustomPermission(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15805,12 +18835,15 @@ func awsRestjson1_deserializeOpErrorDescribeIngestion(response *smithyhttp.Respo case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -15824,16 +18857,7 @@ func awsRestjson1_deserializeOpErrorDescribeIngestion(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpHttpBindingsDescribeIngestionOutput(v *DescribeIngestionOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - v.Status = int32(response.StatusCode) - - return nil -} -func awsRestjson1_deserializeOpDocumentDescribeIngestionOutput(v **DescribeIngestionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeRoleCustomPermissionOutput(v **DescribeRoleCustomPermissionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15846,18 +18870,22 @@ func awsRestjson1_deserializeOpDocumentDescribeIngestionOutput(v **DescribeInges return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeIngestionOutput + var sv *DescribeRoleCustomPermissionOutput if *v == nil { - sv = &DescribeIngestionOutput{} + sv = &DescribeRoleCustomPermissionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Ingestion": - if err := awsRestjson1_deserializeDocumentIngestion(&sv.Ingestion, value); err != nil { - return err + case "CustomPermissionsName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleName to be of type string, got %T instead", value) + } + sv.CustomPermissionsName = ptr.String(jtv) } case "RequestId": @@ -15869,6 +18897,19 @@ func awsRestjson1_deserializeOpDocumentDescribeIngestionOutput(v **DescribeInges sv.RequestId = ptr.String(jtv) } + case "Status": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Status = int32(i64) + } + default: _, _ = key, value @@ -15878,14 +18919,14 @@ func awsRestjson1_deserializeOpDocumentDescribeIngestionOutput(v **DescribeInges return nil } -type awsRestjson1_deserializeOpDescribeIpRestriction struct { +type awsRestjson1_deserializeOpDescribeTemplate struct { } -func (*awsRestjson1_deserializeOpDescribeIpRestriction) ID() string { +func (*awsRestjson1_deserializeOpDescribeTemplate) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeIpRestriction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15903,12 +18944,12 @@ func (m *awsRestjson1_deserializeOpDescribeIpRestriction) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeIpRestriction(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeTemplate(response, &metadata) } - output := &DescribeIpRestrictionOutput{} + output := &DescribeTemplateOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeIpRestrictionOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeTemplateOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -15931,7 +18972,7 @@ func (m *awsRestjson1_deserializeOpDescribeIpRestriction) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeIpRestrictionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeTemplateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -15945,7 +18986,7 @@ func (m *awsRestjson1_deserializeOpDescribeIpRestriction) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeIpRestriction(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15989,18 +19030,27 @@ func awsRestjson1_deserializeOpErrorDescribeIpRestriction(response *smithyhttp.R case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -16011,7 +19061,7 @@ func awsRestjson1_deserializeOpErrorDescribeIpRestriction(response *smithyhttp.R } } -func awsRestjson1_deserializeOpHttpBindingsDescribeIpRestrictionOutput(v *DescribeIpRestrictionOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeTemplateOutput(v *DescribeTemplateOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -16020,7 +19070,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeIpRestrictionOutput(v *Descri return nil } -func awsRestjson1_deserializeOpDocumentDescribeIpRestrictionOutput(v **DescribeIpRestrictionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeTemplateOutput(v **DescribeTemplateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16033,38 +19083,15 @@ func awsRestjson1_deserializeOpDocumentDescribeIpRestrictionOutput(v **DescribeI return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeIpRestrictionOutput + var sv *DescribeTemplateOutput if *v == nil { - sv = &DescribeIpRestrictionOutput{} + sv = &DescribeTemplateOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AwsAccountId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) - } - sv.AwsAccountId = ptr.String(jtv) - } - - case "Enabled": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) - } - sv.Enabled = ptr.Bool(jtv) - } - - case "IpRestrictionRuleMap": - if err := awsRestjson1_deserializeDocumentIpRestrictionRuleMap(&sv.IpRestrictionRuleMap, value); err != nil { - return err - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -16074,13 +19101,8 @@ func awsRestjson1_deserializeOpDocumentDescribeIpRestrictionOutput(v **DescribeI sv.RequestId = ptr.String(jtv) } - case "VpcEndpointIdRestrictionRuleMap": - if err := awsRestjson1_deserializeDocumentVpcEndpointIdRestrictionRuleMap(&sv.VpcEndpointIdRestrictionRuleMap, value); err != nil { - return err - } - - case "VpcIdRestrictionRuleMap": - if err := awsRestjson1_deserializeDocumentVpcIdRestrictionRuleMap(&sv.VpcIdRestrictionRuleMap, value); err != nil { + case "Template": + if err := awsRestjson1_deserializeDocumentTemplate(&sv.Template, value); err != nil { return err } @@ -16093,14 +19115,14 @@ func awsRestjson1_deserializeOpDocumentDescribeIpRestrictionOutput(v **DescribeI return nil } -type awsRestjson1_deserializeOpDescribeKeyRegistration struct { +type awsRestjson1_deserializeOpDescribeTemplateAlias struct { } -func (*awsRestjson1_deserializeOpDescribeKeyRegistration) ID() string { +func (*awsRestjson1_deserializeOpDescribeTemplateAlias) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeKeyRegistration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeTemplateAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -16118,11 +19140,16 @@ func (m *awsRestjson1_deserializeOpDescribeKeyRegistration) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeKeyRegistration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeTemplateAlias(response, &metadata) } - output := &DescribeKeyRegistrationOutput{} + output := &DescribeTemplateAliasOutput{} out.Result = output + err = awsRestjson1_deserializeOpHttpBindingsDescribeTemplateAliasOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -16141,7 +19168,7 @@ func (m *awsRestjson1_deserializeOpDescribeKeyRegistration) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeKeyRegistrationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeTemplateAliasOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16155,7 +19182,7 @@ func (m *awsRestjson1_deserializeOpDescribeKeyRegistration) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeKeyRegistration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeTemplateAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -16196,18 +19223,18 @@ func awsRestjson1_deserializeOpErrorDescribeKeyRegistration(response *smithyhttp } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -16218,7 +19245,16 @@ func awsRestjson1_deserializeOpErrorDescribeKeyRegistration(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentDescribeKeyRegistrationOutput(v **DescribeKeyRegistrationOutput, value interface{}) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeTemplateAliasOutput(v *DescribeTemplateAliasOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentDescribeTemplateAliasOutput(v **DescribeTemplateAliasOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16231,49 +19267,27 @@ func awsRestjson1_deserializeOpDocumentDescribeKeyRegistrationOutput(v **Describ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeKeyRegistrationOutput + var sv *DescribeTemplateAliasOutput if *v == nil { - sv = &DescribeKeyRegistrationOutput{} + sv = &DescribeTemplateAliasOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AwsAccountId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) - } - sv.AwsAccountId = ptr.String(jtv) - } - - case "KeyRegistration": - if err := awsRestjson1_deserializeDocumentKeyRegistration(&sv.KeyRegistration, value); err != nil { - return err - } - case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } - case "Status": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Status = int32(i64) + case "TemplateAlias": + if err := awsRestjson1_deserializeDocumentTemplateAlias(&sv.TemplateAlias, value); err != nil { + return err } default: @@ -16285,14 +19299,14 @@ func awsRestjson1_deserializeOpDocumentDescribeKeyRegistrationOutput(v **Describ return nil } -type awsRestjson1_deserializeOpDescribeNamespace struct { +type awsRestjson1_deserializeOpDescribeTemplateDefinition struct { } -func (*awsRestjson1_deserializeOpDescribeNamespace) ID() string { +func (*awsRestjson1_deserializeOpDescribeTemplateDefinition) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeNamespace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeTemplateDefinition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -16310,12 +19324,12 @@ func (m *awsRestjson1_deserializeOpDescribeNamespace) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeNamespace(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeTemplateDefinition(response, &metadata) } - output := &DescribeNamespaceOutput{} + output := &DescribeTemplateDefinitionOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeNamespaceOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeTemplateDefinitionOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -16338,7 +19352,7 @@ func (m *awsRestjson1_deserializeOpDescribeNamespace) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeNamespaceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeTemplateDefinitionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16352,7 +19366,7 @@ func (m *awsRestjson1_deserializeOpDescribeNamespace) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeNamespace(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeTemplateDefinition(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -16396,21 +19410,27 @@ func awsRestjson1_deserializeOpErrorDescribeNamespace(response *smithyhttp.Respo case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -16421,7 +19441,7 @@ func awsRestjson1_deserializeOpErrorDescribeNamespace(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpHttpBindingsDescribeNamespaceOutput(v *DescribeNamespaceOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeTemplateDefinitionOutput(v *DescribeTemplateDefinitionOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -16430,7 +19450,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeNamespaceOutput(v *DescribeNa return nil } -func awsRestjson1_deserializeOpDocumentDescribeNamespaceOutput(v **DescribeNamespaceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeTemplateDefinitionOutput(v **DescribeTemplateDefinitionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16443,20 +19463,34 @@ func awsRestjson1_deserializeOpDocumentDescribeNamespaceOutput(v **DescribeNames return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeNamespaceOutput + var sv *DescribeTemplateDefinitionOutput if *v == nil { - sv = &DescribeNamespaceOutput{} + sv = &DescribeTemplateDefinitionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Namespace": - if err := awsRestjson1_deserializeDocumentNamespaceInfoV2(&sv.Namespace, value); err != nil { + case "Definition": + if err := awsRestjson1_deserializeDocumentTemplateVersionDefinition(&sv.Definition, value); err != nil { + return err + } + + case "Errors": + if err := awsRestjson1_deserializeDocumentTemplateErrorList(&sv.Errors, value); err != nil { return err } + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TemplateName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -16466,6 +19500,33 @@ func awsRestjson1_deserializeOpDocumentDescribeNamespaceOutput(v **DescribeNames sv.RequestId = ptr.String(jtv) } + case "ResourceStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) + } + sv.ResourceStatus = types.ResourceStatus(jtv) + } + + case "TemplateId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.TemplateId = ptr.String(jtv) + } + + case "ThemeArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ThemeArn = ptr.String(jtv) + } + default: _, _ = key, value @@ -16475,14 +19536,14 @@ func awsRestjson1_deserializeOpDocumentDescribeNamespaceOutput(v **DescribeNames return nil } -type awsRestjson1_deserializeOpDescribeQPersonalizationConfiguration struct { +type awsRestjson1_deserializeOpDescribeTemplatePermissions struct { } -func (*awsRestjson1_deserializeOpDescribeQPersonalizationConfiguration) ID() string { +func (*awsRestjson1_deserializeOpDescribeTemplatePermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeQPersonalizationConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeTemplatePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -16500,12 +19561,12 @@ func (m *awsRestjson1_deserializeOpDescribeQPersonalizationConfiguration) Handle } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeQPersonalizationConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeTemplatePermissions(response, &metadata) } - output := &DescribeQPersonalizationConfigurationOutput{} + output := &DescribeTemplatePermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeQPersonalizationConfigurationOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeTemplatePermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -16528,7 +19589,7 @@ func (m *awsRestjson1_deserializeOpDescribeQPersonalizationConfiguration) Handle return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeQPersonalizationConfigurationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeTemplatePermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16542,7 +19603,7 @@ func (m *awsRestjson1_deserializeOpDescribeQPersonalizationConfiguration) Handle return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeQPersonalizationConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeTemplatePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -16583,9 +19644,6 @@ func awsRestjson1_deserializeOpErrorDescribeQPersonalizationConfiguration(respon } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) @@ -16601,6 +19659,9 @@ func awsRestjson1_deserializeOpErrorDescribeQPersonalizationConfiguration(respon case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -16611,7 +19672,7 @@ func awsRestjson1_deserializeOpErrorDescribeQPersonalizationConfiguration(respon } } -func awsRestjson1_deserializeOpHttpBindingsDescribeQPersonalizationConfigurationOutput(v *DescribeQPersonalizationConfigurationOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeTemplatePermissionsOutput(v *DescribeTemplatePermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -16620,7 +19681,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeQPersonalizationConfiguration return nil } -func awsRestjson1_deserializeOpDocumentDescribeQPersonalizationConfigurationOutput(v **DescribeQPersonalizationConfigurationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeTemplatePermissionsOutput(v **DescribeTemplatePermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16633,31 +19694,45 @@ func awsRestjson1_deserializeOpDocumentDescribeQPersonalizationConfigurationOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeQPersonalizationConfigurationOutput + var sv *DescribeTemplatePermissionsOutput if *v == nil { - sv = &DescribeQPersonalizationConfigurationOutput{} + sv = &DescribeTemplatePermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "PersonalizationMode": + case "Permissions": + if err := awsRestjson1_deserializeDocumentUpdateResourcePermissionList(&sv.Permissions, value); err != nil { + return err + } + + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PersonalizationMode to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.PersonalizationMode = types.PersonalizationMode(jtv) + sv.RequestId = ptr.String(jtv) } - case "RequestId": + case "TemplateArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.TemplateArn = ptr.String(jtv) + } + + case "TemplateId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.TemplateId = ptr.String(jtv) } default: @@ -16669,14 +19744,14 @@ func awsRestjson1_deserializeOpDocumentDescribeQPersonalizationConfigurationOutp return nil } -type awsRestjson1_deserializeOpDescribeRefreshSchedule struct { +type awsRestjson1_deserializeOpDescribeTheme struct { } -func (*awsRestjson1_deserializeOpDescribeRefreshSchedule) ID() string { +func (*awsRestjson1_deserializeOpDescribeTheme) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeRefreshSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeTheme) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -16694,12 +19769,12 @@ func (m *awsRestjson1_deserializeOpDescribeRefreshSchedule) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeRefreshSchedule(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeTheme(response, &metadata) } - output := &DescribeRefreshScheduleOutput{} + output := &DescribeThemeOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeRefreshScheduleOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeThemeOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -16722,7 +19797,7 @@ func (m *awsRestjson1_deserializeOpDescribeRefreshSchedule) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeRefreshScheduleOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeThemeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16736,7 +19811,7 @@ func (m *awsRestjson1_deserializeOpDescribeRefreshSchedule) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeRefreshSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeTheme(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -16786,8 +19861,8 @@ func awsRestjson1_deserializeOpErrorDescribeRefreshSchedule(response *smithyhttp case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -16795,6 +19870,9 @@ func awsRestjson1_deserializeOpErrorDescribeRefreshSchedule(response *smithyhttp case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -16805,7 +19883,7 @@ func awsRestjson1_deserializeOpErrorDescribeRefreshSchedule(response *smithyhttp } } -func awsRestjson1_deserializeOpHttpBindingsDescribeRefreshScheduleOutput(v *DescribeRefreshScheduleOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeThemeOutput(v *DescribeThemeOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -16814,7 +19892,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeRefreshScheduleOutput(v *Desc return nil } -func awsRestjson1_deserializeOpDocumentDescribeRefreshScheduleOutput(v **DescribeRefreshScheduleOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeThemeOutput(v **DescribeThemeOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16827,29 +19905,15 @@ func awsRestjson1_deserializeOpDocumentDescribeRefreshScheduleOutput(v **Describ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeRefreshScheduleOutput + var sv *DescribeThemeOutput if *v == nil { - sv = &DescribeRefreshScheduleOutput{} + sv = &DescribeThemeOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "RefreshSchedule": - if err := awsRestjson1_deserializeDocumentRefreshSchedule(&sv.RefreshSchedule, value); err != nil { - return err - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -16859,6 +19923,11 @@ func awsRestjson1_deserializeOpDocumentDescribeRefreshScheduleOutput(v **Describ sv.RequestId = ptr.String(jtv) } + case "Theme": + if err := awsRestjson1_deserializeDocumentTheme(&sv.Theme, value); err != nil { + return err + } + default: _, _ = key, value @@ -16868,14 +19937,14 @@ func awsRestjson1_deserializeOpDocumentDescribeRefreshScheduleOutput(v **Describ return nil } -type awsRestjson1_deserializeOpDescribeRoleCustomPermission struct { +type awsRestjson1_deserializeOpDescribeThemeAlias struct { } -func (*awsRestjson1_deserializeOpDescribeRoleCustomPermission) ID() string { +func (*awsRestjson1_deserializeOpDescribeThemeAlias) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeRoleCustomPermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeThemeAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -16893,11 +19962,16 @@ func (m *awsRestjson1_deserializeOpDescribeRoleCustomPermission) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeRoleCustomPermission(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeThemeAlias(response, &metadata) } - output := &DescribeRoleCustomPermissionOutput{} + output := &DescribeThemeAliasOutput{} out.Result = output + err = awsRestjson1_deserializeOpHttpBindingsDescribeThemeAliasOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -16916,7 +19990,7 @@ func (m *awsRestjson1_deserializeOpDescribeRoleCustomPermission) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeRoleCustomPermissionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeThemeAliasOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16930,7 +20004,7 @@ func (m *awsRestjson1_deserializeOpDescribeRoleCustomPermission) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeRoleCustomPermission(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeThemeAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -16971,8 +20045,8 @@ func awsRestjson1_deserializeOpErrorDescribeRoleCustomPermission(response *smith } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -16980,18 +20054,15 @@ func awsRestjson1_deserializeOpErrorDescribeRoleCustomPermission(response *smith case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -17002,7 +20073,16 @@ func awsRestjson1_deserializeOpErrorDescribeRoleCustomPermission(response *smith } } -func awsRestjson1_deserializeOpDocumentDescribeRoleCustomPermissionOutput(v **DescribeRoleCustomPermissionOutput, value interface{}) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeThemeAliasOutput(v *DescribeThemeAliasOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentDescribeThemeAliasOutput(v **DescribeThemeAliasOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17015,24 +20095,15 @@ func awsRestjson1_deserializeOpDocumentDescribeRoleCustomPermissionOutput(v **De return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeRoleCustomPermissionOutput + var sv *DescribeThemeAliasOutput if *v == nil { - sv = &DescribeRoleCustomPermissionOutput{} + sv = &DescribeThemeAliasOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "CustomPermissionsName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RoleName to be of type string, got %T instead", value) - } - sv.CustomPermissionsName = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -17042,17 +20113,9 @@ func awsRestjson1_deserializeOpDocumentDescribeRoleCustomPermissionOutput(v **De sv.RequestId = ptr.String(jtv) } - case "Status": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Status = int32(i64) + case "ThemeAlias": + if err := awsRestjson1_deserializeDocumentThemeAlias(&sv.ThemeAlias, value); err != nil { + return err } default: @@ -17064,14 +20127,14 @@ func awsRestjson1_deserializeOpDocumentDescribeRoleCustomPermissionOutput(v **De return nil } -type awsRestjson1_deserializeOpDescribeTemplate struct { +type awsRestjson1_deserializeOpDescribeThemePermissions struct { } -func (*awsRestjson1_deserializeOpDescribeTemplate) ID() string { +func (*awsRestjson1_deserializeOpDescribeThemePermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeThemePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -17089,12 +20152,12 @@ func (m *awsRestjson1_deserializeOpDescribeTemplate) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeTemplate(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeThemePermissions(response, &metadata) } - output := &DescribeTemplateOutput{} + output := &DescribeThemePermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeTemplateOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeThemePermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -17117,7 +20180,7 @@ func (m *awsRestjson1_deserializeOpDescribeTemplate) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeTemplateOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeThemePermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17131,7 +20194,7 @@ func (m *awsRestjson1_deserializeOpDescribeTemplate) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeThemePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -17175,18 +20238,12 @@ func awsRestjson1_deserializeOpErrorDescribeTemplate(response *smithyhttp.Respon case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -17206,7 +20263,7 @@ func awsRestjson1_deserializeOpErrorDescribeTemplate(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpHttpBindingsDescribeTemplateOutput(v *DescribeTemplateOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeThemePermissionsOutput(v *DescribeThemePermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -17215,7 +20272,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeTemplateOutput(v *DescribeTem return nil } -func awsRestjson1_deserializeOpDocumentDescribeTemplateOutput(v **DescribeTemplateOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeThemePermissionsOutput(v **DescribeThemePermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17228,15 +20285,20 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplateOutput(v **DescribeTempla return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeTemplateOutput + var sv *DescribeThemePermissionsOutput if *v == nil { - sv = &DescribeTemplateOutput{} + sv = &DescribeThemePermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "Permissions": + if err := awsRestjson1_deserializeDocumentUpdateResourcePermissionList(&sv.Permissions, value); err != nil { + return err + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -17246,9 +20308,22 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplateOutput(v **DescribeTempla sv.RequestId = ptr.String(jtv) } - case "Template": - if err := awsRestjson1_deserializeDocumentTemplate(&sv.Template, value); err != nil { - return err + case "ThemeArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ThemeArn = ptr.String(jtv) + } + + case "ThemeId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.ThemeId = ptr.String(jtv) } default: @@ -17260,14 +20335,14 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplateOutput(v **DescribeTempla return nil } -type awsRestjson1_deserializeOpDescribeTemplateAlias struct { +type awsRestjson1_deserializeOpDescribeTopic struct { } -func (*awsRestjson1_deserializeOpDescribeTemplateAlias) ID() string { +func (*awsRestjson1_deserializeOpDescribeTopic) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeTemplateAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeTopic) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -17285,12 +20360,12 @@ func (m *awsRestjson1_deserializeOpDescribeTemplateAlias) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeTemplateAlias(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeTopic(response, &metadata) } - output := &DescribeTemplateAliasOutput{} + output := &DescribeTopicOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeTemplateAliasOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeTopicOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -17313,7 +20388,7 @@ func (m *awsRestjson1_deserializeOpDescribeTemplateAlias) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeTemplateAliasOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeTopicOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17327,7 +20402,7 @@ func (m *awsRestjson1_deserializeOpDescribeTemplateAlias) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeTemplateAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeTopic(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -17368,18 +20443,21 @@ func awsRestjson1_deserializeOpErrorDescribeTemplateAlias(response *smithyhttp.R } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -17390,7 +20468,7 @@ func awsRestjson1_deserializeOpErrorDescribeTemplateAlias(response *smithyhttp.R } } -func awsRestjson1_deserializeOpHttpBindingsDescribeTemplateAliasOutput(v *DescribeTemplateAliasOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeTopicOutput(v *DescribeTopicOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -17399,7 +20477,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeTemplateAliasOutput(v *Descri return nil } -func awsRestjson1_deserializeOpDocumentDescribeTemplateAliasOutput(v **DescribeTemplateAliasOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeTopicOutput(v **DescribeTopicOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17412,15 +20490,24 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplateAliasOutput(v **DescribeT return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeTemplateAliasOutput + var sv *DescribeTopicOutput if *v == nil { - sv = &DescribeTemplateAliasOutput{} + sv = &DescribeTopicOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -17430,11 +20517,20 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplateAliasOutput(v **DescribeT sv.RequestId = ptr.String(jtv) } - case "TemplateAlias": - if err := awsRestjson1_deserializeDocumentTemplateAlias(&sv.TemplateAlias, value); err != nil { + case "Topic": + if err := awsRestjson1_deserializeDocumentTopicDetails(&sv.Topic, value); err != nil { return err } + case "TopicId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TopicId to be of type string, got %T instead", value) + } + sv.TopicId = ptr.String(jtv) + } + default: _, _ = key, value @@ -17444,14 +20540,14 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplateAliasOutput(v **DescribeT return nil } -type awsRestjson1_deserializeOpDescribeTemplateDefinition struct { +type awsRestjson1_deserializeOpDescribeTopicPermissions struct { } -func (*awsRestjson1_deserializeOpDescribeTemplateDefinition) ID() string { +func (*awsRestjson1_deserializeOpDescribeTopicPermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeTemplateDefinition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeTopicPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -17469,12 +20565,12 @@ func (m *awsRestjson1_deserializeOpDescribeTemplateDefinition) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeTemplateDefinition(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeTopicPermissions(response, &metadata) } - output := &DescribeTemplateDefinitionOutput{} + output := &DescribeTopicPermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeTemplateDefinitionOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeTopicPermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -17497,7 +20593,7 @@ func (m *awsRestjson1_deserializeOpDescribeTemplateDefinition) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeTemplateDefinitionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeTopicPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17511,7 +20607,7 @@ func (m *awsRestjson1_deserializeOpDescribeTemplateDefinition) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeTemplateDefinition(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeTopicPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -17555,27 +20651,18 @@ func awsRestjson1_deserializeOpErrorDescribeTemplateDefinition(response *smithyh case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -17586,7 +20673,7 @@ func awsRestjson1_deserializeOpErrorDescribeTemplateDefinition(response *smithyh } } -func awsRestjson1_deserializeOpHttpBindingsDescribeTemplateDefinitionOutput(v *DescribeTemplateDefinitionOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeTopicPermissionsOutput(v *DescribeTopicPermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -17595,7 +20682,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeTemplateDefinitionOutput(v *D return nil } -func awsRestjson1_deserializeOpDocumentDescribeTemplateDefinitionOutput(v **DescribeTemplateDefinitionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeTopicPermissionsOutput(v **DescribeTopicPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17608,34 +20695,20 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplateDefinitionOutput(v **Desc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeTemplateDefinitionOutput + var sv *DescribeTopicPermissionsOutput if *v == nil { - sv = &DescribeTemplateDefinitionOutput{} + sv = &DescribeTopicPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Definition": - if err := awsRestjson1_deserializeDocumentTemplateVersionDefinition(&sv.Definition, value); err != nil { - return err - } - - case "Errors": - if err := awsRestjson1_deserializeDocumentTemplateErrorList(&sv.Errors, value); err != nil { + case "Permissions": + if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { return err } - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TemplateName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -17645,31 +20718,22 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplateDefinitionOutput(v **Desc sv.RequestId = ptr.String(jtv) } - case "ResourceStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) - } - sv.ResourceStatus = types.ResourceStatus(jtv) - } - - case "TemplateId": + case "TopicArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.TemplateId = ptr.String(jtv) + sv.TopicArn = ptr.String(jtv) } - case "ThemeArn": + case "TopicId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected TopicId to be of type string, got %T instead", value) } - sv.ThemeArn = ptr.String(jtv) + sv.TopicId = ptr.String(jtv) } default: @@ -17681,14 +20745,14 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplateDefinitionOutput(v **Desc return nil } -type awsRestjson1_deserializeOpDescribeTemplatePermissions struct { +type awsRestjson1_deserializeOpDescribeTopicRefresh struct { } -func (*awsRestjson1_deserializeOpDescribeTemplatePermissions) ID() string { +func (*awsRestjson1_deserializeOpDescribeTopicRefresh) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeTemplatePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeTopicRefresh) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -17706,12 +20770,12 @@ func (m *awsRestjson1_deserializeOpDescribeTemplatePermissions) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeTemplatePermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeTopicRefresh(response, &metadata) } - output := &DescribeTemplatePermissionsOutput{} + output := &DescribeTopicRefreshOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeTemplatePermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeTopicRefreshOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -17734,7 +20798,7 @@ func (m *awsRestjson1_deserializeOpDescribeTemplatePermissions) HandleDeserializ return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeTemplatePermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeTopicRefreshOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17748,7 +20812,7 @@ func (m *awsRestjson1_deserializeOpDescribeTemplatePermissions) HandleDeserializ return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeTemplatePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeTopicRefresh(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -17789,8 +20853,8 @@ func awsRestjson1_deserializeOpErrorDescribeTemplatePermissions(response *smithy } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -17804,9 +20868,6 @@ func awsRestjson1_deserializeOpErrorDescribeTemplatePermissions(response *smithy case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -17817,7 +20878,7 @@ func awsRestjson1_deserializeOpErrorDescribeTemplatePermissions(response *smithy } } -func awsRestjson1_deserializeOpHttpBindingsDescribeTemplatePermissionsOutput(v *DescribeTemplatePermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeTopicRefreshOutput(v *DescribeTopicRefreshOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -17826,7 +20887,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeTemplatePermissionsOutput(v * return nil } -func awsRestjson1_deserializeOpDocumentDescribeTemplatePermissionsOutput(v **DescribeTemplatePermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeTopicRefreshOutput(v **DescribeTopicRefreshOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17839,17 +20900,17 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplatePermissionsOutput(v **Des return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeTemplatePermissionsOutput + var sv *DescribeTopicRefreshOutput if *v == nil { - sv = &DescribeTemplatePermissionsOutput{} + sv = &DescribeTopicRefreshOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Permissions": - if err := awsRestjson1_deserializeDocumentUpdateResourcePermissionList(&sv.Permissions, value); err != nil { + case "RefreshDetails": + if err := awsRestjson1_deserializeDocumentTopicRefreshDetails(&sv.RefreshDetails, value); err != nil { return err } @@ -17862,24 +20923,6 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplatePermissionsOutput(v **Des sv.RequestId = ptr.String(jtv) } - case "TemplateArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.TemplateArn = ptr.String(jtv) - } - - case "TemplateId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.TemplateId = ptr.String(jtv) - } - default: _, _ = key, value @@ -17889,14 +20932,14 @@ func awsRestjson1_deserializeOpDocumentDescribeTemplatePermissionsOutput(v **Des return nil } -type awsRestjson1_deserializeOpDescribeTheme struct { +type awsRestjson1_deserializeOpDescribeTopicRefreshSchedule struct { } -func (*awsRestjson1_deserializeOpDescribeTheme) ID() string { +func (*awsRestjson1_deserializeOpDescribeTopicRefreshSchedule) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeTheme) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeTopicRefreshSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -17914,12 +20957,12 @@ func (m *awsRestjson1_deserializeOpDescribeTheme) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeTheme(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeTopicRefreshSchedule(response, &metadata) } - output := &DescribeThemeOutput{} + output := &DescribeTopicRefreshScheduleOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeThemeOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeTopicRefreshScheduleOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -17942,7 +20985,7 @@ func (m *awsRestjson1_deserializeOpDescribeTheme) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeThemeOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeTopicRefreshScheduleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17956,7 +20999,7 @@ func (m *awsRestjson1_deserializeOpDescribeTheme) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeTheme(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeTopicRefreshSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18000,12 +21043,18 @@ func awsRestjson1_deserializeOpErrorDescribeTheme(response *smithyhttp.Response, case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) @@ -18015,9 +21064,6 @@ func awsRestjson1_deserializeOpErrorDescribeTheme(response *smithyhttp.Response, case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -18028,7 +21074,7 @@ func awsRestjson1_deserializeOpErrorDescribeTheme(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsDescribeThemeOutput(v *DescribeThemeOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeTopicRefreshScheduleOutput(v *DescribeTopicRefreshScheduleOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -18037,7 +21083,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeThemeOutput(v *DescribeThemeO return nil } -func awsRestjson1_deserializeOpDocumentDescribeThemeOutput(v **DescribeThemeOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeTopicRefreshScheduleOutput(v **DescribeTopicRefreshScheduleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18050,15 +21096,29 @@ func awsRestjson1_deserializeOpDocumentDescribeThemeOutput(v **DescribeThemeOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeThemeOutput + var sv *DescribeTopicRefreshScheduleOutput if *v == nil { - sv = &DescribeThemeOutput{} + sv = &DescribeTopicRefreshScheduleOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "DatasetArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.DatasetArn = ptr.String(jtv) + } + + case "RefreshSchedule": + if err := awsRestjson1_deserializeDocumentTopicRefreshSchedule(&sv.RefreshSchedule, value); err != nil { + return err + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -18068,9 +21128,22 @@ func awsRestjson1_deserializeOpDocumentDescribeThemeOutput(v **DescribeThemeOutp sv.RequestId = ptr.String(jtv) } - case "Theme": - if err := awsRestjson1_deserializeDocumentTheme(&sv.Theme, value); err != nil { - return err + case "TopicArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.TopicArn = ptr.String(jtv) + } + + case "TopicId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TopicId to be of type string, got %T instead", value) + } + sv.TopicId = ptr.String(jtv) } default: @@ -18082,14 +21155,14 @@ func awsRestjson1_deserializeOpDocumentDescribeThemeOutput(v **DescribeThemeOutp return nil } -type awsRestjson1_deserializeOpDescribeThemeAlias struct { +type awsRestjson1_deserializeOpDescribeUser struct { } -func (*awsRestjson1_deserializeOpDescribeThemeAlias) ID() string { +func (*awsRestjson1_deserializeOpDescribeUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeThemeAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18107,12 +21180,12 @@ func (m *awsRestjson1_deserializeOpDescribeThemeAlias) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeThemeAlias(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeUser(response, &metadata) } - output := &DescribeThemeAliasOutput{} + output := &DescribeUserOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeThemeAliasOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeUserOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -18135,7 +21208,7 @@ func (m *awsRestjson1_deserializeOpDescribeThemeAlias) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeThemeAliasOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18149,7 +21222,7 @@ func (m *awsRestjson1_deserializeOpDescribeThemeAlias) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeThemeAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18190,8 +21263,8 @@ func awsRestjson1_deserializeOpErrorDescribeThemeAlias(response *smithyhttp.Resp } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -18199,15 +21272,18 @@ func awsRestjson1_deserializeOpErrorDescribeThemeAlias(response *smithyhttp.Resp case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -18218,7 +21294,7 @@ func awsRestjson1_deserializeOpErrorDescribeThemeAlias(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpHttpBindingsDescribeThemeAliasOutput(v *DescribeThemeAliasOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeUserOutput(v *DescribeUserOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -18227,7 +21303,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeThemeAliasOutput(v *DescribeT return nil } -func awsRestjson1_deserializeOpDocumentDescribeThemeAliasOutput(v **DescribeThemeAliasOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeUserOutput(v **DescribeUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18240,9 +21316,9 @@ func awsRestjson1_deserializeOpDocumentDescribeThemeAliasOutput(v **DescribeThem return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeThemeAliasOutput + var sv *DescribeUserOutput if *v == nil { - sv = &DescribeThemeAliasOutput{} + sv = &DescribeUserOutput{} } else { sv = *v } @@ -18258,8 +21334,8 @@ func awsRestjson1_deserializeOpDocumentDescribeThemeAliasOutput(v **DescribeThem sv.RequestId = ptr.String(jtv) } - case "ThemeAlias": - if err := awsRestjson1_deserializeDocumentThemeAlias(&sv.ThemeAlias, value); err != nil { + case "User": + if err := awsRestjson1_deserializeDocumentUser(&sv.User, value); err != nil { return err } @@ -18272,14 +21348,14 @@ func awsRestjson1_deserializeOpDocumentDescribeThemeAliasOutput(v **DescribeThem return nil } -type awsRestjson1_deserializeOpDescribeThemePermissions struct { +type awsRestjson1_deserializeOpDescribeVPCConnection struct { } -func (*awsRestjson1_deserializeOpDescribeThemePermissions) ID() string { +func (*awsRestjson1_deserializeOpDescribeVPCConnection) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeThemePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeVPCConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18297,16 +21373,11 @@ func (m *awsRestjson1_deserializeOpDescribeThemePermissions) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeThemePermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeVPCConnection(response, &metadata) } - output := &DescribeThemePermissionsOutput{} + output := &DescribeVPCConnectionOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeThemePermissionsOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -18325,7 +21396,7 @@ func (m *awsRestjson1_deserializeOpDescribeThemePermissions) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeThemePermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeVPCConnectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18339,7 +21410,7 @@ func (m *awsRestjson1_deserializeOpDescribeThemePermissions) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeThemePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeVPCConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18408,16 +21479,7 @@ func awsRestjson1_deserializeOpErrorDescribeThemePermissions(response *smithyhtt } } -func awsRestjson1_deserializeOpHttpBindingsDescribeThemePermissionsOutput(v *DescribeThemePermissionsOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - v.Status = int32(response.StatusCode) - - return nil -} -func awsRestjson1_deserializeOpDocumentDescribeThemePermissionsOutput(v **DescribeThemePermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeVPCConnectionOutput(v **DescribeVPCConnectionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18430,20 +21492,15 @@ func awsRestjson1_deserializeOpDocumentDescribeThemePermissionsOutput(v **Descri return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeThemePermissionsOutput + var sv *DescribeVPCConnectionOutput if *v == nil { - sv = &DescribeThemePermissionsOutput{} + sv = &DescribeVPCConnectionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Permissions": - if err := awsRestjson1_deserializeDocumentUpdateResourcePermissionList(&sv.Permissions, value); err != nil { - return err - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -18453,22 +21510,22 @@ func awsRestjson1_deserializeOpDocumentDescribeThemePermissionsOutput(v **Descri sv.RequestId = ptr.String(jtv) } - case "ThemeArn": + case "Status": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) } - sv.ThemeArn = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Status = int32(i64) } - case "ThemeId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.ThemeId = ptr.String(jtv) + case "VPCConnection": + if err := awsRestjson1_deserializeDocumentVPCConnection(&sv.VPCConnection, value); err != nil { + return err } default: @@ -18480,14 +21537,14 @@ func awsRestjson1_deserializeOpDocumentDescribeThemePermissionsOutput(v **Descri return nil } -type awsRestjson1_deserializeOpDescribeTopic struct { +type awsRestjson1_deserializeOpGenerateEmbedUrlForAnonymousUser struct { } -func (*awsRestjson1_deserializeOpDescribeTopic) ID() string { +func (*awsRestjson1_deserializeOpGenerateEmbedUrlForAnonymousUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeTopic) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGenerateEmbedUrlForAnonymousUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18505,12 +21562,12 @@ func (m *awsRestjson1_deserializeOpDescribeTopic) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeTopic(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGenerateEmbedUrlForAnonymousUser(response, &metadata) } - output := &DescribeTopicOutput{} + output := &GenerateEmbedUrlForAnonymousUserOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeTopicOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsGenerateEmbedUrlForAnonymousUserOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -18533,7 +21590,7 @@ func (m *awsRestjson1_deserializeOpDescribeTopic) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeTopicOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForAnonymousUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18547,7 +21604,7 @@ func (m *awsRestjson1_deserializeOpDescribeTopic) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeTopic(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGenerateEmbedUrlForAnonymousUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18600,9 +21657,18 @@ func awsRestjson1_deserializeOpErrorDescribeTopic(response *smithyhttp.Response, case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("SessionLifetimeInMinutesInvalidException", errorCode): + return awsRestjson1_deserializeErrorSessionLifetimeInMinutesInvalidException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedPricingPlanException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedPricingPlanException(response, errorBody) + + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -18613,7 +21679,7 @@ func awsRestjson1_deserializeOpErrorDescribeTopic(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsDescribeTopicOutput(v *DescribeTopicOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsGenerateEmbedUrlForAnonymousUserOutput(v *GenerateEmbedUrlForAnonymousUserOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -18622,7 +21688,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeTopicOutput(v *DescribeTopicO return nil } -func awsRestjson1_deserializeOpDocumentDescribeTopicOutput(v **DescribeTopicOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForAnonymousUserOutput(v **GenerateEmbedUrlForAnonymousUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18635,45 +21701,40 @@ func awsRestjson1_deserializeOpDocumentDescribeTopicOutput(v **DescribeTopicOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeTopicOutput + var sv *GenerateEmbedUrlForAnonymousUserOutput if *v == nil { - sv = &DescribeTopicOutput{} + sv = &GenerateEmbedUrlForAnonymousUserOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": + case "AnonymousUserArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.Arn = ptr.String(jtv) + sv.AnonymousUserArn = ptr.String(jtv) } - case "RequestId": + case "EmbedUrl": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected EmbeddingUrl to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) - } - - case "Topic": - if err := awsRestjson1_deserializeDocumentTopicDetails(&sv.Topic, value); err != nil { - return err + sv.EmbedUrl = ptr.String(jtv) } - case "TopicId": + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TopicId to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.TopicId = ptr.String(jtv) + sv.RequestId = ptr.String(jtv) } default: @@ -18685,14 +21746,14 @@ func awsRestjson1_deserializeOpDocumentDescribeTopicOutput(v **DescribeTopicOutp return nil } -type awsRestjson1_deserializeOpDescribeTopicPermissions struct { +type awsRestjson1_deserializeOpGenerateEmbedUrlForRegisteredUser struct { } -func (*awsRestjson1_deserializeOpDescribeTopicPermissions) ID() string { +func (*awsRestjson1_deserializeOpGenerateEmbedUrlForRegisteredUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeTopicPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGenerateEmbedUrlForRegisteredUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18710,12 +21771,12 @@ func (m *awsRestjson1_deserializeOpDescribeTopicPermissions) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeTopicPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGenerateEmbedUrlForRegisteredUser(response, &metadata) } - output := &DescribeTopicPermissionsOutput{} + output := &GenerateEmbedUrlForRegisteredUserOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeTopicPermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsGenerateEmbedUrlForRegisteredUserOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -18738,7 +21799,7 @@ func (m *awsRestjson1_deserializeOpDescribeTopicPermissions) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeTopicPermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForRegisteredUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18752,7 +21813,7 @@ func (m *awsRestjson1_deserializeOpDescribeTopicPermissions) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeTopicPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGenerateEmbedUrlForRegisteredUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18802,12 +21863,24 @@ func awsRestjson1_deserializeOpErrorDescribeTopicPermissions(response *smithyhtt case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("QuickSightUserNotFoundException", errorCode): + return awsRestjson1_deserializeErrorQuickSightUserNotFoundException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("SessionLifetimeInMinutesInvalidException", errorCode): + return awsRestjson1_deserializeErrorSessionLifetimeInMinutesInvalidException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedPricingPlanException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedPricingPlanException(response, errorBody) + + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -18818,7 +21891,7 @@ func awsRestjson1_deserializeOpErrorDescribeTopicPermissions(response *smithyhtt } } -func awsRestjson1_deserializeOpHttpBindingsDescribeTopicPermissionsOutput(v *DescribeTopicPermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsGenerateEmbedUrlForRegisteredUserOutput(v *GenerateEmbedUrlForRegisteredUserOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -18827,7 +21900,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeTopicPermissionsOutput(v *Des return nil } -func awsRestjson1_deserializeOpDocumentDescribeTopicPermissionsOutput(v **DescribeTopicPermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForRegisteredUserOutput(v **GenerateEmbedUrlForRegisteredUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18840,45 +21913,31 @@ func awsRestjson1_deserializeOpDocumentDescribeTopicPermissionsOutput(v **Descri return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeTopicPermissionsOutput + var sv *GenerateEmbedUrlForRegisteredUserOutput if *v == nil { - sv = &DescribeTopicPermissionsOutput{} + sv = &GenerateEmbedUrlForRegisteredUserOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Permissions": - if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { - return err - } - - case "RequestId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.RequestId = ptr.String(jtv) - } - - case "TopicArn": + case "EmbedUrl": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected EmbeddingUrl to be of type string, got %T instead", value) } - sv.TopicArn = ptr.String(jtv) + sv.EmbedUrl = ptr.String(jtv) } - case "TopicId": + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TopicId to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.TopicId = ptr.String(jtv) + sv.RequestId = ptr.String(jtv) } default: @@ -18890,14 +21949,14 @@ func awsRestjson1_deserializeOpDocumentDescribeTopicPermissionsOutput(v **Descri return nil } -type awsRestjson1_deserializeOpDescribeTopicRefresh struct { +type awsRestjson1_deserializeOpGetDashboardEmbedUrl struct { } -func (*awsRestjson1_deserializeOpDescribeTopicRefresh) ID() string { +func (*awsRestjson1_deserializeOpGetDashboardEmbedUrl) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeTopicRefresh) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetDashboardEmbedUrl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18915,12 +21974,12 @@ func (m *awsRestjson1_deserializeOpDescribeTopicRefresh) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeTopicRefresh(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetDashboardEmbedUrl(response, &metadata) } - output := &DescribeTopicRefreshOutput{} + output := &GetDashboardEmbedUrlOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeTopicRefreshOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsGetDashboardEmbedUrlOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -18943,7 +22002,7 @@ func (m *awsRestjson1_deserializeOpDescribeTopicRefresh) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeTopicRefreshOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetDashboardEmbedUrlOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18957,7 +22016,7 @@ func (m *awsRestjson1_deserializeOpDescribeTopicRefresh) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeTopicRefresh(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetDashboardEmbedUrl(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19001,18 +22060,39 @@ func awsRestjson1_deserializeOpErrorDescribeTopicRefresh(response *smithyhttp.Re case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("DomainNotWhitelistedException", errorCode): + return awsRestjson1_deserializeErrorDomainNotWhitelistedException(response, errorBody) + + case strings.EqualFold("IdentityTypeNotSupportedException", errorCode): + return awsRestjson1_deserializeErrorIdentityTypeNotSupportedException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("QuickSightUserNotFoundException", errorCode): + return awsRestjson1_deserializeErrorQuickSightUserNotFoundException(response, errorBody) + + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("SessionLifetimeInMinutesInvalidException", errorCode): + return awsRestjson1_deserializeErrorSessionLifetimeInMinutesInvalidException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedPricingPlanException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedPricingPlanException(response, errorBody) + + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -19023,7 +22103,7 @@ func awsRestjson1_deserializeOpErrorDescribeTopicRefresh(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpHttpBindingsDescribeTopicRefreshOutput(v *DescribeTopicRefreshOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsGetDashboardEmbedUrlOutput(v *GetDashboardEmbedUrlOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -19032,7 +22112,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeTopicRefreshOutput(v *Describ return nil } -func awsRestjson1_deserializeOpDocumentDescribeTopicRefreshOutput(v **DescribeTopicRefreshOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetDashboardEmbedUrlOutput(v **GetDashboardEmbedUrlOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19045,18 +22125,22 @@ func awsRestjson1_deserializeOpDocumentDescribeTopicRefreshOutput(v **DescribeTo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeTopicRefreshOutput + var sv *GetDashboardEmbedUrlOutput if *v == nil { - sv = &DescribeTopicRefreshOutput{} + sv = &GetDashboardEmbedUrlOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "RefreshDetails": - if err := awsRestjson1_deserializeDocumentTopicRefreshDetails(&sv.RefreshDetails, value); err != nil { - return err + case "EmbedUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EmbeddingUrl to be of type string, got %T instead", value) + } + sv.EmbedUrl = ptr.String(jtv) } case "RequestId": @@ -19077,14 +22161,14 @@ func awsRestjson1_deserializeOpDocumentDescribeTopicRefreshOutput(v **DescribeTo return nil } -type awsRestjson1_deserializeOpDescribeTopicRefreshSchedule struct { +type awsRestjson1_deserializeOpGetSessionEmbedUrl struct { } -func (*awsRestjson1_deserializeOpDescribeTopicRefreshSchedule) ID() string { +func (*awsRestjson1_deserializeOpGetSessionEmbedUrl) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeTopicRefreshSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetSessionEmbedUrl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19102,12 +22186,12 @@ func (m *awsRestjson1_deserializeOpDescribeTopicRefreshSchedule) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeTopicRefreshSchedule(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetSessionEmbedUrl(response, &metadata) } - output := &DescribeTopicRefreshScheduleOutput{} + output := &GetSessionEmbedUrlOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeTopicRefreshScheduleOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsGetSessionEmbedUrlOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -19130,7 +22214,7 @@ func (m *awsRestjson1_deserializeOpDescribeTopicRefreshSchedule) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeTopicRefreshScheduleOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetSessionEmbedUrlOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19144,7 +22228,7 @@ func (m *awsRestjson1_deserializeOpDescribeTopicRefreshSchedule) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeTopicRefreshSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetSessionEmbedUrl(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19188,17 +22272,14 @@ func awsRestjson1_deserializeOpErrorDescribeTopicRefreshSchedule(response *smith case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("QuickSightUserNotFoundException", errorCode): + return awsRestjson1_deserializeErrorQuickSightUserNotFoundException(response, errorBody) case strings.EqualFold("ResourceExistsException", errorCode): return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) @@ -19206,9 +22287,15 @@ func awsRestjson1_deserializeOpErrorDescribeTopicRefreshSchedule(response *smith case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("SessionLifetimeInMinutesInvalidException", errorCode): + return awsRestjson1_deserializeErrorSessionLifetimeInMinutesInvalidException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -19219,7 +22306,7 @@ func awsRestjson1_deserializeOpErrorDescribeTopicRefreshSchedule(response *smith } } -func awsRestjson1_deserializeOpHttpBindingsDescribeTopicRefreshScheduleOutput(v *DescribeTopicRefreshScheduleOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsGetSessionEmbedUrlOutput(v *GetSessionEmbedUrlOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -19228,7 +22315,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeTopicRefreshScheduleOutput(v return nil } -func awsRestjson1_deserializeOpDocumentDescribeTopicRefreshScheduleOutput(v **DescribeTopicRefreshScheduleOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetSessionEmbedUrlOutput(v **GetSessionEmbedUrlOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19241,27 +22328,22 @@ func awsRestjson1_deserializeOpDocumentDescribeTopicRefreshScheduleOutput(v **De return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeTopicRefreshScheduleOutput + var sv *GetSessionEmbedUrlOutput if *v == nil { - sv = &DescribeTopicRefreshScheduleOutput{} + sv = &GetSessionEmbedUrlOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DatasetArn": + case "EmbedUrl": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected EmbeddingUrl to be of type string, got %T instead", value) } - sv.DatasetArn = ptr.String(jtv) - } - - case "RefreshSchedule": - if err := awsRestjson1_deserializeDocumentTopicRefreshSchedule(&sv.RefreshSchedule, value); err != nil { - return err + sv.EmbedUrl = ptr.String(jtv) } case "RequestId": @@ -19273,24 +22355,6 @@ func awsRestjson1_deserializeOpDocumentDescribeTopicRefreshScheduleOutput(v **De sv.RequestId = ptr.String(jtv) } - case "TopicArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.TopicArn = ptr.String(jtv) - } - - case "TopicId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TopicId to be of type string, got %T instead", value) - } - sv.TopicId = ptr.String(jtv) - } - default: _, _ = key, value @@ -19300,14 +22364,14 @@ func awsRestjson1_deserializeOpDocumentDescribeTopicRefreshScheduleOutput(v **De return nil } -type awsRestjson1_deserializeOpDescribeUser struct { +type awsRestjson1_deserializeOpListAnalyses struct { } -func (*awsRestjson1_deserializeOpDescribeUser) ID() string { +func (*awsRestjson1_deserializeOpListAnalyses) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListAnalyses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19325,12 +22389,12 @@ func (m *awsRestjson1_deserializeOpDescribeUser) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListAnalyses(response, &metadata) } - output := &DescribeUserOutput{} + output := &ListAnalysesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeUserOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListAnalysesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -19353,7 +22417,7 @@ func (m *awsRestjson1_deserializeOpDescribeUser) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeUserOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListAnalysesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19367,7 +22431,7 @@ func (m *awsRestjson1_deserializeOpDescribeUser) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListAnalyses(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19408,27 +22472,18 @@ func awsRestjson1_deserializeOpErrorDescribeUser(response *smithyhttp.Response, } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -19439,7 +22494,7 @@ func awsRestjson1_deserializeOpErrorDescribeUser(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsDescribeUserOutput(v *DescribeUserOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListAnalysesOutput(v *ListAnalysesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -19448,7 +22503,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeUserOutput(v *DescribeUserOut return nil } -func awsRestjson1_deserializeOpDocumentDescribeUserOutput(v **DescribeUserOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListAnalysesOutput(v **ListAnalysesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19461,27 +22516,36 @@ func awsRestjson1_deserializeOpDocumentDescribeUserOutput(v **DescribeUserOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeUserOutput + var sv *ListAnalysesOutput if *v == nil { - sv = &DescribeUserOutput{} + sv = &ListAnalysesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "RequestId": + case "AnalysisSummaryList": + if err := awsRestjson1_deserializeDocumentAnalysisSummaryList(&sv.AnalysisSummaryList, value); err != nil { + return err + } + + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } - case "User": - if err := awsRestjson1_deserializeDocumentUser(&sv.User, value); err != nil { - return err + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) } default: @@ -19493,14 +22557,14 @@ func awsRestjson1_deserializeOpDocumentDescribeUserOutput(v **DescribeUserOutput return nil } -type awsRestjson1_deserializeOpDescribeVPCConnection struct { +type awsRestjson1_deserializeOpListAssetBundleExportJobs struct { } -func (*awsRestjson1_deserializeOpDescribeVPCConnection) ID() string { +func (*awsRestjson1_deserializeOpListAssetBundleExportJobs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeVPCConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListAssetBundleExportJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19518,11 +22582,16 @@ func (m *awsRestjson1_deserializeOpDescribeVPCConnection) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeVPCConnection(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListAssetBundleExportJobs(response, &metadata) } - output := &DescribeVPCConnectionOutput{} + output := &ListAssetBundleExportJobsOutput{} out.Result = output + err = awsRestjson1_deserializeOpHttpBindingsListAssetBundleExportJobsOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -19541,7 +22610,7 @@ func (m *awsRestjson1_deserializeOpDescribeVPCConnection) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeVPCConnectionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListAssetBundleExportJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19555,7 +22624,7 @@ func (m *awsRestjson1_deserializeOpDescribeVPCConnection) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeVPCConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListAssetBundleExportJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19599,11 +22668,8 @@ func awsRestjson1_deserializeOpErrorDescribeVPCConnection(response *smithyhttp.R case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): - return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -19624,7 +22690,16 @@ func awsRestjson1_deserializeOpErrorDescribeVPCConnection(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentDescribeVPCConnectionOutput(v **DescribeVPCConnectionOutput, value interface{}) error { +func awsRestjson1_deserializeOpHttpBindingsListAssetBundleExportJobsOutput(v *ListAssetBundleExportJobsOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentListAssetBundleExportJobsOutput(v **ListAssetBundleExportJobsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19637,40 +22712,36 @@ func awsRestjson1_deserializeOpDocumentDescribeVPCConnectionOutput(v **DescribeV return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeVPCConnectionOutput + var sv *ListAssetBundleExportJobsOutput if *v == nil { - sv = &DescribeVPCConnectionOutput{} + sv = &ListAssetBundleExportJobsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "RequestId": + case "AssetBundleExportJobSummaryList": + if err := awsRestjson1_deserializeDocumentAssetBundleExportJobSummaryList(&sv.AssetBundleExportJobSummaryList, value); err != nil { + return err + } + + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } - case "Status": + case "RequestId": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } - sv.Status = int32(i64) - } - - case "VPCConnection": - if err := awsRestjson1_deserializeDocumentVPCConnection(&sv.VPCConnection, value); err != nil { - return err + sv.RequestId = ptr.String(jtv) } default: @@ -19682,14 +22753,14 @@ func awsRestjson1_deserializeOpDocumentDescribeVPCConnectionOutput(v **DescribeV return nil } -type awsRestjson1_deserializeOpGenerateEmbedUrlForAnonymousUser struct { +type awsRestjson1_deserializeOpListAssetBundleImportJobs struct { } -func (*awsRestjson1_deserializeOpGenerateEmbedUrlForAnonymousUser) ID() string { +func (*awsRestjson1_deserializeOpListAssetBundleImportJobs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGenerateEmbedUrlForAnonymousUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListAssetBundleImportJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19707,12 +22778,12 @@ func (m *awsRestjson1_deserializeOpGenerateEmbedUrlForAnonymousUser) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGenerateEmbedUrlForAnonymousUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListAssetBundleImportJobs(response, &metadata) } - output := &GenerateEmbedUrlForAnonymousUserOutput{} + output := &ListAssetBundleImportJobsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsGenerateEmbedUrlForAnonymousUserOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListAssetBundleImportJobsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -19735,7 +22806,7 @@ func (m *awsRestjson1_deserializeOpGenerateEmbedUrlForAnonymousUser) HandleDeser return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForAnonymousUserOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListAssetBundleImportJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19749,7 +22820,7 @@ func (m *awsRestjson1_deserializeOpGenerateEmbedUrlForAnonymousUser) HandleDeser return out, metadata, err } -func awsRestjson1_deserializeOpErrorGenerateEmbedUrlForAnonymousUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListAssetBundleImportJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19793,24 +22864,15 @@ func awsRestjson1_deserializeOpErrorGenerateEmbedUrlForAnonymousUser(response *s case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): - return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("SessionLifetimeInMinutesInvalidException", errorCode): - return awsRestjson1_deserializeErrorSessionLifetimeInMinutesInvalidException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedPricingPlanException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedPricingPlanException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) @@ -19824,7 +22886,7 @@ func awsRestjson1_deserializeOpErrorGenerateEmbedUrlForAnonymousUser(response *s } } -func awsRestjson1_deserializeOpHttpBindingsGenerateEmbedUrlForAnonymousUserOutput(v *GenerateEmbedUrlForAnonymousUserOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListAssetBundleImportJobsOutput(v *ListAssetBundleImportJobsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -19833,7 +22895,7 @@ func awsRestjson1_deserializeOpHttpBindingsGenerateEmbedUrlForAnonymousUserOutpu return nil } -func awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForAnonymousUserOutput(v **GenerateEmbedUrlForAnonymousUserOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListAssetBundleImportJobsOutput(v **ListAssetBundleImportJobsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -19846,38 +22908,34 @@ func awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForAnonymousUserOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GenerateEmbedUrlForAnonymousUserOutput + var sv *ListAssetBundleImportJobsOutput if *v == nil { - sv = &GenerateEmbedUrlForAnonymousUserOutput{} + sv = &ListAssetBundleImportJobsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AnonymousUserArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.AnonymousUserArn = ptr.String(jtv) + case "AssetBundleImportJobSummaryList": + if err := awsRestjson1_deserializeDocumentAssetBundleImportJobSummaryList(&sv.AssetBundleImportJobSummaryList, value); err != nil { + return err } - case "EmbedUrl": + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EmbeddingUrl to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.EmbedUrl = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } @@ -19891,14 +22949,14 @@ func awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForAnonymousUserOutput(v return nil } -type awsRestjson1_deserializeOpGenerateEmbedUrlForRegisteredUser struct { +type awsRestjson1_deserializeOpListBrands struct { } -func (*awsRestjson1_deserializeOpGenerateEmbedUrlForRegisteredUser) ID() string { +func (*awsRestjson1_deserializeOpListBrands) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGenerateEmbedUrlForRegisteredUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListBrands) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19916,16 +22974,11 @@ func (m *awsRestjson1_deserializeOpGenerateEmbedUrlForRegisteredUser) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGenerateEmbedUrlForRegisteredUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListBrands(response, &metadata) } - output := &GenerateEmbedUrlForRegisteredUserOutput{} + output := &ListBrandsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsGenerateEmbedUrlForRegisteredUserOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -19944,7 +22997,7 @@ func (m *awsRestjson1_deserializeOpGenerateEmbedUrlForRegisteredUser) HandleDese return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForRegisteredUserOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListBrandsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19958,7 +23011,7 @@ func (m *awsRestjson1_deserializeOpGenerateEmbedUrlForRegisteredUser) HandleDese return out, metadata, err } -func awsRestjson1_deserializeOpErrorGenerateEmbedUrlForRegisteredUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListBrands(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -20002,30 +23055,15 @@ func awsRestjson1_deserializeOpErrorGenerateEmbedUrlForRegisteredUser(response * case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): - return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - - case strings.EqualFold("QuickSightUserNotFoundException", errorCode): - return awsRestjson1_deserializeErrorQuickSightUserNotFoundException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("SessionLifetimeInMinutesInvalidException", errorCode): - return awsRestjson1_deserializeErrorSessionLifetimeInMinutesInvalidException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedPricingPlanException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedPricingPlanException(response, errorBody) - - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -20036,16 +23074,7 @@ func awsRestjson1_deserializeOpErrorGenerateEmbedUrlForRegisteredUser(response * } } -func awsRestjson1_deserializeOpHttpBindingsGenerateEmbedUrlForRegisteredUserOutput(v *GenerateEmbedUrlForRegisteredUserOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - v.Status = int32(response.StatusCode) - - return nil -} -func awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForRegisteredUserOutput(v **GenerateEmbedUrlForRegisteredUserOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListBrandsOutput(v **ListBrandsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20058,31 +23087,27 @@ func awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForRegisteredUserOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GenerateEmbedUrlForRegisteredUserOutput + var sv *ListBrandsOutput if *v == nil { - sv = &GenerateEmbedUrlForRegisteredUserOutput{} + sv = &ListBrandsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "EmbedUrl": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EmbeddingUrl to be of type string, got %T instead", value) - } - sv.EmbedUrl = ptr.String(jtv) + case "Brands": + if err := awsRestjson1_deserializeDocumentBrandSummaryList(&sv.Brands, value); err != nil { + return err } - case "RequestId": + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -20094,14 +23119,14 @@ func awsRestjson1_deserializeOpDocumentGenerateEmbedUrlForRegisteredUserOutput(v return nil } -type awsRestjson1_deserializeOpGetDashboardEmbedUrl struct { +type awsRestjson1_deserializeOpListCustomPermissions struct { } -func (*awsRestjson1_deserializeOpGetDashboardEmbedUrl) ID() string { +func (*awsRestjson1_deserializeOpListCustomPermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetDashboardEmbedUrl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListCustomPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20119,12 +23144,12 @@ func (m *awsRestjson1_deserializeOpGetDashboardEmbedUrl) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetDashboardEmbedUrl(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListCustomPermissions(response, &metadata) } - output := &GetDashboardEmbedUrlOutput{} + output := &ListCustomPermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsGetDashboardEmbedUrlOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListCustomPermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -20147,7 +23172,7 @@ func (m *awsRestjson1_deserializeOpGetDashboardEmbedUrl) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetDashboardEmbedUrlOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListCustomPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20161,7 +23186,7 @@ func (m *awsRestjson1_deserializeOpGetDashboardEmbedUrl) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetDashboardEmbedUrl(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListCustomPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -20205,39 +23230,24 @@ func awsRestjson1_deserializeOpErrorGetDashboardEmbedUrl(response *smithyhttp.Re case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("DomainNotWhitelistedException", errorCode): - return awsRestjson1_deserializeErrorDomainNotWhitelistedException(response, errorBody) - - case strings.EqualFold("IdentityTypeNotSupportedException", errorCode): - return awsRestjson1_deserializeErrorIdentityTypeNotSupportedException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("QuickSightUserNotFoundException", errorCode): - return awsRestjson1_deserializeErrorQuickSightUserNotFoundException(response, errorBody) - - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("SessionLifetimeInMinutesInvalidException", errorCode): - return awsRestjson1_deserializeErrorSessionLifetimeInMinutesInvalidException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedPricingPlanException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedPricingPlanException(response, errorBody) - - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -20248,7 +23258,7 @@ func awsRestjson1_deserializeOpErrorGetDashboardEmbedUrl(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpHttpBindingsGetDashboardEmbedUrlOutput(v *GetDashboardEmbedUrlOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListCustomPermissionsOutput(v *ListCustomPermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -20257,7 +23267,7 @@ func awsRestjson1_deserializeOpHttpBindingsGetDashboardEmbedUrlOutput(v *GetDash return nil } -func awsRestjson1_deserializeOpDocumentGetDashboardEmbedUrlOutput(v **GetDashboardEmbedUrlOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListCustomPermissionsOutput(v **ListCustomPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20270,22 +23280,27 @@ func awsRestjson1_deserializeOpDocumentGetDashboardEmbedUrlOutput(v **GetDashboa return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetDashboardEmbedUrlOutput + var sv *ListCustomPermissionsOutput if *v == nil { - sv = &GetDashboardEmbedUrlOutput{} + sv = &ListCustomPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "EmbedUrl": + case "CustomPermissionsList": + if err := awsRestjson1_deserializeDocumentCustomPermissionsList(&sv.CustomPermissionsList, value); err != nil { + return err + } + + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EmbeddingUrl to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.EmbedUrl = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } case "RequestId": @@ -20306,14 +23321,14 @@ func awsRestjson1_deserializeOpDocumentGetDashboardEmbedUrlOutput(v **GetDashboa return nil } -type awsRestjson1_deserializeOpGetSessionEmbedUrl struct { +type awsRestjson1_deserializeOpListDashboards struct { } -func (*awsRestjson1_deserializeOpGetSessionEmbedUrl) ID() string { +func (*awsRestjson1_deserializeOpListDashboards) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetSessionEmbedUrl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListDashboards) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20331,12 +23346,12 @@ func (m *awsRestjson1_deserializeOpGetSessionEmbedUrl) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetSessionEmbedUrl(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListDashboards(response, &metadata) } - output := &GetSessionEmbedUrlOutput{} + output := &ListDashboardsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsGetSessionEmbedUrlOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListDashboardsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -20359,7 +23374,7 @@ func (m *awsRestjson1_deserializeOpGetSessionEmbedUrl) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetSessionEmbedUrlOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListDashboardsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20373,7 +23388,7 @@ func (m *awsRestjson1_deserializeOpGetSessionEmbedUrl) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetSessionEmbedUrl(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListDashboards(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -20414,26 +23429,11 @@ func awsRestjson1_deserializeOpErrorGetSessionEmbedUrl(response *smithyhttp.Resp } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - - case strings.EqualFold("QuickSightUserNotFoundException", errorCode): - return awsRestjson1_deserializeErrorQuickSightUserNotFoundException(response, errorBody) - - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("SessionLifetimeInMinutesInvalidException", errorCode): - return awsRestjson1_deserializeErrorSessionLifetimeInMinutesInvalidException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -20451,7 +23451,7 @@ func awsRestjson1_deserializeOpErrorGetSessionEmbedUrl(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpHttpBindingsGetSessionEmbedUrlOutput(v *GetSessionEmbedUrlOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListDashboardsOutput(v *ListDashboardsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -20460,7 +23460,7 @@ func awsRestjson1_deserializeOpHttpBindingsGetSessionEmbedUrlOutput(v *GetSessio return nil } -func awsRestjson1_deserializeOpDocumentGetSessionEmbedUrlOutput(v **GetSessionEmbedUrlOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListDashboardsOutput(v **ListDashboardsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20473,22 +23473,27 @@ func awsRestjson1_deserializeOpDocumentGetSessionEmbedUrlOutput(v **GetSessionEm return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetSessionEmbedUrlOutput + var sv *ListDashboardsOutput if *v == nil { - sv = &GetSessionEmbedUrlOutput{} + sv = &ListDashboardsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "EmbedUrl": + case "DashboardSummaryList": + if err := awsRestjson1_deserializeDocumentDashboardSummaryList(&sv.DashboardSummaryList, value); err != nil { + return err + } + + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EmbeddingUrl to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.EmbedUrl = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } case "RequestId": @@ -20509,14 +23514,14 @@ func awsRestjson1_deserializeOpDocumentGetSessionEmbedUrlOutput(v **GetSessionEm return nil } -type awsRestjson1_deserializeOpListAnalyses struct { +type awsRestjson1_deserializeOpListDashboardVersions struct { } -func (*awsRestjson1_deserializeOpListAnalyses) ID() string { +func (*awsRestjson1_deserializeOpListDashboardVersions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListAnalyses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListDashboardVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20534,12 +23539,12 @@ func (m *awsRestjson1_deserializeOpListAnalyses) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAnalyses(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListDashboardVersions(response, &metadata) } - output := &ListAnalysesOutput{} + output := &ListDashboardVersionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListAnalysesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListDashboardVersionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -20562,7 +23567,7 @@ func (m *awsRestjson1_deserializeOpListAnalyses) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListAnalysesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListDashboardVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20576,7 +23581,7 @@ func (m *awsRestjson1_deserializeOpListAnalyses) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorListAnalyses(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListDashboardVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -20623,6 +23628,12 @@ func awsRestjson1_deserializeOpErrorListAnalyses(response *smithyhttp.Response, case strings.EqualFold("InvalidNextTokenException", errorCode): return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -20639,7 +23650,7 @@ func awsRestjson1_deserializeOpErrorListAnalyses(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsListAnalysesOutput(v *ListAnalysesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListDashboardVersionsOutput(v *ListDashboardVersionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -20648,7 +23659,7 @@ func awsRestjson1_deserializeOpHttpBindingsListAnalysesOutput(v *ListAnalysesOut return nil } -func awsRestjson1_deserializeOpDocumentListAnalysesOutput(v **ListAnalysesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListDashboardVersionsOutput(v **ListDashboardVersionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20661,17 +23672,17 @@ func awsRestjson1_deserializeOpDocumentListAnalysesOutput(v **ListAnalysesOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListAnalysesOutput + var sv *ListDashboardVersionsOutput if *v == nil { - sv = &ListAnalysesOutput{} + sv = &ListDashboardVersionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AnalysisSummaryList": - if err := awsRestjson1_deserializeDocumentAnalysisSummaryList(&sv.AnalysisSummaryList, value); err != nil { + case "DashboardVersionSummaryList": + if err := awsRestjson1_deserializeDocumentDashboardVersionSummaryList(&sv.DashboardVersionSummaryList, value); err != nil { return err } @@ -20702,14 +23713,14 @@ func awsRestjson1_deserializeOpDocumentListAnalysesOutput(v **ListAnalysesOutput return nil } -type awsRestjson1_deserializeOpListAssetBundleExportJobs struct { +type awsRestjson1_deserializeOpListDataSets struct { } -func (*awsRestjson1_deserializeOpListAssetBundleExportJobs) ID() string { +func (*awsRestjson1_deserializeOpListDataSets) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListAssetBundleExportJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListDataSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20727,12 +23738,12 @@ func (m *awsRestjson1_deserializeOpListAssetBundleExportJobs) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAssetBundleExportJobs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListDataSets(response, &metadata) } - output := &ListAssetBundleExportJobsOutput{} + output := &ListDataSetsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListAssetBundleExportJobsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListDataSetsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -20755,7 +23766,7 @@ func (m *awsRestjson1_deserializeOpListAssetBundleExportJobs) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListAssetBundleExportJobsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListDataSetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20769,7 +23780,7 @@ func (m *awsRestjson1_deserializeOpListAssetBundleExportJobs) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorListAssetBundleExportJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListDataSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -20813,18 +23824,18 @@ func awsRestjson1_deserializeOpErrorListAssetBundleExportJobs(response *smithyht case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -20835,7 +23846,7 @@ func awsRestjson1_deserializeOpErrorListAssetBundleExportJobs(response *smithyht } } -func awsRestjson1_deserializeOpHttpBindingsListAssetBundleExportJobsOutput(v *ListAssetBundleExportJobsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListDataSetsOutput(v *ListDataSetsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -20844,7 +23855,7 @@ func awsRestjson1_deserializeOpHttpBindingsListAssetBundleExportJobsOutput(v *Li return nil } -func awsRestjson1_deserializeOpDocumentListAssetBundleExportJobsOutput(v **ListAssetBundleExportJobsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListDataSetsOutput(v **ListDataSetsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -20857,17 +23868,17 @@ func awsRestjson1_deserializeOpDocumentListAssetBundleExportJobsOutput(v **ListA return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListAssetBundleExportJobsOutput + var sv *ListDataSetsOutput if *v == nil { - sv = &ListAssetBundleExportJobsOutput{} + sv = &ListDataSetsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AssetBundleExportJobSummaryList": - if err := awsRestjson1_deserializeDocumentAssetBundleExportJobSummaryList(&sv.AssetBundleExportJobSummaryList, value); err != nil { + case "DataSetSummaries": + if err := awsRestjson1_deserializeDocumentDataSetSummaryList(&sv.DataSetSummaries, value); err != nil { return err } @@ -20884,7 +23895,7 @@ func awsRestjson1_deserializeOpDocumentListAssetBundleExportJobsOutput(v **ListA if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } @@ -20898,14 +23909,14 @@ func awsRestjson1_deserializeOpDocumentListAssetBundleExportJobsOutput(v **ListA return nil } -type awsRestjson1_deserializeOpListAssetBundleImportJobs struct { +type awsRestjson1_deserializeOpListDataSources struct { } -func (*awsRestjson1_deserializeOpListAssetBundleImportJobs) ID() string { +func (*awsRestjson1_deserializeOpListDataSources) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListAssetBundleImportJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListDataSources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20923,12 +23934,12 @@ func (m *awsRestjson1_deserializeOpListAssetBundleImportJobs) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAssetBundleImportJobs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListDataSources(response, &metadata) } - output := &ListAssetBundleImportJobsOutput{} + output := &ListDataSourcesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListAssetBundleImportJobsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListDataSourcesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -20951,7 +23962,7 @@ func (m *awsRestjson1_deserializeOpListAssetBundleImportJobs) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListAssetBundleImportJobsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListDataSourcesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20965,7 +23976,7 @@ func (m *awsRestjson1_deserializeOpListAssetBundleImportJobs) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorListAssetBundleImportJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListDataSources(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -21009,18 +24020,18 @@ func awsRestjson1_deserializeOpErrorListAssetBundleImportJobs(response *smithyht case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -21031,7 +24042,7 @@ func awsRestjson1_deserializeOpErrorListAssetBundleImportJobs(response *smithyht } } -func awsRestjson1_deserializeOpHttpBindingsListAssetBundleImportJobsOutput(v *ListAssetBundleImportJobsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListDataSourcesOutput(v *ListDataSourcesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -21040,7 +24051,7 @@ func awsRestjson1_deserializeOpHttpBindingsListAssetBundleImportJobsOutput(v *Li return nil } -func awsRestjson1_deserializeOpDocumentListAssetBundleImportJobsOutput(v **ListAssetBundleImportJobsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListDataSourcesOutput(v **ListDataSourcesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21053,17 +24064,17 @@ func awsRestjson1_deserializeOpDocumentListAssetBundleImportJobsOutput(v **ListA return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListAssetBundleImportJobsOutput + var sv *ListDataSourcesOutput if *v == nil { - sv = &ListAssetBundleImportJobsOutput{} + sv = &ListDataSourcesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AssetBundleImportJobSummaryList": - if err := awsRestjson1_deserializeDocumentAssetBundleImportJobSummaryList(&sv.AssetBundleImportJobSummaryList, value); err != nil { + case "DataSources": + if err := awsRestjson1_deserializeDocumentDataSourceList(&sv.DataSources, value); err != nil { return err } @@ -21080,7 +24091,7 @@ func awsRestjson1_deserializeOpDocumentListAssetBundleImportJobsOutput(v **ListA if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } @@ -21094,14 +24105,14 @@ func awsRestjson1_deserializeOpDocumentListAssetBundleImportJobsOutput(v **ListA return nil } -type awsRestjson1_deserializeOpListDashboards struct { +type awsRestjson1_deserializeOpListFolderMembers struct { } -func (*awsRestjson1_deserializeOpListDashboards) ID() string { +func (*awsRestjson1_deserializeOpListFolderMembers) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListDashboards) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListFolderMembers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -21119,12 +24130,12 @@ func (m *awsRestjson1_deserializeOpListDashboards) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListDashboards(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListFolderMembers(response, &metadata) } - output := &ListDashboardsOutput{} + output := &ListFolderMembersOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListDashboardsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListFolderMembersOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -21147,7 +24158,7 @@ func (m *awsRestjson1_deserializeOpListDashboards) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListDashboardsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListFolderMembersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21161,7 +24172,7 @@ func (m *awsRestjson1_deserializeOpListDashboards) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorListDashboards(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListFolderMembers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -21202,12 +24213,21 @@ func awsRestjson1_deserializeOpErrorListDashboards(response *smithyhttp.Response } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidNextTokenException", errorCode): return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -21224,7 +24244,7 @@ func awsRestjson1_deserializeOpErrorListDashboards(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsListDashboardsOutput(v *ListDashboardsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListFolderMembersOutput(v *ListFolderMembersOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -21233,7 +24253,7 @@ func awsRestjson1_deserializeOpHttpBindingsListDashboardsOutput(v *ListDashboard return nil } -func awsRestjson1_deserializeOpDocumentListDashboardsOutput(v **ListDashboardsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListFolderMembersOutput(v **ListFolderMembersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21246,17 +24266,17 @@ func awsRestjson1_deserializeOpDocumentListDashboardsOutput(v **ListDashboardsOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListDashboardsOutput + var sv *ListFolderMembersOutput if *v == nil { - sv = &ListDashboardsOutput{} + sv = &ListFolderMembersOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DashboardSummaryList": - if err := awsRestjson1_deserializeDocumentDashboardSummaryList(&sv.DashboardSummaryList, value); err != nil { + case "FolderMemberList": + if err := awsRestjson1_deserializeDocumentFolderMemberList(&sv.FolderMemberList, value); err != nil { return err } @@ -21287,14 +24307,14 @@ func awsRestjson1_deserializeOpDocumentListDashboardsOutput(v **ListDashboardsOu return nil } -type awsRestjson1_deserializeOpListDashboardVersions struct { +type awsRestjson1_deserializeOpListFolders struct { } -func (*awsRestjson1_deserializeOpListDashboardVersions) ID() string { +func (*awsRestjson1_deserializeOpListFolders) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListDashboardVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListFolders) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -21312,12 +24332,12 @@ func (m *awsRestjson1_deserializeOpListDashboardVersions) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListDashboardVersions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListFolders(response, &metadata) } - output := &ListDashboardVersionsOutput{} + output := &ListFoldersOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListDashboardVersionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListFoldersOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -21340,7 +24360,7 @@ func (m *awsRestjson1_deserializeOpListDashboardVersions) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListDashboardVersionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListFoldersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21354,7 +24374,7 @@ func (m *awsRestjson1_deserializeOpListDashboardVersions) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListDashboardVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListFolders(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -21395,6 +24415,9 @@ func awsRestjson1_deserializeOpErrorListDashboardVersions(response *smithyhttp.R } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -21423,7 +24446,7 @@ func awsRestjson1_deserializeOpErrorListDashboardVersions(response *smithyhttp.R } } -func awsRestjson1_deserializeOpHttpBindingsListDashboardVersionsOutput(v *ListDashboardVersionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListFoldersOutput(v *ListFoldersOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -21432,7 +24455,7 @@ func awsRestjson1_deserializeOpHttpBindingsListDashboardVersionsOutput(v *ListDa return nil } -func awsRestjson1_deserializeOpDocumentListDashboardVersionsOutput(v **ListDashboardVersionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListFoldersOutput(v **ListFoldersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21445,17 +24468,17 @@ func awsRestjson1_deserializeOpDocumentListDashboardVersionsOutput(v **ListDashb return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListDashboardVersionsOutput + var sv *ListFoldersOutput if *v == nil { - sv = &ListDashboardVersionsOutput{} + sv = &ListFoldersOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DashboardVersionSummaryList": - if err := awsRestjson1_deserializeDocumentDashboardVersionSummaryList(&sv.DashboardVersionSummaryList, value); err != nil { + case "FolderSummaryList": + if err := awsRestjson1_deserializeDocumentFolderSummaryList(&sv.FolderSummaryList, value); err != nil { return err } @@ -21486,14 +24509,14 @@ func awsRestjson1_deserializeOpDocumentListDashboardVersionsOutput(v **ListDashb return nil } -type awsRestjson1_deserializeOpListDataSets struct { +type awsRestjson1_deserializeOpListFoldersForResource struct { } -func (*awsRestjson1_deserializeOpListDataSets) ID() string { +func (*awsRestjson1_deserializeOpListFoldersForResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListDataSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListFoldersForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -21511,12 +24534,12 @@ func (m *awsRestjson1_deserializeOpListDataSets) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListDataSets(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListFoldersForResource(response, &metadata) } - output := &ListDataSetsOutput{} + output := &ListFoldersForResourceOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListDataSetsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListFoldersForResourceOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -21539,7 +24562,7 @@ func (m *awsRestjson1_deserializeOpListDataSets) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListDataSetsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListFoldersForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21553,7 +24576,7 @@ func (m *awsRestjson1_deserializeOpListDataSets) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorListDataSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListFoldersForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -21606,9 +24629,15 @@ func awsRestjson1_deserializeOpErrorListDataSets(response *smithyhttp.Response, case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -21619,7 +24648,7 @@ func awsRestjson1_deserializeOpErrorListDataSets(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsListDataSetsOutput(v *ListDataSetsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListFoldersForResourceOutput(v *ListFoldersForResourceOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -21628,7 +24657,7 @@ func awsRestjson1_deserializeOpHttpBindingsListDataSetsOutput(v *ListDataSetsOut return nil } -func awsRestjson1_deserializeOpDocumentListDataSetsOutput(v **ListDataSetsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListFoldersForResourceOutput(v **ListFoldersForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21641,17 +24670,17 @@ func awsRestjson1_deserializeOpDocumentListDataSetsOutput(v **ListDataSetsOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListDataSetsOutput + var sv *ListFoldersForResourceOutput if *v == nil { - sv = &ListDataSetsOutput{} + sv = &ListFoldersForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSetSummaries": - if err := awsRestjson1_deserializeDocumentDataSetSummaryList(&sv.DataSetSummaries, value); err != nil { + case "Folders": + if err := awsRestjson1_deserializeDocumentFoldersForResourceArnList(&sv.Folders, value); err != nil { return err } @@ -21682,14 +24711,14 @@ func awsRestjson1_deserializeOpDocumentListDataSetsOutput(v **ListDataSetsOutput return nil } -type awsRestjson1_deserializeOpListDataSources struct { +type awsRestjson1_deserializeOpListGroupMemberships struct { } -func (*awsRestjson1_deserializeOpListDataSources) ID() string { +func (*awsRestjson1_deserializeOpListGroupMemberships) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListDataSources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListGroupMemberships) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -21707,12 +24736,12 @@ func (m *awsRestjson1_deserializeOpListDataSources) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListDataSources(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListGroupMemberships(response, &metadata) } - output := &ListDataSourcesOutput{} + output := &ListGroupMembershipsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListDataSourcesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListGroupMembershipsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -21735,7 +24764,7 @@ func (m *awsRestjson1_deserializeOpListDataSources) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListDataSourcesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListGroupMembershipsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21749,7 +24778,7 @@ func (m *awsRestjson1_deserializeOpListDataSources) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorListDataSources(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListGroupMemberships(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -21802,6 +24831,15 @@ func awsRestjson1_deserializeOpErrorListDataSources(response *smithyhttp.Respons case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -21815,7 +24853,7 @@ func awsRestjson1_deserializeOpErrorListDataSources(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpHttpBindingsListDataSourcesOutput(v *ListDataSourcesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListGroupMembershipsOutput(v *ListGroupMembershipsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -21824,7 +24862,7 @@ func awsRestjson1_deserializeOpHttpBindingsListDataSourcesOutput(v *ListDataSour return nil } -func awsRestjson1_deserializeOpDocumentListDataSourcesOutput(v **ListDataSourcesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListGroupMembershipsOutput(v **ListGroupMembershipsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -21837,17 +24875,17 @@ func awsRestjson1_deserializeOpDocumentListDataSourcesOutput(v **ListDataSources return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListDataSourcesOutput + var sv *ListGroupMembershipsOutput if *v == nil { - sv = &ListDataSourcesOutput{} + sv = &ListGroupMembershipsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSources": - if err := awsRestjson1_deserializeDocumentDataSourceList(&sv.DataSources, value); err != nil { + case "GroupMemberList": + if err := awsRestjson1_deserializeDocumentGroupMemberList(&sv.GroupMemberList, value); err != nil { return err } @@ -21878,14 +24916,14 @@ func awsRestjson1_deserializeOpDocumentListDataSourcesOutput(v **ListDataSources return nil } -type awsRestjson1_deserializeOpListFolderMembers struct { +type awsRestjson1_deserializeOpListGroups struct { } -func (*awsRestjson1_deserializeOpListFolderMembers) ID() string { +func (*awsRestjson1_deserializeOpListGroups) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFolderMembers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -21903,12 +24941,12 @@ func (m *awsRestjson1_deserializeOpListFolderMembers) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListFolderMembers(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListGroups(response, &metadata) } - output := &ListFolderMembersOutput{} + output := &ListGroupsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListFolderMembersOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListGroupsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -21931,7 +24969,7 @@ func (m *awsRestjson1_deserializeOpListFolderMembers) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFolderMembersOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListGroupsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21945,7 +24983,7 @@ func (m *awsRestjson1_deserializeOpListFolderMembers) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorListFolderMembers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -21998,15 +25036,18 @@ func awsRestjson1_deserializeOpErrorListFolderMembers(response *smithyhttp.Respo case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -22017,7 +25058,7 @@ func awsRestjson1_deserializeOpErrorListFolderMembers(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpHttpBindingsListFolderMembersOutput(v *ListFolderMembersOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListGroupsOutput(v *ListGroupsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -22026,7 +25067,7 @@ func awsRestjson1_deserializeOpHttpBindingsListFolderMembersOutput(v *ListFolder return nil } -func awsRestjson1_deserializeOpDocumentListFolderMembersOutput(v **ListFolderMembersOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListGroupsOutput(v **ListGroupsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -22039,17 +25080,17 @@ func awsRestjson1_deserializeOpDocumentListFolderMembersOutput(v **ListFolderMem return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFolderMembersOutput + var sv *ListGroupsOutput if *v == nil { - sv = &ListFolderMembersOutput{} + sv = &ListGroupsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "FolderMemberList": - if err := awsRestjson1_deserializeDocumentFolderMemberList(&sv.FolderMemberList, value); err != nil { + case "GroupList": + if err := awsRestjson1_deserializeDocumentGroupList(&sv.GroupList, value); err != nil { return err } @@ -22080,14 +25121,14 @@ func awsRestjson1_deserializeOpDocumentListFolderMembersOutput(v **ListFolderMem return nil } -type awsRestjson1_deserializeOpListFolders struct { +type awsRestjson1_deserializeOpListIAMPolicyAssignments struct { } -func (*awsRestjson1_deserializeOpListFolders) ID() string { +func (*awsRestjson1_deserializeOpListIAMPolicyAssignments) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFolders) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListIAMPolicyAssignments) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -22105,12 +25146,12 @@ func (m *awsRestjson1_deserializeOpListFolders) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListFolders(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListIAMPolicyAssignments(response, &metadata) } - output := &ListFoldersOutput{} + output := &ListIAMPolicyAssignmentsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListFoldersOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListIAMPolicyAssignmentsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -22133,7 +25174,7 @@ func (m *awsRestjson1_deserializeOpListFolders) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFoldersOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22147,7 +25188,7 @@ func (m *awsRestjson1_deserializeOpListFolders) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListFolders(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListIAMPolicyAssignments(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -22206,9 +25247,6 @@ func awsRestjson1_deserializeOpErrorListFolders(response *smithyhttp.Response, m case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -22219,7 +25257,7 @@ func awsRestjson1_deserializeOpErrorListFolders(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpHttpBindingsListFoldersOutput(v *ListFoldersOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListIAMPolicyAssignmentsOutput(v *ListIAMPolicyAssignmentsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -22228,7 +25266,7 @@ func awsRestjson1_deserializeOpHttpBindingsListFoldersOutput(v *ListFoldersOutpu return nil } -func awsRestjson1_deserializeOpDocumentListFoldersOutput(v **ListFoldersOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsOutput(v **ListIAMPolicyAssignmentsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -22241,17 +25279,17 @@ func awsRestjson1_deserializeOpDocumentListFoldersOutput(v **ListFoldersOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFoldersOutput + var sv *ListIAMPolicyAssignmentsOutput if *v == nil { - sv = &ListFoldersOutput{} + sv = &ListIAMPolicyAssignmentsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "FolderSummaryList": - if err := awsRestjson1_deserializeDocumentFolderSummaryList(&sv.FolderSummaryList, value); err != nil { + case "IAMPolicyAssignments": + if err := awsRestjson1_deserializeDocumentIAMPolicyAssignmentSummaryList(&sv.IAMPolicyAssignments, value); err != nil { return err } @@ -22282,14 +25320,14 @@ func awsRestjson1_deserializeOpDocumentListFoldersOutput(v **ListFoldersOutput, return nil } -type awsRestjson1_deserializeOpListFoldersForResource struct { +type awsRestjson1_deserializeOpListIAMPolicyAssignmentsForUser struct { } -func (*awsRestjson1_deserializeOpListFoldersForResource) ID() string { +func (*awsRestjson1_deserializeOpListIAMPolicyAssignmentsForUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFoldersForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListIAMPolicyAssignmentsForUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -22307,12 +25345,12 @@ func (m *awsRestjson1_deserializeOpListFoldersForResource) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListFoldersForResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListIAMPolicyAssignmentsForUser(response, &metadata) } - output := &ListFoldersForResourceOutput{} + output := &ListIAMPolicyAssignmentsForUserOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListFoldersForResourceOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListIAMPolicyAssignmentsForUserOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -22335,7 +25373,7 @@ func (m *awsRestjson1_deserializeOpListFoldersForResource) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFoldersForResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsForUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22349,7 +25387,7 @@ func (m *awsRestjson1_deserializeOpListFoldersForResource) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListFoldersForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListIAMPolicyAssignmentsForUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -22393,24 +25431,24 @@ func awsRestjson1_deserializeOpErrorListFoldersForResource(response *smithyhttp. case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConcurrentUpdatingException", errorCode): + return awsRestjson1_deserializeErrorConcurrentUpdatingException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -22421,7 +25459,7 @@ func awsRestjson1_deserializeOpErrorListFoldersForResource(response *smithyhttp. } } -func awsRestjson1_deserializeOpHttpBindingsListFoldersForResourceOutput(v *ListFoldersForResourceOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListIAMPolicyAssignmentsForUserOutput(v *ListIAMPolicyAssignmentsForUserOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -22430,7 +25468,7 @@ func awsRestjson1_deserializeOpHttpBindingsListFoldersForResourceOutput(v *ListF return nil } -func awsRestjson1_deserializeOpDocumentListFoldersForResourceOutput(v **ListFoldersForResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsForUserOutput(v **ListIAMPolicyAssignmentsForUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -22443,17 +25481,17 @@ func awsRestjson1_deserializeOpDocumentListFoldersForResourceOutput(v **ListFold return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFoldersForResourceOutput + var sv *ListIAMPolicyAssignmentsForUserOutput if *v == nil { - sv = &ListFoldersForResourceOutput{} + sv = &ListIAMPolicyAssignmentsForUserOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Folders": - if err := awsRestjson1_deserializeDocumentFoldersForResourceArnList(&sv.Folders, value); err != nil { + case "ActiveAssignments": + if err := awsRestjson1_deserializeDocumentActiveIAMPolicyAssignmentList(&sv.ActiveAssignments, value); err != nil { return err } @@ -22484,14 +25522,14 @@ func awsRestjson1_deserializeOpDocumentListFoldersForResourceOutput(v **ListFold return nil } -type awsRestjson1_deserializeOpListGroupMemberships struct { +type awsRestjson1_deserializeOpListIdentityPropagationConfigs struct { } -func (*awsRestjson1_deserializeOpListGroupMemberships) ID() string { +func (*awsRestjson1_deserializeOpListIdentityPropagationConfigs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListGroupMemberships) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListIdentityPropagationConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -22509,12 +25547,12 @@ func (m *awsRestjson1_deserializeOpListGroupMemberships) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListGroupMemberships(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListIdentityPropagationConfigs(response, &metadata) } - output := &ListGroupMembershipsOutput{} + output := &ListIdentityPropagationConfigsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListGroupMembershipsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListIdentityPropagationConfigsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -22537,7 +25575,7 @@ func (m *awsRestjson1_deserializeOpListGroupMemberships) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListGroupMembershipsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListIdentityPropagationConfigsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22551,7 +25589,7 @@ func (m *awsRestjson1_deserializeOpListGroupMemberships) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListGroupMemberships(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListIdentityPropagationConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -22598,21 +25636,12 @@ func awsRestjson1_deserializeOpErrorListGroupMemberships(response *smithyhttp.Re case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -22626,7 +25655,7 @@ func awsRestjson1_deserializeOpErrorListGroupMemberships(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpHttpBindingsListGroupMembershipsOutput(v *ListGroupMembershipsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListIdentityPropagationConfigsOutput(v *ListIdentityPropagationConfigsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -22635,7 +25664,7 @@ func awsRestjson1_deserializeOpHttpBindingsListGroupMembershipsOutput(v *ListGro return nil } -func awsRestjson1_deserializeOpDocumentListGroupMembershipsOutput(v **ListGroupMembershipsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListIdentityPropagationConfigsOutput(v **ListIdentityPropagationConfigsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -22648,20 +25677,15 @@ func awsRestjson1_deserializeOpDocumentListGroupMembershipsOutput(v **ListGroupM return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListGroupMembershipsOutput + var sv *ListIdentityPropagationConfigsOutput if *v == nil { - sv = &ListGroupMembershipsOutput{} + sv = &ListIdentityPropagationConfigsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "GroupMemberList": - if err := awsRestjson1_deserializeDocumentGroupMemberList(&sv.GroupMemberList, value); err != nil { - return err - } - case "NextToken": if value != nil { jtv, ok := value.(string) @@ -22680,6 +25704,11 @@ func awsRestjson1_deserializeOpDocumentListGroupMembershipsOutput(v **ListGroupM sv.RequestId = ptr.String(jtv) } + case "Services": + if err := awsRestjson1_deserializeDocumentAuthorizedTargetsByServices(&sv.Services, value); err != nil { + return err + } + default: _, _ = key, value @@ -22689,14 +25718,14 @@ func awsRestjson1_deserializeOpDocumentListGroupMembershipsOutput(v **ListGroupM return nil } -type awsRestjson1_deserializeOpListGroups struct { +type awsRestjson1_deserializeOpListIngestions struct { } -func (*awsRestjson1_deserializeOpListGroups) ID() string { +func (*awsRestjson1_deserializeOpListIngestions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListIngestions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -22714,12 +25743,12 @@ func (m *awsRestjson1_deserializeOpListGroups) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListGroups(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListIngestions(response, &metadata) } - output := &ListGroupsOutput{} + output := &ListIngestionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListGroupsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListIngestionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -22742,7 +25771,7 @@ func (m *awsRestjson1_deserializeOpListGroups) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListGroupsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListIngestionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22756,7 +25785,7 @@ func (m *awsRestjson1_deserializeOpListGroups) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListIngestions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -22809,15 +25838,12 @@ func awsRestjson1_deserializeOpErrorListGroups(response *smithyhttp.Response, me case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -22831,7 +25857,7 @@ func awsRestjson1_deserializeOpErrorListGroups(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpHttpBindingsListGroupsOutput(v *ListGroupsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListIngestionsOutput(v *ListIngestionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -22840,7 +25866,7 @@ func awsRestjson1_deserializeOpHttpBindingsListGroupsOutput(v *ListGroupsOutput, return nil } -func awsRestjson1_deserializeOpDocumentListGroupsOutput(v **ListGroupsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListIngestionsOutput(v **ListIngestionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -22853,17 +25879,17 @@ func awsRestjson1_deserializeOpDocumentListGroupsOutput(v **ListGroupsOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListGroupsOutput + var sv *ListIngestionsOutput if *v == nil { - sv = &ListGroupsOutput{} + sv = &ListIngestionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "GroupList": - if err := awsRestjson1_deserializeDocumentGroupList(&sv.GroupList, value); err != nil { + case "Ingestions": + if err := awsRestjson1_deserializeDocumentIngestions(&sv.Ingestions, value); err != nil { return err } @@ -22894,14 +25920,14 @@ func awsRestjson1_deserializeOpDocumentListGroupsOutput(v **ListGroupsOutput, va return nil } -type awsRestjson1_deserializeOpListIAMPolicyAssignments struct { +type awsRestjson1_deserializeOpListNamespaces struct { } -func (*awsRestjson1_deserializeOpListIAMPolicyAssignments) ID() string { +func (*awsRestjson1_deserializeOpListNamespaces) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListIAMPolicyAssignments) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListNamespaces) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -22919,12 +25945,12 @@ func (m *awsRestjson1_deserializeOpListIAMPolicyAssignments) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListIAMPolicyAssignments(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListNamespaces(response, &metadata) } - output := &ListIAMPolicyAssignmentsOutput{} + output := &ListNamespacesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListIAMPolicyAssignmentsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListNamespacesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -22947,7 +25973,7 @@ func (m *awsRestjson1_deserializeOpListIAMPolicyAssignments) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListNamespacesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22961,7 +25987,7 @@ func (m *awsRestjson1_deserializeOpListIAMPolicyAssignments) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListIAMPolicyAssignments(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListNamespaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -23014,9 +26040,15 @@ func awsRestjson1_deserializeOpErrorListIAMPolicyAssignments(response *smithyhtt case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -23030,7 +26062,7 @@ func awsRestjson1_deserializeOpErrorListIAMPolicyAssignments(response *smithyhtt } } -func awsRestjson1_deserializeOpHttpBindingsListIAMPolicyAssignmentsOutput(v *ListIAMPolicyAssignmentsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListNamespacesOutput(v *ListNamespacesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -23039,7 +26071,7 @@ func awsRestjson1_deserializeOpHttpBindingsListIAMPolicyAssignmentsOutput(v *Lis return nil } -func awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsOutput(v **ListIAMPolicyAssignmentsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListNamespacesOutput(v **ListNamespacesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -23052,17 +26084,17 @@ func awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsOutput(v **ListIA return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListIAMPolicyAssignmentsOutput + var sv *ListNamespacesOutput if *v == nil { - sv = &ListIAMPolicyAssignmentsOutput{} + sv = &ListNamespacesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "IAMPolicyAssignments": - if err := awsRestjson1_deserializeDocumentIAMPolicyAssignmentSummaryList(&sv.IAMPolicyAssignments, value); err != nil { + case "Namespaces": + if err := awsRestjson1_deserializeDocumentNamespaces(&sv.Namespaces, value); err != nil { return err } @@ -23093,14 +26125,14 @@ func awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsOutput(v **ListIA return nil } -type awsRestjson1_deserializeOpListIAMPolicyAssignmentsForUser struct { +type awsRestjson1_deserializeOpListRefreshSchedules struct { } -func (*awsRestjson1_deserializeOpListIAMPolicyAssignmentsForUser) ID() string { +func (*awsRestjson1_deserializeOpListRefreshSchedules) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListIAMPolicyAssignmentsForUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListRefreshSchedules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -23118,12 +26150,12 @@ func (m *awsRestjson1_deserializeOpListIAMPolicyAssignmentsForUser) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListIAMPolicyAssignmentsForUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListRefreshSchedules(response, &metadata) } - output := &ListIAMPolicyAssignmentsForUserOutput{} + output := &ListRefreshSchedulesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListIAMPolicyAssignmentsForUserOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListRefreshSchedulesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -23146,7 +26178,7 @@ func (m *awsRestjson1_deserializeOpListIAMPolicyAssignmentsForUser) HandleDeseri return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsForUserOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListRefreshSchedulesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23160,7 +26192,7 @@ func (m *awsRestjson1_deserializeOpListIAMPolicyAssignmentsForUser) HandleDeseri return out, metadata, err } -func awsRestjson1_deserializeOpErrorListIAMPolicyAssignmentsForUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListRefreshSchedules(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -23204,17 +26236,14 @@ func awsRestjson1_deserializeOpErrorListIAMPolicyAssignmentsForUser(response *sm case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConcurrentUpdatingException", errorCode): - return awsRestjson1_deserializeErrorConcurrentUpdatingException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -23232,7 +26261,7 @@ func awsRestjson1_deserializeOpErrorListIAMPolicyAssignmentsForUser(response *sm } } -func awsRestjson1_deserializeOpHttpBindingsListIAMPolicyAssignmentsForUserOutput(v *ListIAMPolicyAssignmentsForUserOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListRefreshSchedulesOutput(v *ListRefreshSchedulesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -23241,7 +26270,7 @@ func awsRestjson1_deserializeOpHttpBindingsListIAMPolicyAssignmentsForUserOutput return nil } -func awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsForUserOutput(v **ListIAMPolicyAssignmentsForUserOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListRefreshSchedulesOutput(v **ListRefreshSchedulesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -23254,29 +26283,20 @@ func awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsForUserOutput(v * return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListIAMPolicyAssignmentsForUserOutput + var sv *ListRefreshSchedulesOutput if *v == nil { - sv = &ListIAMPolicyAssignmentsForUserOutput{} + sv = &ListRefreshSchedulesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ActiveAssignments": - if err := awsRestjson1_deserializeDocumentActiveIAMPolicyAssignmentList(&sv.ActiveAssignments, value); err != nil { + case "RefreshSchedules": + if err := awsRestjson1_deserializeDocumentRefreshSchedules(&sv.RefreshSchedules, value); err != nil { return err } - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -23295,14 +26315,14 @@ func awsRestjson1_deserializeOpDocumentListIAMPolicyAssignmentsForUserOutput(v * return nil } -type awsRestjson1_deserializeOpListIdentityPropagationConfigs struct { +type awsRestjson1_deserializeOpListRoleMemberships struct { } -func (*awsRestjson1_deserializeOpListIdentityPropagationConfigs) ID() string { +func (*awsRestjson1_deserializeOpListRoleMemberships) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListIdentityPropagationConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListRoleMemberships) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -23320,12 +26340,12 @@ func (m *awsRestjson1_deserializeOpListIdentityPropagationConfigs) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListIdentityPropagationConfigs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListRoleMemberships(response, &metadata) } - output := &ListIdentityPropagationConfigsOutput{} + output := &ListRoleMembershipsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListIdentityPropagationConfigsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListRoleMembershipsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -23348,7 +26368,7 @@ func (m *awsRestjson1_deserializeOpListIdentityPropagationConfigs) HandleDeseria return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListIdentityPropagationConfigsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListRoleMembershipsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23362,7 +26382,7 @@ func (m *awsRestjson1_deserializeOpListIdentityPropagationConfigs) HandleDeseria return out, metadata, err } -func awsRestjson1_deserializeOpErrorListIdentityPropagationConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListRoleMemberships(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -23409,12 +26429,24 @@ func awsRestjson1_deserializeOpErrorListIdentityPropagationConfigs(response *smi case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -23428,7 +26460,7 @@ func awsRestjson1_deserializeOpErrorListIdentityPropagationConfigs(response *smi } } -func awsRestjson1_deserializeOpHttpBindingsListIdentityPropagationConfigsOutput(v *ListIdentityPropagationConfigsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListRoleMembershipsOutput(v *ListRoleMembershipsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -23437,7 +26469,7 @@ func awsRestjson1_deserializeOpHttpBindingsListIdentityPropagationConfigsOutput( return nil } -func awsRestjson1_deserializeOpDocumentListIdentityPropagationConfigsOutput(v **ListIdentityPropagationConfigsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListRoleMembershipsOutput(v **ListRoleMembershipsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -23450,15 +26482,20 @@ func awsRestjson1_deserializeOpDocumentListIdentityPropagationConfigsOutput(v ** return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListIdentityPropagationConfigsOutput + var sv *ListRoleMembershipsOutput if *v == nil { - sv = &ListIdentityPropagationConfigsOutput{} + sv = &ListRoleMembershipsOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "MembersList": + if err := awsRestjson1_deserializeDocumentGroupsList(&sv.MembersList, value); err != nil { + return err + } + case "NextToken": if value != nil { jtv, ok := value.(string) @@ -23477,11 +26514,6 @@ func awsRestjson1_deserializeOpDocumentListIdentityPropagationConfigsOutput(v ** sv.RequestId = ptr.String(jtv) } - case "Services": - if err := awsRestjson1_deserializeDocumentAuthorizedTargetsByServices(&sv.Services, value); err != nil { - return err - } - default: _, _ = key, value @@ -23491,14 +26523,14 @@ func awsRestjson1_deserializeOpDocumentListIdentityPropagationConfigsOutput(v ** return nil } -type awsRestjson1_deserializeOpListIngestions struct { +type awsRestjson1_deserializeOpListTagsForResource struct { } -func (*awsRestjson1_deserializeOpListIngestions) ID() string { +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListIngestions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -23516,12 +26548,12 @@ func (m *awsRestjson1_deserializeOpListIngestions) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListIngestions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &ListIngestionsOutput{} + output := &ListTagsForResourceOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListIngestionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListTagsForResourceOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -23544,7 +26576,7 @@ func (m *awsRestjson1_deserializeOpListIngestions) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListIngestionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23558,7 +26590,7 @@ func (m *awsRestjson1_deserializeOpListIngestions) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorListIngestions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -23605,15 +26637,9 @@ func awsRestjson1_deserializeOpErrorListIngestions(response *smithyhttp.Response case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -23630,7 +26656,7 @@ func awsRestjson1_deserializeOpErrorListIngestions(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsListIngestionsOutput(v *ListIngestionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListTagsForResourceOutput(v *ListTagsForResourceOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -23639,7 +26665,7 @@ func awsRestjson1_deserializeOpHttpBindingsListIngestionsOutput(v *ListIngestion return nil } -func awsRestjson1_deserializeOpDocumentListIngestionsOutput(v **ListIngestionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -23652,29 +26678,15 @@ func awsRestjson1_deserializeOpDocumentListIngestionsOutput(v **ListIngestionsOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListIngestionsOutput + var sv *ListTagsForResourceOutput if *v == nil { - sv = &ListIngestionsOutput{} + sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Ingestions": - if err := awsRestjson1_deserializeDocumentIngestions(&sv.Ingestions, value); err != nil { - return err - } - - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -23684,6 +26696,11 @@ func awsRestjson1_deserializeOpDocumentListIngestionsOutput(v **ListIngestionsOu sv.RequestId = ptr.String(jtv) } + case "Tags": + if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + default: _, _ = key, value @@ -23693,14 +26710,14 @@ func awsRestjson1_deserializeOpDocumentListIngestionsOutput(v **ListIngestionsOu return nil } -type awsRestjson1_deserializeOpListNamespaces struct { +type awsRestjson1_deserializeOpListTemplateAliases struct { } -func (*awsRestjson1_deserializeOpListNamespaces) ID() string { +func (*awsRestjson1_deserializeOpListTemplateAliases) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListNamespaces) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListTemplateAliases) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -23718,12 +26735,12 @@ func (m *awsRestjson1_deserializeOpListNamespaces) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListNamespaces(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTemplateAliases(response, &metadata) } - output := &ListNamespacesOutput{} + output := &ListTemplateAliasesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListNamespacesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListTemplateAliasesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -23746,7 +26763,7 @@ func (m *awsRestjson1_deserializeOpListNamespaces) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListNamespacesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTemplateAliasesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23760,7 +26777,7 @@ func (m *awsRestjson1_deserializeOpListNamespaces) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorListNamespaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListTemplateAliases(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -23801,30 +26818,21 @@ func awsRestjson1_deserializeOpErrorListNamespaces(response *smithyhttp.Response } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidNextTokenException", errorCode): return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -23835,7 +26843,7 @@ func awsRestjson1_deserializeOpErrorListNamespaces(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsListNamespacesOutput(v *ListNamespacesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListTemplateAliasesOutput(v *ListTemplateAliasesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -23844,7 +26852,7 @@ func awsRestjson1_deserializeOpHttpBindingsListNamespacesOutput(v *ListNamespace return nil } -func awsRestjson1_deserializeOpDocumentListNamespacesOutput(v **ListNamespacesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTemplateAliasesOutput(v **ListTemplateAliasesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -23857,20 +26865,15 @@ func awsRestjson1_deserializeOpDocumentListNamespacesOutput(v **ListNamespacesOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListNamespacesOutput + var sv *ListTemplateAliasesOutput if *v == nil { - sv = &ListNamespacesOutput{} + sv = &ListTemplateAliasesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Namespaces": - if err := awsRestjson1_deserializeDocumentNamespaces(&sv.Namespaces, value); err != nil { - return err - } - case "NextToken": if value != nil { jtv, ok := value.(string) @@ -23889,6 +26892,11 @@ func awsRestjson1_deserializeOpDocumentListNamespacesOutput(v **ListNamespacesOu sv.RequestId = ptr.String(jtv) } + case "TemplateAliasList": + if err := awsRestjson1_deserializeDocumentTemplateAliasList(&sv.TemplateAliasList, value); err != nil { + return err + } + default: _, _ = key, value @@ -23898,14 +26906,14 @@ func awsRestjson1_deserializeOpDocumentListNamespacesOutput(v **ListNamespacesOu return nil } -type awsRestjson1_deserializeOpListRefreshSchedules struct { +type awsRestjson1_deserializeOpListTemplates struct { } -func (*awsRestjson1_deserializeOpListRefreshSchedules) ID() string { +func (*awsRestjson1_deserializeOpListTemplates) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListRefreshSchedules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -23923,12 +26931,12 @@ func (m *awsRestjson1_deserializeOpListRefreshSchedules) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListRefreshSchedules(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTemplates(response, &metadata) } - output := &ListRefreshSchedulesOutput{} + output := &ListTemplatesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListRefreshSchedulesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListTemplatesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -23951,7 +26959,7 @@ func (m *awsRestjson1_deserializeOpListRefreshSchedules) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListRefreshSchedulesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTemplatesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23965,7 +26973,7 @@ func (m *awsRestjson1_deserializeOpListRefreshSchedules) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListRefreshSchedules(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -24006,24 +27014,24 @@ func awsRestjson1_deserializeOpErrorListRefreshSchedules(response *smithyhttp.Re } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -24034,7 +27042,7 @@ func awsRestjson1_deserializeOpErrorListRefreshSchedules(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpHttpBindingsListRefreshSchedulesOutput(v *ListRefreshSchedulesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListTemplatesOutput(v *ListTemplatesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -24043,7 +27051,7 @@ func awsRestjson1_deserializeOpHttpBindingsListRefreshSchedulesOutput(v *ListRef return nil } -func awsRestjson1_deserializeOpDocumentListRefreshSchedulesOutput(v **ListRefreshSchedulesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTemplatesOutput(v **ListTemplatesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -24056,18 +27064,22 @@ func awsRestjson1_deserializeOpDocumentListRefreshSchedulesOutput(v **ListRefres return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListRefreshSchedulesOutput + var sv *ListTemplatesOutput if *v == nil { - sv = &ListRefreshSchedulesOutput{} + sv = &ListTemplatesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "RefreshSchedules": - if err := awsRestjson1_deserializeDocumentRefreshSchedules(&sv.RefreshSchedules, value); err != nil { - return err + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) } case "RequestId": @@ -24079,6 +27091,11 @@ func awsRestjson1_deserializeOpDocumentListRefreshSchedulesOutput(v **ListRefres sv.RequestId = ptr.String(jtv) } + case "TemplateSummaryList": + if err := awsRestjson1_deserializeDocumentTemplateSummaryList(&sv.TemplateSummaryList, value); err != nil { + return err + } + default: _, _ = key, value @@ -24088,14 +27105,14 @@ func awsRestjson1_deserializeOpDocumentListRefreshSchedulesOutput(v **ListRefres return nil } -type awsRestjson1_deserializeOpListRoleMemberships struct { +type awsRestjson1_deserializeOpListTemplateVersions struct { } -func (*awsRestjson1_deserializeOpListRoleMemberships) ID() string { +func (*awsRestjson1_deserializeOpListTemplateVersions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListRoleMemberships) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListTemplateVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -24113,12 +27130,12 @@ func (m *awsRestjson1_deserializeOpListRoleMemberships) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListRoleMemberships(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTemplateVersions(response, &metadata) } - output := &ListRoleMembershipsOutput{} + output := &ListTemplateVersionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListRoleMembershipsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListTemplateVersionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -24141,7 +27158,7 @@ func (m *awsRestjson1_deserializeOpListRoleMemberships) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListRoleMembershipsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTemplateVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -24155,7 +27172,7 @@ func (m *awsRestjson1_deserializeOpListRoleMemberships) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListRoleMemberships(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListTemplateVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -24196,9 +27213,6 @@ func awsRestjson1_deserializeOpErrorListRoleMemberships(response *smithyhttp.Res } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -24208,21 +27222,15 @@ func awsRestjson1_deserializeOpErrorListRoleMemberships(response *smithyhttp.Res case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -24233,7 +27241,7 @@ func awsRestjson1_deserializeOpErrorListRoleMemberships(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpHttpBindingsListRoleMembershipsOutput(v *ListRoleMembershipsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListTemplateVersionsOutput(v *ListTemplateVersionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -24242,7 +27250,7 @@ func awsRestjson1_deserializeOpHttpBindingsListRoleMembershipsOutput(v *ListRole return nil } -func awsRestjson1_deserializeOpDocumentListRoleMembershipsOutput(v **ListRoleMembershipsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTemplateVersionsOutput(v **ListTemplateVersionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -24255,20 +27263,15 @@ func awsRestjson1_deserializeOpDocumentListRoleMembershipsOutput(v **ListRoleMem return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListRoleMembershipsOutput + var sv *ListTemplateVersionsOutput if *v == nil { - sv = &ListRoleMembershipsOutput{} + sv = &ListTemplateVersionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "MembersList": - if err := awsRestjson1_deserializeDocumentGroupsList(&sv.MembersList, value); err != nil { - return err - } - case "NextToken": if value != nil { jtv, ok := value.(string) @@ -24287,6 +27290,11 @@ func awsRestjson1_deserializeOpDocumentListRoleMembershipsOutput(v **ListRoleMem sv.RequestId = ptr.String(jtv) } + case "TemplateVersionSummaryList": + if err := awsRestjson1_deserializeDocumentTemplateVersionSummaryList(&sv.TemplateVersionSummaryList, value); err != nil { + return err + } + default: _, _ = key, value @@ -24296,14 +27304,14 @@ func awsRestjson1_deserializeOpDocumentListRoleMembershipsOutput(v **ListRoleMem return nil } -type awsRestjson1_deserializeOpListTagsForResource struct { +type awsRestjson1_deserializeOpListThemeAliases struct { } -func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { +func (*awsRestjson1_deserializeOpListThemeAliases) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListThemeAliases) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -24321,12 +27329,12 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListThemeAliases(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListThemeAliasesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListTagsForResourceOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListThemeAliasesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -24349,7 +27357,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListThemeAliasesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -24363,7 +27371,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListThemeAliases(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -24404,12 +27412,15 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) @@ -24419,6 +27430,9 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -24429,7 +27443,7 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpHttpBindingsListTagsForResourceOutput(v *ListTagsForResourceOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListThemeAliasesOutput(v *ListThemeAliasesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -24438,7 +27452,7 @@ func awsRestjson1_deserializeOpHttpBindingsListTagsForResourceOutput(v *ListTags return nil } -func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListThemeAliasesOutput(v **ListThemeAliasesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -24451,15 +27465,24 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTagsForResourceOutput + var sv *ListThemeAliasesOutput if *v == nil { - sv = &ListTagsForResourceOutput{} + sv = &ListThemeAliasesOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -24469,8 +27492,8 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor sv.RequestId = ptr.String(jtv) } - case "Tags": - if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { + case "ThemeAliasList": + if err := awsRestjson1_deserializeDocumentThemeAliasList(&sv.ThemeAliasList, value); err != nil { return err } @@ -24483,14 +27506,14 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } -type awsRestjson1_deserializeOpListTemplateAliases struct { +type awsRestjson1_deserializeOpListThemes struct { } -func (*awsRestjson1_deserializeOpListTemplateAliases) ID() string { +func (*awsRestjson1_deserializeOpListThemes) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTemplateAliases) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListThemes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -24508,12 +27531,12 @@ func (m *awsRestjson1_deserializeOpListTemplateAliases) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTemplateAliases(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListThemes(response, &metadata) } - output := &ListTemplateAliasesOutput{} + output := &ListThemesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListTemplateAliasesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListThemesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -24536,7 +27559,7 @@ func (m *awsRestjson1_deserializeOpListTemplateAliases) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTemplateAliasesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListThemesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -24550,7 +27573,7 @@ func (m *awsRestjson1_deserializeOpListTemplateAliases) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTemplateAliases(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListThemes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -24591,12 +27614,18 @@ func awsRestjson1_deserializeOpErrorListTemplateAliases(response *smithyhttp.Res } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidNextTokenException", errorCode): return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -24616,7 +27645,7 @@ func awsRestjson1_deserializeOpErrorListTemplateAliases(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpHttpBindingsListTemplateAliasesOutput(v *ListTemplateAliasesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListThemesOutput(v *ListThemesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -24625,7 +27654,7 @@ func awsRestjson1_deserializeOpHttpBindingsListTemplateAliasesOutput(v *ListTemp return nil } -func awsRestjson1_deserializeOpDocumentListTemplateAliasesOutput(v **ListTemplateAliasesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListThemesOutput(v **ListThemesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -24638,9 +27667,9 @@ func awsRestjson1_deserializeOpDocumentListTemplateAliasesOutput(v **ListTemplat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTemplateAliasesOutput + var sv *ListThemesOutput if *v == nil { - sv = &ListTemplateAliasesOutput{} + sv = &ListThemesOutput{} } else { sv = *v } @@ -24665,8 +27694,8 @@ func awsRestjson1_deserializeOpDocumentListTemplateAliasesOutput(v **ListTemplat sv.RequestId = ptr.String(jtv) } - case "TemplateAliasList": - if err := awsRestjson1_deserializeDocumentTemplateAliasList(&sv.TemplateAliasList, value); err != nil { + case "ThemeSummaryList": + if err := awsRestjson1_deserializeDocumentThemeSummaryList(&sv.ThemeSummaryList, value); err != nil { return err } @@ -24679,14 +27708,14 @@ func awsRestjson1_deserializeOpDocumentListTemplateAliasesOutput(v **ListTemplat return nil } -type awsRestjson1_deserializeOpListTemplates struct { +type awsRestjson1_deserializeOpListThemeVersions struct { } -func (*awsRestjson1_deserializeOpListTemplates) ID() string { +func (*awsRestjson1_deserializeOpListThemeVersions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListThemeVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -24704,12 +27733,12 @@ func (m *awsRestjson1_deserializeOpListTemplates) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTemplates(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListThemeVersions(response, &metadata) } - output := &ListTemplatesOutput{} + output := &ListThemeVersionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListTemplatesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListThemeVersionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -24732,7 +27761,7 @@ func (m *awsRestjson1_deserializeOpListTemplates) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTemplatesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListThemeVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -24746,7 +27775,7 @@ func (m *awsRestjson1_deserializeOpListTemplates) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListThemeVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -24787,6 +27816,9 @@ func awsRestjson1_deserializeOpErrorListTemplates(response *smithyhttp.Response, } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -24815,7 +27847,7 @@ func awsRestjson1_deserializeOpErrorListTemplates(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsListTemplatesOutput(v *ListTemplatesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListThemeVersionsOutput(v *ListThemeVersionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -24824,7 +27856,7 @@ func awsRestjson1_deserializeOpHttpBindingsListTemplatesOutput(v *ListTemplatesO return nil } -func awsRestjson1_deserializeOpDocumentListTemplatesOutput(v **ListTemplatesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListThemeVersionsOutput(v **ListThemeVersionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -24837,9 +27869,9 @@ func awsRestjson1_deserializeOpDocumentListTemplatesOutput(v **ListTemplatesOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTemplatesOutput + var sv *ListThemeVersionsOutput if *v == nil { - sv = &ListTemplatesOutput{} + sv = &ListThemeVersionsOutput{} } else { sv = *v } @@ -24864,8 +27896,8 @@ func awsRestjson1_deserializeOpDocumentListTemplatesOutput(v **ListTemplatesOutp sv.RequestId = ptr.String(jtv) } - case "TemplateSummaryList": - if err := awsRestjson1_deserializeDocumentTemplateSummaryList(&sv.TemplateSummaryList, value); err != nil { + case "ThemeVersionSummaryList": + if err := awsRestjson1_deserializeDocumentThemeVersionSummaryList(&sv.ThemeVersionSummaryList, value); err != nil { return err } @@ -24878,14 +27910,14 @@ func awsRestjson1_deserializeOpDocumentListTemplatesOutput(v **ListTemplatesOutp return nil } -type awsRestjson1_deserializeOpListTemplateVersions struct { +type awsRestjson1_deserializeOpListTopicRefreshSchedules struct { } -func (*awsRestjson1_deserializeOpListTemplateVersions) ID() string { +func (*awsRestjson1_deserializeOpListTopicRefreshSchedules) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTemplateVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListTopicRefreshSchedules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -24903,12 +27935,12 @@ func (m *awsRestjson1_deserializeOpListTemplateVersions) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTemplateVersions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTopicRefreshSchedules(response, &metadata) } - output := &ListTemplateVersionsOutput{} + output := &ListTopicRefreshSchedulesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListTemplateVersionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListTopicRefreshSchedulesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -24931,7 +27963,7 @@ func (m *awsRestjson1_deserializeOpListTemplateVersions) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTemplateVersionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTopicRefreshSchedulesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -24945,7 +27977,7 @@ func (m *awsRestjson1_deserializeOpListTemplateVersions) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTemplateVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListTopicRefreshSchedules(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -24986,24 +28018,30 @@ func awsRestjson1_deserializeOpErrorListTemplateVersions(response *smithyhttp.Re } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -25014,7 +28052,7 @@ func awsRestjson1_deserializeOpErrorListTemplateVersions(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpHttpBindingsListTemplateVersionsOutput(v *ListTemplateVersionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListTopicRefreshSchedulesOutput(v *ListTopicRefreshSchedulesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -25023,7 +28061,7 @@ func awsRestjson1_deserializeOpHttpBindingsListTemplateVersionsOutput(v *ListTem return nil } -func awsRestjson1_deserializeOpDocumentListTemplateVersionsOutput(v **ListTemplateVersionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTopicRefreshSchedulesOutput(v **ListTopicRefreshSchedulesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -25036,36 +28074,45 @@ func awsRestjson1_deserializeOpDocumentListTemplateVersionsOutput(v **ListTempla return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTemplateVersionsOutput + var sv *ListTopicRefreshSchedulesOutput if *v == nil { - sv = &ListTemplateVersionsOutput{} + sv = &ListTopicRefreshSchedulesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "NextToken": + case "RefreshSchedules": + if err := awsRestjson1_deserializeDocumentTopicRefreshScheduleSummaries(&sv.RefreshSchedules, value); err != nil { + return err + } + + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.RequestId = ptr.String(jtv) } - case "RequestId": + case "TopicArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.TopicArn = ptr.String(jtv) } - case "TemplateVersionSummaryList": - if err := awsRestjson1_deserializeDocumentTemplateVersionSummaryList(&sv.TemplateVersionSummaryList, value); err != nil { - return err + case "TopicId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TopicId to be of type string, got %T instead", value) + } + sv.TopicId = ptr.String(jtv) } default: @@ -25077,14 +28124,14 @@ func awsRestjson1_deserializeOpDocumentListTemplateVersionsOutput(v **ListTempla return nil } -type awsRestjson1_deserializeOpListThemeAliases struct { +type awsRestjson1_deserializeOpListTopicReviewedAnswers struct { } -func (*awsRestjson1_deserializeOpListThemeAliases) ID() string { +func (*awsRestjson1_deserializeOpListTopicReviewedAnswers) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListThemeAliases) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListTopicReviewedAnswers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -25102,12 +28149,12 @@ func (m *awsRestjson1_deserializeOpListThemeAliases) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListThemeAliases(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTopicReviewedAnswers(response, &metadata) } - output := &ListThemeAliasesOutput{} + output := &ListTopicReviewedAnswersOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListThemeAliasesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListTopicReviewedAnswersOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -25130,7 +28177,7 @@ func (m *awsRestjson1_deserializeOpListThemeAliases) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListThemeAliasesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTopicReviewedAnswersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -25144,7 +28191,7 @@ func (m *awsRestjson1_deserializeOpListThemeAliases) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorListThemeAliases(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListTopicReviewedAnswers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -25185,15 +28232,12 @@ func awsRestjson1_deserializeOpErrorListThemeAliases(response *smithyhttp.Respon } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) @@ -25203,9 +28247,6 @@ func awsRestjson1_deserializeOpErrorListThemeAliases(response *smithyhttp.Respon case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -25216,7 +28257,7 @@ func awsRestjson1_deserializeOpErrorListThemeAliases(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpHttpBindingsListThemeAliasesOutput(v *ListThemeAliasesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListTopicReviewedAnswersOutput(v *ListTopicReviewedAnswersOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -25225,7 +28266,7 @@ func awsRestjson1_deserializeOpHttpBindingsListThemeAliasesOutput(v *ListThemeAl return nil } -func awsRestjson1_deserializeOpDocumentListThemeAliasesOutput(v **ListThemeAliasesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTopicReviewedAnswersOutput(v **ListTopicReviewedAnswersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -25238,36 +28279,45 @@ func awsRestjson1_deserializeOpDocumentListThemeAliasesOutput(v **ListThemeAlias return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListThemeAliasesOutput + var sv *ListTopicReviewedAnswersOutput if *v == nil { - sv = &ListThemeAliasesOutput{} + sv = &ListTopicReviewedAnswersOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "NextToken": + case "Answers": + if err := awsRestjson1_deserializeDocumentTopicReviewedAnswers(&sv.Answers, value); err != nil { + return err + } + + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.RequestId = ptr.String(jtv) } - case "RequestId": + case "TopicArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.TopicArn = ptr.String(jtv) } - case "ThemeAliasList": - if err := awsRestjson1_deserializeDocumentThemeAliasList(&sv.ThemeAliasList, value); err != nil { - return err + case "TopicId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TopicId to be of type string, got %T instead", value) + } + sv.TopicId = ptr.String(jtv) } default: @@ -25279,14 +28329,14 @@ func awsRestjson1_deserializeOpDocumentListThemeAliasesOutput(v **ListThemeAlias return nil } -type awsRestjson1_deserializeOpListThemes struct { +type awsRestjson1_deserializeOpListTopics struct { } -func (*awsRestjson1_deserializeOpListThemes) ID() string { +func (*awsRestjson1_deserializeOpListTopics) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListThemes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListTopics) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -25304,12 +28354,12 @@ func (m *awsRestjson1_deserializeOpListThemes) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListThemes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTopics(response, &metadata) } - output := &ListThemesOutput{} + output := &ListTopicsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListThemesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListTopicsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -25332,7 +28382,7 @@ func (m *awsRestjson1_deserializeOpListThemes) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListThemesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTopicsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -25346,7 +28396,7 @@ func (m *awsRestjson1_deserializeOpListThemes) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListThemes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListTopics(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -25399,15 +28449,9 @@ func awsRestjson1_deserializeOpErrorListThemes(response *smithyhttp.Response, me case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -25418,7 +28462,7 @@ func awsRestjson1_deserializeOpErrorListThemes(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpHttpBindingsListThemesOutput(v *ListThemesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListTopicsOutput(v *ListTopicsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -25427,7 +28471,7 @@ func awsRestjson1_deserializeOpHttpBindingsListThemesOutput(v *ListThemesOutput, return nil } -func awsRestjson1_deserializeOpDocumentListThemesOutput(v **ListThemesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTopicsOutput(v **ListTopicsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -25440,9 +28484,9 @@ func awsRestjson1_deserializeOpDocumentListThemesOutput(v **ListThemesOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListThemesOutput + var sv *ListTopicsOutput if *v == nil { - sv = &ListThemesOutput{} + sv = &ListTopicsOutput{} } else { sv = *v } @@ -25467,8 +28511,8 @@ func awsRestjson1_deserializeOpDocumentListThemesOutput(v **ListThemesOutput, va sv.RequestId = ptr.String(jtv) } - case "ThemeSummaryList": - if err := awsRestjson1_deserializeDocumentThemeSummaryList(&sv.ThemeSummaryList, value); err != nil { + case "TopicsSummaries": + if err := awsRestjson1_deserializeDocumentTopicSummaries(&sv.TopicsSummaries, value); err != nil { return err } @@ -25481,14 +28525,14 @@ func awsRestjson1_deserializeOpDocumentListThemesOutput(v **ListThemesOutput, va return nil } -type awsRestjson1_deserializeOpListThemeVersions struct { +type awsRestjson1_deserializeOpListUserGroups struct { } -func (*awsRestjson1_deserializeOpListThemeVersions) ID() string { +func (*awsRestjson1_deserializeOpListUserGroups) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListThemeVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListUserGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -25506,12 +28550,12 @@ func (m *awsRestjson1_deserializeOpListThemeVersions) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListThemeVersions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListUserGroups(response, &metadata) } - output := &ListThemeVersionsOutput{} + output := &ListUserGroupsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListThemeVersionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListUserGroupsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -25534,7 +28578,7 @@ func (m *awsRestjson1_deserializeOpListThemeVersions) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListThemeVersionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListUserGroupsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -25548,7 +28592,7 @@ func (m *awsRestjson1_deserializeOpListThemeVersions) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorListThemeVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListUserGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -25595,21 +28639,21 @@ func awsRestjson1_deserializeOpErrorListThemeVersions(response *smithyhttp.Respo case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -25620,7 +28664,7 @@ func awsRestjson1_deserializeOpErrorListThemeVersions(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpHttpBindingsListThemeVersionsOutput(v *ListThemeVersionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListUserGroupsOutput(v *ListUserGroupsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -25629,7 +28673,7 @@ func awsRestjson1_deserializeOpHttpBindingsListThemeVersionsOutput(v *ListThemeV return nil } -func awsRestjson1_deserializeOpDocumentListThemeVersionsOutput(v **ListThemeVersionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListUserGroupsOutput(v **ListUserGroupsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -25642,15 +28686,20 @@ func awsRestjson1_deserializeOpDocumentListThemeVersionsOutput(v **ListThemeVers return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListThemeVersionsOutput + var sv *ListUserGroupsOutput if *v == nil { - sv = &ListThemeVersionsOutput{} + sv = &ListUserGroupsOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "GroupList": + if err := awsRestjson1_deserializeDocumentGroupList(&sv.GroupList, value); err != nil { + return err + } + case "NextToken": if value != nil { jtv, ok := value.(string) @@ -25669,11 +28718,6 @@ func awsRestjson1_deserializeOpDocumentListThemeVersionsOutput(v **ListThemeVers sv.RequestId = ptr.String(jtv) } - case "ThemeVersionSummaryList": - if err := awsRestjson1_deserializeDocumentThemeVersionSummaryList(&sv.ThemeVersionSummaryList, value); err != nil { - return err - } - default: _, _ = key, value @@ -25683,14 +28727,14 @@ func awsRestjson1_deserializeOpDocumentListThemeVersionsOutput(v **ListThemeVers return nil } -type awsRestjson1_deserializeOpListTopicRefreshSchedules struct { +type awsRestjson1_deserializeOpListUsers struct { } -func (*awsRestjson1_deserializeOpListTopicRefreshSchedules) ID() string { +func (*awsRestjson1_deserializeOpListUsers) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTopicRefreshSchedules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListUsers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -25708,12 +28752,12 @@ func (m *awsRestjson1_deserializeOpListTopicRefreshSchedules) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTopicRefreshSchedules(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListUsers(response, &metadata) } - output := &ListTopicRefreshSchedulesOutput{} + output := &ListUsersOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListTopicRefreshSchedulesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListUsersOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -25736,7 +28780,7 @@ func (m *awsRestjson1_deserializeOpListTopicRefreshSchedules) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTopicRefreshSchedulesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListUsersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -25750,7 +28794,7 @@ func (m *awsRestjson1_deserializeOpListTopicRefreshSchedules) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTopicRefreshSchedules(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListUsers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -25794,24 +28838,24 @@ func awsRestjson1_deserializeOpErrorListTopicRefreshSchedules(response *smithyht case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -25825,7 +28869,7 @@ func awsRestjson1_deserializeOpErrorListTopicRefreshSchedules(response *smithyht } } -func awsRestjson1_deserializeOpHttpBindingsListTopicRefreshSchedulesOutput(v *ListTopicRefreshSchedulesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListUsersOutput(v *ListUsersOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -25834,7 +28878,7 @@ func awsRestjson1_deserializeOpHttpBindingsListTopicRefreshSchedulesOutput(v *Li return nil } -func awsRestjson1_deserializeOpDocumentListTopicRefreshSchedulesOutput(v **ListTopicRefreshSchedulesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListUsersOutput(v **ListUsersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -25847,45 +28891,36 @@ func awsRestjson1_deserializeOpDocumentListTopicRefreshSchedulesOutput(v **ListT return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTopicRefreshSchedulesOutput + var sv *ListUsersOutput if *v == nil { - sv = &ListTopicRefreshSchedulesOutput{} + sv = &ListUsersOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "RefreshSchedules": - if err := awsRestjson1_deserializeDocumentTopicRefreshScheduleSummaries(&sv.RefreshSchedules, value); err != nil { - return err - } - - case "RequestId": + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } - case "TopicArn": + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.TopicArn = ptr.String(jtv) + sv.RequestId = ptr.String(jtv) } - case "TopicId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TopicId to be of type string, got %T instead", value) - } - sv.TopicId = ptr.String(jtv) + case "UserList": + if err := awsRestjson1_deserializeDocumentUserList(&sv.UserList, value); err != nil { + return err } default: @@ -25897,14 +28932,14 @@ func awsRestjson1_deserializeOpDocumentListTopicRefreshSchedulesOutput(v **ListT return nil } -type awsRestjson1_deserializeOpListTopicReviewedAnswers struct { +type awsRestjson1_deserializeOpListVPCConnections struct { } -func (*awsRestjson1_deserializeOpListTopicReviewedAnswers) ID() string { +func (*awsRestjson1_deserializeOpListVPCConnections) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTopicReviewedAnswers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListVPCConnections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -25922,12 +28957,12 @@ func (m *awsRestjson1_deserializeOpListTopicReviewedAnswers) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTopicReviewedAnswers(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListVPCConnections(response, &metadata) } - output := &ListTopicReviewedAnswersOutput{} + output := &ListVPCConnectionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListTopicReviewedAnswersOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsListVPCConnectionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -25950,7 +28985,7 @@ func (m *awsRestjson1_deserializeOpListTopicReviewedAnswers) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTopicReviewedAnswersOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListVPCConnectionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -25964,7 +28999,7 @@ func (m *awsRestjson1_deserializeOpListTopicReviewedAnswers) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTopicReviewedAnswers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListVPCConnections(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -26011,15 +29046,18 @@ func awsRestjson1_deserializeOpErrorListTopicReviewedAnswers(response *smithyhtt case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -26030,7 +29068,7 @@ func awsRestjson1_deserializeOpErrorListTopicReviewedAnswers(response *smithyhtt } } -func awsRestjson1_deserializeOpHttpBindingsListTopicReviewedAnswersOutput(v *ListTopicReviewedAnswersOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsListVPCConnectionsOutput(v *ListVPCConnectionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -26039,7 +29077,7 @@ func awsRestjson1_deserializeOpHttpBindingsListTopicReviewedAnswersOutput(v *Lis return nil } -func awsRestjson1_deserializeOpDocumentListTopicReviewedAnswersOutput(v **ListTopicReviewedAnswersOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListVPCConnectionsOutput(v **ListVPCConnectionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -26052,45 +29090,36 @@ func awsRestjson1_deserializeOpDocumentListTopicReviewedAnswersOutput(v **ListTo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTopicReviewedAnswersOutput + var sv *ListVPCConnectionsOutput if *v == nil { - sv = &ListTopicReviewedAnswersOutput{} + sv = &ListVPCConnectionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Answers": - if err := awsRestjson1_deserializeDocumentTopicReviewedAnswers(&sv.Answers, value); err != nil { - return err - } - - case "RequestId": + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } - case "TopicArn": + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.TopicArn = ptr.String(jtv) + sv.RequestId = ptr.String(jtv) } - case "TopicId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TopicId to be of type string, got %T instead", value) - } - sv.TopicId = ptr.String(jtv) + case "VPCConnectionSummaries": + if err := awsRestjson1_deserializeDocumentVPCConnectionSummaryList(&sv.VPCConnectionSummaries, value); err != nil { + return err } default: @@ -26102,14 +29131,14 @@ func awsRestjson1_deserializeOpDocumentListTopicReviewedAnswersOutput(v **ListTo return nil } -type awsRestjson1_deserializeOpListTopics struct { +type awsRestjson1_deserializeOpPutDataSetRefreshProperties struct { } -func (*awsRestjson1_deserializeOpListTopics) ID() string { +func (*awsRestjson1_deserializeOpPutDataSetRefreshProperties) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTopics) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutDataSetRefreshProperties) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -26127,12 +29156,12 @@ func (m *awsRestjson1_deserializeOpListTopics) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTopics(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutDataSetRefreshProperties(response, &metadata) } - output := &ListTopicsOutput{} + output := &PutDataSetRefreshPropertiesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListTopicsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsPutDataSetRefreshPropertiesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -26155,7 +29184,7 @@ func (m *awsRestjson1_deserializeOpListTopics) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTopicsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPutDataSetRefreshPropertiesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -26169,7 +29198,7 @@ func (m *awsRestjson1_deserializeOpListTopics) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTopics(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutDataSetRefreshProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -26213,15 +29242,24 @@ func awsRestjson1_deserializeOpErrorListTopics(response *smithyhttp.Response, me case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -26235,7 +29273,7 @@ func awsRestjson1_deserializeOpErrorListTopics(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpHttpBindingsListTopicsOutput(v *ListTopicsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsPutDataSetRefreshPropertiesOutput(v *PutDataSetRefreshPropertiesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -26244,7 +29282,7 @@ func awsRestjson1_deserializeOpHttpBindingsListTopicsOutput(v *ListTopicsOutput, return nil } -func awsRestjson1_deserializeOpDocumentListTopicsOutput(v **ListTopicsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPutDataSetRefreshPropertiesOutput(v **PutDataSetRefreshPropertiesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -26257,24 +29295,15 @@ func awsRestjson1_deserializeOpDocumentListTopicsOutput(v **ListTopicsOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTopicsOutput + var sv *PutDataSetRefreshPropertiesOutput if *v == nil { - sv = &ListTopicsOutput{} + sv = &PutDataSetRefreshPropertiesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -26284,11 +29313,6 @@ func awsRestjson1_deserializeOpDocumentListTopicsOutput(v **ListTopicsOutput, va sv.RequestId = ptr.String(jtv) } - case "TopicsSummaries": - if err := awsRestjson1_deserializeDocumentTopicSummaries(&sv.TopicsSummaries, value); err != nil { - return err - } - default: _, _ = key, value @@ -26298,14 +29322,14 @@ func awsRestjson1_deserializeOpDocumentListTopicsOutput(v **ListTopicsOutput, va return nil } -type awsRestjson1_deserializeOpListUserGroups struct { +type awsRestjson1_deserializeOpRegisterUser struct { } -func (*awsRestjson1_deserializeOpListUserGroups) ID() string { +func (*awsRestjson1_deserializeOpRegisterUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListUserGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpRegisterUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -26323,12 +29347,12 @@ func (m *awsRestjson1_deserializeOpListUserGroups) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListUserGroups(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorRegisterUser(response, &metadata) } - output := &ListUserGroupsOutput{} + output := &RegisterUserOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListUserGroupsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsRegisterUserOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -26351,7 +29375,7 @@ func (m *awsRestjson1_deserializeOpListUserGroups) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListUserGroupsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentRegisterUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -26365,7 +29389,7 @@ func (m *awsRestjson1_deserializeOpListUserGroups) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorListUserGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorRegisterUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -26415,9 +29439,15 @@ func awsRestjson1_deserializeOpErrorListUserGroups(response *smithyhttp.Response case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -26437,7 +29467,7 @@ func awsRestjson1_deserializeOpErrorListUserGroups(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsListUserGroupsOutput(v *ListUserGroupsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsRegisterUserOutput(v *RegisterUserOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -26446,7 +29476,7 @@ func awsRestjson1_deserializeOpHttpBindingsListUserGroupsOutput(v *ListUserGroup return nil } -func awsRestjson1_deserializeOpDocumentListUserGroupsOutput(v **ListUserGroupsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentRegisterUserOutput(v **RegisterUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -26459,36 +29489,36 @@ func awsRestjson1_deserializeOpDocumentListUserGroupsOutput(v **ListUserGroupsOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListUserGroupsOutput + var sv *RegisterUserOutput if *v == nil { - sv = &ListUserGroupsOutput{} + sv = &RegisterUserOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "GroupList": - if err := awsRestjson1_deserializeDocumentGroupList(&sv.GroupList, value); err != nil { - return err - } - - case "NextToken": + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.RequestId = ptr.String(jtv) } - case "RequestId": + case "User": + if err := awsRestjson1_deserializeDocumentUser(&sv.User, value); err != nil { + return err + } + + case "UserInvitationUrl": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.UserInvitationUrl = ptr.String(jtv) } default: @@ -26500,14 +29530,14 @@ func awsRestjson1_deserializeOpDocumentListUserGroupsOutput(v **ListUserGroupsOu return nil } -type awsRestjson1_deserializeOpListUsers struct { +type awsRestjson1_deserializeOpRestoreAnalysis struct { } -func (*awsRestjson1_deserializeOpListUsers) ID() string { +func (*awsRestjson1_deserializeOpRestoreAnalysis) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListUsers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpRestoreAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -26525,12 +29555,12 @@ func (m *awsRestjson1_deserializeOpListUsers) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListUsers(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorRestoreAnalysis(response, &metadata) } - output := &ListUsersOutput{} + output := &RestoreAnalysisOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListUsersOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsRestoreAnalysisOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -26553,7 +29583,7 @@ func (m *awsRestjson1_deserializeOpListUsers) HandleDeserialize(ctx context.Cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListUsersOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentRestoreAnalysisOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -26567,7 +29597,7 @@ func (m *awsRestjson1_deserializeOpListUsers) HandleDeserialize(ctx context.Cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorListUsers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorRestoreAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -26608,30 +29638,30 @@ func awsRestjson1_deserializeOpErrorListUsers(response *smithyhttp.Response, met } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -26642,7 +29672,7 @@ func awsRestjson1_deserializeOpErrorListUsers(response *smithyhttp.Response, met } } -func awsRestjson1_deserializeOpHttpBindingsListUsersOutput(v *ListUsersOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsRestoreAnalysisOutput(v *RestoreAnalysisOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -26651,7 +29681,7 @@ func awsRestjson1_deserializeOpHttpBindingsListUsersOutput(v *ListUsersOutput, r return nil } -func awsRestjson1_deserializeOpDocumentListUsersOutput(v **ListUsersOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentRestoreAnalysisOutput(v **RestoreAnalysisOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -26664,22 +29694,31 @@ func awsRestjson1_deserializeOpDocumentListUsersOutput(v **ListUsersOutput, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListUsersOutput + var sv *RestoreAnalysisOutput if *v == nil { - sv = &ListUsersOutput{} + sv = &RestoreAnalysisOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "NextToken": + case "AnalysisId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.AnalysisId = ptr.String(jtv) + } + + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) } case "RequestId": @@ -26691,8 +29730,8 @@ func awsRestjson1_deserializeOpDocumentListUsersOutput(v **ListUsersOutput, valu sv.RequestId = ptr.String(jtv) } - case "UserList": - if err := awsRestjson1_deserializeDocumentUserList(&sv.UserList, value); err != nil { + case "RestorationFailedFolderArns": + if err := awsRestjson1_deserializeDocumentFolderArnList(&sv.RestorationFailedFolderArns, value); err != nil { return err } @@ -26705,14 +29744,14 @@ func awsRestjson1_deserializeOpDocumentListUsersOutput(v **ListUsersOutput, valu return nil } -type awsRestjson1_deserializeOpListVPCConnections struct { +type awsRestjson1_deserializeOpSearchAnalyses struct { } -func (*awsRestjson1_deserializeOpListVPCConnections) ID() string { +func (*awsRestjson1_deserializeOpSearchAnalyses) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListVPCConnections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpSearchAnalyses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -26730,12 +29769,12 @@ func (m *awsRestjson1_deserializeOpListVPCConnections) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListVPCConnections(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorSearchAnalyses(response, &metadata) } - output := &ListVPCConnectionsOutput{} + output := &SearchAnalysesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsListVPCConnectionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsSearchAnalysesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -26758,7 +29797,7 @@ func (m *awsRestjson1_deserializeOpListVPCConnections) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListVPCConnectionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentSearchAnalysesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -26772,7 +29811,7 @@ func (m *awsRestjson1_deserializeOpListVPCConnections) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListVPCConnections(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorSearchAnalyses(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -26813,9 +29852,6 @@ func awsRestjson1_deserializeOpErrorListVPCConnections(response *smithyhttp.Resp } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -26825,6 +29861,9 @@ func awsRestjson1_deserializeOpErrorListVPCConnections(response *smithyhttp.Resp case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -26841,7 +29880,7 @@ func awsRestjson1_deserializeOpErrorListVPCConnections(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpHttpBindingsListVPCConnectionsOutput(v *ListVPCConnectionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsSearchAnalysesOutput(v *SearchAnalysesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -26850,7 +29889,7 @@ func awsRestjson1_deserializeOpHttpBindingsListVPCConnectionsOutput(v *ListVPCCo return nil } -func awsRestjson1_deserializeOpDocumentListVPCConnectionsOutput(v **ListVPCConnectionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentSearchAnalysesOutput(v **SearchAnalysesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -26863,15 +29902,20 @@ func awsRestjson1_deserializeOpDocumentListVPCConnectionsOutput(v **ListVPCConne return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListVPCConnectionsOutput + var sv *SearchAnalysesOutput if *v == nil { - sv = &ListVPCConnectionsOutput{} + sv = &SearchAnalysesOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "AnalysisSummaryList": + if err := awsRestjson1_deserializeDocumentAnalysisSummaryList(&sv.AnalysisSummaryList, value); err != nil { + return err + } + case "NextToken": if value != nil { jtv, ok := value.(string) @@ -26890,11 +29934,6 @@ func awsRestjson1_deserializeOpDocumentListVPCConnectionsOutput(v **ListVPCConne sv.RequestId = ptr.String(jtv) } - case "VPCConnectionSummaries": - if err := awsRestjson1_deserializeDocumentVPCConnectionSummaryList(&sv.VPCConnectionSummaries, value); err != nil { - return err - } - default: _, _ = key, value @@ -26904,14 +29943,14 @@ func awsRestjson1_deserializeOpDocumentListVPCConnectionsOutput(v **ListVPCConne return nil } -type awsRestjson1_deserializeOpPutDataSetRefreshProperties struct { +type awsRestjson1_deserializeOpSearchDashboards struct { } -func (*awsRestjson1_deserializeOpPutDataSetRefreshProperties) ID() string { +func (*awsRestjson1_deserializeOpSearchDashboards) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutDataSetRefreshProperties) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpSearchDashboards) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -26929,12 +29968,12 @@ func (m *awsRestjson1_deserializeOpPutDataSetRefreshProperties) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutDataSetRefreshProperties(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorSearchDashboards(response, &metadata) } - output := &PutDataSetRefreshPropertiesOutput{} + output := &SearchDashboardsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsPutDataSetRefreshPropertiesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsSearchDashboardsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -26957,7 +29996,7 @@ func (m *awsRestjson1_deserializeOpPutDataSetRefreshProperties) HandleDeserializ return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPutDataSetRefreshPropertiesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentSearchDashboardsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -26971,7 +30010,7 @@ func (m *awsRestjson1_deserializeOpPutDataSetRefreshProperties) HandleDeserializ return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutDataSetRefreshProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorSearchDashboards(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -27012,30 +30051,24 @@ func awsRestjson1_deserializeOpErrorPutDataSetRefreshProperties(response *smithy } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -27046,7 +30079,7 @@ func awsRestjson1_deserializeOpErrorPutDataSetRefreshProperties(response *smithy } } -func awsRestjson1_deserializeOpHttpBindingsPutDataSetRefreshPropertiesOutput(v *PutDataSetRefreshPropertiesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsSearchDashboardsOutput(v *SearchDashboardsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -27055,7 +30088,7 @@ func awsRestjson1_deserializeOpHttpBindingsPutDataSetRefreshPropertiesOutput(v * return nil } -func awsRestjson1_deserializeOpDocumentPutDataSetRefreshPropertiesOutput(v **PutDataSetRefreshPropertiesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentSearchDashboardsOutput(v **SearchDashboardsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -27068,15 +30101,29 @@ func awsRestjson1_deserializeOpDocumentPutDataSetRefreshPropertiesOutput(v **Put return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PutDataSetRefreshPropertiesOutput + var sv *SearchDashboardsOutput if *v == nil { - sv = &PutDataSetRefreshPropertiesOutput{} + sv = &SearchDashboardsOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "DashboardSummaryList": + if err := awsRestjson1_deserializeDocumentDashboardSummaryList(&sv.DashboardSummaryList, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -27095,14 +30142,14 @@ func awsRestjson1_deserializeOpDocumentPutDataSetRefreshPropertiesOutput(v **Put return nil } -type awsRestjson1_deserializeOpRegisterUser struct { +type awsRestjson1_deserializeOpSearchDataSets struct { } -func (*awsRestjson1_deserializeOpRegisterUser) ID() string { +func (*awsRestjson1_deserializeOpSearchDataSets) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpRegisterUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpSearchDataSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -27120,12 +30167,12 @@ func (m *awsRestjson1_deserializeOpRegisterUser) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRegisterUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorSearchDataSets(response, &metadata) } - output := &RegisterUserOutput{} + output := &SearchDataSetsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsRegisterUserOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsSearchDataSetsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -27148,7 +30195,7 @@ func (m *awsRestjson1_deserializeOpRegisterUser) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentRegisterUserOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentSearchDataSetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -27162,7 +30209,7 @@ func (m *awsRestjson1_deserializeOpRegisterUser) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorRegisterUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorSearchDataSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -27209,24 +30256,15 @@ func awsRestjson1_deserializeOpErrorRegisterUser(response *smithyhttp.Response, case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -27240,7 +30278,7 @@ func awsRestjson1_deserializeOpErrorRegisterUser(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsRegisterUserOutput(v *RegisterUserOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsSearchDataSetsOutput(v *SearchDataSetsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -27249,7 +30287,7 @@ func awsRestjson1_deserializeOpHttpBindingsRegisterUserOutput(v *RegisterUserOut return nil } -func awsRestjson1_deserializeOpDocumentRegisterUserOutput(v **RegisterUserOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentSearchDataSetsOutput(v **SearchDataSetsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -27262,36 +30300,36 @@ func awsRestjson1_deserializeOpDocumentRegisterUserOutput(v **RegisterUserOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *RegisterUserOutput + var sv *SearchDataSetsOutput if *v == nil { - sv = &RegisterUserOutput{} + sv = &SearchDataSetsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "RequestId": + case "DataSetSummaries": + if err := awsRestjson1_deserializeDocumentDataSetSummaryList(&sv.DataSetSummaries, value); err != nil { + return err + } + + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) - } - - case "User": - if err := awsRestjson1_deserializeDocumentUser(&sv.User, value); err != nil { - return err + sv.NextToken = ptr.String(jtv) } - case "UserInvitationUrl": + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.UserInvitationUrl = ptr.String(jtv) + sv.RequestId = ptr.String(jtv) } default: @@ -27303,14 +30341,14 @@ func awsRestjson1_deserializeOpDocumentRegisterUserOutput(v **RegisterUserOutput return nil } -type awsRestjson1_deserializeOpRestoreAnalysis struct { +type awsRestjson1_deserializeOpSearchDataSources struct { } -func (*awsRestjson1_deserializeOpRestoreAnalysis) ID() string { +func (*awsRestjson1_deserializeOpSearchDataSources) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpRestoreAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpSearchDataSources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -27328,12 +30366,12 @@ func (m *awsRestjson1_deserializeOpRestoreAnalysis) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRestoreAnalysis(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorSearchDataSources(response, &metadata) } - output := &RestoreAnalysisOutput{} + output := &SearchDataSourcesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsRestoreAnalysisOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsSearchDataSourcesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -27356,7 +30394,7 @@ func (m *awsRestjson1_deserializeOpRestoreAnalysis) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentRestoreAnalysisOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentSearchDataSourcesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -27370,7 +30408,7 @@ func (m *awsRestjson1_deserializeOpRestoreAnalysis) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorRestoreAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorSearchDataSources(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -27411,30 +30449,24 @@ func awsRestjson1_deserializeOpErrorRestoreAnalysis(response *smithyhttp.Respons } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -27445,7 +30477,7 @@ func awsRestjson1_deserializeOpErrorRestoreAnalysis(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpHttpBindingsRestoreAnalysisOutput(v *RestoreAnalysisOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsSearchDataSourcesOutput(v *SearchDataSourcesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -27454,7 +30486,7 @@ func awsRestjson1_deserializeOpHttpBindingsRestoreAnalysisOutput(v *RestoreAnaly return nil } -func awsRestjson1_deserializeOpDocumentRestoreAnalysisOutput(v **RestoreAnalysisOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentSearchDataSourcesOutput(v **SearchDataSourcesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -27467,31 +30499,27 @@ func awsRestjson1_deserializeOpDocumentRestoreAnalysisOutput(v **RestoreAnalysis return fmt.Errorf("unexpected JSON type %v", value) } - var sv *RestoreAnalysisOutput + var sv *SearchDataSourcesOutput if *v == nil { - sv = &RestoreAnalysisOutput{} + sv = &SearchDataSourcesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AnalysisId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.AnalysisId = ptr.String(jtv) + case "DataSourceSummaries": + if err := awsRestjson1_deserializeDocumentDataSourceSummaryList(&sv.DataSourceSummaries, value); err != nil { + return err } - case "Arn": + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Arn = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } case "RequestId": @@ -27503,11 +30531,6 @@ func awsRestjson1_deserializeOpDocumentRestoreAnalysisOutput(v **RestoreAnalysis sv.RequestId = ptr.String(jtv) } - case "RestorationFailedFolderArns": - if err := awsRestjson1_deserializeDocumentFolderArnList(&sv.RestorationFailedFolderArns, value); err != nil { - return err - } - default: _, _ = key, value @@ -27517,14 +30540,14 @@ func awsRestjson1_deserializeOpDocumentRestoreAnalysisOutput(v **RestoreAnalysis return nil } -type awsRestjson1_deserializeOpSearchAnalyses struct { +type awsRestjson1_deserializeOpSearchFolders struct { } -func (*awsRestjson1_deserializeOpSearchAnalyses) ID() string { +func (*awsRestjson1_deserializeOpSearchFolders) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSearchAnalyses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpSearchFolders) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -27542,12 +30565,12 @@ func (m *awsRestjson1_deserializeOpSearchAnalyses) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSearchAnalyses(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorSearchFolders(response, &metadata) } - output := &SearchAnalysesOutput{} + output := &SearchFoldersOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsSearchAnalysesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsSearchFoldersOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -27570,7 +30593,7 @@ func (m *awsRestjson1_deserializeOpSearchAnalyses) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentSearchAnalysesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentSearchFoldersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -27584,7 +30607,7 @@ func (m *awsRestjson1_deserializeOpSearchAnalyses) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorSearchAnalyses(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorSearchFolders(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -27625,6 +30648,9 @@ func awsRestjson1_deserializeOpErrorSearchAnalyses(response *smithyhttp.Response } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -27634,6 +30660,9 @@ func awsRestjson1_deserializeOpErrorSearchAnalyses(response *smithyhttp.Response case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -27653,7 +30682,7 @@ func awsRestjson1_deserializeOpErrorSearchAnalyses(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsSearchAnalysesOutput(v *SearchAnalysesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsSearchFoldersOutput(v *SearchFoldersOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -27662,7 +30691,7 @@ func awsRestjson1_deserializeOpHttpBindingsSearchAnalysesOutput(v *SearchAnalyse return nil } -func awsRestjson1_deserializeOpDocumentSearchAnalysesOutput(v **SearchAnalysesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentSearchFoldersOutput(v **SearchFoldersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -27675,17 +30704,17 @@ func awsRestjson1_deserializeOpDocumentSearchAnalysesOutput(v **SearchAnalysesOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *SearchAnalysesOutput + var sv *SearchFoldersOutput if *v == nil { - sv = &SearchAnalysesOutput{} + sv = &SearchFoldersOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AnalysisSummaryList": - if err := awsRestjson1_deserializeDocumentAnalysisSummaryList(&sv.AnalysisSummaryList, value); err != nil { + case "FolderSummaryList": + if err := awsRestjson1_deserializeDocumentFolderSummaryList(&sv.FolderSummaryList, value); err != nil { return err } @@ -27716,14 +30745,14 @@ func awsRestjson1_deserializeOpDocumentSearchAnalysesOutput(v **SearchAnalysesOu return nil } -type awsRestjson1_deserializeOpSearchDashboards struct { +type awsRestjson1_deserializeOpSearchGroups struct { } -func (*awsRestjson1_deserializeOpSearchDashboards) ID() string { +func (*awsRestjson1_deserializeOpSearchGroups) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSearchDashboards) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpSearchGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -27741,12 +30770,12 @@ func (m *awsRestjson1_deserializeOpSearchDashboards) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSearchDashboards(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorSearchGroups(response, &metadata) } - output := &SearchDashboardsOutput{} + output := &SearchGroupsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsSearchDashboardsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsSearchGroupsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -27769,7 +30798,7 @@ func (m *awsRestjson1_deserializeOpSearchDashboards) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentSearchDashboardsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentSearchGroupsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -27783,7 +30812,7 @@ func (m *awsRestjson1_deserializeOpSearchDashboards) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorSearchDashboards(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorSearchGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -27824,6 +30853,9 @@ func awsRestjson1_deserializeOpErrorSearchDashboards(response *smithyhttp.Respon } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -27833,15 +30865,18 @@ func awsRestjson1_deserializeOpErrorSearchDashboards(response *smithyhttp.Respon case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -27852,7 +30887,7 @@ func awsRestjson1_deserializeOpErrorSearchDashboards(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpHttpBindingsSearchDashboardsOutput(v *SearchDashboardsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsSearchGroupsOutput(v *SearchGroupsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -27861,7 +30896,7 @@ func awsRestjson1_deserializeOpHttpBindingsSearchDashboardsOutput(v *SearchDashb return nil } -func awsRestjson1_deserializeOpDocumentSearchDashboardsOutput(v **SearchDashboardsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentSearchGroupsOutput(v **SearchGroupsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -27874,17 +30909,17 @@ func awsRestjson1_deserializeOpDocumentSearchDashboardsOutput(v **SearchDashboar return fmt.Errorf("unexpected JSON type %v", value) } - var sv *SearchDashboardsOutput + var sv *SearchGroupsOutput if *v == nil { - sv = &SearchDashboardsOutput{} + sv = &SearchGroupsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DashboardSummaryList": - if err := awsRestjson1_deserializeDocumentDashboardSummaryList(&sv.DashboardSummaryList, value); err != nil { + case "GroupList": + if err := awsRestjson1_deserializeDocumentGroupList(&sv.GroupList, value); err != nil { return err } @@ -27915,14 +30950,14 @@ func awsRestjson1_deserializeOpDocumentSearchDashboardsOutput(v **SearchDashboar return nil } -type awsRestjson1_deserializeOpSearchDataSets struct { +type awsRestjson1_deserializeOpStartAssetBundleExportJob struct { } -func (*awsRestjson1_deserializeOpSearchDataSets) ID() string { +func (*awsRestjson1_deserializeOpStartAssetBundleExportJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSearchDataSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartAssetBundleExportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -27940,12 +30975,12 @@ func (m *awsRestjson1_deserializeOpSearchDataSets) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSearchDataSets(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartAssetBundleExportJob(response, &metadata) } - output := &SearchDataSetsOutput{} + output := &StartAssetBundleExportJobOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsSearchDataSetsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsStartAssetBundleExportJobOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -27968,7 +31003,7 @@ func (m *awsRestjson1_deserializeOpSearchDataSets) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentSearchDataSetsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartAssetBundleExportJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -27982,7 +31017,7 @@ func (m *awsRestjson1_deserializeOpSearchDataSets) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorSearchDataSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartAssetBundleExportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -28026,21 +31061,24 @@ func awsRestjson1_deserializeOpErrorSearchDataSets(response *smithyhttp.Response case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): - return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -28051,7 +31089,7 @@ func awsRestjson1_deserializeOpErrorSearchDataSets(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsSearchDataSetsOutput(v *SearchDataSetsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsStartAssetBundleExportJobOutput(v *StartAssetBundleExportJobOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -28060,7 +31098,7 @@ func awsRestjson1_deserializeOpHttpBindingsSearchDataSetsOutput(v *SearchDataSet return nil } -func awsRestjson1_deserializeOpDocumentSearchDataSetsOutput(v **SearchDataSetsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartAssetBundleExportJobOutput(v **StartAssetBundleExportJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -28073,34 +31111,38 @@ func awsRestjson1_deserializeOpDocumentSearchDataSetsOutput(v **SearchDataSetsOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *SearchDataSetsOutput + var sv *StartAssetBundleExportJobOutput if *v == nil { - sv = &SearchDataSetsOutput{} + sv = &StartAssetBundleExportJobOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSetSummaries": - if err := awsRestjson1_deserializeDocumentDataSetSummaryList(&sv.DataSetSummaries, value); err != nil { - return err + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) } - case "NextToken": + case "AssetBundleExportJobId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.AssetBundleExportJobId = ptr.String(jtv) } case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } @@ -28114,14 +31156,14 @@ func awsRestjson1_deserializeOpDocumentSearchDataSetsOutput(v **SearchDataSetsOu return nil } -type awsRestjson1_deserializeOpSearchDataSources struct { +type awsRestjson1_deserializeOpStartAssetBundleImportJob struct { } -func (*awsRestjson1_deserializeOpSearchDataSources) ID() string { +func (*awsRestjson1_deserializeOpStartAssetBundleImportJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSearchDataSources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartAssetBundleImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -28139,12 +31181,12 @@ func (m *awsRestjson1_deserializeOpSearchDataSources) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSearchDataSources(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartAssetBundleImportJob(response, &metadata) } - output := &SearchDataSourcesOutput{} + output := &StartAssetBundleImportJobOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsSearchDataSourcesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsStartAssetBundleImportJobOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -28167,7 +31209,7 @@ func (m *awsRestjson1_deserializeOpSearchDataSources) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentSearchDataSourcesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartAssetBundleImportJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -28181,7 +31223,7 @@ func (m *awsRestjson1_deserializeOpSearchDataSources) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorSearchDataSources(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartAssetBundleImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -28225,21 +31267,24 @@ func awsRestjson1_deserializeOpErrorSearchDataSources(response *smithyhttp.Respo case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): - return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -28250,7 +31295,7 @@ func awsRestjson1_deserializeOpErrorSearchDataSources(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpHttpBindingsSearchDataSourcesOutput(v *SearchDataSourcesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsStartAssetBundleImportJobOutput(v *StartAssetBundleImportJobOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -28259,7 +31304,7 @@ func awsRestjson1_deserializeOpHttpBindingsSearchDataSourcesOutput(v *SearchData return nil } -func awsRestjson1_deserializeOpDocumentSearchDataSourcesOutput(v **SearchDataSourcesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartAssetBundleImportJobOutput(v **StartAssetBundleImportJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -28272,34 +31317,38 @@ func awsRestjson1_deserializeOpDocumentSearchDataSourcesOutput(v **SearchDataSou return fmt.Errorf("unexpected JSON type %v", value) } - var sv *SearchDataSourcesOutput + var sv *StartAssetBundleImportJobOutput if *v == nil { - sv = &SearchDataSourcesOutput{} + sv = &StartAssetBundleImportJobOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSourceSummaries": - if err := awsRestjson1_deserializeDocumentDataSourceSummaryList(&sv.DataSourceSummaries, value); err != nil { - return err + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) } - case "NextToken": + case "AssetBundleImportJobId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.AssetBundleImportJobId = ptr.String(jtv) } case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } @@ -28313,14 +31362,14 @@ func awsRestjson1_deserializeOpDocumentSearchDataSourcesOutput(v **SearchDataSou return nil } -type awsRestjson1_deserializeOpSearchFolders struct { +type awsRestjson1_deserializeOpStartDashboardSnapshotJob struct { } -func (*awsRestjson1_deserializeOpSearchFolders) ID() string { +func (*awsRestjson1_deserializeOpStartDashboardSnapshotJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSearchFolders) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartDashboardSnapshotJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -28338,12 +31387,12 @@ func (m *awsRestjson1_deserializeOpSearchFolders) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSearchFolders(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartDashboardSnapshotJob(response, &metadata) } - output := &SearchFoldersOutput{} + output := &StartDashboardSnapshotJobOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsSearchFoldersOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsStartDashboardSnapshotJobOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -28366,7 +31415,7 @@ func (m *awsRestjson1_deserializeOpSearchFolders) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentSearchFoldersOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartDashboardSnapshotJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -28380,7 +31429,7 @@ func (m *awsRestjson1_deserializeOpSearchFolders) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorSearchFolders(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartDashboardSnapshotJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -28427,14 +31476,14 @@ func awsRestjson1_deserializeOpErrorSearchFolders(response *smithyhttp.Response, case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -28442,6 +31491,9 @@ func awsRestjson1_deserializeOpErrorSearchFolders(response *smithyhttp.Response, case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedPricingPlanException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedPricingPlanException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) @@ -28455,7 +31507,7 @@ func awsRestjson1_deserializeOpErrorSearchFolders(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsSearchFoldersOutput(v *SearchFoldersOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsStartDashboardSnapshotJobOutput(v *StartDashboardSnapshotJobOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -28464,7 +31516,7 @@ func awsRestjson1_deserializeOpHttpBindingsSearchFoldersOutput(v *SearchFoldersO return nil } -func awsRestjson1_deserializeOpDocumentSearchFoldersOutput(v **SearchFoldersOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartDashboardSnapshotJobOutput(v **StartDashboardSnapshotJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -28477,38 +31529,42 @@ func awsRestjson1_deserializeOpDocumentSearchFoldersOutput(v **SearchFoldersOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *SearchFoldersOutput + var sv *StartDashboardSnapshotJobOutput if *v == nil { - sv = &SearchFoldersOutput{} + sv = &StartDashboardSnapshotJobOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "FolderSummaryList": - if err := awsRestjson1_deserializeDocumentFolderSummaryList(&sv.FolderSummaryList, value); err != nil { - return err - } - - case "NextToken": + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } + case "SnapshotJobId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.SnapshotJobId = ptr.String(jtv) + } + default: _, _ = key, value @@ -28518,14 +31574,14 @@ func awsRestjson1_deserializeOpDocumentSearchFoldersOutput(v **SearchFoldersOutp return nil } -type awsRestjson1_deserializeOpSearchGroups struct { +type awsRestjson1_deserializeOpStartDashboardSnapshotJobSchedule struct { } -func (*awsRestjson1_deserializeOpSearchGroups) ID() string { +func (*awsRestjson1_deserializeOpStartDashboardSnapshotJobSchedule) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSearchGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartDashboardSnapshotJobSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -28543,12 +31599,12 @@ func (m *awsRestjson1_deserializeOpSearchGroups) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSearchGroups(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartDashboardSnapshotJobSchedule(response, &metadata) } - output := &SearchGroupsOutput{} + output := &StartDashboardSnapshotJobScheduleOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsSearchGroupsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsStartDashboardSnapshotJobScheduleOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -28571,7 +31627,7 @@ func (m *awsRestjson1_deserializeOpSearchGroups) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentSearchGroupsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartDashboardSnapshotJobScheduleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -28585,7 +31641,7 @@ func (m *awsRestjson1_deserializeOpSearchGroups) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorSearchGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartDashboardSnapshotJobSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -28632,24 +31688,21 @@ func awsRestjson1_deserializeOpErrorSearchGroups(response *smithyhttp.Response, case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -28660,7 +31713,7 @@ func awsRestjson1_deserializeOpErrorSearchGroups(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsSearchGroupsOutput(v *SearchGroupsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsStartDashboardSnapshotJobScheduleOutput(v *StartDashboardSnapshotJobScheduleOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -28669,7 +31722,7 @@ func awsRestjson1_deserializeOpHttpBindingsSearchGroupsOutput(v *SearchGroupsOut return nil } -func awsRestjson1_deserializeOpDocumentSearchGroupsOutput(v **SearchGroupsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartDashboardSnapshotJobScheduleOutput(v **StartDashboardSnapshotJobScheduleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -28682,34 +31735,20 @@ func awsRestjson1_deserializeOpDocumentSearchGroupsOutput(v **SearchGroupsOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *SearchGroupsOutput + var sv *StartDashboardSnapshotJobScheduleOutput if *v == nil { - sv = &SearchGroupsOutput{} + sv = &StartDashboardSnapshotJobScheduleOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "GroupList": - if err := awsRestjson1_deserializeDocumentGroupList(&sv.GroupList, value); err != nil { - return err - } - - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } @@ -28723,14 +31762,14 @@ func awsRestjson1_deserializeOpDocumentSearchGroupsOutput(v **SearchGroupsOutput return nil } -type awsRestjson1_deserializeOpStartAssetBundleExportJob struct { +type awsRestjson1_deserializeOpTagResource struct { } -func (*awsRestjson1_deserializeOpStartAssetBundleExportJob) ID() string { +func (*awsRestjson1_deserializeOpTagResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartAssetBundleExportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -28748,12 +31787,12 @@ func (m *awsRestjson1_deserializeOpStartAssetBundleExportJob) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartAssetBundleExportJob(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) } - output := &StartAssetBundleExportJobOutput{} + output := &TagResourceOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsStartAssetBundleExportJobOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsTagResourceOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -28776,7 +31815,7 @@ func (m *awsRestjson1_deserializeOpStartAssetBundleExportJob) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartAssetBundleExportJobOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentTagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -28790,7 +31829,7 @@ func (m *awsRestjson1_deserializeOpStartAssetBundleExportJob) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartAssetBundleExportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -28834,8 +31873,8 @@ func awsRestjson1_deserializeOpErrorStartAssetBundleExportJob(response *smithyht case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) @@ -28849,9 +31888,6 @@ func awsRestjson1_deserializeOpErrorStartAssetBundleExportJob(response *smithyht case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -28862,7 +31898,7 @@ func awsRestjson1_deserializeOpErrorStartAssetBundleExportJob(response *smithyht } } -func awsRestjson1_deserializeOpHttpBindingsStartAssetBundleExportJobOutput(v *StartAssetBundleExportJobOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsTagResourceOutput(v *TagResourceOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -28871,7 +31907,7 @@ func awsRestjson1_deserializeOpHttpBindingsStartAssetBundleExportJobOutput(v *St return nil } -func awsRestjson1_deserializeOpDocumentStartAssetBundleExportJobOutput(v **StartAssetBundleExportJobOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -28884,38 +31920,20 @@ func awsRestjson1_deserializeOpDocumentStartAssetBundleExportJobOutput(v **Start return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartAssetBundleExportJobOutput + var sv *TagResourceOutput if *v == nil { - sv = &StartAssetBundleExportJobOutput{} + sv = &TagResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "AssetBundleExportJobId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.AssetBundleExportJobId = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } @@ -28929,14 +31947,14 @@ func awsRestjson1_deserializeOpDocumentStartAssetBundleExportJobOutput(v **Start return nil } -type awsRestjson1_deserializeOpStartAssetBundleImportJob struct { +type awsRestjson1_deserializeOpUntagResource struct { } -func (*awsRestjson1_deserializeOpStartAssetBundleImportJob) ID() string { +func (*awsRestjson1_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartAssetBundleImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -28954,12 +31972,12 @@ func (m *awsRestjson1_deserializeOpStartAssetBundleImportJob) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartAssetBundleImportJob(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) } - output := &StartAssetBundleImportJobOutput{} + output := &UntagResourceOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsStartAssetBundleImportJobOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUntagResourceOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -28982,7 +32000,7 @@ func (m *awsRestjson1_deserializeOpStartAssetBundleImportJob) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartAssetBundleImportJobOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUntagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -28996,7 +32014,7 @@ func (m *awsRestjson1_deserializeOpStartAssetBundleImportJob) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartAssetBundleImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -29040,24 +32058,18 @@ func awsRestjson1_deserializeOpErrorStartAssetBundleImportJob(response *smithyht case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -29068,7 +32080,7 @@ func awsRestjson1_deserializeOpErrorStartAssetBundleImportJob(response *smithyht } } -func awsRestjson1_deserializeOpHttpBindingsStartAssetBundleImportJobOutput(v *StartAssetBundleImportJobOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUntagResourceOutput(v *UntagResourceOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -29077,7 +32089,7 @@ func awsRestjson1_deserializeOpHttpBindingsStartAssetBundleImportJobOutput(v *St return nil } -func awsRestjson1_deserializeOpDocumentStartAssetBundleImportJobOutput(v **StartAssetBundleImportJobOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -29090,38 +32102,20 @@ func awsRestjson1_deserializeOpDocumentStartAssetBundleImportJobOutput(v **Start return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartAssetBundleImportJobOutput + var sv *UntagResourceOutput if *v == nil { - sv = &StartAssetBundleImportJobOutput{} + sv = &UntagResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "AssetBundleImportJobId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.AssetBundleImportJobId = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } @@ -29135,14 +32129,14 @@ func awsRestjson1_deserializeOpDocumentStartAssetBundleImportJobOutput(v **Start return nil } -type awsRestjson1_deserializeOpStartDashboardSnapshotJob struct { +type awsRestjson1_deserializeOpUpdateAccountCustomization struct { } -func (*awsRestjson1_deserializeOpStartDashboardSnapshotJob) ID() string { +func (*awsRestjson1_deserializeOpUpdateAccountCustomization) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartDashboardSnapshotJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateAccountCustomization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -29160,12 +32154,12 @@ func (m *awsRestjson1_deserializeOpStartDashboardSnapshotJob) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartDashboardSnapshotJob(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAccountCustomization(response, &metadata) } - output := &StartDashboardSnapshotJobOutput{} + output := &UpdateAccountCustomizationOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsStartDashboardSnapshotJobOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateAccountCustomizationOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -29188,7 +32182,7 @@ func (m *awsRestjson1_deserializeOpStartDashboardSnapshotJob) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartDashboardSnapshotJobOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateAccountCustomizationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -29202,7 +32196,7 @@ func (m *awsRestjson1_deserializeOpStartDashboardSnapshotJob) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartDashboardSnapshotJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateAccountCustomization(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -29246,30 +32240,24 @@ func awsRestjson1_deserializeOpErrorStartDashboardSnapshotJob(response *smithyht case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedPricingPlanException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedPricingPlanException(response, errorBody) - - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -29280,7 +32268,7 @@ func awsRestjson1_deserializeOpErrorStartDashboardSnapshotJob(response *smithyht } } -func awsRestjson1_deserializeOpHttpBindingsStartDashboardSnapshotJobOutput(v *StartDashboardSnapshotJobOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateAccountCustomizationOutput(v *UpdateAccountCustomizationOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -29289,7 +32277,7 @@ func awsRestjson1_deserializeOpHttpBindingsStartDashboardSnapshotJobOutput(v *St return nil } -func awsRestjson1_deserializeOpDocumentStartDashboardSnapshotJobOutput(v **StartDashboardSnapshotJobOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateAccountCustomizationOutput(v **UpdateAccountCustomizationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -29302,15 +32290,20 @@ func awsRestjson1_deserializeOpDocumentStartDashboardSnapshotJobOutput(v **Start return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartDashboardSnapshotJobOutput + var sv *UpdateAccountCustomizationOutput if *v == nil { - sv = &StartDashboardSnapshotJobOutput{} + sv = &UpdateAccountCustomizationOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "AccountCustomization": + if err := awsRestjson1_deserializeDocumentAccountCustomization(&sv.AccountCustomization, value); err != nil { + return err + } + case "Arn": if value != nil { jtv, ok := value.(string) @@ -29320,22 +32313,31 @@ func awsRestjson1_deserializeOpDocumentStartDashboardSnapshotJobOutput(v **Start sv.Arn = ptr.String(jtv) } - case "RequestId": + case "AwsAccountId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.AwsAccountId = ptr.String(jtv) } - case "SnapshotJobId": + case "Namespace": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected Namespace to be of type string, got %T instead", value) } - sv.SnapshotJobId = ptr.String(jtv) + sv.Namespace = ptr.String(jtv) + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) } default: @@ -29347,14 +32349,14 @@ func awsRestjson1_deserializeOpDocumentStartDashboardSnapshotJobOutput(v **Start return nil } -type awsRestjson1_deserializeOpStartDashboardSnapshotJobSchedule struct { +type awsRestjson1_deserializeOpUpdateAccountSettings struct { } -func (*awsRestjson1_deserializeOpStartDashboardSnapshotJobSchedule) ID() string { +func (*awsRestjson1_deserializeOpUpdateAccountSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartDashboardSnapshotJobSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -29372,12 +32374,12 @@ func (m *awsRestjson1_deserializeOpStartDashboardSnapshotJobSchedule) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartDashboardSnapshotJobSchedule(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAccountSettings(response, &metadata) } - output := &StartDashboardSnapshotJobScheduleOutput{} + output := &UpdateAccountSettingsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsStartDashboardSnapshotJobScheduleOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateAccountSettingsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -29400,7 +32402,7 @@ func (m *awsRestjson1_deserializeOpStartDashboardSnapshotJobSchedule) HandleDese return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartDashboardSnapshotJobScheduleOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateAccountSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -29414,7 +32416,7 @@ func (m *awsRestjson1_deserializeOpStartDashboardSnapshotJobSchedule) HandleDese return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartDashboardSnapshotJobSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -29464,18 +32466,15 @@ func awsRestjson1_deserializeOpErrorStartDashboardSnapshotJobSchedule(response * case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -29486,7 +32485,7 @@ func awsRestjson1_deserializeOpErrorStartDashboardSnapshotJobSchedule(response * } } -func awsRestjson1_deserializeOpHttpBindingsStartDashboardSnapshotJobScheduleOutput(v *StartDashboardSnapshotJobScheduleOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateAccountSettingsOutput(v *UpdateAccountSettingsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -29495,7 +32494,7 @@ func awsRestjson1_deserializeOpHttpBindingsStartDashboardSnapshotJobScheduleOutp return nil } -func awsRestjson1_deserializeOpDocumentStartDashboardSnapshotJobScheduleOutput(v **StartDashboardSnapshotJobScheduleOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateAccountSettingsOutput(v **UpdateAccountSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -29508,9 +32507,9 @@ func awsRestjson1_deserializeOpDocumentStartDashboardSnapshotJobScheduleOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartDashboardSnapshotJobScheduleOutput + var sv *UpdateAccountSettingsOutput if *v == nil { - sv = &StartDashboardSnapshotJobScheduleOutput{} + sv = &UpdateAccountSettingsOutput{} } else { sv = *v } @@ -29521,7 +32520,7 @@ func awsRestjson1_deserializeOpDocumentStartDashboardSnapshotJobScheduleOutput(v if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } @@ -29535,14 +32534,14 @@ func awsRestjson1_deserializeOpDocumentStartDashboardSnapshotJobScheduleOutput(v return nil } -type awsRestjson1_deserializeOpTagResource struct { +type awsRestjson1_deserializeOpUpdateAnalysis struct { } -func (*awsRestjson1_deserializeOpTagResource) ID() string { +func (*awsRestjson1_deserializeOpUpdateAnalysis) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -29560,12 +32559,12 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAnalysis(response, &metadata) } - output := &TagResourceOutput{} + output := &UpdateAnalysisOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsTagResourceOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateAnalysisOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -29588,7 +32587,7 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentTagResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateAnalysisOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -29602,7 +32601,7 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -29643,8 +32642,8 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -29652,8 +32651,8 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -29661,6 +32660,9 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -29671,7 +32673,7 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpHttpBindingsTagResourceOutput(v *TagResourceOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateAnalysisOutput(v *UpdateAnalysisOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -29680,7 +32682,7 @@ func awsRestjson1_deserializeOpHttpBindingsTagResourceOutput(v *TagResourceOutpu return nil } -func awsRestjson1_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateAnalysisOutput(v **UpdateAnalysisOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -29693,15 +32695,33 @@ func awsRestjson1_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *TagResourceOutput + var sv *UpdateAnalysisOutput if *v == nil { - sv = &TagResourceOutput{} + sv = &UpdateAnalysisOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "AnalysisId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.AnalysisId = ptr.String(jtv) + } + + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -29711,6 +32731,15 @@ func awsRestjson1_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, sv.RequestId = ptr.String(jtv) } + case "UpdateStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) + } + sv.UpdateStatus = types.ResourceStatus(jtv) + } + default: _, _ = key, value @@ -29720,14 +32749,14 @@ func awsRestjson1_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, return nil } -type awsRestjson1_deserializeOpUntagResource struct { +type awsRestjson1_deserializeOpUpdateAnalysisPermissions struct { } -func (*awsRestjson1_deserializeOpUntagResource) ID() string { +func (*awsRestjson1_deserializeOpUpdateAnalysisPermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateAnalysisPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -29745,12 +32774,12 @@ func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAnalysisPermissions(response, &metadata) } - output := &UntagResourceOutput{} + output := &UpdateAnalysisPermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUntagResourceOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateAnalysisPermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -29773,7 +32802,7 @@ func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUntagResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateAnalysisPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -29787,7 +32816,7 @@ func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateAnalysisPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -29828,8 +32857,8 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -29837,12 +32866,18 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -29853,7 +32888,7 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsUntagResourceOutput(v *UntagResourceOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateAnalysisPermissionsOutput(v *UpdateAnalysisPermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -29862,7 +32897,7 @@ func awsRestjson1_deserializeOpHttpBindingsUntagResourceOutput(v *UntagResourceO return nil } -func awsRestjson1_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateAnalysisPermissionsOutput(v **UpdateAnalysisPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -29875,15 +32910,38 @@ func awsRestjson1_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UntagResourceOutput + var sv *UpdateAnalysisPermissionsOutput if *v == nil { - sv = &UntagResourceOutput{} + sv = &UpdateAnalysisPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "AnalysisArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.AnalysisArn = ptr.String(jtv) + } + + case "AnalysisId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.AnalysisId = ptr.String(jtv) + } + + case "Permissions": + if err := awsRestjson1_deserializeDocumentUpdateResourcePermissionList(&sv.Permissions, value); err != nil { + return err + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -29902,14 +32960,14 @@ func awsRestjson1_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutp return nil } -type awsRestjson1_deserializeOpUpdateAccountCustomization struct { +type awsRestjson1_deserializeOpUpdateBrand struct { } -func (*awsRestjson1_deserializeOpUpdateAccountCustomization) ID() string { +func (*awsRestjson1_deserializeOpUpdateBrand) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateAccountCustomization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateBrand) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -29927,16 +32985,11 @@ func (m *awsRestjson1_deserializeOpUpdateAccountCustomization) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateAccountCustomization(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateBrand(response, &metadata) } - output := &UpdateAccountCustomizationOutput{} + output := &UpdateBrandOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateAccountCustomizationOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -29955,7 +33008,7 @@ func (m *awsRestjson1_deserializeOpUpdateAccountCustomization) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateAccountCustomizationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateBrandOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -29969,7 +33022,7 @@ func (m *awsRestjson1_deserializeOpUpdateAccountCustomization) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateAccountCustomization(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateBrand(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -30016,18 +33069,15 @@ func awsRestjson1_deserializeOpErrorUpdateAccountCustomization(response *smithyh case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): - return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -30041,16 +33091,7 @@ func awsRestjson1_deserializeOpErrorUpdateAccountCustomization(response *smithyh } } -func awsRestjson1_deserializeOpHttpBindingsUpdateAccountCustomizationOutput(v *UpdateAccountCustomizationOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - v.Status = int32(response.StatusCode) - - return nil -} -func awsRestjson1_deserializeOpDocumentUpdateAccountCustomizationOutput(v **UpdateAccountCustomizationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateBrandOutput(v **UpdateBrandOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -30063,45 +33104,23 @@ func awsRestjson1_deserializeOpDocumentUpdateAccountCustomizationOutput(v **Upda return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateAccountCustomizationOutput + var sv *UpdateBrandOutput if *v == nil { - sv = &UpdateAccountCustomizationOutput{} + sv = &UpdateBrandOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AccountCustomization": - if err := awsRestjson1_deserializeDocumentAccountCustomization(&sv.AccountCustomization, value); err != nil { + case "BrandDefinition": + if err := awsRestjson1_deserializeDocumentBrandDefinition(&sv.BrandDefinition, value); err != nil { return err } - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "AwsAccountId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) - } - sv.AwsAccountId = ptr.String(jtv) - } - - case "Namespace": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Namespace to be of type string, got %T instead", value) - } - sv.Namespace = ptr.String(jtv) + case "BrandDetail": + if err := awsRestjson1_deserializeDocumentBrandDetail(&sv.BrandDetail, value); err != nil { + return err } case "RequestId": @@ -30122,14 +33141,14 @@ func awsRestjson1_deserializeOpDocumentUpdateAccountCustomizationOutput(v **Upda return nil } -type awsRestjson1_deserializeOpUpdateAccountSettings struct { +type awsRestjson1_deserializeOpUpdateBrandAssignment struct { } -func (*awsRestjson1_deserializeOpUpdateAccountSettings) ID() string { +func (*awsRestjson1_deserializeOpUpdateBrandAssignment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateBrandAssignment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -30147,16 +33166,11 @@ func (m *awsRestjson1_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateAccountSettings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateBrandAssignment(response, &metadata) } - output := &UpdateAccountSettingsOutput{} + output := &UpdateBrandAssignmentOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateAccountSettingsOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -30175,7 +33189,7 @@ func (m *awsRestjson1_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateAccountSettingsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateBrandAssignmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -30189,7 +33203,7 @@ func (m *awsRestjson1_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateBrandAssignment(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -30233,18 +33247,18 @@ func awsRestjson1_deserializeOpErrorUpdateAccountSettings(response *smithyhttp.R case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): - return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -30258,16 +33272,7 @@ func awsRestjson1_deserializeOpErrorUpdateAccountSettings(response *smithyhttp.R } } -func awsRestjson1_deserializeOpHttpBindingsUpdateAccountSettingsOutput(v *UpdateAccountSettingsOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - v.Status = int32(response.StatusCode) - - return nil -} -func awsRestjson1_deserializeOpDocumentUpdateAccountSettingsOutput(v **UpdateAccountSettingsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateBrandAssignmentOutput(v **UpdateBrandAssignmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -30280,15 +33285,24 @@ func awsRestjson1_deserializeOpDocumentUpdateAccountSettingsOutput(v **UpdateAcc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateAccountSettingsOutput + var sv *UpdateBrandAssignmentOutput if *v == nil { - sv = &UpdateAccountSettingsOutput{} + sv = &UpdateBrandAssignmentOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "BrandArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.BrandArn = ptr.String(jtv) + } + case "RequestId": if value != nil { jtv, ok := value.(string) @@ -30307,14 +33321,14 @@ func awsRestjson1_deserializeOpDocumentUpdateAccountSettingsOutput(v **UpdateAcc return nil } -type awsRestjson1_deserializeOpUpdateAnalysis struct { +type awsRestjson1_deserializeOpUpdateBrandPublishedVersion struct { } -func (*awsRestjson1_deserializeOpUpdateAnalysis) ID() string { +func (*awsRestjson1_deserializeOpUpdateBrandPublishedVersion) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateBrandPublishedVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -30332,16 +33346,11 @@ func (m *awsRestjson1_deserializeOpUpdateAnalysis) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateAnalysis(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateBrandPublishedVersion(response, &metadata) } - output := &UpdateAnalysisOutput{} + output := &UpdateBrandPublishedVersionOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateAnalysisOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -30360,7 +33369,7 @@ func (m *awsRestjson1_deserializeOpUpdateAnalysis) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateAnalysisOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateBrandPublishedVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -30374,7 +33383,7 @@ func (m *awsRestjson1_deserializeOpUpdateAnalysis) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateBrandPublishedVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -30415,17 +33424,17 @@ func awsRestjson1_deserializeOpErrorUpdateAnalysis(response *smithyhttp.Response } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): - return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -30433,9 +33442,6 @@ func awsRestjson1_deserializeOpErrorUpdateAnalysis(response *smithyhttp.Response case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -30446,16 +33452,7 @@ func awsRestjson1_deserializeOpErrorUpdateAnalysis(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsUpdateAnalysisOutput(v *UpdateAnalysisOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - v.Status = int32(response.StatusCode) - - return nil -} -func awsRestjson1_deserializeOpDocumentUpdateAnalysisOutput(v **UpdateAnalysisOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateBrandPublishedVersionOutput(v **UpdateBrandPublishedVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -30468,33 +33465,15 @@ func awsRestjson1_deserializeOpDocumentUpdateAnalysisOutput(v **UpdateAnalysisOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateAnalysisOutput + var sv *UpdateBrandPublishedVersionOutput if *v == nil { - sv = &UpdateAnalysisOutput{} + sv = &UpdateBrandPublishedVersionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AnalysisId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) - } - sv.AnalysisId = ptr.String(jtv) - } - - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -30504,13 +33483,13 @@ func awsRestjson1_deserializeOpDocumentUpdateAnalysisOutput(v **UpdateAnalysisOu sv.RequestId = ptr.String(jtv) } - case "UpdateStatus": + case "VersionId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) } - sv.UpdateStatus = types.ResourceStatus(jtv) + sv.VersionId = ptr.String(jtv) } default: @@ -30522,14 +33501,14 @@ func awsRestjson1_deserializeOpDocumentUpdateAnalysisOutput(v **UpdateAnalysisOu return nil } -type awsRestjson1_deserializeOpUpdateAnalysisPermissions struct { +type awsRestjson1_deserializeOpUpdateCustomPermissions struct { } -func (*awsRestjson1_deserializeOpUpdateAnalysisPermissions) ID() string { +func (*awsRestjson1_deserializeOpUpdateCustomPermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateAnalysisPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateCustomPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -30547,16 +33526,11 @@ func (m *awsRestjson1_deserializeOpUpdateAnalysisPermissions) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateAnalysisPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateCustomPermissions(response, &metadata) } - output := &UpdateAnalysisPermissionsOutput{} + output := &UpdateCustomPermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateAnalysisPermissionsOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -30575,7 +33549,7 @@ func (m *awsRestjson1_deserializeOpUpdateAnalysisPermissions) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateAnalysisPermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateCustomPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -30589,7 +33563,7 @@ func (m *awsRestjson1_deserializeOpUpdateAnalysisPermissions) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateAnalysisPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateCustomPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -30630,6 +33604,9 @@ func awsRestjson1_deserializeOpErrorUpdateAnalysisPermissions(response *smithyht } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) @@ -30639,18 +33616,18 @@ func awsRestjson1_deserializeOpErrorUpdateAnalysisPermissions(response *smithyht case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -30661,16 +33638,7 @@ func awsRestjson1_deserializeOpErrorUpdateAnalysisPermissions(response *smithyht } } -func awsRestjson1_deserializeOpHttpBindingsUpdateAnalysisPermissionsOutput(v *UpdateAnalysisPermissionsOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - v.Status = int32(response.StatusCode) - - return nil -} -func awsRestjson1_deserializeOpDocumentUpdateAnalysisPermissionsOutput(v **UpdateAnalysisPermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateCustomPermissionsOutput(v **UpdateCustomPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -30683,45 +33651,44 @@ func awsRestjson1_deserializeOpDocumentUpdateAnalysisPermissionsOutput(v **Updat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateAnalysisPermissionsOutput + var sv *UpdateCustomPermissionsOutput if *v == nil { - sv = &UpdateAnalysisPermissionsOutput{} + sv = &UpdateCustomPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AnalysisArn": + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.AnalysisArn = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } - case "AnalysisId": + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.AnalysisId = ptr.String(jtv) - } - - case "Permissions": - if err := awsRestjson1_deserializeDocumentUpdateResourcePermissionList(&sv.Permissions, value); err != nil { - return err + sv.RequestId = ptr.String(jtv) } - case "RequestId": + case "Status": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Status = int32(i64) } default: @@ -35945,9 +38912,223 @@ func awsRestjson1_deserializeOpErrorUpdateThemePermissions(response *smithyhttp. case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsUpdateThemePermissionsOutput(v *UpdateThemePermissionsOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentUpdateThemePermissionsOutput(v **UpdateThemePermissionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateThemePermissionsOutput + if *v == nil { + sv = &UpdateThemePermissionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Permissions": + if err := awsRestjson1_deserializeDocumentUpdateResourcePermissionList(&sv.Permissions, value); err != nil { + return err + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + case "ThemeArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ThemeArn = ptr.String(jtv) + } + + case "ThemeId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.ThemeId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateTopic struct { +} + +func (*awsRestjson1_deserializeOpUpdateTopic) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateTopic) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateTopic(response, &metadata) + } + output := &UpdateTopicOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsUpdateTopicOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateTopicOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateTopic(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -35958,7 +39139,7 @@ func awsRestjson1_deserializeOpErrorUpdateThemePermissions(response *smithyhttp. } } -func awsRestjson1_deserializeOpHttpBindingsUpdateThemePermissionsOutput(v *UpdateThemePermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateTopicOutput(v *UpdateTopicOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -35967,7 +39148,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateThemePermissionsOutput(v *Updat return nil } -func awsRestjson1_deserializeOpDocumentUpdateThemePermissionsOutput(v **UpdateThemePermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateTopicOutput(v **UpdateTopicOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -35980,45 +39161,49 @@ func awsRestjson1_deserializeOpDocumentUpdateThemePermissionsOutput(v **UpdateTh return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateThemePermissionsOutput + var sv *UpdateTopicOutput if *v == nil { - sv = &UpdateThemePermissionsOutput{} + sv = &UpdateTopicOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Permissions": - if err := awsRestjson1_deserializeDocumentUpdateResourcePermissionList(&sv.Permissions, value); err != nil { - return err + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) } - case "RequestId": + case "RefreshArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.RefreshArn = ptr.String(jtv) } - case "ThemeArn": + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ThemeArn = ptr.String(jtv) + sv.RequestId = ptr.String(jtv) } - case "ThemeId": + case "TopicId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected TopicId to be of type string, got %T instead", value) } - sv.ThemeId = ptr.String(jtv) + sv.TopicId = ptr.String(jtv) } default: @@ -36030,14 +39215,14 @@ func awsRestjson1_deserializeOpDocumentUpdateThemePermissionsOutput(v **UpdateTh return nil } -type awsRestjson1_deserializeOpUpdateTopic struct { +type awsRestjson1_deserializeOpUpdateTopicPermissions struct { } -func (*awsRestjson1_deserializeOpUpdateTopic) ID() string { +func (*awsRestjson1_deserializeOpUpdateTopicPermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateTopic) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateTopicPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -36055,12 +39240,12 @@ func (m *awsRestjson1_deserializeOpUpdateTopic) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateTopic(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateTopicPermissions(response, &metadata) } - output := &UpdateTopicOutput{} + output := &UpdateTopicPermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateTopicOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateTopicPermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -36083,7 +39268,7 @@ func (m *awsRestjson1_deserializeOpUpdateTopic) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateTopicOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateTopicPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -36097,7 +39282,7 @@ func (m *awsRestjson1_deserializeOpUpdateTopic) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateTopic(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateTopicPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -36153,15 +39338,15 @@ func awsRestjson1_deserializeOpErrorUpdateTopic(response *smithyhttp.Response, m case strings.EqualFold("LimitExceededException", errorCode): return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -36172,7 +39357,7 @@ func awsRestjson1_deserializeOpErrorUpdateTopic(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpHttpBindingsUpdateTopicOutput(v *UpdateTopicOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateTopicPermissionsOutput(v *UpdateTopicPermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -36181,7 +39366,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateTopicOutput(v *UpdateTopicOutpu return nil } -func awsRestjson1_deserializeOpDocumentUpdateTopicOutput(v **UpdateTopicOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateTopicPermissionsOutput(v **UpdateTopicPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36194,40 +39379,36 @@ func awsRestjson1_deserializeOpDocumentUpdateTopicOutput(v **UpdateTopicOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateTopicOutput + var sv *UpdateTopicPermissionsOutput if *v == nil { - sv = &UpdateTopicOutput{} + sv = &UpdateTopicPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) + case "Permissions": + if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { + return err } - case "RefreshArn": + case "RequestId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.RefreshArn = ptr.String(jtv) + sv.RequestId = ptr.String(jtv) } - case "RequestId": + case "TopicArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.RequestId = ptr.String(jtv) + sv.TopicArn = ptr.String(jtv) } case "TopicId": @@ -36248,14 +39429,14 @@ func awsRestjson1_deserializeOpDocumentUpdateTopicOutput(v **UpdateTopicOutput, return nil } -type awsRestjson1_deserializeOpUpdateTopicPermissions struct { +type awsRestjson1_deserializeOpUpdateTopicRefreshSchedule struct { } -func (*awsRestjson1_deserializeOpUpdateTopicPermissions) ID() string { +func (*awsRestjson1_deserializeOpUpdateTopicRefreshSchedule) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateTopicPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateTopicRefreshSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -36273,12 +39454,12 @@ func (m *awsRestjson1_deserializeOpUpdateTopicPermissions) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateTopicPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateTopicRefreshSchedule(response, &metadata) } - output := &UpdateTopicPermissionsOutput{} + output := &UpdateTopicRefreshScheduleOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateTopicPermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateTopicRefreshScheduleOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -36301,7 +39482,7 @@ func (m *awsRestjson1_deserializeOpUpdateTopicPermissions) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateTopicPermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateTopicRefreshScheduleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -36315,7 +39496,7 @@ func (m *awsRestjson1_deserializeOpUpdateTopicPermissions) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateTopicPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateTopicRefreshSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -36371,15 +39552,15 @@ func awsRestjson1_deserializeOpErrorUpdateTopicPermissions(response *smithyhttp. case strings.EqualFold("LimitExceededException", errorCode): return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -36390,7 +39571,7 @@ func awsRestjson1_deserializeOpErrorUpdateTopicPermissions(response *smithyhttp. } } -func awsRestjson1_deserializeOpHttpBindingsUpdateTopicPermissionsOutput(v *UpdateTopicPermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateTopicRefreshScheduleOutput(v *UpdateTopicRefreshScheduleOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -36399,7 +39580,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateTopicPermissionsOutput(v *Updat return nil } -func awsRestjson1_deserializeOpDocumentUpdateTopicPermissionsOutput(v **UpdateTopicPermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateTopicRefreshScheduleOutput(v **UpdateTopicRefreshScheduleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36412,18 +39593,22 @@ func awsRestjson1_deserializeOpDocumentUpdateTopicPermissionsOutput(v **UpdateTo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateTopicPermissionsOutput + var sv *UpdateTopicRefreshScheduleOutput if *v == nil { - sv = &UpdateTopicPermissionsOutput{} + sv = &UpdateTopicRefreshScheduleOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Permissions": - if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { - return err + case "DatasetArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.DatasetArn = ptr.String(jtv) } case "RequestId": @@ -36462,14 +39647,14 @@ func awsRestjson1_deserializeOpDocumentUpdateTopicPermissionsOutput(v **UpdateTo return nil } -type awsRestjson1_deserializeOpUpdateTopicRefreshSchedule struct { +type awsRestjson1_deserializeOpUpdateUser struct { } -func (*awsRestjson1_deserializeOpUpdateTopicRefreshSchedule) ID() string { +func (*awsRestjson1_deserializeOpUpdateUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateTopicRefreshSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -36487,12 +39672,12 @@ func (m *awsRestjson1_deserializeOpUpdateTopicRefreshSchedule) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateTopicRefreshSchedule(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateUser(response, &metadata) } - output := &UpdateTopicRefreshScheduleOutput{} + output := &UpdateUserOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateTopicRefreshScheduleOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateUserOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -36515,7 +39700,7 @@ func (m *awsRestjson1_deserializeOpUpdateTopicRefreshSchedule) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateTopicRefreshScheduleOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -36529,7 +39714,7 @@ func (m *awsRestjson1_deserializeOpUpdateTopicRefreshSchedule) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateTopicRefreshSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -36573,24 +39758,21 @@ func awsRestjson1_deserializeOpErrorUpdateTopicRefreshSchedule(response *smithyh case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -36604,7 +39786,7 @@ func awsRestjson1_deserializeOpErrorUpdateTopicRefreshSchedule(response *smithyh } } -func awsRestjson1_deserializeOpHttpBindingsUpdateTopicRefreshScheduleOutput(v *UpdateTopicRefreshScheduleOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateUserOutput(v *UpdateUserOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -36613,7 +39795,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateTopicRefreshScheduleOutput(v *U return nil } -func awsRestjson1_deserializeOpDocumentUpdateTopicRefreshScheduleOutput(v **UpdateTopicRefreshScheduleOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateUserOutput(v **UpdateUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36626,24 +39808,15 @@ func awsRestjson1_deserializeOpDocumentUpdateTopicRefreshScheduleOutput(v **Upda return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateTopicRefreshScheduleOutput + var sv *UpdateUserOutput if *v == nil { - sv = &UpdateTopicRefreshScheduleOutput{} + sv = &UpdateUserOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DatasetArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.DatasetArn = ptr.String(jtv) - } - case "RequestId": if value != nil { jtv, ok := value.(string) @@ -36653,22 +39826,9 @@ func awsRestjson1_deserializeOpDocumentUpdateTopicRefreshScheduleOutput(v **Upda sv.RequestId = ptr.String(jtv) } - case "TopicArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.TopicArn = ptr.String(jtv) - } - - case "TopicId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TopicId to be of type string, got %T instead", value) - } - sv.TopicId = ptr.String(jtv) + case "User": + if err := awsRestjson1_deserializeDocumentUser(&sv.User, value); err != nil { + return err } default: @@ -36680,14 +39840,14 @@ func awsRestjson1_deserializeOpDocumentUpdateTopicRefreshScheduleOutput(v **Upda return nil } -type awsRestjson1_deserializeOpUpdateUser struct { +type awsRestjson1_deserializeOpUpdateUserCustomPermission struct { } -func (*awsRestjson1_deserializeOpUpdateUser) ID() string { +func (*awsRestjson1_deserializeOpUpdateUserCustomPermission) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateUserCustomPermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -36705,12 +39865,12 @@ func (m *awsRestjson1_deserializeOpUpdateUser) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserCustomPermission(response, &metadata) } - output := &UpdateUserOutput{} + output := &UpdateUserCustomPermissionOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateUserOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUpdateUserCustomPermissionOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -36733,7 +39893,7 @@ func (m *awsRestjson1_deserializeOpUpdateUser) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateUserOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateUserCustomPermissionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -36747,7 +39907,7 @@ func (m *awsRestjson1_deserializeOpUpdateUser) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateUserCustomPermission(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -36791,6 +39951,9 @@ func awsRestjson1_deserializeOpErrorUpdateUser(response *smithyhttp.Response, me case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -36819,7 +39982,7 @@ func awsRestjson1_deserializeOpErrorUpdateUser(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpHttpBindingsUpdateUserOutput(v *UpdateUserOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsUpdateUserCustomPermissionOutput(v *UpdateUserCustomPermissionOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -36828,7 +39991,7 @@ func awsRestjson1_deserializeOpHttpBindingsUpdateUserOutput(v *UpdateUserOutput, return nil } -func awsRestjson1_deserializeOpDocumentUpdateUserOutput(v **UpdateUserOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateUserCustomPermissionOutput(v **UpdateUserCustomPermissionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36841,9 +40004,9 @@ func awsRestjson1_deserializeOpDocumentUpdateUserOutput(v **UpdateUserOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateUserOutput + var sv *UpdateUserCustomPermissionOutput if *v == nil { - sv = &UpdateUserOutput{} + sv = &UpdateUserCustomPermissionOutput{} } else { sv = *v } @@ -36859,11 +40022,6 @@ func awsRestjson1_deserializeOpDocumentUpdateUserOutput(v **UpdateUserOutput, va sv.RequestId = ptr.String(jtv) } - case "User": - if err := awsRestjson1_deserializeDocumentUser(&sv.User, value); err != nil { - return err - } - default: _, _ = key, value @@ -37352,6 +40510,42 @@ func awsRestjson1_deserializeErrorInternalFailureException(response *smithyhttp. return output } +func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + func awsRestjson1_deserializeErrorInvalidNextTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.InvalidNextTokenException{} var buff [1024]byte @@ -39356,6 +42550,47 @@ func awsRestjson1_deserializeDocumentAnonymousUserSnapshotJobResultList(v *[]typ return nil } +func awsRestjson1_deserializeDocumentApplicationTheme(v **types.ApplicationTheme, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ApplicationTheme + if *v == nil { + sv = &types.ApplicationTheme{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BrandColorPalette": + if err := awsRestjson1_deserializeDocumentBrandColorPalette(&sv.BrandColorPalette, value); err != nil { + return err + } + + case "BrandElementStyle": + if err := awsRestjson1_deserializeDocumentBrandElementStyle(&sv.BrandElementStyle, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentArcAxisConfiguration(v **types.ArcAxisConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -45902,7 +49137,277 @@ func awsRestjson1_deserializeDocumentBoxPlotDimensionFieldList(v *[]types.Dimens return nil } -func awsRestjson1_deserializeDocumentBoxPlotFieldWells(v **types.BoxPlotFieldWells, value interface{}) error { +func awsRestjson1_deserializeDocumentBoxPlotFieldWells(v **types.BoxPlotFieldWells, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BoxPlotFieldWells + if *v == nil { + sv = &types.BoxPlotFieldWells{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BoxPlotAggregatedFieldWells": + if err := awsRestjson1_deserializeDocumentBoxPlotAggregatedFieldWells(&sv.BoxPlotAggregatedFieldWells, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBoxPlotMeasureFieldList(v *[]types.MeasureField, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.MeasureField + if *v == nil { + cv = []types.MeasureField{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MeasureField + destAddr := &col + if err := awsRestjson1_deserializeDocumentMeasureField(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentBoxPlotOptions(v **types.BoxPlotOptions, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BoxPlotOptions + if *v == nil { + sv = &types.BoxPlotOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AllDataPointsVisibility": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Visibility to be of type string, got %T instead", value) + } + sv.AllDataPointsVisibility = types.Visibility(jtv) + } + + case "OutlierVisibility": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Visibility to be of type string, got %T instead", value) + } + sv.OutlierVisibility = types.Visibility(jtv) + } + + case "StyleOptions": + if err := awsRestjson1_deserializeDocumentBoxPlotStyleOptions(&sv.StyleOptions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBoxPlotSortConfiguration(v **types.BoxPlotSortConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BoxPlotSortConfiguration + if *v == nil { + sv = &types.BoxPlotSortConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CategorySort": + if err := awsRestjson1_deserializeDocumentFieldSortOptionsList(&sv.CategorySort, value); err != nil { + return err + } + + case "PaginationConfiguration": + if err := awsRestjson1_deserializeDocumentPaginationConfiguration(&sv.PaginationConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBoxPlotStyleOptions(v **types.BoxPlotStyleOptions, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BoxPlotStyleOptions + if *v == nil { + sv = &types.BoxPlotStyleOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FillStyle": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoxPlotFillStyle to be of type string, got %T instead", value) + } + sv.FillStyle = types.BoxPlotFillStyle(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBoxPlotVisual(v **types.BoxPlotVisual, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BoxPlotVisual + if *v == nil { + sv = &types.BoxPlotVisual{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Actions": + if err := awsRestjson1_deserializeDocumentVisualCustomActionList(&sv.Actions, value); err != nil { + return err + } + + case "ChartConfiguration": + if err := awsRestjson1_deserializeDocumentBoxPlotChartConfiguration(&sv.ChartConfiguration, value); err != nil { + return err + } + + case "ColumnHierarchies": + if err := awsRestjson1_deserializeDocumentColumnHierarchyList(&sv.ColumnHierarchies, value); err != nil { + return err + } + + case "Subtitle": + if err := awsRestjson1_deserializeDocumentVisualSubtitleLabelOptions(&sv.Subtitle, value); err != nil { + return err + } + + case "Title": + if err := awsRestjson1_deserializeDocumentVisualTitleLabelOptions(&sv.Title, value); err != nil { + return err + } + + case "VisualId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.VisualId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBrandColorPalette(v **types.BrandColorPalette, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -45915,64 +49420,70 @@ func awsRestjson1_deserializeDocumentBoxPlotFieldWells(v **types.BoxPlotFieldWel return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.BoxPlotFieldWells + var sv *types.BrandColorPalette if *v == nil { - sv = &types.BoxPlotFieldWells{} + sv = &types.BrandColorPalette{} } else { sv = *v } for key, value := range shape { switch key { - case "BoxPlotAggregatedFieldWells": - if err := awsRestjson1_deserializeDocumentBoxPlotAggregatedFieldWells(&sv.BoxPlotAggregatedFieldWells, value); err != nil { + case "Accent": + if err := awsRestjson1_deserializeDocumentPalette(&sv.Accent, value); err != nil { return err } - default: - _, _ = key, value + case "Danger": + if err := awsRestjson1_deserializeDocumentPalette(&sv.Danger, value); err != nil { + return err + } - } - } - *v = sv - return nil -} + case "Dimension": + if err := awsRestjson1_deserializeDocumentPalette(&sv.Dimension, value); err != nil { + return err + } -func awsRestjson1_deserializeDocumentBoxPlotMeasureFieldList(v *[]types.MeasureField, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } + case "Info": + if err := awsRestjson1_deserializeDocumentPalette(&sv.Info, value); err != nil { + return err + } - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + case "Measure": + if err := awsRestjson1_deserializeDocumentPalette(&sv.Measure, value); err != nil { + return err + } - var cv []types.MeasureField - if *v == nil { - cv = []types.MeasureField{} - } else { - cv = *v - } + case "Primary": + if err := awsRestjson1_deserializeDocumentPalette(&sv.Primary, value); err != nil { + return err + } - for _, value := range shape { - var col types.MeasureField - destAddr := &col - if err := awsRestjson1_deserializeDocumentMeasureField(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + case "Secondary": + if err := awsRestjson1_deserializeDocumentPalette(&sv.Secondary, value); err != nil { + return err + } + + case "Success": + if err := awsRestjson1_deserializeDocumentPalette(&sv.Success, value); err != nil { + return err + } + + case "Warning": + if err := awsRestjson1_deserializeDocumentPalette(&sv.Warning, value); err != nil { + return err + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentBoxPlotOptions(v **types.BoxPlotOptions, value interface{}) error { +func awsRestjson1_deserializeDocumentBrandDefinition(v **types.BrandDefinition, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -45985,35 +49496,40 @@ func awsRestjson1_deserializeDocumentBoxPlotOptions(v **types.BoxPlotOptions, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.BoxPlotOptions + var sv *types.BrandDefinition if *v == nil { - sv = &types.BoxPlotOptions{} + sv = &types.BrandDefinition{} } else { sv = *v } for key, value := range shape { switch key { - case "AllDataPointsVisibility": + case "ApplicationTheme": + if err := awsRestjson1_deserializeDocumentApplicationTheme(&sv.ApplicationTheme, value); err != nil { + return err + } + + case "BrandName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Visibility to be of type string, got %T instead", value) + return fmt.Errorf("expected Name to be of type string, got %T instead", value) } - sv.AllDataPointsVisibility = types.Visibility(jtv) + sv.BrandName = ptr.String(jtv) } - case "OutlierVisibility": + case "Description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Visibility to be of type string, got %T instead", value) + return fmt.Errorf("expected Description to be of type string, got %T instead", value) } - sv.OutlierVisibility = types.Visibility(jtv) + sv.Description = ptr.String(jtv) } - case "StyleOptions": - if err := awsRestjson1_deserializeDocumentBoxPlotStyleOptions(&sv.StyleOptions, value); err != nil { + case "LogoConfiguration": + if err := awsRestjson1_deserializeDocumentLogoConfiguration(&sv.LogoConfiguration, value); err != nil { return err } @@ -46026,7 +49542,7 @@ func awsRestjson1_deserializeDocumentBoxPlotOptions(v **types.BoxPlotOptions, va return nil } -func awsRestjson1_deserializeDocumentBoxPlotSortConfiguration(v **types.BoxPlotSortConfiguration, value interface{}) error { +func awsRestjson1_deserializeDocumentBrandDetail(v **types.BrandDetail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -46039,25 +49555,102 @@ func awsRestjson1_deserializeDocumentBoxPlotSortConfiguration(v **types.BoxPlotS return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.BoxPlotSortConfiguration + var sv *types.BrandDetail if *v == nil { - sv = &types.BoxPlotSortConfiguration{} + sv = &types.BrandDetail{} } else { sv = *v } for key, value := range shape { switch key { - case "CategorySort": - if err := awsRestjson1_deserializeDocumentFieldSortOptionsList(&sv.CategorySort, value); err != nil { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "BrandId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.BrandId = ptr.String(jtv) + } + + case "BrandStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BrandStatus to be of type string, got %T instead", value) + } + sv.BrandStatus = types.BrandStatus(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Errors": + if err := awsRestjson1_deserializeDocumentErrorList(&sv.Errors, value); err != nil { return err } - case "PaginationConfiguration": - if err := awsRestjson1_deserializeDocumentPaginationConfiguration(&sv.PaginationConfiguration, value); err != nil { + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Logo": + if err := awsRestjson1_deserializeDocumentLogo(&sv.Logo, value); err != nil { return err } + case "VersionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.VersionId = ptr.String(jtv) + } + + case "VersionStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BrandVersionStatus to be of type string, got %T instead", value) + } + sv.VersionStatus = types.BrandVersionStatus(jtv) + } + default: _, _ = key, value @@ -46067,7 +49660,7 @@ func awsRestjson1_deserializeDocumentBoxPlotSortConfiguration(v **types.BoxPlotS return nil } -func awsRestjson1_deserializeDocumentBoxPlotStyleOptions(v **types.BoxPlotStyleOptions, value interface{}) error { +func awsRestjson1_deserializeDocumentBrandElementStyle(v **types.BrandElementStyle, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -46080,22 +49673,18 @@ func awsRestjson1_deserializeDocumentBoxPlotStyleOptions(v **types.BoxPlotStyleO return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.BoxPlotStyleOptions + var sv *types.BrandElementStyle if *v == nil { - sv = &types.BoxPlotStyleOptions{} + sv = &types.BrandElementStyle{} } else { sv = *v } for key, value := range shape { switch key { - case "FillStyle": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected BoxPlotFillStyle to be of type string, got %T instead", value) - } - sv.FillStyle = types.BoxPlotFillStyle(jtv) + case "NavbarStyle": + if err := awsRestjson1_deserializeDocumentNavbarStyle(&sv.NavbarStyle, value); err != nil { + return err } default: @@ -46107,7 +49696,7 @@ func awsRestjson1_deserializeDocumentBoxPlotStyleOptions(v **types.BoxPlotStyleO return nil } -func awsRestjson1_deserializeDocumentBoxPlotVisual(v **types.BoxPlotVisual, value interface{}) error { +func awsRestjson1_deserializeDocumentBrandSummary(v **types.BrandSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -46120,47 +49709,90 @@ func awsRestjson1_deserializeDocumentBoxPlotVisual(v **types.BoxPlotVisual, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.BoxPlotVisual + var sv *types.BrandSummary if *v == nil { - sv = &types.BoxPlotVisual{} + sv = &types.BrandSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "Actions": - if err := awsRestjson1_deserializeDocumentVisualCustomActionList(&sv.Actions, value); err != nil { - return err + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) } - case "ChartConfiguration": - if err := awsRestjson1_deserializeDocumentBoxPlotChartConfiguration(&sv.ChartConfiguration, value); err != nil { - return err + case "BrandId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.BrandId = ptr.String(jtv) } - case "ColumnHierarchies": - if err := awsRestjson1_deserializeDocumentColumnHierarchyList(&sv.ColumnHierarchies, value); err != nil { - return err + case "BrandName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.BrandName = ptr.String(jtv) } - case "Subtitle": - if err := awsRestjson1_deserializeDocumentVisualSubtitleLabelOptions(&sv.Subtitle, value); err != nil { - return err + case "BrandStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BrandStatus to be of type string, got %T instead", value) + } + sv.BrandStatus = types.BrandStatus(jtv) } - case "Title": - if err := awsRestjson1_deserializeDocumentVisualTitleLabelOptions(&sv.Title, value); err != nil { - return err + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } } - case "VisualId": + case "Description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + } - sv.VisualId = ptr.String(jtv) } default: @@ -46172,6 +49804,40 @@ func awsRestjson1_deserializeDocumentBoxPlotVisual(v **types.BoxPlotVisual, valu return nil } +func awsRestjson1_deserializeDocumentBrandSummaryList(v *[]types.BrandSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.BrandSummary + if *v == nil { + cv = []types.BrandSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BrandSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentBrandSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentCalculatedColumn(v **types.CalculatedColumn, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -46439,6 +50105,190 @@ func awsRestjson1_deserializeDocumentCalculatedMeasureField(v **types.Calculated return nil } +func awsRestjson1_deserializeDocumentCapabilities(v **types.Capabilities, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Capabilities + if *v == nil { + sv = &types.Capabilities{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AddOrRunAnomalyDetectionForAnalyses": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapabilityState to be of type string, got %T instead", value) + } + sv.AddOrRunAnomalyDetectionForAnalyses = types.CapabilityState(jtv) + } + + case "CreateAndUpdateDashboardEmailReports": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapabilityState to be of type string, got %T instead", value) + } + sv.CreateAndUpdateDashboardEmailReports = types.CapabilityState(jtv) + } + + case "CreateAndUpdateDatasets": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapabilityState to be of type string, got %T instead", value) + } + sv.CreateAndUpdateDatasets = types.CapabilityState(jtv) + } + + case "CreateAndUpdateDataSources": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapabilityState to be of type string, got %T instead", value) + } + sv.CreateAndUpdateDataSources = types.CapabilityState(jtv) + } + + case "CreateAndUpdateThemes": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapabilityState to be of type string, got %T instead", value) + } + sv.CreateAndUpdateThemes = types.CapabilityState(jtv) + } + + case "CreateAndUpdateThresholdAlerts": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapabilityState to be of type string, got %T instead", value) + } + sv.CreateAndUpdateThresholdAlerts = types.CapabilityState(jtv) + } + + case "CreateSharedFolders": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapabilityState to be of type string, got %T instead", value) + } + sv.CreateSharedFolders = types.CapabilityState(jtv) + } + + case "CreateSPICEDataset": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapabilityState to be of type string, got %T instead", value) + } + sv.CreateSPICEDataset = types.CapabilityState(jtv) + } + + case "ExportToCsv": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapabilityState to be of type string, got %T instead", value) + } + sv.ExportToCsv = types.CapabilityState(jtv) + } + + case "ExportToExcel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapabilityState to be of type string, got %T instead", value) + } + sv.ExportToExcel = types.CapabilityState(jtv) + } + + case "RenameSharedFolders": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapabilityState to be of type string, got %T instead", value) + } + sv.RenameSharedFolders = types.CapabilityState(jtv) + } + + case "ShareAnalyses": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapabilityState to be of type string, got %T instead", value) + } + sv.ShareAnalyses = types.CapabilityState(jtv) + } + + case "ShareDashboards": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapabilityState to be of type string, got %T instead", value) + } + sv.ShareDashboards = types.CapabilityState(jtv) + } + + case "ShareDatasets": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapabilityState to be of type string, got %T instead", value) + } + sv.ShareDatasets = types.CapabilityState(jtv) + } + + case "ShareDataSources": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapabilityState to be of type string, got %T instead", value) + } + sv.ShareDataSources = types.CapabilityState(jtv) + } + + case "SubscribeDashboardEmailReports": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapabilityState to be of type string, got %T instead", value) + } + sv.SubscribeDashboardEmailReports = types.CapabilityState(jtv) + } + + case "ViewAccountSPICECapacity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapabilityState to be of type string, got %T instead", value) + } + sv.ViewAccountSPICECapacity = types.CapabilityState(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentCascadingControlConfiguration(v **types.CascadingControlConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -50540,6 +54390,94 @@ func awsRestjson1_deserializeDocumentCustomParameterValues(v **types.CustomParam return nil } +func awsRestjson1_deserializeDocumentCustomPermissions(v **types.CustomPermissions, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CustomPermissions + if *v == nil { + sv = &types.CustomPermissions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "Capabilities": + if err := awsRestjson1_deserializeDocumentCapabilities(&sv.Capabilities, value); err != nil { + return err + } + + case "CustomPermissionsName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CustomPermissionsName to be of type string, got %T instead", value) + } + sv.CustomPermissionsName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCustomPermissionsList(v *[]types.CustomPermissions, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.CustomPermissions + if *v == nil { + cv = []types.CustomPermissions{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CustomPermissions + destAddr := &col + if err := awsRestjson1_deserializeDocumentCustomPermissions(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentCustomSql(v **types.CustomSql, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -56927,6 +60865,42 @@ func awsRestjson1_deserializeDocumentErrorInfo(v **types.ErrorInfo, value interf return nil } +func awsRestjson1_deserializeDocumentErrorList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentExasolParameters(v **types.ExasolParameters, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -64624,6 +68598,223 @@ func awsRestjson1_deserializeDocumentIdentityTypeNotSupportedException(v **types return nil } +func awsRestjson1_deserializeDocumentImage(v **types.Image, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Image + if *v == nil { + sv = &types.Image{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "GeneratedImageUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.GeneratedImageUrl = ptr.String(jtv) + } + + case "Source": + if err := awsRestjson1_deserializeDocumentImageSource(&sv.Source, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentImageConfiguration(v **types.ImageConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ImageConfiguration + if *v == nil { + sv = &types.ImageConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Source": + if err := awsRestjson1_deserializeDocumentImageSource(&sv.Source, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentImageSet(v **types.ImageSet, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ImageSet + if *v == nil { + sv = &types.ImageSet{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Height32": + if err := awsRestjson1_deserializeDocumentImage(&sv.Height32, value); err != nil { + return err + } + + case "Height64": + if err := awsRestjson1_deserializeDocumentImage(&sv.Height64, value); err != nil { + return err + } + + case "Original": + if err := awsRestjson1_deserializeDocumentImage(&sv.Original, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentImageSetConfiguration(v **types.ImageSetConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ImageSetConfiguration + if *v == nil { + sv = &types.ImageSetConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Original": + if err := awsRestjson1_deserializeDocumentImageConfiguration(&sv.Original, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentImageSource(v *types.ImageSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var uv types.ImageSource +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "PublicUrl": + var mv string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + mv = jtv + } + uv = &types.ImageSourceMemberPublicUrl{Value: mv} + break loop + + case "S3Uri": + var mv string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + mv = jtv + } + uv = &types.ImageSourceMemberS3Uri{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + func awsRestjson1_deserializeDocumentIncrementalRefresh(v **types.IncrementalRefresh, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -65535,6 +69726,46 @@ func awsRestjson1_deserializeDocumentInternalFailureException(v **types.Internal return nil } +func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InternalServerException + if *v == nil { + sv = &types.InternalServerException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentInvalidNextTokenException(v **types.InvalidNextTokenException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -67828,7 +72059,87 @@ func awsRestjson1_deserializeDocumentListControlSearchOptions(v **types.ListCont return nil } -func awsRestjson1_deserializeDocumentListControlSelectAllOptions(v **types.ListControlSelectAllOptions, value interface{}) error { +func awsRestjson1_deserializeDocumentListControlSelectAllOptions(v **types.ListControlSelectAllOptions, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ListControlSelectAllOptions + if *v == nil { + sv = &types.ListControlSelectAllOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Visibility": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Visibility to be of type string, got %T instead", value) + } + sv.Visibility = types.Visibility(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLoadingAnimation(v **types.LoadingAnimation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LoadingAnimation + if *v == nil { + sv = &types.LoadingAnimation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Visibility": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Visibility to be of type string, got %T instead", value) + } + sv.Visibility = types.Visibility(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLocalNavigationConfiguration(v **types.LocalNavigationConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -67841,22 +72152,22 @@ func awsRestjson1_deserializeDocumentListControlSelectAllOptions(v **types.ListC return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ListControlSelectAllOptions + var sv *types.LocalNavigationConfiguration if *v == nil { - sv = &types.ListControlSelectAllOptions{} + sv = &types.LocalNavigationConfiguration{} } else { sv = *v } for key, value := range shape { switch key { - case "Visibility": + case "TargetSheetId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Visibility to be of type string, got %T instead", value) + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) } - sv.Visibility = types.Visibility(jtv) + sv.TargetSheetId = ptr.String(jtv) } default: @@ -67868,7 +72179,7 @@ func awsRestjson1_deserializeDocumentListControlSelectAllOptions(v **types.ListC return nil } -func awsRestjson1_deserializeDocumentLoadingAnimation(v **types.LoadingAnimation, value interface{}) error { +func awsRestjson1_deserializeDocumentLogicalTable(v **types.LogicalTable, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -67881,22 +72192,32 @@ func awsRestjson1_deserializeDocumentLoadingAnimation(v **types.LoadingAnimation return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LoadingAnimation + var sv *types.LogicalTable if *v == nil { - sv = &types.LoadingAnimation{} + sv = &types.LogicalTable{} } else { sv = *v } for key, value := range shape { switch key { - case "Visibility": + case "Alias": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Visibility to be of type string, got %T instead", value) + return fmt.Errorf("expected LogicalTableAlias to be of type string, got %T instead", value) } - sv.Visibility = types.Visibility(jtv) + sv.Alias = ptr.String(jtv) + } + + case "DataTransforms": + if err := awsRestjson1_deserializeDocumentTransformOperationList(&sv.DataTransforms, value); err != nil { + return err + } + + case "Source": + if err := awsRestjson1_deserializeDocumentLogicalTableSource(&sv.Source, value); err != nil { + return err } default: @@ -67908,7 +72229,7 @@ func awsRestjson1_deserializeDocumentLoadingAnimation(v **types.LoadingAnimation return nil } -func awsRestjson1_deserializeDocumentLocalNavigationConfiguration(v **types.LocalNavigationConfiguration, value interface{}) error { +func awsRestjson1_deserializeDocumentLogicalTableMap(v *map[string]types.LogicalTable, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -67921,22 +72242,71 @@ func awsRestjson1_deserializeDocumentLocalNavigationConfiguration(v **types.Loca return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LocalNavigationConfiguration + var mv map[string]types.LogicalTable if *v == nil { - sv = &types.LocalNavigationConfiguration{} + mv = map[string]types.LogicalTable{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.LogicalTable + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentLogicalTable(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentLogicalTableSource(v **types.LogicalTableSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LogicalTableSource + if *v == nil { + sv = &types.LogicalTableSource{} } else { sv = *v } for key, value := range shape { switch key { - case "TargetSheetId": + case "DataSetArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.TargetSheetId = ptr.String(jtv) + sv.DataSetArn = ptr.String(jtv) + } + + case "JoinInstruction": + if err := awsRestjson1_deserializeDocumentJoinInstruction(&sv.JoinInstruction, value); err != nil { + return err + } + + case "PhysicalTableId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PhysicalTableId to be of type string, got %T instead", value) + } + sv.PhysicalTableId = ptr.String(jtv) } default: @@ -67948,7 +72318,7 @@ func awsRestjson1_deserializeDocumentLocalNavigationConfiguration(v **types.Loca return nil } -func awsRestjson1_deserializeDocumentLogicalTable(v **types.LogicalTable, value interface{}) error { +func awsRestjson1_deserializeDocumentLogo(v **types.Logo, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -67961,31 +72331,71 @@ func awsRestjson1_deserializeDocumentLogicalTable(v **types.LogicalTable, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LogicalTable + var sv *types.Logo if *v == nil { - sv = &types.LogicalTable{} + sv = &types.Logo{} } else { sv = *v } for key, value := range shape { switch key { - case "Alias": + case "AltText": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected LogicalTableAlias to be of type string, got %T instead", value) + return fmt.Errorf("expected AltText to be of type string, got %T instead", value) } - sv.Alias = ptr.String(jtv) + sv.AltText = ptr.String(jtv) } - case "DataTransforms": - if err := awsRestjson1_deserializeDocumentTransformOperationList(&sv.DataTransforms, value); err != nil { + case "LogoSet": + if err := awsRestjson1_deserializeDocumentLogoSet(&sv.LogoSet, value); err != nil { return err } - case "Source": - if err := awsRestjson1_deserializeDocumentLogicalTableSource(&sv.Source, value); err != nil { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLogoConfiguration(v **types.LogoConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LogoConfiguration + if *v == nil { + sv = &types.LogoConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AltText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AltText = ptr.String(jtv) + } + + case "LogoSet": + if err := awsRestjson1_deserializeDocumentLogoSetConfiguration(&sv.LogoSet, value); err != nil { return err } @@ -67998,7 +72408,7 @@ func awsRestjson1_deserializeDocumentLogicalTable(v **types.LogicalTable, value return nil } -func awsRestjson1_deserializeDocumentLogicalTableMap(v *map[string]types.LogicalTable, value interface{}) error { +func awsRestjson1_deserializeDocumentLogoSet(v **types.LogoSet, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -68011,29 +72421,35 @@ func awsRestjson1_deserializeDocumentLogicalTableMap(v *map[string]types.Logical return fmt.Errorf("unexpected JSON type %v", value) } - var mv map[string]types.LogicalTable + var sv *types.LogoSet if *v == nil { - mv = map[string]types.LogicalTable{} + sv = &types.LogoSet{} } else { - mv = *v + sv = *v } for key, value := range shape { - var parsedVal types.LogicalTable - mapVar := parsedVal - destAddr := &mapVar - if err := awsRestjson1_deserializeDocumentLogicalTable(&destAddr, value); err != nil { - return err - } - parsedVal = *destAddr - mv[key] = parsedVal + switch key { + case "Favicon": + if err := awsRestjson1_deserializeDocumentImageSet(&sv.Favicon, value); err != nil { + return err + } + + case "Primary": + if err := awsRestjson1_deserializeDocumentImageSet(&sv.Primary, value); err != nil { + return err + } + + default: + _, _ = key, value + } } - *v = mv + *v = sv return nil } -func awsRestjson1_deserializeDocumentLogicalTableSource(v **types.LogicalTableSource, value interface{}) error { +func awsRestjson1_deserializeDocumentLogoSetConfiguration(v **types.LogoSetConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -68046,36 +72462,23 @@ func awsRestjson1_deserializeDocumentLogicalTableSource(v **types.LogicalTableSo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LogicalTableSource + var sv *types.LogoSetConfiguration if *v == nil { - sv = &types.LogicalTableSource{} + sv = &types.LogoSetConfiguration{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSetArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.DataSetArn = ptr.String(jtv) - } - - case "JoinInstruction": - if err := awsRestjson1_deserializeDocumentJoinInstruction(&sv.JoinInstruction, value); err != nil { + case "Favicon": + if err := awsRestjson1_deserializeDocumentImageSetConfiguration(&sv.Favicon, value); err != nil { return err } - case "PhysicalTableId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PhysicalTableId to be of type string, got %T instead", value) - } - sv.PhysicalTableId = ptr.String(jtv) + case "Primary": + if err := awsRestjson1_deserializeDocumentImageSetConfiguration(&sv.Primary, value); err != nil { + return err } default: @@ -69269,6 +73672,47 @@ func awsRestjson1_deserializeDocumentNamespaces(v *[]types.NamespaceInfoV2, valu return nil } +func awsRestjson1_deserializeDocumentNavbarStyle(v **types.NavbarStyle, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.NavbarStyle + if *v == nil { + sv = &types.NavbarStyle{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContextualNavbar": + if err := awsRestjson1_deserializeDocumentPalette(&sv.ContextualNavbar, value); err != nil { + return err + } + + case "GlobalNavbar": + if err := awsRestjson1_deserializeDocumentPalette(&sv.GlobalNavbar, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentNegativeFormat(v **types.NegativeFormat, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -70800,6 +75244,55 @@ func awsRestjson1_deserializeDocumentPaginationConfiguration(v **types.Paginatio return nil } +func awsRestjson1_deserializeDocumentPalette(v **types.Palette, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Palette + if *v == nil { + sv = &types.Palette{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Background": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HexColor to be of type string, got %T instead", value) + } + sv.Background = ptr.String(jtv) + } + + case "Foreground": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HexColor to be of type string, got %T instead", value) + } + sv.Foreground = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentPanelConfiguration(v **types.PanelConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/quicksight/generated.json b/service/quicksight/generated.json index fe2ab12c70f..ae1010a3228 100644 --- a/service/quicksight/generated.json +++ b/service/quicksight/generated.json @@ -14,6 +14,8 @@ "api_op_CreateAccountCustomization.go", "api_op_CreateAccountSubscription.go", "api_op_CreateAnalysis.go", + "api_op_CreateBrand.go", + "api_op_CreateCustomPermissions.go", "api_op_CreateDashboard.go", "api_op_CreateDataSet.go", "api_op_CreateDataSource.go", @@ -36,6 +38,9 @@ "api_op_DeleteAccountCustomization.go", "api_op_DeleteAccountSubscription.go", "api_op_DeleteAnalysis.go", + "api_op_DeleteBrand.go", + "api_op_DeleteBrandAssignment.go", + "api_op_DeleteCustomPermissions.go", "api_op_DeleteDashboard.go", "api_op_DeleteDataSet.go", "api_op_DeleteDataSetRefreshProperties.go", @@ -58,6 +63,7 @@ "api_op_DeleteTopicRefreshSchedule.go", "api_op_DeleteUser.go", "api_op_DeleteUserByPrincipalId.go", + "api_op_DeleteUserCustomPermission.go", "api_op_DeleteVPCConnection.go", "api_op_DescribeAccountCustomization.go", "api_op_DescribeAccountSettings.go", @@ -67,6 +73,10 @@ "api_op_DescribeAnalysisPermissions.go", "api_op_DescribeAssetBundleExportJob.go", "api_op_DescribeAssetBundleImportJob.go", + "api_op_DescribeBrand.go", + "api_op_DescribeBrandAssignment.go", + "api_op_DescribeBrandPublishedVersion.go", + "api_op_DescribeCustomPermissions.go", "api_op_DescribeDashboard.go", "api_op_DescribeDashboardDefinition.go", "api_op_DescribeDashboardPermissions.go", @@ -110,6 +120,8 @@ "api_op_ListAnalyses.go", "api_op_ListAssetBundleExportJobs.go", "api_op_ListAssetBundleImportJobs.go", + "api_op_ListBrands.go", + "api_op_ListCustomPermissions.go", "api_op_ListDashboardVersions.go", "api_op_ListDashboards.go", "api_op_ListDataSets.go", @@ -158,6 +170,10 @@ "api_op_UpdateAccountSettings.go", "api_op_UpdateAnalysis.go", "api_op_UpdateAnalysisPermissions.go", + "api_op_UpdateBrand.go", + "api_op_UpdateBrandAssignment.go", + "api_op_UpdateBrandPublishedVersion.go", + "api_op_UpdateCustomPermissions.go", "api_op_UpdateDashboard.go", "api_op_UpdateDashboardLinks.go", "api_op_UpdateDashboardPermissions.go", @@ -188,6 +204,7 @@ "api_op_UpdateTopicPermissions.go", "api_op_UpdateTopicRefreshSchedule.go", "api_op_UpdateUser.go", + "api_op_UpdateUserCustomPermission.go", "api_op_UpdateVPCConnection.go", "auth.go", "deserializers.go", diff --git a/service/quicksight/serializers.go b/service/quicksight/serializers.go index 613d635868e..a583248cc9e 100644 --- a/service/quicksight/serializers.go +++ b/service/quicksight/serializers.go @@ -772,6 +772,226 @@ func awsRestjson1_serializeOpDocumentCreateAnalysisInput(v *CreateAnalysisInput, return nil } +type awsRestjson1_serializeOpCreateBrand struct { +} + +func (*awsRestjson1_serializeOpCreateBrand) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateBrand) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateBrandInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/brands/{BrandId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateBrandInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateBrandInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateBrandInput(v *CreateBrandInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.BrandId == nil || len(*v.BrandId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BrandId must not be empty")} + } + if v.BrandId != nil { + if err := encoder.SetURI("BrandId").String(*v.BrandId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateBrandInput(v *CreateBrandInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BrandDefinition != nil { + ok := object.Key("BrandDefinition") + if err := awsRestjson1_serializeDocumentBrandDefinition(v.BrandDefinition, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateCustomPermissions struct { +} + +func (*awsRestjson1_serializeOpCreateCustomPermissions) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateCustomPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateCustomPermissionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/custom-permissions") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateCustomPermissionsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateCustomPermissionsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateCustomPermissionsInput(v *CreateCustomPermissionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateCustomPermissionsInput(v *CreateCustomPermissionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Capabilities != nil { + ok := object.Key("Capabilities") + if err := awsRestjson1_serializeDocumentCapabilities(v.Capabilities, ok); err != nil { + return err + } + } + + if v.CustomPermissionsName != nil { + ok := object.Key("CustomPermissionsName") + ok.String(*v.CustomPermissionsName) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateDashboard struct { } @@ -3363,14 +3583,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteAnalysisInput(v *DeleteAnalysisIn return nil } -type awsRestjson1_serializeOpDeleteDashboard struct { +type awsRestjson1_serializeOpDeleteBrand struct { } -func (*awsRestjson1_serializeOpDeleteDashboard) ID() string { +func (*awsRestjson1_serializeOpDeleteBrand) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteDashboard) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeleteBrand) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3382,13 +3602,13 @@ func (m *awsRestjson1_serializeOpDeleteDashboard) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteDashboardInput) + input, ok := in.Parameters.(*DeleteBrandInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/brands/{BrandId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -3404,7 +3624,7 @@ func (m *awsRestjson1_serializeOpDeleteDashboard) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteDashboardInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDeleteBrandInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3417,7 +3637,7 @@ func (m *awsRestjson1_serializeOpDeleteDashboard) HandleSerialize(ctx context.Co span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteDashboardInput(v *DeleteDashboardInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeleteBrandInput(v *DeleteBrandInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -3431,30 +3651,26 @@ func awsRestjson1_serializeOpHttpBindingsDeleteDashboardInput(v *DeleteDashboard } } - if v.DashboardId == nil || len(*v.DashboardId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DashboardId must not be empty")} + if v.BrandId == nil || len(*v.BrandId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BrandId must not be empty")} } - if v.DashboardId != nil { - if err := encoder.SetURI("DashboardId").String(*v.DashboardId); err != nil { + if v.BrandId != nil { + if err := encoder.SetURI("BrandId").String(*v.BrandId); err != nil { return err } } - if v.VersionNumber != nil { - encoder.SetQuery("version-number").Long(*v.VersionNumber) - } - return nil } -type awsRestjson1_serializeOpDeleteDataSet struct { +type awsRestjson1_serializeOpDeleteBrandAssignment struct { } -func (*awsRestjson1_serializeOpDeleteDataSet) ID() string { +func (*awsRestjson1_serializeOpDeleteBrandAssignment) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteDataSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeleteBrandAssignment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3466,13 +3682,13 @@ func (m *awsRestjson1_serializeOpDeleteDataSet) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteDataSetInput) + input, ok := in.Parameters.(*DeleteBrandAssignmentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/brandassignments") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -3488,7 +3704,7 @@ func (m *awsRestjson1_serializeOpDeleteDataSet) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteDataSetInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDeleteBrandAssignmentInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3501,7 +3717,7 @@ func (m *awsRestjson1_serializeOpDeleteDataSet) HandleSerialize(ctx context.Cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteDataSetInput(v *DeleteDataSetInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeleteBrandAssignmentInput(v *DeleteBrandAssignmentInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -3515,26 +3731,17 @@ func awsRestjson1_serializeOpHttpBindingsDeleteDataSetInput(v *DeleteDataSetInpu } } - if v.DataSetId == nil || len(*v.DataSetId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} - } - if v.DataSetId != nil { - if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { - return err - } - } - return nil } -type awsRestjson1_serializeOpDeleteDataSetRefreshProperties struct { +type awsRestjson1_serializeOpDeleteCustomPermissions struct { } -func (*awsRestjson1_serializeOpDeleteDataSetRefreshProperties) ID() string { +func (*awsRestjson1_serializeOpDeleteCustomPermissions) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteDataSetRefreshProperties) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeleteCustomPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3546,13 +3753,13 @@ func (m *awsRestjson1_serializeOpDeleteDataSetRefreshProperties) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteDataSetRefreshPropertiesInput) + input, ok := in.Parameters.(*DeleteCustomPermissionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/refresh-properties") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/custom-permissions/{CustomPermissionsName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -3568,7 +3775,7 @@ func (m *awsRestjson1_serializeOpDeleteDataSetRefreshProperties) HandleSerialize return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteDataSetRefreshPropertiesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDeleteCustomPermissionsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3581,7 +3788,7 @@ func (m *awsRestjson1_serializeOpDeleteDataSetRefreshProperties) HandleSerialize span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteDataSetRefreshPropertiesInput(v *DeleteDataSetRefreshPropertiesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeleteCustomPermissionsInput(v *DeleteCustomPermissionsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -3595,11 +3802,11 @@ func awsRestjson1_serializeOpHttpBindingsDeleteDataSetRefreshPropertiesInput(v * } } - if v.DataSetId == nil || len(*v.DataSetId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} + if v.CustomPermissionsName == nil || len(*v.CustomPermissionsName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CustomPermissionsName must not be empty")} } - if v.DataSetId != nil { - if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { + if v.CustomPermissionsName != nil { + if err := encoder.SetURI("CustomPermissionsName").String(*v.CustomPermissionsName); err != nil { return err } } @@ -3607,14 +3814,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteDataSetRefreshPropertiesInput(v * return nil } -type awsRestjson1_serializeOpDeleteDataSource struct { +type awsRestjson1_serializeOpDeleteDashboard struct { } -func (*awsRestjson1_serializeOpDeleteDataSource) ID() string { +func (*awsRestjson1_serializeOpDeleteDashboard) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteDataSource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeleteDashboard) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3626,13 +3833,13 @@ func (m *awsRestjson1_serializeOpDeleteDataSource) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteDataSourceInput) + input, ok := in.Parameters.(*DeleteDashboardInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sources/{DataSourceId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -3648,7 +3855,7 @@ func (m *awsRestjson1_serializeOpDeleteDataSource) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteDataSourceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDeleteDashboardInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3661,7 +3868,7 @@ func (m *awsRestjson1_serializeOpDeleteDataSource) HandleSerialize(ctx context.C span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteDataSourceInput(v *DeleteDataSourceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeleteDashboardInput(v *DeleteDashboardInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -3675,12 +3882,256 @@ func awsRestjson1_serializeOpHttpBindingsDeleteDataSourceInput(v *DeleteDataSour } } - if v.DataSourceId == nil || len(*v.DataSourceId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DataSourceId must not be empty")} + if v.DashboardId == nil || len(*v.DashboardId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DashboardId must not be empty")} } - if v.DataSourceId != nil { - if err := encoder.SetURI("DataSourceId").String(*v.DataSourceId); err != nil { - return err + if v.DashboardId != nil { + if err := encoder.SetURI("DashboardId").String(*v.DashboardId); err != nil { + return err + } + } + + if v.VersionNumber != nil { + encoder.SetQuery("version-number").Long(*v.VersionNumber) + } + + return nil +} + +type awsRestjson1_serializeOpDeleteDataSet struct { +} + +func (*awsRestjson1_serializeOpDeleteDataSet) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteDataSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteDataSetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteDataSetInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteDataSetInput(v *DeleteDataSetInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.DataSetId == nil || len(*v.DataSetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} + } + if v.DataSetId != nil { + if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteDataSetRefreshProperties struct { +} + +func (*awsRestjson1_serializeOpDeleteDataSetRefreshProperties) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteDataSetRefreshProperties) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteDataSetRefreshPropertiesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/refresh-properties") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteDataSetRefreshPropertiesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteDataSetRefreshPropertiesInput(v *DeleteDataSetRefreshPropertiesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.DataSetId == nil || len(*v.DataSetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} + } + if v.DataSetId != nil { + if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteDataSource struct { +} + +func (*awsRestjson1_serializeOpDeleteDataSource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteDataSource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteDataSourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sources/{DataSourceId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteDataSourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteDataSourceInput(v *DeleteDataSourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.DataSourceId == nil || len(*v.DataSourceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DataSourceId must not be empty")} + } + if v.DataSourceId != nil { + if err := encoder.SetURI("DataSourceId").String(*v.DataSourceId); err != nil { + return err } } @@ -5270,14 +5721,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteUserByPrincipalIdInput(v *DeleteU return nil } -type awsRestjson1_serializeOpDeleteVPCConnection struct { +type awsRestjson1_serializeOpDeleteUserCustomPermission struct { } -func (*awsRestjson1_serializeOpDeleteVPCConnection) ID() string { +func (*awsRestjson1_serializeOpDeleteUserCustomPermission) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteVPCConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeleteUserCustomPermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -5289,13 +5740,13 @@ func (m *awsRestjson1_serializeOpDeleteVPCConnection) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteVPCConnectionInput) + input, ok := in.Parameters.(*DeleteUserCustomPermissionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/vpc-connections/{VPCConnectionId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/users/{UserName}/custom-permission") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -5311,7 +5762,7 @@ func (m *awsRestjson1_serializeOpDeleteVPCConnection) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteVPCConnectionInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDeleteUserCustomPermissionInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -5324,7 +5775,7 @@ func (m *awsRestjson1_serializeOpDeleteVPCConnection) HandleSerialize(ctx contex span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteVPCConnectionInput(v *DeleteVPCConnectionInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeleteUserCustomPermissionInput(v *DeleteUserCustomPermissionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -5338,8 +5789,97 @@ func awsRestjson1_serializeOpHttpBindingsDeleteVPCConnectionInput(v *DeleteVPCCo } } - if v.VPCConnectionId == nil || len(*v.VPCConnectionId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VPCConnectionId must not be empty")} + if v.Namespace == nil || len(*v.Namespace) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} + } + if v.Namespace != nil { + if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { + return err + } + } + + if v.UserName == nil || len(*v.UserName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member UserName must not be empty")} + } + if v.UserName != nil { + if err := encoder.SetURI("UserName").String(*v.UserName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteVPCConnection struct { +} + +func (*awsRestjson1_serializeOpDeleteVPCConnection) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteVPCConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteVPCConnectionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/vpc-connections/{VPCConnectionId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteVPCConnectionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteVPCConnectionInput(v *DeleteVPCConnectionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.VPCConnectionId == nil || len(*v.VPCConnectionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member VPCConnectionId must not be empty")} } if v.VPCConnectionId != nil { if err := encoder.SetURI("VPCConnectionId").String(*v.VPCConnectionId); err != nil { @@ -5971,14 +6511,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeAssetBundleImportJobInput(v *De return nil } -type awsRestjson1_serializeOpDescribeDashboard struct { +type awsRestjson1_serializeOpDescribeBrand struct { } -func (*awsRestjson1_serializeOpDescribeDashboard) ID() string { +func (*awsRestjson1_serializeOpDescribeBrand) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeDashboard) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeBrand) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -5990,13 +6530,13 @@ func (m *awsRestjson1_serializeOpDescribeDashboard) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeDashboardInput) + input, ok := in.Parameters.(*DescribeBrandInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/brands/{BrandId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -6012,7 +6552,7 @@ func (m *awsRestjson1_serializeOpDescribeDashboard) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeDashboardInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeBrandInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -6025,15 +6565,11 @@ func (m *awsRestjson1_serializeOpDescribeDashboard) HandleSerialize(ctx context. span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeDashboardInput(v *DescribeDashboardInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeBrandInput(v *DescribeBrandInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AliasName != nil { - encoder.SetQuery("alias-name").String(*v.AliasName) - } - if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} } @@ -6043,30 +6579,30 @@ func awsRestjson1_serializeOpHttpBindingsDescribeDashboardInput(v *DescribeDashb } } - if v.DashboardId == nil || len(*v.DashboardId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DashboardId must not be empty")} + if v.BrandId == nil || len(*v.BrandId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BrandId must not be empty")} } - if v.DashboardId != nil { - if err := encoder.SetURI("DashboardId").String(*v.DashboardId); err != nil { + if v.BrandId != nil { + if err := encoder.SetURI("BrandId").String(*v.BrandId); err != nil { return err } } - if v.VersionNumber != nil { - encoder.SetQuery("version-number").Long(*v.VersionNumber) + if v.VersionId != nil { + encoder.SetQuery("versionId").String(*v.VersionId) } return nil } -type awsRestjson1_serializeOpDescribeDashboardDefinition struct { +type awsRestjson1_serializeOpDescribeBrandAssignment struct { } -func (*awsRestjson1_serializeOpDescribeDashboardDefinition) ID() string { +func (*awsRestjson1_serializeOpDescribeBrandAssignment) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeDashboardDefinition) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeBrandAssignment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -6078,13 +6614,13 @@ func (m *awsRestjson1_serializeOpDescribeDashboardDefinition) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeDashboardDefinitionInput) + input, ok := in.Parameters.(*DescribeBrandAssignmentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}/definition") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/brandassignments") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -6100,7 +6636,7 @@ func (m *awsRestjson1_serializeOpDescribeDashboardDefinition) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeDashboardDefinitionInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeBrandAssignmentInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -6113,15 +6649,11 @@ func (m *awsRestjson1_serializeOpDescribeDashboardDefinition) HandleSerialize(ct span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeDashboardDefinitionInput(v *DescribeDashboardDefinitionInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeBrandAssignmentInput(v *DescribeBrandAssignmentInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AliasName != nil { - encoder.SetQuery("alias-name").String(*v.AliasName) - } - if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} } @@ -6131,30 +6663,17 @@ func awsRestjson1_serializeOpHttpBindingsDescribeDashboardDefinitionInput(v *Des } } - if v.DashboardId == nil || len(*v.DashboardId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DashboardId must not be empty")} - } - if v.DashboardId != nil { - if err := encoder.SetURI("DashboardId").String(*v.DashboardId); err != nil { - return err - } - } - - if v.VersionNumber != nil { - encoder.SetQuery("version-number").Long(*v.VersionNumber) - } - return nil } -type awsRestjson1_serializeOpDescribeDashboardPermissions struct { +type awsRestjson1_serializeOpDescribeBrandPublishedVersion struct { } -func (*awsRestjson1_serializeOpDescribeDashboardPermissions) ID() string { +func (*awsRestjson1_serializeOpDescribeBrandPublishedVersion) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeDashboardPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeBrandPublishedVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -6166,13 +6685,13 @@ func (m *awsRestjson1_serializeOpDescribeDashboardPermissions) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeDashboardPermissionsInput) + input, ok := in.Parameters.(*DescribeBrandPublishedVersionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}/permissions") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/brands/{BrandId}/publishedversion") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -6188,7 +6707,7 @@ func (m *awsRestjson1_serializeOpDescribeDashboardPermissions) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeDashboardPermissionsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeBrandPublishedVersionInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -6201,7 +6720,7 @@ func (m *awsRestjson1_serializeOpDescribeDashboardPermissions) HandleSerialize(c span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeDashboardPermissionsInput(v *DescribeDashboardPermissionsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeBrandPublishedVersionInput(v *DescribeBrandPublishedVersionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -6215,11 +6734,11 @@ func awsRestjson1_serializeOpHttpBindingsDescribeDashboardPermissionsInput(v *De } } - if v.DashboardId == nil || len(*v.DashboardId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DashboardId must not be empty")} + if v.BrandId == nil || len(*v.BrandId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BrandId must not be empty")} } - if v.DashboardId != nil { - if err := encoder.SetURI("DashboardId").String(*v.DashboardId); err != nil { + if v.BrandId != nil { + if err := encoder.SetURI("BrandId").String(*v.BrandId); err != nil { return err } } @@ -6227,14 +6746,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeDashboardPermissionsInput(v *De return nil } -type awsRestjson1_serializeOpDescribeDashboardSnapshotJob struct { +type awsRestjson1_serializeOpDescribeCustomPermissions struct { } -func (*awsRestjson1_serializeOpDescribeDashboardSnapshotJob) ID() string { +func (*awsRestjson1_serializeOpDescribeCustomPermissions) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeDashboardSnapshotJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeCustomPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -6246,13 +6765,13 @@ func (m *awsRestjson1_serializeOpDescribeDashboardSnapshotJob) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeDashboardSnapshotJobInput) + input, ok := in.Parameters.(*DescribeCustomPermissionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}/snapshot-jobs/{SnapshotJobId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/custom-permissions/{CustomPermissionsName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -6268,7 +6787,7 @@ func (m *awsRestjson1_serializeOpDescribeDashboardSnapshotJob) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeDashboardSnapshotJobInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeCustomPermissionsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -6281,7 +6800,7 @@ func (m *awsRestjson1_serializeOpDescribeDashboardSnapshotJob) HandleSerialize(c span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeDashboardSnapshotJobInput(v *DescribeDashboardSnapshotJobInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeCustomPermissionsInput(v *DescribeCustomPermissionsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -6295,20 +6814,11 @@ func awsRestjson1_serializeOpHttpBindingsDescribeDashboardSnapshotJobInput(v *De } } - if v.DashboardId == nil || len(*v.DashboardId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DashboardId must not be empty")} - } - if v.DashboardId != nil { - if err := encoder.SetURI("DashboardId").String(*v.DashboardId); err != nil { - return err - } - } - - if v.SnapshotJobId == nil || len(*v.SnapshotJobId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member SnapshotJobId must not be empty")} + if v.CustomPermissionsName == nil || len(*v.CustomPermissionsName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CustomPermissionsName must not be empty")} } - if v.SnapshotJobId != nil { - if err := encoder.SetURI("SnapshotJobId").String(*v.SnapshotJobId); err != nil { + if v.CustomPermissionsName != nil { + if err := encoder.SetURI("CustomPermissionsName").String(*v.CustomPermissionsName); err != nil { return err } } @@ -6316,14 +6826,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeDashboardSnapshotJobInput(v *De return nil } -type awsRestjson1_serializeOpDescribeDashboardSnapshotJobResult struct { +type awsRestjson1_serializeOpDescribeDashboard struct { } -func (*awsRestjson1_serializeOpDescribeDashboardSnapshotJobResult) ID() string { +func (*awsRestjson1_serializeOpDescribeDashboard) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeDashboardSnapshotJobResult) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeDashboard) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -6335,13 +6845,13 @@ func (m *awsRestjson1_serializeOpDescribeDashboardSnapshotJobResult) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeDashboardSnapshotJobResultInput) + input, ok := in.Parameters.(*DescribeDashboardInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}/snapshot-jobs/{SnapshotJobId}/result") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -6357,7 +6867,7 @@ func (m *awsRestjson1_serializeOpDescribeDashboardSnapshotJobResult) HandleSeria return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeDashboardSnapshotJobResultInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeDashboardInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -6370,11 +6880,15 @@ func (m *awsRestjson1_serializeOpDescribeDashboardSnapshotJobResult) HandleSeria span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeDashboardSnapshotJobResultInput(v *DescribeDashboardSnapshotJobResultInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeDashboardInput(v *DescribeDashboardInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.AliasName != nil { + encoder.SetQuery("alias-name").String(*v.AliasName) + } + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} } @@ -6393,26 +6907,21 @@ func awsRestjson1_serializeOpHttpBindingsDescribeDashboardSnapshotJobResultInput } } - if v.SnapshotJobId == nil || len(*v.SnapshotJobId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member SnapshotJobId must not be empty")} - } - if v.SnapshotJobId != nil { - if err := encoder.SetURI("SnapshotJobId").String(*v.SnapshotJobId); err != nil { - return err - } + if v.VersionNumber != nil { + encoder.SetQuery("version-number").Long(*v.VersionNumber) } return nil } -type awsRestjson1_serializeOpDescribeDataSet struct { +type awsRestjson1_serializeOpDescribeDashboardDefinition struct { } -func (*awsRestjson1_serializeOpDescribeDataSet) ID() string { +func (*awsRestjson1_serializeOpDescribeDashboardDefinition) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeDataSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeDashboardDefinition) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -6424,13 +6933,13 @@ func (m *awsRestjson1_serializeOpDescribeDataSet) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeDataSetInput) + input, ok := in.Parameters.(*DescribeDashboardDefinitionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}/definition") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -6446,7 +6955,7 @@ func (m *awsRestjson1_serializeOpDescribeDataSet) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeDataSetInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeDashboardDefinitionInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -6459,11 +6968,15 @@ func (m *awsRestjson1_serializeOpDescribeDataSet) HandleSerialize(ctx context.Co span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeDataSetInput(v *DescribeDataSetInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeDashboardDefinitionInput(v *DescribeDashboardDefinitionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.AliasName != nil { + encoder.SetQuery("alias-name").String(*v.AliasName) + } + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} } @@ -6473,26 +6986,30 @@ func awsRestjson1_serializeOpHttpBindingsDescribeDataSetInput(v *DescribeDataSet } } - if v.DataSetId == nil || len(*v.DataSetId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} + if v.DashboardId == nil || len(*v.DashboardId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DashboardId must not be empty")} } - if v.DataSetId != nil { - if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { + if v.DashboardId != nil { + if err := encoder.SetURI("DashboardId").String(*v.DashboardId); err != nil { return err } } + if v.VersionNumber != nil { + encoder.SetQuery("version-number").Long(*v.VersionNumber) + } + return nil } -type awsRestjson1_serializeOpDescribeDataSetPermissions struct { +type awsRestjson1_serializeOpDescribeDashboardPermissions struct { } -func (*awsRestjson1_serializeOpDescribeDataSetPermissions) ID() string { +func (*awsRestjson1_serializeOpDescribeDashboardPermissions) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeDataSetPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeDashboardPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -6504,13 +7021,13 @@ func (m *awsRestjson1_serializeOpDescribeDataSetPermissions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeDataSetPermissionsInput) + input, ok := in.Parameters.(*DescribeDashboardPermissionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/permissions") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}/permissions") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -6526,7 +7043,7 @@ func (m *awsRestjson1_serializeOpDescribeDataSetPermissions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeDataSetPermissionsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeDashboardPermissionsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -6539,7 +7056,7 @@ func (m *awsRestjson1_serializeOpDescribeDataSetPermissions) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeDataSetPermissionsInput(v *DescribeDataSetPermissionsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeDashboardPermissionsInput(v *DescribeDashboardPermissionsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -6553,11 +7070,11 @@ func awsRestjson1_serializeOpHttpBindingsDescribeDataSetPermissionsInput(v *Desc } } - if v.DataSetId == nil || len(*v.DataSetId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} + if v.DashboardId == nil || len(*v.DashboardId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DashboardId must not be empty")} } - if v.DataSetId != nil { - if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { + if v.DashboardId != nil { + if err := encoder.SetURI("DashboardId").String(*v.DashboardId); err != nil { return err } } @@ -6565,14 +7082,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeDataSetPermissionsInput(v *Desc return nil } -type awsRestjson1_serializeOpDescribeDataSetRefreshProperties struct { +type awsRestjson1_serializeOpDescribeDashboardSnapshotJob struct { } -func (*awsRestjson1_serializeOpDescribeDataSetRefreshProperties) ID() string { +func (*awsRestjson1_serializeOpDescribeDashboardSnapshotJob) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeDataSetRefreshProperties) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeDashboardSnapshotJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -6584,13 +7101,13 @@ func (m *awsRestjson1_serializeOpDescribeDataSetRefreshProperties) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeDataSetRefreshPropertiesInput) + input, ok := in.Parameters.(*DescribeDashboardSnapshotJobInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/refresh-properties") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}/snapshot-jobs/{SnapshotJobId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -6606,7 +7123,7 @@ func (m *awsRestjson1_serializeOpDescribeDataSetRefreshProperties) HandleSeriali return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeDataSetRefreshPropertiesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeDashboardSnapshotJobInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -6619,7 +7136,7 @@ func (m *awsRestjson1_serializeOpDescribeDataSetRefreshProperties) HandleSeriali span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeDataSetRefreshPropertiesInput(v *DescribeDataSetRefreshPropertiesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeDashboardSnapshotJobInput(v *DescribeDashboardSnapshotJobInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -6633,11 +7150,20 @@ func awsRestjson1_serializeOpHttpBindingsDescribeDataSetRefreshPropertiesInput(v } } - if v.DataSetId == nil || len(*v.DataSetId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} + if v.DashboardId == nil || len(*v.DashboardId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DashboardId must not be empty")} } - if v.DataSetId != nil { - if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { + if v.DashboardId != nil { + if err := encoder.SetURI("DashboardId").String(*v.DashboardId); err != nil { + return err + } + } + + if v.SnapshotJobId == nil || len(*v.SnapshotJobId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member SnapshotJobId must not be empty")} + } + if v.SnapshotJobId != nil { + if err := encoder.SetURI("SnapshotJobId").String(*v.SnapshotJobId); err != nil { return err } } @@ -6645,14 +7171,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeDataSetRefreshPropertiesInput(v return nil } -type awsRestjson1_serializeOpDescribeDataSource struct { +type awsRestjson1_serializeOpDescribeDashboardSnapshotJobResult struct { } -func (*awsRestjson1_serializeOpDescribeDataSource) ID() string { +func (*awsRestjson1_serializeOpDescribeDashboardSnapshotJobResult) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeDataSource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeDashboardSnapshotJobResult) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -6664,13 +7190,13 @@ func (m *awsRestjson1_serializeOpDescribeDataSource) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeDataSourceInput) + input, ok := in.Parameters.(*DescribeDashboardSnapshotJobResultInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sources/{DataSourceId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}/snapshot-jobs/{SnapshotJobId}/result") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -6686,7 +7212,7 @@ func (m *awsRestjson1_serializeOpDescribeDataSource) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeDataSourceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeDashboardSnapshotJobResultInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -6699,7 +7225,7 @@ func (m *awsRestjson1_serializeOpDescribeDataSource) HandleSerialize(ctx context span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeDataSourceInput(v *DescribeDataSourceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeDashboardSnapshotJobResultInput(v *DescribeDashboardSnapshotJobResultInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -6713,11 +7239,20 @@ func awsRestjson1_serializeOpHttpBindingsDescribeDataSourceInput(v *DescribeData } } - if v.DataSourceId == nil || len(*v.DataSourceId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DataSourceId must not be empty")} + if v.DashboardId == nil || len(*v.DashboardId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DashboardId must not be empty")} } - if v.DataSourceId != nil { - if err := encoder.SetURI("DataSourceId").String(*v.DataSourceId); err != nil { + if v.DashboardId != nil { + if err := encoder.SetURI("DashboardId").String(*v.DashboardId); err != nil { + return err + } + } + + if v.SnapshotJobId == nil || len(*v.SnapshotJobId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member SnapshotJobId must not be empty")} + } + if v.SnapshotJobId != nil { + if err := encoder.SetURI("SnapshotJobId").String(*v.SnapshotJobId); err != nil { return err } } @@ -6725,14 +7260,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeDataSourceInput(v *DescribeData return nil } -type awsRestjson1_serializeOpDescribeDataSourcePermissions struct { +type awsRestjson1_serializeOpDescribeDataSet struct { } -func (*awsRestjson1_serializeOpDescribeDataSourcePermissions) ID() string { +func (*awsRestjson1_serializeOpDescribeDataSet) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeDataSourcePermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeDataSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -6744,13 +7279,13 @@ func (m *awsRestjson1_serializeOpDescribeDataSourcePermissions) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeDataSourcePermissionsInput) + input, ok := in.Parameters.(*DescribeDataSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sources/{DataSourceId}/permissions") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -6766,7 +7301,7 @@ func (m *awsRestjson1_serializeOpDescribeDataSourcePermissions) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeDataSourcePermissionsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeDataSetInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -6779,7 +7314,7 @@ func (m *awsRestjson1_serializeOpDescribeDataSourcePermissions) HandleSerialize( span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeDataSourcePermissionsInput(v *DescribeDataSourcePermissionsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeDataSetInput(v *DescribeDataSetInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -6793,11 +7328,11 @@ func awsRestjson1_serializeOpHttpBindingsDescribeDataSourcePermissionsInput(v *D } } - if v.DataSourceId == nil || len(*v.DataSourceId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DataSourceId must not be empty")} + if v.DataSetId == nil || len(*v.DataSetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} } - if v.DataSourceId != nil { - if err := encoder.SetURI("DataSourceId").String(*v.DataSourceId); err != nil { + if v.DataSetId != nil { + if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { return err } } @@ -6805,14 +7340,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeDataSourcePermissionsInput(v *D return nil } -type awsRestjson1_serializeOpDescribeFolder struct { +type awsRestjson1_serializeOpDescribeDataSetPermissions struct { } -func (*awsRestjson1_serializeOpDescribeFolder) ID() string { +func (*awsRestjson1_serializeOpDescribeDataSetPermissions) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeFolder) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeDataSetPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -6824,13 +7359,13 @@ func (m *awsRestjson1_serializeOpDescribeFolder) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeFolderInput) + input, ok := in.Parameters.(*DescribeDataSetPermissionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/folders/{FolderId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/permissions") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -6846,7 +7381,7 @@ func (m *awsRestjson1_serializeOpDescribeFolder) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeFolderInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeDataSetPermissionsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -6859,7 +7394,7 @@ func (m *awsRestjson1_serializeOpDescribeFolder) HandleSerialize(ctx context.Con span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeFolderInput(v *DescribeFolderInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeDataSetPermissionsInput(v *DescribeDataSetPermissionsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -6873,11 +7408,11 @@ func awsRestjson1_serializeOpHttpBindingsDescribeFolderInput(v *DescribeFolderIn } } - if v.FolderId == nil || len(*v.FolderId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member FolderId must not be empty")} + if v.DataSetId == nil || len(*v.DataSetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} } - if v.FolderId != nil { - if err := encoder.SetURI("FolderId").String(*v.FolderId); err != nil { + if v.DataSetId != nil { + if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { return err } } @@ -6885,14 +7420,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeFolderInput(v *DescribeFolderIn return nil } -type awsRestjson1_serializeOpDescribeFolderPermissions struct { +type awsRestjson1_serializeOpDescribeDataSetRefreshProperties struct { } -func (*awsRestjson1_serializeOpDescribeFolderPermissions) ID() string { +func (*awsRestjson1_serializeOpDescribeDataSetRefreshProperties) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeFolderPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeDataSetRefreshProperties) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -6904,13 +7439,13 @@ func (m *awsRestjson1_serializeOpDescribeFolderPermissions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeFolderPermissionsInput) + input, ok := in.Parameters.(*DescribeDataSetRefreshPropertiesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/folders/{FolderId}/permissions") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/refresh-properties") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -6926,7 +7461,7 @@ func (m *awsRestjson1_serializeOpDescribeFolderPermissions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeFolderPermissionsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeDataSetRefreshPropertiesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -6939,7 +7474,7 @@ func (m *awsRestjson1_serializeOpDescribeFolderPermissions) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeFolderPermissionsInput(v *DescribeFolderPermissionsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeDataSetRefreshPropertiesInput(v *DescribeDataSetRefreshPropertiesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -6953,38 +7488,26 @@ func awsRestjson1_serializeOpHttpBindingsDescribeFolderPermissionsInput(v *Descr } } - if v.FolderId == nil || len(*v.FolderId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member FolderId must not be empty")} + if v.DataSetId == nil || len(*v.DataSetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} } - if v.FolderId != nil { - if err := encoder.SetURI("FolderId").String(*v.FolderId); err != nil { + if v.DataSetId != nil { + if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { return err } } - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.Namespace != nil { - encoder.SetQuery("namespace").String(*v.Namespace) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - return nil } -type awsRestjson1_serializeOpDescribeFolderResolvedPermissions struct { +type awsRestjson1_serializeOpDescribeDataSource struct { } -func (*awsRestjson1_serializeOpDescribeFolderResolvedPermissions) ID() string { +func (*awsRestjson1_serializeOpDescribeDataSource) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeFolderResolvedPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeDataSource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -6996,13 +7519,13 @@ func (m *awsRestjson1_serializeOpDescribeFolderResolvedPermissions) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeFolderResolvedPermissionsInput) + input, ok := in.Parameters.(*DescribeDataSourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/folders/{FolderId}/resolved-permissions") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sources/{DataSourceId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -7018,7 +7541,7 @@ func (m *awsRestjson1_serializeOpDescribeFolderResolvedPermissions) HandleSerial return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeFolderResolvedPermissionsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeDataSourceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -7031,7 +7554,7 @@ func (m *awsRestjson1_serializeOpDescribeFolderResolvedPermissions) HandleSerial span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeFolderResolvedPermissionsInput(v *DescribeFolderResolvedPermissionsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeDataSourceInput(v *DescribeDataSourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -7045,38 +7568,26 @@ func awsRestjson1_serializeOpHttpBindingsDescribeFolderResolvedPermissionsInput( } } - if v.FolderId == nil || len(*v.FolderId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member FolderId must not be empty")} + if v.DataSourceId == nil || len(*v.DataSourceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DataSourceId must not be empty")} } - if v.FolderId != nil { - if err := encoder.SetURI("FolderId").String(*v.FolderId); err != nil { + if v.DataSourceId != nil { + if err := encoder.SetURI("DataSourceId").String(*v.DataSourceId); err != nil { return err } } - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.Namespace != nil { - encoder.SetQuery("namespace").String(*v.Namespace) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - return nil } -type awsRestjson1_serializeOpDescribeGroup struct { +type awsRestjson1_serializeOpDescribeDataSourcePermissions struct { } -func (*awsRestjson1_serializeOpDescribeGroup) ID() string { +func (*awsRestjson1_serializeOpDescribeDataSourcePermissions) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeDataSourcePermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -7088,13 +7599,13 @@ func (m *awsRestjson1_serializeOpDescribeGroup) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeGroupInput) + input, ok := in.Parameters.(*DescribeDataSourcePermissionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/groups/{GroupName}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sources/{DataSourceId}/permissions") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -7110,7 +7621,7 @@ func (m *awsRestjson1_serializeOpDescribeGroup) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeGroupInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeDataSourcePermissionsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -7123,7 +7634,7 @@ func (m *awsRestjson1_serializeOpDescribeGroup) HandleSerialize(ctx context.Cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeGroupInput(v *DescribeGroupInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeDataSourcePermissionsInput(v *DescribeDataSourcePermissionsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -7137,20 +7648,11 @@ func awsRestjson1_serializeOpHttpBindingsDescribeGroupInput(v *DescribeGroupInpu } } - if v.GroupName == nil || len(*v.GroupName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member GroupName must not be empty")} - } - if v.GroupName != nil { - if err := encoder.SetURI("GroupName").String(*v.GroupName); err != nil { - return err - } - } - - if v.Namespace == nil || len(*v.Namespace) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} + if v.DataSourceId == nil || len(*v.DataSourceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DataSourceId must not be empty")} } - if v.Namespace != nil { - if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { + if v.DataSourceId != nil { + if err := encoder.SetURI("DataSourceId").String(*v.DataSourceId); err != nil { return err } } @@ -7158,14 +7660,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeGroupInput(v *DescribeGroupInpu return nil } -type awsRestjson1_serializeOpDescribeGroupMembership struct { +type awsRestjson1_serializeOpDescribeFolder struct { } -func (*awsRestjson1_serializeOpDescribeGroupMembership) ID() string { +func (*awsRestjson1_serializeOpDescribeFolder) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeGroupMembership) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeFolder) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -7177,13 +7679,13 @@ func (m *awsRestjson1_serializeOpDescribeGroupMembership) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeGroupMembershipInput) + input, ok := in.Parameters.(*DescribeFolderInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/groups/{GroupName}/members/{MemberName}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/folders/{FolderId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -7199,7 +7701,7 @@ func (m *awsRestjson1_serializeOpDescribeGroupMembership) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeGroupMembershipInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeFolderInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -7212,7 +7714,7 @@ func (m *awsRestjson1_serializeOpDescribeGroupMembership) HandleSerialize(ctx co span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeGroupMembershipInput(v *DescribeGroupMembershipInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeFolderInput(v *DescribeFolderInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -7226,29 +7728,11 @@ func awsRestjson1_serializeOpHttpBindingsDescribeGroupMembershipInput(v *Describ } } - if v.GroupName == nil || len(*v.GroupName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member GroupName must not be empty")} - } - if v.GroupName != nil { - if err := encoder.SetURI("GroupName").String(*v.GroupName); err != nil { - return err - } - } - - if v.MemberName == nil || len(*v.MemberName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MemberName must not be empty")} - } - if v.MemberName != nil { - if err := encoder.SetURI("MemberName").String(*v.MemberName); err != nil { - return err - } - } - - if v.Namespace == nil || len(*v.Namespace) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} + if v.FolderId == nil || len(*v.FolderId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FolderId must not be empty")} } - if v.Namespace != nil { - if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { + if v.FolderId != nil { + if err := encoder.SetURI("FolderId").String(*v.FolderId); err != nil { return err } } @@ -7256,14 +7740,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeGroupMembershipInput(v *Describ return nil } -type awsRestjson1_serializeOpDescribeIAMPolicyAssignment struct { +type awsRestjson1_serializeOpDescribeFolderPermissions struct { } -func (*awsRestjson1_serializeOpDescribeIAMPolicyAssignment) ID() string { +func (*awsRestjson1_serializeOpDescribeFolderPermissions) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeIAMPolicyAssignment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeFolderPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -7275,13 +7759,13 @@ func (m *awsRestjson1_serializeOpDescribeIAMPolicyAssignment) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeIAMPolicyAssignmentInput) + input, ok := in.Parameters.(*DescribeFolderPermissionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/iam-policy-assignments/{AssignmentName}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/folders/{FolderId}/permissions") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -7297,7 +7781,7 @@ func (m *awsRestjson1_serializeOpDescribeIAMPolicyAssignment) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeIAMPolicyAssignmentInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeFolderPermissionsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -7310,20 +7794,11 @@ func (m *awsRestjson1_serializeOpDescribeIAMPolicyAssignment) HandleSerialize(ct span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeIAMPolicyAssignmentInput(v *DescribeIAMPolicyAssignmentInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeFolderPermissionsInput(v *DescribeFolderPermissionsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AssignmentName == nil || len(*v.AssignmentName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AssignmentName must not be empty")} - } - if v.AssignmentName != nil { - if err := encoder.SetURI("AssignmentName").String(*v.AssignmentName); err != nil { - return err - } - } - if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} } @@ -7333,26 +7808,38 @@ func awsRestjson1_serializeOpHttpBindingsDescribeIAMPolicyAssignmentInput(v *Des } } - if v.Namespace == nil || len(*v.Namespace) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} + if v.FolderId == nil || len(*v.FolderId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FolderId must not be empty")} } - if v.Namespace != nil { - if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { + if v.FolderId != nil { + if err := encoder.SetURI("FolderId").String(*v.FolderId); err != nil { return err } } + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.Namespace != nil { + encoder.SetQuery("namespace").String(*v.Namespace) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + return nil } -type awsRestjson1_serializeOpDescribeIngestion struct { +type awsRestjson1_serializeOpDescribeFolderResolvedPermissions struct { } -func (*awsRestjson1_serializeOpDescribeIngestion) ID() string { +func (*awsRestjson1_serializeOpDescribeFolderResolvedPermissions) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeIngestion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeFolderResolvedPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -7364,13 +7851,13 @@ func (m *awsRestjson1_serializeOpDescribeIngestion) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeIngestionInput) + input, ok := in.Parameters.(*DescribeFolderResolvedPermissionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/ingestions/{IngestionId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/folders/{FolderId}/resolved-permissions") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -7386,7 +7873,7 @@ func (m *awsRestjson1_serializeOpDescribeIngestion) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeIngestionInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeFolderResolvedPermissionsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -7399,7 +7886,7 @@ func (m *awsRestjson1_serializeOpDescribeIngestion) HandleSerialize(ctx context. span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeIngestionInput(v *DescribeIngestionInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeFolderResolvedPermissionsInput(v *DescribeFolderResolvedPermissionsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -7413,35 +7900,38 @@ func awsRestjson1_serializeOpHttpBindingsDescribeIngestionInput(v *DescribeInges } } - if v.DataSetId == nil || len(*v.DataSetId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} + if v.FolderId == nil || len(*v.FolderId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FolderId must not be empty")} } - if v.DataSetId != nil { - if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { + if v.FolderId != nil { + if err := encoder.SetURI("FolderId").String(*v.FolderId); err != nil { return err } } - if v.IngestionId == nil || len(*v.IngestionId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member IngestionId must not be empty")} + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) } - if v.IngestionId != nil { - if err := encoder.SetURI("IngestionId").String(*v.IngestionId); err != nil { - return err - } + + if v.Namespace != nil { + encoder.SetQuery("namespace").String(*v.Namespace) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) } return nil } -type awsRestjson1_serializeOpDescribeIpRestriction struct { +type awsRestjson1_serializeOpDescribeGroup struct { } -func (*awsRestjson1_serializeOpDescribeIpRestriction) ID() string { +func (*awsRestjson1_serializeOpDescribeGroup) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeIpRestriction) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -7453,13 +7943,13 @@ func (m *awsRestjson1_serializeOpDescribeIpRestriction) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeIpRestrictionInput) + input, ok := in.Parameters.(*DescribeGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/ip-restriction") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/groups/{GroupName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -7475,7 +7965,7 @@ func (m *awsRestjson1_serializeOpDescribeIpRestriction) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeIpRestrictionInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeGroupInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -7488,7 +7978,7 @@ func (m *awsRestjson1_serializeOpDescribeIpRestriction) HandleSerialize(ctx cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeIpRestrictionInput(v *DescribeIpRestrictionInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeGroupInput(v *DescribeGroupInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -7502,17 +7992,35 @@ func awsRestjson1_serializeOpHttpBindingsDescribeIpRestrictionInput(v *DescribeI } } + if v.GroupName == nil || len(*v.GroupName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GroupName must not be empty")} + } + if v.GroupName != nil { + if err := encoder.SetURI("GroupName").String(*v.GroupName); err != nil { + return err + } + } + + if v.Namespace == nil || len(*v.Namespace) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} + } + if v.Namespace != nil { + if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { + return err + } + } + return nil } -type awsRestjson1_serializeOpDescribeKeyRegistration struct { +type awsRestjson1_serializeOpDescribeGroupMembership struct { } -func (*awsRestjson1_serializeOpDescribeKeyRegistration) ID() string { +func (*awsRestjson1_serializeOpDescribeGroupMembership) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeKeyRegistration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeGroupMembership) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -7524,13 +8032,13 @@ func (m *awsRestjson1_serializeOpDescribeKeyRegistration) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeKeyRegistrationInput) + input, ok := in.Parameters.(*DescribeGroupMembershipInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/key-registration") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/groups/{GroupName}/members/{MemberName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -7546,7 +8054,7 @@ func (m *awsRestjson1_serializeOpDescribeKeyRegistration) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeKeyRegistrationInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeGroupMembershipInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -7559,7 +8067,7 @@ func (m *awsRestjson1_serializeOpDescribeKeyRegistration) HandleSerialize(ctx co span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeKeyRegistrationInput(v *DescribeKeyRegistrationInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeGroupMembershipInput(v *DescribeGroupMembershipInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -7573,21 +8081,44 @@ func awsRestjson1_serializeOpHttpBindingsDescribeKeyRegistrationInput(v *Describ } } - if v.DefaultKeyOnly { - encoder.SetQuery("default-key-only").Boolean(v.DefaultKeyOnly) + if v.GroupName == nil || len(*v.GroupName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GroupName must not be empty")} + } + if v.GroupName != nil { + if err := encoder.SetURI("GroupName").String(*v.GroupName); err != nil { + return err + } + } + + if v.MemberName == nil || len(*v.MemberName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MemberName must not be empty")} + } + if v.MemberName != nil { + if err := encoder.SetURI("MemberName").String(*v.MemberName); err != nil { + return err + } + } + + if v.Namespace == nil || len(*v.Namespace) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} + } + if v.Namespace != nil { + if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpDescribeNamespace struct { +type awsRestjson1_serializeOpDescribeIAMPolicyAssignment struct { } -func (*awsRestjson1_serializeOpDescribeNamespace) ID() string { +func (*awsRestjson1_serializeOpDescribeIAMPolicyAssignment) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeNamespace) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeIAMPolicyAssignment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -7599,13 +8130,13 @@ func (m *awsRestjson1_serializeOpDescribeNamespace) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeNamespaceInput) + input, ok := in.Parameters.(*DescribeIAMPolicyAssignmentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/iam-policy-assignments/{AssignmentName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -7621,7 +8152,7 @@ func (m *awsRestjson1_serializeOpDescribeNamespace) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeNamespaceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeIAMPolicyAssignmentInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -7634,11 +8165,20 @@ func (m *awsRestjson1_serializeOpDescribeNamespace) HandleSerialize(ctx context. span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeNamespaceInput(v *DescribeNamespaceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeIAMPolicyAssignmentInput(v *DescribeIAMPolicyAssignmentInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.AssignmentName == nil || len(*v.AssignmentName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AssignmentName must not be empty")} + } + if v.AssignmentName != nil { + if err := encoder.SetURI("AssignmentName").String(*v.AssignmentName); err != nil { + return err + } + } + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} } @@ -7660,14 +8200,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeNamespaceInput(v *DescribeNames return nil } -type awsRestjson1_serializeOpDescribeQPersonalizationConfiguration struct { +type awsRestjson1_serializeOpDescribeIngestion struct { } -func (*awsRestjson1_serializeOpDescribeQPersonalizationConfiguration) ID() string { +func (*awsRestjson1_serializeOpDescribeIngestion) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeQPersonalizationConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeIngestion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -7679,13 +8219,13 @@ func (m *awsRestjson1_serializeOpDescribeQPersonalizationConfiguration) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeQPersonalizationConfigurationInput) + input, ok := in.Parameters.(*DescribeIngestionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/q-personalization-configuration") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/ingestions/{IngestionId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -7701,7 +8241,7 @@ func (m *awsRestjson1_serializeOpDescribeQPersonalizationConfiguration) HandleSe return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeQPersonalizationConfigurationInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeIngestionInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -7714,7 +8254,7 @@ func (m *awsRestjson1_serializeOpDescribeQPersonalizationConfiguration) HandleSe span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeQPersonalizationConfigurationInput(v *DescribeQPersonalizationConfigurationInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeIngestionInput(v *DescribeIngestionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -7728,17 +8268,35 @@ func awsRestjson1_serializeOpHttpBindingsDescribeQPersonalizationConfigurationIn } } + if v.DataSetId == nil || len(*v.DataSetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} + } + if v.DataSetId != nil { + if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { + return err + } + } + + if v.IngestionId == nil || len(*v.IngestionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member IngestionId must not be empty")} + } + if v.IngestionId != nil { + if err := encoder.SetURI("IngestionId").String(*v.IngestionId); err != nil { + return err + } + } + return nil } -type awsRestjson1_serializeOpDescribeRefreshSchedule struct { +type awsRestjson1_serializeOpDescribeIpRestriction struct { } -func (*awsRestjson1_serializeOpDescribeRefreshSchedule) ID() string { +func (*awsRestjson1_serializeOpDescribeIpRestriction) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeRefreshSchedule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeIpRestriction) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -7750,13 +8308,13 @@ func (m *awsRestjson1_serializeOpDescribeRefreshSchedule) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeRefreshScheduleInput) + input, ok := in.Parameters.(*DescribeIpRestrictionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/refresh-schedules/{ScheduleId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/ip-restriction") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -7772,7 +8330,7 @@ func (m *awsRestjson1_serializeOpDescribeRefreshSchedule) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeRefreshScheduleInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeIpRestrictionInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -7785,7 +8343,7 @@ func (m *awsRestjson1_serializeOpDescribeRefreshSchedule) HandleSerialize(ctx co span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeRefreshScheduleInput(v *DescribeRefreshScheduleInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeIpRestrictionInput(v *DescribeIpRestrictionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -7799,35 +8357,17 @@ func awsRestjson1_serializeOpHttpBindingsDescribeRefreshScheduleInput(v *Describ } } - if v.DataSetId == nil || len(*v.DataSetId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} - } - if v.DataSetId != nil { - if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { - return err - } - } - - if v.ScheduleId == nil || len(*v.ScheduleId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ScheduleId must not be empty")} - } - if v.ScheduleId != nil { - if err := encoder.SetURI("ScheduleId").String(*v.ScheduleId); err != nil { - return err - } - } - return nil } -type awsRestjson1_serializeOpDescribeRoleCustomPermission struct { +type awsRestjson1_serializeOpDescribeKeyRegistration struct { } -func (*awsRestjson1_serializeOpDescribeRoleCustomPermission) ID() string { +func (*awsRestjson1_serializeOpDescribeKeyRegistration) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeRoleCustomPermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeKeyRegistration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -7839,13 +8379,13 @@ func (m *awsRestjson1_serializeOpDescribeRoleCustomPermission) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeRoleCustomPermissionInput) + input, ok := in.Parameters.(*DescribeKeyRegistrationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/roles/{Role}/custom-permission") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/key-registration") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -7861,7 +8401,7 @@ func (m *awsRestjson1_serializeOpDescribeRoleCustomPermission) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeRoleCustomPermissionInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeKeyRegistrationInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -7874,7 +8414,7 @@ func (m *awsRestjson1_serializeOpDescribeRoleCustomPermission) HandleSerialize(c span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeRoleCustomPermissionInput(v *DescribeRoleCustomPermissionInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeKeyRegistrationInput(v *DescribeKeyRegistrationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -7888,35 +8428,21 @@ func awsRestjson1_serializeOpHttpBindingsDescribeRoleCustomPermissionInput(v *De } } - if v.Namespace == nil || len(*v.Namespace) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} - } - if v.Namespace != nil { - if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { - return err - } - } - - if len(v.Role) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Role must not be empty")} - } - if len(v.Role) > 0 { - if err := encoder.SetURI("Role").String(string(v.Role)); err != nil { - return err - } + if v.DefaultKeyOnly { + encoder.SetQuery("default-key-only").Boolean(v.DefaultKeyOnly) } return nil } -type awsRestjson1_serializeOpDescribeTemplate struct { +type awsRestjson1_serializeOpDescribeNamespace struct { } -func (*awsRestjson1_serializeOpDescribeTemplate) ID() string { +func (*awsRestjson1_serializeOpDescribeNamespace) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeNamespace) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -7928,13 +8454,13 @@ func (m *awsRestjson1_serializeOpDescribeTemplate) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeTemplateInput) + input, ok := in.Parameters.(*DescribeNamespaceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/templates/{TemplateId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -7950,7 +8476,7 @@ func (m *awsRestjson1_serializeOpDescribeTemplate) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeTemplateInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeNamespaceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -7963,15 +8489,11 @@ func (m *awsRestjson1_serializeOpDescribeTemplate) HandleSerialize(ctx context.C span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeTemplateInput(v *DescribeTemplateInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeNamespaceInput(v *DescribeNamespaceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AliasName != nil { - encoder.SetQuery("alias-name").String(*v.AliasName) - } - if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} } @@ -7981,30 +8503,26 @@ func awsRestjson1_serializeOpHttpBindingsDescribeTemplateInput(v *DescribeTempla } } - if v.TemplateId == nil || len(*v.TemplateId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member TemplateId must not be empty")} + if v.Namespace == nil || len(*v.Namespace) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} } - if v.TemplateId != nil { - if err := encoder.SetURI("TemplateId").String(*v.TemplateId); err != nil { + if v.Namespace != nil { + if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { return err } } - if v.VersionNumber != nil { - encoder.SetQuery("version-number").Long(*v.VersionNumber) - } - return nil } -type awsRestjson1_serializeOpDescribeTemplateAlias struct { +type awsRestjson1_serializeOpDescribeQPersonalizationConfiguration struct { } -func (*awsRestjson1_serializeOpDescribeTemplateAlias) ID() string { +func (*awsRestjson1_serializeOpDescribeQPersonalizationConfiguration) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeTemplateAlias) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeQPersonalizationConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -8016,13 +8534,13 @@ func (m *awsRestjson1_serializeOpDescribeTemplateAlias) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeTemplateAliasInput) + input, ok := in.Parameters.(*DescribeQPersonalizationConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/templates/{TemplateId}/aliases/{AliasName}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/q-personalization-configuration") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -8038,7 +8556,7 @@ func (m *awsRestjson1_serializeOpDescribeTemplateAlias) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeTemplateAliasInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeQPersonalizationConfigurationInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -8051,20 +8569,11 @@ func (m *awsRestjson1_serializeOpDescribeTemplateAlias) HandleSerialize(ctx cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeTemplateAliasInput(v *DescribeTemplateAliasInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeQPersonalizationConfigurationInput(v *DescribeQPersonalizationConfigurationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AliasName == nil || len(*v.AliasName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AliasName must not be empty")} - } - if v.AliasName != nil { - if err := encoder.SetURI("AliasName").String(*v.AliasName); err != nil { - return err - } - } - if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} } @@ -8074,26 +8583,17 @@ func awsRestjson1_serializeOpHttpBindingsDescribeTemplateAliasInput(v *DescribeT } } - if v.TemplateId == nil || len(*v.TemplateId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member TemplateId must not be empty")} - } - if v.TemplateId != nil { - if err := encoder.SetURI("TemplateId").String(*v.TemplateId); err != nil { - return err - } - } - return nil } -type awsRestjson1_serializeOpDescribeTemplateDefinition struct { +type awsRestjson1_serializeOpDescribeRefreshSchedule struct { } -func (*awsRestjson1_serializeOpDescribeTemplateDefinition) ID() string { +func (*awsRestjson1_serializeOpDescribeRefreshSchedule) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeTemplateDefinition) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeRefreshSchedule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -8105,13 +8605,13 @@ func (m *awsRestjson1_serializeOpDescribeTemplateDefinition) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeTemplateDefinitionInput) + input, ok := in.Parameters.(*DescribeRefreshScheduleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/templates/{TemplateId}/definition") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/refresh-schedules/{ScheduleId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -8127,7 +8627,7 @@ func (m *awsRestjson1_serializeOpDescribeTemplateDefinition) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeTemplateDefinitionInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeRefreshScheduleInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -8140,15 +8640,11 @@ func (m *awsRestjson1_serializeOpDescribeTemplateDefinition) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeTemplateDefinitionInput(v *DescribeTemplateDefinitionInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeRefreshScheduleInput(v *DescribeRefreshScheduleInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AliasName != nil { - encoder.SetQuery("alias-name").String(*v.AliasName) - } - if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} } @@ -8158,30 +8654,35 @@ func awsRestjson1_serializeOpHttpBindingsDescribeTemplateDefinitionInput(v *Desc } } - if v.TemplateId == nil || len(*v.TemplateId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member TemplateId must not be empty")} + if v.DataSetId == nil || len(*v.DataSetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} } - if v.TemplateId != nil { - if err := encoder.SetURI("TemplateId").String(*v.TemplateId); err != nil { + if v.DataSetId != nil { + if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { return err } } - if v.VersionNumber != nil { - encoder.SetQuery("version-number").Long(*v.VersionNumber) + if v.ScheduleId == nil || len(*v.ScheduleId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ScheduleId must not be empty")} + } + if v.ScheduleId != nil { + if err := encoder.SetURI("ScheduleId").String(*v.ScheduleId); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpDescribeTemplatePermissions struct { +type awsRestjson1_serializeOpDescribeRoleCustomPermission struct { } -func (*awsRestjson1_serializeOpDescribeTemplatePermissions) ID() string { +func (*awsRestjson1_serializeOpDescribeRoleCustomPermission) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeTemplatePermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeRoleCustomPermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -8193,13 +8694,13 @@ func (m *awsRestjson1_serializeOpDescribeTemplatePermissions) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeTemplatePermissionsInput) + input, ok := in.Parameters.(*DescribeRoleCustomPermissionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/templates/{TemplateId}/permissions") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/roles/{Role}/custom-permission") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -8215,7 +8716,7 @@ func (m *awsRestjson1_serializeOpDescribeTemplatePermissions) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeTemplatePermissionsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeRoleCustomPermissionInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -8228,7 +8729,7 @@ func (m *awsRestjson1_serializeOpDescribeTemplatePermissions) HandleSerialize(ct span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeTemplatePermissionsInput(v *DescribeTemplatePermissionsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeRoleCustomPermissionInput(v *DescribeRoleCustomPermissionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -8242,11 +8743,20 @@ func awsRestjson1_serializeOpHttpBindingsDescribeTemplatePermissionsInput(v *Des } } - if v.TemplateId == nil || len(*v.TemplateId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member TemplateId must not be empty")} + if v.Namespace == nil || len(*v.Namespace) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} } - if v.TemplateId != nil { - if err := encoder.SetURI("TemplateId").String(*v.TemplateId); err != nil { + if v.Namespace != nil { + if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { + return err + } + } + + if len(v.Role) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Role must not be empty")} + } + if len(v.Role) > 0 { + if err := encoder.SetURI("Role").String(string(v.Role)); err != nil { return err } } @@ -8254,14 +8764,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeTemplatePermissionsInput(v *Des return nil } -type awsRestjson1_serializeOpDescribeTheme struct { +type awsRestjson1_serializeOpDescribeTemplate struct { } -func (*awsRestjson1_serializeOpDescribeTheme) ID() string { +func (*awsRestjson1_serializeOpDescribeTemplate) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeTheme) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -8273,13 +8783,13 @@ func (m *awsRestjson1_serializeOpDescribeTheme) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeThemeInput) + input, ok := in.Parameters.(*DescribeTemplateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/themes/{ThemeId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/templates/{TemplateId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -8295,7 +8805,7 @@ func (m *awsRestjson1_serializeOpDescribeTheme) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeThemeInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeTemplateInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -8308,7 +8818,7 @@ func (m *awsRestjson1_serializeOpDescribeTheme) HandleSerialize(ctx context.Cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeThemeInput(v *DescribeThemeInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeTemplateInput(v *DescribeTemplateInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -8326,11 +8836,11 @@ func awsRestjson1_serializeOpHttpBindingsDescribeThemeInput(v *DescribeThemeInpu } } - if v.ThemeId == nil || len(*v.ThemeId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ThemeId must not be empty")} + if v.TemplateId == nil || len(*v.TemplateId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member TemplateId must not be empty")} } - if v.ThemeId != nil { - if err := encoder.SetURI("ThemeId").String(*v.ThemeId); err != nil { + if v.TemplateId != nil { + if err := encoder.SetURI("TemplateId").String(*v.TemplateId); err != nil { return err } } @@ -8342,14 +8852,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeThemeInput(v *DescribeThemeInpu return nil } -type awsRestjson1_serializeOpDescribeThemeAlias struct { +type awsRestjson1_serializeOpDescribeTemplateAlias struct { } -func (*awsRestjson1_serializeOpDescribeThemeAlias) ID() string { +func (*awsRestjson1_serializeOpDescribeTemplateAlias) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeThemeAlias) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeTemplateAlias) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -8361,13 +8871,13 @@ func (m *awsRestjson1_serializeOpDescribeThemeAlias) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeThemeAliasInput) + input, ok := in.Parameters.(*DescribeTemplateAliasInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/themes/{ThemeId}/aliases/{AliasName}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/templates/{TemplateId}/aliases/{AliasName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -8383,7 +8893,7 @@ func (m *awsRestjson1_serializeOpDescribeThemeAlias) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeThemeAliasInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeTemplateAliasInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -8396,7 +8906,7 @@ func (m *awsRestjson1_serializeOpDescribeThemeAlias) HandleSerialize(ctx context span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeThemeAliasInput(v *DescribeThemeAliasInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeTemplateAliasInput(v *DescribeTemplateAliasInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -8419,11 +8929,11 @@ func awsRestjson1_serializeOpHttpBindingsDescribeThemeAliasInput(v *DescribeThem } } - if v.ThemeId == nil || len(*v.ThemeId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ThemeId must not be empty")} + if v.TemplateId == nil || len(*v.TemplateId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member TemplateId must not be empty")} } - if v.ThemeId != nil { - if err := encoder.SetURI("ThemeId").String(*v.ThemeId); err != nil { + if v.TemplateId != nil { + if err := encoder.SetURI("TemplateId").String(*v.TemplateId); err != nil { return err } } @@ -8431,14 +8941,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeThemeAliasInput(v *DescribeThem return nil } -type awsRestjson1_serializeOpDescribeThemePermissions struct { +type awsRestjson1_serializeOpDescribeTemplateDefinition struct { } -func (*awsRestjson1_serializeOpDescribeThemePermissions) ID() string { +func (*awsRestjson1_serializeOpDescribeTemplateDefinition) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeThemePermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeTemplateDefinition) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -8450,13 +8960,13 @@ func (m *awsRestjson1_serializeOpDescribeThemePermissions) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeThemePermissionsInput) + input, ok := in.Parameters.(*DescribeTemplateDefinitionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/themes/{ThemeId}/permissions") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/templates/{TemplateId}/definition") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -8472,7 +8982,7 @@ func (m *awsRestjson1_serializeOpDescribeThemePermissions) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeThemePermissionsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeTemplateDefinitionInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -8485,11 +8995,15 @@ func (m *awsRestjson1_serializeOpDescribeThemePermissions) HandleSerialize(ctx c span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeThemePermissionsInput(v *DescribeThemePermissionsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeTemplateDefinitionInput(v *DescribeTemplateDefinitionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.AliasName != nil { + encoder.SetQuery("alias-name").String(*v.AliasName) + } + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} } @@ -8499,26 +9013,30 @@ func awsRestjson1_serializeOpHttpBindingsDescribeThemePermissionsInput(v *Descri } } - if v.ThemeId == nil || len(*v.ThemeId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ThemeId must not be empty")} + if v.TemplateId == nil || len(*v.TemplateId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member TemplateId must not be empty")} } - if v.ThemeId != nil { - if err := encoder.SetURI("ThemeId").String(*v.ThemeId); err != nil { + if v.TemplateId != nil { + if err := encoder.SetURI("TemplateId").String(*v.TemplateId); err != nil { return err } } + if v.VersionNumber != nil { + encoder.SetQuery("version-number").Long(*v.VersionNumber) + } + return nil } -type awsRestjson1_serializeOpDescribeTopic struct { +type awsRestjson1_serializeOpDescribeTemplatePermissions struct { } -func (*awsRestjson1_serializeOpDescribeTopic) ID() string { +func (*awsRestjson1_serializeOpDescribeTemplatePermissions) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeTopic) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeTemplatePermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -8530,13 +9048,13 @@ func (m *awsRestjson1_serializeOpDescribeTopic) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeTopicInput) + input, ok := in.Parameters.(*DescribeTemplatePermissionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/topics/{TopicId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/templates/{TemplateId}/permissions") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -8552,7 +9070,7 @@ func (m *awsRestjson1_serializeOpDescribeTopic) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeTopicInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeTemplatePermissionsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -8565,7 +9083,7 @@ func (m *awsRestjson1_serializeOpDescribeTopic) HandleSerialize(ctx context.Cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeTopicInput(v *DescribeTopicInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeTemplatePermissionsInput(v *DescribeTemplatePermissionsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -8579,11 +9097,11 @@ func awsRestjson1_serializeOpHttpBindingsDescribeTopicInput(v *DescribeTopicInpu } } - if v.TopicId == nil || len(*v.TopicId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member TopicId must not be empty")} + if v.TemplateId == nil || len(*v.TemplateId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member TemplateId must not be empty")} } - if v.TopicId != nil { - if err := encoder.SetURI("TopicId").String(*v.TopicId); err != nil { + if v.TemplateId != nil { + if err := encoder.SetURI("TemplateId").String(*v.TemplateId); err != nil { return err } } @@ -8591,14 +9109,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeTopicInput(v *DescribeTopicInpu return nil } -type awsRestjson1_serializeOpDescribeTopicPermissions struct { +type awsRestjson1_serializeOpDescribeTheme struct { } -func (*awsRestjson1_serializeOpDescribeTopicPermissions) ID() string { +func (*awsRestjson1_serializeOpDescribeTheme) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeTopicPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeTheme) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -8610,13 +9128,13 @@ func (m *awsRestjson1_serializeOpDescribeTopicPermissions) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeTopicPermissionsInput) + input, ok := in.Parameters.(*DescribeThemeInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/topics/{TopicId}/permissions") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/themes/{ThemeId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -8632,7 +9150,7 @@ func (m *awsRestjson1_serializeOpDescribeTopicPermissions) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeTopicPermissionsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeThemeInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -8645,11 +9163,15 @@ func (m *awsRestjson1_serializeOpDescribeTopicPermissions) HandleSerialize(ctx c span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeTopicPermissionsInput(v *DescribeTopicPermissionsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeThemeInput(v *DescribeThemeInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.AliasName != nil { + encoder.SetQuery("alias-name").String(*v.AliasName) + } + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} } @@ -8659,26 +9181,30 @@ func awsRestjson1_serializeOpHttpBindingsDescribeTopicPermissionsInput(v *Descri } } - if v.TopicId == nil || len(*v.TopicId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member TopicId must not be empty")} + if v.ThemeId == nil || len(*v.ThemeId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ThemeId must not be empty")} } - if v.TopicId != nil { - if err := encoder.SetURI("TopicId").String(*v.TopicId); err != nil { + if v.ThemeId != nil { + if err := encoder.SetURI("ThemeId").String(*v.ThemeId); err != nil { return err } } + if v.VersionNumber != nil { + encoder.SetQuery("version-number").Long(*v.VersionNumber) + } + return nil } -type awsRestjson1_serializeOpDescribeTopicRefresh struct { +type awsRestjson1_serializeOpDescribeThemeAlias struct { } -func (*awsRestjson1_serializeOpDescribeTopicRefresh) ID() string { +func (*awsRestjson1_serializeOpDescribeThemeAlias) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeTopicRefresh) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeThemeAlias) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -8690,13 +9216,13 @@ func (m *awsRestjson1_serializeOpDescribeTopicRefresh) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeTopicRefreshInput) + input, ok := in.Parameters.(*DescribeThemeAliasInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/topics/{TopicId}/refresh/{RefreshId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/themes/{ThemeId}/aliases/{AliasName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -8712,7 +9238,7 @@ func (m *awsRestjson1_serializeOpDescribeTopicRefresh) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeTopicRefreshInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeThemeAliasInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -8725,34 +9251,34 @@ func (m *awsRestjson1_serializeOpDescribeTopicRefresh) HandleSerialize(ctx conte span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeTopicRefreshInput(v *DescribeTopicRefreshInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeThemeAliasInput(v *DescribeThemeAliasInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + if v.AliasName == nil || len(*v.AliasName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AliasName must not be empty")} } - if v.AwsAccountId != nil { - if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + if v.AliasName != nil { + if err := encoder.SetURI("AliasName").String(*v.AliasName); err != nil { return err } } - if v.RefreshId == nil || len(*v.RefreshId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member RefreshId must not be empty")} + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} } - if v.RefreshId != nil { - if err := encoder.SetURI("RefreshId").String(*v.RefreshId); err != nil { + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { return err } } - if v.TopicId == nil || len(*v.TopicId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member TopicId must not be empty")} + if v.ThemeId == nil || len(*v.ThemeId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ThemeId must not be empty")} } - if v.TopicId != nil { - if err := encoder.SetURI("TopicId").String(*v.TopicId); err != nil { + if v.ThemeId != nil { + if err := encoder.SetURI("ThemeId").String(*v.ThemeId); err != nil { return err } } @@ -8760,14 +9286,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeTopicRefreshInput(v *DescribeTo return nil } -type awsRestjson1_serializeOpDescribeTopicRefreshSchedule struct { +type awsRestjson1_serializeOpDescribeThemePermissions struct { } -func (*awsRestjson1_serializeOpDescribeTopicRefreshSchedule) ID() string { +func (*awsRestjson1_serializeOpDescribeThemePermissions) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeTopicRefreshSchedule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeThemePermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -8779,13 +9305,13 @@ func (m *awsRestjson1_serializeOpDescribeTopicRefreshSchedule) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeTopicRefreshScheduleInput) + input, ok := in.Parameters.(*DescribeThemePermissionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/topics/{TopicId}/schedules/{DatasetId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/themes/{ThemeId}/permissions") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -8801,7 +9327,7 @@ func (m *awsRestjson1_serializeOpDescribeTopicRefreshSchedule) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeTopicRefreshScheduleInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeThemePermissionsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -8814,7 +9340,7 @@ func (m *awsRestjson1_serializeOpDescribeTopicRefreshSchedule) HandleSerialize(c span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeTopicRefreshScheduleInput(v *DescribeTopicRefreshScheduleInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeThemePermissionsInput(v *DescribeThemePermissionsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -8828,20 +9354,11 @@ func awsRestjson1_serializeOpHttpBindingsDescribeTopicRefreshScheduleInput(v *De } } - if v.DatasetId == nil || len(*v.DatasetId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DatasetId must not be empty")} - } - if v.DatasetId != nil { - if err := encoder.SetURI("DatasetId").String(*v.DatasetId); err != nil { - return err - } - } - - if v.TopicId == nil || len(*v.TopicId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member TopicId must not be empty")} + if v.ThemeId == nil || len(*v.ThemeId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ThemeId must not be empty")} } - if v.TopicId != nil { - if err := encoder.SetURI("TopicId").String(*v.TopicId); err != nil { + if v.ThemeId != nil { + if err := encoder.SetURI("ThemeId").String(*v.ThemeId); err != nil { return err } } @@ -8849,14 +9366,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeTopicRefreshScheduleInput(v *De return nil } -type awsRestjson1_serializeOpDescribeUser struct { +type awsRestjson1_serializeOpDescribeTopic struct { } -func (*awsRestjson1_serializeOpDescribeUser) ID() string { +func (*awsRestjson1_serializeOpDescribeTopic) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeTopic) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -8868,13 +9385,13 @@ func (m *awsRestjson1_serializeOpDescribeUser) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeUserInput) + input, ok := in.Parameters.(*DescribeTopicInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/users/{UserName}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/topics/{TopicId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -8890,7 +9407,7 @@ func (m *awsRestjson1_serializeOpDescribeUser) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeUserInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeTopicInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -8903,7 +9420,7 @@ func (m *awsRestjson1_serializeOpDescribeUser) HandleSerialize(ctx context.Conte span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeUserInput(v *DescribeUserInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeTopicInput(v *DescribeTopicInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -8917,20 +9434,11 @@ func awsRestjson1_serializeOpHttpBindingsDescribeUserInput(v *DescribeUserInput, } } - if v.Namespace == nil || len(*v.Namespace) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} - } - if v.Namespace != nil { - if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { - return err - } - } - - if v.UserName == nil || len(*v.UserName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member UserName must not be empty")} + if v.TopicId == nil || len(*v.TopicId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member TopicId must not be empty")} } - if v.UserName != nil { - if err := encoder.SetURI("UserName").String(*v.UserName); err != nil { + if v.TopicId != nil { + if err := encoder.SetURI("TopicId").String(*v.TopicId); err != nil { return err } } @@ -8938,14 +9446,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeUserInput(v *DescribeUserInput, return nil } -type awsRestjson1_serializeOpDescribeVPCConnection struct { +type awsRestjson1_serializeOpDescribeTopicPermissions struct { } -func (*awsRestjson1_serializeOpDescribeVPCConnection) ID() string { +func (*awsRestjson1_serializeOpDescribeTopicPermissions) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeVPCConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeTopicPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -8957,13 +9465,13 @@ func (m *awsRestjson1_serializeOpDescribeVPCConnection) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeVPCConnectionInput) + input, ok := in.Parameters.(*DescribeTopicPermissionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/vpc-connections/{VPCConnectionId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/topics/{TopicId}/permissions") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -8979,7 +9487,7 @@ func (m *awsRestjson1_serializeOpDescribeVPCConnection) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeVPCConnectionInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeTopicPermissionsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -8992,7 +9500,7 @@ func (m *awsRestjson1_serializeOpDescribeVPCConnection) HandleSerialize(ctx cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeVPCConnectionInput(v *DescribeVPCConnectionInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeTopicPermissionsInput(v *DescribeTopicPermissionsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -9006,11 +9514,11 @@ func awsRestjson1_serializeOpHttpBindingsDescribeVPCConnectionInput(v *DescribeV } } - if v.VPCConnectionId == nil || len(*v.VPCConnectionId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VPCConnectionId must not be empty")} + if v.TopicId == nil || len(*v.TopicId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member TopicId must not be empty")} } - if v.VPCConnectionId != nil { - if err := encoder.SetURI("VPCConnectionId").String(*v.VPCConnectionId); err != nil { + if v.TopicId != nil { + if err := encoder.SetURI("TopicId").String(*v.TopicId); err != nil { return err } } @@ -9018,14 +9526,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeVPCConnectionInput(v *DescribeV return nil } -type awsRestjson1_serializeOpGenerateEmbedUrlForAnonymousUser struct { +type awsRestjson1_serializeOpDescribeTopicRefresh struct { } -func (*awsRestjson1_serializeOpGenerateEmbedUrlForAnonymousUser) ID() string { +func (*awsRestjson1_serializeOpDescribeTopicRefresh) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGenerateEmbedUrlForAnonymousUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeTopicRefresh) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -9037,16 +9545,16 @@ func (m *awsRestjson1_serializeOpGenerateEmbedUrlForAnonymousUser) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GenerateEmbedUrlForAnonymousUserInput) + input, ok := in.Parameters.(*DescribeTopicRefreshInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/embed-url/anonymous-user") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/topics/{TopicId}/refresh/{RefreshId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -9059,18 +9567,7 @@ func (m *awsRestjson1_serializeOpGenerateEmbedUrlForAnonymousUser) HandleSeriali return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGenerateEmbedUrlForAnonymousUserInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentGenerateEmbedUrlForAnonymousUserInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeTopicRefreshInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -9083,7 +9580,7 @@ func (m *awsRestjson1_serializeOpGenerateEmbedUrlForAnonymousUser) HandleSeriali span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGenerateEmbedUrlForAnonymousUserInput(v *GenerateEmbedUrlForAnonymousUserInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeTopicRefreshInput(v *DescribeTopicRefreshInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -9097,47 +9594,20 @@ func awsRestjson1_serializeOpHttpBindingsGenerateEmbedUrlForAnonymousUserInput(v } } - return nil -} - -func awsRestjson1_serializeOpDocumentGenerateEmbedUrlForAnonymousUserInput(v *GenerateEmbedUrlForAnonymousUserInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.AllowedDomains != nil { - ok := object.Key("AllowedDomains") - if err := awsRestjson1_serializeDocumentStringList(v.AllowedDomains, ok); err != nil { - return err - } - } - - if v.AuthorizedResourceArns != nil { - ok := object.Key("AuthorizedResourceArns") - if err := awsRestjson1_serializeDocumentArnList(v.AuthorizedResourceArns, ok); err != nil { - return err - } + if v.RefreshId == nil || len(*v.RefreshId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member RefreshId must not be empty")} } - - if v.ExperienceConfiguration != nil { - ok := object.Key("ExperienceConfiguration") - if err := awsRestjson1_serializeDocumentAnonymousUserEmbeddingExperienceConfiguration(v.ExperienceConfiguration, ok); err != nil { + if v.RefreshId != nil { + if err := encoder.SetURI("RefreshId").String(*v.RefreshId); err != nil { return err } } - if v.Namespace != nil { - ok := object.Key("Namespace") - ok.String(*v.Namespace) - } - - if v.SessionLifetimeInMinutes != nil { - ok := object.Key("SessionLifetimeInMinutes") - ok.Long(*v.SessionLifetimeInMinutes) + if v.TopicId == nil || len(*v.TopicId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member TopicId must not be empty")} } - - if v.SessionTags != nil { - ok := object.Key("SessionTags") - if err := awsRestjson1_serializeDocumentSessionTagList(v.SessionTags, ok); err != nil { + if v.TopicId != nil { + if err := encoder.SetURI("TopicId").String(*v.TopicId); err != nil { return err } } @@ -9145,14 +9615,14 @@ func awsRestjson1_serializeOpDocumentGenerateEmbedUrlForAnonymousUserInput(v *Ge return nil } -type awsRestjson1_serializeOpGenerateEmbedUrlForRegisteredUser struct { +type awsRestjson1_serializeOpDescribeTopicRefreshSchedule struct { } -func (*awsRestjson1_serializeOpGenerateEmbedUrlForRegisteredUser) ID() string { +func (*awsRestjson1_serializeOpDescribeTopicRefreshSchedule) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGenerateEmbedUrlForRegisteredUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeTopicRefreshSchedule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -9164,16 +9634,16 @@ func (m *awsRestjson1_serializeOpGenerateEmbedUrlForRegisteredUser) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GenerateEmbedUrlForRegisteredUserInput) + input, ok := in.Parameters.(*DescribeTopicRefreshScheduleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/embed-url/registered-user") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/topics/{TopicId}/schedules/{DatasetId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -9186,18 +9656,7 @@ func (m *awsRestjson1_serializeOpGenerateEmbedUrlForRegisteredUser) HandleSerial return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGenerateEmbedUrlForRegisteredUserInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentGenerateEmbedUrlForRegisteredUserInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeTopicRefreshScheduleInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -9210,7 +9669,7 @@ func (m *awsRestjson1_serializeOpGenerateEmbedUrlForRegisteredUser) HandleSerial span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGenerateEmbedUrlForRegisteredUserInput(v *GenerateEmbedUrlForRegisteredUserInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeTopicRefreshScheduleInput(v *DescribeTopicRefreshScheduleInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -9224,48 +9683,35 @@ func awsRestjson1_serializeOpHttpBindingsGenerateEmbedUrlForRegisteredUserInput( } } - return nil -} - -func awsRestjson1_serializeOpDocumentGenerateEmbedUrlForRegisteredUserInput(v *GenerateEmbedUrlForRegisteredUserInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.AllowedDomains != nil { - ok := object.Key("AllowedDomains") - if err := awsRestjson1_serializeDocumentStringList(v.AllowedDomains, ok); err != nil { - return err - } + if v.DatasetId == nil || len(*v.DatasetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DatasetId must not be empty")} } - - if v.ExperienceConfiguration != nil { - ok := object.Key("ExperienceConfiguration") - if err := awsRestjson1_serializeDocumentRegisteredUserEmbeddingExperienceConfiguration(v.ExperienceConfiguration, ok); err != nil { + if v.DatasetId != nil { + if err := encoder.SetURI("DatasetId").String(*v.DatasetId); err != nil { return err } } - if v.SessionLifetimeInMinutes != nil { - ok := object.Key("SessionLifetimeInMinutes") - ok.Long(*v.SessionLifetimeInMinutes) + if v.TopicId == nil || len(*v.TopicId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member TopicId must not be empty")} } - - if v.UserArn != nil { - ok := object.Key("UserArn") - ok.String(*v.UserArn) + if v.TopicId != nil { + if err := encoder.SetURI("TopicId").String(*v.TopicId); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpGetDashboardEmbedUrl struct { +type awsRestjson1_serializeOpDescribeUser struct { } -func (*awsRestjson1_serializeOpGetDashboardEmbedUrl) ID() string { +func (*awsRestjson1_serializeOpDescribeUser) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetDashboardEmbedUrl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -9277,13 +9723,13 @@ func (m *awsRestjson1_serializeOpGetDashboardEmbedUrl) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetDashboardEmbedUrlInput) + input, ok := in.Parameters.(*DescribeUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}/embed-url") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/users/{UserName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -9299,7 +9745,7 @@ func (m *awsRestjson1_serializeOpGetDashboardEmbedUrl) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetDashboardEmbedUrlInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeUserInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -9312,17 +9758,11 @@ func (m *awsRestjson1_serializeOpGetDashboardEmbedUrl) HandleSerialize(ctx conte span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetDashboardEmbedUrlInput(v *GetDashboardEmbedUrlInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeUserInput(v *DescribeUserInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AdditionalDashboardIds != nil { - for i := range v.AdditionalDashboardIds { - encoder.AddQuery("additional-dashboard-ids").String(v.AdditionalDashboardIds[i]) - } - } - if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} } @@ -9332,54 +9772,35 @@ func awsRestjson1_serializeOpHttpBindingsGetDashboardEmbedUrlInput(v *GetDashboa } } - if v.DashboardId == nil || len(*v.DashboardId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DashboardId must not be empty")} + if v.Namespace == nil || len(*v.Namespace) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} } - if v.DashboardId != nil { - if err := encoder.SetURI("DashboardId").String(*v.DashboardId); err != nil { + if v.Namespace != nil { + if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { return err } } - if len(v.IdentityType) > 0 { - encoder.SetQuery("creds-type").String(string(v.IdentityType)) - } - - if v.Namespace != nil { - encoder.SetQuery("namespace").String(*v.Namespace) - } - - if v.ResetDisabled { - encoder.SetQuery("reset-disabled").Boolean(v.ResetDisabled) - } - - if v.SessionLifetimeInMinutes != nil { - encoder.SetQuery("session-lifetime").Long(*v.SessionLifetimeInMinutes) - } - - if v.StatePersistenceEnabled { - encoder.SetQuery("state-persistence-enabled").Boolean(v.StatePersistenceEnabled) - } - - if v.UndoRedoDisabled { - encoder.SetQuery("undo-redo-disabled").Boolean(v.UndoRedoDisabled) + if v.UserName == nil || len(*v.UserName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member UserName must not be empty")} } - - if v.UserArn != nil { - encoder.SetQuery("user-arn").String(*v.UserArn) + if v.UserName != nil { + if err := encoder.SetURI("UserName").String(*v.UserName); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpGetSessionEmbedUrl struct { +type awsRestjson1_serializeOpDescribeVPCConnection struct { } -func (*awsRestjson1_serializeOpGetSessionEmbedUrl) ID() string { +func (*awsRestjson1_serializeOpDescribeVPCConnection) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetSessionEmbedUrl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeVPCConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -9391,13 +9812,13 @@ func (m *awsRestjson1_serializeOpGetSessionEmbedUrl) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetSessionEmbedUrlInput) + input, ok := in.Parameters.(*DescribeVPCConnectionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/session-embed-url") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/vpc-connections/{VPCConnectionId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -9413,7 +9834,7 @@ func (m *awsRestjson1_serializeOpGetSessionEmbedUrl) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetSessionEmbedUrlInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeVPCConnectionInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -9426,7 +9847,7 @@ func (m *awsRestjson1_serializeOpGetSessionEmbedUrl) HandleSerialize(ctx context span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetSessionEmbedUrlInput(v *GetSessionEmbedUrlInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeVPCConnectionInput(v *DescribeVPCConnectionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -9440,29 +9861,26 @@ func awsRestjson1_serializeOpHttpBindingsGetSessionEmbedUrlInput(v *GetSessionEm } } - if v.EntryPoint != nil { - encoder.SetQuery("entry-point").String(*v.EntryPoint) - } - - if v.SessionLifetimeInMinutes != nil { - encoder.SetQuery("session-lifetime").Long(*v.SessionLifetimeInMinutes) + if v.VPCConnectionId == nil || len(*v.VPCConnectionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member VPCConnectionId must not be empty")} } - - if v.UserArn != nil { - encoder.SetQuery("user-arn").String(*v.UserArn) + if v.VPCConnectionId != nil { + if err := encoder.SetURI("VPCConnectionId").String(*v.VPCConnectionId); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpListAnalyses struct { +type awsRestjson1_serializeOpGenerateEmbedUrlForAnonymousUser struct { } -func (*awsRestjson1_serializeOpListAnalyses) ID() string { +func (*awsRestjson1_serializeOpGenerateEmbedUrlForAnonymousUser) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListAnalyses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGenerateEmbedUrlForAnonymousUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -9474,16 +9892,16 @@ func (m *awsRestjson1_serializeOpListAnalyses) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListAnalysesInput) + input, ok := in.Parameters.(*GenerateEmbedUrlForAnonymousUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/analyses") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/embed-url/anonymous-user") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -9496,7 +9914,18 @@ func (m *awsRestjson1_serializeOpListAnalyses) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListAnalysesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGenerateEmbedUrlForAnonymousUserInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentGenerateEmbedUrlForAnonymousUserInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -9509,7 +9938,7 @@ func (m *awsRestjson1_serializeOpListAnalyses) HandleSerialize(ctx context.Conte span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListAnalysesInput(v *ListAnalysesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGenerateEmbedUrlForAnonymousUserInput(v *GenerateEmbedUrlForAnonymousUserInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -9523,25 +9952,62 @@ func awsRestjson1_serializeOpHttpBindingsListAnalysesInput(v *ListAnalysesInput, } } - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) + return nil +} + +func awsRestjson1_serializeOpDocumentGenerateEmbedUrlForAnonymousUserInput(v *GenerateEmbedUrlForAnonymousUserInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AllowedDomains != nil { + ok := object.Key("AllowedDomains") + if err := awsRestjson1_serializeDocumentStringList(v.AllowedDomains, ok); err != nil { + return err + } } - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) + if v.AuthorizedResourceArns != nil { + ok := object.Key("AuthorizedResourceArns") + if err := awsRestjson1_serializeDocumentArnList(v.AuthorizedResourceArns, ok); err != nil { + return err + } + } + + if v.ExperienceConfiguration != nil { + ok := object.Key("ExperienceConfiguration") + if err := awsRestjson1_serializeDocumentAnonymousUserEmbeddingExperienceConfiguration(v.ExperienceConfiguration, ok); err != nil { + return err + } + } + + if v.Namespace != nil { + ok := object.Key("Namespace") + ok.String(*v.Namespace) + } + + if v.SessionLifetimeInMinutes != nil { + ok := object.Key("SessionLifetimeInMinutes") + ok.Long(*v.SessionLifetimeInMinutes) + } + + if v.SessionTags != nil { + ok := object.Key("SessionTags") + if err := awsRestjson1_serializeDocumentSessionTagList(v.SessionTags, ok); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpListAssetBundleExportJobs struct { +type awsRestjson1_serializeOpGenerateEmbedUrlForRegisteredUser struct { } -func (*awsRestjson1_serializeOpListAssetBundleExportJobs) ID() string { +func (*awsRestjson1_serializeOpGenerateEmbedUrlForRegisteredUser) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListAssetBundleExportJobs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGenerateEmbedUrlForRegisteredUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -9553,16 +10019,16 @@ func (m *awsRestjson1_serializeOpListAssetBundleExportJobs) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListAssetBundleExportJobsInput) + input, ok := in.Parameters.(*GenerateEmbedUrlForRegisteredUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/asset-bundle-export-jobs") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/embed-url/registered-user") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -9575,7 +10041,18 @@ func (m *awsRestjson1_serializeOpListAssetBundleExportJobs) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListAssetBundleExportJobsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGenerateEmbedUrlForRegisteredUserInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentGenerateEmbedUrlForRegisteredUserInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -9588,7 +10065,7 @@ func (m *awsRestjson1_serializeOpListAssetBundleExportJobs) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListAssetBundleExportJobsInput(v *ListAssetBundleExportJobsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGenerateEmbedUrlForRegisteredUserInput(v *GenerateEmbedUrlForRegisteredUserInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -9602,25 +10079,48 @@ func awsRestjson1_serializeOpHttpBindingsListAssetBundleExportJobsInput(v *ListA } } - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) + return nil +} + +func awsRestjson1_serializeOpDocumentGenerateEmbedUrlForRegisteredUserInput(v *GenerateEmbedUrlForRegisteredUserInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AllowedDomains != nil { + ok := object.Key("AllowedDomains") + if err := awsRestjson1_serializeDocumentStringList(v.AllowedDomains, ok); err != nil { + return err + } } - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) + if v.ExperienceConfiguration != nil { + ok := object.Key("ExperienceConfiguration") + if err := awsRestjson1_serializeDocumentRegisteredUserEmbeddingExperienceConfiguration(v.ExperienceConfiguration, ok); err != nil { + return err + } + } + + if v.SessionLifetimeInMinutes != nil { + ok := object.Key("SessionLifetimeInMinutes") + ok.Long(*v.SessionLifetimeInMinutes) + } + + if v.UserArn != nil { + ok := object.Key("UserArn") + ok.String(*v.UserArn) } return nil } -type awsRestjson1_serializeOpListAssetBundleImportJobs struct { +type awsRestjson1_serializeOpGetDashboardEmbedUrl struct { } -func (*awsRestjson1_serializeOpListAssetBundleImportJobs) ID() string { +func (*awsRestjson1_serializeOpGetDashboardEmbedUrl) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListAssetBundleImportJobs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetDashboardEmbedUrl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -9632,13 +10132,13 @@ func (m *awsRestjson1_serializeOpListAssetBundleImportJobs) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListAssetBundleImportJobsInput) + input, ok := in.Parameters.(*GetDashboardEmbedUrlInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/asset-bundle-import-jobs") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}/embed-url") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -9654,7 +10154,7 @@ func (m *awsRestjson1_serializeOpListAssetBundleImportJobs) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListAssetBundleImportJobsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetDashboardEmbedUrlInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -9667,11 +10167,17 @@ func (m *awsRestjson1_serializeOpListAssetBundleImportJobs) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListAssetBundleImportJobsInput(v *ListAssetBundleImportJobsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetDashboardEmbedUrlInput(v *GetDashboardEmbedUrlInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.AdditionalDashboardIds != nil { + for i := range v.AdditionalDashboardIds { + encoder.AddQuery("additional-dashboard-ids").String(v.AdditionalDashboardIds[i]) + } + } + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} } @@ -9681,27 +10187,56 @@ func awsRestjson1_serializeOpHttpBindingsListAssetBundleImportJobsInput(v *ListA } } - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) + if v.DashboardId == nil || len(*v.DashboardId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DashboardId must not be empty")} + } + if v.DashboardId != nil { + if err := encoder.SetURI("DashboardId").String(*v.DashboardId); err != nil { + return err + } } - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) + if len(v.IdentityType) > 0 { + encoder.SetQuery("creds-type").String(string(v.IdentityType)) } - return nil -} + if v.Namespace != nil { + encoder.SetQuery("namespace").String(*v.Namespace) + } -type awsRestjson1_serializeOpListDashboards struct { -} + if v.ResetDisabled { + encoder.SetQuery("reset-disabled").Boolean(v.ResetDisabled) + } -func (*awsRestjson1_serializeOpListDashboards) ID() string { - return "OperationSerializer" -} + if v.SessionLifetimeInMinutes != nil { + encoder.SetQuery("session-lifetime").Long(*v.SessionLifetimeInMinutes) + } -func (m *awsRestjson1_serializeOpListDashboards) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { + if v.StatePersistenceEnabled { + encoder.SetQuery("state-persistence-enabled").Boolean(v.StatePersistenceEnabled) + } + + if v.UndoRedoDisabled { + encoder.SetQuery("undo-redo-disabled").Boolean(v.UndoRedoDisabled) + } + + if v.UserArn != nil { + encoder.SetQuery("user-arn").String(*v.UserArn) + } + + return nil +} + +type awsRestjson1_serializeOpGetSessionEmbedUrl struct { +} + +func (*awsRestjson1_serializeOpGetSessionEmbedUrl) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetSessionEmbedUrl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { _, span := tracing.StartSpan(ctx, "OperationSerializer") endTimer := startMetricTimer(ctx, "client.call.serialization_duration") defer endTimer() @@ -9711,13 +10246,13 @@ func (m *awsRestjson1_serializeOpListDashboards) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListDashboardsInput) + input, ok := in.Parameters.(*GetSessionEmbedUrlInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/session-embed-url") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -9733,7 +10268,7 @@ func (m *awsRestjson1_serializeOpListDashboards) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListDashboardsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetSessionEmbedUrlInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -9746,7 +10281,7 @@ func (m *awsRestjson1_serializeOpListDashboards) HandleSerialize(ctx context.Con span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListDashboardsInput(v *ListDashboardsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetSessionEmbedUrlInput(v *GetSessionEmbedUrlInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -9760,25 +10295,29 @@ func awsRestjson1_serializeOpHttpBindingsListDashboardsInput(v *ListDashboardsIn } } - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) + if v.EntryPoint != nil { + encoder.SetQuery("entry-point").String(*v.EntryPoint) } - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) + if v.SessionLifetimeInMinutes != nil { + encoder.SetQuery("session-lifetime").Long(*v.SessionLifetimeInMinutes) + } + + if v.UserArn != nil { + encoder.SetQuery("user-arn").String(*v.UserArn) } return nil } -type awsRestjson1_serializeOpListDashboardVersions struct { +type awsRestjson1_serializeOpListAnalyses struct { } -func (*awsRestjson1_serializeOpListDashboardVersions) ID() string { +func (*awsRestjson1_serializeOpListAnalyses) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListDashboardVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListAnalyses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -9790,13 +10329,13 @@ func (m *awsRestjson1_serializeOpListDashboardVersions) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListDashboardVersionsInput) + input, ok := in.Parameters.(*ListAnalysesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}/versions") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/analyses") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -9812,7 +10351,7 @@ func (m *awsRestjson1_serializeOpListDashboardVersions) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListDashboardVersionsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListAnalysesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -9825,7 +10364,7 @@ func (m *awsRestjson1_serializeOpListDashboardVersions) HandleSerialize(ctx cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListDashboardVersionsInput(v *ListDashboardVersionsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListAnalysesInput(v *ListAnalysesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -9839,15 +10378,6 @@ func awsRestjson1_serializeOpHttpBindingsListDashboardVersionsInput(v *ListDashb } } - if v.DashboardId == nil || len(*v.DashboardId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DashboardId must not be empty")} - } - if v.DashboardId != nil { - if err := encoder.SetURI("DashboardId").String(*v.DashboardId); err != nil { - return err - } - } - if v.MaxResults != nil { encoder.SetQuery("max-results").Integer(*v.MaxResults) } @@ -9859,14 +10389,14 @@ func awsRestjson1_serializeOpHttpBindingsListDashboardVersionsInput(v *ListDashb return nil } -type awsRestjson1_serializeOpListDataSets struct { +type awsRestjson1_serializeOpListAssetBundleExportJobs struct { } -func (*awsRestjson1_serializeOpListDataSets) ID() string { +func (*awsRestjson1_serializeOpListAssetBundleExportJobs) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListDataSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListAssetBundleExportJobs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -9878,13 +10408,13 @@ func (m *awsRestjson1_serializeOpListDataSets) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListDataSetsInput) + input, ok := in.Parameters.(*ListAssetBundleExportJobsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/asset-bundle-export-jobs") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -9900,7 +10430,7 @@ func (m *awsRestjson1_serializeOpListDataSets) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListDataSetsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListAssetBundleExportJobsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -9913,7 +10443,7 @@ func (m *awsRestjson1_serializeOpListDataSets) HandleSerialize(ctx context.Conte span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListDataSetsInput(v *ListDataSetsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListAssetBundleExportJobsInput(v *ListAssetBundleExportJobsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -9938,14 +10468,14 @@ func awsRestjson1_serializeOpHttpBindingsListDataSetsInput(v *ListDataSetsInput, return nil } -type awsRestjson1_serializeOpListDataSources struct { +type awsRestjson1_serializeOpListAssetBundleImportJobs struct { } -func (*awsRestjson1_serializeOpListDataSources) ID() string { +func (*awsRestjson1_serializeOpListAssetBundleImportJobs) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListDataSources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListAssetBundleImportJobs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -9957,13 +10487,13 @@ func (m *awsRestjson1_serializeOpListDataSources) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListDataSourcesInput) + input, ok := in.Parameters.(*ListAssetBundleImportJobsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sources") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/asset-bundle-import-jobs") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -9979,7 +10509,7 @@ func (m *awsRestjson1_serializeOpListDataSources) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListDataSourcesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListAssetBundleImportJobsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -9992,7 +10522,7 @@ func (m *awsRestjson1_serializeOpListDataSources) HandleSerialize(ctx context.Co span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListDataSourcesInput(v *ListDataSourcesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListAssetBundleImportJobsInput(v *ListAssetBundleImportJobsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -10017,14 +10547,14 @@ func awsRestjson1_serializeOpHttpBindingsListDataSourcesInput(v *ListDataSources return nil } -type awsRestjson1_serializeOpListFolderMembers struct { +type awsRestjson1_serializeOpListBrands struct { } -func (*awsRestjson1_serializeOpListFolderMembers) ID() string { +func (*awsRestjson1_serializeOpListBrands) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListFolderMembers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListBrands) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -10036,13 +10566,13 @@ func (m *awsRestjson1_serializeOpListFolderMembers) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListFolderMembersInput) + input, ok := in.Parameters.(*ListBrandsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/folders/{FolderId}/members") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/brands") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -10058,7 +10588,7 @@ func (m *awsRestjson1_serializeOpListFolderMembers) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListFolderMembersInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListBrandsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -10071,7 +10601,7 @@ func (m *awsRestjson1_serializeOpListFolderMembers) HandleSerialize(ctx context. span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListFolderMembersInput(v *ListFolderMembersInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListBrandsInput(v *ListBrandsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -10085,15 +10615,6 @@ func awsRestjson1_serializeOpHttpBindingsListFolderMembersInput(v *ListFolderMem } } - if v.FolderId == nil || len(*v.FolderId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member FolderId must not be empty")} - } - if v.FolderId != nil { - if err := encoder.SetURI("FolderId").String(*v.FolderId); err != nil { - return err - } - } - if v.MaxResults != nil { encoder.SetQuery("max-results").Integer(*v.MaxResults) } @@ -10105,14 +10626,14 @@ func awsRestjson1_serializeOpHttpBindingsListFolderMembersInput(v *ListFolderMem return nil } -type awsRestjson1_serializeOpListFolders struct { +type awsRestjson1_serializeOpListCustomPermissions struct { } -func (*awsRestjson1_serializeOpListFolders) ID() string { +func (*awsRestjson1_serializeOpListCustomPermissions) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListFolders) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListCustomPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -10124,13 +10645,13 @@ func (m *awsRestjson1_serializeOpListFolders) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListFoldersInput) + input, ok := in.Parameters.(*ListCustomPermissionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/folders") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/custom-permissions") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -10146,7 +10667,7 @@ func (m *awsRestjson1_serializeOpListFolders) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListFoldersInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListCustomPermissionsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -10159,7 +10680,7 @@ func (m *awsRestjson1_serializeOpListFolders) HandleSerialize(ctx context.Contex span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListFoldersInput(v *ListFoldersInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListCustomPermissionsInput(v *ListCustomPermissionsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -10184,14 +10705,14 @@ func awsRestjson1_serializeOpHttpBindingsListFoldersInput(v *ListFoldersInput, e return nil } -type awsRestjson1_serializeOpListFoldersForResource struct { +type awsRestjson1_serializeOpListDashboards struct { } -func (*awsRestjson1_serializeOpListFoldersForResource) ID() string { +func (*awsRestjson1_serializeOpListDashboards) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListFoldersForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListDashboards) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -10203,13 +10724,13 @@ func (m *awsRestjson1_serializeOpListFoldersForResource) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListFoldersForResourceInput) + input, ok := in.Parameters.(*ListDashboardsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/resource/{ResourceArn}/folders") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -10225,7 +10746,7 @@ func (m *awsRestjson1_serializeOpListFoldersForResource) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListFoldersForResourceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListDashboardsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -10238,7 +10759,7 @@ func (m *awsRestjson1_serializeOpListFoldersForResource) HandleSerialize(ctx con span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListFoldersForResourceInput(v *ListFoldersForResourceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListDashboardsInput(v *ListDashboardsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -10260,26 +10781,17 @@ func awsRestjson1_serializeOpHttpBindingsListFoldersForResourceInput(v *ListFold encoder.SetQuery("next-token").String(*v.NextToken) } - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} - } - if v.ResourceArn != nil { - if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { - return err - } - } - return nil } -type awsRestjson1_serializeOpListGroupMemberships struct { +type awsRestjson1_serializeOpListDashboardVersions struct { } -func (*awsRestjson1_serializeOpListGroupMemberships) ID() string { +func (*awsRestjson1_serializeOpListDashboardVersions) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListGroupMemberships) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListDashboardVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -10291,13 +10803,13 @@ func (m *awsRestjson1_serializeOpListGroupMemberships) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListGroupMembershipsInput) + input, ok := in.Parameters.(*ListDashboardVersionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/groups/{GroupName}/members") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}/versions") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -10313,7 +10825,7 @@ func (m *awsRestjson1_serializeOpListGroupMemberships) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListGroupMembershipsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListDashboardVersionsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -10326,7 +10838,7 @@ func (m *awsRestjson1_serializeOpListGroupMemberships) HandleSerialize(ctx conte span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListGroupMembershipsInput(v *ListGroupMembershipsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListDashboardVersionsInput(v *ListDashboardVersionsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -10340,11 +10852,11 @@ func awsRestjson1_serializeOpHttpBindingsListGroupMembershipsInput(v *ListGroupM } } - if v.GroupName == nil || len(*v.GroupName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member GroupName must not be empty")} + if v.DashboardId == nil || len(*v.DashboardId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DashboardId must not be empty")} } - if v.GroupName != nil { - if err := encoder.SetURI("GroupName").String(*v.GroupName); err != nil { + if v.DashboardId != nil { + if err := encoder.SetURI("DashboardId").String(*v.DashboardId); err != nil { return err } } @@ -10353,15 +10865,6 @@ func awsRestjson1_serializeOpHttpBindingsListGroupMembershipsInput(v *ListGroupM encoder.SetQuery("max-results").Integer(*v.MaxResults) } - if v.Namespace == nil || len(*v.Namespace) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} - } - if v.Namespace != nil { - if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { - return err - } - } - if v.NextToken != nil { encoder.SetQuery("next-token").String(*v.NextToken) } @@ -10369,14 +10872,14 @@ func awsRestjson1_serializeOpHttpBindingsListGroupMembershipsInput(v *ListGroupM return nil } -type awsRestjson1_serializeOpListGroups struct { +type awsRestjson1_serializeOpListDataSets struct { } -func (*awsRestjson1_serializeOpListGroups) ID() string { +func (*awsRestjson1_serializeOpListDataSets) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListDataSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -10388,13 +10891,13 @@ func (m *awsRestjson1_serializeOpListGroups) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListGroupsInput) + input, ok := in.Parameters.(*ListDataSetsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/groups") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -10410,7 +10913,7 @@ func (m *awsRestjson1_serializeOpListGroups) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListGroupsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListDataSetsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -10423,7 +10926,7 @@ func (m *awsRestjson1_serializeOpListGroups) HandleSerialize(ctx context.Context span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListGroupsInput(v *ListGroupsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListDataSetsInput(v *ListDataSetsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -10441,15 +10944,6 @@ func awsRestjson1_serializeOpHttpBindingsListGroupsInput(v *ListGroupsInput, enc encoder.SetQuery("max-results").Integer(*v.MaxResults) } - if v.Namespace == nil || len(*v.Namespace) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} - } - if v.Namespace != nil { - if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { - return err - } - } - if v.NextToken != nil { encoder.SetQuery("next-token").String(*v.NextToken) } @@ -10457,14 +10951,14 @@ func awsRestjson1_serializeOpHttpBindingsListGroupsInput(v *ListGroupsInput, enc return nil } -type awsRestjson1_serializeOpListIAMPolicyAssignments struct { +type awsRestjson1_serializeOpListDataSources struct { } -func (*awsRestjson1_serializeOpListIAMPolicyAssignments) ID() string { +func (*awsRestjson1_serializeOpListDataSources) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListIAMPolicyAssignments) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListDataSources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -10476,13 +10970,13 @@ func (m *awsRestjson1_serializeOpListIAMPolicyAssignments) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListIAMPolicyAssignmentsInput) + input, ok := in.Parameters.(*ListDataSourcesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/v2/iam-policy-assignments") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sources") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -10498,7 +10992,7 @@ func (m *awsRestjson1_serializeOpListIAMPolicyAssignments) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListIAMPolicyAssignmentsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListDataSourcesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -10511,15 +11005,11 @@ func (m *awsRestjson1_serializeOpListIAMPolicyAssignments) HandleSerialize(ctx c span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListIAMPolicyAssignmentsInput(v *ListIAMPolicyAssignmentsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListDataSourcesInput(v *ListDataSourcesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if len(v.AssignmentStatus) > 0 { - encoder.SetQuery("assignment-status").String(string(v.AssignmentStatus)) - } - if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} } @@ -10533,15 +11023,6 @@ func awsRestjson1_serializeOpHttpBindingsListIAMPolicyAssignmentsInput(v *ListIA encoder.SetQuery("max-results").Integer(*v.MaxResults) } - if v.Namespace == nil || len(*v.Namespace) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} - } - if v.Namespace != nil { - if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { - return err - } - } - if v.NextToken != nil { encoder.SetQuery("next-token").String(*v.NextToken) } @@ -10549,14 +11030,14 @@ func awsRestjson1_serializeOpHttpBindingsListIAMPolicyAssignmentsInput(v *ListIA return nil } -type awsRestjson1_serializeOpListIAMPolicyAssignmentsForUser struct { +type awsRestjson1_serializeOpListFolderMembers struct { } -func (*awsRestjson1_serializeOpListIAMPolicyAssignmentsForUser) ID() string { +func (*awsRestjson1_serializeOpListFolderMembers) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListIAMPolicyAssignmentsForUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListFolderMembers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -10568,13 +11049,13 @@ func (m *awsRestjson1_serializeOpListIAMPolicyAssignmentsForUser) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListIAMPolicyAssignmentsForUserInput) + input, ok := in.Parameters.(*ListFolderMembersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/users/{UserName}/iam-policy-assignments") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/folders/{FolderId}/members") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -10590,7 +11071,7 @@ func (m *awsRestjson1_serializeOpListIAMPolicyAssignmentsForUser) HandleSerializ return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListIAMPolicyAssignmentsForUserInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListFolderMembersInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -10603,7 +11084,7 @@ func (m *awsRestjson1_serializeOpListIAMPolicyAssignmentsForUser) HandleSerializ span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListIAMPolicyAssignmentsForUserInput(v *ListIAMPolicyAssignmentsForUserInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListFolderMembersInput(v *ListFolderMembersInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -10617,43 +11098,34 @@ func awsRestjson1_serializeOpHttpBindingsListIAMPolicyAssignmentsForUserInput(v } } - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.Namespace == nil || len(*v.Namespace) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} + if v.FolderId == nil || len(*v.FolderId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FolderId must not be empty")} } - if v.Namespace != nil { - if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { + if v.FolderId != nil { + if err := encoder.SetURI("FolderId").String(*v.FolderId); err != nil { return err } } + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + if v.NextToken != nil { encoder.SetQuery("next-token").String(*v.NextToken) } - if v.UserName == nil || len(*v.UserName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member UserName must not be empty")} - } - if v.UserName != nil { - if err := encoder.SetURI("UserName").String(*v.UserName); err != nil { - return err - } - } - return nil } -type awsRestjson1_serializeOpListIdentityPropagationConfigs struct { +type awsRestjson1_serializeOpListFolders struct { } -func (*awsRestjson1_serializeOpListIdentityPropagationConfigs) ID() string { +func (*awsRestjson1_serializeOpListFolders) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListIdentityPropagationConfigs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListFolders) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -10665,13 +11137,13 @@ func (m *awsRestjson1_serializeOpListIdentityPropagationConfigs) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListIdentityPropagationConfigsInput) + input, ok := in.Parameters.(*ListFoldersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/identity-propagation-config") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/folders") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -10687,7 +11159,7 @@ func (m *awsRestjson1_serializeOpListIdentityPropagationConfigs) HandleSerialize return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListIdentityPropagationConfigsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListFoldersInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -10700,7 +11172,7 @@ func (m *awsRestjson1_serializeOpListIdentityPropagationConfigs) HandleSerialize span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListIdentityPropagationConfigsInput(v *ListIdentityPropagationConfigsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListFoldersInput(v *ListFoldersInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -10725,14 +11197,14 @@ func awsRestjson1_serializeOpHttpBindingsListIdentityPropagationConfigsInput(v * return nil } -type awsRestjson1_serializeOpListIngestions struct { +type awsRestjson1_serializeOpListFoldersForResource struct { } -func (*awsRestjson1_serializeOpListIngestions) ID() string { +func (*awsRestjson1_serializeOpListFoldersForResource) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListIngestions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListFoldersForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -10744,13 +11216,13 @@ func (m *awsRestjson1_serializeOpListIngestions) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListIngestionsInput) + input, ok := in.Parameters.(*ListFoldersForResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/ingestions") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/resource/{ResourceArn}/folders") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -10766,7 +11238,7 @@ func (m *awsRestjson1_serializeOpListIngestions) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListIngestionsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListFoldersForResourceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -10779,7 +11251,7 @@ func (m *awsRestjson1_serializeOpListIngestions) HandleSerialize(ctx context.Con span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListIngestionsInput(v *ListIngestionsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListFoldersForResourceInput(v *ListFoldersForResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -10793,15 +11265,6 @@ func awsRestjson1_serializeOpHttpBindingsListIngestionsInput(v *ListIngestionsIn } } - if v.DataSetId == nil || len(*v.DataSetId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} - } - if v.DataSetId != nil { - if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { - return err - } - } - if v.MaxResults != nil { encoder.SetQuery("max-results").Integer(*v.MaxResults) } @@ -10810,17 +11273,26 @@ func awsRestjson1_serializeOpHttpBindingsListIngestionsInput(v *ListIngestionsIn encoder.SetQuery("next-token").String(*v.NextToken) } + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + return nil } -type awsRestjson1_serializeOpListNamespaces struct { +type awsRestjson1_serializeOpListGroupMemberships struct { } -func (*awsRestjson1_serializeOpListNamespaces) ID() string { +func (*awsRestjson1_serializeOpListGroupMemberships) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListNamespaces) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListGroupMemberships) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -10832,13 +11304,13 @@ func (m *awsRestjson1_serializeOpListNamespaces) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListNamespacesInput) + input, ok := in.Parameters.(*ListGroupMembershipsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/groups/{GroupName}/members") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -10854,7 +11326,7 @@ func (m *awsRestjson1_serializeOpListNamespaces) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListNamespacesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListGroupMembershipsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -10867,7 +11339,7 @@ func (m *awsRestjson1_serializeOpListNamespaces) HandleSerialize(ctx context.Con span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListNamespacesInput(v *ListNamespacesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListGroupMembershipsInput(v *ListGroupMembershipsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -10881,10 +11353,28 @@ func awsRestjson1_serializeOpHttpBindingsListNamespacesInput(v *ListNamespacesIn } } + if v.GroupName == nil || len(*v.GroupName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GroupName must not be empty")} + } + if v.GroupName != nil { + if err := encoder.SetURI("GroupName").String(*v.GroupName); err != nil { + return err + } + } + if v.MaxResults != nil { encoder.SetQuery("max-results").Integer(*v.MaxResults) } + if v.Namespace == nil || len(*v.Namespace) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} + } + if v.Namespace != nil { + if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { + return err + } + } + if v.NextToken != nil { encoder.SetQuery("next-token").String(*v.NextToken) } @@ -10892,14 +11382,14 @@ func awsRestjson1_serializeOpHttpBindingsListNamespacesInput(v *ListNamespacesIn return nil } -type awsRestjson1_serializeOpListRefreshSchedules struct { +type awsRestjson1_serializeOpListGroups struct { } -func (*awsRestjson1_serializeOpListRefreshSchedules) ID() string { +func (*awsRestjson1_serializeOpListGroups) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListRefreshSchedules) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -10911,13 +11401,13 @@ func (m *awsRestjson1_serializeOpListRefreshSchedules) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListRefreshSchedulesInput) + input, ok := in.Parameters.(*ListGroupsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/refresh-schedules") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/groups") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -10933,7 +11423,7 @@ func (m *awsRestjson1_serializeOpListRefreshSchedules) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListRefreshSchedulesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListGroupsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -10946,7 +11436,7 @@ func (m *awsRestjson1_serializeOpListRefreshSchedules) HandleSerialize(ctx conte span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListRefreshSchedulesInput(v *ListRefreshSchedulesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListGroupsInput(v *ListGroupsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -10960,26 +11450,34 @@ func awsRestjson1_serializeOpHttpBindingsListRefreshSchedulesInput(v *ListRefres } } - if v.DataSetId == nil || len(*v.DataSetId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) } - if v.DataSetId != nil { - if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { + + if v.Namespace == nil || len(*v.Namespace) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} + } + if v.Namespace != nil { + if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { return err } } + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + return nil } -type awsRestjson1_serializeOpListRoleMemberships struct { +type awsRestjson1_serializeOpListIAMPolicyAssignments struct { } -func (*awsRestjson1_serializeOpListRoleMemberships) ID() string { +func (*awsRestjson1_serializeOpListIAMPolicyAssignments) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListRoleMemberships) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListIAMPolicyAssignments) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -10991,13 +11489,13 @@ func (m *awsRestjson1_serializeOpListRoleMemberships) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListRoleMembershipsInput) + input, ok := in.Parameters.(*ListIAMPolicyAssignmentsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/roles/{Role}/members") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/v2/iam-policy-assignments") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -11013,7 +11511,7 @@ func (m *awsRestjson1_serializeOpListRoleMemberships) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListRoleMembershipsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListIAMPolicyAssignmentsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -11026,11 +11524,15 @@ func (m *awsRestjson1_serializeOpListRoleMemberships) HandleSerialize(ctx contex span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListRoleMembershipsInput(v *ListRoleMembershipsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListIAMPolicyAssignmentsInput(v *ListIAMPolicyAssignmentsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } + if len(v.AssignmentStatus) > 0 { + encoder.SetQuery("assignment-status").String(string(v.AssignmentStatus)) + } + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} } @@ -11057,26 +11559,17 @@ func awsRestjson1_serializeOpHttpBindingsListRoleMembershipsInput(v *ListRoleMem encoder.SetQuery("next-token").String(*v.NextToken) } - if len(v.Role) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Role must not be empty")} - } - if len(v.Role) > 0 { - if err := encoder.SetURI("Role").String(string(v.Role)); err != nil { - return err - } - } - return nil } -type awsRestjson1_serializeOpListTagsForResource struct { +type awsRestjson1_serializeOpListIAMPolicyAssignmentsForUser struct { } -func (*awsRestjson1_serializeOpListTagsForResource) ID() string { +func (*awsRestjson1_serializeOpListIAMPolicyAssignmentsForUser) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListIAMPolicyAssignmentsForUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -11088,13 +11581,13 @@ func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListTagsForResourceInput) + input, ok := in.Parameters.(*ListIAMPolicyAssignmentsForUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/resources/{ResourceArn}/tags") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/users/{UserName}/iam-policy-assignments") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -11110,7 +11603,7 @@ func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListIAMPolicyAssignmentsForUserInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -11123,16 +11616,42 @@ func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx contex span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListIAMPolicyAssignmentsForUserInput(v *ListIAMPolicyAssignmentsForUserInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} } - if v.ResourceArn != nil { - if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.Namespace == nil || len(*v.Namespace) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} + } + if v.Namespace != nil { + if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { + return err + } + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + if v.UserName == nil || len(*v.UserName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member UserName must not be empty")} + } + if v.UserName != nil { + if err := encoder.SetURI("UserName").String(*v.UserName); err != nil { return err } } @@ -11140,14 +11659,14 @@ func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsFor return nil } -type awsRestjson1_serializeOpListTemplateAliases struct { +type awsRestjson1_serializeOpListIdentityPropagationConfigs struct { } -func (*awsRestjson1_serializeOpListTemplateAliases) ID() string { +func (*awsRestjson1_serializeOpListIdentityPropagationConfigs) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListTemplateAliases) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListIdentityPropagationConfigs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -11159,13 +11678,13 @@ func (m *awsRestjson1_serializeOpListTemplateAliases) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListTemplateAliasesInput) + input, ok := in.Parameters.(*ListIdentityPropagationConfigsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/templates/{TemplateId}/aliases") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/identity-propagation-config") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -11181,7 +11700,7 @@ func (m *awsRestjson1_serializeOpListTemplateAliases) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListTemplateAliasesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListIdentityPropagationConfigsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -11194,7 +11713,7 @@ func (m *awsRestjson1_serializeOpListTemplateAliases) HandleSerialize(ctx contex span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListTemplateAliasesInput(v *ListTemplateAliasesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListIdentityPropagationConfigsInput(v *ListIdentityPropagationConfigsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -11209,33 +11728,24 @@ func awsRestjson1_serializeOpHttpBindingsListTemplateAliasesInput(v *ListTemplat } if v.MaxResults != nil { - encoder.SetQuery("max-result").Integer(*v.MaxResults) + encoder.SetQuery("max-results").Integer(*v.MaxResults) } if v.NextToken != nil { encoder.SetQuery("next-token").String(*v.NextToken) } - if v.TemplateId == nil || len(*v.TemplateId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member TemplateId must not be empty")} - } - if v.TemplateId != nil { - if err := encoder.SetURI("TemplateId").String(*v.TemplateId); err != nil { - return err - } - } - return nil } -type awsRestjson1_serializeOpListTemplates struct { +type awsRestjson1_serializeOpListIngestions struct { } -func (*awsRestjson1_serializeOpListTemplates) ID() string { +func (*awsRestjson1_serializeOpListIngestions) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListTemplates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListIngestions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -11247,13 +11757,13 @@ func (m *awsRestjson1_serializeOpListTemplates) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListTemplatesInput) + input, ok := in.Parameters.(*ListIngestionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/templates") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/ingestions") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -11269,7 +11779,7 @@ func (m *awsRestjson1_serializeOpListTemplates) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListTemplatesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListIngestionsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -11282,7 +11792,7 @@ func (m *awsRestjson1_serializeOpListTemplates) HandleSerialize(ctx context.Cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListTemplatesInput(v *ListTemplatesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListIngestionsInput(v *ListIngestionsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -11296,8 +11806,17 @@ func awsRestjson1_serializeOpHttpBindingsListTemplatesInput(v *ListTemplatesInpu } } + if v.DataSetId == nil || len(*v.DataSetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} + } + if v.DataSetId != nil { + if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { + return err + } + } + if v.MaxResults != nil { - encoder.SetQuery("max-result").Integer(*v.MaxResults) + encoder.SetQuery("max-results").Integer(*v.MaxResults) } if v.NextToken != nil { @@ -11307,14 +11826,14 @@ func awsRestjson1_serializeOpHttpBindingsListTemplatesInput(v *ListTemplatesInpu return nil } -type awsRestjson1_serializeOpListTemplateVersions struct { +type awsRestjson1_serializeOpListNamespaces struct { } -func (*awsRestjson1_serializeOpListTemplateVersions) ID() string { +func (*awsRestjson1_serializeOpListNamespaces) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListTemplateVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListNamespaces) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -11326,13 +11845,13 @@ func (m *awsRestjson1_serializeOpListTemplateVersions) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListTemplateVersionsInput) + input, ok := in.Parameters.(*ListNamespacesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/templates/{TemplateId}/versions") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -11348,7 +11867,7 @@ func (m *awsRestjson1_serializeOpListTemplateVersions) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListTemplateVersionsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListNamespacesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -11361,7 +11880,7 @@ func (m *awsRestjson1_serializeOpListTemplateVersions) HandleSerialize(ctx conte span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListTemplateVersionsInput(v *ListTemplateVersionsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListNamespacesInput(v *ListNamespacesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -11383,26 +11902,17 @@ func awsRestjson1_serializeOpHttpBindingsListTemplateVersionsInput(v *ListTempla encoder.SetQuery("next-token").String(*v.NextToken) } - if v.TemplateId == nil || len(*v.TemplateId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member TemplateId must not be empty")} - } - if v.TemplateId != nil { - if err := encoder.SetURI("TemplateId").String(*v.TemplateId); err != nil { - return err - } - } - return nil } -type awsRestjson1_serializeOpListThemeAliases struct { +type awsRestjson1_serializeOpListRefreshSchedules struct { } -func (*awsRestjson1_serializeOpListThemeAliases) ID() string { +func (*awsRestjson1_serializeOpListRefreshSchedules) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListThemeAliases) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListRefreshSchedules) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -11414,13 +11924,13 @@ func (m *awsRestjson1_serializeOpListThemeAliases) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListThemeAliasesInput) + input, ok := in.Parameters.(*ListRefreshSchedulesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/themes/{ThemeId}/aliases") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/refresh-schedules") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -11436,7 +11946,7 @@ func (m *awsRestjson1_serializeOpListThemeAliases) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListThemeAliasesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListRefreshSchedulesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -11449,7 +11959,7 @@ func (m *awsRestjson1_serializeOpListThemeAliases) HandleSerialize(ctx context.C span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListThemeAliasesInput(v *ListThemeAliasesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListRefreshSchedulesInput(v *ListRefreshSchedulesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -11463,19 +11973,11 @@ func awsRestjson1_serializeOpHttpBindingsListThemeAliasesInput(v *ListThemeAlias } } - if v.MaxResults != nil { - encoder.SetQuery("max-result").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - if v.ThemeId == nil || len(*v.ThemeId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ThemeId must not be empty")} + if v.DataSetId == nil || len(*v.DataSetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} } - if v.ThemeId != nil { - if err := encoder.SetURI("ThemeId").String(*v.ThemeId); err != nil { + if v.DataSetId != nil { + if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { return err } } @@ -11483,14 +11985,14 @@ func awsRestjson1_serializeOpHttpBindingsListThemeAliasesInput(v *ListThemeAlias return nil } -type awsRestjson1_serializeOpListThemes struct { +type awsRestjson1_serializeOpListRoleMemberships struct { } -func (*awsRestjson1_serializeOpListThemes) ID() string { +func (*awsRestjson1_serializeOpListRoleMemberships) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListThemes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListRoleMemberships) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -11502,13 +12004,13 @@ func (m *awsRestjson1_serializeOpListThemes) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListThemesInput) + input, ok := in.Parameters.(*ListRoleMembershipsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/themes") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/roles/{Role}/members") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -11524,7 +12026,7 @@ func (m *awsRestjson1_serializeOpListThemes) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListThemesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListRoleMembershipsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -11537,7 +12039,7 @@ func (m *awsRestjson1_serializeOpListThemes) HandleSerialize(ctx context.Context span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListThemesInput(v *ListThemesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListRoleMembershipsInput(v *ListRoleMembershipsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -11555,25 +12057,39 @@ func awsRestjson1_serializeOpHttpBindingsListThemesInput(v *ListThemesInput, enc encoder.SetQuery("max-results").Integer(*v.MaxResults) } + if v.Namespace == nil || len(*v.Namespace) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} + } + if v.Namespace != nil { + if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { + return err + } + } + if v.NextToken != nil { encoder.SetQuery("next-token").String(*v.NextToken) } - if len(v.Type) > 0 { - encoder.SetQuery("type").String(string(v.Type)) + if len(v.Role) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Role must not be empty")} + } + if len(v.Role) > 0 { + if err := encoder.SetURI("Role").String(string(v.Role)); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpListThemeVersions struct { +type awsRestjson1_serializeOpListTagsForResource struct { } -func (*awsRestjson1_serializeOpListThemeVersions) ID() string { +func (*awsRestjson1_serializeOpListTagsForResource) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListThemeVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -11585,13 +12101,13 @@ func (m *awsRestjson1_serializeOpListThemeVersions) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListThemeVersionsInput) + input, ok := in.Parameters.(*ListTagsForResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/themes/{ThemeId}/versions") + opPath, opQuery := httpbinding.SplitURI("/resources/{ResourceArn}/tags") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -11607,7 +12123,7 @@ func (m *awsRestjson1_serializeOpListThemeVersions) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListThemeVersionsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -11620,33 +12136,16 @@ func (m *awsRestjson1_serializeOpListThemeVersions) HandleSerialize(ctx context. span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListThemeVersionsInput(v *ListThemeVersionsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} - } - if v.AwsAccountId != nil { - if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { - return err - } - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - if v.ThemeId == nil || len(*v.ThemeId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ThemeId must not be empty")} + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} } - if v.ThemeId != nil { - if err := encoder.SetURI("ThemeId").String(*v.ThemeId); err != nil { + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { return err } } @@ -11654,14 +12153,14 @@ func awsRestjson1_serializeOpHttpBindingsListThemeVersionsInput(v *ListThemeVers return nil } -type awsRestjson1_serializeOpListTopicRefreshSchedules struct { +type awsRestjson1_serializeOpListTemplateAliases struct { } -func (*awsRestjson1_serializeOpListTopicRefreshSchedules) ID() string { +func (*awsRestjson1_serializeOpListTemplateAliases) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListTopicRefreshSchedules) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListTemplateAliases) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -11673,13 +12172,13 @@ func (m *awsRestjson1_serializeOpListTopicRefreshSchedules) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListTopicRefreshSchedulesInput) + input, ok := in.Parameters.(*ListTemplateAliasesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/topics/{TopicId}/schedules") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/templates/{TemplateId}/aliases") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -11695,7 +12194,7 @@ func (m *awsRestjson1_serializeOpListTopicRefreshSchedules) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListTopicRefreshSchedulesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListTemplateAliasesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -11708,7 +12207,7 @@ func (m *awsRestjson1_serializeOpListTopicRefreshSchedules) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListTopicRefreshSchedulesInput(v *ListTopicRefreshSchedulesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListTemplateAliasesInput(v *ListTemplateAliasesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -11722,11 +12221,19 @@ func awsRestjson1_serializeOpHttpBindingsListTopicRefreshSchedulesInput(v *ListT } } - if v.TopicId == nil || len(*v.TopicId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member TopicId must not be empty")} + if v.MaxResults != nil { + encoder.SetQuery("max-result").Integer(*v.MaxResults) } - if v.TopicId != nil { - if err := encoder.SetURI("TopicId").String(*v.TopicId); err != nil { + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + if v.TemplateId == nil || len(*v.TemplateId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member TemplateId must not be empty")} + } + if v.TemplateId != nil { + if err := encoder.SetURI("TemplateId").String(*v.TemplateId); err != nil { return err } } @@ -11734,14 +12241,14 @@ func awsRestjson1_serializeOpHttpBindingsListTopicRefreshSchedulesInput(v *ListT return nil } -type awsRestjson1_serializeOpListTopicReviewedAnswers struct { +type awsRestjson1_serializeOpListTemplates struct { } -func (*awsRestjson1_serializeOpListTopicReviewedAnswers) ID() string { +func (*awsRestjson1_serializeOpListTemplates) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListTopicReviewedAnswers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListTemplates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -11753,13 +12260,13 @@ func (m *awsRestjson1_serializeOpListTopicReviewedAnswers) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListTopicReviewedAnswersInput) + input, ok := in.Parameters.(*ListTemplatesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/topics/{TopicId}/reviewed-answers") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/templates") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -11775,7 +12282,7 @@ func (m *awsRestjson1_serializeOpListTopicReviewedAnswers) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListTopicReviewedAnswersInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListTemplatesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -11788,7 +12295,7 @@ func (m *awsRestjson1_serializeOpListTopicReviewedAnswers) HandleSerialize(ctx c span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListTopicReviewedAnswersInput(v *ListTopicReviewedAnswersInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListTemplatesInput(v *ListTemplatesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -11802,26 +12309,25 @@ func awsRestjson1_serializeOpHttpBindingsListTopicReviewedAnswersInput(v *ListTo } } - if v.TopicId == nil || len(*v.TopicId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member TopicId must not be empty")} + if v.MaxResults != nil { + encoder.SetQuery("max-result").Integer(*v.MaxResults) } - if v.TopicId != nil { - if err := encoder.SetURI("TopicId").String(*v.TopicId); err != nil { - return err - } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) } return nil } -type awsRestjson1_serializeOpListTopics struct { +type awsRestjson1_serializeOpListTemplateVersions struct { } -func (*awsRestjson1_serializeOpListTopics) ID() string { +func (*awsRestjson1_serializeOpListTemplateVersions) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListTopics) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListTemplateVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -11833,13 +12339,13 @@ func (m *awsRestjson1_serializeOpListTopics) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListTopicsInput) + input, ok := in.Parameters.(*ListTemplateVersionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/topics") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/templates/{TemplateId}/versions") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -11855,7 +12361,7 @@ func (m *awsRestjson1_serializeOpListTopics) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListTopicsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListTemplateVersionsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -11868,7 +12374,7 @@ func (m *awsRestjson1_serializeOpListTopics) HandleSerialize(ctx context.Context span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListTopicsInput(v *ListTopicsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListTemplateVersionsInput(v *ListTemplateVersionsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -11890,17 +12396,26 @@ func awsRestjson1_serializeOpHttpBindingsListTopicsInput(v *ListTopicsInput, enc encoder.SetQuery("next-token").String(*v.NextToken) } + if v.TemplateId == nil || len(*v.TemplateId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member TemplateId must not be empty")} + } + if v.TemplateId != nil { + if err := encoder.SetURI("TemplateId").String(*v.TemplateId); err != nil { + return err + } + } + return nil } -type awsRestjson1_serializeOpListUserGroups struct { +type awsRestjson1_serializeOpListThemeAliases struct { } -func (*awsRestjson1_serializeOpListUserGroups) ID() string { +func (*awsRestjson1_serializeOpListThemeAliases) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListUserGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListThemeAliases) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -11912,13 +12427,13 @@ func (m *awsRestjson1_serializeOpListUserGroups) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListUserGroupsInput) + input, ok := in.Parameters.(*ListThemeAliasesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/users/{UserName}/groups") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/themes/{ThemeId}/aliases") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -11934,7 +12449,7 @@ func (m *awsRestjson1_serializeOpListUserGroups) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListUserGroupsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListThemeAliasesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -11947,7 +12462,7 @@ func (m *awsRestjson1_serializeOpListUserGroups) HandleSerialize(ctx context.Con span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListUserGroupsInput(v *ListUserGroupsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListThemeAliasesInput(v *ListThemeAliasesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -11962,27 +12477,18 @@ func awsRestjson1_serializeOpHttpBindingsListUserGroupsInput(v *ListUserGroupsIn } if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.Namespace == nil || len(*v.Namespace) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} - } - if v.Namespace != nil { - if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { - return err - } + encoder.SetQuery("max-result").Integer(*v.MaxResults) } if v.NextToken != nil { encoder.SetQuery("next-token").String(*v.NextToken) } - if v.UserName == nil || len(*v.UserName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member UserName must not be empty")} + if v.ThemeId == nil || len(*v.ThemeId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ThemeId must not be empty")} } - if v.UserName != nil { - if err := encoder.SetURI("UserName").String(*v.UserName); err != nil { + if v.ThemeId != nil { + if err := encoder.SetURI("ThemeId").String(*v.ThemeId); err != nil { return err } } @@ -11990,14 +12496,14 @@ func awsRestjson1_serializeOpHttpBindingsListUserGroupsInput(v *ListUserGroupsIn return nil } -type awsRestjson1_serializeOpListUsers struct { +type awsRestjson1_serializeOpListThemes struct { } -func (*awsRestjson1_serializeOpListUsers) ID() string { +func (*awsRestjson1_serializeOpListThemes) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListUsers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListThemes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -12009,13 +12515,13 @@ func (m *awsRestjson1_serializeOpListUsers) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListUsersInput) + input, ok := in.Parameters.(*ListThemesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/users") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/themes") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -12031,7 +12537,7 @@ func (m *awsRestjson1_serializeOpListUsers) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListUsersInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListThemesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -12044,7 +12550,7 @@ func (m *awsRestjson1_serializeOpListUsers) HandleSerialize(ctx context.Context, span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListUsersInput(v *ListUsersInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListThemesInput(v *ListThemesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -12062,30 +12568,25 @@ func awsRestjson1_serializeOpHttpBindingsListUsersInput(v *ListUsersInput, encod encoder.SetQuery("max-results").Integer(*v.MaxResults) } - if v.Namespace == nil || len(*v.Namespace) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} - } - if v.Namespace != nil { - if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { - return err - } - } - if v.NextToken != nil { encoder.SetQuery("next-token").String(*v.NextToken) } + if len(v.Type) > 0 { + encoder.SetQuery("type").String(string(v.Type)) + } + return nil } -type awsRestjson1_serializeOpListVPCConnections struct { +type awsRestjson1_serializeOpListThemeVersions struct { } -func (*awsRestjson1_serializeOpListVPCConnections) ID() string { +func (*awsRestjson1_serializeOpListThemeVersions) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListVPCConnections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListThemeVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -12097,13 +12598,13 @@ func (m *awsRestjson1_serializeOpListVPCConnections) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListVPCConnectionsInput) + input, ok := in.Parameters.(*ListThemeVersionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/vpc-connections") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/themes/{ThemeId}/versions") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -12119,7 +12620,7 @@ func (m *awsRestjson1_serializeOpListVPCConnections) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListVPCConnectionsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListThemeVersionsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -12132,7 +12633,7 @@ func (m *awsRestjson1_serializeOpListVPCConnections) HandleSerialize(ctx context span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListVPCConnectionsInput(v *ListVPCConnectionsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListThemeVersionsInput(v *ListThemeVersionsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -12154,17 +12655,26 @@ func awsRestjson1_serializeOpHttpBindingsListVPCConnectionsInput(v *ListVPCConne encoder.SetQuery("next-token").String(*v.NextToken) } + if v.ThemeId == nil || len(*v.ThemeId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ThemeId must not be empty")} + } + if v.ThemeId != nil { + if err := encoder.SetURI("ThemeId").String(*v.ThemeId); err != nil { + return err + } + } + return nil } -type awsRestjson1_serializeOpPutDataSetRefreshProperties struct { +type awsRestjson1_serializeOpListTopicRefreshSchedules struct { } -func (*awsRestjson1_serializeOpPutDataSetRefreshProperties) ID() string { +func (*awsRestjson1_serializeOpListTopicRefreshSchedules) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpPutDataSetRefreshProperties) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListTopicRefreshSchedules) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -12176,16 +12686,16 @@ func (m *awsRestjson1_serializeOpPutDataSetRefreshProperties) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*PutDataSetRefreshPropertiesInput) + input, ok := in.Parameters.(*ListTopicRefreshSchedulesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/refresh-properties") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/topics/{TopicId}/schedules") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -12198,18 +12708,7 @@ func (m *awsRestjson1_serializeOpPutDataSetRefreshProperties) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsPutDataSetRefreshPropertiesInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentPutDataSetRefreshPropertiesInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListTopicRefreshSchedulesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -12222,7 +12721,7 @@ func (m *awsRestjson1_serializeOpPutDataSetRefreshProperties) HandleSerialize(ct span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsPutDataSetRefreshPropertiesInput(v *PutDataSetRefreshPropertiesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListTopicRefreshSchedulesInput(v *ListTopicRefreshSchedulesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -12236,25 +12735,11 @@ func awsRestjson1_serializeOpHttpBindingsPutDataSetRefreshPropertiesInput(v *Put } } - if v.DataSetId == nil || len(*v.DataSetId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} - } - if v.DataSetId != nil { - if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { - return err - } + if v.TopicId == nil || len(*v.TopicId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member TopicId must not be empty")} } - - return nil -} - -func awsRestjson1_serializeOpDocumentPutDataSetRefreshPropertiesInput(v *PutDataSetRefreshPropertiesInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.DataSetRefreshProperties != nil { - ok := object.Key("DataSetRefreshProperties") - if err := awsRestjson1_serializeDocumentDataSetRefreshProperties(v.DataSetRefreshProperties, ok); err != nil { + if v.TopicId != nil { + if err := encoder.SetURI("TopicId").String(*v.TopicId); err != nil { return err } } @@ -12262,14 +12747,14 @@ func awsRestjson1_serializeOpDocumentPutDataSetRefreshPropertiesInput(v *PutData return nil } -type awsRestjson1_serializeOpRegisterUser struct { +type awsRestjson1_serializeOpListTopicReviewedAnswers struct { } -func (*awsRestjson1_serializeOpRegisterUser) ID() string { +func (*awsRestjson1_serializeOpListTopicReviewedAnswers) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpRegisterUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListTopicReviewedAnswers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -12281,16 +12766,16 @@ func (m *awsRestjson1_serializeOpRegisterUser) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*RegisterUserInput) + input, ok := in.Parameters.(*ListTopicReviewedAnswersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/users") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/topics/{TopicId}/reviewed-answers") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -12303,18 +12788,7 @@ func (m *awsRestjson1_serializeOpRegisterUser) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsRegisterUserInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentRegisterUserInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListTopicReviewedAnswersInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -12327,7 +12801,7 @@ func (m *awsRestjson1_serializeOpRegisterUser) HandleSerialize(ctx context.Conte span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsRegisterUserInput(v *RegisterUserInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListTopicReviewedAnswersInput(v *ListTopicReviewedAnswersInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -12341,90 +12815,26 @@ func awsRestjson1_serializeOpHttpBindingsRegisterUserInput(v *RegisterUserInput, } } - if v.Namespace == nil || len(*v.Namespace) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} - } - if v.Namespace != nil { - if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentRegisterUserInput(v *RegisterUserInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.CustomFederationProviderUrl != nil { - ok := object.Key("CustomFederationProviderUrl") - ok.String(*v.CustomFederationProviderUrl) - } - - if v.CustomPermissionsName != nil { - ok := object.Key("CustomPermissionsName") - ok.String(*v.CustomPermissionsName) - } - - if v.Email != nil { - ok := object.Key("Email") - ok.String(*v.Email) - } - - if v.ExternalLoginFederationProviderType != nil { - ok := object.Key("ExternalLoginFederationProviderType") - ok.String(*v.ExternalLoginFederationProviderType) - } - - if v.ExternalLoginId != nil { - ok := object.Key("ExternalLoginId") - ok.String(*v.ExternalLoginId) - } - - if v.IamArn != nil { - ok := object.Key("IamArn") - ok.String(*v.IamArn) - } - - if len(v.IdentityType) > 0 { - ok := object.Key("IdentityType") - ok.String(string(v.IdentityType)) - } - - if v.SessionName != nil { - ok := object.Key("SessionName") - ok.String(*v.SessionName) + if v.TopicId == nil || len(*v.TopicId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member TopicId must not be empty")} } - - if v.Tags != nil { - ok := object.Key("Tags") - if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + if v.TopicId != nil { + if err := encoder.SetURI("TopicId").String(*v.TopicId); err != nil { return err } } - if v.UserName != nil { - ok := object.Key("UserName") - ok.String(*v.UserName) - } - - if len(v.UserRole) > 0 { - ok := object.Key("UserRole") - ok.String(string(v.UserRole)) - } - return nil } -type awsRestjson1_serializeOpRestoreAnalysis struct { +type awsRestjson1_serializeOpListTopics struct { } -func (*awsRestjson1_serializeOpRestoreAnalysis) ID() string { +func (*awsRestjson1_serializeOpListTopics) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpRestoreAnalysis) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListTopics) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -12436,16 +12846,16 @@ func (m *awsRestjson1_serializeOpRestoreAnalysis) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*RestoreAnalysisInput) + input, ok := in.Parameters.(*ListTopicsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/restore/analyses/{AnalysisId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/topics") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -12458,7 +12868,7 @@ func (m *awsRestjson1_serializeOpRestoreAnalysis) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsRestoreAnalysisInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListTopicsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -12471,20 +12881,11 @@ func (m *awsRestjson1_serializeOpRestoreAnalysis) HandleSerialize(ctx context.Co span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsRestoreAnalysisInput(v *RestoreAnalysisInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListTopicsInput(v *ListTopicsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AnalysisId == nil || len(*v.AnalysisId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AnalysisId must not be empty")} - } - if v.AnalysisId != nil { - if err := encoder.SetURI("AnalysisId").String(*v.AnalysisId); err != nil { - return err - } - } - if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} } @@ -12494,21 +12895,25 @@ func awsRestjson1_serializeOpHttpBindingsRestoreAnalysisInput(v *RestoreAnalysis } } - if v.RestoreToFolders { - encoder.SetQuery("restore-to-folders").Boolean(v.RestoreToFolders) + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) } return nil } -type awsRestjson1_serializeOpSearchAnalyses struct { +type awsRestjson1_serializeOpListUserGroups struct { } -func (*awsRestjson1_serializeOpSearchAnalyses) ID() string { +func (*awsRestjson1_serializeOpListUserGroups) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpSearchAnalyses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListUserGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -12520,16 +12925,16 @@ func (m *awsRestjson1_serializeOpSearchAnalyses) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*SearchAnalysesInput) + input, ok := in.Parameters.(*ListUserGroupsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/search/analyses") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/users/{UserName}/groups") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -12542,18 +12947,7 @@ func (m *awsRestjson1_serializeOpSearchAnalyses) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsSearchAnalysesInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentSearchAnalysesInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListUserGroupsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -12566,7 +12960,7 @@ func (m *awsRestjson1_serializeOpSearchAnalyses) HandleSerialize(ctx context.Con span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsSearchAnalysesInput(v *SearchAnalysesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListUserGroupsInput(v *ListUserGroupsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -12580,41 +12974,43 @@ func awsRestjson1_serializeOpHttpBindingsSearchAnalysesInput(v *SearchAnalysesIn } } - return nil -} - -func awsRestjson1_serializeOpDocumentSearchAnalysesInput(v *SearchAnalysesInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } - if v.Filters != nil { - ok := object.Key("Filters") - if err := awsRestjson1_serializeDocumentAnalysisSearchFilterList(v.Filters, ok); err != nil { + if v.Namespace == nil || len(*v.Namespace) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} + } + if v.Namespace != nil { + if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { return err } } - if v.MaxResults != nil { - ok := object.Key("MaxResults") - ok.Integer(*v.MaxResults) + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) } - if v.NextToken != nil { - ok := object.Key("NextToken") - ok.String(*v.NextToken) + if v.UserName == nil || len(*v.UserName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member UserName must not be empty")} + } + if v.UserName != nil { + if err := encoder.SetURI("UserName").String(*v.UserName); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpSearchDashboards struct { +type awsRestjson1_serializeOpListUsers struct { } -func (*awsRestjson1_serializeOpSearchDashboards) ID() string { +func (*awsRestjson1_serializeOpListUsers) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpSearchDashboards) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListUsers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -12626,16 +13022,16 @@ func (m *awsRestjson1_serializeOpSearchDashboards) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*SearchDashboardsInput) + input, ok := in.Parameters.(*ListUsersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/search/dashboards") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/users") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -12648,18 +13044,7 @@ func (m *awsRestjson1_serializeOpSearchDashboards) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsSearchDashboardsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentSearchDashboardsInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListUsersInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -12672,7 +13057,7 @@ func (m *awsRestjson1_serializeOpSearchDashboards) HandleSerialize(ctx context.C span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsSearchDashboardsInput(v *SearchDashboardsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListUsersInput(v *ListUsersInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -12686,41 +13071,34 @@ func awsRestjson1_serializeOpHttpBindingsSearchDashboardsInput(v *SearchDashboar } } - return nil -} - -func awsRestjson1_serializeOpDocumentSearchDashboardsInput(v *SearchDashboardsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } - if v.Filters != nil { - ok := object.Key("Filters") - if err := awsRestjson1_serializeDocumentDashboardSearchFilterList(v.Filters, ok); err != nil { + if v.Namespace == nil || len(*v.Namespace) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} + } + if v.Namespace != nil { + if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { return err } } - if v.MaxResults != nil { - ok := object.Key("MaxResults") - ok.Integer(*v.MaxResults) - } - if v.NextToken != nil { - ok := object.Key("NextToken") - ok.String(*v.NextToken) + encoder.SetQuery("next-token").String(*v.NextToken) } return nil } -type awsRestjson1_serializeOpSearchDataSets struct { +type awsRestjson1_serializeOpListVPCConnections struct { } -func (*awsRestjson1_serializeOpSearchDataSets) ID() string { +func (*awsRestjson1_serializeOpListVPCConnections) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpSearchDataSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListVPCConnections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -12732,16 +13110,16 @@ func (m *awsRestjson1_serializeOpSearchDataSets) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*SearchDataSetsInput) + input, ok := in.Parameters.(*ListVPCConnectionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/search/data-sets") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/vpc-connections") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -12754,18 +13132,7 @@ func (m *awsRestjson1_serializeOpSearchDataSets) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsSearchDataSetsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentSearchDataSetsInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListVPCConnectionsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -12778,7 +13145,7 @@ func (m *awsRestjson1_serializeOpSearchDataSets) HandleSerialize(ctx context.Con span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsSearchDataSetsInput(v *SearchDataSetsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListVPCConnectionsInput(v *ListVPCConnectionsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -12792,41 +13159,25 @@ func awsRestjson1_serializeOpHttpBindingsSearchDataSetsInput(v *SearchDataSetsIn } } - return nil -} - -func awsRestjson1_serializeOpDocumentSearchDataSetsInput(v *SearchDataSetsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Filters != nil { - ok := object.Key("Filters") - if err := awsRestjson1_serializeDocumentDataSetSearchFilterList(v.Filters, ok); err != nil { - return err - } - } - if v.MaxResults != nil { - ok := object.Key("MaxResults") - ok.Integer(*v.MaxResults) + encoder.SetQuery("max-results").Integer(*v.MaxResults) } if v.NextToken != nil { - ok := object.Key("NextToken") - ok.String(*v.NextToken) + encoder.SetQuery("next-token").String(*v.NextToken) } return nil } -type awsRestjson1_serializeOpSearchDataSources struct { +type awsRestjson1_serializeOpPutDataSetRefreshProperties struct { } -func (*awsRestjson1_serializeOpSearchDataSources) ID() string { +func (*awsRestjson1_serializeOpPutDataSetRefreshProperties) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpSearchDataSources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpPutDataSetRefreshProperties) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -12838,16 +13189,16 @@ func (m *awsRestjson1_serializeOpSearchDataSources) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*SearchDataSourcesInput) + input, ok := in.Parameters.(*PutDataSetRefreshPropertiesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/search/data-sources") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/data-sets/{DataSetId}/refresh-properties") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "PUT" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -12860,14 +13211,14 @@ func (m *awsRestjson1_serializeOpSearchDataSources) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsSearchDataSourcesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsPutDataSetRefreshPropertiesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentSearchDataSourcesInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentPutDataSetRefreshPropertiesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -12884,7 +13235,7 @@ func (m *awsRestjson1_serializeOpSearchDataSources) HandleSerialize(ctx context. span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsSearchDataSourcesInput(v *SearchDataSourcesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsPutDataSetRefreshPropertiesInput(v *PutDataSetRefreshPropertiesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -12898,41 +13249,40 @@ func awsRestjson1_serializeOpHttpBindingsSearchDataSourcesInput(v *SearchDataSou } } + if v.DataSetId == nil || len(*v.DataSetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DataSetId must not be empty")} + } + if v.DataSetId != nil { + if err := encoder.SetURI("DataSetId").String(*v.DataSetId); err != nil { + return err + } + } + return nil } -func awsRestjson1_serializeOpDocumentSearchDataSourcesInput(v *SearchDataSourcesInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentPutDataSetRefreshPropertiesInput(v *PutDataSetRefreshPropertiesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Filters != nil { - ok := object.Key("Filters") - if err := awsRestjson1_serializeDocumentDataSourceSearchFilterList(v.Filters, ok); err != nil { + if v.DataSetRefreshProperties != nil { + ok := object.Key("DataSetRefreshProperties") + if err := awsRestjson1_serializeDocumentDataSetRefreshProperties(v.DataSetRefreshProperties, ok); err != nil { return err } } - if v.MaxResults != nil { - ok := object.Key("MaxResults") - ok.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - ok := object.Key("NextToken") - ok.String(*v.NextToken) - } - return nil } -type awsRestjson1_serializeOpSearchFolders struct { +type awsRestjson1_serializeOpRegisterUser struct { } -func (*awsRestjson1_serializeOpSearchFolders) ID() string { +func (*awsRestjson1_serializeOpRegisterUser) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpSearchFolders) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpRegisterUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -12944,13 +13294,13 @@ func (m *awsRestjson1_serializeOpSearchFolders) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*SearchFoldersInput) + input, ok := in.Parameters.(*RegisterUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/search/folders") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/users") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -12966,14 +13316,14 @@ func (m *awsRestjson1_serializeOpSearchFolders) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsSearchFoldersInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsRegisterUserInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentSearchFoldersInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentRegisterUserInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -12990,7 +13340,7 @@ func (m *awsRestjson1_serializeOpSearchFolders) HandleSerialize(ctx context.Cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsSearchFoldersInput(v *SearchFoldersInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsRegisterUserInput(v *RegisterUserInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -13004,41 +13354,90 @@ func awsRestjson1_serializeOpHttpBindingsSearchFoldersInput(v *SearchFoldersInpu } } + if v.Namespace == nil || len(*v.Namespace) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} + } + if v.Namespace != nil { + if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { + return err + } + } + return nil } -func awsRestjson1_serializeOpDocumentSearchFoldersInput(v *SearchFoldersInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentRegisterUserInput(v *RegisterUserInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Filters != nil { - ok := object.Key("Filters") - if err := awsRestjson1_serializeDocumentFolderSearchFilterList(v.Filters, ok); err != nil { + if v.CustomFederationProviderUrl != nil { + ok := object.Key("CustomFederationProviderUrl") + ok.String(*v.CustomFederationProviderUrl) + } + + if v.CustomPermissionsName != nil { + ok := object.Key("CustomPermissionsName") + ok.String(*v.CustomPermissionsName) + } + + if v.Email != nil { + ok := object.Key("Email") + ok.String(*v.Email) + } + + if v.ExternalLoginFederationProviderType != nil { + ok := object.Key("ExternalLoginFederationProviderType") + ok.String(*v.ExternalLoginFederationProviderType) + } + + if v.ExternalLoginId != nil { + ok := object.Key("ExternalLoginId") + ok.String(*v.ExternalLoginId) + } + + if v.IamArn != nil { + ok := object.Key("IamArn") + ok.String(*v.IamArn) + } + + if len(v.IdentityType) > 0 { + ok := object.Key("IdentityType") + ok.String(string(v.IdentityType)) + } + + if v.SessionName != nil { + ok := object.Key("SessionName") + ok.String(*v.SessionName) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } - if v.MaxResults != nil { - ok := object.Key("MaxResults") - ok.Integer(*v.MaxResults) + if v.UserName != nil { + ok := object.Key("UserName") + ok.String(*v.UserName) } - if v.NextToken != nil { - ok := object.Key("NextToken") - ok.String(*v.NextToken) + if len(v.UserRole) > 0 { + ok := object.Key("UserRole") + ok.String(string(v.UserRole)) } return nil } -type awsRestjson1_serializeOpSearchGroups struct { +type awsRestjson1_serializeOpRestoreAnalysis struct { } -func (*awsRestjson1_serializeOpSearchGroups) ID() string { +func (*awsRestjson1_serializeOpRestoreAnalysis) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpSearchGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpRestoreAnalysis) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -13050,13 +13449,13 @@ func (m *awsRestjson1_serializeOpSearchGroups) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*SearchGroupsInput) + input, ok := in.Parameters.(*RestoreAnalysisInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/groups-search") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/restore/analyses/{AnalysisId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -13072,18 +13471,7 @@ func (m *awsRestjson1_serializeOpSearchGroups) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsSearchGroupsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentSearchGroupsInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsRestoreAnalysisInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -13096,62 +13484,44 @@ func (m *awsRestjson1_serializeOpSearchGroups) HandleSerialize(ctx context.Conte span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsSearchGroupsInput(v *SearchGroupsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsRestoreAnalysisInput(v *RestoreAnalysisInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + if v.AnalysisId == nil || len(*v.AnalysisId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AnalysisId must not be empty")} } - if v.AwsAccountId != nil { - if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + if v.AnalysisId != nil { + if err := encoder.SetURI("AnalysisId").String(*v.AnalysisId); err != nil { return err } } - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.Namespace == nil || len(*v.Namespace) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} } - if v.Namespace != nil { - if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { return err } } - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - return nil -} - -func awsRestjson1_serializeOpDocumentSearchGroupsInput(v *SearchGroupsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Filters != nil { - ok := object.Key("Filters") - if err := awsRestjson1_serializeDocumentGroupSearchFilterList(v.Filters, ok); err != nil { - return err - } + if v.RestoreToFolders { + encoder.SetQuery("restore-to-folders").Boolean(v.RestoreToFolders) } return nil } -type awsRestjson1_serializeOpStartAssetBundleExportJob struct { +type awsRestjson1_serializeOpSearchAnalyses struct { } -func (*awsRestjson1_serializeOpStartAssetBundleExportJob) ID() string { +func (*awsRestjson1_serializeOpSearchAnalyses) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpStartAssetBundleExportJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpSearchAnalyses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -13163,13 +13533,13 @@ func (m *awsRestjson1_serializeOpStartAssetBundleExportJob) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StartAssetBundleExportJobInput) + input, ok := in.Parameters.(*SearchAnalysesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/asset-bundle-export-jobs/export") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/search/analyses") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -13185,14 +13555,14 @@ func (m *awsRestjson1_serializeOpStartAssetBundleExportJob) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsStartAssetBundleExportJobInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsSearchAnalysesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentStartAssetBundleExportJobInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentSearchAnalysesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -13209,7 +13579,7 @@ func (m *awsRestjson1_serializeOpStartAssetBundleExportJob) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsStartAssetBundleExportJobInput(v *StartAssetBundleExportJobInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsSearchAnalysesInput(v *SearchAnalysesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -13226,77 +13596,144 @@ func awsRestjson1_serializeOpHttpBindingsStartAssetBundleExportJobInput(v *Start return nil } -func awsRestjson1_serializeOpDocumentStartAssetBundleExportJobInput(v *StartAssetBundleExportJobInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentSearchAnalysesInput(v *SearchAnalysesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.AssetBundleExportJobId != nil { - ok := object.Key("AssetBundleExportJobId") - ok.String(*v.AssetBundleExportJobId) - } - - if v.CloudFormationOverridePropertyConfiguration != nil { - ok := object.Key("CloudFormationOverridePropertyConfiguration") - if err := awsRestjson1_serializeDocumentAssetBundleCloudFormationOverridePropertyConfiguration(v.CloudFormationOverridePropertyConfiguration, ok); err != nil { + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsRestjson1_serializeDocumentAnalysisSearchFilterList(v.Filters, ok); err != nil { return err } } - if len(v.ExportFormat) > 0 { - ok := object.Key("ExportFormat") - ok.String(string(v.ExportFormat)) + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) } - if v.IncludeAllDependencies { - ok := object.Key("IncludeAllDependencies") - ok.Boolean(v.IncludeAllDependencies) + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) } - if len(v.IncludeFolderMembers) > 0 { - ok := object.Key("IncludeFolderMembers") - ok.String(string(v.IncludeFolderMembers)) + return nil +} + +type awsRestjson1_serializeOpSearchDashboards struct { +} + +func (*awsRestjson1_serializeOpSearchDashboards) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSearchDashboards) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - if v.IncludeFolderMemberships { - ok := object.Key("IncludeFolderMemberships") - ok.Boolean(v.IncludeFolderMemberships) + input, ok := in.Parameters.(*SearchDashboardsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - if v.IncludePermissions { - ok := object.Key("IncludePermissions") - ok.Boolean(v.IncludePermissions) + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/search/dashboards") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) } - if v.IncludeTags { - ok := object.Key("IncludeTags") - ok.Boolean(v.IncludeTags) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} } - if v.ResourceArns != nil { - ok := object.Key("ResourceArns") - if err := awsRestjson1_serializeDocumentAssetBundleResourceArns(v.ResourceArns, ok); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsSearchDashboardsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentSearchDashboardsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsSearchDashboardsInput(v *SearchDashboardsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { return err } } - if v.ValidationStrategy != nil { - ok := object.Key("ValidationStrategy") - if err := awsRestjson1_serializeDocumentAssetBundleExportJobValidationStrategy(v.ValidationStrategy, ok); err != nil { + return nil +} + +func awsRestjson1_serializeOpDocumentSearchDashboardsInput(v *SearchDashboardsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsRestjson1_serializeDocumentDashboardSearchFilterList(v.Filters, ok); err != nil { return err } } + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + return nil } -type awsRestjson1_serializeOpStartAssetBundleImportJob struct { +type awsRestjson1_serializeOpSearchDataSets struct { } -func (*awsRestjson1_serializeOpStartAssetBundleImportJob) ID() string { +func (*awsRestjson1_serializeOpSearchDataSets) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpStartAssetBundleImportJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpSearchDataSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -13308,13 +13745,13 @@ func (m *awsRestjson1_serializeOpStartAssetBundleImportJob) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StartAssetBundleImportJobInput) + input, ok := in.Parameters.(*SearchDataSetsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/asset-bundle-import-jobs/import") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/search/data-sets") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -13330,14 +13767,14 @@ func (m *awsRestjson1_serializeOpStartAssetBundleImportJob) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsStartAssetBundleImportJobInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsSearchDataSetsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentStartAssetBundleImportJobInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentSearchDataSetsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -13354,7 +13791,7 @@ func (m *awsRestjson1_serializeOpStartAssetBundleImportJob) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsStartAssetBundleImportJobInput(v *StartAssetBundleImportJobInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsSearchDataSetsInput(v *SearchDataSetsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -13371,50 +13808,626 @@ func awsRestjson1_serializeOpHttpBindingsStartAssetBundleImportJobInput(v *Start return nil } -func awsRestjson1_serializeOpDocumentStartAssetBundleImportJobInput(v *StartAssetBundleImportJobInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentSearchDataSetsInput(v *SearchDataSetsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.AssetBundleImportJobId != nil { - ok := object.Key("AssetBundleImportJobId") - ok.String(*v.AssetBundleImportJobId) - } - - if v.AssetBundleImportSource != nil { - ok := object.Key("AssetBundleImportSource") - if err := awsRestjson1_serializeDocumentAssetBundleImportSource(v.AssetBundleImportSource, ok); err != nil { + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsRestjson1_serializeDocumentDataSetSearchFilterList(v.Filters, ok); err != nil { return err } } - if len(v.FailureAction) > 0 { - ok := object.Key("FailureAction") - ok.String(string(v.FailureAction)) + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) } - if v.OverrideParameters != nil { - ok := object.Key("OverrideParameters") - if err := awsRestjson1_serializeDocumentAssetBundleImportJobOverrideParameters(v.OverrideParameters, ok); err != nil { - return err - } + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) } - if v.OverridePermissions != nil { - ok := object.Key("OverridePermissions") - if err := awsRestjson1_serializeDocumentAssetBundleImportJobOverridePermissions(v.OverridePermissions, ok); err != nil { - return err - } - } + return nil +} - if v.OverrideTags != nil { - ok := object.Key("OverrideTags") - if err := awsRestjson1_serializeDocumentAssetBundleImportJobOverrideTags(v.OverrideTags, ok); err != nil { - return err - } +type awsRestjson1_serializeOpSearchDataSources struct { +} + +func (*awsRestjson1_serializeOpSearchDataSources) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSearchDataSources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - if v.OverrideValidationStrategy != nil { - ok := object.Key("OverrideValidationStrategy") + input, ok := in.Parameters.(*SearchDataSourcesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/search/data-sources") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsSearchDataSourcesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentSearchDataSourcesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsSearchDataSourcesInput(v *SearchDataSourcesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentSearchDataSourcesInput(v *SearchDataSourcesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsRestjson1_serializeDocumentDataSourceSearchFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpSearchFolders struct { +} + +func (*awsRestjson1_serializeOpSearchFolders) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSearchFolders) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*SearchFoldersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/search/folders") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsSearchFoldersInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentSearchFoldersInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsSearchFoldersInput(v *SearchFoldersInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentSearchFoldersInput(v *SearchFoldersInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsRestjson1_serializeDocumentFolderSearchFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpSearchGroups struct { +} + +func (*awsRestjson1_serializeOpSearchGroups) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSearchGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*SearchGroupsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/groups-search") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsSearchGroupsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentSearchGroupsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsSearchGroupsInput(v *SearchGroupsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.Namespace == nil || len(*v.Namespace) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} + } + if v.Namespace != nil { + if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { + return err + } + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentSearchGroupsInput(v *SearchGroupsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsRestjson1_serializeDocumentGroupSearchFilterList(v.Filters, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpStartAssetBundleExportJob struct { +} + +func (*awsRestjson1_serializeOpStartAssetBundleExportJob) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartAssetBundleExportJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartAssetBundleExportJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/asset-bundle-export-jobs/export") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsStartAssetBundleExportJobInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentStartAssetBundleExportJobInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsStartAssetBundleExportJobInput(v *StartAssetBundleExportJobInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentStartAssetBundleExportJobInput(v *StartAssetBundleExportJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AssetBundleExportJobId != nil { + ok := object.Key("AssetBundleExportJobId") + ok.String(*v.AssetBundleExportJobId) + } + + if v.CloudFormationOverridePropertyConfiguration != nil { + ok := object.Key("CloudFormationOverridePropertyConfiguration") + if err := awsRestjson1_serializeDocumentAssetBundleCloudFormationOverridePropertyConfiguration(v.CloudFormationOverridePropertyConfiguration, ok); err != nil { + return err + } + } + + if len(v.ExportFormat) > 0 { + ok := object.Key("ExportFormat") + ok.String(string(v.ExportFormat)) + } + + if v.IncludeAllDependencies { + ok := object.Key("IncludeAllDependencies") + ok.Boolean(v.IncludeAllDependencies) + } + + if len(v.IncludeFolderMembers) > 0 { + ok := object.Key("IncludeFolderMembers") + ok.String(string(v.IncludeFolderMembers)) + } + + if v.IncludeFolderMemberships { + ok := object.Key("IncludeFolderMemberships") + ok.Boolean(v.IncludeFolderMemberships) + } + + if v.IncludePermissions { + ok := object.Key("IncludePermissions") + ok.Boolean(v.IncludePermissions) + } + + if v.IncludeTags { + ok := object.Key("IncludeTags") + ok.Boolean(v.IncludeTags) + } + + if v.ResourceArns != nil { + ok := object.Key("ResourceArns") + if err := awsRestjson1_serializeDocumentAssetBundleResourceArns(v.ResourceArns, ok); err != nil { + return err + } + } + + if v.ValidationStrategy != nil { + ok := object.Key("ValidationStrategy") + if err := awsRestjson1_serializeDocumentAssetBundleExportJobValidationStrategy(v.ValidationStrategy, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpStartAssetBundleImportJob struct { +} + +func (*awsRestjson1_serializeOpStartAssetBundleImportJob) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartAssetBundleImportJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartAssetBundleImportJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/asset-bundle-import-jobs/import") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsStartAssetBundleImportJobInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentStartAssetBundleImportJobInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsStartAssetBundleImportJobInput(v *StartAssetBundleImportJobInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentStartAssetBundleImportJobInput(v *StartAssetBundleImportJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AssetBundleImportJobId != nil { + ok := object.Key("AssetBundleImportJobId") + ok.String(*v.AssetBundleImportJobId) + } + + if v.AssetBundleImportSource != nil { + ok := object.Key("AssetBundleImportSource") + if err := awsRestjson1_serializeDocumentAssetBundleImportSource(v.AssetBundleImportSource, ok); err != nil { + return err + } + } + + if len(v.FailureAction) > 0 { + ok := object.Key("FailureAction") + ok.String(string(v.FailureAction)) + } + + if v.OverrideParameters != nil { + ok := object.Key("OverrideParameters") + if err := awsRestjson1_serializeDocumentAssetBundleImportJobOverrideParameters(v.OverrideParameters, ok); err != nil { + return err + } + } + + if v.OverridePermissions != nil { + ok := object.Key("OverridePermissions") + if err := awsRestjson1_serializeDocumentAssetBundleImportJobOverridePermissions(v.OverridePermissions, ok); err != nil { + return err + } + } + + if v.OverrideTags != nil { + ok := object.Key("OverrideTags") + if err := awsRestjson1_serializeDocumentAssetBundleImportJobOverrideTags(v.OverrideTags, ok); err != nil { + return err + } + } + + if v.OverrideValidationStrategy != nil { + ok := object.Key("OverrideValidationStrategy") if err := awsRestjson1_serializeDocumentAssetBundleImportJobOverrideValidationStrategy(v.OverrideValidationStrategy, ok); err != nil { return err } @@ -13423,14 +14436,393 @@ func awsRestjson1_serializeOpDocumentStartAssetBundleImportJobInput(v *StartAsse return nil } -type awsRestjson1_serializeOpStartDashboardSnapshotJob struct { +type awsRestjson1_serializeOpStartDashboardSnapshotJob struct { +} + +func (*awsRestjson1_serializeOpStartDashboardSnapshotJob) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartDashboardSnapshotJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartDashboardSnapshotJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}/snapshot-jobs") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsStartDashboardSnapshotJobInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentStartDashboardSnapshotJobInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsStartDashboardSnapshotJobInput(v *StartDashboardSnapshotJobInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.DashboardId == nil || len(*v.DashboardId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DashboardId must not be empty")} + } + if v.DashboardId != nil { + if err := encoder.SetURI("DashboardId").String(*v.DashboardId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentStartDashboardSnapshotJobInput(v *StartDashboardSnapshotJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SnapshotConfiguration != nil { + ok := object.Key("SnapshotConfiguration") + if err := awsRestjson1_serializeDocumentSnapshotConfiguration(v.SnapshotConfiguration, ok); err != nil { + return err + } + } + + if v.SnapshotJobId != nil { + ok := object.Key("SnapshotJobId") + ok.String(*v.SnapshotJobId) + } + + if v.UserConfiguration != nil { + ok := object.Key("UserConfiguration") + if err := awsRestjson1_serializeDocumentSnapshotUserConfiguration(v.UserConfiguration, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpStartDashboardSnapshotJobSchedule struct { +} + +func (*awsRestjson1_serializeOpStartDashboardSnapshotJobSchedule) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartDashboardSnapshotJobSchedule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartDashboardSnapshotJobScheduleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}/schedules/{ScheduleId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsStartDashboardSnapshotJobScheduleInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsStartDashboardSnapshotJobScheduleInput(v *StartDashboardSnapshotJobScheduleInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.DashboardId == nil || len(*v.DashboardId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DashboardId must not be empty")} + } + if v.DashboardId != nil { + if err := encoder.SetURI("DashboardId").String(*v.DashboardId); err != nil { + return err + } + } + + if v.ScheduleId == nil || len(*v.ScheduleId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ScheduleId must not be empty")} + } + if v.ScheduleId != nil { + if err := encoder.SetURI("ScheduleId").String(*v.ScheduleId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpTagResource struct { +} + +func (*awsRestjson1_serializeOpTagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*TagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/resources/{ResourceArn}/tags") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUntagResource struct { +} + +func (*awsRestjson1_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UntagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/resources/{ResourceArn}/tags") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + if v.TagKeys != nil { + for i := range v.TagKeys { + encoder.AddQuery("keys").String(v.TagKeys[i]) + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateAccountCustomization struct { } -func (*awsRestjson1_serializeOpStartDashboardSnapshotJob) ID() string { +func (*awsRestjson1_serializeOpUpdateAccountCustomization) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpStartDashboardSnapshotJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateAccountCustomization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -13442,16 +14834,16 @@ func (m *awsRestjson1_serializeOpStartDashboardSnapshotJob) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StartDashboardSnapshotJobInput) + input, ok := in.Parameters.(*UpdateAccountCustomizationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}/snapshot-jobs") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/customizations") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "PUT" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -13464,14 +14856,14 @@ func (m *awsRestjson1_serializeOpStartDashboardSnapshotJob) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsStartDashboardSnapshotJobInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateAccountCustomizationInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentStartDashboardSnapshotJobInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentUpdateAccountCustomizationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -13488,7 +14880,7 @@ func (m *awsRestjson1_serializeOpStartDashboardSnapshotJob) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsStartDashboardSnapshotJobInput(v *StartDashboardSnapshotJobInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateAccountCustomizationInput(v *UpdateAccountCustomizationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -13502,37 +14894,20 @@ func awsRestjson1_serializeOpHttpBindingsStartDashboardSnapshotJobInput(v *Start } } - if v.DashboardId == nil || len(*v.DashboardId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DashboardId must not be empty")} - } - if v.DashboardId != nil { - if err := encoder.SetURI("DashboardId").String(*v.DashboardId); err != nil { - return err - } + if v.Namespace != nil { + encoder.SetQuery("namespace").String(*v.Namespace) } return nil } -func awsRestjson1_serializeOpDocumentStartDashboardSnapshotJobInput(v *StartDashboardSnapshotJobInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentUpdateAccountCustomizationInput(v *UpdateAccountCustomizationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.SnapshotConfiguration != nil { - ok := object.Key("SnapshotConfiguration") - if err := awsRestjson1_serializeDocumentSnapshotConfiguration(v.SnapshotConfiguration, ok); err != nil { - return err - } - } - - if v.SnapshotJobId != nil { - ok := object.Key("SnapshotJobId") - ok.String(*v.SnapshotJobId) - } - - if v.UserConfiguration != nil { - ok := object.Key("UserConfiguration") - if err := awsRestjson1_serializeDocumentSnapshotUserConfiguration(v.UserConfiguration, ok); err != nil { + if v.AccountCustomization != nil { + ok := object.Key("AccountCustomization") + if err := awsRestjson1_serializeDocumentAccountCustomization(v.AccountCustomization, ok); err != nil { return err } } @@ -13540,14 +14915,14 @@ func awsRestjson1_serializeOpDocumentStartDashboardSnapshotJobInput(v *StartDash return nil } -type awsRestjson1_serializeOpStartDashboardSnapshotJobSchedule struct { +type awsRestjson1_serializeOpUpdateAccountSettings struct { } -func (*awsRestjson1_serializeOpStartDashboardSnapshotJobSchedule) ID() string { +func (*awsRestjson1_serializeOpUpdateAccountSettings) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpStartDashboardSnapshotJobSchedule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateAccountSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -13559,16 +14934,16 @@ func (m *awsRestjson1_serializeOpStartDashboardSnapshotJobSchedule) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StartDashboardSnapshotJobScheduleInput) + input, ok := in.Parameters.(*UpdateAccountSettingsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}/schedules/{ScheduleId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/settings") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "PUT" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -13581,7 +14956,18 @@ func (m *awsRestjson1_serializeOpStartDashboardSnapshotJobSchedule) HandleSerial return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsStartDashboardSnapshotJobScheduleInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateAccountSettingsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateAccountSettingsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -13594,7 +14980,7 @@ func (m *awsRestjson1_serializeOpStartDashboardSnapshotJobSchedule) HandleSerial span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsStartDashboardSnapshotJobScheduleInput(v *StartDashboardSnapshotJobScheduleInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateAccountSettingsInput(v *UpdateAccountSettingsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -13608,35 +14994,39 @@ func awsRestjson1_serializeOpHttpBindingsStartDashboardSnapshotJobScheduleInput( } } - if v.DashboardId == nil || len(*v.DashboardId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DashboardId must not be empty")} - } - if v.DashboardId != nil { - if err := encoder.SetURI("DashboardId").String(*v.DashboardId); err != nil { - return err - } + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateAccountSettingsInput(v *UpdateAccountSettingsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DefaultNamespace != nil { + ok := object.Key("DefaultNamespace") + ok.String(*v.DefaultNamespace) } - if v.ScheduleId == nil || len(*v.ScheduleId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ScheduleId must not be empty")} + if v.NotificationEmail != nil { + ok := object.Key("NotificationEmail") + ok.String(*v.NotificationEmail) } - if v.ScheduleId != nil { - if err := encoder.SetURI("ScheduleId").String(*v.ScheduleId); err != nil { - return err - } + + if v.TerminationProtectionEnabled { + ok := object.Key("TerminationProtectionEnabled") + ok.Boolean(v.TerminationProtectionEnabled) } return nil } -type awsRestjson1_serializeOpTagResource struct { +type awsRestjson1_serializeOpUpdateAnalysis struct { } -func (*awsRestjson1_serializeOpTagResource) ID() string { +func (*awsRestjson1_serializeOpUpdateAnalysis) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateAnalysis) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -13648,16 +15038,16 @@ func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*TagResourceInput) + input, ok := in.Parameters.(*UpdateAnalysisInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/resources/{ResourceArn}/tags") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/analyses/{AnalysisId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "PUT" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -13670,14 +15060,14 @@ func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateAnalysisInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentUpdateAnalysisInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -13694,16 +15084,25 @@ func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Contex span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateAnalysisInput(v *UpdateAnalysisInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + if v.AnalysisId == nil || len(*v.AnalysisId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AnalysisId must not be empty")} } - if v.ResourceArn != nil { - if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + if v.AnalysisId != nil { + if err := encoder.SetURI("AnalysisId").String(*v.AnalysisId); err != nil { + return err + } + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { return err } } @@ -13711,13 +15110,44 @@ func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, e return nil } -func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentUpdateAnalysisInput(v *UpdateAnalysisInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Tags != nil { - ok := object.Key("Tags") - if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + if v.Definition != nil { + ok := object.Key("Definition") + if err := awsRestjson1_serializeDocumentAnalysisDefinition(v.Definition, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Parameters != nil { + ok := object.Key("Parameters") + if err := awsRestjson1_serializeDocumentParameters(v.Parameters, ok); err != nil { + return err + } + } + + if v.SourceEntity != nil { + ok := object.Key("SourceEntity") + if err := awsRestjson1_serializeDocumentAnalysisSourceEntity(v.SourceEntity, ok); err != nil { + return err + } + } + + if v.ThemeArn != nil { + ok := object.Key("ThemeArn") + ok.String(*v.ThemeArn) + } + + if v.ValidationStrategy != nil { + ok := object.Key("ValidationStrategy") + if err := awsRestjson1_serializeDocumentValidationStrategy(v.ValidationStrategy, ok); err != nil { return err } } @@ -13725,14 +15155,14 @@ func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value return nil } -type awsRestjson1_serializeOpUntagResource struct { +type awsRestjson1_serializeOpUpdateAnalysisPermissions struct { } -func (*awsRestjson1_serializeOpUntagResource) ID() string { +func (*awsRestjson1_serializeOpUpdateAnalysisPermissions) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateAnalysisPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -13744,16 +15174,16 @@ func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UntagResourceInput) + input, ok := in.Parameters.(*UpdateAnalysisPermissionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/resources/{ResourceArn}/tags") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/analyses/{AnalysisId}/permissions") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "PUT" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -13766,7 +15196,18 @@ func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateAnalysisPermissionsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateAnalysisPermissionsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -13779,37 +15220,61 @@ func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateAnalysisPermissionsInput(v *UpdateAnalysisPermissionsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + if v.AnalysisId == nil || len(*v.AnalysisId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AnalysisId must not be empty")} } - if v.ResourceArn != nil { - if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + if v.AnalysisId != nil { + if err := encoder.SetURI("AnalysisId").String(*v.AnalysisId); err != nil { return err } } - if v.TagKeys != nil { - for i := range v.TagKeys { - encoder.AddQuery("keys").String(v.TagKeys[i]) + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err } } return nil } -type awsRestjson1_serializeOpUpdateAccountCustomization struct { +func awsRestjson1_serializeOpDocumentUpdateAnalysisPermissionsInput(v *UpdateAnalysisPermissionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.GrantPermissions != nil { + ok := object.Key("GrantPermissions") + if err := awsRestjson1_serializeDocumentUpdateResourcePermissionList(v.GrantPermissions, ok); err != nil { + return err + } + } + + if v.RevokePermissions != nil { + ok := object.Key("RevokePermissions") + if err := awsRestjson1_serializeDocumentUpdateResourcePermissionList(v.RevokePermissions, ok); err != nil { + return err + } + } + + return nil } -func (*awsRestjson1_serializeOpUpdateAccountCustomization) ID() string { +type awsRestjson1_serializeOpUpdateBrand struct { +} + +func (*awsRestjson1_serializeOpUpdateBrand) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpUpdateAccountCustomization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateBrand) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -13821,13 +15286,13 @@ func (m *awsRestjson1_serializeOpUpdateAccountCustomization) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UpdateAccountCustomizationInput) + input, ok := in.Parameters.(*UpdateBrandInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/customizations") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/brands/{BrandId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PUT" @@ -13843,14 +15308,14 @@ func (m *awsRestjson1_serializeOpUpdateAccountCustomization) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsUpdateAccountCustomizationInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateBrandInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateAccountCustomizationInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentUpdateBrandInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -13867,7 +15332,7 @@ func (m *awsRestjson1_serializeOpUpdateAccountCustomization) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsUpdateAccountCustomizationInput(v *UpdateAccountCustomizationInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateBrandInput(v *UpdateBrandInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -13881,20 +15346,25 @@ func awsRestjson1_serializeOpHttpBindingsUpdateAccountCustomizationInput(v *Upda } } - if v.Namespace != nil { - encoder.SetQuery("namespace").String(*v.Namespace) + if v.BrandId == nil || len(*v.BrandId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BrandId must not be empty")} + } + if v.BrandId != nil { + if err := encoder.SetURI("BrandId").String(*v.BrandId); err != nil { + return err + } } return nil } -func awsRestjson1_serializeOpDocumentUpdateAccountCustomizationInput(v *UpdateAccountCustomizationInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentUpdateBrandInput(v *UpdateBrandInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.AccountCustomization != nil { - ok := object.Key("AccountCustomization") - if err := awsRestjson1_serializeDocumentAccountCustomization(v.AccountCustomization, ok); err != nil { + if v.BrandDefinition != nil { + ok := object.Key("BrandDefinition") + if err := awsRestjson1_serializeDocumentBrandDefinition(v.BrandDefinition, ok); err != nil { return err } } @@ -13902,14 +15372,14 @@ func awsRestjson1_serializeOpDocumentUpdateAccountCustomizationInput(v *UpdateAc return nil } -type awsRestjson1_serializeOpUpdateAccountSettings struct { +type awsRestjson1_serializeOpUpdateBrandAssignment struct { } -func (*awsRestjson1_serializeOpUpdateAccountSettings) ID() string { +func (*awsRestjson1_serializeOpUpdateBrandAssignment) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpUpdateAccountSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateBrandAssignment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -13921,13 +15391,13 @@ func (m *awsRestjson1_serializeOpUpdateAccountSettings) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UpdateAccountSettingsInput) + input, ok := in.Parameters.(*UpdateBrandAssignmentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/settings") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/brandassignments") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PUT" @@ -13943,14 +15413,14 @@ func (m *awsRestjson1_serializeOpUpdateAccountSettings) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsUpdateAccountSettingsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateBrandAssignmentInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateAccountSettingsInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentUpdateBrandAssignmentInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -13967,7 +15437,7 @@ func (m *awsRestjson1_serializeOpUpdateAccountSettings) HandleSerialize(ctx cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsUpdateAccountSettingsInput(v *UpdateAccountSettingsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateBrandAssignmentInput(v *UpdateBrandAssignmentInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -13984,36 +15454,26 @@ func awsRestjson1_serializeOpHttpBindingsUpdateAccountSettingsInput(v *UpdateAcc return nil } -func awsRestjson1_serializeOpDocumentUpdateAccountSettingsInput(v *UpdateAccountSettingsInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentUpdateBrandAssignmentInput(v *UpdateBrandAssignmentInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.DefaultNamespace != nil { - ok := object.Key("DefaultNamespace") - ok.String(*v.DefaultNamespace) - } - - if v.NotificationEmail != nil { - ok := object.Key("NotificationEmail") - ok.String(*v.NotificationEmail) - } - - if v.TerminationProtectionEnabled { - ok := object.Key("TerminationProtectionEnabled") - ok.Boolean(v.TerminationProtectionEnabled) + if v.BrandArn != nil { + ok := object.Key("BrandArn") + ok.String(*v.BrandArn) } return nil } -type awsRestjson1_serializeOpUpdateAnalysis struct { +type awsRestjson1_serializeOpUpdateBrandPublishedVersion struct { } -func (*awsRestjson1_serializeOpUpdateAnalysis) ID() string { +func (*awsRestjson1_serializeOpUpdateBrandPublishedVersion) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpUpdateAnalysis) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateBrandPublishedVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -14025,13 +15485,13 @@ func (m *awsRestjson1_serializeOpUpdateAnalysis) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UpdateAnalysisInput) + input, ok := in.Parameters.(*UpdateBrandPublishedVersionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/analyses/{AnalysisId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/brands/{BrandId}/publishedversion") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PUT" @@ -14047,14 +15507,14 @@ func (m *awsRestjson1_serializeOpUpdateAnalysis) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsUpdateAnalysisInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateBrandPublishedVersionInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateAnalysisInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentUpdateBrandPublishedVersionInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -14071,20 +15531,11 @@ func (m *awsRestjson1_serializeOpUpdateAnalysis) HandleSerialize(ctx context.Con span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsUpdateAnalysisInput(v *UpdateAnalysisInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateBrandPublishedVersionInput(v *UpdateBrandPublishedVersionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AnalysisId == nil || len(*v.AnalysisId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AnalysisId must not be empty")} - } - if v.AnalysisId != nil { - if err := encoder.SetURI("AnalysisId").String(*v.AnalysisId); err != nil { - return err - } - } - if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} } @@ -14094,62 +15545,38 @@ func awsRestjson1_serializeOpHttpBindingsUpdateAnalysisInput(v *UpdateAnalysisIn } } - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateAnalysisInput(v *UpdateAnalysisInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Definition != nil { - ok := object.Key("Definition") - if err := awsRestjson1_serializeDocumentAnalysisDefinition(v.Definition, ok); err != nil { - return err - } - } - - if v.Name != nil { - ok := object.Key("Name") - ok.String(*v.Name) + if v.BrandId == nil || len(*v.BrandId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BrandId must not be empty")} } - - if v.Parameters != nil { - ok := object.Key("Parameters") - if err := awsRestjson1_serializeDocumentParameters(v.Parameters, ok); err != nil { + if v.BrandId != nil { + if err := encoder.SetURI("BrandId").String(*v.BrandId); err != nil { return err } } - if v.SourceEntity != nil { - ok := object.Key("SourceEntity") - if err := awsRestjson1_serializeDocumentAnalysisSourceEntity(v.SourceEntity, ok); err != nil { - return err - } - } + return nil +} - if v.ThemeArn != nil { - ok := object.Key("ThemeArn") - ok.String(*v.ThemeArn) - } +func awsRestjson1_serializeOpDocumentUpdateBrandPublishedVersionInput(v *UpdateBrandPublishedVersionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() - if v.ValidationStrategy != nil { - ok := object.Key("ValidationStrategy") - if err := awsRestjson1_serializeDocumentValidationStrategy(v.ValidationStrategy, ok); err != nil { - return err - } + if v.VersionId != nil { + ok := object.Key("VersionId") + ok.String(*v.VersionId) } return nil } -type awsRestjson1_serializeOpUpdateAnalysisPermissions struct { +type awsRestjson1_serializeOpUpdateCustomPermissions struct { } -func (*awsRestjson1_serializeOpUpdateAnalysisPermissions) ID() string { +func (*awsRestjson1_serializeOpUpdateCustomPermissions) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpUpdateAnalysisPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateCustomPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -14161,13 +15588,13 @@ func (m *awsRestjson1_serializeOpUpdateAnalysisPermissions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UpdateAnalysisPermissionsInput) + input, ok := in.Parameters.(*UpdateCustomPermissionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/analyses/{AnalysisId}/permissions") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/custom-permissions/{CustomPermissionsName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PUT" @@ -14183,14 +15610,14 @@ func (m *awsRestjson1_serializeOpUpdateAnalysisPermissions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsUpdateAnalysisPermissionsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateCustomPermissionsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateAnalysisPermissionsInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentUpdateCustomPermissionsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -14207,25 +15634,25 @@ func (m *awsRestjson1_serializeOpUpdateAnalysisPermissions) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsUpdateAnalysisPermissionsInput(v *UpdateAnalysisPermissionsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateCustomPermissionsInput(v *UpdateCustomPermissionsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AnalysisId == nil || len(*v.AnalysisId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AnalysisId must not be empty")} + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} } - if v.AnalysisId != nil { - if err := encoder.SetURI("AnalysisId").String(*v.AnalysisId); err != nil { + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { return err } } - if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + if v.CustomPermissionsName == nil || len(*v.CustomPermissionsName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CustomPermissionsName must not be empty")} } - if v.AwsAccountId != nil { - if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + if v.CustomPermissionsName != nil { + if err := encoder.SetURI("CustomPermissionsName").String(*v.CustomPermissionsName); err != nil { return err } } @@ -14233,20 +15660,13 @@ func awsRestjson1_serializeOpHttpBindingsUpdateAnalysisPermissionsInput(v *Updat return nil } -func awsRestjson1_serializeOpDocumentUpdateAnalysisPermissionsInput(v *UpdateAnalysisPermissionsInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentUpdateCustomPermissionsInput(v *UpdateCustomPermissionsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.GrantPermissions != nil { - ok := object.Key("GrantPermissions") - if err := awsRestjson1_serializeDocumentUpdateResourcePermissionList(v.GrantPermissions, ok); err != nil { - return err - } - } - - if v.RevokePermissions != nil { - ok := object.Key("RevokePermissions") - if err := awsRestjson1_serializeDocumentUpdateResourcePermissionList(v.RevokePermissions, ok); err != nil { + if v.Capabilities != nil { + ok := object.Key("Capabilities") + if err := awsRestjson1_serializeDocumentCapabilities(v.Capabilities, ok); err != nil { return err } } @@ -17607,7 +19027,149 @@ func (m *awsRestjson1_serializeOpUpdateUser) HandleSerialize(ctx context.Context span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsUpdateUserInput(v *UpdateUserInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateUserInput(v *UpdateUserInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.Namespace == nil || len(*v.Namespace) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Namespace must not be empty")} + } + if v.Namespace != nil { + if err := encoder.SetURI("Namespace").String(*v.Namespace); err != nil { + return err + } + } + + if v.UserName == nil || len(*v.UserName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member UserName must not be empty")} + } + if v.UserName != nil { + if err := encoder.SetURI("UserName").String(*v.UserName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateUserInput(v *UpdateUserInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CustomFederationProviderUrl != nil { + ok := object.Key("CustomFederationProviderUrl") + ok.String(*v.CustomFederationProviderUrl) + } + + if v.CustomPermissionsName != nil { + ok := object.Key("CustomPermissionsName") + ok.String(*v.CustomPermissionsName) + } + + if v.Email != nil { + ok := object.Key("Email") + ok.String(*v.Email) + } + + if v.ExternalLoginFederationProviderType != nil { + ok := object.Key("ExternalLoginFederationProviderType") + ok.String(*v.ExternalLoginFederationProviderType) + } + + if v.ExternalLoginId != nil { + ok := object.Key("ExternalLoginId") + ok.String(*v.ExternalLoginId) + } + + if len(v.Role) > 0 { + ok := object.Key("Role") + ok.String(string(v.Role)) + } + + if v.UnapplyCustomPermissions { + ok := object.Key("UnapplyCustomPermissions") + ok.Boolean(v.UnapplyCustomPermissions) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateUserCustomPermission struct { +} + +func (*awsRestjson1_serializeOpUpdateUserCustomPermission) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateUserCustomPermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateUserCustomPermissionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/namespaces/{Namespace}/users/{UserName}/custom-permission") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateUserCustomPermissionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateUserCustomPermissionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateUserCustomPermissionInput(v *UpdateUserCustomPermissionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -17642,45 +19204,15 @@ func awsRestjson1_serializeOpHttpBindingsUpdateUserInput(v *UpdateUserInput, enc return nil } -func awsRestjson1_serializeOpDocumentUpdateUserInput(v *UpdateUserInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentUpdateUserCustomPermissionInput(v *UpdateUserCustomPermissionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.CustomFederationProviderUrl != nil { - ok := object.Key("CustomFederationProviderUrl") - ok.String(*v.CustomFederationProviderUrl) - } - if v.CustomPermissionsName != nil { ok := object.Key("CustomPermissionsName") ok.String(*v.CustomPermissionsName) } - if v.Email != nil { - ok := object.Key("Email") - ok.String(*v.Email) - } - - if v.ExternalLoginFederationProviderType != nil { - ok := object.Key("ExternalLoginFederationProviderType") - ok.String(*v.ExternalLoginFederationProviderType) - } - - if v.ExternalLoginId != nil { - ok := object.Key("ExternalLoginId") - ok.String(*v.ExternalLoginId) - } - - if len(v.Role) > 0 { - ok := object.Key("Role") - ok.String(string(v.Role)) - } - - if v.UnapplyCustomPermissions { - ok := object.Key("UnapplyCustomPermissions") - ok.Boolean(v.UnapplyCustomPermissions) - } - return nil } @@ -18379,6 +19911,27 @@ func awsRestjson1_serializeDocumentAnswerIds(v []string, value smithyjson.Value) return nil } +func awsRestjson1_serializeDocumentApplicationTheme(v *types.ApplicationTheme, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BrandColorPalette != nil { + ok := object.Key("BrandColorPalette") + if err := awsRestjson1_serializeDocumentBrandColorPalette(v.BrandColorPalette, ok); err != nil { + return err + } + } + + if v.BrandElementStyle != nil { + ok := object.Key("BrandElementStyle") + if err := awsRestjson1_serializeDocumentBrandElementStyle(v.BrandElementStyle, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentArcAxisConfiguration(v *types.ArcAxisConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -21249,6 +22802,121 @@ func awsRestjson1_serializeDocumentBoxPlotVisual(v *types.BoxPlotVisual, value s return nil } +func awsRestjson1_serializeDocumentBrandColorPalette(v *types.BrandColorPalette, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Accent != nil { + ok := object.Key("Accent") + if err := awsRestjson1_serializeDocumentPalette(v.Accent, ok); err != nil { + return err + } + } + + if v.Danger != nil { + ok := object.Key("Danger") + if err := awsRestjson1_serializeDocumentPalette(v.Danger, ok); err != nil { + return err + } + } + + if v.Dimension != nil { + ok := object.Key("Dimension") + if err := awsRestjson1_serializeDocumentPalette(v.Dimension, ok); err != nil { + return err + } + } + + if v.Info != nil { + ok := object.Key("Info") + if err := awsRestjson1_serializeDocumentPalette(v.Info, ok); err != nil { + return err + } + } + + if v.Measure != nil { + ok := object.Key("Measure") + if err := awsRestjson1_serializeDocumentPalette(v.Measure, ok); err != nil { + return err + } + } + + if v.Primary != nil { + ok := object.Key("Primary") + if err := awsRestjson1_serializeDocumentPalette(v.Primary, ok); err != nil { + return err + } + } + + if v.Secondary != nil { + ok := object.Key("Secondary") + if err := awsRestjson1_serializeDocumentPalette(v.Secondary, ok); err != nil { + return err + } + } + + if v.Success != nil { + ok := object.Key("Success") + if err := awsRestjson1_serializeDocumentPalette(v.Success, ok); err != nil { + return err + } + } + + if v.Warning != nil { + ok := object.Key("Warning") + if err := awsRestjson1_serializeDocumentPalette(v.Warning, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentBrandDefinition(v *types.BrandDefinition, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ApplicationTheme != nil { + ok := object.Key("ApplicationTheme") + if err := awsRestjson1_serializeDocumentApplicationTheme(v.ApplicationTheme, ok); err != nil { + return err + } + } + + if v.BrandName != nil { + ok := object.Key("BrandName") + ok.String(*v.BrandName) + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.LogoConfiguration != nil { + ok := object.Key("LogoConfiguration") + if err := awsRestjson1_serializeDocumentLogoConfiguration(v.LogoConfiguration, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentBrandElementStyle(v *types.BrandElementStyle, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NavbarStyle != nil { + ok := object.Key("NavbarStyle") + if err := awsRestjson1_serializeDocumentNavbarStyle(v.NavbarStyle, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentCalculatedColumn(v *types.CalculatedColumn, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -21349,6 +23017,98 @@ func awsRestjson1_serializeDocumentCalculatedMeasureField(v *types.CalculatedMea return nil } +func awsRestjson1_serializeDocumentCapabilities(v *types.Capabilities, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.AddOrRunAnomalyDetectionForAnalyses) > 0 { + ok := object.Key("AddOrRunAnomalyDetectionForAnalyses") + ok.String(string(v.AddOrRunAnomalyDetectionForAnalyses)) + } + + if len(v.CreateAndUpdateDashboardEmailReports) > 0 { + ok := object.Key("CreateAndUpdateDashboardEmailReports") + ok.String(string(v.CreateAndUpdateDashboardEmailReports)) + } + + if len(v.CreateAndUpdateDatasets) > 0 { + ok := object.Key("CreateAndUpdateDatasets") + ok.String(string(v.CreateAndUpdateDatasets)) + } + + if len(v.CreateAndUpdateDataSources) > 0 { + ok := object.Key("CreateAndUpdateDataSources") + ok.String(string(v.CreateAndUpdateDataSources)) + } + + if len(v.CreateAndUpdateThemes) > 0 { + ok := object.Key("CreateAndUpdateThemes") + ok.String(string(v.CreateAndUpdateThemes)) + } + + if len(v.CreateAndUpdateThresholdAlerts) > 0 { + ok := object.Key("CreateAndUpdateThresholdAlerts") + ok.String(string(v.CreateAndUpdateThresholdAlerts)) + } + + if len(v.CreateSharedFolders) > 0 { + ok := object.Key("CreateSharedFolders") + ok.String(string(v.CreateSharedFolders)) + } + + if len(v.CreateSPICEDataset) > 0 { + ok := object.Key("CreateSPICEDataset") + ok.String(string(v.CreateSPICEDataset)) + } + + if len(v.ExportToCsv) > 0 { + ok := object.Key("ExportToCsv") + ok.String(string(v.ExportToCsv)) + } + + if len(v.ExportToExcel) > 0 { + ok := object.Key("ExportToExcel") + ok.String(string(v.ExportToExcel)) + } + + if len(v.RenameSharedFolders) > 0 { + ok := object.Key("RenameSharedFolders") + ok.String(string(v.RenameSharedFolders)) + } + + if len(v.ShareAnalyses) > 0 { + ok := object.Key("ShareAnalyses") + ok.String(string(v.ShareAnalyses)) + } + + if len(v.ShareDashboards) > 0 { + ok := object.Key("ShareDashboards") + ok.String(string(v.ShareDashboards)) + } + + if len(v.ShareDatasets) > 0 { + ok := object.Key("ShareDatasets") + ok.String(string(v.ShareDatasets)) + } + + if len(v.ShareDataSources) > 0 { + ok := object.Key("ShareDataSources") + ok.String(string(v.ShareDataSources)) + } + + if len(v.SubscribeDashboardEmailReports) > 0 { + ok := object.Key("SubscribeDashboardEmailReports") + ok.String(string(v.SubscribeDashboardEmailReports)) + } + + if len(v.ViewAccountSPICECapacity) > 0 { + ok := object.Key("ViewAccountSPICECapacity") + ok.String(string(v.ViewAccountSPICECapacity)) + } + + return nil +} + func awsRestjson1_serializeDocumentCascadingControlConfiguration(v *types.CascadingControlConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -29294,6 +31054,54 @@ func awsRestjson1_serializeDocumentIdentityNameList(v []string, value smithyjson return nil } +func awsRestjson1_serializeDocumentImageConfiguration(v *types.ImageConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Source != nil { + ok := object.Key("Source") + if err := awsRestjson1_serializeDocumentImageSource(v.Source, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentImageSetConfiguration(v *types.ImageSetConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Original != nil { + ok := object.Key("Original") + if err := awsRestjson1_serializeDocumentImageConfiguration(v.Original, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentImageSource(v types.ImageSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.ImageSourceMemberPublicUrl: + av := object.Key("PublicUrl") + av.String(uv.Value) + + case *types.ImageSourceMemberS3Uri: + av := object.Key("S3Uri") + av.String(uv.Value) + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + func awsRestjson1_serializeDocumentIncrementalRefresh(v *types.IncrementalRefresh, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -30797,6 +32605,46 @@ func awsRestjson1_serializeDocumentLogicalTableSource(v *types.LogicalTableSourc return nil } +func awsRestjson1_serializeDocumentLogoConfiguration(v *types.LogoConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AltText != nil { + ok := object.Key("AltText") + ok.String(*v.AltText) + } + + if v.LogoSet != nil { + ok := object.Key("LogoSet") + if err := awsRestjson1_serializeDocumentLogoSetConfiguration(v.LogoSet, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentLogoSetConfiguration(v *types.LogoSetConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Favicon != nil { + ok := object.Key("Favicon") + if err := awsRestjson1_serializeDocumentImageSetConfiguration(v.Favicon, ok); err != nil { + return err + } + } + + if v.Primary != nil { + ok := object.Key("Primary") + if err := awsRestjson1_serializeDocumentImageSetConfiguration(v.Primary, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentLongFormatText(v *types.LongFormatText, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -31188,6 +33036,27 @@ func awsRestjson1_serializeDocumentNamedEntityRef(v *types.NamedEntityRef, value return nil } +func awsRestjson1_serializeDocumentNavbarStyle(v *types.NavbarStyle, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContextualNavbar != nil { + ok := object.Key("ContextualNavbar") + if err := awsRestjson1_serializeDocumentPalette(v.ContextualNavbar, ok); err != nil { + return err + } + } + + if v.GlobalNavbar != nil { + ok := object.Key("GlobalNavbar") + if err := awsRestjson1_serializeDocumentPalette(v.GlobalNavbar, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentNegativeFormat(v *types.NegativeFormat, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -31826,6 +33695,23 @@ func awsRestjson1_serializeDocumentPaginationConfiguration(v *types.PaginationCo return nil } +func awsRestjson1_serializeDocumentPalette(v *types.Palette, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Background != nil { + ok := object.Key("Background") + ok.String(*v.Background) + } + + if v.Foreground != nil { + ok := object.Key("Foreground") + ok.String(*v.Foreground) + } + + return nil +} + func awsRestjson1_serializeDocumentPanelConfiguration(v *types.PanelConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/quicksight/snapshot/api_op_CreateBrand.go.snap b/service/quicksight/snapshot/api_op_CreateBrand.go.snap new file mode 100644 index 00000000000..14f8fe7eef9 --- /dev/null +++ b/service/quicksight/snapshot/api_op_CreateBrand.go.snap @@ -0,0 +1,41 @@ +CreateBrand + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/quicksight/snapshot/api_op_CreateCustomPermissions.go.snap b/service/quicksight/snapshot/api_op_CreateCustomPermissions.go.snap new file mode 100644 index 00000000000..ded88574941 --- /dev/null +++ b/service/quicksight/snapshot/api_op_CreateCustomPermissions.go.snap @@ -0,0 +1,41 @@ +CreateCustomPermissions + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/quicksight/snapshot/api_op_DeleteBrand.go.snap b/service/quicksight/snapshot/api_op_DeleteBrand.go.snap new file mode 100644 index 00000000000..b2ece5b5fd6 --- /dev/null +++ b/service/quicksight/snapshot/api_op_DeleteBrand.go.snap @@ -0,0 +1,41 @@ +DeleteBrand + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/quicksight/snapshot/api_op_DeleteBrandAssignment.go.snap b/service/quicksight/snapshot/api_op_DeleteBrandAssignment.go.snap new file mode 100644 index 00000000000..1a4c181ce4a --- /dev/null +++ b/service/quicksight/snapshot/api_op_DeleteBrandAssignment.go.snap @@ -0,0 +1,41 @@ +DeleteBrandAssignment + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/quicksight/snapshot/api_op_DeleteCustomPermissions.go.snap b/service/quicksight/snapshot/api_op_DeleteCustomPermissions.go.snap new file mode 100644 index 00000000000..2959ff5b402 --- /dev/null +++ b/service/quicksight/snapshot/api_op_DeleteCustomPermissions.go.snap @@ -0,0 +1,41 @@ +DeleteCustomPermissions + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/quicksight/snapshot/api_op_DeleteUserCustomPermission.go.snap b/service/quicksight/snapshot/api_op_DeleteUserCustomPermission.go.snap new file mode 100644 index 00000000000..c9dd2a2e0b0 --- /dev/null +++ b/service/quicksight/snapshot/api_op_DeleteUserCustomPermission.go.snap @@ -0,0 +1,41 @@ +DeleteUserCustomPermission + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/quicksight/snapshot/api_op_DescribeBrand.go.snap b/service/quicksight/snapshot/api_op_DescribeBrand.go.snap new file mode 100644 index 00000000000..26983632eee --- /dev/null +++ b/service/quicksight/snapshot/api_op_DescribeBrand.go.snap @@ -0,0 +1,41 @@ +DescribeBrand + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/quicksight/snapshot/api_op_DescribeBrandAssignment.go.snap b/service/quicksight/snapshot/api_op_DescribeBrandAssignment.go.snap new file mode 100644 index 00000000000..0825fb129e1 --- /dev/null +++ b/service/quicksight/snapshot/api_op_DescribeBrandAssignment.go.snap @@ -0,0 +1,41 @@ +DescribeBrandAssignment + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/quicksight/snapshot/api_op_DescribeBrandPublishedVersion.go.snap b/service/quicksight/snapshot/api_op_DescribeBrandPublishedVersion.go.snap new file mode 100644 index 00000000000..03140c01a8e --- /dev/null +++ b/service/quicksight/snapshot/api_op_DescribeBrandPublishedVersion.go.snap @@ -0,0 +1,41 @@ +DescribeBrandPublishedVersion + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/quicksight/snapshot/api_op_DescribeCustomPermissions.go.snap b/service/quicksight/snapshot/api_op_DescribeCustomPermissions.go.snap new file mode 100644 index 00000000000..e31db0f19a6 --- /dev/null +++ b/service/quicksight/snapshot/api_op_DescribeCustomPermissions.go.snap @@ -0,0 +1,41 @@ +DescribeCustomPermissions + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/quicksight/snapshot/api_op_ListBrands.go.snap b/service/quicksight/snapshot/api_op_ListBrands.go.snap new file mode 100644 index 00000000000..cc2ea825b85 --- /dev/null +++ b/service/quicksight/snapshot/api_op_ListBrands.go.snap @@ -0,0 +1,41 @@ +ListBrands + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/quicksight/snapshot/api_op_ListCustomPermissions.go.snap b/service/quicksight/snapshot/api_op_ListCustomPermissions.go.snap new file mode 100644 index 00000000000..07402af9faf --- /dev/null +++ b/service/quicksight/snapshot/api_op_ListCustomPermissions.go.snap @@ -0,0 +1,41 @@ +ListCustomPermissions + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/quicksight/snapshot/api_op_UpdateBrand.go.snap b/service/quicksight/snapshot/api_op_UpdateBrand.go.snap new file mode 100644 index 00000000000..068096cdb2b --- /dev/null +++ b/service/quicksight/snapshot/api_op_UpdateBrand.go.snap @@ -0,0 +1,41 @@ +UpdateBrand + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/quicksight/snapshot/api_op_UpdateBrandAssignment.go.snap b/service/quicksight/snapshot/api_op_UpdateBrandAssignment.go.snap new file mode 100644 index 00000000000..ff87a0fa660 --- /dev/null +++ b/service/quicksight/snapshot/api_op_UpdateBrandAssignment.go.snap @@ -0,0 +1,41 @@ +UpdateBrandAssignment + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/quicksight/snapshot/api_op_UpdateBrandPublishedVersion.go.snap b/service/quicksight/snapshot/api_op_UpdateBrandPublishedVersion.go.snap new file mode 100644 index 00000000000..9ee9f6ffda0 --- /dev/null +++ b/service/quicksight/snapshot/api_op_UpdateBrandPublishedVersion.go.snap @@ -0,0 +1,41 @@ +UpdateBrandPublishedVersion + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/quicksight/snapshot/api_op_UpdateCustomPermissions.go.snap b/service/quicksight/snapshot/api_op_UpdateCustomPermissions.go.snap new file mode 100644 index 00000000000..bc0db4c468b --- /dev/null +++ b/service/quicksight/snapshot/api_op_UpdateCustomPermissions.go.snap @@ -0,0 +1,41 @@ +UpdateCustomPermissions + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/quicksight/snapshot/api_op_UpdateUserCustomPermission.go.snap b/service/quicksight/snapshot/api_op_UpdateUserCustomPermission.go.snap new file mode 100644 index 00000000000..33d76eade01 --- /dev/null +++ b/service/quicksight/snapshot/api_op_UpdateUserCustomPermission.go.snap @@ -0,0 +1,41 @@ +UpdateUserCustomPermission + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/quicksight/snapshot_test.go b/service/quicksight/snapshot_test.go index d9201f737c8..177fc3f539d 100644 --- a/service/quicksight/snapshot_test.go +++ b/service/quicksight/snapshot_test.go @@ -134,6 +134,30 @@ func TestCheckSnapshot_CreateAnalysis(t *testing.T) { } } +func TestCheckSnapshot_CreateBrand(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateBrand(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateBrand") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_CreateCustomPermissions(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateCustomPermissions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateCustomPermissions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateDashboard(t *testing.T) { svc := New(Options{}) _, err := svc.CreateDashboard(context.Background(), nil, func(o *Options) { @@ -398,6 +422,42 @@ func TestCheckSnapshot_DeleteAnalysis(t *testing.T) { } } +func TestCheckSnapshot_DeleteBrand(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteBrand(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteBrand") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_DeleteBrandAssignment(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteBrandAssignment(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteBrandAssignment") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_DeleteCustomPermissions(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteCustomPermissions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteCustomPermissions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteDashboard(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteDashboard(context.Background(), nil, func(o *Options) { @@ -662,6 +722,18 @@ func TestCheckSnapshot_DeleteUserByPrincipalId(t *testing.T) { } } +func TestCheckSnapshot_DeleteUserCustomPermission(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteUserCustomPermission(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteUserCustomPermission") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteVPCConnection(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteVPCConnection(context.Background(), nil, func(o *Options) { @@ -770,6 +842,54 @@ func TestCheckSnapshot_DescribeAssetBundleImportJob(t *testing.T) { } } +func TestCheckSnapshot_DescribeBrand(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeBrand(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeBrand") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_DescribeBrandAssignment(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeBrandAssignment(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeBrandAssignment") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_DescribeBrandPublishedVersion(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeBrandPublishedVersion(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeBrandPublishedVersion") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_DescribeCustomPermissions(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeCustomPermissions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeCustomPermissions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DescribeDashboard(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeDashboard(context.Background(), nil, func(o *Options) { @@ -1286,6 +1406,30 @@ func TestCheckSnapshot_ListAssetBundleImportJobs(t *testing.T) { } } +func TestCheckSnapshot_ListBrands(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListBrands(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListBrands") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListCustomPermissions(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListCustomPermissions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListCustomPermissions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListDashboards(t *testing.T) { svc := New(Options{}) _, err := svc.ListDashboards(context.Background(), nil, func(o *Options) { @@ -1862,6 +2006,54 @@ func TestCheckSnapshot_UpdateAnalysisPermissions(t *testing.T) { } } +func TestCheckSnapshot_UpdateBrand(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateBrand(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateBrand") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_UpdateBrandAssignment(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateBrandAssignment(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateBrandAssignment") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_UpdateBrandPublishedVersion(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateBrandPublishedVersion(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateBrandPublishedVersion") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_UpdateCustomPermissions(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateCustomPermissions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateCustomPermissions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateDashboard(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateDashboard(context.Background(), nil, func(o *Options) { @@ -2222,6 +2414,18 @@ func TestCheckSnapshot_UpdateUser(t *testing.T) { } } +func TestCheckSnapshot_UpdateUserCustomPermission(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateUserCustomPermission(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateUserCustomPermission") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateVPCConnection(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateVPCConnection(context.Background(), nil, func(o *Options) { @@ -2305,6 +2509,30 @@ func TestUpdateSnapshot_CreateAnalysis(t *testing.T) { } } +func TestUpdateSnapshot_CreateBrand(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateBrand(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateBrand") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_CreateCustomPermissions(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateCustomPermissions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateCustomPermissions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateDashboard(t *testing.T) { svc := New(Options{}) _, err := svc.CreateDashboard(context.Background(), nil, func(o *Options) { @@ -2569,6 +2797,42 @@ func TestUpdateSnapshot_DeleteAnalysis(t *testing.T) { } } +func TestUpdateSnapshot_DeleteBrand(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteBrand(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteBrand") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_DeleteBrandAssignment(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteBrandAssignment(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteBrandAssignment") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_DeleteCustomPermissions(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteCustomPermissions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteCustomPermissions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteDashboard(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteDashboard(context.Background(), nil, func(o *Options) { @@ -2833,6 +3097,18 @@ func TestUpdateSnapshot_DeleteUserByPrincipalId(t *testing.T) { } } +func TestUpdateSnapshot_DeleteUserCustomPermission(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteUserCustomPermission(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteUserCustomPermission") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteVPCConnection(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteVPCConnection(context.Background(), nil, func(o *Options) { @@ -2941,6 +3217,54 @@ func TestUpdateSnapshot_DescribeAssetBundleImportJob(t *testing.T) { } } +func TestUpdateSnapshot_DescribeBrand(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeBrand(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeBrand") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_DescribeBrandAssignment(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeBrandAssignment(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeBrandAssignment") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_DescribeBrandPublishedVersion(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeBrandPublishedVersion(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeBrandPublishedVersion") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_DescribeCustomPermissions(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeCustomPermissions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeCustomPermissions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DescribeDashboard(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeDashboard(context.Background(), nil, func(o *Options) { @@ -3457,6 +3781,30 @@ func TestUpdateSnapshot_ListAssetBundleImportJobs(t *testing.T) { } } +func TestUpdateSnapshot_ListBrands(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListBrands(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListBrands") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListCustomPermissions(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListCustomPermissions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListCustomPermissions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListDashboards(t *testing.T) { svc := New(Options{}) _, err := svc.ListDashboards(context.Background(), nil, func(o *Options) { @@ -4033,6 +4381,54 @@ func TestUpdateSnapshot_UpdateAnalysisPermissions(t *testing.T) { } } +func TestUpdateSnapshot_UpdateBrand(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateBrand(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateBrand") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_UpdateBrandAssignment(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateBrandAssignment(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateBrandAssignment") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_UpdateBrandPublishedVersion(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateBrandPublishedVersion(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateBrandPublishedVersion") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_UpdateCustomPermissions(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateCustomPermissions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateCustomPermissions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateDashboard(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateDashboard(context.Background(), nil, func(o *Options) { @@ -4393,6 +4789,18 @@ func TestUpdateSnapshot_UpdateUser(t *testing.T) { } } +func TestUpdateSnapshot_UpdateUserCustomPermission(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateUserCustomPermission(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateUserCustomPermission") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateVPCConnection(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateVPCConnection(context.Background(), nil, func(o *Options) { diff --git a/service/quicksight/types/enums.go b/service/quicksight/types/enums.go index 5f1f8575dcf..650e956b25b 100644 --- a/service/quicksight/types/enums.go +++ b/service/quicksight/types/enums.go @@ -715,6 +715,69 @@ func (BoxPlotFillStyle) Values() []BoxPlotFillStyle { } } +type BrandStatus string + +// Enum values for BrandStatus +const ( + BrandStatusCreateInProgress BrandStatus = "CREATE_IN_PROGRESS" + BrandStatusCreateSucceeded BrandStatus = "CREATE_SUCCEEDED" + BrandStatusCreateFailed BrandStatus = "CREATE_FAILED" + BrandStatusDeleteInProgress BrandStatus = "DELETE_IN_PROGRESS" + BrandStatusDeleteFailed BrandStatus = "DELETE_FAILED" +) + +// Values returns all known values for BrandStatus. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (BrandStatus) Values() []BrandStatus { + return []BrandStatus{ + "CREATE_IN_PROGRESS", + "CREATE_SUCCEEDED", + "CREATE_FAILED", + "DELETE_IN_PROGRESS", + "DELETE_FAILED", + } +} + +type BrandVersionStatus string + +// Enum values for BrandVersionStatus +const ( + BrandVersionStatusCreateInProgress BrandVersionStatus = "CREATE_IN_PROGRESS" + BrandVersionStatusCreateSucceeded BrandVersionStatus = "CREATE_SUCCEEDED" + BrandVersionStatusCreateFailed BrandVersionStatus = "CREATE_FAILED" +) + +// Values returns all known values for BrandVersionStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (BrandVersionStatus) Values() []BrandVersionStatus { + return []BrandVersionStatus{ + "CREATE_IN_PROGRESS", + "CREATE_SUCCEEDED", + "CREATE_FAILED", + } +} + +type CapabilityState string + +// Enum values for CapabilityState +const ( + CapabilityStateDeny CapabilityState = "DENY" +) + +// Values returns all known values for CapabilityState. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (CapabilityState) Values() []CapabilityState { + return []CapabilityState{ + "DENY", + } +} + type CategoricalAggregationFunction string // Enum values for CategoricalAggregationFunction diff --git a/service/quicksight/types/errors.go b/service/quicksight/types/errors.go index 5eb4fdffd84..824845222d1 100644 --- a/service/quicksight/types/errors.go +++ b/service/quicksight/types/errors.go @@ -213,6 +213,32 @@ func (e *InternalFailureException) ErrorCode() string { } func (e *InternalFailureException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } +// An internal service exception. +type InternalServerException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InternalServerException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InternalServerException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InternalServerException" + } + return *e.ErrorCodeOverride +} +func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + // The NextToken value isn't valid. type InvalidNextTokenException struct { Message *string diff --git a/service/quicksight/types/types.go b/service/quicksight/types/types.go index f224c602f79..54273c30cbc 100644 --- a/service/quicksight/types/types.go +++ b/service/quicksight/types/types.go @@ -602,6 +602,18 @@ type AnonymousUserSnapshotJobResult struct { noSmithyDocumentSerde } +// The application theme. +type ApplicationTheme struct { + + // The color palette. + BrandColorPalette *BrandColorPalette + + // The element style. + BrandElementStyle *BrandElementStyle + + noSmithyDocumentSerde +} + // The arc axis configuration of a GaugeChartVisual . type ArcAxisConfiguration struct { @@ -2344,6 +2356,130 @@ type BoxPlotVisual struct { noSmithyDocumentSerde } +// The color palette. +type BrandColorPalette struct { + + // The color that is used for accent elements. + Accent *Palette + + // The color that is used for danger elements. + Danger *Palette + + // The color that is used for dimension elements. + Dimension *Palette + + // The color that is used for info elements. + Info *Palette + + // The color that is used for measure elements. + Measure *Palette + + // The primary color. + Primary *Palette + + // The secondary color. + Secondary *Palette + + // The color that is used for success elements. + Success *Palette + + // The color that is used for warning elements. + Warning *Palette + + noSmithyDocumentSerde +} + +// The definition of the brand. +type BrandDefinition struct { + + // The name of the brand. + // + // This member is required. + BrandName *string + + // The application theme of the brand. + ApplicationTheme *ApplicationTheme + + // The description of the brand. + Description *string + + // The logo configuration of the brand. + LogoConfiguration *LogoConfiguration + + noSmithyDocumentSerde +} + +// The details of the brand. +type BrandDetail struct { + + // The ID of the Amazon QuickSight brand. + // + // This member is required. + BrandId *string + + // The Amazon Resource Name (ARN) of the brand. + Arn *string + + // The status of the brand. + BrandStatus BrandStatus + + // The time that the brand was created. + CreatedTime *time.Time + + // A list of errors that occurred during the most recent brand operation. + Errors []string + + // The last time the brand was updated. + LastUpdatedTime *time.Time + + // The logo details. + Logo *Logo + + // The ID of the version. + VersionId *string + + // The status of the version. + VersionStatus BrandVersionStatus + + noSmithyDocumentSerde +} + +// The element style. +type BrandElementStyle struct { + + // The navigation bar style. + NavbarStyle *NavbarStyle + + noSmithyDocumentSerde +} + +// A summary of the brand. +type BrandSummary struct { + + // The Amazon Resource Name (ARN) of the brand. + Arn *string + + // The ID of the Amazon QuickSight brand. + BrandId *string + + // The name of the brand. + BrandName *string + + // The status of the brand. + BrandStatus BrandStatus + + // The time that the brand was created. + CreatedTime *time.Time + + // The description of the brand. + Description *string + + // The time when the brand was last updated. + LastUpdatedTime *time.Time + + noSmithyDocumentSerde +} + // A calculated column for a dataset. type CalculatedColumn struct { @@ -2404,6 +2540,63 @@ type CalculatedMeasureField struct { noSmithyDocumentSerde } +// A set of actions that correspond to Amazon QuickSight permissions. +type Capabilities struct { + + // The ability to add or run anomaly detection. + AddOrRunAnomalyDetectionForAnalyses CapabilityState + + // The ability to create and update email reports. + CreateAndUpdateDashboardEmailReports CapabilityState + + // The ability to create and update data sources. + CreateAndUpdateDataSources CapabilityState + + // The ability to create and update datasets. + CreateAndUpdateDatasets CapabilityState + + // The ability to export to Create and Update themes. + CreateAndUpdateThemes CapabilityState + + // The ability to create and update threshold alerts. + CreateAndUpdateThresholdAlerts CapabilityState + + // The ability to create a SPICE dataset. + CreateSPICEDataset CapabilityState + + // The ability to create shared folders. + CreateSharedFolders CapabilityState + + // The ability to export to CSV files. + ExportToCsv CapabilityState + + // The ability to export to Excel files. + ExportToExcel CapabilityState + + // The ability to rename shared folders. + RenameSharedFolders CapabilityState + + // The ability to share analyses. + ShareAnalyses CapabilityState + + // The ability to share dashboards. + ShareDashboards CapabilityState + + // The ability to share data sources. + ShareDataSources CapabilityState + + // The ability to share datasets. + ShareDatasets CapabilityState + + // The ability to subscribe to email reports. + SubscribeDashboardEmailReports CapabilityState + + // The ability to view account SPICE capacity. + ViewAccountSPICECapacity CapabilityState + + noSmithyDocumentSerde +} + // The values that are displayed in a control can be configured to only show // values that are valid based on what's selected in other controls. type CascadingControlConfiguration struct { @@ -3615,6 +3808,21 @@ type CustomParameterValues struct { noSmithyDocumentSerde } +// The custom permissions profile. +type CustomPermissions struct { + + // The Amazon Resource Name (ARN) of the custom permissions profile. + Arn *string + + // A set of actions in the custom permissions profile. + Capabilities *Capabilities + + // The name of the custom permissions profile. + CustomPermissionsName *string + + noSmithyDocumentSerde +} + // A physical table type built from the results of the custom SQL query. type CustomSql struct { @@ -8080,6 +8288,83 @@ type IdentityCenterConfiguration struct { noSmithyDocumentSerde } +// The logo image. +type Image struct { + + // The URL that points to the generated logo image. + GeneratedImageUrl *string + + // The source of the logo image. + Source ImageSource + + noSmithyDocumentSerde +} + +// The logo image configuration. +type ImageConfiguration struct { + + // The source of the image. + Source ImageSource + + noSmithyDocumentSerde +} + +// The image set. +type ImageSet struct { + + // The original image. + // + // This member is required. + Original *Image + + // The image with the height set to 32 pixels. + Height32 *Image + + // The image with the height set to 64 pixels. + Height64 *Image + + noSmithyDocumentSerde +} + +// The image set configuration. +type ImageSetConfiguration struct { + + // The original image. + // + // This member is required. + Original *ImageConfiguration + + noSmithyDocumentSerde +} + +// The source of the image. +// +// The following types satisfy this interface: +// +// ImageSourceMemberPublicUrl +// ImageSourceMemberS3Uri +type ImageSource interface { + isImageSource() +} + +// The public URL that points to the source image. +type ImageSourceMemberPublicUrl struct { + Value string + + noSmithyDocumentSerde +} + +func (*ImageSourceMemberPublicUrl) isImageSource() {} + +// The Amazon S3 URI that points to the source image. +type ImageSourceMemberS3Uri struct { + Value string + + noSmithyDocumentSerde +} + +func (*ImageSourceMemberS3Uri) isImageSource() {} + // The incremental refresh configuration for a dataset. type IncrementalRefresh struct { @@ -9077,6 +9362,66 @@ type LogicalTableSource struct { noSmithyDocumentSerde } +// The logo configuration. +type Logo struct { + + // The alt text for the logo. + // + // This member is required. + AltText *string + + // A set of configured logos. + // + // This member is required. + LogoSet *LogoSet + + noSmithyDocumentSerde +} + +// The logo configuration. +type LogoConfiguration struct { + + // The alt text for the logo. + // + // This member is required. + AltText *string + + // A set of configured logos. + // + // This member is required. + LogoSet *LogoSetConfiguration + + noSmithyDocumentSerde +} + +// A set of logos. +type LogoSet struct { + + // The primary logo. + // + // This member is required. + Primary *ImageSet + + // The favicon logo. + Favicon *ImageSet + + noSmithyDocumentSerde +} + +// The logo set configuration. +type LogoSetConfiguration struct { + + // The primary logo. + // + // This member is required. + Primary *ImageSetConfiguration + + // The favicon logo. + Favicon *ImageSetConfiguration + + noSmithyDocumentSerde +} + // The text format for a subtitle. // // This is a union type structure. For this structure to be valid, only one of the @@ -9396,6 +9741,18 @@ type NamespaceInfoV2 struct { noSmithyDocumentSerde } +// The navigation bar style. +type NavbarStyle struct { + + // The contextual navigation bar style. + ContextualNavbar *Palette + + // The global navigation bar style. + GlobalNavbar *Palette + + noSmithyDocumentSerde +} + // A structure that represents a negative format. type NegativeFormat struct { @@ -9883,6 +10240,18 @@ type PaginationConfiguration struct { noSmithyDocumentSerde } +// The color palette. +type Palette struct { + + // The background color. + Background *string + + // The foreground color. + Foreground *string + + noSmithyDocumentSerde +} + // A collection of options that configure how each panel displays in a small // multiples chart. type PanelConfiguration struct { @@ -16745,5 +17114,6 @@ type UnknownUnionMember struct { } func (*UnknownUnionMember) isDataSourceParameters() {} +func (*UnknownUnionMember) isImageSource() {} func (*UnknownUnionMember) isPhysicalTable() {} func (*UnknownUnionMember) isTransformOperation() {} diff --git a/service/quicksight/types/types_exported_test.go b/service/quicksight/types/types_exported_test.go index 5a18dd8f897..f1c4894fff0 100644 --- a/service/quicksight/types/types_exported_test.go +++ b/service/quicksight/types/types_exported_test.go @@ -125,6 +125,27 @@ var _ *types.AuroraPostgreSqlParameters var _ *types.AthenaParameters var _ *types.SparkParameters +func ExampleImageSource_outputUsage() { + var union types.ImageSource + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ImageSourceMemberPublicUrl: + _ = v.Value // Value is string + + case *types.ImageSourceMemberS3Uri: + _ = v.Value // Value is string + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *string + func ExamplePhysicalTable_outputUsage() { var union types.PhysicalTable // type switches can be used to check the union value diff --git a/service/quicksight/validators.go b/service/quicksight/validators.go index 182ba2933f0..e05ab0d2b3f 100644 --- a/service/quicksight/validators.go +++ b/service/quicksight/validators.go @@ -130,6 +130,46 @@ func (m *validateOpCreateAnalysis) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpCreateBrand struct { +} + +func (*validateOpCreateBrand) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateBrand) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateBrandInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateBrandInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateCustomPermissions struct { +} + +func (*validateOpCreateCustomPermissions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateCustomPermissions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateCustomPermissionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateCustomPermissionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateDashboard struct { } @@ -570,6 +610,66 @@ func (m *validateOpDeleteAnalysis) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpDeleteBrandAssignment struct { +} + +func (*validateOpDeleteBrandAssignment) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteBrandAssignment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteBrandAssignmentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteBrandAssignmentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteBrand struct { +} + +func (*validateOpDeleteBrand) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteBrand) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteBrandInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteBrandInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteCustomPermissions struct { +} + +func (*validateOpDeleteCustomPermissions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteCustomPermissions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteCustomPermissionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteCustomPermissionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteDashboard struct { } @@ -990,6 +1090,26 @@ func (m *validateOpDeleteUserByPrincipalId) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpDeleteUserCustomPermission struct { +} + +func (*validateOpDeleteUserCustomPermission) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteUserCustomPermission) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteUserCustomPermissionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteUserCustomPermissionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteUser struct { } @@ -1190,6 +1310,86 @@ func (m *validateOpDescribeAssetBundleImportJob) HandleInitialize(ctx context.Co return next.HandleInitialize(ctx, in) } +type validateOpDescribeBrandAssignment struct { +} + +func (*validateOpDescribeBrandAssignment) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeBrandAssignment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeBrandAssignmentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeBrandAssignmentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeBrand struct { +} + +func (*validateOpDescribeBrand) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeBrand) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeBrandInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeBrandInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeBrandPublishedVersion struct { +} + +func (*validateOpDescribeBrandPublishedVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeBrandPublishedVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeBrandPublishedVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeBrandPublishedVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeCustomPermissions struct { +} + +func (*validateOpDescribeCustomPermissions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeCustomPermissions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeCustomPermissionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeCustomPermissionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeDashboardDefinition struct { } @@ -2050,6 +2250,46 @@ func (m *validateOpListAssetBundleImportJobs) HandleInitialize(ctx context.Conte return next.HandleInitialize(ctx, in) } +type validateOpListBrands struct { +} + +func (*validateOpListBrands) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListBrands) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListBrandsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListBrandsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListCustomPermissions struct { +} + +func (*validateOpListCustomPermissions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListCustomPermissions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListCustomPermissionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListCustomPermissionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListDashboards struct { } @@ -3010,6 +3250,86 @@ func (m *validateOpUpdateAnalysisPermissions) HandleInitialize(ctx context.Conte return next.HandleInitialize(ctx, in) } +type validateOpUpdateBrandAssignment struct { +} + +func (*validateOpUpdateBrandAssignment) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateBrandAssignment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateBrandAssignmentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateBrandAssignmentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateBrand struct { +} + +func (*validateOpUpdateBrand) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateBrand) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateBrandInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateBrandInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateBrandPublishedVersion struct { +} + +func (*validateOpUpdateBrandPublishedVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateBrandPublishedVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateBrandPublishedVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateBrandPublishedVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateCustomPermissions struct { +} + +func (*validateOpUpdateCustomPermissions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateCustomPermissions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateCustomPermissionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateCustomPermissionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateDashboard struct { } @@ -3590,6 +3910,26 @@ func (m *validateOpUpdateTopicRefreshSchedule) HandleInitialize(ctx context.Cont return next.HandleInitialize(ctx, in) } +type validateOpUpdateUserCustomPermission struct { +} + +func (*validateOpUpdateUserCustomPermission) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateUserCustomPermission) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateUserCustomPermissionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateUserCustomPermissionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateUser struct { } @@ -3654,6 +3994,14 @@ func addOpCreateAnalysisValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateAnalysis{}, middleware.After) } +func addOpCreateBrandValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateBrand{}, middleware.After) +} + +func addOpCreateCustomPermissionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateCustomPermissions{}, middleware.After) +} + func addOpCreateDashboardValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateDashboard{}, middleware.After) } @@ -3742,6 +4090,18 @@ func addOpDeleteAnalysisValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteAnalysis{}, middleware.After) } +func addOpDeleteBrandAssignmentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteBrandAssignment{}, middleware.After) +} + +func addOpDeleteBrandValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteBrand{}, middleware.After) +} + +func addOpDeleteCustomPermissionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteCustomPermissions{}, middleware.After) +} + func addOpDeleteDashboardValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteDashboard{}, middleware.After) } @@ -3826,6 +4186,10 @@ func addOpDeleteUserByPrincipalIdValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpDeleteUserByPrincipalId{}, middleware.After) } +func addOpDeleteUserCustomPermissionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteUserCustomPermission{}, middleware.After) +} + func addOpDeleteUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteUser{}, middleware.After) } @@ -3866,6 +4230,22 @@ func addOpDescribeAssetBundleImportJobValidationMiddleware(stack *middleware.Sta return stack.Initialize.Add(&validateOpDescribeAssetBundleImportJob{}, middleware.After) } +func addOpDescribeBrandAssignmentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeBrandAssignment{}, middleware.After) +} + +func addOpDescribeBrandValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeBrand{}, middleware.After) +} + +func addOpDescribeBrandPublishedVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeBrandPublishedVersion{}, middleware.After) +} + +func addOpDescribeCustomPermissionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeCustomPermissions{}, middleware.After) +} + func addOpDescribeDashboardDefinitionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeDashboardDefinition{}, middleware.After) } @@ -4038,6 +4418,14 @@ func addOpListAssetBundleImportJobsValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpListAssetBundleImportJobs{}, middleware.After) } +func addOpListBrandsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListBrands{}, middleware.After) +} + +func addOpListCustomPermissionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListCustomPermissions{}, middleware.After) +} + func addOpListDashboardsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListDashboards{}, middleware.After) } @@ -4230,6 +4618,22 @@ func addOpUpdateAnalysisPermissionsValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpUpdateAnalysisPermissions{}, middleware.After) } +func addOpUpdateBrandAssignmentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateBrandAssignment{}, middleware.After) +} + +func addOpUpdateBrandValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateBrand{}, middleware.After) +} + +func addOpUpdateBrandPublishedVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateBrandPublishedVersion{}, middleware.After) +} + +func addOpUpdateCustomPermissionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateCustomPermissions{}, middleware.After) +} + func addOpUpdateDashboardValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateDashboard{}, middleware.After) } @@ -4346,6 +4750,10 @@ func addOpUpdateTopicRefreshScheduleValidationMiddleware(stack *middleware.Stack return stack.Initialize.Add(&validateOpUpdateTopicRefreshSchedule{}, middleware.After) } +func addOpUpdateUserCustomPermissionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateUserCustomPermission{}, middleware.After) +} + func addOpUpdateUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateUser{}, middleware.After) } @@ -6630,6 +7038,26 @@ func validateBoxPlotVisual(v *types.BoxPlotVisual) error { } } +func validateBrandDefinition(v *types.BrandDefinition) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BrandDefinition"} + if v.BrandName == nil { + invalidParams.Add(smithy.NewErrParamRequired("BrandName")) + } + if v.LogoConfiguration != nil { + if err := validateLogoConfiguration(v.LogoConfiguration); err != nil { + invalidParams.AddNested("LogoConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateCalculatedColumn(v *types.CalculatedColumn) error { if v == nil { return nil @@ -11642,6 +12070,21 @@ func validateIdentifier(v *types.Identifier) error { } } +func validateImageSetConfiguration(v *types.ImageSetConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ImageSetConfiguration"} + if v.Original == nil { + invalidParams.Add(smithy.NewErrParamRequired("Original")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateIncrementalRefresh(v *types.IncrementalRefresh) error { if v == nil { return nil @@ -12562,6 +13005,52 @@ func validateLogicalTableSource(v *types.LogicalTableSource) error { } } +func validateLogoConfiguration(v *types.LogoConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LogoConfiguration"} + if v.AltText == nil { + invalidParams.Add(smithy.NewErrParamRequired("AltText")) + } + if v.LogoSet == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogoSet")) + } else if v.LogoSet != nil { + if err := validateLogoSetConfiguration(v.LogoSet); err != nil { + invalidParams.AddNested("LogoSet", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLogoSetConfiguration(v *types.LogoSetConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LogoSetConfiguration"} + if v.Primary == nil { + invalidParams.Add(smithy.NewErrParamRequired("Primary")) + } else if v.Primary != nil { + if err := validateImageSetConfiguration(v.Primary); err != nil { + invalidParams.AddNested("Primary", err.(smithy.InvalidParamsError)) + } + } + if v.Favicon != nil { + if err := validateImageSetConfiguration(v.Favicon); err != nil { + invalidParams.AddNested("Favicon", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateLookbackWindow(v *types.LookbackWindow) error { if v == nil { return nil @@ -18927,9 +19416,47 @@ func validateOpCreateAnalysisInput(v *CreateAnalysisInput) error { invalidParams.AddNested("Permissions", err.(smithy.InvalidParamsError)) } } - if v.SourceEntity != nil { - if err := validateAnalysisSourceEntity(v.SourceEntity); err != nil { - invalidParams.AddNested("SourceEntity", err.(smithy.InvalidParamsError)) + if v.SourceEntity != nil { + if err := validateAnalysisSourceEntity(v.SourceEntity); err != nil { + invalidParams.AddNested("SourceEntity", err.(smithy.InvalidParamsError)) + } + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if v.Definition != nil { + if err := validateAnalysisDefinition(v.Definition); err != nil { + invalidParams.AddNested("Definition", err.(smithy.InvalidParamsError)) + } + } + if v.ValidationStrategy != nil { + if err := validateValidationStrategy(v.ValidationStrategy); err != nil { + invalidParams.AddNested("ValidationStrategy", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateBrandInput(v *CreateBrandInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateBrandInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.BrandId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BrandId")) + } + if v.BrandDefinition != nil { + if err := validateBrandDefinition(v.BrandDefinition); err != nil { + invalidParams.AddNested("BrandDefinition", err.(smithy.InvalidParamsError)) } } if v.Tags != nil { @@ -18937,14 +19464,27 @@ func validateOpCreateAnalysisInput(v *CreateAnalysisInput) error { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } - if v.Definition != nil { - if err := validateAnalysisDefinition(v.Definition); err != nil { - invalidParams.AddNested("Definition", err.(smithy.InvalidParamsError)) - } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil } - if v.ValidationStrategy != nil { - if err := validateValidationStrategy(v.ValidationStrategy); err != nil { - invalidParams.AddNested("ValidationStrategy", err.(smithy.InvalidParamsError)) +} + +func validateOpCreateCustomPermissionsInput(v *CreateCustomPermissionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateCustomPermissionsInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.CustomPermissionsName == nil { + invalidParams.Add(smithy.NewErrParamRequired("CustomPermissionsName")) + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { @@ -19611,6 +20151,57 @@ func validateOpDeleteAnalysisInput(v *DeleteAnalysisInput) error { } } +func validateOpDeleteBrandAssignmentInput(v *DeleteBrandAssignmentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteBrandAssignmentInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteBrandInput(v *DeleteBrandInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteBrandInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.BrandId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BrandId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteCustomPermissionsInput(v *DeleteCustomPermissionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteCustomPermissionsInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.CustomPermissionsName == nil { + invalidParams.Add(smithy.NewErrParamRequired("CustomPermissionsName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteDashboardInput(v *DeleteDashboardInput) error { if v == nil { return nil @@ -20031,6 +20622,27 @@ func validateOpDeleteUserByPrincipalIdInput(v *DeleteUserByPrincipalIdInput) err } } +func validateOpDeleteUserCustomPermissionInput(v *DeleteUserCustomPermissionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteUserCustomPermissionInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.Namespace == nil { + invalidParams.Add(smithy.NewErrParamRequired("Namespace")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteUserInput(v *DeleteUserInput) error { if v == nil { return nil @@ -20205,6 +20817,75 @@ func validateOpDescribeAssetBundleImportJobInput(v *DescribeAssetBundleImportJob } } +func validateOpDescribeBrandAssignmentInput(v *DescribeBrandAssignmentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeBrandAssignmentInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeBrandInput(v *DescribeBrandInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeBrandInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.BrandId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BrandId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeBrandPublishedVersionInput(v *DescribeBrandPublishedVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeBrandPublishedVersionInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.BrandId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BrandId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeCustomPermissionsInput(v *DescribeCustomPermissionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeCustomPermissionsInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.CustomPermissionsName == nil { + invalidParams.Add(smithy.NewErrParamRequired("CustomPermissionsName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeDashboardDefinitionInput(v *DescribeDashboardDefinitionInput) error { if v == nil { return nil @@ -21025,6 +21706,36 @@ func validateOpListAssetBundleImportJobsInput(v *ListAssetBundleImportJobsInput) } } +func validateOpListBrandsInput(v *ListBrandsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListBrandsInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListCustomPermissionsInput(v *ListCustomPermissionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListCustomPermissionsInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListDashboardsInput(v *ListDashboardsInput) error { if v == nil { return nil @@ -21994,6 +22705,86 @@ func validateOpUpdateAnalysisPermissionsInput(v *UpdateAnalysisPermissionsInput) } } +func validateOpUpdateBrandAssignmentInput(v *UpdateBrandAssignmentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateBrandAssignmentInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.BrandArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("BrandArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateBrandInput(v *UpdateBrandInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateBrandInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.BrandId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BrandId")) + } + if v.BrandDefinition != nil { + if err := validateBrandDefinition(v.BrandDefinition); err != nil { + invalidParams.AddNested("BrandDefinition", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateBrandPublishedVersionInput(v *UpdateBrandPublishedVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateBrandPublishedVersionInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.BrandId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BrandId")) + } + if v.VersionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("VersionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateCustomPermissionsInput(v *UpdateCustomPermissionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateCustomPermissionsInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.CustomPermissionsName == nil { + invalidParams.Add(smithy.NewErrParamRequired("CustomPermissionsName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateDashboardInput(v *UpdateDashboardInput) error { if v == nil { return nil @@ -22744,6 +23535,30 @@ func validateOpUpdateTopicRefreshScheduleInput(v *UpdateTopicRefreshScheduleInpu } } +func validateOpUpdateUserCustomPermissionInput(v *UpdateUserCustomPermissionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateUserCustomPermissionInput"} + if v.UserName == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserName")) + } + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.Namespace == nil { + invalidParams.Add(smithy.NewErrParamRequired("Namespace")) + } + if v.CustomPermissionsName == nil { + invalidParams.Add(smithy.NewErrParamRequired("CustomPermissionsName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateUserInput(v *UpdateUserInput) error { if v == nil { return nil diff --git a/service/redshift/deserializers.go b/service/redshift/deserializers.go index 5af6e293b18..3a8152a5461 100644 --- a/service/redshift/deserializers.go +++ b/service/redshift/deserializers.go @@ -35992,6 +35992,55 @@ func awsAwsquery_deserializeDocumentPendingModifiedValues(v **types.PendingModif return nil } +func awsAwsquery_deserializeDocumentReadWriteAccess(v **types.ReadWriteAccess, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ReadWriteAccess + if *v == nil { + sv = &types.ReadWriteAccess{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Authorization", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Authorization = types.ServiceAuthorization(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentRecommendation(v **types.Recommendation, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -38970,6 +39019,114 @@ func awsAwsquery_deserializeDocumentRevisionTargetsListUnwrapped(v *[]types.Revi *v = sv return nil } +func awsAwsquery_deserializeDocumentS3AccessGrantsScopeUnion(v *types.S3AccessGrantsScopeUnion, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var uv types.S3AccessGrantsScopeUnion + var memberFound bool + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + if memberFound { + if err = decoder.Decoder.Skip(); err != nil { + return err + } + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ReadWriteAccess", t.Name.Local): + var mv types.ReadWriteAccess + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentReadWriteAccess(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + uv = &types.S3AccessGrantsScopeUnionMemberReadWriteAccess{Value: mv} + memberFound = true + + default: + uv = &types.UnknownUnionMember{Tag: t.Name.Local} + memberFound = true + + } + decoder = originalDecoder + } + *v = uv + return nil +} + +func awsAwsquery_deserializeDocumentS3AccessGrantsServiceIntegrations(v *[]types.S3AccessGrantsScopeUnion, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.S3AccessGrantsScopeUnion + if *v == nil { + sv = make([]types.S3AccessGrantsScopeUnion, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.S3AccessGrantsScopeUnion + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentS3AccessGrantsScopeUnion(&col, nodeDecoder); err != nil { + return err + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentS3AccessGrantsServiceIntegrationsUnwrapped(v *[]types.S3AccessGrantsScopeUnion, decoder smithyxml.NodeDecoder) error { + var sv []types.S3AccessGrantsScopeUnion + if *v == nil { + sv = make([]types.S3AccessGrantsScopeUnion, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.S3AccessGrantsScopeUnion + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentS3AccessGrantsScopeUnion(&mv, nodeDecoder); err != nil { + return err + } + sv = append(sv, mv) + } + *v = sv + return nil +} func awsAwsquery_deserializeDocumentScheduledAction(v **types.ScheduledAction, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -39890,6 +40047,15 @@ func awsAwsquery_deserializeDocumentServiceIntegrationsUnion(v *types.ServiceInt uv = &types.ServiceIntegrationsUnionMemberLakeFormation{Value: mv} memberFound = true + case strings.EqualFold("S3AccessGrants", t.Name.Local): + var mv []types.S3AccessGrantsScopeUnion + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentS3AccessGrantsServiceIntegrations(&mv, nodeDecoder); err != nil { + return err + } + uv = &types.ServiceIntegrationsUnionMemberS3AccessGrants{Value: mv} + memberFound = true + default: uv = &types.UnknownUnionMember{Tag: t.Name.Local} memberFound = true diff --git a/service/redshift/serializers.go b/service/redshift/serializers.go index 5c957c6b3c7..466d09824c4 100644 --- a/service/redshift/serializers.go +++ b/service/redshift/serializers.go @@ -9949,6 +9949,18 @@ func awsAwsquery_serializeDocumentPauseClusterMessage(v *types.PauseClusterMessa return nil } +func awsAwsquery_serializeDocumentReadWriteAccess(v *types.ReadWriteAccess, value query.Value) error { + object := value.Object() + _ = object + + if len(v.Authorization) > 0 { + objectKey := object.Key("Authorization") + objectKey.String(string(v.Authorization)) + } + + return nil +} + func awsAwsquery_serializeDocumentResizeClusterMessage(v *types.ResizeClusterMessage, value query.Value) error { object := value.Object() _ = object @@ -10003,6 +10015,38 @@ func awsAwsquery_serializeDocumentResumeClusterMessage(v *types.ResumeClusterMes return nil } +func awsAwsquery_serializeDocumentS3AccessGrantsScopeUnion(v types.S3AccessGrantsScopeUnion, value query.Value) error { + object := value.Object() + + switch uv := v.(type) { + case *types.S3AccessGrantsScopeUnionMemberReadWriteAccess: + objectKey := object.Key("ReadWriteAccess") + if err := awsAwsquery_serializeDocumentReadWriteAccess(&uv.Value, objectKey); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + +func awsAwsquery_serializeDocumentS3AccessGrantsServiceIntegrations(v []types.S3AccessGrantsScopeUnion, value query.Value) error { + array := value.Array("member") + + for i := range v { + if vv := v[i]; vv == nil { + continue + } + av := array.Value() + if err := awsAwsquery_serializeDocumentS3AccessGrantsScopeUnion(v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsquery_serializeDocumentScheduledActionFilter(v *types.ScheduledActionFilter, value query.Value) error { object := value.Object() _ = object @@ -10097,6 +10141,12 @@ func awsAwsquery_serializeDocumentServiceIntegrationsUnion(v types.ServiceIntegr return err } + case *types.ServiceIntegrationsUnionMemberS3AccessGrants: + objectKey := object.Key("S3AccessGrants") + if err := awsAwsquery_serializeDocumentS3AccessGrantsServiceIntegrations(uv.Value, objectKey); err != nil { + return err + } + default: return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) diff --git a/service/redshift/types/types.go b/service/redshift/types/types.go index c903402c349..e93b6799d6b 100644 --- a/service/redshift/types/types.go +++ b/service/redshift/types/types.go @@ -1477,6 +1477,17 @@ type PendingModifiedValues struct { noSmithyDocumentSerde } +// The S3 Access Grants scope. +type ReadWriteAccess struct { + + // Determines whether the read/write scope is enabled or disabled. + // + // This member is required. + Authorization ServiceAuthorization + + noSmithyDocumentSerde +} + // An Amazon Redshift Advisor recommended action on the Amazon Redshift cluster. type Recommendation struct { @@ -1880,6 +1891,24 @@ type RevisionTarget struct { noSmithyDocumentSerde } +// A list of scopes set up for S3 Access Grants integration. +// +// The following types satisfy this interface: +// +// S3AccessGrantsScopeUnionMemberReadWriteAccess +type S3AccessGrantsScopeUnion interface { + isS3AccessGrantsScopeUnion() +} + +// The S3 Access Grants scope. +type S3AccessGrantsScopeUnionMemberReadWriteAccess struct { + Value ReadWriteAccess + + noSmithyDocumentSerde +} + +func (*S3AccessGrantsScopeUnionMemberReadWriteAccess) isS3AccessGrantsScopeUnion() {} + // Describes a scheduled action. You can use a scheduled action to trigger some // Amazon Redshift API operations on a schedule. For information about which API // operations can be scheduled, see ScheduledActionType. @@ -1991,6 +2020,7 @@ type SecondaryClusterInfo struct { // The following types satisfy this interface: // // ServiceIntegrationsUnionMemberLakeFormation +// ServiceIntegrationsUnionMemberS3AccessGrants type ServiceIntegrationsUnion interface { isServiceIntegrationsUnion() } @@ -2004,6 +2034,15 @@ type ServiceIntegrationsUnionMemberLakeFormation struct { func (*ServiceIntegrationsUnionMemberLakeFormation) isServiceIntegrationsUnion() {} +// A list of scopes set up for S3 Access Grants integration. +type ServiceIntegrationsUnionMemberS3AccessGrants struct { + Value []S3AccessGrantsScopeUnion + + noSmithyDocumentSerde +} + +func (*ServiceIntegrationsUnionMemberS3AccessGrants) isServiceIntegrationsUnion() {} + // Describes a snapshot. type Snapshot struct { @@ -2475,4 +2514,5 @@ type UnknownUnionMember struct { } func (*UnknownUnionMember) isLakeFormationScopeUnion() {} +func (*UnknownUnionMember) isS3AccessGrantsScopeUnion() {} func (*UnknownUnionMember) isServiceIntegrationsUnion() {} diff --git a/service/redshift/types/types_exported_test.go b/service/redshift/types/types_exported_test.go index 5585fc259ba..2abac04b719 100644 --- a/service/redshift/types/types_exported_test.go +++ b/service/redshift/types/types_exported_test.go @@ -25,6 +25,24 @@ func ExampleLakeFormationScopeUnion_outputUsage() { var _ *types.LakeFormationQuery +func ExampleS3AccessGrantsScopeUnion_outputUsage() { + var union types.S3AccessGrantsScopeUnion + // type switches can be used to check the union value + switch v := union.(type) { + case *types.S3AccessGrantsScopeUnionMemberReadWriteAccess: + _ = v.Value // Value is types.ReadWriteAccess + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.ReadWriteAccess + func ExampleServiceIntegrationsUnion_outputUsage() { var union types.ServiceIntegrationsUnion // type switches can be used to check the union value @@ -32,6 +50,9 @@ func ExampleServiceIntegrationsUnion_outputUsage() { case *types.ServiceIntegrationsUnionMemberLakeFormation: _ = v.Value // Value is []types.LakeFormationScopeUnion + case *types.ServiceIntegrationsUnionMemberS3AccessGrants: + _ = v.Value // Value is []types.S3AccessGrantsScopeUnion + case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) @@ -42,3 +63,4 @@ func ExampleServiceIntegrationsUnion_outputUsage() { } var _ []types.LakeFormationScopeUnion +var _ []types.S3AccessGrantsScopeUnion diff --git a/service/redshift/validators.go b/service/redshift/validators.go index 045b0b5d08f..4fd1b8746b6 100644 --- a/service/redshift/validators.go +++ b/service/redshift/validators.go @@ -2567,6 +2567,21 @@ func validatePauseClusterMessage(v *types.PauseClusterMessage) error { } } +func validateReadWriteAccess(v *types.ReadWriteAccess) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ReadWriteAccess"} + if len(v.Authorization) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Authorization")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateResizeClusterMessage(v *types.ResizeClusterMessage) error { if v == nil { return nil @@ -2597,6 +2612,42 @@ func validateResumeClusterMessage(v *types.ResumeClusterMessage) error { } } +func validateS3AccessGrantsScopeUnion(v types.S3AccessGrantsScopeUnion) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "S3AccessGrantsScopeUnion"} + switch uv := v.(type) { + case *types.S3AccessGrantsScopeUnionMemberReadWriteAccess: + if err := validateReadWriteAccess(&uv.Value); err != nil { + invalidParams.AddNested("[ReadWriteAccess]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateS3AccessGrantsServiceIntegrations(v []types.S3AccessGrantsScopeUnion) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "S3AccessGrantsServiceIntegrations"} + for i := range v { + if err := validateS3AccessGrantsScopeUnion(v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateScheduledActionFilter(v *types.ScheduledActionFilter) error { if v == nil { return nil @@ -2687,6 +2738,11 @@ func validateServiceIntegrationsUnion(v types.ServiceIntegrationsUnion) error { invalidParams.AddNested("[LakeFormation]", err.(smithy.InvalidParamsError)) } + case *types.ServiceIntegrationsUnionMemberS3AccessGrants: + if err := validateS3AccessGrantsServiceIntegrations(uv.Value); err != nil { + invalidParams.AddNested("[S3AccessGrants]", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams diff --git a/service/s3/api_op_AbortMultipartUpload.go b/service/s3/api_op_AbortMultipartUpload.go index ec55f51c772..52a8258da64 100644 --- a/service/s3/api_op_AbortMultipartUpload.go +++ b/service/s3/api_op_AbortMultipartUpload.go @@ -28,7 +28,7 @@ import ( // progress, you can't delete the bucket until all the in-progress multipart // uploads are aborted or completed. To delete these in-progress multipart uploads, // use the ListMultipartUploads operation to list the in-progress multipart -// uploads in the bucket and use the AbortMultupartUpload operation to abort all +// uploads in the bucket and use the AbortMultipartUpload operation to abort all // the in-progress multipart uploads. // // - Directory buckets - For directory buckets, you must make requests for this diff --git a/service/s3/api_op_ListBuckets.go b/service/s3/api_op_ListBuckets.go index 22ea9f0c2bf..97732372c56 100644 --- a/service/s3/api_op_ListBuckets.go +++ b/service/s3/api_op_ListBuckets.go @@ -20,6 +20,13 @@ import ( // // For information about Amazon S3 buckets, see [Creating, configuring, and working with Amazon S3 buckets]. // +// We strongly recommend using only paginated requests. Unpaginated requests are +// only supported for Amazon Web Services accounts set to the default general +// purpose bucket quota of 10,000. If you have an approved general purpose bucket +// quota above 10,000, you must send paginated requests to list your account’s +// buckets. All unpaginated ListBuckets requests will be rejected for Amazon Web +// Services accounts with a general purpose bucket quota greater than 10,000. +// // [Creating, configuring, and working with Amazon S3 buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html func (c *Client) ListBuckets(ctx context.Context, params *ListBucketsInput, optFns ...func(*Options)) (*ListBucketsOutput, error) { if params == nil { @@ -59,6 +66,11 @@ type ListBucketsInput struct { // Length Constraints: Minimum length of 0. Maximum length of 1024. // // Required: No. + // + // If you specify the bucket-region , prefix , or continuation-token query + // parameters without using max-buckets to set the maximum number of buckets + // returned in the response, Amazon S3 applies a default page size of 10,000 and + // provides a continuation token if there are more buckets. ContinuationToken *string // Maximum number of buckets to be returned in response. When the number is more diff --git a/service/s3/api_op_ListDirectoryBuckets.go b/service/s3/api_op_ListDirectoryBuckets.go index e375413d49b..dc0109bd283 100644 --- a/service/s3/api_op_ListDirectoryBuckets.go +++ b/service/s3/api_op_ListDirectoryBuckets.go @@ -33,6 +33,9 @@ import ( // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is // s3express-control.region.amazonaws.com . // +// The BucketRegion response element is not part of the ListDirectoryBuckets +// Response Syntax. +// // [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // [Directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html // [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html diff --git a/service/s3/api_op_ListMultipartUploads.go b/service/s3/api_op_ListMultipartUploads.go index 0a4bfe332d9..8576b312948 100644 --- a/service/s3/api_op_ListMultipartUploads.go +++ b/service/s3/api_op_ListMultipartUploads.go @@ -21,7 +21,7 @@ import ( // you can't delete the bucket until all the in-progress multipart uploads are // aborted or completed. To delete these in-progress multipart uploads, use the // ListMultipartUploads operation to list the in-progress multipart uploads in the -// bucket and use the AbortMultupartUpload operation to abort all the in-progress +// bucket and use the AbortMultipartUpload operation to abort all the in-progress // multipart uploads. // // The ListMultipartUploads operation returns a maximum of 1,000 multipart uploads diff --git a/service/sagemaker/types/enums.go b/service/sagemaker/types/enums.go index 2fd724f18bf..48c2caec941 100644 --- a/service/sagemaker/types/enums.go +++ b/service/sagemaker/types/enums.go @@ -3287,171 +3287,178 @@ type InstanceType string // Enum values for InstanceType const ( - InstanceTypeMlT2Medium InstanceType = "ml.t2.medium" - InstanceTypeMlT2Large InstanceType = "ml.t2.large" - InstanceTypeMlT2Xlarge InstanceType = "ml.t2.xlarge" - InstanceTypeMlT22xlarge InstanceType = "ml.t2.2xlarge" - InstanceTypeMlT3Medium InstanceType = "ml.t3.medium" - InstanceTypeMlT3Large InstanceType = "ml.t3.large" - InstanceTypeMlT3Xlarge InstanceType = "ml.t3.xlarge" - InstanceTypeMlT32xlarge InstanceType = "ml.t3.2xlarge" - InstanceTypeMlM4Xlarge InstanceType = "ml.m4.xlarge" - InstanceTypeMlM42xlarge InstanceType = "ml.m4.2xlarge" - InstanceTypeMlM44xlarge InstanceType = "ml.m4.4xlarge" - InstanceTypeMlM410xlarge InstanceType = "ml.m4.10xlarge" - InstanceTypeMlM416xlarge InstanceType = "ml.m4.16xlarge" - InstanceTypeMlM5Xlarge InstanceType = "ml.m5.xlarge" - InstanceTypeMlM52xlarge InstanceType = "ml.m5.2xlarge" - InstanceTypeMlM54xlarge InstanceType = "ml.m5.4xlarge" - InstanceTypeMlM512xlarge InstanceType = "ml.m5.12xlarge" - InstanceTypeMlM524xlarge InstanceType = "ml.m5.24xlarge" - InstanceTypeMlM5dLarge InstanceType = "ml.m5d.large" - InstanceTypeMlM5dXlarge InstanceType = "ml.m5d.xlarge" - InstanceTypeMlM5d2xlarge InstanceType = "ml.m5d.2xlarge" - InstanceTypeMlM5d4xlarge InstanceType = "ml.m5d.4xlarge" - InstanceTypeMlM5d8xlarge InstanceType = "ml.m5d.8xlarge" - InstanceTypeMlM5d12xlarge InstanceType = "ml.m5d.12xlarge" - InstanceTypeMlM5d16xlarge InstanceType = "ml.m5d.16xlarge" - InstanceTypeMlM5d24xlarge InstanceType = "ml.m5d.24xlarge" - InstanceTypeMlC4Xlarge InstanceType = "ml.c4.xlarge" - InstanceTypeMlC42xlarge InstanceType = "ml.c4.2xlarge" - InstanceTypeMlC44xlarge InstanceType = "ml.c4.4xlarge" - InstanceTypeMlC48xlarge InstanceType = "ml.c4.8xlarge" - InstanceTypeMlC5Xlarge InstanceType = "ml.c5.xlarge" - InstanceTypeMlC52xlarge InstanceType = "ml.c5.2xlarge" - InstanceTypeMlC54xlarge InstanceType = "ml.c5.4xlarge" - InstanceTypeMlC59xlarge InstanceType = "ml.c5.9xlarge" - InstanceTypeMlC518xlarge InstanceType = "ml.c5.18xlarge" - InstanceTypeMlC5dXlarge InstanceType = "ml.c5d.xlarge" - InstanceTypeMlC5d2xlarge InstanceType = "ml.c5d.2xlarge" - InstanceTypeMlC5d4xlarge InstanceType = "ml.c5d.4xlarge" - InstanceTypeMlC5d9xlarge InstanceType = "ml.c5d.9xlarge" - InstanceTypeMlC5d18xlarge InstanceType = "ml.c5d.18xlarge" - InstanceTypeMlP2Xlarge InstanceType = "ml.p2.xlarge" - InstanceTypeMlP28xlarge InstanceType = "ml.p2.8xlarge" - InstanceTypeMlP216xlarge InstanceType = "ml.p2.16xlarge" - InstanceTypeMlP32xlarge InstanceType = "ml.p3.2xlarge" - InstanceTypeMlP38xlarge InstanceType = "ml.p3.8xlarge" - InstanceTypeMlP316xlarge InstanceType = "ml.p3.16xlarge" - InstanceTypeMlP3dn24xlarge InstanceType = "ml.p3dn.24xlarge" - InstanceTypeMlG4dnXlarge InstanceType = "ml.g4dn.xlarge" - InstanceTypeMlG4dn2xlarge InstanceType = "ml.g4dn.2xlarge" - InstanceTypeMlG4dn4xlarge InstanceType = "ml.g4dn.4xlarge" - InstanceTypeMlG4dn8xlarge InstanceType = "ml.g4dn.8xlarge" - InstanceTypeMlG4dn12xlarge InstanceType = "ml.g4dn.12xlarge" - InstanceTypeMlG4dn16xlarge InstanceType = "ml.g4dn.16xlarge" - InstanceTypeMlR5Large InstanceType = "ml.r5.large" - InstanceTypeMlR5Xlarge InstanceType = "ml.r5.xlarge" - InstanceTypeMlR52xlarge InstanceType = "ml.r5.2xlarge" - InstanceTypeMlR54xlarge InstanceType = "ml.r5.4xlarge" - InstanceTypeMlR58xlarge InstanceType = "ml.r5.8xlarge" - InstanceTypeMlR512xlarge InstanceType = "ml.r5.12xlarge" - InstanceTypeMlR516xlarge InstanceType = "ml.r5.16xlarge" - InstanceTypeMlR524xlarge InstanceType = "ml.r5.24xlarge" - InstanceTypeMlG5Xlarge InstanceType = "ml.g5.xlarge" - InstanceTypeMlG52xlarge InstanceType = "ml.g5.2xlarge" - InstanceTypeMlG54xlarge InstanceType = "ml.g5.4xlarge" - InstanceTypeMlG58xlarge InstanceType = "ml.g5.8xlarge" - InstanceTypeMlG516xlarge InstanceType = "ml.g5.16xlarge" - InstanceTypeMlG512xlarge InstanceType = "ml.g5.12xlarge" - InstanceTypeMlG524xlarge InstanceType = "ml.g5.24xlarge" - InstanceTypeMlG548xlarge InstanceType = "ml.g5.48xlarge" - InstanceTypeMlInf1Xlarge InstanceType = "ml.inf1.xlarge" - InstanceTypeMlInf12xlarge InstanceType = "ml.inf1.2xlarge" - InstanceTypeMlInf16xlarge InstanceType = "ml.inf1.6xlarge" - InstanceTypeMlInf124xlarge InstanceType = "ml.inf1.24xlarge" - InstanceTypeMlP4d24xlarge InstanceType = "ml.p4d.24xlarge" - InstanceTypeMlP4de24xlarge InstanceType = "ml.p4de.24xlarge" - InstanceTypeMlP548xlarge InstanceType = "ml.p5.48xlarge" - InstanceTypeMlM6iLarge InstanceType = "ml.m6i.large" - InstanceTypeMlM6iXlarge InstanceType = "ml.m6i.xlarge" - InstanceTypeMlM6i2xlarge InstanceType = "ml.m6i.2xlarge" - InstanceTypeMlM6i4xlarge InstanceType = "ml.m6i.4xlarge" - InstanceTypeMlM6i8xlarge InstanceType = "ml.m6i.8xlarge" - InstanceTypeMlM6i12xlarge InstanceType = "ml.m6i.12xlarge" - InstanceTypeMlM6i16xlarge InstanceType = "ml.m6i.16xlarge" - InstanceTypeMlM6i24xlarge InstanceType = "ml.m6i.24xlarge" - InstanceTypeMlM6i32xlarge InstanceType = "ml.m6i.32xlarge" - InstanceTypeMlM7iLarge InstanceType = "ml.m7i.large" - InstanceTypeMlM7iXlarge InstanceType = "ml.m7i.xlarge" - InstanceTypeMlM7i2xlarge InstanceType = "ml.m7i.2xlarge" - InstanceTypeMlM7i4xlarge InstanceType = "ml.m7i.4xlarge" - InstanceTypeMlM7i8xlarge InstanceType = "ml.m7i.8xlarge" - InstanceTypeMlM7i12xlarge InstanceType = "ml.m7i.12xlarge" - InstanceTypeMlM7i16xlarge InstanceType = "ml.m7i.16xlarge" - InstanceTypeMlM7i24xlarge InstanceType = "ml.m7i.24xlarge" - InstanceTypeMlM7i48xlarge InstanceType = "ml.m7i.48xlarge" - InstanceTypeMlC6iLarge InstanceType = "ml.c6i.large" - InstanceTypeMlC6iXlarge InstanceType = "ml.c6i.xlarge" - InstanceTypeMlC6i2xlarge InstanceType = "ml.c6i.2xlarge" - InstanceTypeMlC6i4xlarge InstanceType = "ml.c6i.4xlarge" - InstanceTypeMlC6i8xlarge InstanceType = "ml.c6i.8xlarge" - InstanceTypeMlC6i12xlarge InstanceType = "ml.c6i.12xlarge" - InstanceTypeMlC6i16xlarge InstanceType = "ml.c6i.16xlarge" - InstanceTypeMlC6i24xlarge InstanceType = "ml.c6i.24xlarge" - InstanceTypeMlC6i32xlarge InstanceType = "ml.c6i.32xlarge" - InstanceTypeMlC7iLarge InstanceType = "ml.c7i.large" - InstanceTypeMlC7iXlarge InstanceType = "ml.c7i.xlarge" - InstanceTypeMlC7i2xlarge InstanceType = "ml.c7i.2xlarge" - InstanceTypeMlC7i4xlarge InstanceType = "ml.c7i.4xlarge" - InstanceTypeMlC7i8xlarge InstanceType = "ml.c7i.8xlarge" - InstanceTypeMlC7i12xlarge InstanceType = "ml.c7i.12xlarge" - InstanceTypeMlC7i16xlarge InstanceType = "ml.c7i.16xlarge" - InstanceTypeMlC7i24xlarge InstanceType = "ml.c7i.24xlarge" - InstanceTypeMlC7i48xlarge InstanceType = "ml.c7i.48xlarge" - InstanceTypeMlR6iLarge InstanceType = "ml.r6i.large" - InstanceTypeMlR6iXlarge InstanceType = "ml.r6i.xlarge" - InstanceTypeMlR6i2xlarge InstanceType = "ml.r6i.2xlarge" - InstanceTypeMlR6i4xlarge InstanceType = "ml.r6i.4xlarge" - InstanceTypeMlR6i8xlarge InstanceType = "ml.r6i.8xlarge" - InstanceTypeMlR6i12xlarge InstanceType = "ml.r6i.12xlarge" - InstanceTypeMlR6i16xlarge InstanceType = "ml.r6i.16xlarge" - InstanceTypeMlR6i24xlarge InstanceType = "ml.r6i.24xlarge" - InstanceTypeMlR6i32xlarge InstanceType = "ml.r6i.32xlarge" - InstanceTypeMlR7iLarge InstanceType = "ml.r7i.large" - InstanceTypeMlR7iXlarge InstanceType = "ml.r7i.xlarge" - InstanceTypeMlR7i2xlarge InstanceType = "ml.r7i.2xlarge" - InstanceTypeMlR7i4xlarge InstanceType = "ml.r7i.4xlarge" - InstanceTypeMlR7i8xlarge InstanceType = "ml.r7i.8xlarge" - InstanceTypeMlR7i12xlarge InstanceType = "ml.r7i.12xlarge" - InstanceTypeMlR7i16xlarge InstanceType = "ml.r7i.16xlarge" - InstanceTypeMlR7i24xlarge InstanceType = "ml.r7i.24xlarge" - InstanceTypeMlR7i48xlarge InstanceType = "ml.r7i.48xlarge" - InstanceTypeMlM6idLarge InstanceType = "ml.m6id.large" - InstanceTypeMlM6idXlarge InstanceType = "ml.m6id.xlarge" - InstanceTypeMlM6id2xlarge InstanceType = "ml.m6id.2xlarge" - InstanceTypeMlM6id4xlarge InstanceType = "ml.m6id.4xlarge" - InstanceTypeMlM6id8xlarge InstanceType = "ml.m6id.8xlarge" - InstanceTypeMlM6id12xlarge InstanceType = "ml.m6id.12xlarge" - InstanceTypeMlM6id16xlarge InstanceType = "ml.m6id.16xlarge" - InstanceTypeMlM6id24xlarge InstanceType = "ml.m6id.24xlarge" - InstanceTypeMlM6id32xlarge InstanceType = "ml.m6id.32xlarge" - InstanceTypeMlC6idLarge InstanceType = "ml.c6id.large" - InstanceTypeMlC6idXlarge InstanceType = "ml.c6id.xlarge" - InstanceTypeMlC6id2xlarge InstanceType = "ml.c6id.2xlarge" - InstanceTypeMlC6id4xlarge InstanceType = "ml.c6id.4xlarge" - InstanceTypeMlC6id8xlarge InstanceType = "ml.c6id.8xlarge" - InstanceTypeMlC6id12xlarge InstanceType = "ml.c6id.12xlarge" - InstanceTypeMlC6id16xlarge InstanceType = "ml.c6id.16xlarge" - InstanceTypeMlC6id24xlarge InstanceType = "ml.c6id.24xlarge" - InstanceTypeMlC6id32xlarge InstanceType = "ml.c6id.32xlarge" - InstanceTypeMlR6idLarge InstanceType = "ml.r6id.large" - InstanceTypeMlR6idXlarge InstanceType = "ml.r6id.xlarge" - InstanceTypeMlR6id2xlarge InstanceType = "ml.r6id.2xlarge" - InstanceTypeMlR6id4xlarge InstanceType = "ml.r6id.4xlarge" - InstanceTypeMlR6id8xlarge InstanceType = "ml.r6id.8xlarge" - InstanceTypeMlR6id12xlarge InstanceType = "ml.r6id.12xlarge" - InstanceTypeMlR6id16xlarge InstanceType = "ml.r6id.16xlarge" - InstanceTypeMlR6id24xlarge InstanceType = "ml.r6id.24xlarge" - InstanceTypeMlR6id32xlarge InstanceType = "ml.r6id.32xlarge" - InstanceTypeMlG6Xlarge InstanceType = "ml.g6.xlarge" - InstanceTypeMlG62xlarge InstanceType = "ml.g6.2xlarge" - InstanceTypeMlG64xlarge InstanceType = "ml.g6.4xlarge" - InstanceTypeMlG68xlarge InstanceType = "ml.g6.8xlarge" - InstanceTypeMlG612xlarge InstanceType = "ml.g6.12xlarge" - InstanceTypeMlG616xlarge InstanceType = "ml.g6.16xlarge" - InstanceTypeMlG624xlarge InstanceType = "ml.g6.24xlarge" - InstanceTypeMlG648xlarge InstanceType = "ml.g6.48xlarge" + InstanceTypeMlT2Medium InstanceType = "ml.t2.medium" + InstanceTypeMlT2Large InstanceType = "ml.t2.large" + InstanceTypeMlT2Xlarge InstanceType = "ml.t2.xlarge" + InstanceTypeMlT22xlarge InstanceType = "ml.t2.2xlarge" + InstanceTypeMlT3Medium InstanceType = "ml.t3.medium" + InstanceTypeMlT3Large InstanceType = "ml.t3.large" + InstanceTypeMlT3Xlarge InstanceType = "ml.t3.xlarge" + InstanceTypeMlT32xlarge InstanceType = "ml.t3.2xlarge" + InstanceTypeMlM4Xlarge InstanceType = "ml.m4.xlarge" + InstanceTypeMlM42xlarge InstanceType = "ml.m4.2xlarge" + InstanceTypeMlM44xlarge InstanceType = "ml.m4.4xlarge" + InstanceTypeMlM410xlarge InstanceType = "ml.m4.10xlarge" + InstanceTypeMlM416xlarge InstanceType = "ml.m4.16xlarge" + InstanceTypeMlM5Xlarge InstanceType = "ml.m5.xlarge" + InstanceTypeMlM52xlarge InstanceType = "ml.m5.2xlarge" + InstanceTypeMlM54xlarge InstanceType = "ml.m5.4xlarge" + InstanceTypeMlM512xlarge InstanceType = "ml.m5.12xlarge" + InstanceTypeMlM524xlarge InstanceType = "ml.m5.24xlarge" + InstanceTypeMlM5dLarge InstanceType = "ml.m5d.large" + InstanceTypeMlM5dXlarge InstanceType = "ml.m5d.xlarge" + InstanceTypeMlM5d2xlarge InstanceType = "ml.m5d.2xlarge" + InstanceTypeMlM5d4xlarge InstanceType = "ml.m5d.4xlarge" + InstanceTypeMlM5d8xlarge InstanceType = "ml.m5d.8xlarge" + InstanceTypeMlM5d12xlarge InstanceType = "ml.m5d.12xlarge" + InstanceTypeMlM5d16xlarge InstanceType = "ml.m5d.16xlarge" + InstanceTypeMlM5d24xlarge InstanceType = "ml.m5d.24xlarge" + InstanceTypeMlC4Xlarge InstanceType = "ml.c4.xlarge" + InstanceTypeMlC42xlarge InstanceType = "ml.c4.2xlarge" + InstanceTypeMlC44xlarge InstanceType = "ml.c4.4xlarge" + InstanceTypeMlC48xlarge InstanceType = "ml.c4.8xlarge" + InstanceTypeMlC5Xlarge InstanceType = "ml.c5.xlarge" + InstanceTypeMlC52xlarge InstanceType = "ml.c5.2xlarge" + InstanceTypeMlC54xlarge InstanceType = "ml.c5.4xlarge" + InstanceTypeMlC59xlarge InstanceType = "ml.c5.9xlarge" + InstanceTypeMlC518xlarge InstanceType = "ml.c5.18xlarge" + InstanceTypeMlC5dXlarge InstanceType = "ml.c5d.xlarge" + InstanceTypeMlC5d2xlarge InstanceType = "ml.c5d.2xlarge" + InstanceTypeMlC5d4xlarge InstanceType = "ml.c5d.4xlarge" + InstanceTypeMlC5d9xlarge InstanceType = "ml.c5d.9xlarge" + InstanceTypeMlC5d18xlarge InstanceType = "ml.c5d.18xlarge" + InstanceTypeMlP2Xlarge InstanceType = "ml.p2.xlarge" + InstanceTypeMlP28xlarge InstanceType = "ml.p2.8xlarge" + InstanceTypeMlP216xlarge InstanceType = "ml.p2.16xlarge" + InstanceTypeMlP32xlarge InstanceType = "ml.p3.2xlarge" + InstanceTypeMlP38xlarge InstanceType = "ml.p3.8xlarge" + InstanceTypeMlP316xlarge InstanceType = "ml.p3.16xlarge" + InstanceTypeMlP3dn24xlarge InstanceType = "ml.p3dn.24xlarge" + InstanceTypeMlG4dnXlarge InstanceType = "ml.g4dn.xlarge" + InstanceTypeMlG4dn2xlarge InstanceType = "ml.g4dn.2xlarge" + InstanceTypeMlG4dn4xlarge InstanceType = "ml.g4dn.4xlarge" + InstanceTypeMlG4dn8xlarge InstanceType = "ml.g4dn.8xlarge" + InstanceTypeMlG4dn12xlarge InstanceType = "ml.g4dn.12xlarge" + InstanceTypeMlG4dn16xlarge InstanceType = "ml.g4dn.16xlarge" + InstanceTypeMlR5Large InstanceType = "ml.r5.large" + InstanceTypeMlR5Xlarge InstanceType = "ml.r5.xlarge" + InstanceTypeMlR52xlarge InstanceType = "ml.r5.2xlarge" + InstanceTypeMlR54xlarge InstanceType = "ml.r5.4xlarge" + InstanceTypeMlR58xlarge InstanceType = "ml.r5.8xlarge" + InstanceTypeMlR512xlarge InstanceType = "ml.r5.12xlarge" + InstanceTypeMlR516xlarge InstanceType = "ml.r5.16xlarge" + InstanceTypeMlR524xlarge InstanceType = "ml.r5.24xlarge" + InstanceTypeMlG5Xlarge InstanceType = "ml.g5.xlarge" + InstanceTypeMlG52xlarge InstanceType = "ml.g5.2xlarge" + InstanceTypeMlG54xlarge InstanceType = "ml.g5.4xlarge" + InstanceTypeMlG58xlarge InstanceType = "ml.g5.8xlarge" + InstanceTypeMlG516xlarge InstanceType = "ml.g5.16xlarge" + InstanceTypeMlG512xlarge InstanceType = "ml.g5.12xlarge" + InstanceTypeMlG524xlarge InstanceType = "ml.g5.24xlarge" + InstanceTypeMlG548xlarge InstanceType = "ml.g5.48xlarge" + InstanceTypeMlInf1Xlarge InstanceType = "ml.inf1.xlarge" + InstanceTypeMlInf12xlarge InstanceType = "ml.inf1.2xlarge" + InstanceTypeMlInf16xlarge InstanceType = "ml.inf1.6xlarge" + InstanceTypeMlInf124xlarge InstanceType = "ml.inf1.24xlarge" + InstanceTypeMlTrn12xlarge InstanceType = "ml.trn1.2xlarge" + InstanceTypeMlTrn132xlarge InstanceType = "ml.trn1.32xlarge" + InstanceTypeMlTrn1n32xlarge InstanceType = "ml.trn1n.32xlarge" + InstanceTypeMlInf2Xlarge InstanceType = "ml.inf2.xlarge" + InstanceTypeMlInf28xlarge InstanceType = "ml.inf2.8xlarge" + InstanceTypeMlInf224xlarge InstanceType = "ml.inf2.24xlarge" + InstanceTypeMlInf248xlarge InstanceType = "ml.inf2.48xlarge" + InstanceTypeMlP4d24xlarge InstanceType = "ml.p4d.24xlarge" + InstanceTypeMlP4de24xlarge InstanceType = "ml.p4de.24xlarge" + InstanceTypeMlP548xlarge InstanceType = "ml.p5.48xlarge" + InstanceTypeMlM6iLarge InstanceType = "ml.m6i.large" + InstanceTypeMlM6iXlarge InstanceType = "ml.m6i.xlarge" + InstanceTypeMlM6i2xlarge InstanceType = "ml.m6i.2xlarge" + InstanceTypeMlM6i4xlarge InstanceType = "ml.m6i.4xlarge" + InstanceTypeMlM6i8xlarge InstanceType = "ml.m6i.8xlarge" + InstanceTypeMlM6i12xlarge InstanceType = "ml.m6i.12xlarge" + InstanceTypeMlM6i16xlarge InstanceType = "ml.m6i.16xlarge" + InstanceTypeMlM6i24xlarge InstanceType = "ml.m6i.24xlarge" + InstanceTypeMlM6i32xlarge InstanceType = "ml.m6i.32xlarge" + InstanceTypeMlM7iLarge InstanceType = "ml.m7i.large" + InstanceTypeMlM7iXlarge InstanceType = "ml.m7i.xlarge" + InstanceTypeMlM7i2xlarge InstanceType = "ml.m7i.2xlarge" + InstanceTypeMlM7i4xlarge InstanceType = "ml.m7i.4xlarge" + InstanceTypeMlM7i8xlarge InstanceType = "ml.m7i.8xlarge" + InstanceTypeMlM7i12xlarge InstanceType = "ml.m7i.12xlarge" + InstanceTypeMlM7i16xlarge InstanceType = "ml.m7i.16xlarge" + InstanceTypeMlM7i24xlarge InstanceType = "ml.m7i.24xlarge" + InstanceTypeMlM7i48xlarge InstanceType = "ml.m7i.48xlarge" + InstanceTypeMlC6iLarge InstanceType = "ml.c6i.large" + InstanceTypeMlC6iXlarge InstanceType = "ml.c6i.xlarge" + InstanceTypeMlC6i2xlarge InstanceType = "ml.c6i.2xlarge" + InstanceTypeMlC6i4xlarge InstanceType = "ml.c6i.4xlarge" + InstanceTypeMlC6i8xlarge InstanceType = "ml.c6i.8xlarge" + InstanceTypeMlC6i12xlarge InstanceType = "ml.c6i.12xlarge" + InstanceTypeMlC6i16xlarge InstanceType = "ml.c6i.16xlarge" + InstanceTypeMlC6i24xlarge InstanceType = "ml.c6i.24xlarge" + InstanceTypeMlC6i32xlarge InstanceType = "ml.c6i.32xlarge" + InstanceTypeMlC7iLarge InstanceType = "ml.c7i.large" + InstanceTypeMlC7iXlarge InstanceType = "ml.c7i.xlarge" + InstanceTypeMlC7i2xlarge InstanceType = "ml.c7i.2xlarge" + InstanceTypeMlC7i4xlarge InstanceType = "ml.c7i.4xlarge" + InstanceTypeMlC7i8xlarge InstanceType = "ml.c7i.8xlarge" + InstanceTypeMlC7i12xlarge InstanceType = "ml.c7i.12xlarge" + InstanceTypeMlC7i16xlarge InstanceType = "ml.c7i.16xlarge" + InstanceTypeMlC7i24xlarge InstanceType = "ml.c7i.24xlarge" + InstanceTypeMlC7i48xlarge InstanceType = "ml.c7i.48xlarge" + InstanceTypeMlR6iLarge InstanceType = "ml.r6i.large" + InstanceTypeMlR6iXlarge InstanceType = "ml.r6i.xlarge" + InstanceTypeMlR6i2xlarge InstanceType = "ml.r6i.2xlarge" + InstanceTypeMlR6i4xlarge InstanceType = "ml.r6i.4xlarge" + InstanceTypeMlR6i8xlarge InstanceType = "ml.r6i.8xlarge" + InstanceTypeMlR6i12xlarge InstanceType = "ml.r6i.12xlarge" + InstanceTypeMlR6i16xlarge InstanceType = "ml.r6i.16xlarge" + InstanceTypeMlR6i24xlarge InstanceType = "ml.r6i.24xlarge" + InstanceTypeMlR6i32xlarge InstanceType = "ml.r6i.32xlarge" + InstanceTypeMlR7iLarge InstanceType = "ml.r7i.large" + InstanceTypeMlR7iXlarge InstanceType = "ml.r7i.xlarge" + InstanceTypeMlR7i2xlarge InstanceType = "ml.r7i.2xlarge" + InstanceTypeMlR7i4xlarge InstanceType = "ml.r7i.4xlarge" + InstanceTypeMlR7i8xlarge InstanceType = "ml.r7i.8xlarge" + InstanceTypeMlR7i12xlarge InstanceType = "ml.r7i.12xlarge" + InstanceTypeMlR7i16xlarge InstanceType = "ml.r7i.16xlarge" + InstanceTypeMlR7i24xlarge InstanceType = "ml.r7i.24xlarge" + InstanceTypeMlR7i48xlarge InstanceType = "ml.r7i.48xlarge" + InstanceTypeMlM6idLarge InstanceType = "ml.m6id.large" + InstanceTypeMlM6idXlarge InstanceType = "ml.m6id.xlarge" + InstanceTypeMlM6id2xlarge InstanceType = "ml.m6id.2xlarge" + InstanceTypeMlM6id4xlarge InstanceType = "ml.m6id.4xlarge" + InstanceTypeMlM6id8xlarge InstanceType = "ml.m6id.8xlarge" + InstanceTypeMlM6id12xlarge InstanceType = "ml.m6id.12xlarge" + InstanceTypeMlM6id16xlarge InstanceType = "ml.m6id.16xlarge" + InstanceTypeMlM6id24xlarge InstanceType = "ml.m6id.24xlarge" + InstanceTypeMlM6id32xlarge InstanceType = "ml.m6id.32xlarge" + InstanceTypeMlC6idLarge InstanceType = "ml.c6id.large" + InstanceTypeMlC6idXlarge InstanceType = "ml.c6id.xlarge" + InstanceTypeMlC6id2xlarge InstanceType = "ml.c6id.2xlarge" + InstanceTypeMlC6id4xlarge InstanceType = "ml.c6id.4xlarge" + InstanceTypeMlC6id8xlarge InstanceType = "ml.c6id.8xlarge" + InstanceTypeMlC6id12xlarge InstanceType = "ml.c6id.12xlarge" + InstanceTypeMlC6id16xlarge InstanceType = "ml.c6id.16xlarge" + InstanceTypeMlC6id24xlarge InstanceType = "ml.c6id.24xlarge" + InstanceTypeMlC6id32xlarge InstanceType = "ml.c6id.32xlarge" + InstanceTypeMlR6idLarge InstanceType = "ml.r6id.large" + InstanceTypeMlR6idXlarge InstanceType = "ml.r6id.xlarge" + InstanceTypeMlR6id2xlarge InstanceType = "ml.r6id.2xlarge" + InstanceTypeMlR6id4xlarge InstanceType = "ml.r6id.4xlarge" + InstanceTypeMlR6id8xlarge InstanceType = "ml.r6id.8xlarge" + InstanceTypeMlR6id12xlarge InstanceType = "ml.r6id.12xlarge" + InstanceTypeMlR6id16xlarge InstanceType = "ml.r6id.16xlarge" + InstanceTypeMlR6id24xlarge InstanceType = "ml.r6id.24xlarge" + InstanceTypeMlR6id32xlarge InstanceType = "ml.r6id.32xlarge" + InstanceTypeMlG6Xlarge InstanceType = "ml.g6.xlarge" + InstanceTypeMlG62xlarge InstanceType = "ml.g6.2xlarge" + InstanceTypeMlG64xlarge InstanceType = "ml.g6.4xlarge" + InstanceTypeMlG68xlarge InstanceType = "ml.g6.8xlarge" + InstanceTypeMlG612xlarge InstanceType = "ml.g6.12xlarge" + InstanceTypeMlG616xlarge InstanceType = "ml.g6.16xlarge" + InstanceTypeMlG624xlarge InstanceType = "ml.g6.24xlarge" + InstanceTypeMlG648xlarge InstanceType = "ml.g6.48xlarge" ) // Values returns all known values for InstanceType. Note that this can be @@ -3533,6 +3540,13 @@ func (InstanceType) Values() []InstanceType { "ml.inf1.2xlarge", "ml.inf1.6xlarge", "ml.inf1.24xlarge", + "ml.trn1.2xlarge", + "ml.trn1.32xlarge", + "ml.trn1n.32xlarge", + "ml.inf2.xlarge", + "ml.inf2.8xlarge", + "ml.inf2.24xlarge", + "ml.inf2.48xlarge", "ml.p4d.24xlarge", "ml.p4de.24xlarge", "ml.p5.48xlarge", @@ -7793,6 +7807,10 @@ const ( TransformInstanceTypeMlG516xlarge TransformInstanceType = "ml.g5.16xlarge" TransformInstanceTypeMlG524xlarge TransformInstanceType = "ml.g5.24xlarge" TransformInstanceTypeMlG548xlarge TransformInstanceType = "ml.g5.48xlarge" + TransformInstanceTypeMlInf2Xlarge TransformInstanceType = "ml.inf2.xlarge" + TransformInstanceTypeMlInf28xlarge TransformInstanceType = "ml.inf2.8xlarge" + TransformInstanceTypeMlInf224xlarge TransformInstanceType = "ml.inf2.24xlarge" + TransformInstanceTypeMlInf248xlarge TransformInstanceType = "ml.inf2.48xlarge" ) // Values returns all known values for TransformInstanceType. Note that this can @@ -7895,6 +7913,10 @@ func (TransformInstanceType) Values() []TransformInstanceType { "ml.g5.16xlarge", "ml.g5.24xlarge", "ml.g5.48xlarge", + "ml.inf2.xlarge", + "ml.inf2.8xlarge", + "ml.inf2.24xlarge", + "ml.inf2.48xlarge", } } diff --git a/service/sts/api_op_AssumeRole.go b/service/sts/api_op_AssumeRole.go index be03f017d47..8838f4fb8aa 100644 --- a/service/sts/api_op_AssumeRole.go +++ b/service/sts/api_op_AssumeRole.go @@ -16,7 +16,7 @@ import ( // Amazon Web Services resources. These temporary credentials consist of an access // key ID, a secret access key, and a security token. Typically, you use AssumeRole // within your account or for cross-account access. For a comparison of AssumeRole -// with other API operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the +// with other API operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Compare STS credentials] in the // IAM User Guide. // // # Permissions @@ -26,16 +26,16 @@ import ( // cannot call the Amazon Web Services STS GetFederationToken or GetSessionToken // API operations. // -// (Optional) You can pass inline or managed [session policies] to this operation. You can pass a -// single JSON policy document to use as an inline session policy. You can also -// specify up to 10 managed policy Amazon Resource Names (ARNs) to use as managed -// session policies. The plaintext that you use for both inline and managed session -// policies can't exceed 2,048 characters. Passing policies to this operation -// returns new temporary credentials. The resulting session's permissions are the -// intersection of the role's identity-based policy and the session policies. You -// can use the role's temporary credentials in subsequent Amazon Web Services API -// calls to access resources in the account that owns the role. You cannot use -// session policies to grant more permissions than those allowed by the +// (Optional) You can pass inline or managed session policies to this operation. +// You can pass a single JSON policy document to use as an inline session policy. +// You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use +// as managed session policies. The plaintext that you use for both inline and +// managed session policies can't exceed 2,048 characters. Passing policies to this +// operation returns new temporary credentials. The resulting session's permissions +// are the intersection of the role's identity-based policy and the session +// policies. You can use the role's temporary credentials in subsequent Amazon Web +// Services API calls to access resources in the account that owns the role. You +// cannot use session policies to grant more permissions than those allowed by the // identity-based policy of the role that is being assumed. For more information, // see [Session Policies]in the IAM User Guide. // @@ -104,10 +104,9 @@ import ( // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session // [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html // [Chaining Roles with Session Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining -// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison -// [session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session // [IAM Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html // [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html +// [Compare STS credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html // [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html func (c *Client) AssumeRole(ctx context.Context, params *AssumeRoleInput, optFns ...func(*Options)) (*AssumeRoleOutput, error) { if params == nil { @@ -141,10 +140,18 @@ type AssumeRoleInput struct { // the temporary security credentials will expose the role session name to the // external account in their CloudTrail logs. // + // For security purposes, administrators can view this field in [CloudTrail logs] to help identify + // who performed an action in Amazon Web Services. Your administrator might require + // that you specify your user name as the session name when you assume the role. + // For more information, see [sts:RoleSessionName]sts:RoleSessionName . + // // The regex used to validate this parameter is a string of characters consisting // of upper- and lower-case alphanumeric characters with no spaces. You can also // include underscores or any of the following characters: =,.@- // + // [CloudTrail logs]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds + // [sts:RoleSessionName]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname + // // This member is required. RoleSessionName *string @@ -163,7 +170,7 @@ type AssumeRoleInput struct { // 43200 seconds (12 hours), depending on the maximum session duration setting for // your role. However, if you assume a role using role chaining and provide a // DurationSeconds parameter value greater than one hour, the operation fails. To - // learn how to view the maximum value for your role, see [View the Maximum Session Duration Setting for a Role]in the IAM User Guide. + // learn how to view the maximum value for your role, see [Update the maximum session duration for a role]. // // By default, the value is set to 3600 seconds. // @@ -173,7 +180,7 @@ type AssumeRoleInput struct { // parameter that specifies the maximum length of the console session. For more // information, see [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]in the IAM User Guide. // - // [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session + // [Update the maximum session duration for a role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration // [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html DurationSeconds *int32 @@ -218,7 +225,10 @@ type AssumeRoleInput struct { // by percentage how close the policies and tags for your request are to the upper // size limit. // + // For more information about role session permissions, see [Session policies]. + // // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session + // [Session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to @@ -273,10 +283,10 @@ type AssumeRoleInput struct { SerialNumber *string // The source identity specified by the principal that is calling the AssumeRole - // operation. + // operation. The source identity value persists across [chained role]sessions. // // You can require users to specify a source identity when they assume a role. You - // do this by using the sts:SourceIdentity condition key in a role trust policy. + // do this by using the [sts:SourceIdentity]sts:SourceIdentity condition key in a role trust policy. // You can use source identity information in CloudTrail logs to determine who took // actions with a role. You can use the aws:SourceIdentity condition key to // further control access to Amazon Web Services resources based on the value of @@ -289,7 +299,9 @@ type AssumeRoleInput struct { // value that begins with the text aws: . This prefix is reserved for Amazon Web // Services internal use. // + // [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#iam-term-role-chaining // [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html + // [sts:SourceIdentity]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourceidentity SourceIdentity *string // A list of session tags that you want to pass. Each session tag consists of a @@ -342,8 +354,8 @@ type AssumeRoleInput struct { // a tag key as transitive, the corresponding key and value passes to subsequent // sessions in a role chain. For more information, see [Chaining Roles with Session Tags]in the IAM User Guide. // - // This parameter is optional. When you set session tags as transitive, the - // session policy and session tags packed binary limit is not affected. + // This parameter is optional. The transitive status of a session tag does not + // impact its packed binary size. // // If you choose not to specify a transitive tag key, then no tags are passed from // this session to any subsequent sessions. diff --git a/service/sts/api_op_AssumeRoleWithSAML.go b/service/sts/api_op_AssumeRoleWithSAML.go index b8b0c095f7e..d0e117ac928 100644 --- a/service/sts/api_op_AssumeRoleWithSAML.go +++ b/service/sts/api_op_AssumeRoleWithSAML.go @@ -16,7 +16,7 @@ import ( // mechanism for tying an enterprise identity store or directory to role-based // Amazon Web Services access without user-specific credentials or configuration. // For a comparison of AssumeRoleWithSAML with the other API operations that -// produce temporary credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the IAM User Guide. +// produce temporary credentials, see [Requesting Temporary Security Credentials]and [Compare STS credentials] in the IAM User Guide. // // The temporary security credentials returned by this operation consist of an // access key ID, a secret access key, and a security token. Applications can use @@ -130,10 +130,10 @@ import ( // [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session // [Creating a Role for SAML 2.0 Federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html // [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length -// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison // [Creating SAML Identity Providers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html // [session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session // [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html +// [Compare STS credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html // [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html // [Configuring a Relying Party and Claims]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html // [Role chaining]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining @@ -219,6 +219,8 @@ type AssumeRoleWithSAMLInput struct { // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage // return (\u000D) characters. // + // For more information about role session permissions, see [Session policies]. + // // An Amazon Web Services conversion compresses the passed inline session policy, // managed policy ARNs, and session tags into a packed binary format that has a // separate limit. Your request can fail for this limit even if your plaintext @@ -227,6 +229,7 @@ type AssumeRoleWithSAMLInput struct { // size limit. // // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session + // [Session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to @@ -304,7 +307,8 @@ type AssumeRoleWithSAMLOutput struct { // allowed space. PackedPolicySize *int32 - // The value in the SourceIdentity attribute in the SAML assertion. + // The value in the SourceIdentity attribute in the SAML assertion. The source + // identity value persists across [chained role]sessions. // // You can require users to set a source identity value when they assume a role. // You do this by using the sts:SourceIdentity condition key in a role trust @@ -321,7 +325,7 @@ type AssumeRoleWithSAMLOutput struct { // of upper- and lower-case alphanumeric characters with no spaces. You can also // include underscores or any of the following characters: =,.@- // - // [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining + // [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#id_roles_terms-and-concepts // [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html SourceIdentity *string diff --git a/service/sts/api_op_AssumeRoleWithWebIdentity.go b/service/sts/api_op_AssumeRoleWithWebIdentity.go index ffe2479f636..803cded5a49 100644 --- a/service/sts/api_op_AssumeRoleWithWebIdentity.go +++ b/service/sts/api_op_AssumeRoleWithWebIdentity.go @@ -31,7 +31,7 @@ import ( // Services credentials. Instead, the identity of the caller is validated by using // a token from the web identity provider. For a comparison of // AssumeRoleWithWebIdentity with the other API operations that produce temporary -// credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the IAM User Guide. +// credentials, see [Requesting Temporary Security Credentials]and [Compare STS credentials] in the IAM User Guide. // // The temporary security credentials returned by this API consist of an access // key ID, a secret access key, and a security token. Applications can use these @@ -45,7 +45,7 @@ import ( // DurationSeconds parameter to specify the duration of your session. You can // provide a value from 900 seconds (15 minutes) up to the maximum session duration // setting for the role. This setting can have a value from 1 hour to 12 hours. To -// learn how to view the maximum value for your role, see [View the Maximum Session Duration Setting for a Role]in the IAM User Guide. +// learn how to view the maximum value for your role, see [Update the maximum session duration for a role]in the IAM User Guide. // The maximum session duration limit applies when you use the AssumeRole* API // operations or the assume-role* CLI commands. However the limit does not apply // when you use those operations to create a console URL. For more information, see @@ -111,34 +111,23 @@ import ( // that you avoid using any personally identifiable information (PII) in this // field. For example, you could instead use a GUID or a pairwise identifier, as [suggested in the OIDC specification]. // -// For more information about how to use web identity federation and the +// For more information about how to use OIDC federation and the // AssumeRoleWithWebIdentity API, see the following resources: // // [Using Web Identity Federation API Operations for Mobile Apps] // - and [Federation Through a Web-based Identity Provider]. // -// [Web Identity Federation Playground] -// - . Walk through the process of authenticating through Login with Amazon, -// Facebook, or Google, getting temporary security credentials, and then using -// those credentials to make a request to Amazon Web Services. -// // [Amazon Web Services SDK for iOS Developer Guide] // - and [Amazon Web Services SDK for Android Developer Guide]. These toolkits contain sample apps that show how to invoke the // identity providers. The toolkits then show how to use the information from these // providers to get and use temporary security credentials. // -// [Web Identity Federation with Mobile Applications] -// - . This article discusses web identity federation and shows an example of -// how to use web identity federation to get access to content in Amazon S3. -// // [Amazon Web Services SDK for iOS Developer Guide]: http://aws.amazon.com/sdkforios/ -// [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session -// [Web Identity Federation Playground]: https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/ // [Amazon Web Services SDK for Android Developer Guide]: http://aws.amazon.com/sdkforandroid/ // [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length -// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison // [session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session // [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html +// [Compare STS credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html // [Subject]: http://openid.net/specs/openid-connect-core-1_0.html#Claims // [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html // [Amazon Cognito identity pools]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html @@ -148,7 +137,7 @@ import ( // [Amazon Cognito federated identities]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html // [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html // [Chaining Roles with Session Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining -// [Web Identity Federation with Mobile Applications]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications +// [Update the maximum session duration for a role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration // [Using Web Identity Federation API Operations for Mobile Apps]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html // [suggested in the OIDC specification]: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes func (c *Client) AssumeRoleWithWebIdentity(ctx context.Context, params *AssumeRoleWithWebIdentityInput, optFns ...func(*Options)) (*AssumeRoleWithWebIdentityOutput, error) { @@ -170,6 +159,17 @@ type AssumeRoleWithWebIdentityInput struct { // The Amazon Resource Name (ARN) of the role that the caller is assuming. // + // Additional considerations apply to Amazon Cognito identity pools that assume [cross-account IAM roles]. + // The trust policies of these roles must accept the cognito-identity.amazonaws.com + // service principal and must contain the cognito-identity.amazonaws.com:aud + // condition key to restrict role assumption to users from your intended identity + // pools. A policy that trusts Amazon Cognito identity pools without this condition + // creates a risk that a user from an unintended identity pool can assume the role. + // For more information, see [Trust policies for IAM roles in Basic (Classic) authentication]in the Amazon Cognito Developer Guide. + // + // [cross-account IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html + // [Trust policies for IAM roles in Basic (Classic) authentication]: https://docs.aws.amazon.com/cognito/latest/developerguide/iam-roles.html#trust-policies + // // This member is required. RoleArn *string @@ -179,17 +179,26 @@ type AssumeRoleWithWebIdentityInput struct { // associated with that user. This session name is included as part of the ARN and // assumed role ID in the AssumedRoleUser response element. // + // For security purposes, administrators can view this field in [CloudTrail logs] to help identify + // who performed an action in Amazon Web Services. Your administrator might require + // that you specify your user name as the session name when you assume the role. + // For more information, see [sts:RoleSessionName]sts:RoleSessionName . + // // The regex used to validate this parameter is a string of characters consisting // of upper- and lower-case alphanumeric characters with no spaces. You can also // include underscores or any of the following characters: =,.@- // + // [CloudTrail logs]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds + // [sts:RoleSessionName]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname + // // This member is required. RoleSessionName *string // The OAuth 2.0 access token or OpenID Connect ID token that is provided by the // identity provider. Your application must get this token by authenticating the // user who is using your application with a web identity provider before the - // application makes an AssumeRoleWithWebIdentity call. Only tokens with RSA + // application makes an AssumeRoleWithWebIdentity call. Timestamps in the token + // must be formatted as either an integer or a long integer. Only tokens with RSA // algorithms (RS256) are supported. // // This member is required. @@ -232,6 +241,8 @@ type AssumeRoleWithWebIdentityInput struct { // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage // return (\u000D) characters. // + // For more information about role session permissions, see [Session policies]. + // // An Amazon Web Services conversion compresses the passed inline session policy, // managed policy ARNs, and session tags into a packed binary format that has a // separate limit. Your request can fail for this limit even if your plaintext @@ -240,6 +251,7 @@ type AssumeRoleWithWebIdentityInput struct { // size limit. // // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session + // [Session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to @@ -337,7 +349,7 @@ type AssumeRoleWithWebIdentityOutput struct { // of upper- and lower-case alphanumeric characters with no spaces. You can also // include underscores or any of the following characters: =,.@- // - // [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining + // [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#id_roles_terms-and-concepts // [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html // [Using Tokens with User Pools]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html SourceIdentity *string diff --git a/service/sts/api_op_AssumeRoot.go b/service/sts/api_op_AssumeRoot.go new file mode 100644 index 00000000000..537ab87527e --- /dev/null +++ b/service/sts/api_op_AssumeRoot.go @@ -0,0 +1,221 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package sts + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/sts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a set of short term credentials you can use to perform privileged tasks +// in a member account. +// +// Before you can launch a privileged session, you must have enabled centralized +// root access in your organization. For steps to enable this feature, see [Centralize root access for member accounts]in the +// IAM User Guide. +// +// The global endpoint is not supported for AssumeRoot. You must send this request +// to a Regional STS endpoint. For more information, see [Endpoints]. +// +// You can track AssumeRoot in CloudTrail logs to determine what actions were +// performed in a session. For more information, see [Track privileged tasks in CloudTrail]in the IAM User Guide. +// +// [Endpoints]: https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html#sts-endpoints +// [Track privileged tasks in CloudTrail]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-track-privileged-tasks.html +// [Centralize root access for member accounts]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-enable-root-access.html +func (c *Client) AssumeRoot(ctx context.Context, params *AssumeRootInput, optFns ...func(*Options)) (*AssumeRootOutput, error) { + if params == nil { + params = &AssumeRootInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssumeRoot", params, optFns, c.addOperationAssumeRootMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssumeRootOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AssumeRootInput struct { + + // The member account principal ARN or account ID. + // + // This member is required. + TargetPrincipal *string + + // The identity based policy that scopes the session to the privileged tasks that + // can be performed. You can use one of following Amazon Web Services managed + // policies to scope root session actions. You can add additional customer managed + // policies to further limit the permissions for the root session. + // + // [IAMAuditRootUserCredentials] + // + // [IAMCreateRootUserPassword] + // + // [IAMDeleteRootUserCredentials] + // + // [S3UnlockBucketPolicy] + // + // [SQSUnlockQueuePolicy] + // + // [IAMDeleteRootUserCredentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMDeleteRootUserCredentials + // [IAMCreateRootUserPassword]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMCreateRootUserPassword + // [IAMAuditRootUserCredentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMAuditRootUserCredentials + // [S3UnlockBucketPolicy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-S3UnlockBucketPolicy + // [SQSUnlockQueuePolicy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-SQSUnlockQueuePolicy + // + // This member is required. + TaskPolicyArn *types.PolicyDescriptorType + + // The duration, in seconds, of the privileged session. The value can range from 0 + // seconds up to the maximum session duration of 900 seconds (15 minutes). If you + // specify a value higher than this setting, the operation fails. + // + // By default, the value is set to 900 seconds. + DurationSeconds *int32 + + noSmithyDocumentSerde +} + +type AssumeRootOutput struct { + + // The temporary security credentials, which include an access key ID, a secret + // access key, and a security token. + // + // The size of the security token that STS API operations return is not fixed. We + // strongly recommend that you make no assumptions about the maximum size. + Credentials *types.Credentials + + // The source identity specified by the principal that is calling the AssumeRoot + // operation. + // + // You can use the aws:SourceIdentity condition key to control access based on the + // value of source identity. For more information about using source identity, see [Monitor and control actions taken with assumed roles] + // in the IAM User Guide. + // + // The regex used to validate this parameter is a string of characters consisting + // of upper- and lower-case alphanumeric characters with no spaces. You can also + // include underscores or any of the following characters: =,.@- + // + // [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html + SourceIdentity *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAssumeRootMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpAssumeRoot{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpAssumeRoot{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AssumeRoot"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpAssumeRootValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRoot(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAssumeRoot(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AssumeRoot", + } +} diff --git a/service/sts/api_op_GetFederationToken.go b/service/sts/api_op_GetFederationToken.go index 96f59ec63da..e2ecc792acd 100644 --- a/service/sts/api_op_GetFederationToken.go +++ b/service/sts/api_op_GetFederationToken.go @@ -20,7 +20,7 @@ import ( // credentials of an IAM user. As a result, this call is appropriate in contexts // where those credentials can be safeguarded, usually in a server-based // application. For a comparison of GetFederationToken with the other API -// operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the IAM User Guide. +// operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Compare STS credentials] in the IAM User Guide. // // Although it is possible to call GetFederationToken using the security // credentials of an Amazon Web Services account root user rather than an IAM user @@ -104,9 +104,9 @@ import ( // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session // [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html // [GetFederationToken—Federation Through a Custom Identity Broker]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken -// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison // [Safeguard your root user credentials and don't use them for everyday tasks]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials // [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html +// [Compare STS credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html // [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html func (c *Client) GetFederationToken(ctx context.Context, params *GetFederationTokenInput, optFns ...func(*Options)) (*GetFederationTokenOutput, error) { if params == nil { diff --git a/service/sts/api_op_GetSessionToken.go b/service/sts/api_op_GetSessionToken.go index 0ed9ecbc74e..fdc451117b5 100644 --- a/service/sts/api_op_GetSessionToken.go +++ b/service/sts/api_op_GetSessionToken.go @@ -22,7 +22,7 @@ import ( // the call returns, IAM users can then make programmatic calls to API operations // that require MFA authentication. An incorrect MFA code causes the API to return // an access denied error. For a comparison of GetSessionToken with the other API -// operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the IAM User Guide. +// operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Compare STS credentials] in the IAM User Guide. // // No permissions are required for users to perform this operation. The purpose of // the sts:GetSessionToken operation is to authenticate the user using MFA. You @@ -63,10 +63,10 @@ import ( // credentials, see [Temporary Credentials for Users in Untrusted Environments]in the IAM User Guide. // // [Permissions for GetSessionToken]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html -// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison // [Temporary Credentials for Users in Untrusted Environments]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken // [Safeguard your root user credentials and don't use them for everyday tasks]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials // [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html +// [Compare STS credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html func (c *Client) GetSessionToken(ctx context.Context, params *GetSessionTokenInput, optFns ...func(*Options)) (*GetSessionTokenOutput, error) { if params == nil { params = &GetSessionTokenInput{} diff --git a/service/sts/deserializers.go b/service/sts/deserializers.go index cf0cc54e2af..59349890f6f 100644 --- a/service/sts/deserializers.go +++ b/service/sts/deserializers.go @@ -410,6 +410,121 @@ func awsAwsquery_deserializeOpErrorAssumeRoleWithWebIdentity(response *smithyhtt } } +type awsAwsquery_deserializeOpAssumeRoot struct { +} + +func (*awsAwsquery_deserializeOpAssumeRoot) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpAssumeRoot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsquery_deserializeOpErrorAssumeRoot(response, &metadata) + } + output := &AssumeRootOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("AssumeRootResult") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentAssumeRootOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorAssumeRoot(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ExpiredTokenException", errorCode): + return awsAwsquery_deserializeErrorExpiredTokenException(response, errorBody) + + case strings.EqualFold("RegionDisabledException", errorCode): + return awsAwsquery_deserializeErrorRegionDisabledException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsquery_deserializeOpDecodeAuthorizationMessage struct { } @@ -2268,6 +2383,61 @@ func awsAwsquery_deserializeOpDocumentAssumeRoleWithWebIdentityOutput(v **Assume return nil } +func awsAwsquery_deserializeOpDocumentAssumeRootOutput(v **AssumeRootOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *AssumeRootOutput + if *v == nil { + sv = &AssumeRootOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Credentials", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentCredentials(&sv.Credentials, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("SourceIdentity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SourceIdentity = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeOpDocumentDecodeAuthorizationMessageOutput(v **DecodeAuthorizationMessageOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/sts/generated.json b/service/sts/generated.json index 6b6e839e6c9..70a88452ee2 100644 --- a/service/sts/generated.json +++ b/service/sts/generated.json @@ -13,6 +13,7 @@ "api_op_AssumeRole.go", "api_op_AssumeRoleWithSAML.go", "api_op_AssumeRoleWithWebIdentity.go", + "api_op_AssumeRoot.go", "api_op_DecodeAuthorizationMessage.go", "api_op_GetAccessKeyInfo.go", "api_op_GetCallerIdentity.go", diff --git a/service/sts/serializers.go b/service/sts/serializers.go index 1bcbc828423..96b222136bf 100644 --- a/service/sts/serializers.go +++ b/service/sts/serializers.go @@ -226,6 +226,76 @@ func (m *awsAwsquery_serializeOpAssumeRoleWithWebIdentity) HandleSerialize(ctx c return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpAssumeRoot struct { +} + +func (*awsAwsquery_serializeOpAssumeRoot) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpAssumeRoot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*AssumeRootInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("AssumeRoot") + body.Key("Version").String("2011-06-15") + + if err := awsAwsquery_serializeOpDocumentAssumeRootInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsquery_serializeOpDecodeAuthorizationMessage struct { } @@ -821,6 +891,30 @@ func awsAwsquery_serializeOpDocumentAssumeRoleWithWebIdentityInput(v *AssumeRole return nil } +func awsAwsquery_serializeOpDocumentAssumeRootInput(v *AssumeRootInput, value query.Value) error { + object := value.Object() + _ = object + + if v.DurationSeconds != nil { + objectKey := object.Key("DurationSeconds") + objectKey.Integer(*v.DurationSeconds) + } + + if v.TargetPrincipal != nil { + objectKey := object.Key("TargetPrincipal") + objectKey.String(*v.TargetPrincipal) + } + + if v.TaskPolicyArn != nil { + objectKey := object.Key("TaskPolicyArn") + if err := awsAwsquery_serializeDocumentPolicyDescriptorType(v.TaskPolicyArn, objectKey); err != nil { + return err + } + } + + return nil +} + func awsAwsquery_serializeOpDocumentDecodeAuthorizationMessageInput(v *DecodeAuthorizationMessageInput, value query.Value) error { object := value.Object() _ = object diff --git a/service/sts/snapshot/api_op_AssumeRoot.go.snap b/service/sts/snapshot/api_op_AssumeRoot.go.snap new file mode 100644 index 00000000000..12ab82a36f0 --- /dev/null +++ b/service/sts/snapshot/api_op_AssumeRoot.go.snap @@ -0,0 +1,41 @@ +AssumeRoot + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/sts/snapshot_test.go b/service/sts/snapshot_test.go index d224b596fd0..5fa0b3286f2 100644 --- a/service/sts/snapshot_test.go +++ b/service/sts/snapshot_test.go @@ -98,6 +98,18 @@ func TestCheckSnapshot_AssumeRoleWithWebIdentity(t *testing.T) { } } +func TestCheckSnapshot_AssumeRoot(t *testing.T) { + svc := New(Options{}) + _, err := svc.AssumeRoot(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "AssumeRoot") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DecodeAuthorizationMessage(t *testing.T) { svc := New(Options{}) _, err := svc.DecodeAuthorizationMessage(context.Background(), nil, func(o *Options) { @@ -193,6 +205,18 @@ func TestUpdateSnapshot_AssumeRoleWithWebIdentity(t *testing.T) { } } +func TestUpdateSnapshot_AssumeRoot(t *testing.T) { + svc := New(Options{}) + _, err := svc.AssumeRoot(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "AssumeRoot") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DecodeAuthorizationMessage(t *testing.T) { svc := New(Options{}) _, err := svc.DecodeAuthorizationMessage(context.Background(), nil, func(o *Options) { diff --git a/service/sts/types/errors.go b/service/sts/types/errors.go index 9573a4b6461..041629bba2c 100644 --- a/service/sts/types/errors.go +++ b/service/sts/types/errors.go @@ -95,8 +95,8 @@ func (e *IDPRejectedClaimException) ErrorCode() string { func (e *IDPRejectedClaimException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The error returned if the message passed to DecodeAuthorizationMessage was -// invalid. This can happen if the token contains invalid characters, such as -// linebreaks. +// invalid. This can happen if the token contains invalid characters, such as line +// breaks, or if the message has expired. type InvalidAuthorizationMessageException struct { Message *string @@ -218,10 +218,10 @@ func (e *PackedPolicyTooLargeException) ErrorFault() smithy.ErrorFault { return // STS is not activated in the requested region for the account that is being // asked to generate credentials. The account administrator must use the IAM -// console to activate STS in that region. For more information, see [Activating and Deactivating Amazon Web Services STS in an Amazon Web Services Region]in the IAM +// console to activate STS in that region. For more information, see [Activating and Deactivating STS in an Amazon Web Services Region]in the IAM // User Guide. // -// [Activating and Deactivating Amazon Web Services STS in an Amazon Web Services Region]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html +// [Activating and Deactivating STS in an Amazon Web Services Region]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html type RegionDisabledException struct { Message *string diff --git a/service/sts/validators.go b/service/sts/validators.go index 3e4bad2a925..1026e22118d 100644 --- a/service/sts/validators.go +++ b/service/sts/validators.go @@ -70,6 +70,26 @@ func (m *validateOpAssumeRoleWithWebIdentity) HandleInitialize(ctx context.Conte return next.HandleInitialize(ctx, in) } +type validateOpAssumeRoot struct { +} + +func (*validateOpAssumeRoot) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssumeRoot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssumeRootInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssumeRootInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDecodeAuthorizationMessage struct { } @@ -142,6 +162,10 @@ func addOpAssumeRoleWithWebIdentityValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpAssumeRoleWithWebIdentity{}, middleware.After) } +func addOpAssumeRootValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssumeRoot{}, middleware.After) +} + func addOpDecodeAuthorizationMessageValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDecodeAuthorizationMessage{}, middleware.After) } @@ -254,6 +278,24 @@ func validateOpAssumeRoleWithWebIdentityInput(v *AssumeRoleWithWebIdentityInput) } } +func validateOpAssumeRootInput(v *AssumeRootInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssumeRootInput"} + if v.TargetPrincipal == nil { + invalidParams.Add(smithy.NewErrParamRequired("TargetPrincipal")) + } + if v.TaskPolicyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("TaskPolicyArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDecodeAuthorizationMessageInput(v *DecodeAuthorizationMessageInput) error { if v == nil { return nil