@aws-sdk/client-schemas 3.34.0 → 3.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -0
- package/{dist/cjs → dist-cjs}/Schemas.js +2 -6
- package/{dist/cjs → dist-cjs}/SchemasClient.js +8 -17
- package/{dist/cjs → dist-cjs}/commands/CreateDiscovererCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/CreateRegistryCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/CreateSchemaCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/DeleteDiscovererCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/DeleteRegistryCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/DeleteResourcePolicyCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/DeleteSchemaCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/DeleteSchemaVersionCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/DescribeCodeBindingCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/DescribeDiscovererCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/DescribeRegistryCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/DescribeSchemaCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/ExportSchemaCommand.js +2 -10
- package/{dist/cjs → dist-cjs}/commands/GetCodeBindingSourceCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/GetDiscoveredSchemaCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/GetResourcePolicyCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/ListDiscoverersCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/ListRegistriesCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/ListSchemaVersionsCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/ListSchemasCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/ListTagsForResourceCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/PutCodeBindingCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/PutResourcePolicyCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/SearchSchemasCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/StartDiscovererCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/StopDiscovererCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/TagResourceCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/UntagResourceCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/UpdateDiscovererCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/UpdateRegistryCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/UpdateSchemaCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/endpoints.js +1 -2
- package/{dist/cjs → dist-cjs}/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/models_0.js +0 -214
- package/{dist/cjs → dist-cjs}/pagination/Interfaces.js +0 -1
- package/{dist/cjs → dist-cjs}/pagination/ListDiscoverersPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/pagination/ListRegistriesPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/pagination/ListSchemaVersionsPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/pagination/ListSchemasPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/pagination/SearchSchemasPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/protocols/Aws_restJson1.js +7 -13
- package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -4
- package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -5
- package/{dist/cjs → dist-cjs}/waiters/waitForCodeBindingExists.js +5 -15
- package/{dist/es → dist-es}/Schemas.js +2 -3
- package/{dist/es → dist-es}/SchemasClient.js +1 -2
- package/{dist/es → dist-es}/commands/CreateDiscovererCommand.js +2 -3
- package/{dist/es → dist-es}/commands/CreateRegistryCommand.js +2 -3
- package/{dist/es → dist-es}/commands/CreateSchemaCommand.js +2 -3
- package/{dist/es → dist-es}/commands/DeleteDiscovererCommand.js +2 -3
- package/{dist/es → dist-es}/commands/DeleteRegistryCommand.js +2 -3
- package/{dist/es → dist-es}/commands/DeleteResourcePolicyCommand.js +2 -3
- package/{dist/es → dist-es}/commands/DeleteSchemaCommand.js +2 -3
- package/{dist/es → dist-es}/commands/DeleteSchemaVersionCommand.js +2 -3
- package/{dist/es → dist-es}/commands/DescribeCodeBindingCommand.js +2 -3
- package/{dist/es → dist-es}/commands/DescribeDiscovererCommand.js +2 -3
- package/{dist/es → dist-es}/commands/DescribeRegistryCommand.js +2 -3
- package/{dist/es → dist-es}/commands/DescribeSchemaCommand.js +2 -3
- package/{dist/es → dist-es}/commands/ExportSchemaCommand.js +2 -3
- package/{dist/es → dist-es}/commands/GetCodeBindingSourceCommand.js +2 -3
- package/{dist/es → dist-es}/commands/GetDiscoveredSchemaCommand.js +2 -3
- package/{dist/es → dist-es}/commands/GetResourcePolicyCommand.js +2 -3
- package/{dist/es → dist-es}/commands/ListDiscoverersCommand.js +2 -3
- package/{dist/es → dist-es}/commands/ListRegistriesCommand.js +2 -3
- package/{dist/es → dist-es}/commands/ListSchemaVersionsCommand.js +2 -3
- package/{dist/es → dist-es}/commands/ListSchemasCommand.js +2 -3
- package/{dist/es → dist-es}/commands/ListTagsForResourceCommand.js +2 -3
- package/{dist/es → dist-es}/commands/PutCodeBindingCommand.js +2 -3
- package/{dist/es → dist-es}/commands/PutResourcePolicyCommand.js +2 -3
- package/{dist/es → dist-es}/commands/SearchSchemasCommand.js +2 -3
- package/{dist/es → dist-es}/commands/StartDiscovererCommand.js +2 -3
- package/{dist/es → dist-es}/commands/StopDiscovererCommand.js +2 -3
- package/{dist/es → dist-es}/commands/TagResourceCommand.js +2 -3
- package/{dist/es → dist-es}/commands/UntagResourceCommand.js +2 -3
- package/{dist/es → dist-es}/commands/UpdateDiscovererCommand.js +2 -3
- package/{dist/es → dist-es}/commands/UpdateRegistryCommand.js +2 -3
- package/{dist/es → dist-es}/commands/UpdateSchemaCommand.js +2 -3
- package/{dist/es → dist-es}/endpoints.js +1 -2
- package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
- package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
- package/{dist/es → dist-es}/models/models_0.js +0 -1
- package/dist-es/pagination/Interfaces.js +1 -0
- package/{dist/es → dist-es}/pagination/ListDiscoverersPaginator.js +1 -2
- package/{dist/es → dist-es}/pagination/ListRegistriesPaginator.js +1 -2
- package/{dist/es → dist-es}/pagination/ListSchemaVersionsPaginator.js +1 -2
- package/{dist/es → dist-es}/pagination/ListSchemasPaginator.js +1 -2
- package/{dist/es → dist-es}/pagination/SearchSchemasPaginator.js +1 -2
- package/{dist/es → dist-es}/protocols/Aws_restJson1.js +1 -2
- package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -2
- package/{dist/es → dist-es}/runtimeConfig.js +1 -2
- package/{dist/es → dist-es}/runtimeConfig.native.js +0 -1
- package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -2
- package/{dist/es → dist-es}/waiters/waitForCodeBindingExists.js +1 -2
- package/{dist/types → dist-types}/Schemas.d.ts +3 -3
- package/{dist/types → dist-types}/SchemasClient.d.ts +9 -9
- package/{dist/types → dist-types}/commands/CreateDiscovererCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/CreateRegistryCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/CreateSchemaCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/DeleteDiscovererCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/DeleteRegistryCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/DeleteResourcePolicyCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/DeleteSchemaCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/DeleteSchemaVersionCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/DescribeCodeBindingCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/DescribeDiscovererCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/DescribeRegistryCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/DescribeSchemaCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/ExportSchemaCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/GetCodeBindingSourceCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/GetDiscoveredSchemaCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/GetResourcePolicyCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/ListDiscoverersCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/ListRegistriesCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/ListSchemaVersionsCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/ListSchemasCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/ListTagsForResourceCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/PutCodeBindingCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/PutResourcePolicyCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/SearchSchemasCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/StartDiscovererCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/StopDiscovererCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/TagResourceCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/UntagResourceCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/UpdateDiscovererCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/UpdateRegistryCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/UpdateSchemaCommand.d.ts +3 -3
- package/{dist/types → dist-types}/endpoints.d.ts +0 -0
- package/{index.ts → dist-types/index.d.ts} +0 -0
- package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
- package/{dist/types → dist-types}/models/models_0.d.ts +0 -0
- package/{dist/types → dist-types}/pagination/Interfaces.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListDiscoverersPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListRegistriesPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListSchemaVersionsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListSchemasPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/SearchSchemasPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/protocols/Aws_restJson1.d.ts +3 -3
- package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.d.ts +1 -1
- package/{dist/types → dist-types}/runtimeConfig.native.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/Schemas.d.ts +34 -96
- package/{dist/types → dist-types}/ts3.4/SchemasClient.d.ts +33 -98
- package/{dist/types → dist-types}/ts3.4/commands/CreateDiscovererCommand.d.ts +5 -23
- package/{dist/types → dist-types}/ts3.4/commands/CreateRegistryCommand.d.ts +5 -23
- package/dist-types/ts3.4/commands/CreateSchemaCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteDiscovererCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteRegistryCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteResourcePolicyCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteSchemaCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteSchemaVersionCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/commands/DescribeCodeBindingCommand.d.ts +5 -23
- package/{dist/types → dist-types}/ts3.4/commands/DescribeDiscovererCommand.d.ts +5 -23
- package/{dist/types → dist-types}/ts3.4/commands/DescribeRegistryCommand.d.ts +5 -23
- package/{dist/types → dist-types}/ts3.4/commands/DescribeSchemaCommand.d.ts +5 -23
- package/{dist/types → dist-types}/ts3.4/commands/ExportSchemaCommand.d.ts +4 -6
- package/{dist/types → dist-types}/ts3.4/commands/GetCodeBindingSourceCommand.d.ts +5 -23
- package/{dist/types → dist-types}/ts3.4/commands/GetDiscoveredSchemaCommand.d.ts +5 -23
- package/{dist/types → dist-types}/ts3.4/commands/GetResourcePolicyCommand.d.ts +5 -23
- package/{dist/types → dist-types}/ts3.4/commands/ListDiscoverersCommand.d.ts +5 -23
- package/{dist/types → dist-types}/ts3.4/commands/ListRegistriesCommand.d.ts +5 -23
- package/{dist/types → dist-types}/ts3.4/commands/ListSchemaVersionsCommand.d.ts +5 -23
- package/{dist/types → dist-types}/ts3.4/commands/ListSchemasCommand.d.ts +5 -23
- package/{dist/types → dist-types}/ts3.4/commands/ListTagsForResourceCommand.d.ts +5 -23
- package/{dist/types → dist-types}/ts3.4/commands/PutCodeBindingCommand.d.ts +5 -23
- package/{dist/types → dist-types}/ts3.4/commands/PutResourcePolicyCommand.d.ts +5 -23
- package/{dist/types → dist-types}/ts3.4/commands/SearchSchemasCommand.d.ts +5 -23
- package/{dist/types → dist-types}/ts3.4/commands/StartDiscovererCommand.d.ts +5 -23
- package/{dist/types → dist-types}/ts3.4/commands/StopDiscovererCommand.d.ts +5 -23
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/commands/UpdateDiscovererCommand.d.ts +5 -23
- package/{dist/types → dist-types}/ts3.4/commands/UpdateRegistryCommand.d.ts +5 -23
- package/dist-types/ts3.4/commands/UpdateSchemaCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/models/models_0.d.ts +286 -858
- package/{dist/types → dist-types}/ts3.4/pagination/Interfaces.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListDiscoverersPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListRegistriesPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListSchemaVersionsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListSchemasPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/SearchSchemasPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/protocols/Aws_restJson1.d.ts +3 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.d.ts +2 -4
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/waiters/waitForCodeBindingExists.d.ts +4 -11
- package/{dist/types → dist-types}/waiters/waitForCodeBindingExists.d.ts +2 -2
- package/package.json +46 -43
- package/Schemas.ts +0 -1119
- package/SchemasClient.ts +0 -346
- package/commands/CreateDiscovererCommand.ts +0 -94
- package/commands/CreateRegistryCommand.ts +0 -94
- package/commands/CreateSchemaCommand.ts +0 -94
- package/commands/DeleteDiscovererCommand.ts +0 -94
- package/commands/DeleteRegistryCommand.ts +0 -94
- package/commands/DeleteResourcePolicyCommand.ts +0 -94
- package/commands/DeleteSchemaCommand.ts +0 -94
- package/commands/DeleteSchemaVersionCommand.ts +0 -94
- package/commands/DescribeCodeBindingCommand.ts +0 -94
- package/commands/DescribeDiscovererCommand.ts +0 -94
- package/commands/DescribeRegistryCommand.ts +0 -94
- package/commands/DescribeSchemaCommand.ts +0 -94
- package/commands/ExportSchemaCommand.ts +0 -77
- package/commands/GetCodeBindingSourceCommand.ts +0 -94
- package/commands/GetDiscoveredSchemaCommand.ts +0 -94
- package/commands/GetResourcePolicyCommand.ts +0 -94
- package/commands/ListDiscoverersCommand.ts +0 -94
- package/commands/ListRegistriesCommand.ts +0 -94
- package/commands/ListSchemaVersionsCommand.ts +0 -94
- package/commands/ListSchemasCommand.ts +0 -94
- package/commands/ListTagsForResourceCommand.ts +0 -94
- package/commands/PutCodeBindingCommand.ts +0 -94
- package/commands/PutResourcePolicyCommand.ts +0 -94
- package/commands/SearchSchemasCommand.ts +0 -94
- package/commands/StartDiscovererCommand.ts +0 -94
- package/commands/StopDiscovererCommand.ts +0 -94
- package/commands/TagResourceCommand.ts +0 -94
- package/commands/UntagResourceCommand.ts +0 -94
- package/commands/UpdateDiscovererCommand.ts +0 -94
- package/commands/UpdateRegistryCommand.ts +0 -94
- package/commands/UpdateSchemaCommand.ts +0 -94
- package/dist/cjs/Schemas.js.map +0 -1
- package/dist/cjs/SchemasClient.js.map +0 -1
- package/dist/cjs/commands/CreateDiscovererCommand.js.map +0 -1
- package/dist/cjs/commands/CreateRegistryCommand.js.map +0 -1
- package/dist/cjs/commands/CreateSchemaCommand.js.map +0 -1
- package/dist/cjs/commands/DeleteDiscovererCommand.js.map +0 -1
- package/dist/cjs/commands/DeleteRegistryCommand.js.map +0 -1
- package/dist/cjs/commands/DeleteResourcePolicyCommand.js.map +0 -1
- package/dist/cjs/commands/DeleteSchemaCommand.js.map +0 -1
- package/dist/cjs/commands/DeleteSchemaVersionCommand.js.map +0 -1
- package/dist/cjs/commands/DescribeCodeBindingCommand.js.map +0 -1
- package/dist/cjs/commands/DescribeDiscovererCommand.js.map +0 -1
- package/dist/cjs/commands/DescribeRegistryCommand.js.map +0 -1
- package/dist/cjs/commands/DescribeSchemaCommand.js.map +0 -1
- package/dist/cjs/commands/ExportSchemaCommand.js.map +0 -1
- package/dist/cjs/commands/GetCodeBindingSourceCommand.js.map +0 -1
- package/dist/cjs/commands/GetDiscoveredSchemaCommand.js.map +0 -1
- package/dist/cjs/commands/GetResourcePolicyCommand.js.map +0 -1
- package/dist/cjs/commands/ListDiscoverersCommand.js.map +0 -1
- package/dist/cjs/commands/ListRegistriesCommand.js.map +0 -1
- package/dist/cjs/commands/ListSchemaVersionsCommand.js.map +0 -1
- package/dist/cjs/commands/ListSchemasCommand.js.map +0 -1
- package/dist/cjs/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist/cjs/commands/PutCodeBindingCommand.js.map +0 -1
- package/dist/cjs/commands/PutResourcePolicyCommand.js.map +0 -1
- package/dist/cjs/commands/SearchSchemasCommand.js.map +0 -1
- package/dist/cjs/commands/StartDiscovererCommand.js.map +0 -1
- package/dist/cjs/commands/StopDiscovererCommand.js.map +0 -1
- package/dist/cjs/commands/TagResourceCommand.js.map +0 -1
- package/dist/cjs/commands/UntagResourceCommand.js.map +0 -1
- package/dist/cjs/commands/UpdateDiscovererCommand.js.map +0 -1
- package/dist/cjs/commands/UpdateRegistryCommand.js.map +0 -1
- package/dist/cjs/commands/UpdateSchemaCommand.js.map +0 -1
- package/dist/cjs/endpoints.js.map +0 -1
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/models/index.js.map +0 -1
- package/dist/cjs/models/models_0.js.map +0 -1
- package/dist/cjs/package.json +0 -94
- package/dist/cjs/pagination/Interfaces.js.map +0 -1
- package/dist/cjs/pagination/ListDiscoverersPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListRegistriesPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListSchemaVersionsPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListSchemasPaginator.js.map +0 -1
- package/dist/cjs/pagination/SearchSchemasPaginator.js.map +0 -1
- package/dist/cjs/protocols/Aws_restJson1.js.map +0 -1
- package/dist/cjs/runtimeConfig.browser.js.map +0 -1
- package/dist/cjs/runtimeConfig.js.map +0 -1
- package/dist/cjs/runtimeConfig.native.js.map +0 -1
- package/dist/cjs/runtimeConfig.shared.js.map +0 -1
- package/dist/cjs/waiters/waitForCodeBindingExists.js.map +0 -1
- package/dist/es/Schemas.js.map +0 -1
- package/dist/es/SchemasClient.js.map +0 -1
- package/dist/es/commands/CreateDiscovererCommand.js.map +0 -1
- package/dist/es/commands/CreateRegistryCommand.js.map +0 -1
- package/dist/es/commands/CreateSchemaCommand.js.map +0 -1
- package/dist/es/commands/DeleteDiscovererCommand.js.map +0 -1
- package/dist/es/commands/DeleteRegistryCommand.js.map +0 -1
- package/dist/es/commands/DeleteResourcePolicyCommand.js.map +0 -1
- package/dist/es/commands/DeleteSchemaCommand.js.map +0 -1
- package/dist/es/commands/DeleteSchemaVersionCommand.js.map +0 -1
- package/dist/es/commands/DescribeCodeBindingCommand.js.map +0 -1
- package/dist/es/commands/DescribeDiscovererCommand.js.map +0 -1
- package/dist/es/commands/DescribeRegistryCommand.js.map +0 -1
- package/dist/es/commands/DescribeSchemaCommand.js.map +0 -1
- package/dist/es/commands/ExportSchemaCommand.js.map +0 -1
- package/dist/es/commands/GetCodeBindingSourceCommand.js.map +0 -1
- package/dist/es/commands/GetDiscoveredSchemaCommand.js.map +0 -1
- package/dist/es/commands/GetResourcePolicyCommand.js.map +0 -1
- package/dist/es/commands/ListDiscoverersCommand.js.map +0 -1
- package/dist/es/commands/ListRegistriesCommand.js.map +0 -1
- package/dist/es/commands/ListSchemaVersionsCommand.js.map +0 -1
- package/dist/es/commands/ListSchemasCommand.js.map +0 -1
- package/dist/es/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist/es/commands/PutCodeBindingCommand.js.map +0 -1
- package/dist/es/commands/PutResourcePolicyCommand.js.map +0 -1
- package/dist/es/commands/SearchSchemasCommand.js.map +0 -1
- package/dist/es/commands/StartDiscovererCommand.js.map +0 -1
- package/dist/es/commands/StopDiscovererCommand.js.map +0 -1
- package/dist/es/commands/TagResourceCommand.js.map +0 -1
- package/dist/es/commands/UntagResourceCommand.js.map +0 -1
- package/dist/es/commands/UpdateDiscovererCommand.js.map +0 -1
- package/dist/es/commands/UpdateRegistryCommand.js.map +0 -1
- package/dist/es/commands/UpdateSchemaCommand.js.map +0 -1
- package/dist/es/endpoints.js.map +0 -1
- package/dist/es/index.js +0 -42
- package/dist/es/index.js.map +0 -1
- package/dist/es/models/index.js +0 -2
- package/dist/es/models/index.js.map +0 -1
- package/dist/es/models/models_0.js.map +0 -1
- package/dist/es/package.json +0 -94
- package/dist/es/pagination/Interfaces.js +0 -2
- package/dist/es/pagination/Interfaces.js.map +0 -1
- package/dist/es/pagination/ListDiscoverersPaginator.js.map +0 -1
- package/dist/es/pagination/ListRegistriesPaginator.js.map +0 -1
- package/dist/es/pagination/ListSchemaVersionsPaginator.js.map +0 -1
- package/dist/es/pagination/ListSchemasPaginator.js.map +0 -1
- package/dist/es/pagination/SearchSchemasPaginator.js.map +0 -1
- package/dist/es/protocols/Aws_restJson1.js.map +0 -1
- package/dist/es/runtimeConfig.browser.js.map +0 -1
- package/dist/es/runtimeConfig.js.map +0 -1
- package/dist/es/runtimeConfig.native.js.map +0 -1
- package/dist/es/runtimeConfig.shared.js.map +0 -1
- package/dist/es/waiters/waitForCodeBindingExists.js.map +0 -1
- package/dist/types/ts3.4/commands/CreateSchemaCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/DeleteDiscovererCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/DeleteRegistryCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/DeleteResourcePolicyCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/DeleteSchemaCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/DeleteSchemaVersionCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/TagResourceCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/UntagResourceCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/UpdateSchemaCommand.d.ts +0 -35
- package/endpoints.ts +0 -57
- package/jest.config.js +0 -4
- package/models/models_0.ts +0 -1901
- package/pagination/Interfaces.ts +0 -7
- package/pagination/ListDiscoverersPaginator.ts +0 -58
- package/pagination/ListRegistriesPaginator.ts +0 -58
- package/pagination/ListSchemaVersionsPaginator.ts +0 -58
- package/pagination/ListSchemasPaginator.ts +0 -54
- package/pagination/SearchSchemasPaginator.ts +0 -58
- package/protocols/Aws_restJson1.ts +0 -4747
- package/runtimeConfig.browser.ts +0 -40
- package/runtimeConfig.native.ts +0 -16
- package/runtimeConfig.shared.ts +0 -16
- package/runtimeConfig.ts +0 -45
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -31
- package/tsconfig.types.json +0 -8
- package/waiters/waitForCodeBindingExists.ts +0 -65
|
@@ -1,4747 +0,0 @@
|
|
|
1
|
-
import { CreateDiscovererCommandInput, CreateDiscovererCommandOutput } from "../commands/CreateDiscovererCommand";
|
|
2
|
-
import { CreateRegistryCommandInput, CreateRegistryCommandOutput } from "../commands/CreateRegistryCommand";
|
|
3
|
-
import { CreateSchemaCommandInput, CreateSchemaCommandOutput } from "../commands/CreateSchemaCommand";
|
|
4
|
-
import { DeleteDiscovererCommandInput, DeleteDiscovererCommandOutput } from "../commands/DeleteDiscovererCommand";
|
|
5
|
-
import { DeleteRegistryCommandInput, DeleteRegistryCommandOutput } from "../commands/DeleteRegistryCommand";
|
|
6
|
-
import {
|
|
7
|
-
DeleteResourcePolicyCommandInput,
|
|
8
|
-
DeleteResourcePolicyCommandOutput,
|
|
9
|
-
} from "../commands/DeleteResourcePolicyCommand";
|
|
10
|
-
import { DeleteSchemaCommandInput, DeleteSchemaCommandOutput } from "../commands/DeleteSchemaCommand";
|
|
11
|
-
import {
|
|
12
|
-
DeleteSchemaVersionCommandInput,
|
|
13
|
-
DeleteSchemaVersionCommandOutput,
|
|
14
|
-
} from "../commands/DeleteSchemaVersionCommand";
|
|
15
|
-
import {
|
|
16
|
-
DescribeCodeBindingCommandInput,
|
|
17
|
-
DescribeCodeBindingCommandOutput,
|
|
18
|
-
} from "../commands/DescribeCodeBindingCommand";
|
|
19
|
-
import { DescribeDiscovererCommandInput, DescribeDiscovererCommandOutput } from "../commands/DescribeDiscovererCommand";
|
|
20
|
-
import { DescribeRegistryCommandInput, DescribeRegistryCommandOutput } from "../commands/DescribeRegistryCommand";
|
|
21
|
-
import { DescribeSchemaCommandInput, DescribeSchemaCommandOutput } from "../commands/DescribeSchemaCommand";
|
|
22
|
-
import { ExportSchemaCommandInput, ExportSchemaCommandOutput } from "../commands/ExportSchemaCommand";
|
|
23
|
-
import {
|
|
24
|
-
GetCodeBindingSourceCommandInput,
|
|
25
|
-
GetCodeBindingSourceCommandOutput,
|
|
26
|
-
} from "../commands/GetCodeBindingSourceCommand";
|
|
27
|
-
import {
|
|
28
|
-
GetDiscoveredSchemaCommandInput,
|
|
29
|
-
GetDiscoveredSchemaCommandOutput,
|
|
30
|
-
} from "../commands/GetDiscoveredSchemaCommand";
|
|
31
|
-
import { GetResourcePolicyCommandInput, GetResourcePolicyCommandOutput } from "../commands/GetResourcePolicyCommand";
|
|
32
|
-
import { ListDiscoverersCommandInput, ListDiscoverersCommandOutput } from "../commands/ListDiscoverersCommand";
|
|
33
|
-
import { ListRegistriesCommandInput, ListRegistriesCommandOutput } from "../commands/ListRegistriesCommand";
|
|
34
|
-
import { ListSchemaVersionsCommandInput, ListSchemaVersionsCommandOutput } from "../commands/ListSchemaVersionsCommand";
|
|
35
|
-
import { ListSchemasCommandInput, ListSchemasCommandOutput } from "../commands/ListSchemasCommand";
|
|
36
|
-
import {
|
|
37
|
-
ListTagsForResourceCommandInput,
|
|
38
|
-
ListTagsForResourceCommandOutput,
|
|
39
|
-
} from "../commands/ListTagsForResourceCommand";
|
|
40
|
-
import { PutCodeBindingCommandInput, PutCodeBindingCommandOutput } from "../commands/PutCodeBindingCommand";
|
|
41
|
-
import { PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput } from "../commands/PutResourcePolicyCommand";
|
|
42
|
-
import { SearchSchemasCommandInput, SearchSchemasCommandOutput } from "../commands/SearchSchemasCommand";
|
|
43
|
-
import { StartDiscovererCommandInput, StartDiscovererCommandOutput } from "../commands/StartDiscovererCommand";
|
|
44
|
-
import { StopDiscovererCommandInput, StopDiscovererCommandOutput } from "../commands/StopDiscovererCommand";
|
|
45
|
-
import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
|
|
46
|
-
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
|
|
47
|
-
import { UpdateDiscovererCommandInput, UpdateDiscovererCommandOutput } from "../commands/UpdateDiscovererCommand";
|
|
48
|
-
import { UpdateRegistryCommandInput, UpdateRegistryCommandOutput } from "../commands/UpdateRegistryCommand";
|
|
49
|
-
import { UpdateSchemaCommandInput, UpdateSchemaCommandOutput } from "../commands/UpdateSchemaCommand";
|
|
50
|
-
import {
|
|
51
|
-
BadRequestException,
|
|
52
|
-
ConflictException,
|
|
53
|
-
DiscovererSummary,
|
|
54
|
-
ForbiddenException,
|
|
55
|
-
GoneException,
|
|
56
|
-
InternalServerErrorException,
|
|
57
|
-
NotFoundException,
|
|
58
|
-
PreconditionFailedException,
|
|
59
|
-
RegistrySummary,
|
|
60
|
-
SchemaSummary,
|
|
61
|
-
SchemaVersionSummary,
|
|
62
|
-
SearchSchemaSummary,
|
|
63
|
-
SearchSchemaVersionSummary,
|
|
64
|
-
ServiceUnavailableException,
|
|
65
|
-
TooManyRequestsException,
|
|
66
|
-
UnauthorizedException,
|
|
67
|
-
} from "../models/models_0";
|
|
68
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
69
|
-
import {
|
|
70
|
-
LazyJsonString as __LazyJsonString,
|
|
71
|
-
expectBoolean as __expectBoolean,
|
|
72
|
-
expectLong as __expectLong,
|
|
73
|
-
expectNonNull as __expectNonNull,
|
|
74
|
-
expectObject as __expectObject,
|
|
75
|
-
expectString as __expectString,
|
|
76
|
-
extendedEncodeURIComponent as __extendedEncodeURIComponent,
|
|
77
|
-
parseRfc3339DateTime as __parseRfc3339DateTime,
|
|
78
|
-
} from "@aws-sdk/smithy-client";
|
|
79
|
-
import {
|
|
80
|
-
Endpoint as __Endpoint,
|
|
81
|
-
MetadataBearer as __MetadataBearer,
|
|
82
|
-
ResponseMetadata as __ResponseMetadata,
|
|
83
|
-
SerdeContext as __SerdeContext,
|
|
84
|
-
SmithyException as __SmithyException,
|
|
85
|
-
} from "@aws-sdk/types";
|
|
86
|
-
import { v4 as generateIdempotencyToken } from "uuid";
|
|
87
|
-
|
|
88
|
-
export const serializeAws_restJson1CreateDiscovererCommand = async (
|
|
89
|
-
input: CreateDiscovererCommandInput,
|
|
90
|
-
context: __SerdeContext
|
|
91
|
-
): Promise<__HttpRequest> => {
|
|
92
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
93
|
-
const headers: any = {
|
|
94
|
-
"content-type": "application/json",
|
|
95
|
-
};
|
|
96
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/discoverers";
|
|
97
|
-
let body: any;
|
|
98
|
-
body = JSON.stringify({
|
|
99
|
-
...(input.CrossAccount !== undefined && input.CrossAccount !== null && { CrossAccount: input.CrossAccount }),
|
|
100
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
101
|
-
...(input.SourceArn !== undefined && input.SourceArn !== null && { SourceArn: input.SourceArn }),
|
|
102
|
-
...(input.Tags !== undefined && input.Tags !== null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
|
|
103
|
-
});
|
|
104
|
-
return new __HttpRequest({
|
|
105
|
-
protocol,
|
|
106
|
-
hostname,
|
|
107
|
-
port,
|
|
108
|
-
method: "POST",
|
|
109
|
-
headers,
|
|
110
|
-
path: resolvedPath,
|
|
111
|
-
body,
|
|
112
|
-
});
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
export const serializeAws_restJson1CreateRegistryCommand = async (
|
|
116
|
-
input: CreateRegistryCommandInput,
|
|
117
|
-
context: __SerdeContext
|
|
118
|
-
): Promise<__HttpRequest> => {
|
|
119
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
120
|
-
const headers: any = {
|
|
121
|
-
"content-type": "application/json",
|
|
122
|
-
};
|
|
123
|
-
let resolvedPath =
|
|
124
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/registries/name/{RegistryName}";
|
|
125
|
-
if (input.RegistryName !== undefined) {
|
|
126
|
-
const labelValue: string = input.RegistryName;
|
|
127
|
-
if (labelValue.length <= 0) {
|
|
128
|
-
throw new Error("Empty value provided for input HTTP label: RegistryName.");
|
|
129
|
-
}
|
|
130
|
-
resolvedPath = resolvedPath.replace("{RegistryName}", __extendedEncodeURIComponent(labelValue));
|
|
131
|
-
} else {
|
|
132
|
-
throw new Error("No value provided for input HTTP label: RegistryName.");
|
|
133
|
-
}
|
|
134
|
-
let body: any;
|
|
135
|
-
body = JSON.stringify({
|
|
136
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
137
|
-
...(input.Tags !== undefined && input.Tags !== null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
|
|
138
|
-
});
|
|
139
|
-
return new __HttpRequest({
|
|
140
|
-
protocol,
|
|
141
|
-
hostname,
|
|
142
|
-
port,
|
|
143
|
-
method: "POST",
|
|
144
|
-
headers,
|
|
145
|
-
path: resolvedPath,
|
|
146
|
-
body,
|
|
147
|
-
});
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
export const serializeAws_restJson1CreateSchemaCommand = async (
|
|
151
|
-
input: CreateSchemaCommandInput,
|
|
152
|
-
context: __SerdeContext
|
|
153
|
-
): Promise<__HttpRequest> => {
|
|
154
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
155
|
-
const headers: any = {
|
|
156
|
-
"content-type": "application/json",
|
|
157
|
-
};
|
|
158
|
-
let resolvedPath =
|
|
159
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
160
|
-
"/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}";
|
|
161
|
-
if (input.RegistryName !== undefined) {
|
|
162
|
-
const labelValue: string = input.RegistryName;
|
|
163
|
-
if (labelValue.length <= 0) {
|
|
164
|
-
throw new Error("Empty value provided for input HTTP label: RegistryName.");
|
|
165
|
-
}
|
|
166
|
-
resolvedPath = resolvedPath.replace("{RegistryName}", __extendedEncodeURIComponent(labelValue));
|
|
167
|
-
} else {
|
|
168
|
-
throw new Error("No value provided for input HTTP label: RegistryName.");
|
|
169
|
-
}
|
|
170
|
-
if (input.SchemaName !== undefined) {
|
|
171
|
-
const labelValue: string = input.SchemaName;
|
|
172
|
-
if (labelValue.length <= 0) {
|
|
173
|
-
throw new Error("Empty value provided for input HTTP label: SchemaName.");
|
|
174
|
-
}
|
|
175
|
-
resolvedPath = resolvedPath.replace("{SchemaName}", __extendedEncodeURIComponent(labelValue));
|
|
176
|
-
} else {
|
|
177
|
-
throw new Error("No value provided for input HTTP label: SchemaName.");
|
|
178
|
-
}
|
|
179
|
-
let body: any;
|
|
180
|
-
body = JSON.stringify({
|
|
181
|
-
...(input.Content !== undefined && input.Content !== null && { Content: input.Content }),
|
|
182
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
183
|
-
...(input.Tags !== undefined && input.Tags !== null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
|
|
184
|
-
...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
|
|
185
|
-
});
|
|
186
|
-
return new __HttpRequest({
|
|
187
|
-
protocol,
|
|
188
|
-
hostname,
|
|
189
|
-
port,
|
|
190
|
-
method: "POST",
|
|
191
|
-
headers,
|
|
192
|
-
path: resolvedPath,
|
|
193
|
-
body,
|
|
194
|
-
});
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
export const serializeAws_restJson1DeleteDiscovererCommand = async (
|
|
198
|
-
input: DeleteDiscovererCommandInput,
|
|
199
|
-
context: __SerdeContext
|
|
200
|
-
): Promise<__HttpRequest> => {
|
|
201
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
202
|
-
const headers: any = {};
|
|
203
|
-
let resolvedPath =
|
|
204
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/discoverers/id/{DiscovererId}";
|
|
205
|
-
if (input.DiscovererId !== undefined) {
|
|
206
|
-
const labelValue: string = input.DiscovererId;
|
|
207
|
-
if (labelValue.length <= 0) {
|
|
208
|
-
throw new Error("Empty value provided for input HTTP label: DiscovererId.");
|
|
209
|
-
}
|
|
210
|
-
resolvedPath = resolvedPath.replace("{DiscovererId}", __extendedEncodeURIComponent(labelValue));
|
|
211
|
-
} else {
|
|
212
|
-
throw new Error("No value provided for input HTTP label: DiscovererId.");
|
|
213
|
-
}
|
|
214
|
-
let body: any;
|
|
215
|
-
return new __HttpRequest({
|
|
216
|
-
protocol,
|
|
217
|
-
hostname,
|
|
218
|
-
port,
|
|
219
|
-
method: "DELETE",
|
|
220
|
-
headers,
|
|
221
|
-
path: resolvedPath,
|
|
222
|
-
body,
|
|
223
|
-
});
|
|
224
|
-
};
|
|
225
|
-
|
|
226
|
-
export const serializeAws_restJson1DeleteRegistryCommand = async (
|
|
227
|
-
input: DeleteRegistryCommandInput,
|
|
228
|
-
context: __SerdeContext
|
|
229
|
-
): Promise<__HttpRequest> => {
|
|
230
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
231
|
-
const headers: any = {};
|
|
232
|
-
let resolvedPath =
|
|
233
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/registries/name/{RegistryName}";
|
|
234
|
-
if (input.RegistryName !== undefined) {
|
|
235
|
-
const labelValue: string = input.RegistryName;
|
|
236
|
-
if (labelValue.length <= 0) {
|
|
237
|
-
throw new Error("Empty value provided for input HTTP label: RegistryName.");
|
|
238
|
-
}
|
|
239
|
-
resolvedPath = resolvedPath.replace("{RegistryName}", __extendedEncodeURIComponent(labelValue));
|
|
240
|
-
} else {
|
|
241
|
-
throw new Error("No value provided for input HTTP label: RegistryName.");
|
|
242
|
-
}
|
|
243
|
-
let body: any;
|
|
244
|
-
return new __HttpRequest({
|
|
245
|
-
protocol,
|
|
246
|
-
hostname,
|
|
247
|
-
port,
|
|
248
|
-
method: "DELETE",
|
|
249
|
-
headers,
|
|
250
|
-
path: resolvedPath,
|
|
251
|
-
body,
|
|
252
|
-
});
|
|
253
|
-
};
|
|
254
|
-
|
|
255
|
-
export const serializeAws_restJson1DeleteResourcePolicyCommand = async (
|
|
256
|
-
input: DeleteResourcePolicyCommandInput,
|
|
257
|
-
context: __SerdeContext
|
|
258
|
-
): Promise<__HttpRequest> => {
|
|
259
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
260
|
-
const headers: any = {};
|
|
261
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/policy";
|
|
262
|
-
const query: any = {
|
|
263
|
-
...(input.RegistryName !== undefined && { registryName: input.RegistryName }),
|
|
264
|
-
};
|
|
265
|
-
let body: any;
|
|
266
|
-
return new __HttpRequest({
|
|
267
|
-
protocol,
|
|
268
|
-
hostname,
|
|
269
|
-
port,
|
|
270
|
-
method: "DELETE",
|
|
271
|
-
headers,
|
|
272
|
-
path: resolvedPath,
|
|
273
|
-
query,
|
|
274
|
-
body,
|
|
275
|
-
});
|
|
276
|
-
};
|
|
277
|
-
|
|
278
|
-
export const serializeAws_restJson1DeleteSchemaCommand = async (
|
|
279
|
-
input: DeleteSchemaCommandInput,
|
|
280
|
-
context: __SerdeContext
|
|
281
|
-
): Promise<__HttpRequest> => {
|
|
282
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
283
|
-
const headers: any = {};
|
|
284
|
-
let resolvedPath =
|
|
285
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
286
|
-
"/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}";
|
|
287
|
-
if (input.RegistryName !== undefined) {
|
|
288
|
-
const labelValue: string = input.RegistryName;
|
|
289
|
-
if (labelValue.length <= 0) {
|
|
290
|
-
throw new Error("Empty value provided for input HTTP label: RegistryName.");
|
|
291
|
-
}
|
|
292
|
-
resolvedPath = resolvedPath.replace("{RegistryName}", __extendedEncodeURIComponent(labelValue));
|
|
293
|
-
} else {
|
|
294
|
-
throw new Error("No value provided for input HTTP label: RegistryName.");
|
|
295
|
-
}
|
|
296
|
-
if (input.SchemaName !== undefined) {
|
|
297
|
-
const labelValue: string = input.SchemaName;
|
|
298
|
-
if (labelValue.length <= 0) {
|
|
299
|
-
throw new Error("Empty value provided for input HTTP label: SchemaName.");
|
|
300
|
-
}
|
|
301
|
-
resolvedPath = resolvedPath.replace("{SchemaName}", __extendedEncodeURIComponent(labelValue));
|
|
302
|
-
} else {
|
|
303
|
-
throw new Error("No value provided for input HTTP label: SchemaName.");
|
|
304
|
-
}
|
|
305
|
-
let body: any;
|
|
306
|
-
return new __HttpRequest({
|
|
307
|
-
protocol,
|
|
308
|
-
hostname,
|
|
309
|
-
port,
|
|
310
|
-
method: "DELETE",
|
|
311
|
-
headers,
|
|
312
|
-
path: resolvedPath,
|
|
313
|
-
body,
|
|
314
|
-
});
|
|
315
|
-
};
|
|
316
|
-
|
|
317
|
-
export const serializeAws_restJson1DeleteSchemaVersionCommand = async (
|
|
318
|
-
input: DeleteSchemaVersionCommandInput,
|
|
319
|
-
context: __SerdeContext
|
|
320
|
-
): Promise<__HttpRequest> => {
|
|
321
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
322
|
-
const headers: any = {};
|
|
323
|
-
let resolvedPath =
|
|
324
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
325
|
-
"/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/version/{SchemaVersion}";
|
|
326
|
-
if (input.RegistryName !== undefined) {
|
|
327
|
-
const labelValue: string = input.RegistryName;
|
|
328
|
-
if (labelValue.length <= 0) {
|
|
329
|
-
throw new Error("Empty value provided for input HTTP label: RegistryName.");
|
|
330
|
-
}
|
|
331
|
-
resolvedPath = resolvedPath.replace("{RegistryName}", __extendedEncodeURIComponent(labelValue));
|
|
332
|
-
} else {
|
|
333
|
-
throw new Error("No value provided for input HTTP label: RegistryName.");
|
|
334
|
-
}
|
|
335
|
-
if (input.SchemaName !== undefined) {
|
|
336
|
-
const labelValue: string = input.SchemaName;
|
|
337
|
-
if (labelValue.length <= 0) {
|
|
338
|
-
throw new Error("Empty value provided for input HTTP label: SchemaName.");
|
|
339
|
-
}
|
|
340
|
-
resolvedPath = resolvedPath.replace("{SchemaName}", __extendedEncodeURIComponent(labelValue));
|
|
341
|
-
} else {
|
|
342
|
-
throw new Error("No value provided for input HTTP label: SchemaName.");
|
|
343
|
-
}
|
|
344
|
-
if (input.SchemaVersion !== undefined) {
|
|
345
|
-
const labelValue: string = input.SchemaVersion;
|
|
346
|
-
if (labelValue.length <= 0) {
|
|
347
|
-
throw new Error("Empty value provided for input HTTP label: SchemaVersion.");
|
|
348
|
-
}
|
|
349
|
-
resolvedPath = resolvedPath.replace("{SchemaVersion}", __extendedEncodeURIComponent(labelValue));
|
|
350
|
-
} else {
|
|
351
|
-
throw new Error("No value provided for input HTTP label: SchemaVersion.");
|
|
352
|
-
}
|
|
353
|
-
let body: any;
|
|
354
|
-
return new __HttpRequest({
|
|
355
|
-
protocol,
|
|
356
|
-
hostname,
|
|
357
|
-
port,
|
|
358
|
-
method: "DELETE",
|
|
359
|
-
headers,
|
|
360
|
-
path: resolvedPath,
|
|
361
|
-
body,
|
|
362
|
-
});
|
|
363
|
-
};
|
|
364
|
-
|
|
365
|
-
export const serializeAws_restJson1DescribeCodeBindingCommand = async (
|
|
366
|
-
input: DescribeCodeBindingCommandInput,
|
|
367
|
-
context: __SerdeContext
|
|
368
|
-
): Promise<__HttpRequest> => {
|
|
369
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
370
|
-
const headers: any = {};
|
|
371
|
-
let resolvedPath =
|
|
372
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
373
|
-
"/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/language/{Language}";
|
|
374
|
-
if (input.Language !== undefined) {
|
|
375
|
-
const labelValue: string = input.Language;
|
|
376
|
-
if (labelValue.length <= 0) {
|
|
377
|
-
throw new Error("Empty value provided for input HTTP label: Language.");
|
|
378
|
-
}
|
|
379
|
-
resolvedPath = resolvedPath.replace("{Language}", __extendedEncodeURIComponent(labelValue));
|
|
380
|
-
} else {
|
|
381
|
-
throw new Error("No value provided for input HTTP label: Language.");
|
|
382
|
-
}
|
|
383
|
-
if (input.RegistryName !== undefined) {
|
|
384
|
-
const labelValue: string = input.RegistryName;
|
|
385
|
-
if (labelValue.length <= 0) {
|
|
386
|
-
throw new Error("Empty value provided for input HTTP label: RegistryName.");
|
|
387
|
-
}
|
|
388
|
-
resolvedPath = resolvedPath.replace("{RegistryName}", __extendedEncodeURIComponent(labelValue));
|
|
389
|
-
} else {
|
|
390
|
-
throw new Error("No value provided for input HTTP label: RegistryName.");
|
|
391
|
-
}
|
|
392
|
-
if (input.SchemaName !== undefined) {
|
|
393
|
-
const labelValue: string = input.SchemaName;
|
|
394
|
-
if (labelValue.length <= 0) {
|
|
395
|
-
throw new Error("Empty value provided for input HTTP label: SchemaName.");
|
|
396
|
-
}
|
|
397
|
-
resolvedPath = resolvedPath.replace("{SchemaName}", __extendedEncodeURIComponent(labelValue));
|
|
398
|
-
} else {
|
|
399
|
-
throw new Error("No value provided for input HTTP label: SchemaName.");
|
|
400
|
-
}
|
|
401
|
-
const query: any = {
|
|
402
|
-
...(input.SchemaVersion !== undefined && { schemaVersion: input.SchemaVersion }),
|
|
403
|
-
};
|
|
404
|
-
let body: any;
|
|
405
|
-
return new __HttpRequest({
|
|
406
|
-
protocol,
|
|
407
|
-
hostname,
|
|
408
|
-
port,
|
|
409
|
-
method: "GET",
|
|
410
|
-
headers,
|
|
411
|
-
path: resolvedPath,
|
|
412
|
-
query,
|
|
413
|
-
body,
|
|
414
|
-
});
|
|
415
|
-
};
|
|
416
|
-
|
|
417
|
-
export const serializeAws_restJson1DescribeDiscovererCommand = async (
|
|
418
|
-
input: DescribeDiscovererCommandInput,
|
|
419
|
-
context: __SerdeContext
|
|
420
|
-
): Promise<__HttpRequest> => {
|
|
421
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
422
|
-
const headers: any = {};
|
|
423
|
-
let resolvedPath =
|
|
424
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/discoverers/id/{DiscovererId}";
|
|
425
|
-
if (input.DiscovererId !== undefined) {
|
|
426
|
-
const labelValue: string = input.DiscovererId;
|
|
427
|
-
if (labelValue.length <= 0) {
|
|
428
|
-
throw new Error("Empty value provided for input HTTP label: DiscovererId.");
|
|
429
|
-
}
|
|
430
|
-
resolvedPath = resolvedPath.replace("{DiscovererId}", __extendedEncodeURIComponent(labelValue));
|
|
431
|
-
} else {
|
|
432
|
-
throw new Error("No value provided for input HTTP label: DiscovererId.");
|
|
433
|
-
}
|
|
434
|
-
let body: any;
|
|
435
|
-
return new __HttpRequest({
|
|
436
|
-
protocol,
|
|
437
|
-
hostname,
|
|
438
|
-
port,
|
|
439
|
-
method: "GET",
|
|
440
|
-
headers,
|
|
441
|
-
path: resolvedPath,
|
|
442
|
-
body,
|
|
443
|
-
});
|
|
444
|
-
};
|
|
445
|
-
|
|
446
|
-
export const serializeAws_restJson1DescribeRegistryCommand = async (
|
|
447
|
-
input: DescribeRegistryCommandInput,
|
|
448
|
-
context: __SerdeContext
|
|
449
|
-
): Promise<__HttpRequest> => {
|
|
450
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
451
|
-
const headers: any = {};
|
|
452
|
-
let resolvedPath =
|
|
453
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/registries/name/{RegistryName}";
|
|
454
|
-
if (input.RegistryName !== undefined) {
|
|
455
|
-
const labelValue: string = input.RegistryName;
|
|
456
|
-
if (labelValue.length <= 0) {
|
|
457
|
-
throw new Error("Empty value provided for input HTTP label: RegistryName.");
|
|
458
|
-
}
|
|
459
|
-
resolvedPath = resolvedPath.replace("{RegistryName}", __extendedEncodeURIComponent(labelValue));
|
|
460
|
-
} else {
|
|
461
|
-
throw new Error("No value provided for input HTTP label: RegistryName.");
|
|
462
|
-
}
|
|
463
|
-
let body: any;
|
|
464
|
-
return new __HttpRequest({
|
|
465
|
-
protocol,
|
|
466
|
-
hostname,
|
|
467
|
-
port,
|
|
468
|
-
method: "GET",
|
|
469
|
-
headers,
|
|
470
|
-
path: resolvedPath,
|
|
471
|
-
body,
|
|
472
|
-
});
|
|
473
|
-
};
|
|
474
|
-
|
|
475
|
-
export const serializeAws_restJson1DescribeSchemaCommand = async (
|
|
476
|
-
input: DescribeSchemaCommandInput,
|
|
477
|
-
context: __SerdeContext
|
|
478
|
-
): Promise<__HttpRequest> => {
|
|
479
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
480
|
-
const headers: any = {};
|
|
481
|
-
let resolvedPath =
|
|
482
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
483
|
-
"/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}";
|
|
484
|
-
if (input.RegistryName !== undefined) {
|
|
485
|
-
const labelValue: string = input.RegistryName;
|
|
486
|
-
if (labelValue.length <= 0) {
|
|
487
|
-
throw new Error("Empty value provided for input HTTP label: RegistryName.");
|
|
488
|
-
}
|
|
489
|
-
resolvedPath = resolvedPath.replace("{RegistryName}", __extendedEncodeURIComponent(labelValue));
|
|
490
|
-
} else {
|
|
491
|
-
throw new Error("No value provided for input HTTP label: RegistryName.");
|
|
492
|
-
}
|
|
493
|
-
if (input.SchemaName !== undefined) {
|
|
494
|
-
const labelValue: string = input.SchemaName;
|
|
495
|
-
if (labelValue.length <= 0) {
|
|
496
|
-
throw new Error("Empty value provided for input HTTP label: SchemaName.");
|
|
497
|
-
}
|
|
498
|
-
resolvedPath = resolvedPath.replace("{SchemaName}", __extendedEncodeURIComponent(labelValue));
|
|
499
|
-
} else {
|
|
500
|
-
throw new Error("No value provided for input HTTP label: SchemaName.");
|
|
501
|
-
}
|
|
502
|
-
const query: any = {
|
|
503
|
-
...(input.SchemaVersion !== undefined && { schemaVersion: input.SchemaVersion }),
|
|
504
|
-
};
|
|
505
|
-
let body: any;
|
|
506
|
-
return new __HttpRequest({
|
|
507
|
-
protocol,
|
|
508
|
-
hostname,
|
|
509
|
-
port,
|
|
510
|
-
method: "GET",
|
|
511
|
-
headers,
|
|
512
|
-
path: resolvedPath,
|
|
513
|
-
query,
|
|
514
|
-
body,
|
|
515
|
-
});
|
|
516
|
-
};
|
|
517
|
-
|
|
518
|
-
export const serializeAws_restJson1ExportSchemaCommand = async (
|
|
519
|
-
input: ExportSchemaCommandInput,
|
|
520
|
-
context: __SerdeContext
|
|
521
|
-
): Promise<__HttpRequest> => {
|
|
522
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
523
|
-
const headers: any = {};
|
|
524
|
-
let resolvedPath =
|
|
525
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
526
|
-
"/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/export";
|
|
527
|
-
if (input.RegistryName !== undefined) {
|
|
528
|
-
const labelValue: string = input.RegistryName;
|
|
529
|
-
if (labelValue.length <= 0) {
|
|
530
|
-
throw new Error("Empty value provided for input HTTP label: RegistryName.");
|
|
531
|
-
}
|
|
532
|
-
resolvedPath = resolvedPath.replace("{RegistryName}", __extendedEncodeURIComponent(labelValue));
|
|
533
|
-
} else {
|
|
534
|
-
throw new Error("No value provided for input HTTP label: RegistryName.");
|
|
535
|
-
}
|
|
536
|
-
if (input.SchemaName !== undefined) {
|
|
537
|
-
const labelValue: string = input.SchemaName;
|
|
538
|
-
if (labelValue.length <= 0) {
|
|
539
|
-
throw new Error("Empty value provided for input HTTP label: SchemaName.");
|
|
540
|
-
}
|
|
541
|
-
resolvedPath = resolvedPath.replace("{SchemaName}", __extendedEncodeURIComponent(labelValue));
|
|
542
|
-
} else {
|
|
543
|
-
throw new Error("No value provided for input HTTP label: SchemaName.");
|
|
544
|
-
}
|
|
545
|
-
const query: any = {
|
|
546
|
-
...(input.SchemaVersion !== undefined && { schemaVersion: input.SchemaVersion }),
|
|
547
|
-
...(input.Type !== undefined && { type: input.Type }),
|
|
548
|
-
};
|
|
549
|
-
let body: any;
|
|
550
|
-
return new __HttpRequest({
|
|
551
|
-
protocol,
|
|
552
|
-
hostname,
|
|
553
|
-
port,
|
|
554
|
-
method: "GET",
|
|
555
|
-
headers,
|
|
556
|
-
path: resolvedPath,
|
|
557
|
-
query,
|
|
558
|
-
body,
|
|
559
|
-
});
|
|
560
|
-
};
|
|
561
|
-
|
|
562
|
-
export const serializeAws_restJson1GetCodeBindingSourceCommand = async (
|
|
563
|
-
input: GetCodeBindingSourceCommandInput,
|
|
564
|
-
context: __SerdeContext
|
|
565
|
-
): Promise<__HttpRequest> => {
|
|
566
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
567
|
-
const headers: any = {};
|
|
568
|
-
let resolvedPath =
|
|
569
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
570
|
-
"/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/language/{Language}/source";
|
|
571
|
-
if (input.Language !== undefined) {
|
|
572
|
-
const labelValue: string = input.Language;
|
|
573
|
-
if (labelValue.length <= 0) {
|
|
574
|
-
throw new Error("Empty value provided for input HTTP label: Language.");
|
|
575
|
-
}
|
|
576
|
-
resolvedPath = resolvedPath.replace("{Language}", __extendedEncodeURIComponent(labelValue));
|
|
577
|
-
} else {
|
|
578
|
-
throw new Error("No value provided for input HTTP label: Language.");
|
|
579
|
-
}
|
|
580
|
-
if (input.RegistryName !== undefined) {
|
|
581
|
-
const labelValue: string = input.RegistryName;
|
|
582
|
-
if (labelValue.length <= 0) {
|
|
583
|
-
throw new Error("Empty value provided for input HTTP label: RegistryName.");
|
|
584
|
-
}
|
|
585
|
-
resolvedPath = resolvedPath.replace("{RegistryName}", __extendedEncodeURIComponent(labelValue));
|
|
586
|
-
} else {
|
|
587
|
-
throw new Error("No value provided for input HTTP label: RegistryName.");
|
|
588
|
-
}
|
|
589
|
-
if (input.SchemaName !== undefined) {
|
|
590
|
-
const labelValue: string = input.SchemaName;
|
|
591
|
-
if (labelValue.length <= 0) {
|
|
592
|
-
throw new Error("Empty value provided for input HTTP label: SchemaName.");
|
|
593
|
-
}
|
|
594
|
-
resolvedPath = resolvedPath.replace("{SchemaName}", __extendedEncodeURIComponent(labelValue));
|
|
595
|
-
} else {
|
|
596
|
-
throw new Error("No value provided for input HTTP label: SchemaName.");
|
|
597
|
-
}
|
|
598
|
-
const query: any = {
|
|
599
|
-
...(input.SchemaVersion !== undefined && { schemaVersion: input.SchemaVersion }),
|
|
600
|
-
};
|
|
601
|
-
let body: any;
|
|
602
|
-
return new __HttpRequest({
|
|
603
|
-
protocol,
|
|
604
|
-
hostname,
|
|
605
|
-
port,
|
|
606
|
-
method: "GET",
|
|
607
|
-
headers,
|
|
608
|
-
path: resolvedPath,
|
|
609
|
-
query,
|
|
610
|
-
body,
|
|
611
|
-
});
|
|
612
|
-
};
|
|
613
|
-
|
|
614
|
-
export const serializeAws_restJson1GetDiscoveredSchemaCommand = async (
|
|
615
|
-
input: GetDiscoveredSchemaCommandInput,
|
|
616
|
-
context: __SerdeContext
|
|
617
|
-
): Promise<__HttpRequest> => {
|
|
618
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
619
|
-
const headers: any = {
|
|
620
|
-
"content-type": "application/json",
|
|
621
|
-
};
|
|
622
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/discover";
|
|
623
|
-
let body: any;
|
|
624
|
-
body = JSON.stringify({
|
|
625
|
-
...(input.Events !== undefined &&
|
|
626
|
-
input.Events !== null && {
|
|
627
|
-
Events: serializeAws_restJson1__listOfGetDiscoveredSchemaVersionItemInput(input.Events, context),
|
|
628
|
-
}),
|
|
629
|
-
...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
|
|
630
|
-
});
|
|
631
|
-
return new __HttpRequest({
|
|
632
|
-
protocol,
|
|
633
|
-
hostname,
|
|
634
|
-
port,
|
|
635
|
-
method: "POST",
|
|
636
|
-
headers,
|
|
637
|
-
path: resolvedPath,
|
|
638
|
-
body,
|
|
639
|
-
});
|
|
640
|
-
};
|
|
641
|
-
|
|
642
|
-
export const serializeAws_restJson1GetResourcePolicyCommand = async (
|
|
643
|
-
input: GetResourcePolicyCommandInput,
|
|
644
|
-
context: __SerdeContext
|
|
645
|
-
): Promise<__HttpRequest> => {
|
|
646
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
647
|
-
const headers: any = {};
|
|
648
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/policy";
|
|
649
|
-
const query: any = {
|
|
650
|
-
...(input.RegistryName !== undefined && { registryName: input.RegistryName }),
|
|
651
|
-
};
|
|
652
|
-
let body: any;
|
|
653
|
-
return new __HttpRequest({
|
|
654
|
-
protocol,
|
|
655
|
-
hostname,
|
|
656
|
-
port,
|
|
657
|
-
method: "GET",
|
|
658
|
-
headers,
|
|
659
|
-
path: resolvedPath,
|
|
660
|
-
query,
|
|
661
|
-
body,
|
|
662
|
-
});
|
|
663
|
-
};
|
|
664
|
-
|
|
665
|
-
export const serializeAws_restJson1ListDiscoverersCommand = async (
|
|
666
|
-
input: ListDiscoverersCommandInput,
|
|
667
|
-
context: __SerdeContext
|
|
668
|
-
): Promise<__HttpRequest> => {
|
|
669
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
670
|
-
const headers: any = {};
|
|
671
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/discoverers";
|
|
672
|
-
const query: any = {
|
|
673
|
-
...(input.DiscovererIdPrefix !== undefined && { discovererIdPrefix: input.DiscovererIdPrefix }),
|
|
674
|
-
...(input.Limit !== undefined && { limit: input.Limit.toString() }),
|
|
675
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
676
|
-
...(input.SourceArnPrefix !== undefined && { sourceArnPrefix: input.SourceArnPrefix }),
|
|
677
|
-
};
|
|
678
|
-
let body: any;
|
|
679
|
-
return new __HttpRequest({
|
|
680
|
-
protocol,
|
|
681
|
-
hostname,
|
|
682
|
-
port,
|
|
683
|
-
method: "GET",
|
|
684
|
-
headers,
|
|
685
|
-
path: resolvedPath,
|
|
686
|
-
query,
|
|
687
|
-
body,
|
|
688
|
-
});
|
|
689
|
-
};
|
|
690
|
-
|
|
691
|
-
export const serializeAws_restJson1ListRegistriesCommand = async (
|
|
692
|
-
input: ListRegistriesCommandInput,
|
|
693
|
-
context: __SerdeContext
|
|
694
|
-
): Promise<__HttpRequest> => {
|
|
695
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
696
|
-
const headers: any = {};
|
|
697
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/registries";
|
|
698
|
-
const query: any = {
|
|
699
|
-
...(input.Limit !== undefined && { limit: input.Limit.toString() }),
|
|
700
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
701
|
-
...(input.RegistryNamePrefix !== undefined && { registryNamePrefix: input.RegistryNamePrefix }),
|
|
702
|
-
...(input.Scope !== undefined && { scope: input.Scope }),
|
|
703
|
-
};
|
|
704
|
-
let body: any;
|
|
705
|
-
return new __HttpRequest({
|
|
706
|
-
protocol,
|
|
707
|
-
hostname,
|
|
708
|
-
port,
|
|
709
|
-
method: "GET",
|
|
710
|
-
headers,
|
|
711
|
-
path: resolvedPath,
|
|
712
|
-
query,
|
|
713
|
-
body,
|
|
714
|
-
});
|
|
715
|
-
};
|
|
716
|
-
|
|
717
|
-
export const serializeAws_restJson1ListSchemasCommand = async (
|
|
718
|
-
input: ListSchemasCommandInput,
|
|
719
|
-
context: __SerdeContext
|
|
720
|
-
): Promise<__HttpRequest> => {
|
|
721
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
722
|
-
const headers: any = {};
|
|
723
|
-
let resolvedPath =
|
|
724
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
725
|
-
"/v1/registries/name/{RegistryName}/schemas";
|
|
726
|
-
if (input.RegistryName !== undefined) {
|
|
727
|
-
const labelValue: string = input.RegistryName;
|
|
728
|
-
if (labelValue.length <= 0) {
|
|
729
|
-
throw new Error("Empty value provided for input HTTP label: RegistryName.");
|
|
730
|
-
}
|
|
731
|
-
resolvedPath = resolvedPath.replace("{RegistryName}", __extendedEncodeURIComponent(labelValue));
|
|
732
|
-
} else {
|
|
733
|
-
throw new Error("No value provided for input HTTP label: RegistryName.");
|
|
734
|
-
}
|
|
735
|
-
const query: any = {
|
|
736
|
-
...(input.Limit !== undefined && { limit: input.Limit.toString() }),
|
|
737
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
738
|
-
...(input.SchemaNamePrefix !== undefined && { schemaNamePrefix: input.SchemaNamePrefix }),
|
|
739
|
-
};
|
|
740
|
-
let body: any;
|
|
741
|
-
return new __HttpRequest({
|
|
742
|
-
protocol,
|
|
743
|
-
hostname,
|
|
744
|
-
port,
|
|
745
|
-
method: "GET",
|
|
746
|
-
headers,
|
|
747
|
-
path: resolvedPath,
|
|
748
|
-
query,
|
|
749
|
-
body,
|
|
750
|
-
});
|
|
751
|
-
};
|
|
752
|
-
|
|
753
|
-
export const serializeAws_restJson1ListSchemaVersionsCommand = async (
|
|
754
|
-
input: ListSchemaVersionsCommandInput,
|
|
755
|
-
context: __SerdeContext
|
|
756
|
-
): Promise<__HttpRequest> => {
|
|
757
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
758
|
-
const headers: any = {};
|
|
759
|
-
let resolvedPath =
|
|
760
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
761
|
-
"/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/versions";
|
|
762
|
-
if (input.RegistryName !== undefined) {
|
|
763
|
-
const labelValue: string = input.RegistryName;
|
|
764
|
-
if (labelValue.length <= 0) {
|
|
765
|
-
throw new Error("Empty value provided for input HTTP label: RegistryName.");
|
|
766
|
-
}
|
|
767
|
-
resolvedPath = resolvedPath.replace("{RegistryName}", __extendedEncodeURIComponent(labelValue));
|
|
768
|
-
} else {
|
|
769
|
-
throw new Error("No value provided for input HTTP label: RegistryName.");
|
|
770
|
-
}
|
|
771
|
-
if (input.SchemaName !== undefined) {
|
|
772
|
-
const labelValue: string = input.SchemaName;
|
|
773
|
-
if (labelValue.length <= 0) {
|
|
774
|
-
throw new Error("Empty value provided for input HTTP label: SchemaName.");
|
|
775
|
-
}
|
|
776
|
-
resolvedPath = resolvedPath.replace("{SchemaName}", __extendedEncodeURIComponent(labelValue));
|
|
777
|
-
} else {
|
|
778
|
-
throw new Error("No value provided for input HTTP label: SchemaName.");
|
|
779
|
-
}
|
|
780
|
-
const query: any = {
|
|
781
|
-
...(input.Limit !== undefined && { limit: input.Limit.toString() }),
|
|
782
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
783
|
-
};
|
|
784
|
-
let body: any;
|
|
785
|
-
return new __HttpRequest({
|
|
786
|
-
protocol,
|
|
787
|
-
hostname,
|
|
788
|
-
port,
|
|
789
|
-
method: "GET",
|
|
790
|
-
headers,
|
|
791
|
-
path: resolvedPath,
|
|
792
|
-
query,
|
|
793
|
-
body,
|
|
794
|
-
});
|
|
795
|
-
};
|
|
796
|
-
|
|
797
|
-
export const serializeAws_restJson1ListTagsForResourceCommand = async (
|
|
798
|
-
input: ListTagsForResourceCommandInput,
|
|
799
|
-
context: __SerdeContext
|
|
800
|
-
): Promise<__HttpRequest> => {
|
|
801
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
802
|
-
const headers: any = {};
|
|
803
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
804
|
-
if (input.ResourceArn !== undefined) {
|
|
805
|
-
const labelValue: string = input.ResourceArn;
|
|
806
|
-
if (labelValue.length <= 0) {
|
|
807
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
808
|
-
}
|
|
809
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
810
|
-
} else {
|
|
811
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
812
|
-
}
|
|
813
|
-
let body: any;
|
|
814
|
-
return new __HttpRequest({
|
|
815
|
-
protocol,
|
|
816
|
-
hostname,
|
|
817
|
-
port,
|
|
818
|
-
method: "GET",
|
|
819
|
-
headers,
|
|
820
|
-
path: resolvedPath,
|
|
821
|
-
body,
|
|
822
|
-
});
|
|
823
|
-
};
|
|
824
|
-
|
|
825
|
-
export const serializeAws_restJson1PutCodeBindingCommand = async (
|
|
826
|
-
input: PutCodeBindingCommandInput,
|
|
827
|
-
context: __SerdeContext
|
|
828
|
-
): Promise<__HttpRequest> => {
|
|
829
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
830
|
-
const headers: any = {};
|
|
831
|
-
let resolvedPath =
|
|
832
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
833
|
-
"/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/language/{Language}";
|
|
834
|
-
if (input.Language !== undefined) {
|
|
835
|
-
const labelValue: string = input.Language;
|
|
836
|
-
if (labelValue.length <= 0) {
|
|
837
|
-
throw new Error("Empty value provided for input HTTP label: Language.");
|
|
838
|
-
}
|
|
839
|
-
resolvedPath = resolvedPath.replace("{Language}", __extendedEncodeURIComponent(labelValue));
|
|
840
|
-
} else {
|
|
841
|
-
throw new Error("No value provided for input HTTP label: Language.");
|
|
842
|
-
}
|
|
843
|
-
if (input.RegistryName !== undefined) {
|
|
844
|
-
const labelValue: string = input.RegistryName;
|
|
845
|
-
if (labelValue.length <= 0) {
|
|
846
|
-
throw new Error("Empty value provided for input HTTP label: RegistryName.");
|
|
847
|
-
}
|
|
848
|
-
resolvedPath = resolvedPath.replace("{RegistryName}", __extendedEncodeURIComponent(labelValue));
|
|
849
|
-
} else {
|
|
850
|
-
throw new Error("No value provided for input HTTP label: RegistryName.");
|
|
851
|
-
}
|
|
852
|
-
if (input.SchemaName !== undefined) {
|
|
853
|
-
const labelValue: string = input.SchemaName;
|
|
854
|
-
if (labelValue.length <= 0) {
|
|
855
|
-
throw new Error("Empty value provided for input HTTP label: SchemaName.");
|
|
856
|
-
}
|
|
857
|
-
resolvedPath = resolvedPath.replace("{SchemaName}", __extendedEncodeURIComponent(labelValue));
|
|
858
|
-
} else {
|
|
859
|
-
throw new Error("No value provided for input HTTP label: SchemaName.");
|
|
860
|
-
}
|
|
861
|
-
const query: any = {
|
|
862
|
-
...(input.SchemaVersion !== undefined && { schemaVersion: input.SchemaVersion }),
|
|
863
|
-
};
|
|
864
|
-
let body: any;
|
|
865
|
-
return new __HttpRequest({
|
|
866
|
-
protocol,
|
|
867
|
-
hostname,
|
|
868
|
-
port,
|
|
869
|
-
method: "POST",
|
|
870
|
-
headers,
|
|
871
|
-
path: resolvedPath,
|
|
872
|
-
query,
|
|
873
|
-
body,
|
|
874
|
-
});
|
|
875
|
-
};
|
|
876
|
-
|
|
877
|
-
export const serializeAws_restJson1PutResourcePolicyCommand = async (
|
|
878
|
-
input: PutResourcePolicyCommandInput,
|
|
879
|
-
context: __SerdeContext
|
|
880
|
-
): Promise<__HttpRequest> => {
|
|
881
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
882
|
-
const headers: any = {
|
|
883
|
-
"content-type": "application/json",
|
|
884
|
-
};
|
|
885
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/policy";
|
|
886
|
-
const query: any = {
|
|
887
|
-
...(input.RegistryName !== undefined && { registryName: input.RegistryName }),
|
|
888
|
-
};
|
|
889
|
-
let body: any;
|
|
890
|
-
body = JSON.stringify({
|
|
891
|
-
...(input.Policy !== undefined && input.Policy !== null && { Policy: __LazyJsonString.fromObject(input.Policy) }),
|
|
892
|
-
...(input.RevisionId !== undefined && input.RevisionId !== null && { RevisionId: input.RevisionId }),
|
|
893
|
-
});
|
|
894
|
-
return new __HttpRequest({
|
|
895
|
-
protocol,
|
|
896
|
-
hostname,
|
|
897
|
-
port,
|
|
898
|
-
method: "PUT",
|
|
899
|
-
headers,
|
|
900
|
-
path: resolvedPath,
|
|
901
|
-
query,
|
|
902
|
-
body,
|
|
903
|
-
});
|
|
904
|
-
};
|
|
905
|
-
|
|
906
|
-
export const serializeAws_restJson1SearchSchemasCommand = async (
|
|
907
|
-
input: SearchSchemasCommandInput,
|
|
908
|
-
context: __SerdeContext
|
|
909
|
-
): Promise<__HttpRequest> => {
|
|
910
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
911
|
-
const headers: any = {};
|
|
912
|
-
let resolvedPath =
|
|
913
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
914
|
-
"/v1/registries/name/{RegistryName}/schemas/search";
|
|
915
|
-
if (input.RegistryName !== undefined) {
|
|
916
|
-
const labelValue: string = input.RegistryName;
|
|
917
|
-
if (labelValue.length <= 0) {
|
|
918
|
-
throw new Error("Empty value provided for input HTTP label: RegistryName.");
|
|
919
|
-
}
|
|
920
|
-
resolvedPath = resolvedPath.replace("{RegistryName}", __extendedEncodeURIComponent(labelValue));
|
|
921
|
-
} else {
|
|
922
|
-
throw new Error("No value provided for input HTTP label: RegistryName.");
|
|
923
|
-
}
|
|
924
|
-
const query: any = {
|
|
925
|
-
...(input.Keywords !== undefined && { keywords: input.Keywords }),
|
|
926
|
-
...(input.Limit !== undefined && { limit: input.Limit.toString() }),
|
|
927
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
928
|
-
};
|
|
929
|
-
let body: any;
|
|
930
|
-
return new __HttpRequest({
|
|
931
|
-
protocol,
|
|
932
|
-
hostname,
|
|
933
|
-
port,
|
|
934
|
-
method: "GET",
|
|
935
|
-
headers,
|
|
936
|
-
path: resolvedPath,
|
|
937
|
-
query,
|
|
938
|
-
body,
|
|
939
|
-
});
|
|
940
|
-
};
|
|
941
|
-
|
|
942
|
-
export const serializeAws_restJson1StartDiscovererCommand = async (
|
|
943
|
-
input: StartDiscovererCommandInput,
|
|
944
|
-
context: __SerdeContext
|
|
945
|
-
): Promise<__HttpRequest> => {
|
|
946
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
947
|
-
const headers: any = {};
|
|
948
|
-
let resolvedPath =
|
|
949
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/discoverers/id/{DiscovererId}/start";
|
|
950
|
-
if (input.DiscovererId !== undefined) {
|
|
951
|
-
const labelValue: string = input.DiscovererId;
|
|
952
|
-
if (labelValue.length <= 0) {
|
|
953
|
-
throw new Error("Empty value provided for input HTTP label: DiscovererId.");
|
|
954
|
-
}
|
|
955
|
-
resolvedPath = resolvedPath.replace("{DiscovererId}", __extendedEncodeURIComponent(labelValue));
|
|
956
|
-
} else {
|
|
957
|
-
throw new Error("No value provided for input HTTP label: DiscovererId.");
|
|
958
|
-
}
|
|
959
|
-
let body: any;
|
|
960
|
-
return new __HttpRequest({
|
|
961
|
-
protocol,
|
|
962
|
-
hostname,
|
|
963
|
-
port,
|
|
964
|
-
method: "POST",
|
|
965
|
-
headers,
|
|
966
|
-
path: resolvedPath,
|
|
967
|
-
body,
|
|
968
|
-
});
|
|
969
|
-
};
|
|
970
|
-
|
|
971
|
-
export const serializeAws_restJson1StopDiscovererCommand = async (
|
|
972
|
-
input: StopDiscovererCommandInput,
|
|
973
|
-
context: __SerdeContext
|
|
974
|
-
): Promise<__HttpRequest> => {
|
|
975
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
976
|
-
const headers: any = {};
|
|
977
|
-
let resolvedPath =
|
|
978
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/discoverers/id/{DiscovererId}/stop";
|
|
979
|
-
if (input.DiscovererId !== undefined) {
|
|
980
|
-
const labelValue: string = input.DiscovererId;
|
|
981
|
-
if (labelValue.length <= 0) {
|
|
982
|
-
throw new Error("Empty value provided for input HTTP label: DiscovererId.");
|
|
983
|
-
}
|
|
984
|
-
resolvedPath = resolvedPath.replace("{DiscovererId}", __extendedEncodeURIComponent(labelValue));
|
|
985
|
-
} else {
|
|
986
|
-
throw new Error("No value provided for input HTTP label: DiscovererId.");
|
|
987
|
-
}
|
|
988
|
-
let body: any;
|
|
989
|
-
return new __HttpRequest({
|
|
990
|
-
protocol,
|
|
991
|
-
hostname,
|
|
992
|
-
port,
|
|
993
|
-
method: "POST",
|
|
994
|
-
headers,
|
|
995
|
-
path: resolvedPath,
|
|
996
|
-
body,
|
|
997
|
-
});
|
|
998
|
-
};
|
|
999
|
-
|
|
1000
|
-
export const serializeAws_restJson1TagResourceCommand = async (
|
|
1001
|
-
input: TagResourceCommandInput,
|
|
1002
|
-
context: __SerdeContext
|
|
1003
|
-
): Promise<__HttpRequest> => {
|
|
1004
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1005
|
-
const headers: any = {
|
|
1006
|
-
"content-type": "application/json",
|
|
1007
|
-
};
|
|
1008
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
1009
|
-
if (input.ResourceArn !== undefined) {
|
|
1010
|
-
const labelValue: string = input.ResourceArn;
|
|
1011
|
-
if (labelValue.length <= 0) {
|
|
1012
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
1013
|
-
}
|
|
1014
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
1015
|
-
} else {
|
|
1016
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
1017
|
-
}
|
|
1018
|
-
let body: any;
|
|
1019
|
-
body = JSON.stringify({
|
|
1020
|
-
...(input.Tags !== undefined && input.Tags !== null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
|
|
1021
|
-
});
|
|
1022
|
-
return new __HttpRequest({
|
|
1023
|
-
protocol,
|
|
1024
|
-
hostname,
|
|
1025
|
-
port,
|
|
1026
|
-
method: "POST",
|
|
1027
|
-
headers,
|
|
1028
|
-
path: resolvedPath,
|
|
1029
|
-
body,
|
|
1030
|
-
});
|
|
1031
|
-
};
|
|
1032
|
-
|
|
1033
|
-
export const serializeAws_restJson1UntagResourceCommand = async (
|
|
1034
|
-
input: UntagResourceCommandInput,
|
|
1035
|
-
context: __SerdeContext
|
|
1036
|
-
): Promise<__HttpRequest> => {
|
|
1037
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1038
|
-
const headers: any = {};
|
|
1039
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
1040
|
-
if (input.ResourceArn !== undefined) {
|
|
1041
|
-
const labelValue: string = input.ResourceArn;
|
|
1042
|
-
if (labelValue.length <= 0) {
|
|
1043
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
1044
|
-
}
|
|
1045
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
1046
|
-
} else {
|
|
1047
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
1048
|
-
}
|
|
1049
|
-
const query: any = {
|
|
1050
|
-
...(input.TagKeys !== undefined && { tagKeys: (input.TagKeys || []).map((_entry) => _entry as any) }),
|
|
1051
|
-
};
|
|
1052
|
-
let body: any;
|
|
1053
|
-
return new __HttpRequest({
|
|
1054
|
-
protocol,
|
|
1055
|
-
hostname,
|
|
1056
|
-
port,
|
|
1057
|
-
method: "DELETE",
|
|
1058
|
-
headers,
|
|
1059
|
-
path: resolvedPath,
|
|
1060
|
-
query,
|
|
1061
|
-
body,
|
|
1062
|
-
});
|
|
1063
|
-
};
|
|
1064
|
-
|
|
1065
|
-
export const serializeAws_restJson1UpdateDiscovererCommand = async (
|
|
1066
|
-
input: UpdateDiscovererCommandInput,
|
|
1067
|
-
context: __SerdeContext
|
|
1068
|
-
): Promise<__HttpRequest> => {
|
|
1069
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1070
|
-
const headers: any = {
|
|
1071
|
-
"content-type": "application/json",
|
|
1072
|
-
};
|
|
1073
|
-
let resolvedPath =
|
|
1074
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/discoverers/id/{DiscovererId}";
|
|
1075
|
-
if (input.DiscovererId !== undefined) {
|
|
1076
|
-
const labelValue: string = input.DiscovererId;
|
|
1077
|
-
if (labelValue.length <= 0) {
|
|
1078
|
-
throw new Error("Empty value provided for input HTTP label: DiscovererId.");
|
|
1079
|
-
}
|
|
1080
|
-
resolvedPath = resolvedPath.replace("{DiscovererId}", __extendedEncodeURIComponent(labelValue));
|
|
1081
|
-
} else {
|
|
1082
|
-
throw new Error("No value provided for input HTTP label: DiscovererId.");
|
|
1083
|
-
}
|
|
1084
|
-
let body: any;
|
|
1085
|
-
body = JSON.stringify({
|
|
1086
|
-
...(input.CrossAccount !== undefined && input.CrossAccount !== null && { CrossAccount: input.CrossAccount }),
|
|
1087
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
1088
|
-
});
|
|
1089
|
-
return new __HttpRequest({
|
|
1090
|
-
protocol,
|
|
1091
|
-
hostname,
|
|
1092
|
-
port,
|
|
1093
|
-
method: "PUT",
|
|
1094
|
-
headers,
|
|
1095
|
-
path: resolvedPath,
|
|
1096
|
-
body,
|
|
1097
|
-
});
|
|
1098
|
-
};
|
|
1099
|
-
|
|
1100
|
-
export const serializeAws_restJson1UpdateRegistryCommand = async (
|
|
1101
|
-
input: UpdateRegistryCommandInput,
|
|
1102
|
-
context: __SerdeContext
|
|
1103
|
-
): Promise<__HttpRequest> => {
|
|
1104
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1105
|
-
const headers: any = {
|
|
1106
|
-
"content-type": "application/json",
|
|
1107
|
-
};
|
|
1108
|
-
let resolvedPath =
|
|
1109
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/registries/name/{RegistryName}";
|
|
1110
|
-
if (input.RegistryName !== undefined) {
|
|
1111
|
-
const labelValue: string = input.RegistryName;
|
|
1112
|
-
if (labelValue.length <= 0) {
|
|
1113
|
-
throw new Error("Empty value provided for input HTTP label: RegistryName.");
|
|
1114
|
-
}
|
|
1115
|
-
resolvedPath = resolvedPath.replace("{RegistryName}", __extendedEncodeURIComponent(labelValue));
|
|
1116
|
-
} else {
|
|
1117
|
-
throw new Error("No value provided for input HTTP label: RegistryName.");
|
|
1118
|
-
}
|
|
1119
|
-
let body: any;
|
|
1120
|
-
body = JSON.stringify({
|
|
1121
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
1122
|
-
});
|
|
1123
|
-
return new __HttpRequest({
|
|
1124
|
-
protocol,
|
|
1125
|
-
hostname,
|
|
1126
|
-
port,
|
|
1127
|
-
method: "PUT",
|
|
1128
|
-
headers,
|
|
1129
|
-
path: resolvedPath,
|
|
1130
|
-
body,
|
|
1131
|
-
});
|
|
1132
|
-
};
|
|
1133
|
-
|
|
1134
|
-
export const serializeAws_restJson1UpdateSchemaCommand = async (
|
|
1135
|
-
input: UpdateSchemaCommandInput,
|
|
1136
|
-
context: __SerdeContext
|
|
1137
|
-
): Promise<__HttpRequest> => {
|
|
1138
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1139
|
-
const headers: any = {
|
|
1140
|
-
"content-type": "application/json",
|
|
1141
|
-
};
|
|
1142
|
-
let resolvedPath =
|
|
1143
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1144
|
-
"/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}";
|
|
1145
|
-
if (input.RegistryName !== undefined) {
|
|
1146
|
-
const labelValue: string = input.RegistryName;
|
|
1147
|
-
if (labelValue.length <= 0) {
|
|
1148
|
-
throw new Error("Empty value provided for input HTTP label: RegistryName.");
|
|
1149
|
-
}
|
|
1150
|
-
resolvedPath = resolvedPath.replace("{RegistryName}", __extendedEncodeURIComponent(labelValue));
|
|
1151
|
-
} else {
|
|
1152
|
-
throw new Error("No value provided for input HTTP label: RegistryName.");
|
|
1153
|
-
}
|
|
1154
|
-
if (input.SchemaName !== undefined) {
|
|
1155
|
-
const labelValue: string = input.SchemaName;
|
|
1156
|
-
if (labelValue.length <= 0) {
|
|
1157
|
-
throw new Error("Empty value provided for input HTTP label: SchemaName.");
|
|
1158
|
-
}
|
|
1159
|
-
resolvedPath = resolvedPath.replace("{SchemaName}", __extendedEncodeURIComponent(labelValue));
|
|
1160
|
-
} else {
|
|
1161
|
-
throw new Error("No value provided for input HTTP label: SchemaName.");
|
|
1162
|
-
}
|
|
1163
|
-
let body: any;
|
|
1164
|
-
body = JSON.stringify({
|
|
1165
|
-
ClientTokenId: input.ClientTokenId ?? generateIdempotencyToken(),
|
|
1166
|
-
...(input.Content !== undefined && input.Content !== null && { Content: input.Content }),
|
|
1167
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
1168
|
-
...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
|
|
1169
|
-
});
|
|
1170
|
-
return new __HttpRequest({
|
|
1171
|
-
protocol,
|
|
1172
|
-
hostname,
|
|
1173
|
-
port,
|
|
1174
|
-
method: "PUT",
|
|
1175
|
-
headers,
|
|
1176
|
-
path: resolvedPath,
|
|
1177
|
-
body,
|
|
1178
|
-
});
|
|
1179
|
-
};
|
|
1180
|
-
|
|
1181
|
-
export const deserializeAws_restJson1CreateDiscovererCommand = async (
|
|
1182
|
-
output: __HttpResponse,
|
|
1183
|
-
context: __SerdeContext
|
|
1184
|
-
): Promise<CreateDiscovererCommandOutput> => {
|
|
1185
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1186
|
-
return deserializeAws_restJson1CreateDiscovererCommandError(output, context);
|
|
1187
|
-
}
|
|
1188
|
-
const contents: CreateDiscovererCommandOutput = {
|
|
1189
|
-
$metadata: deserializeMetadata(output),
|
|
1190
|
-
CrossAccount: undefined,
|
|
1191
|
-
Description: undefined,
|
|
1192
|
-
DiscovererArn: undefined,
|
|
1193
|
-
DiscovererId: undefined,
|
|
1194
|
-
SourceArn: undefined,
|
|
1195
|
-
State: undefined,
|
|
1196
|
-
Tags: undefined,
|
|
1197
|
-
};
|
|
1198
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1199
|
-
if (data.CrossAccount !== undefined && data.CrossAccount !== null) {
|
|
1200
|
-
contents.CrossAccount = __expectBoolean(data.CrossAccount);
|
|
1201
|
-
}
|
|
1202
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
1203
|
-
contents.Description = __expectString(data.Description);
|
|
1204
|
-
}
|
|
1205
|
-
if (data.DiscovererArn !== undefined && data.DiscovererArn !== null) {
|
|
1206
|
-
contents.DiscovererArn = __expectString(data.DiscovererArn);
|
|
1207
|
-
}
|
|
1208
|
-
if (data.DiscovererId !== undefined && data.DiscovererId !== null) {
|
|
1209
|
-
contents.DiscovererId = __expectString(data.DiscovererId);
|
|
1210
|
-
}
|
|
1211
|
-
if (data.SourceArn !== undefined && data.SourceArn !== null) {
|
|
1212
|
-
contents.SourceArn = __expectString(data.SourceArn);
|
|
1213
|
-
}
|
|
1214
|
-
if (data.State !== undefined && data.State !== null) {
|
|
1215
|
-
contents.State = __expectString(data.State);
|
|
1216
|
-
}
|
|
1217
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
1218
|
-
contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
1219
|
-
}
|
|
1220
|
-
return Promise.resolve(contents);
|
|
1221
|
-
};
|
|
1222
|
-
|
|
1223
|
-
const deserializeAws_restJson1CreateDiscovererCommandError = async (
|
|
1224
|
-
output: __HttpResponse,
|
|
1225
|
-
context: __SerdeContext
|
|
1226
|
-
): Promise<CreateDiscovererCommandOutput> => {
|
|
1227
|
-
const parsedOutput: any = {
|
|
1228
|
-
...output,
|
|
1229
|
-
body: await parseBody(output.body, context),
|
|
1230
|
-
};
|
|
1231
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1232
|
-
let errorCode: string = "UnknownError";
|
|
1233
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1234
|
-
switch (errorCode) {
|
|
1235
|
-
case "BadRequestException":
|
|
1236
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
1237
|
-
response = {
|
|
1238
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1239
|
-
name: errorCode,
|
|
1240
|
-
$metadata: deserializeMetadata(output),
|
|
1241
|
-
};
|
|
1242
|
-
break;
|
|
1243
|
-
case "ConflictException":
|
|
1244
|
-
case "com.amazonaws.schemas#ConflictException":
|
|
1245
|
-
response = {
|
|
1246
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1247
|
-
name: errorCode,
|
|
1248
|
-
$metadata: deserializeMetadata(output),
|
|
1249
|
-
};
|
|
1250
|
-
break;
|
|
1251
|
-
case "ForbiddenException":
|
|
1252
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
1253
|
-
response = {
|
|
1254
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1255
|
-
name: errorCode,
|
|
1256
|
-
$metadata: deserializeMetadata(output),
|
|
1257
|
-
};
|
|
1258
|
-
break;
|
|
1259
|
-
case "InternalServerErrorException":
|
|
1260
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
1261
|
-
response = {
|
|
1262
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1263
|
-
name: errorCode,
|
|
1264
|
-
$metadata: deserializeMetadata(output),
|
|
1265
|
-
};
|
|
1266
|
-
break;
|
|
1267
|
-
case "ServiceUnavailableException":
|
|
1268
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
1269
|
-
response = {
|
|
1270
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1271
|
-
name: errorCode,
|
|
1272
|
-
$metadata: deserializeMetadata(output),
|
|
1273
|
-
};
|
|
1274
|
-
break;
|
|
1275
|
-
case "UnauthorizedException":
|
|
1276
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
1277
|
-
response = {
|
|
1278
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1279
|
-
name: errorCode,
|
|
1280
|
-
$metadata: deserializeMetadata(output),
|
|
1281
|
-
};
|
|
1282
|
-
break;
|
|
1283
|
-
default:
|
|
1284
|
-
const parsedBody = parsedOutput.body;
|
|
1285
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1286
|
-
response = {
|
|
1287
|
-
...parsedBody,
|
|
1288
|
-
name: `${errorCode}`,
|
|
1289
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1290
|
-
$fault: "client",
|
|
1291
|
-
$metadata: deserializeMetadata(output),
|
|
1292
|
-
} as any;
|
|
1293
|
-
}
|
|
1294
|
-
const message = response.message || response.Message || errorCode;
|
|
1295
|
-
response.message = message;
|
|
1296
|
-
delete response.Message;
|
|
1297
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1298
|
-
};
|
|
1299
|
-
|
|
1300
|
-
export const deserializeAws_restJson1CreateRegistryCommand = async (
|
|
1301
|
-
output: __HttpResponse,
|
|
1302
|
-
context: __SerdeContext
|
|
1303
|
-
): Promise<CreateRegistryCommandOutput> => {
|
|
1304
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1305
|
-
return deserializeAws_restJson1CreateRegistryCommandError(output, context);
|
|
1306
|
-
}
|
|
1307
|
-
const contents: CreateRegistryCommandOutput = {
|
|
1308
|
-
$metadata: deserializeMetadata(output),
|
|
1309
|
-
Description: undefined,
|
|
1310
|
-
RegistryArn: undefined,
|
|
1311
|
-
RegistryName: undefined,
|
|
1312
|
-
Tags: undefined,
|
|
1313
|
-
};
|
|
1314
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1315
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
1316
|
-
contents.Description = __expectString(data.Description);
|
|
1317
|
-
}
|
|
1318
|
-
if (data.RegistryArn !== undefined && data.RegistryArn !== null) {
|
|
1319
|
-
contents.RegistryArn = __expectString(data.RegistryArn);
|
|
1320
|
-
}
|
|
1321
|
-
if (data.RegistryName !== undefined && data.RegistryName !== null) {
|
|
1322
|
-
contents.RegistryName = __expectString(data.RegistryName);
|
|
1323
|
-
}
|
|
1324
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
1325
|
-
contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
1326
|
-
}
|
|
1327
|
-
return Promise.resolve(contents);
|
|
1328
|
-
};
|
|
1329
|
-
|
|
1330
|
-
const deserializeAws_restJson1CreateRegistryCommandError = async (
|
|
1331
|
-
output: __HttpResponse,
|
|
1332
|
-
context: __SerdeContext
|
|
1333
|
-
): Promise<CreateRegistryCommandOutput> => {
|
|
1334
|
-
const parsedOutput: any = {
|
|
1335
|
-
...output,
|
|
1336
|
-
body: await parseBody(output.body, context),
|
|
1337
|
-
};
|
|
1338
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1339
|
-
let errorCode: string = "UnknownError";
|
|
1340
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1341
|
-
switch (errorCode) {
|
|
1342
|
-
case "BadRequestException":
|
|
1343
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
1344
|
-
response = {
|
|
1345
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1346
|
-
name: errorCode,
|
|
1347
|
-
$metadata: deserializeMetadata(output),
|
|
1348
|
-
};
|
|
1349
|
-
break;
|
|
1350
|
-
case "ConflictException":
|
|
1351
|
-
case "com.amazonaws.schemas#ConflictException":
|
|
1352
|
-
response = {
|
|
1353
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1354
|
-
name: errorCode,
|
|
1355
|
-
$metadata: deserializeMetadata(output),
|
|
1356
|
-
};
|
|
1357
|
-
break;
|
|
1358
|
-
case "ForbiddenException":
|
|
1359
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
1360
|
-
response = {
|
|
1361
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1362
|
-
name: errorCode,
|
|
1363
|
-
$metadata: deserializeMetadata(output),
|
|
1364
|
-
};
|
|
1365
|
-
break;
|
|
1366
|
-
case "InternalServerErrorException":
|
|
1367
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
1368
|
-
response = {
|
|
1369
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1370
|
-
name: errorCode,
|
|
1371
|
-
$metadata: deserializeMetadata(output),
|
|
1372
|
-
};
|
|
1373
|
-
break;
|
|
1374
|
-
case "ServiceUnavailableException":
|
|
1375
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
1376
|
-
response = {
|
|
1377
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1378
|
-
name: errorCode,
|
|
1379
|
-
$metadata: deserializeMetadata(output),
|
|
1380
|
-
};
|
|
1381
|
-
break;
|
|
1382
|
-
case "UnauthorizedException":
|
|
1383
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
1384
|
-
response = {
|
|
1385
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1386
|
-
name: errorCode,
|
|
1387
|
-
$metadata: deserializeMetadata(output),
|
|
1388
|
-
};
|
|
1389
|
-
break;
|
|
1390
|
-
default:
|
|
1391
|
-
const parsedBody = parsedOutput.body;
|
|
1392
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1393
|
-
response = {
|
|
1394
|
-
...parsedBody,
|
|
1395
|
-
name: `${errorCode}`,
|
|
1396
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1397
|
-
$fault: "client",
|
|
1398
|
-
$metadata: deserializeMetadata(output),
|
|
1399
|
-
} as any;
|
|
1400
|
-
}
|
|
1401
|
-
const message = response.message || response.Message || errorCode;
|
|
1402
|
-
response.message = message;
|
|
1403
|
-
delete response.Message;
|
|
1404
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1405
|
-
};
|
|
1406
|
-
|
|
1407
|
-
export const deserializeAws_restJson1CreateSchemaCommand = async (
|
|
1408
|
-
output: __HttpResponse,
|
|
1409
|
-
context: __SerdeContext
|
|
1410
|
-
): Promise<CreateSchemaCommandOutput> => {
|
|
1411
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1412
|
-
return deserializeAws_restJson1CreateSchemaCommandError(output, context);
|
|
1413
|
-
}
|
|
1414
|
-
const contents: CreateSchemaCommandOutput = {
|
|
1415
|
-
$metadata: deserializeMetadata(output),
|
|
1416
|
-
Description: undefined,
|
|
1417
|
-
LastModified: undefined,
|
|
1418
|
-
SchemaArn: undefined,
|
|
1419
|
-
SchemaName: undefined,
|
|
1420
|
-
SchemaVersion: undefined,
|
|
1421
|
-
Tags: undefined,
|
|
1422
|
-
Type: undefined,
|
|
1423
|
-
VersionCreatedDate: undefined,
|
|
1424
|
-
};
|
|
1425
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1426
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
1427
|
-
contents.Description = __expectString(data.Description);
|
|
1428
|
-
}
|
|
1429
|
-
if (data.LastModified !== undefined && data.LastModified !== null) {
|
|
1430
|
-
contents.LastModified = __expectNonNull(__parseRfc3339DateTime(data.LastModified));
|
|
1431
|
-
}
|
|
1432
|
-
if (data.SchemaArn !== undefined && data.SchemaArn !== null) {
|
|
1433
|
-
contents.SchemaArn = __expectString(data.SchemaArn);
|
|
1434
|
-
}
|
|
1435
|
-
if (data.SchemaName !== undefined && data.SchemaName !== null) {
|
|
1436
|
-
contents.SchemaName = __expectString(data.SchemaName);
|
|
1437
|
-
}
|
|
1438
|
-
if (data.SchemaVersion !== undefined && data.SchemaVersion !== null) {
|
|
1439
|
-
contents.SchemaVersion = __expectString(data.SchemaVersion);
|
|
1440
|
-
}
|
|
1441
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
1442
|
-
contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
1443
|
-
}
|
|
1444
|
-
if (data.Type !== undefined && data.Type !== null) {
|
|
1445
|
-
contents.Type = __expectString(data.Type);
|
|
1446
|
-
}
|
|
1447
|
-
if (data.VersionCreatedDate !== undefined && data.VersionCreatedDate !== null) {
|
|
1448
|
-
contents.VersionCreatedDate = __expectNonNull(__parseRfc3339DateTime(data.VersionCreatedDate));
|
|
1449
|
-
}
|
|
1450
|
-
return Promise.resolve(contents);
|
|
1451
|
-
};
|
|
1452
|
-
|
|
1453
|
-
const deserializeAws_restJson1CreateSchemaCommandError = async (
|
|
1454
|
-
output: __HttpResponse,
|
|
1455
|
-
context: __SerdeContext
|
|
1456
|
-
): Promise<CreateSchemaCommandOutput> => {
|
|
1457
|
-
const parsedOutput: any = {
|
|
1458
|
-
...output,
|
|
1459
|
-
body: await parseBody(output.body, context),
|
|
1460
|
-
};
|
|
1461
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1462
|
-
let errorCode: string = "UnknownError";
|
|
1463
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1464
|
-
switch (errorCode) {
|
|
1465
|
-
case "BadRequestException":
|
|
1466
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
1467
|
-
response = {
|
|
1468
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1469
|
-
name: errorCode,
|
|
1470
|
-
$metadata: deserializeMetadata(output),
|
|
1471
|
-
};
|
|
1472
|
-
break;
|
|
1473
|
-
case "ForbiddenException":
|
|
1474
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
1475
|
-
response = {
|
|
1476
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1477
|
-
name: errorCode,
|
|
1478
|
-
$metadata: deserializeMetadata(output),
|
|
1479
|
-
};
|
|
1480
|
-
break;
|
|
1481
|
-
case "InternalServerErrorException":
|
|
1482
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
1483
|
-
response = {
|
|
1484
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1485
|
-
name: errorCode,
|
|
1486
|
-
$metadata: deserializeMetadata(output),
|
|
1487
|
-
};
|
|
1488
|
-
break;
|
|
1489
|
-
case "ServiceUnavailableException":
|
|
1490
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
1491
|
-
response = {
|
|
1492
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1493
|
-
name: errorCode,
|
|
1494
|
-
$metadata: deserializeMetadata(output),
|
|
1495
|
-
};
|
|
1496
|
-
break;
|
|
1497
|
-
default:
|
|
1498
|
-
const parsedBody = parsedOutput.body;
|
|
1499
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1500
|
-
response = {
|
|
1501
|
-
...parsedBody,
|
|
1502
|
-
name: `${errorCode}`,
|
|
1503
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1504
|
-
$fault: "client",
|
|
1505
|
-
$metadata: deserializeMetadata(output),
|
|
1506
|
-
} as any;
|
|
1507
|
-
}
|
|
1508
|
-
const message = response.message || response.Message || errorCode;
|
|
1509
|
-
response.message = message;
|
|
1510
|
-
delete response.Message;
|
|
1511
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1512
|
-
};
|
|
1513
|
-
|
|
1514
|
-
export const deserializeAws_restJson1DeleteDiscovererCommand = async (
|
|
1515
|
-
output: __HttpResponse,
|
|
1516
|
-
context: __SerdeContext
|
|
1517
|
-
): Promise<DeleteDiscovererCommandOutput> => {
|
|
1518
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1519
|
-
return deserializeAws_restJson1DeleteDiscovererCommandError(output, context);
|
|
1520
|
-
}
|
|
1521
|
-
const contents: DeleteDiscovererCommandOutput = {
|
|
1522
|
-
$metadata: deserializeMetadata(output),
|
|
1523
|
-
};
|
|
1524
|
-
await collectBody(output.body, context);
|
|
1525
|
-
return Promise.resolve(contents);
|
|
1526
|
-
};
|
|
1527
|
-
|
|
1528
|
-
const deserializeAws_restJson1DeleteDiscovererCommandError = async (
|
|
1529
|
-
output: __HttpResponse,
|
|
1530
|
-
context: __SerdeContext
|
|
1531
|
-
): Promise<DeleteDiscovererCommandOutput> => {
|
|
1532
|
-
const parsedOutput: any = {
|
|
1533
|
-
...output,
|
|
1534
|
-
body: await parseBody(output.body, context),
|
|
1535
|
-
};
|
|
1536
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1537
|
-
let errorCode: string = "UnknownError";
|
|
1538
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1539
|
-
switch (errorCode) {
|
|
1540
|
-
case "BadRequestException":
|
|
1541
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
1542
|
-
response = {
|
|
1543
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1544
|
-
name: errorCode,
|
|
1545
|
-
$metadata: deserializeMetadata(output),
|
|
1546
|
-
};
|
|
1547
|
-
break;
|
|
1548
|
-
case "ForbiddenException":
|
|
1549
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
1550
|
-
response = {
|
|
1551
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1552
|
-
name: errorCode,
|
|
1553
|
-
$metadata: deserializeMetadata(output),
|
|
1554
|
-
};
|
|
1555
|
-
break;
|
|
1556
|
-
case "InternalServerErrorException":
|
|
1557
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
1558
|
-
response = {
|
|
1559
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1560
|
-
name: errorCode,
|
|
1561
|
-
$metadata: deserializeMetadata(output),
|
|
1562
|
-
};
|
|
1563
|
-
break;
|
|
1564
|
-
case "NotFoundException":
|
|
1565
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
1566
|
-
response = {
|
|
1567
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1568
|
-
name: errorCode,
|
|
1569
|
-
$metadata: deserializeMetadata(output),
|
|
1570
|
-
};
|
|
1571
|
-
break;
|
|
1572
|
-
case "ServiceUnavailableException":
|
|
1573
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
1574
|
-
response = {
|
|
1575
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1576
|
-
name: errorCode,
|
|
1577
|
-
$metadata: deserializeMetadata(output),
|
|
1578
|
-
};
|
|
1579
|
-
break;
|
|
1580
|
-
case "UnauthorizedException":
|
|
1581
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
1582
|
-
response = {
|
|
1583
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1584
|
-
name: errorCode,
|
|
1585
|
-
$metadata: deserializeMetadata(output),
|
|
1586
|
-
};
|
|
1587
|
-
break;
|
|
1588
|
-
default:
|
|
1589
|
-
const parsedBody = parsedOutput.body;
|
|
1590
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1591
|
-
response = {
|
|
1592
|
-
...parsedBody,
|
|
1593
|
-
name: `${errorCode}`,
|
|
1594
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1595
|
-
$fault: "client",
|
|
1596
|
-
$metadata: deserializeMetadata(output),
|
|
1597
|
-
} as any;
|
|
1598
|
-
}
|
|
1599
|
-
const message = response.message || response.Message || errorCode;
|
|
1600
|
-
response.message = message;
|
|
1601
|
-
delete response.Message;
|
|
1602
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1603
|
-
};
|
|
1604
|
-
|
|
1605
|
-
export const deserializeAws_restJson1DeleteRegistryCommand = async (
|
|
1606
|
-
output: __HttpResponse,
|
|
1607
|
-
context: __SerdeContext
|
|
1608
|
-
): Promise<DeleteRegistryCommandOutput> => {
|
|
1609
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1610
|
-
return deserializeAws_restJson1DeleteRegistryCommandError(output, context);
|
|
1611
|
-
}
|
|
1612
|
-
const contents: DeleteRegistryCommandOutput = {
|
|
1613
|
-
$metadata: deserializeMetadata(output),
|
|
1614
|
-
};
|
|
1615
|
-
await collectBody(output.body, context);
|
|
1616
|
-
return Promise.resolve(contents);
|
|
1617
|
-
};
|
|
1618
|
-
|
|
1619
|
-
const deserializeAws_restJson1DeleteRegistryCommandError = async (
|
|
1620
|
-
output: __HttpResponse,
|
|
1621
|
-
context: __SerdeContext
|
|
1622
|
-
): Promise<DeleteRegistryCommandOutput> => {
|
|
1623
|
-
const parsedOutput: any = {
|
|
1624
|
-
...output,
|
|
1625
|
-
body: await parseBody(output.body, context),
|
|
1626
|
-
};
|
|
1627
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1628
|
-
let errorCode: string = "UnknownError";
|
|
1629
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1630
|
-
switch (errorCode) {
|
|
1631
|
-
case "BadRequestException":
|
|
1632
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
1633
|
-
response = {
|
|
1634
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1635
|
-
name: errorCode,
|
|
1636
|
-
$metadata: deserializeMetadata(output),
|
|
1637
|
-
};
|
|
1638
|
-
break;
|
|
1639
|
-
case "ForbiddenException":
|
|
1640
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
1641
|
-
response = {
|
|
1642
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1643
|
-
name: errorCode,
|
|
1644
|
-
$metadata: deserializeMetadata(output),
|
|
1645
|
-
};
|
|
1646
|
-
break;
|
|
1647
|
-
case "InternalServerErrorException":
|
|
1648
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
1649
|
-
response = {
|
|
1650
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1651
|
-
name: errorCode,
|
|
1652
|
-
$metadata: deserializeMetadata(output),
|
|
1653
|
-
};
|
|
1654
|
-
break;
|
|
1655
|
-
case "NotFoundException":
|
|
1656
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
1657
|
-
response = {
|
|
1658
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1659
|
-
name: errorCode,
|
|
1660
|
-
$metadata: deserializeMetadata(output),
|
|
1661
|
-
};
|
|
1662
|
-
break;
|
|
1663
|
-
case "ServiceUnavailableException":
|
|
1664
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
1665
|
-
response = {
|
|
1666
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1667
|
-
name: errorCode,
|
|
1668
|
-
$metadata: deserializeMetadata(output),
|
|
1669
|
-
};
|
|
1670
|
-
break;
|
|
1671
|
-
case "UnauthorizedException":
|
|
1672
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
1673
|
-
response = {
|
|
1674
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1675
|
-
name: errorCode,
|
|
1676
|
-
$metadata: deserializeMetadata(output),
|
|
1677
|
-
};
|
|
1678
|
-
break;
|
|
1679
|
-
default:
|
|
1680
|
-
const parsedBody = parsedOutput.body;
|
|
1681
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1682
|
-
response = {
|
|
1683
|
-
...parsedBody,
|
|
1684
|
-
name: `${errorCode}`,
|
|
1685
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1686
|
-
$fault: "client",
|
|
1687
|
-
$metadata: deserializeMetadata(output),
|
|
1688
|
-
} as any;
|
|
1689
|
-
}
|
|
1690
|
-
const message = response.message || response.Message || errorCode;
|
|
1691
|
-
response.message = message;
|
|
1692
|
-
delete response.Message;
|
|
1693
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1694
|
-
};
|
|
1695
|
-
|
|
1696
|
-
export const deserializeAws_restJson1DeleteResourcePolicyCommand = async (
|
|
1697
|
-
output: __HttpResponse,
|
|
1698
|
-
context: __SerdeContext
|
|
1699
|
-
): Promise<DeleteResourcePolicyCommandOutput> => {
|
|
1700
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1701
|
-
return deserializeAws_restJson1DeleteResourcePolicyCommandError(output, context);
|
|
1702
|
-
}
|
|
1703
|
-
const contents: DeleteResourcePolicyCommandOutput = {
|
|
1704
|
-
$metadata: deserializeMetadata(output),
|
|
1705
|
-
};
|
|
1706
|
-
await collectBody(output.body, context);
|
|
1707
|
-
return Promise.resolve(contents);
|
|
1708
|
-
};
|
|
1709
|
-
|
|
1710
|
-
const deserializeAws_restJson1DeleteResourcePolicyCommandError = async (
|
|
1711
|
-
output: __HttpResponse,
|
|
1712
|
-
context: __SerdeContext
|
|
1713
|
-
): Promise<DeleteResourcePolicyCommandOutput> => {
|
|
1714
|
-
const parsedOutput: any = {
|
|
1715
|
-
...output,
|
|
1716
|
-
body: await parseBody(output.body, context),
|
|
1717
|
-
};
|
|
1718
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1719
|
-
let errorCode: string = "UnknownError";
|
|
1720
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1721
|
-
switch (errorCode) {
|
|
1722
|
-
case "BadRequestException":
|
|
1723
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
1724
|
-
response = {
|
|
1725
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1726
|
-
name: errorCode,
|
|
1727
|
-
$metadata: deserializeMetadata(output),
|
|
1728
|
-
};
|
|
1729
|
-
break;
|
|
1730
|
-
case "ForbiddenException":
|
|
1731
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
1732
|
-
response = {
|
|
1733
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1734
|
-
name: errorCode,
|
|
1735
|
-
$metadata: deserializeMetadata(output),
|
|
1736
|
-
};
|
|
1737
|
-
break;
|
|
1738
|
-
case "InternalServerErrorException":
|
|
1739
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
1740
|
-
response = {
|
|
1741
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1742
|
-
name: errorCode,
|
|
1743
|
-
$metadata: deserializeMetadata(output),
|
|
1744
|
-
};
|
|
1745
|
-
break;
|
|
1746
|
-
case "NotFoundException":
|
|
1747
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
1748
|
-
response = {
|
|
1749
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1750
|
-
name: errorCode,
|
|
1751
|
-
$metadata: deserializeMetadata(output),
|
|
1752
|
-
};
|
|
1753
|
-
break;
|
|
1754
|
-
case "ServiceUnavailableException":
|
|
1755
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
1756
|
-
response = {
|
|
1757
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1758
|
-
name: errorCode,
|
|
1759
|
-
$metadata: deserializeMetadata(output),
|
|
1760
|
-
};
|
|
1761
|
-
break;
|
|
1762
|
-
case "UnauthorizedException":
|
|
1763
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
1764
|
-
response = {
|
|
1765
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1766
|
-
name: errorCode,
|
|
1767
|
-
$metadata: deserializeMetadata(output),
|
|
1768
|
-
};
|
|
1769
|
-
break;
|
|
1770
|
-
default:
|
|
1771
|
-
const parsedBody = parsedOutput.body;
|
|
1772
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1773
|
-
response = {
|
|
1774
|
-
...parsedBody,
|
|
1775
|
-
name: `${errorCode}`,
|
|
1776
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1777
|
-
$fault: "client",
|
|
1778
|
-
$metadata: deserializeMetadata(output),
|
|
1779
|
-
} as any;
|
|
1780
|
-
}
|
|
1781
|
-
const message = response.message || response.Message || errorCode;
|
|
1782
|
-
response.message = message;
|
|
1783
|
-
delete response.Message;
|
|
1784
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1785
|
-
};
|
|
1786
|
-
|
|
1787
|
-
export const deserializeAws_restJson1DeleteSchemaCommand = async (
|
|
1788
|
-
output: __HttpResponse,
|
|
1789
|
-
context: __SerdeContext
|
|
1790
|
-
): Promise<DeleteSchemaCommandOutput> => {
|
|
1791
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1792
|
-
return deserializeAws_restJson1DeleteSchemaCommandError(output, context);
|
|
1793
|
-
}
|
|
1794
|
-
const contents: DeleteSchemaCommandOutput = {
|
|
1795
|
-
$metadata: deserializeMetadata(output),
|
|
1796
|
-
};
|
|
1797
|
-
await collectBody(output.body, context);
|
|
1798
|
-
return Promise.resolve(contents);
|
|
1799
|
-
};
|
|
1800
|
-
|
|
1801
|
-
const deserializeAws_restJson1DeleteSchemaCommandError = async (
|
|
1802
|
-
output: __HttpResponse,
|
|
1803
|
-
context: __SerdeContext
|
|
1804
|
-
): Promise<DeleteSchemaCommandOutput> => {
|
|
1805
|
-
const parsedOutput: any = {
|
|
1806
|
-
...output,
|
|
1807
|
-
body: await parseBody(output.body, context),
|
|
1808
|
-
};
|
|
1809
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1810
|
-
let errorCode: string = "UnknownError";
|
|
1811
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1812
|
-
switch (errorCode) {
|
|
1813
|
-
case "BadRequestException":
|
|
1814
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
1815
|
-
response = {
|
|
1816
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1817
|
-
name: errorCode,
|
|
1818
|
-
$metadata: deserializeMetadata(output),
|
|
1819
|
-
};
|
|
1820
|
-
break;
|
|
1821
|
-
case "ForbiddenException":
|
|
1822
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
1823
|
-
response = {
|
|
1824
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1825
|
-
name: errorCode,
|
|
1826
|
-
$metadata: deserializeMetadata(output),
|
|
1827
|
-
};
|
|
1828
|
-
break;
|
|
1829
|
-
case "InternalServerErrorException":
|
|
1830
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
1831
|
-
response = {
|
|
1832
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1833
|
-
name: errorCode,
|
|
1834
|
-
$metadata: deserializeMetadata(output),
|
|
1835
|
-
};
|
|
1836
|
-
break;
|
|
1837
|
-
case "NotFoundException":
|
|
1838
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
1839
|
-
response = {
|
|
1840
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1841
|
-
name: errorCode,
|
|
1842
|
-
$metadata: deserializeMetadata(output),
|
|
1843
|
-
};
|
|
1844
|
-
break;
|
|
1845
|
-
case "ServiceUnavailableException":
|
|
1846
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
1847
|
-
response = {
|
|
1848
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1849
|
-
name: errorCode,
|
|
1850
|
-
$metadata: deserializeMetadata(output),
|
|
1851
|
-
};
|
|
1852
|
-
break;
|
|
1853
|
-
case "UnauthorizedException":
|
|
1854
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
1855
|
-
response = {
|
|
1856
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1857
|
-
name: errorCode,
|
|
1858
|
-
$metadata: deserializeMetadata(output),
|
|
1859
|
-
};
|
|
1860
|
-
break;
|
|
1861
|
-
default:
|
|
1862
|
-
const parsedBody = parsedOutput.body;
|
|
1863
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1864
|
-
response = {
|
|
1865
|
-
...parsedBody,
|
|
1866
|
-
name: `${errorCode}`,
|
|
1867
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1868
|
-
$fault: "client",
|
|
1869
|
-
$metadata: deserializeMetadata(output),
|
|
1870
|
-
} as any;
|
|
1871
|
-
}
|
|
1872
|
-
const message = response.message || response.Message || errorCode;
|
|
1873
|
-
response.message = message;
|
|
1874
|
-
delete response.Message;
|
|
1875
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1876
|
-
};
|
|
1877
|
-
|
|
1878
|
-
export const deserializeAws_restJson1DeleteSchemaVersionCommand = async (
|
|
1879
|
-
output: __HttpResponse,
|
|
1880
|
-
context: __SerdeContext
|
|
1881
|
-
): Promise<DeleteSchemaVersionCommandOutput> => {
|
|
1882
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1883
|
-
return deserializeAws_restJson1DeleteSchemaVersionCommandError(output, context);
|
|
1884
|
-
}
|
|
1885
|
-
const contents: DeleteSchemaVersionCommandOutput = {
|
|
1886
|
-
$metadata: deserializeMetadata(output),
|
|
1887
|
-
};
|
|
1888
|
-
await collectBody(output.body, context);
|
|
1889
|
-
return Promise.resolve(contents);
|
|
1890
|
-
};
|
|
1891
|
-
|
|
1892
|
-
const deserializeAws_restJson1DeleteSchemaVersionCommandError = async (
|
|
1893
|
-
output: __HttpResponse,
|
|
1894
|
-
context: __SerdeContext
|
|
1895
|
-
): Promise<DeleteSchemaVersionCommandOutput> => {
|
|
1896
|
-
const parsedOutput: any = {
|
|
1897
|
-
...output,
|
|
1898
|
-
body: await parseBody(output.body, context),
|
|
1899
|
-
};
|
|
1900
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1901
|
-
let errorCode: string = "UnknownError";
|
|
1902
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1903
|
-
switch (errorCode) {
|
|
1904
|
-
case "BadRequestException":
|
|
1905
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
1906
|
-
response = {
|
|
1907
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1908
|
-
name: errorCode,
|
|
1909
|
-
$metadata: deserializeMetadata(output),
|
|
1910
|
-
};
|
|
1911
|
-
break;
|
|
1912
|
-
case "ForbiddenException":
|
|
1913
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
1914
|
-
response = {
|
|
1915
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1916
|
-
name: errorCode,
|
|
1917
|
-
$metadata: deserializeMetadata(output),
|
|
1918
|
-
};
|
|
1919
|
-
break;
|
|
1920
|
-
case "InternalServerErrorException":
|
|
1921
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
1922
|
-
response = {
|
|
1923
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1924
|
-
name: errorCode,
|
|
1925
|
-
$metadata: deserializeMetadata(output),
|
|
1926
|
-
};
|
|
1927
|
-
break;
|
|
1928
|
-
case "NotFoundException":
|
|
1929
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
1930
|
-
response = {
|
|
1931
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1932
|
-
name: errorCode,
|
|
1933
|
-
$metadata: deserializeMetadata(output),
|
|
1934
|
-
};
|
|
1935
|
-
break;
|
|
1936
|
-
case "ServiceUnavailableException":
|
|
1937
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
1938
|
-
response = {
|
|
1939
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1940
|
-
name: errorCode,
|
|
1941
|
-
$metadata: deserializeMetadata(output),
|
|
1942
|
-
};
|
|
1943
|
-
break;
|
|
1944
|
-
case "UnauthorizedException":
|
|
1945
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
1946
|
-
response = {
|
|
1947
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1948
|
-
name: errorCode,
|
|
1949
|
-
$metadata: deserializeMetadata(output),
|
|
1950
|
-
};
|
|
1951
|
-
break;
|
|
1952
|
-
default:
|
|
1953
|
-
const parsedBody = parsedOutput.body;
|
|
1954
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1955
|
-
response = {
|
|
1956
|
-
...parsedBody,
|
|
1957
|
-
name: `${errorCode}`,
|
|
1958
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1959
|
-
$fault: "client",
|
|
1960
|
-
$metadata: deserializeMetadata(output),
|
|
1961
|
-
} as any;
|
|
1962
|
-
}
|
|
1963
|
-
const message = response.message || response.Message || errorCode;
|
|
1964
|
-
response.message = message;
|
|
1965
|
-
delete response.Message;
|
|
1966
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1967
|
-
};
|
|
1968
|
-
|
|
1969
|
-
export const deserializeAws_restJson1DescribeCodeBindingCommand = async (
|
|
1970
|
-
output: __HttpResponse,
|
|
1971
|
-
context: __SerdeContext
|
|
1972
|
-
): Promise<DescribeCodeBindingCommandOutput> => {
|
|
1973
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1974
|
-
return deserializeAws_restJson1DescribeCodeBindingCommandError(output, context);
|
|
1975
|
-
}
|
|
1976
|
-
const contents: DescribeCodeBindingCommandOutput = {
|
|
1977
|
-
$metadata: deserializeMetadata(output),
|
|
1978
|
-
CreationDate: undefined,
|
|
1979
|
-
LastModified: undefined,
|
|
1980
|
-
SchemaVersion: undefined,
|
|
1981
|
-
Status: undefined,
|
|
1982
|
-
};
|
|
1983
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1984
|
-
if (data.CreationDate !== undefined && data.CreationDate !== null) {
|
|
1985
|
-
contents.CreationDate = __expectNonNull(__parseRfc3339DateTime(data.CreationDate));
|
|
1986
|
-
}
|
|
1987
|
-
if (data.LastModified !== undefined && data.LastModified !== null) {
|
|
1988
|
-
contents.LastModified = __expectNonNull(__parseRfc3339DateTime(data.LastModified));
|
|
1989
|
-
}
|
|
1990
|
-
if (data.SchemaVersion !== undefined && data.SchemaVersion !== null) {
|
|
1991
|
-
contents.SchemaVersion = __expectString(data.SchemaVersion);
|
|
1992
|
-
}
|
|
1993
|
-
if (data.Status !== undefined && data.Status !== null) {
|
|
1994
|
-
contents.Status = __expectString(data.Status);
|
|
1995
|
-
}
|
|
1996
|
-
return Promise.resolve(contents);
|
|
1997
|
-
};
|
|
1998
|
-
|
|
1999
|
-
const deserializeAws_restJson1DescribeCodeBindingCommandError = async (
|
|
2000
|
-
output: __HttpResponse,
|
|
2001
|
-
context: __SerdeContext
|
|
2002
|
-
): Promise<DescribeCodeBindingCommandOutput> => {
|
|
2003
|
-
const parsedOutput: any = {
|
|
2004
|
-
...output,
|
|
2005
|
-
body: await parseBody(output.body, context),
|
|
2006
|
-
};
|
|
2007
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2008
|
-
let errorCode: string = "UnknownError";
|
|
2009
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2010
|
-
switch (errorCode) {
|
|
2011
|
-
case "BadRequestException":
|
|
2012
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
2013
|
-
response = {
|
|
2014
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2015
|
-
name: errorCode,
|
|
2016
|
-
$metadata: deserializeMetadata(output),
|
|
2017
|
-
};
|
|
2018
|
-
break;
|
|
2019
|
-
case "ForbiddenException":
|
|
2020
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
2021
|
-
response = {
|
|
2022
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2023
|
-
name: errorCode,
|
|
2024
|
-
$metadata: deserializeMetadata(output),
|
|
2025
|
-
};
|
|
2026
|
-
break;
|
|
2027
|
-
case "InternalServerErrorException":
|
|
2028
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
2029
|
-
response = {
|
|
2030
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2031
|
-
name: errorCode,
|
|
2032
|
-
$metadata: deserializeMetadata(output),
|
|
2033
|
-
};
|
|
2034
|
-
break;
|
|
2035
|
-
case "NotFoundException":
|
|
2036
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
2037
|
-
response = {
|
|
2038
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2039
|
-
name: errorCode,
|
|
2040
|
-
$metadata: deserializeMetadata(output),
|
|
2041
|
-
};
|
|
2042
|
-
break;
|
|
2043
|
-
case "TooManyRequestsException":
|
|
2044
|
-
case "com.amazonaws.schemas#TooManyRequestsException":
|
|
2045
|
-
response = {
|
|
2046
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
2047
|
-
name: errorCode,
|
|
2048
|
-
$metadata: deserializeMetadata(output),
|
|
2049
|
-
};
|
|
2050
|
-
break;
|
|
2051
|
-
case "UnauthorizedException":
|
|
2052
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
2053
|
-
response = {
|
|
2054
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2055
|
-
name: errorCode,
|
|
2056
|
-
$metadata: deserializeMetadata(output),
|
|
2057
|
-
};
|
|
2058
|
-
break;
|
|
2059
|
-
default:
|
|
2060
|
-
const parsedBody = parsedOutput.body;
|
|
2061
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2062
|
-
response = {
|
|
2063
|
-
...parsedBody,
|
|
2064
|
-
name: `${errorCode}`,
|
|
2065
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2066
|
-
$fault: "client",
|
|
2067
|
-
$metadata: deserializeMetadata(output),
|
|
2068
|
-
} as any;
|
|
2069
|
-
}
|
|
2070
|
-
const message = response.message || response.Message || errorCode;
|
|
2071
|
-
response.message = message;
|
|
2072
|
-
delete response.Message;
|
|
2073
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2074
|
-
};
|
|
2075
|
-
|
|
2076
|
-
export const deserializeAws_restJson1DescribeDiscovererCommand = async (
|
|
2077
|
-
output: __HttpResponse,
|
|
2078
|
-
context: __SerdeContext
|
|
2079
|
-
): Promise<DescribeDiscovererCommandOutput> => {
|
|
2080
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2081
|
-
return deserializeAws_restJson1DescribeDiscovererCommandError(output, context);
|
|
2082
|
-
}
|
|
2083
|
-
const contents: DescribeDiscovererCommandOutput = {
|
|
2084
|
-
$metadata: deserializeMetadata(output),
|
|
2085
|
-
CrossAccount: undefined,
|
|
2086
|
-
Description: undefined,
|
|
2087
|
-
DiscovererArn: undefined,
|
|
2088
|
-
DiscovererId: undefined,
|
|
2089
|
-
SourceArn: undefined,
|
|
2090
|
-
State: undefined,
|
|
2091
|
-
Tags: undefined,
|
|
2092
|
-
};
|
|
2093
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2094
|
-
if (data.CrossAccount !== undefined && data.CrossAccount !== null) {
|
|
2095
|
-
contents.CrossAccount = __expectBoolean(data.CrossAccount);
|
|
2096
|
-
}
|
|
2097
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
2098
|
-
contents.Description = __expectString(data.Description);
|
|
2099
|
-
}
|
|
2100
|
-
if (data.DiscovererArn !== undefined && data.DiscovererArn !== null) {
|
|
2101
|
-
contents.DiscovererArn = __expectString(data.DiscovererArn);
|
|
2102
|
-
}
|
|
2103
|
-
if (data.DiscovererId !== undefined && data.DiscovererId !== null) {
|
|
2104
|
-
contents.DiscovererId = __expectString(data.DiscovererId);
|
|
2105
|
-
}
|
|
2106
|
-
if (data.SourceArn !== undefined && data.SourceArn !== null) {
|
|
2107
|
-
contents.SourceArn = __expectString(data.SourceArn);
|
|
2108
|
-
}
|
|
2109
|
-
if (data.State !== undefined && data.State !== null) {
|
|
2110
|
-
contents.State = __expectString(data.State);
|
|
2111
|
-
}
|
|
2112
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
2113
|
-
contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
2114
|
-
}
|
|
2115
|
-
return Promise.resolve(contents);
|
|
2116
|
-
};
|
|
2117
|
-
|
|
2118
|
-
const deserializeAws_restJson1DescribeDiscovererCommandError = async (
|
|
2119
|
-
output: __HttpResponse,
|
|
2120
|
-
context: __SerdeContext
|
|
2121
|
-
): Promise<DescribeDiscovererCommandOutput> => {
|
|
2122
|
-
const parsedOutput: any = {
|
|
2123
|
-
...output,
|
|
2124
|
-
body: await parseBody(output.body, context),
|
|
2125
|
-
};
|
|
2126
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2127
|
-
let errorCode: string = "UnknownError";
|
|
2128
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2129
|
-
switch (errorCode) {
|
|
2130
|
-
case "BadRequestException":
|
|
2131
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
2132
|
-
response = {
|
|
2133
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2134
|
-
name: errorCode,
|
|
2135
|
-
$metadata: deserializeMetadata(output),
|
|
2136
|
-
};
|
|
2137
|
-
break;
|
|
2138
|
-
case "ForbiddenException":
|
|
2139
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
2140
|
-
response = {
|
|
2141
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2142
|
-
name: errorCode,
|
|
2143
|
-
$metadata: deserializeMetadata(output),
|
|
2144
|
-
};
|
|
2145
|
-
break;
|
|
2146
|
-
case "InternalServerErrorException":
|
|
2147
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
2148
|
-
response = {
|
|
2149
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2150
|
-
name: errorCode,
|
|
2151
|
-
$metadata: deserializeMetadata(output),
|
|
2152
|
-
};
|
|
2153
|
-
break;
|
|
2154
|
-
case "NotFoundException":
|
|
2155
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
2156
|
-
response = {
|
|
2157
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2158
|
-
name: errorCode,
|
|
2159
|
-
$metadata: deserializeMetadata(output),
|
|
2160
|
-
};
|
|
2161
|
-
break;
|
|
2162
|
-
case "ServiceUnavailableException":
|
|
2163
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
2164
|
-
response = {
|
|
2165
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2166
|
-
name: errorCode,
|
|
2167
|
-
$metadata: deserializeMetadata(output),
|
|
2168
|
-
};
|
|
2169
|
-
break;
|
|
2170
|
-
case "UnauthorizedException":
|
|
2171
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
2172
|
-
response = {
|
|
2173
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2174
|
-
name: errorCode,
|
|
2175
|
-
$metadata: deserializeMetadata(output),
|
|
2176
|
-
};
|
|
2177
|
-
break;
|
|
2178
|
-
default:
|
|
2179
|
-
const parsedBody = parsedOutput.body;
|
|
2180
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2181
|
-
response = {
|
|
2182
|
-
...parsedBody,
|
|
2183
|
-
name: `${errorCode}`,
|
|
2184
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2185
|
-
$fault: "client",
|
|
2186
|
-
$metadata: deserializeMetadata(output),
|
|
2187
|
-
} as any;
|
|
2188
|
-
}
|
|
2189
|
-
const message = response.message || response.Message || errorCode;
|
|
2190
|
-
response.message = message;
|
|
2191
|
-
delete response.Message;
|
|
2192
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2193
|
-
};
|
|
2194
|
-
|
|
2195
|
-
export const deserializeAws_restJson1DescribeRegistryCommand = async (
|
|
2196
|
-
output: __HttpResponse,
|
|
2197
|
-
context: __SerdeContext
|
|
2198
|
-
): Promise<DescribeRegistryCommandOutput> => {
|
|
2199
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2200
|
-
return deserializeAws_restJson1DescribeRegistryCommandError(output, context);
|
|
2201
|
-
}
|
|
2202
|
-
const contents: DescribeRegistryCommandOutput = {
|
|
2203
|
-
$metadata: deserializeMetadata(output),
|
|
2204
|
-
Description: undefined,
|
|
2205
|
-
RegistryArn: undefined,
|
|
2206
|
-
RegistryName: undefined,
|
|
2207
|
-
Tags: undefined,
|
|
2208
|
-
};
|
|
2209
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2210
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
2211
|
-
contents.Description = __expectString(data.Description);
|
|
2212
|
-
}
|
|
2213
|
-
if (data.RegistryArn !== undefined && data.RegistryArn !== null) {
|
|
2214
|
-
contents.RegistryArn = __expectString(data.RegistryArn);
|
|
2215
|
-
}
|
|
2216
|
-
if (data.RegistryName !== undefined && data.RegistryName !== null) {
|
|
2217
|
-
contents.RegistryName = __expectString(data.RegistryName);
|
|
2218
|
-
}
|
|
2219
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
2220
|
-
contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
2221
|
-
}
|
|
2222
|
-
return Promise.resolve(contents);
|
|
2223
|
-
};
|
|
2224
|
-
|
|
2225
|
-
const deserializeAws_restJson1DescribeRegistryCommandError = async (
|
|
2226
|
-
output: __HttpResponse,
|
|
2227
|
-
context: __SerdeContext
|
|
2228
|
-
): Promise<DescribeRegistryCommandOutput> => {
|
|
2229
|
-
const parsedOutput: any = {
|
|
2230
|
-
...output,
|
|
2231
|
-
body: await parseBody(output.body, context),
|
|
2232
|
-
};
|
|
2233
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2234
|
-
let errorCode: string = "UnknownError";
|
|
2235
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2236
|
-
switch (errorCode) {
|
|
2237
|
-
case "BadRequestException":
|
|
2238
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
2239
|
-
response = {
|
|
2240
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2241
|
-
name: errorCode,
|
|
2242
|
-
$metadata: deserializeMetadata(output),
|
|
2243
|
-
};
|
|
2244
|
-
break;
|
|
2245
|
-
case "ForbiddenException":
|
|
2246
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
2247
|
-
response = {
|
|
2248
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2249
|
-
name: errorCode,
|
|
2250
|
-
$metadata: deserializeMetadata(output),
|
|
2251
|
-
};
|
|
2252
|
-
break;
|
|
2253
|
-
case "InternalServerErrorException":
|
|
2254
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
2255
|
-
response = {
|
|
2256
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2257
|
-
name: errorCode,
|
|
2258
|
-
$metadata: deserializeMetadata(output),
|
|
2259
|
-
};
|
|
2260
|
-
break;
|
|
2261
|
-
case "NotFoundException":
|
|
2262
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
2263
|
-
response = {
|
|
2264
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2265
|
-
name: errorCode,
|
|
2266
|
-
$metadata: deserializeMetadata(output),
|
|
2267
|
-
};
|
|
2268
|
-
break;
|
|
2269
|
-
case "ServiceUnavailableException":
|
|
2270
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
2271
|
-
response = {
|
|
2272
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2273
|
-
name: errorCode,
|
|
2274
|
-
$metadata: deserializeMetadata(output),
|
|
2275
|
-
};
|
|
2276
|
-
break;
|
|
2277
|
-
case "UnauthorizedException":
|
|
2278
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
2279
|
-
response = {
|
|
2280
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2281
|
-
name: errorCode,
|
|
2282
|
-
$metadata: deserializeMetadata(output),
|
|
2283
|
-
};
|
|
2284
|
-
break;
|
|
2285
|
-
default:
|
|
2286
|
-
const parsedBody = parsedOutput.body;
|
|
2287
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2288
|
-
response = {
|
|
2289
|
-
...parsedBody,
|
|
2290
|
-
name: `${errorCode}`,
|
|
2291
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2292
|
-
$fault: "client",
|
|
2293
|
-
$metadata: deserializeMetadata(output),
|
|
2294
|
-
} as any;
|
|
2295
|
-
}
|
|
2296
|
-
const message = response.message || response.Message || errorCode;
|
|
2297
|
-
response.message = message;
|
|
2298
|
-
delete response.Message;
|
|
2299
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2300
|
-
};
|
|
2301
|
-
|
|
2302
|
-
export const deserializeAws_restJson1DescribeSchemaCommand = async (
|
|
2303
|
-
output: __HttpResponse,
|
|
2304
|
-
context: __SerdeContext
|
|
2305
|
-
): Promise<DescribeSchemaCommandOutput> => {
|
|
2306
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2307
|
-
return deserializeAws_restJson1DescribeSchemaCommandError(output, context);
|
|
2308
|
-
}
|
|
2309
|
-
const contents: DescribeSchemaCommandOutput = {
|
|
2310
|
-
$metadata: deserializeMetadata(output),
|
|
2311
|
-
Content: undefined,
|
|
2312
|
-
Description: undefined,
|
|
2313
|
-
LastModified: undefined,
|
|
2314
|
-
SchemaArn: undefined,
|
|
2315
|
-
SchemaName: undefined,
|
|
2316
|
-
SchemaVersion: undefined,
|
|
2317
|
-
Tags: undefined,
|
|
2318
|
-
Type: undefined,
|
|
2319
|
-
VersionCreatedDate: undefined,
|
|
2320
|
-
};
|
|
2321
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2322
|
-
if (data.Content !== undefined && data.Content !== null) {
|
|
2323
|
-
contents.Content = __expectString(data.Content);
|
|
2324
|
-
}
|
|
2325
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
2326
|
-
contents.Description = __expectString(data.Description);
|
|
2327
|
-
}
|
|
2328
|
-
if (data.LastModified !== undefined && data.LastModified !== null) {
|
|
2329
|
-
contents.LastModified = __expectNonNull(__parseRfc3339DateTime(data.LastModified));
|
|
2330
|
-
}
|
|
2331
|
-
if (data.SchemaArn !== undefined && data.SchemaArn !== null) {
|
|
2332
|
-
contents.SchemaArn = __expectString(data.SchemaArn);
|
|
2333
|
-
}
|
|
2334
|
-
if (data.SchemaName !== undefined && data.SchemaName !== null) {
|
|
2335
|
-
contents.SchemaName = __expectString(data.SchemaName);
|
|
2336
|
-
}
|
|
2337
|
-
if (data.SchemaVersion !== undefined && data.SchemaVersion !== null) {
|
|
2338
|
-
contents.SchemaVersion = __expectString(data.SchemaVersion);
|
|
2339
|
-
}
|
|
2340
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
2341
|
-
contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
2342
|
-
}
|
|
2343
|
-
if (data.Type !== undefined && data.Type !== null) {
|
|
2344
|
-
contents.Type = __expectString(data.Type);
|
|
2345
|
-
}
|
|
2346
|
-
if (data.VersionCreatedDate !== undefined && data.VersionCreatedDate !== null) {
|
|
2347
|
-
contents.VersionCreatedDate = __expectNonNull(__parseRfc3339DateTime(data.VersionCreatedDate));
|
|
2348
|
-
}
|
|
2349
|
-
return Promise.resolve(contents);
|
|
2350
|
-
};
|
|
2351
|
-
|
|
2352
|
-
const deserializeAws_restJson1DescribeSchemaCommandError = async (
|
|
2353
|
-
output: __HttpResponse,
|
|
2354
|
-
context: __SerdeContext
|
|
2355
|
-
): Promise<DescribeSchemaCommandOutput> => {
|
|
2356
|
-
const parsedOutput: any = {
|
|
2357
|
-
...output,
|
|
2358
|
-
body: await parseBody(output.body, context),
|
|
2359
|
-
};
|
|
2360
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2361
|
-
let errorCode: string = "UnknownError";
|
|
2362
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2363
|
-
switch (errorCode) {
|
|
2364
|
-
case "BadRequestException":
|
|
2365
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
2366
|
-
response = {
|
|
2367
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2368
|
-
name: errorCode,
|
|
2369
|
-
$metadata: deserializeMetadata(output),
|
|
2370
|
-
};
|
|
2371
|
-
break;
|
|
2372
|
-
case "ForbiddenException":
|
|
2373
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
2374
|
-
response = {
|
|
2375
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2376
|
-
name: errorCode,
|
|
2377
|
-
$metadata: deserializeMetadata(output),
|
|
2378
|
-
};
|
|
2379
|
-
break;
|
|
2380
|
-
case "InternalServerErrorException":
|
|
2381
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
2382
|
-
response = {
|
|
2383
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2384
|
-
name: errorCode,
|
|
2385
|
-
$metadata: deserializeMetadata(output),
|
|
2386
|
-
};
|
|
2387
|
-
break;
|
|
2388
|
-
case "NotFoundException":
|
|
2389
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
2390
|
-
response = {
|
|
2391
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2392
|
-
name: errorCode,
|
|
2393
|
-
$metadata: deserializeMetadata(output),
|
|
2394
|
-
};
|
|
2395
|
-
break;
|
|
2396
|
-
case "ServiceUnavailableException":
|
|
2397
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
2398
|
-
response = {
|
|
2399
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2400
|
-
name: errorCode,
|
|
2401
|
-
$metadata: deserializeMetadata(output),
|
|
2402
|
-
};
|
|
2403
|
-
break;
|
|
2404
|
-
case "UnauthorizedException":
|
|
2405
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
2406
|
-
response = {
|
|
2407
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2408
|
-
name: errorCode,
|
|
2409
|
-
$metadata: deserializeMetadata(output),
|
|
2410
|
-
};
|
|
2411
|
-
break;
|
|
2412
|
-
default:
|
|
2413
|
-
const parsedBody = parsedOutput.body;
|
|
2414
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2415
|
-
response = {
|
|
2416
|
-
...parsedBody,
|
|
2417
|
-
name: `${errorCode}`,
|
|
2418
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2419
|
-
$fault: "client",
|
|
2420
|
-
$metadata: deserializeMetadata(output),
|
|
2421
|
-
} as any;
|
|
2422
|
-
}
|
|
2423
|
-
const message = response.message || response.Message || errorCode;
|
|
2424
|
-
response.message = message;
|
|
2425
|
-
delete response.Message;
|
|
2426
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2427
|
-
};
|
|
2428
|
-
|
|
2429
|
-
export const deserializeAws_restJson1ExportSchemaCommand = async (
|
|
2430
|
-
output: __HttpResponse,
|
|
2431
|
-
context: __SerdeContext
|
|
2432
|
-
): Promise<ExportSchemaCommandOutput> => {
|
|
2433
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2434
|
-
return deserializeAws_restJson1ExportSchemaCommandError(output, context);
|
|
2435
|
-
}
|
|
2436
|
-
const contents: ExportSchemaCommandOutput = {
|
|
2437
|
-
$metadata: deserializeMetadata(output),
|
|
2438
|
-
Content: undefined,
|
|
2439
|
-
SchemaArn: undefined,
|
|
2440
|
-
SchemaName: undefined,
|
|
2441
|
-
SchemaVersion: undefined,
|
|
2442
|
-
Type: undefined,
|
|
2443
|
-
};
|
|
2444
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2445
|
-
if (data.Content !== undefined && data.Content !== null) {
|
|
2446
|
-
contents.Content = __expectString(data.Content);
|
|
2447
|
-
}
|
|
2448
|
-
if (data.SchemaArn !== undefined && data.SchemaArn !== null) {
|
|
2449
|
-
contents.SchemaArn = __expectString(data.SchemaArn);
|
|
2450
|
-
}
|
|
2451
|
-
if (data.SchemaName !== undefined && data.SchemaName !== null) {
|
|
2452
|
-
contents.SchemaName = __expectString(data.SchemaName);
|
|
2453
|
-
}
|
|
2454
|
-
if (data.SchemaVersion !== undefined && data.SchemaVersion !== null) {
|
|
2455
|
-
contents.SchemaVersion = __expectString(data.SchemaVersion);
|
|
2456
|
-
}
|
|
2457
|
-
if (data.Type !== undefined && data.Type !== null) {
|
|
2458
|
-
contents.Type = __expectString(data.Type);
|
|
2459
|
-
}
|
|
2460
|
-
return Promise.resolve(contents);
|
|
2461
|
-
};
|
|
2462
|
-
|
|
2463
|
-
const deserializeAws_restJson1ExportSchemaCommandError = async (
|
|
2464
|
-
output: __HttpResponse,
|
|
2465
|
-
context: __SerdeContext
|
|
2466
|
-
): Promise<ExportSchemaCommandOutput> => {
|
|
2467
|
-
const parsedOutput: any = {
|
|
2468
|
-
...output,
|
|
2469
|
-
body: await parseBody(output.body, context),
|
|
2470
|
-
};
|
|
2471
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2472
|
-
let errorCode: string = "UnknownError";
|
|
2473
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2474
|
-
switch (errorCode) {
|
|
2475
|
-
case "BadRequestException":
|
|
2476
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
2477
|
-
response = {
|
|
2478
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2479
|
-
name: errorCode,
|
|
2480
|
-
$metadata: deserializeMetadata(output),
|
|
2481
|
-
};
|
|
2482
|
-
break;
|
|
2483
|
-
case "ForbiddenException":
|
|
2484
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
2485
|
-
response = {
|
|
2486
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2487
|
-
name: errorCode,
|
|
2488
|
-
$metadata: deserializeMetadata(output),
|
|
2489
|
-
};
|
|
2490
|
-
break;
|
|
2491
|
-
case "InternalServerErrorException":
|
|
2492
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
2493
|
-
response = {
|
|
2494
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2495
|
-
name: errorCode,
|
|
2496
|
-
$metadata: deserializeMetadata(output),
|
|
2497
|
-
};
|
|
2498
|
-
break;
|
|
2499
|
-
case "NotFoundException":
|
|
2500
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
2501
|
-
response = {
|
|
2502
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2503
|
-
name: errorCode,
|
|
2504
|
-
$metadata: deserializeMetadata(output),
|
|
2505
|
-
};
|
|
2506
|
-
break;
|
|
2507
|
-
case "ServiceUnavailableException":
|
|
2508
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
2509
|
-
response = {
|
|
2510
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2511
|
-
name: errorCode,
|
|
2512
|
-
$metadata: deserializeMetadata(output),
|
|
2513
|
-
};
|
|
2514
|
-
break;
|
|
2515
|
-
case "TooManyRequestsException":
|
|
2516
|
-
case "com.amazonaws.schemas#TooManyRequestsException":
|
|
2517
|
-
response = {
|
|
2518
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
2519
|
-
name: errorCode,
|
|
2520
|
-
$metadata: deserializeMetadata(output),
|
|
2521
|
-
};
|
|
2522
|
-
break;
|
|
2523
|
-
case "UnauthorizedException":
|
|
2524
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
2525
|
-
response = {
|
|
2526
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2527
|
-
name: errorCode,
|
|
2528
|
-
$metadata: deserializeMetadata(output),
|
|
2529
|
-
};
|
|
2530
|
-
break;
|
|
2531
|
-
default:
|
|
2532
|
-
const parsedBody = parsedOutput.body;
|
|
2533
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2534
|
-
response = {
|
|
2535
|
-
...parsedBody,
|
|
2536
|
-
name: `${errorCode}`,
|
|
2537
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2538
|
-
$fault: "client",
|
|
2539
|
-
$metadata: deserializeMetadata(output),
|
|
2540
|
-
} as any;
|
|
2541
|
-
}
|
|
2542
|
-
const message = response.message || response.Message || errorCode;
|
|
2543
|
-
response.message = message;
|
|
2544
|
-
delete response.Message;
|
|
2545
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2546
|
-
};
|
|
2547
|
-
|
|
2548
|
-
export const deserializeAws_restJson1GetCodeBindingSourceCommand = async (
|
|
2549
|
-
output: __HttpResponse,
|
|
2550
|
-
context: __SerdeContext
|
|
2551
|
-
): Promise<GetCodeBindingSourceCommandOutput> => {
|
|
2552
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2553
|
-
return deserializeAws_restJson1GetCodeBindingSourceCommandError(output, context);
|
|
2554
|
-
}
|
|
2555
|
-
const contents: GetCodeBindingSourceCommandOutput = {
|
|
2556
|
-
$metadata: deserializeMetadata(output),
|
|
2557
|
-
Body: undefined,
|
|
2558
|
-
};
|
|
2559
|
-
const data: any = await collectBody(output.body, context);
|
|
2560
|
-
contents.Body = data;
|
|
2561
|
-
return Promise.resolve(contents);
|
|
2562
|
-
};
|
|
2563
|
-
|
|
2564
|
-
const deserializeAws_restJson1GetCodeBindingSourceCommandError = async (
|
|
2565
|
-
output: __HttpResponse,
|
|
2566
|
-
context: __SerdeContext
|
|
2567
|
-
): Promise<GetCodeBindingSourceCommandOutput> => {
|
|
2568
|
-
const parsedOutput: any = {
|
|
2569
|
-
...output,
|
|
2570
|
-
body: await parseBody(output.body, context),
|
|
2571
|
-
};
|
|
2572
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2573
|
-
let errorCode: string = "UnknownError";
|
|
2574
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2575
|
-
switch (errorCode) {
|
|
2576
|
-
case "BadRequestException":
|
|
2577
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
2578
|
-
response = {
|
|
2579
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2580
|
-
name: errorCode,
|
|
2581
|
-
$metadata: deserializeMetadata(output),
|
|
2582
|
-
};
|
|
2583
|
-
break;
|
|
2584
|
-
case "ForbiddenException":
|
|
2585
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
2586
|
-
response = {
|
|
2587
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2588
|
-
name: errorCode,
|
|
2589
|
-
$metadata: deserializeMetadata(output),
|
|
2590
|
-
};
|
|
2591
|
-
break;
|
|
2592
|
-
case "InternalServerErrorException":
|
|
2593
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
2594
|
-
response = {
|
|
2595
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2596
|
-
name: errorCode,
|
|
2597
|
-
$metadata: deserializeMetadata(output),
|
|
2598
|
-
};
|
|
2599
|
-
break;
|
|
2600
|
-
case "NotFoundException":
|
|
2601
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
2602
|
-
response = {
|
|
2603
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2604
|
-
name: errorCode,
|
|
2605
|
-
$metadata: deserializeMetadata(output),
|
|
2606
|
-
};
|
|
2607
|
-
break;
|
|
2608
|
-
case "TooManyRequestsException":
|
|
2609
|
-
case "com.amazonaws.schemas#TooManyRequestsException":
|
|
2610
|
-
response = {
|
|
2611
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
2612
|
-
name: errorCode,
|
|
2613
|
-
$metadata: deserializeMetadata(output),
|
|
2614
|
-
};
|
|
2615
|
-
break;
|
|
2616
|
-
case "UnauthorizedException":
|
|
2617
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
2618
|
-
response = {
|
|
2619
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2620
|
-
name: errorCode,
|
|
2621
|
-
$metadata: deserializeMetadata(output),
|
|
2622
|
-
};
|
|
2623
|
-
break;
|
|
2624
|
-
default:
|
|
2625
|
-
const parsedBody = parsedOutput.body;
|
|
2626
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2627
|
-
response = {
|
|
2628
|
-
...parsedBody,
|
|
2629
|
-
name: `${errorCode}`,
|
|
2630
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2631
|
-
$fault: "client",
|
|
2632
|
-
$metadata: deserializeMetadata(output),
|
|
2633
|
-
} as any;
|
|
2634
|
-
}
|
|
2635
|
-
const message = response.message || response.Message || errorCode;
|
|
2636
|
-
response.message = message;
|
|
2637
|
-
delete response.Message;
|
|
2638
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2639
|
-
};
|
|
2640
|
-
|
|
2641
|
-
export const deserializeAws_restJson1GetDiscoveredSchemaCommand = async (
|
|
2642
|
-
output: __HttpResponse,
|
|
2643
|
-
context: __SerdeContext
|
|
2644
|
-
): Promise<GetDiscoveredSchemaCommandOutput> => {
|
|
2645
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2646
|
-
return deserializeAws_restJson1GetDiscoveredSchemaCommandError(output, context);
|
|
2647
|
-
}
|
|
2648
|
-
const contents: GetDiscoveredSchemaCommandOutput = {
|
|
2649
|
-
$metadata: deserializeMetadata(output),
|
|
2650
|
-
Content: undefined,
|
|
2651
|
-
};
|
|
2652
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2653
|
-
if (data.Content !== undefined && data.Content !== null) {
|
|
2654
|
-
contents.Content = __expectString(data.Content);
|
|
2655
|
-
}
|
|
2656
|
-
return Promise.resolve(contents);
|
|
2657
|
-
};
|
|
2658
|
-
|
|
2659
|
-
const deserializeAws_restJson1GetDiscoveredSchemaCommandError = async (
|
|
2660
|
-
output: __HttpResponse,
|
|
2661
|
-
context: __SerdeContext
|
|
2662
|
-
): Promise<GetDiscoveredSchemaCommandOutput> => {
|
|
2663
|
-
const parsedOutput: any = {
|
|
2664
|
-
...output,
|
|
2665
|
-
body: await parseBody(output.body, context),
|
|
2666
|
-
};
|
|
2667
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2668
|
-
let errorCode: string = "UnknownError";
|
|
2669
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2670
|
-
switch (errorCode) {
|
|
2671
|
-
case "BadRequestException":
|
|
2672
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
2673
|
-
response = {
|
|
2674
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2675
|
-
name: errorCode,
|
|
2676
|
-
$metadata: deserializeMetadata(output),
|
|
2677
|
-
};
|
|
2678
|
-
break;
|
|
2679
|
-
case "ForbiddenException":
|
|
2680
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
2681
|
-
response = {
|
|
2682
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2683
|
-
name: errorCode,
|
|
2684
|
-
$metadata: deserializeMetadata(output),
|
|
2685
|
-
};
|
|
2686
|
-
break;
|
|
2687
|
-
case "InternalServerErrorException":
|
|
2688
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
2689
|
-
response = {
|
|
2690
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2691
|
-
name: errorCode,
|
|
2692
|
-
$metadata: deserializeMetadata(output),
|
|
2693
|
-
};
|
|
2694
|
-
break;
|
|
2695
|
-
case "ServiceUnavailableException":
|
|
2696
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
2697
|
-
response = {
|
|
2698
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2699
|
-
name: errorCode,
|
|
2700
|
-
$metadata: deserializeMetadata(output),
|
|
2701
|
-
};
|
|
2702
|
-
break;
|
|
2703
|
-
case "UnauthorizedException":
|
|
2704
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
2705
|
-
response = {
|
|
2706
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2707
|
-
name: errorCode,
|
|
2708
|
-
$metadata: deserializeMetadata(output),
|
|
2709
|
-
};
|
|
2710
|
-
break;
|
|
2711
|
-
default:
|
|
2712
|
-
const parsedBody = parsedOutput.body;
|
|
2713
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2714
|
-
response = {
|
|
2715
|
-
...parsedBody,
|
|
2716
|
-
name: `${errorCode}`,
|
|
2717
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2718
|
-
$fault: "client",
|
|
2719
|
-
$metadata: deserializeMetadata(output),
|
|
2720
|
-
} as any;
|
|
2721
|
-
}
|
|
2722
|
-
const message = response.message || response.Message || errorCode;
|
|
2723
|
-
response.message = message;
|
|
2724
|
-
delete response.Message;
|
|
2725
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2726
|
-
};
|
|
2727
|
-
|
|
2728
|
-
export const deserializeAws_restJson1GetResourcePolicyCommand = async (
|
|
2729
|
-
output: __HttpResponse,
|
|
2730
|
-
context: __SerdeContext
|
|
2731
|
-
): Promise<GetResourcePolicyCommandOutput> => {
|
|
2732
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2733
|
-
return deserializeAws_restJson1GetResourcePolicyCommandError(output, context);
|
|
2734
|
-
}
|
|
2735
|
-
const contents: GetResourcePolicyCommandOutput = {
|
|
2736
|
-
$metadata: deserializeMetadata(output),
|
|
2737
|
-
Policy: undefined,
|
|
2738
|
-
RevisionId: undefined,
|
|
2739
|
-
};
|
|
2740
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2741
|
-
if (data.Policy !== undefined && data.Policy !== null) {
|
|
2742
|
-
contents.Policy = new __LazyJsonString(data.Policy);
|
|
2743
|
-
}
|
|
2744
|
-
if (data.RevisionId !== undefined && data.RevisionId !== null) {
|
|
2745
|
-
contents.RevisionId = __expectString(data.RevisionId);
|
|
2746
|
-
}
|
|
2747
|
-
return Promise.resolve(contents);
|
|
2748
|
-
};
|
|
2749
|
-
|
|
2750
|
-
const deserializeAws_restJson1GetResourcePolicyCommandError = async (
|
|
2751
|
-
output: __HttpResponse,
|
|
2752
|
-
context: __SerdeContext
|
|
2753
|
-
): Promise<GetResourcePolicyCommandOutput> => {
|
|
2754
|
-
const parsedOutput: any = {
|
|
2755
|
-
...output,
|
|
2756
|
-
body: await parseBody(output.body, context),
|
|
2757
|
-
};
|
|
2758
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2759
|
-
let errorCode: string = "UnknownError";
|
|
2760
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2761
|
-
switch (errorCode) {
|
|
2762
|
-
case "BadRequestException":
|
|
2763
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
2764
|
-
response = {
|
|
2765
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2766
|
-
name: errorCode,
|
|
2767
|
-
$metadata: deserializeMetadata(output),
|
|
2768
|
-
};
|
|
2769
|
-
break;
|
|
2770
|
-
case "ForbiddenException":
|
|
2771
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
2772
|
-
response = {
|
|
2773
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2774
|
-
name: errorCode,
|
|
2775
|
-
$metadata: deserializeMetadata(output),
|
|
2776
|
-
};
|
|
2777
|
-
break;
|
|
2778
|
-
case "InternalServerErrorException":
|
|
2779
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
2780
|
-
response = {
|
|
2781
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2782
|
-
name: errorCode,
|
|
2783
|
-
$metadata: deserializeMetadata(output),
|
|
2784
|
-
};
|
|
2785
|
-
break;
|
|
2786
|
-
case "NotFoundException":
|
|
2787
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
2788
|
-
response = {
|
|
2789
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2790
|
-
name: errorCode,
|
|
2791
|
-
$metadata: deserializeMetadata(output),
|
|
2792
|
-
};
|
|
2793
|
-
break;
|
|
2794
|
-
case "ServiceUnavailableException":
|
|
2795
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
2796
|
-
response = {
|
|
2797
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2798
|
-
name: errorCode,
|
|
2799
|
-
$metadata: deserializeMetadata(output),
|
|
2800
|
-
};
|
|
2801
|
-
break;
|
|
2802
|
-
case "UnauthorizedException":
|
|
2803
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
2804
|
-
response = {
|
|
2805
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2806
|
-
name: errorCode,
|
|
2807
|
-
$metadata: deserializeMetadata(output),
|
|
2808
|
-
};
|
|
2809
|
-
break;
|
|
2810
|
-
default:
|
|
2811
|
-
const parsedBody = parsedOutput.body;
|
|
2812
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2813
|
-
response = {
|
|
2814
|
-
...parsedBody,
|
|
2815
|
-
name: `${errorCode}`,
|
|
2816
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2817
|
-
$fault: "client",
|
|
2818
|
-
$metadata: deserializeMetadata(output),
|
|
2819
|
-
} as any;
|
|
2820
|
-
}
|
|
2821
|
-
const message = response.message || response.Message || errorCode;
|
|
2822
|
-
response.message = message;
|
|
2823
|
-
delete response.Message;
|
|
2824
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2825
|
-
};
|
|
2826
|
-
|
|
2827
|
-
export const deserializeAws_restJson1ListDiscoverersCommand = async (
|
|
2828
|
-
output: __HttpResponse,
|
|
2829
|
-
context: __SerdeContext
|
|
2830
|
-
): Promise<ListDiscoverersCommandOutput> => {
|
|
2831
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2832
|
-
return deserializeAws_restJson1ListDiscoverersCommandError(output, context);
|
|
2833
|
-
}
|
|
2834
|
-
const contents: ListDiscoverersCommandOutput = {
|
|
2835
|
-
$metadata: deserializeMetadata(output),
|
|
2836
|
-
Discoverers: undefined,
|
|
2837
|
-
NextToken: undefined,
|
|
2838
|
-
};
|
|
2839
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2840
|
-
if (data.Discoverers !== undefined && data.Discoverers !== null) {
|
|
2841
|
-
contents.Discoverers = deserializeAws_restJson1__listOfDiscovererSummary(data.Discoverers, context);
|
|
2842
|
-
}
|
|
2843
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
2844
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
2845
|
-
}
|
|
2846
|
-
return Promise.resolve(contents);
|
|
2847
|
-
};
|
|
2848
|
-
|
|
2849
|
-
const deserializeAws_restJson1ListDiscoverersCommandError = async (
|
|
2850
|
-
output: __HttpResponse,
|
|
2851
|
-
context: __SerdeContext
|
|
2852
|
-
): Promise<ListDiscoverersCommandOutput> => {
|
|
2853
|
-
const parsedOutput: any = {
|
|
2854
|
-
...output,
|
|
2855
|
-
body: await parseBody(output.body, context),
|
|
2856
|
-
};
|
|
2857
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2858
|
-
let errorCode: string = "UnknownError";
|
|
2859
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2860
|
-
switch (errorCode) {
|
|
2861
|
-
case "BadRequestException":
|
|
2862
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
2863
|
-
response = {
|
|
2864
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2865
|
-
name: errorCode,
|
|
2866
|
-
$metadata: deserializeMetadata(output),
|
|
2867
|
-
};
|
|
2868
|
-
break;
|
|
2869
|
-
case "ForbiddenException":
|
|
2870
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
2871
|
-
response = {
|
|
2872
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2873
|
-
name: errorCode,
|
|
2874
|
-
$metadata: deserializeMetadata(output),
|
|
2875
|
-
};
|
|
2876
|
-
break;
|
|
2877
|
-
case "InternalServerErrorException":
|
|
2878
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
2879
|
-
response = {
|
|
2880
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2881
|
-
name: errorCode,
|
|
2882
|
-
$metadata: deserializeMetadata(output),
|
|
2883
|
-
};
|
|
2884
|
-
break;
|
|
2885
|
-
case "ServiceUnavailableException":
|
|
2886
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
2887
|
-
response = {
|
|
2888
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2889
|
-
name: errorCode,
|
|
2890
|
-
$metadata: deserializeMetadata(output),
|
|
2891
|
-
};
|
|
2892
|
-
break;
|
|
2893
|
-
case "UnauthorizedException":
|
|
2894
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
2895
|
-
response = {
|
|
2896
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2897
|
-
name: errorCode,
|
|
2898
|
-
$metadata: deserializeMetadata(output),
|
|
2899
|
-
};
|
|
2900
|
-
break;
|
|
2901
|
-
default:
|
|
2902
|
-
const parsedBody = parsedOutput.body;
|
|
2903
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2904
|
-
response = {
|
|
2905
|
-
...parsedBody,
|
|
2906
|
-
name: `${errorCode}`,
|
|
2907
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2908
|
-
$fault: "client",
|
|
2909
|
-
$metadata: deserializeMetadata(output),
|
|
2910
|
-
} as any;
|
|
2911
|
-
}
|
|
2912
|
-
const message = response.message || response.Message || errorCode;
|
|
2913
|
-
response.message = message;
|
|
2914
|
-
delete response.Message;
|
|
2915
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2916
|
-
};
|
|
2917
|
-
|
|
2918
|
-
export const deserializeAws_restJson1ListRegistriesCommand = async (
|
|
2919
|
-
output: __HttpResponse,
|
|
2920
|
-
context: __SerdeContext
|
|
2921
|
-
): Promise<ListRegistriesCommandOutput> => {
|
|
2922
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2923
|
-
return deserializeAws_restJson1ListRegistriesCommandError(output, context);
|
|
2924
|
-
}
|
|
2925
|
-
const contents: ListRegistriesCommandOutput = {
|
|
2926
|
-
$metadata: deserializeMetadata(output),
|
|
2927
|
-
NextToken: undefined,
|
|
2928
|
-
Registries: undefined,
|
|
2929
|
-
};
|
|
2930
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2931
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
2932
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
2933
|
-
}
|
|
2934
|
-
if (data.Registries !== undefined && data.Registries !== null) {
|
|
2935
|
-
contents.Registries = deserializeAws_restJson1__listOfRegistrySummary(data.Registries, context);
|
|
2936
|
-
}
|
|
2937
|
-
return Promise.resolve(contents);
|
|
2938
|
-
};
|
|
2939
|
-
|
|
2940
|
-
const deserializeAws_restJson1ListRegistriesCommandError = async (
|
|
2941
|
-
output: __HttpResponse,
|
|
2942
|
-
context: __SerdeContext
|
|
2943
|
-
): Promise<ListRegistriesCommandOutput> => {
|
|
2944
|
-
const parsedOutput: any = {
|
|
2945
|
-
...output,
|
|
2946
|
-
body: await parseBody(output.body, context),
|
|
2947
|
-
};
|
|
2948
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2949
|
-
let errorCode: string = "UnknownError";
|
|
2950
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2951
|
-
switch (errorCode) {
|
|
2952
|
-
case "BadRequestException":
|
|
2953
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
2954
|
-
response = {
|
|
2955
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2956
|
-
name: errorCode,
|
|
2957
|
-
$metadata: deserializeMetadata(output),
|
|
2958
|
-
};
|
|
2959
|
-
break;
|
|
2960
|
-
case "ForbiddenException":
|
|
2961
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
2962
|
-
response = {
|
|
2963
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2964
|
-
name: errorCode,
|
|
2965
|
-
$metadata: deserializeMetadata(output),
|
|
2966
|
-
};
|
|
2967
|
-
break;
|
|
2968
|
-
case "InternalServerErrorException":
|
|
2969
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
2970
|
-
response = {
|
|
2971
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2972
|
-
name: errorCode,
|
|
2973
|
-
$metadata: deserializeMetadata(output),
|
|
2974
|
-
};
|
|
2975
|
-
break;
|
|
2976
|
-
case "ServiceUnavailableException":
|
|
2977
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
2978
|
-
response = {
|
|
2979
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2980
|
-
name: errorCode,
|
|
2981
|
-
$metadata: deserializeMetadata(output),
|
|
2982
|
-
};
|
|
2983
|
-
break;
|
|
2984
|
-
case "UnauthorizedException":
|
|
2985
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
2986
|
-
response = {
|
|
2987
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2988
|
-
name: errorCode,
|
|
2989
|
-
$metadata: deserializeMetadata(output),
|
|
2990
|
-
};
|
|
2991
|
-
break;
|
|
2992
|
-
default:
|
|
2993
|
-
const parsedBody = parsedOutput.body;
|
|
2994
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2995
|
-
response = {
|
|
2996
|
-
...parsedBody,
|
|
2997
|
-
name: `${errorCode}`,
|
|
2998
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2999
|
-
$fault: "client",
|
|
3000
|
-
$metadata: deserializeMetadata(output),
|
|
3001
|
-
} as any;
|
|
3002
|
-
}
|
|
3003
|
-
const message = response.message || response.Message || errorCode;
|
|
3004
|
-
response.message = message;
|
|
3005
|
-
delete response.Message;
|
|
3006
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3007
|
-
};
|
|
3008
|
-
|
|
3009
|
-
export const deserializeAws_restJson1ListSchemasCommand = async (
|
|
3010
|
-
output: __HttpResponse,
|
|
3011
|
-
context: __SerdeContext
|
|
3012
|
-
): Promise<ListSchemasCommandOutput> => {
|
|
3013
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3014
|
-
return deserializeAws_restJson1ListSchemasCommandError(output, context);
|
|
3015
|
-
}
|
|
3016
|
-
const contents: ListSchemasCommandOutput = {
|
|
3017
|
-
$metadata: deserializeMetadata(output),
|
|
3018
|
-
NextToken: undefined,
|
|
3019
|
-
Schemas: undefined,
|
|
3020
|
-
};
|
|
3021
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3022
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
3023
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
3024
|
-
}
|
|
3025
|
-
if (data.Schemas !== undefined && data.Schemas !== null) {
|
|
3026
|
-
contents.Schemas = deserializeAws_restJson1__listOfSchemaSummary(data.Schemas, context);
|
|
3027
|
-
}
|
|
3028
|
-
return Promise.resolve(contents);
|
|
3029
|
-
};
|
|
3030
|
-
|
|
3031
|
-
const deserializeAws_restJson1ListSchemasCommandError = async (
|
|
3032
|
-
output: __HttpResponse,
|
|
3033
|
-
context: __SerdeContext
|
|
3034
|
-
): Promise<ListSchemasCommandOutput> => {
|
|
3035
|
-
const parsedOutput: any = {
|
|
3036
|
-
...output,
|
|
3037
|
-
body: await parseBody(output.body, context),
|
|
3038
|
-
};
|
|
3039
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3040
|
-
let errorCode: string = "UnknownError";
|
|
3041
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3042
|
-
switch (errorCode) {
|
|
3043
|
-
case "BadRequestException":
|
|
3044
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
3045
|
-
response = {
|
|
3046
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3047
|
-
name: errorCode,
|
|
3048
|
-
$metadata: deserializeMetadata(output),
|
|
3049
|
-
};
|
|
3050
|
-
break;
|
|
3051
|
-
case "ForbiddenException":
|
|
3052
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
3053
|
-
response = {
|
|
3054
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
3055
|
-
name: errorCode,
|
|
3056
|
-
$metadata: deserializeMetadata(output),
|
|
3057
|
-
};
|
|
3058
|
-
break;
|
|
3059
|
-
case "InternalServerErrorException":
|
|
3060
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
3061
|
-
response = {
|
|
3062
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3063
|
-
name: errorCode,
|
|
3064
|
-
$metadata: deserializeMetadata(output),
|
|
3065
|
-
};
|
|
3066
|
-
break;
|
|
3067
|
-
case "ServiceUnavailableException":
|
|
3068
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
3069
|
-
response = {
|
|
3070
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3071
|
-
name: errorCode,
|
|
3072
|
-
$metadata: deserializeMetadata(output),
|
|
3073
|
-
};
|
|
3074
|
-
break;
|
|
3075
|
-
case "UnauthorizedException":
|
|
3076
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
3077
|
-
response = {
|
|
3078
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
3079
|
-
name: errorCode,
|
|
3080
|
-
$metadata: deserializeMetadata(output),
|
|
3081
|
-
};
|
|
3082
|
-
break;
|
|
3083
|
-
default:
|
|
3084
|
-
const parsedBody = parsedOutput.body;
|
|
3085
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3086
|
-
response = {
|
|
3087
|
-
...parsedBody,
|
|
3088
|
-
name: `${errorCode}`,
|
|
3089
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3090
|
-
$fault: "client",
|
|
3091
|
-
$metadata: deserializeMetadata(output),
|
|
3092
|
-
} as any;
|
|
3093
|
-
}
|
|
3094
|
-
const message = response.message || response.Message || errorCode;
|
|
3095
|
-
response.message = message;
|
|
3096
|
-
delete response.Message;
|
|
3097
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3098
|
-
};
|
|
3099
|
-
|
|
3100
|
-
export const deserializeAws_restJson1ListSchemaVersionsCommand = async (
|
|
3101
|
-
output: __HttpResponse,
|
|
3102
|
-
context: __SerdeContext
|
|
3103
|
-
): Promise<ListSchemaVersionsCommandOutput> => {
|
|
3104
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3105
|
-
return deserializeAws_restJson1ListSchemaVersionsCommandError(output, context);
|
|
3106
|
-
}
|
|
3107
|
-
const contents: ListSchemaVersionsCommandOutput = {
|
|
3108
|
-
$metadata: deserializeMetadata(output),
|
|
3109
|
-
NextToken: undefined,
|
|
3110
|
-
SchemaVersions: undefined,
|
|
3111
|
-
};
|
|
3112
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3113
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
3114
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
3115
|
-
}
|
|
3116
|
-
if (data.SchemaVersions !== undefined && data.SchemaVersions !== null) {
|
|
3117
|
-
contents.SchemaVersions = deserializeAws_restJson1__listOfSchemaVersionSummary(data.SchemaVersions, context);
|
|
3118
|
-
}
|
|
3119
|
-
return Promise.resolve(contents);
|
|
3120
|
-
};
|
|
3121
|
-
|
|
3122
|
-
const deserializeAws_restJson1ListSchemaVersionsCommandError = async (
|
|
3123
|
-
output: __HttpResponse,
|
|
3124
|
-
context: __SerdeContext
|
|
3125
|
-
): Promise<ListSchemaVersionsCommandOutput> => {
|
|
3126
|
-
const parsedOutput: any = {
|
|
3127
|
-
...output,
|
|
3128
|
-
body: await parseBody(output.body, context),
|
|
3129
|
-
};
|
|
3130
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3131
|
-
let errorCode: string = "UnknownError";
|
|
3132
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3133
|
-
switch (errorCode) {
|
|
3134
|
-
case "BadRequestException":
|
|
3135
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
3136
|
-
response = {
|
|
3137
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3138
|
-
name: errorCode,
|
|
3139
|
-
$metadata: deserializeMetadata(output),
|
|
3140
|
-
};
|
|
3141
|
-
break;
|
|
3142
|
-
case "ForbiddenException":
|
|
3143
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
3144
|
-
response = {
|
|
3145
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
3146
|
-
name: errorCode,
|
|
3147
|
-
$metadata: deserializeMetadata(output),
|
|
3148
|
-
};
|
|
3149
|
-
break;
|
|
3150
|
-
case "InternalServerErrorException":
|
|
3151
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
3152
|
-
response = {
|
|
3153
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3154
|
-
name: errorCode,
|
|
3155
|
-
$metadata: deserializeMetadata(output),
|
|
3156
|
-
};
|
|
3157
|
-
break;
|
|
3158
|
-
case "NotFoundException":
|
|
3159
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
3160
|
-
response = {
|
|
3161
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
3162
|
-
name: errorCode,
|
|
3163
|
-
$metadata: deserializeMetadata(output),
|
|
3164
|
-
};
|
|
3165
|
-
break;
|
|
3166
|
-
case "ServiceUnavailableException":
|
|
3167
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
3168
|
-
response = {
|
|
3169
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3170
|
-
name: errorCode,
|
|
3171
|
-
$metadata: deserializeMetadata(output),
|
|
3172
|
-
};
|
|
3173
|
-
break;
|
|
3174
|
-
case "UnauthorizedException":
|
|
3175
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
3176
|
-
response = {
|
|
3177
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
3178
|
-
name: errorCode,
|
|
3179
|
-
$metadata: deserializeMetadata(output),
|
|
3180
|
-
};
|
|
3181
|
-
break;
|
|
3182
|
-
default:
|
|
3183
|
-
const parsedBody = parsedOutput.body;
|
|
3184
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3185
|
-
response = {
|
|
3186
|
-
...parsedBody,
|
|
3187
|
-
name: `${errorCode}`,
|
|
3188
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3189
|
-
$fault: "client",
|
|
3190
|
-
$metadata: deserializeMetadata(output),
|
|
3191
|
-
} as any;
|
|
3192
|
-
}
|
|
3193
|
-
const message = response.message || response.Message || errorCode;
|
|
3194
|
-
response.message = message;
|
|
3195
|
-
delete response.Message;
|
|
3196
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3197
|
-
};
|
|
3198
|
-
|
|
3199
|
-
export const deserializeAws_restJson1ListTagsForResourceCommand = async (
|
|
3200
|
-
output: __HttpResponse,
|
|
3201
|
-
context: __SerdeContext
|
|
3202
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
3203
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3204
|
-
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
3205
|
-
}
|
|
3206
|
-
const contents: ListTagsForResourceCommandOutput = {
|
|
3207
|
-
$metadata: deserializeMetadata(output),
|
|
3208
|
-
Tags: undefined,
|
|
3209
|
-
};
|
|
3210
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3211
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
3212
|
-
contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
3213
|
-
}
|
|
3214
|
-
return Promise.resolve(contents);
|
|
3215
|
-
};
|
|
3216
|
-
|
|
3217
|
-
const deserializeAws_restJson1ListTagsForResourceCommandError = async (
|
|
3218
|
-
output: __HttpResponse,
|
|
3219
|
-
context: __SerdeContext
|
|
3220
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
3221
|
-
const parsedOutput: any = {
|
|
3222
|
-
...output,
|
|
3223
|
-
body: await parseBody(output.body, context),
|
|
3224
|
-
};
|
|
3225
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3226
|
-
let errorCode: string = "UnknownError";
|
|
3227
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3228
|
-
switch (errorCode) {
|
|
3229
|
-
case "BadRequestException":
|
|
3230
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
3231
|
-
response = {
|
|
3232
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3233
|
-
name: errorCode,
|
|
3234
|
-
$metadata: deserializeMetadata(output),
|
|
3235
|
-
};
|
|
3236
|
-
break;
|
|
3237
|
-
case "ForbiddenException":
|
|
3238
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
3239
|
-
response = {
|
|
3240
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
3241
|
-
name: errorCode,
|
|
3242
|
-
$metadata: deserializeMetadata(output),
|
|
3243
|
-
};
|
|
3244
|
-
break;
|
|
3245
|
-
case "InternalServerErrorException":
|
|
3246
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
3247
|
-
response = {
|
|
3248
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3249
|
-
name: errorCode,
|
|
3250
|
-
$metadata: deserializeMetadata(output),
|
|
3251
|
-
};
|
|
3252
|
-
break;
|
|
3253
|
-
case "NotFoundException":
|
|
3254
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
3255
|
-
response = {
|
|
3256
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
3257
|
-
name: errorCode,
|
|
3258
|
-
$metadata: deserializeMetadata(output),
|
|
3259
|
-
};
|
|
3260
|
-
break;
|
|
3261
|
-
default:
|
|
3262
|
-
const parsedBody = parsedOutput.body;
|
|
3263
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3264
|
-
response = {
|
|
3265
|
-
...parsedBody,
|
|
3266
|
-
name: `${errorCode}`,
|
|
3267
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3268
|
-
$fault: "client",
|
|
3269
|
-
$metadata: deserializeMetadata(output),
|
|
3270
|
-
} as any;
|
|
3271
|
-
}
|
|
3272
|
-
const message = response.message || response.Message || errorCode;
|
|
3273
|
-
response.message = message;
|
|
3274
|
-
delete response.Message;
|
|
3275
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3276
|
-
};
|
|
3277
|
-
|
|
3278
|
-
export const deserializeAws_restJson1PutCodeBindingCommand = async (
|
|
3279
|
-
output: __HttpResponse,
|
|
3280
|
-
context: __SerdeContext
|
|
3281
|
-
): Promise<PutCodeBindingCommandOutput> => {
|
|
3282
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
3283
|
-
return deserializeAws_restJson1PutCodeBindingCommandError(output, context);
|
|
3284
|
-
}
|
|
3285
|
-
const contents: PutCodeBindingCommandOutput = {
|
|
3286
|
-
$metadata: deserializeMetadata(output),
|
|
3287
|
-
CreationDate: undefined,
|
|
3288
|
-
LastModified: undefined,
|
|
3289
|
-
SchemaVersion: undefined,
|
|
3290
|
-
Status: undefined,
|
|
3291
|
-
};
|
|
3292
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3293
|
-
if (data.CreationDate !== undefined && data.CreationDate !== null) {
|
|
3294
|
-
contents.CreationDate = __expectNonNull(__parseRfc3339DateTime(data.CreationDate));
|
|
3295
|
-
}
|
|
3296
|
-
if (data.LastModified !== undefined && data.LastModified !== null) {
|
|
3297
|
-
contents.LastModified = __expectNonNull(__parseRfc3339DateTime(data.LastModified));
|
|
3298
|
-
}
|
|
3299
|
-
if (data.SchemaVersion !== undefined && data.SchemaVersion !== null) {
|
|
3300
|
-
contents.SchemaVersion = __expectString(data.SchemaVersion);
|
|
3301
|
-
}
|
|
3302
|
-
if (data.Status !== undefined && data.Status !== null) {
|
|
3303
|
-
contents.Status = __expectString(data.Status);
|
|
3304
|
-
}
|
|
3305
|
-
return Promise.resolve(contents);
|
|
3306
|
-
};
|
|
3307
|
-
|
|
3308
|
-
const deserializeAws_restJson1PutCodeBindingCommandError = async (
|
|
3309
|
-
output: __HttpResponse,
|
|
3310
|
-
context: __SerdeContext
|
|
3311
|
-
): Promise<PutCodeBindingCommandOutput> => {
|
|
3312
|
-
const parsedOutput: any = {
|
|
3313
|
-
...output,
|
|
3314
|
-
body: await parseBody(output.body, context),
|
|
3315
|
-
};
|
|
3316
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3317
|
-
let errorCode: string = "UnknownError";
|
|
3318
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3319
|
-
switch (errorCode) {
|
|
3320
|
-
case "BadRequestException":
|
|
3321
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
3322
|
-
response = {
|
|
3323
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3324
|
-
name: errorCode,
|
|
3325
|
-
$metadata: deserializeMetadata(output),
|
|
3326
|
-
};
|
|
3327
|
-
break;
|
|
3328
|
-
case "ForbiddenException":
|
|
3329
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
3330
|
-
response = {
|
|
3331
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
3332
|
-
name: errorCode,
|
|
3333
|
-
$metadata: deserializeMetadata(output),
|
|
3334
|
-
};
|
|
3335
|
-
break;
|
|
3336
|
-
case "GoneException":
|
|
3337
|
-
case "com.amazonaws.schemas#GoneException":
|
|
3338
|
-
response = {
|
|
3339
|
-
...(await deserializeAws_restJson1GoneExceptionResponse(parsedOutput, context)),
|
|
3340
|
-
name: errorCode,
|
|
3341
|
-
$metadata: deserializeMetadata(output),
|
|
3342
|
-
};
|
|
3343
|
-
break;
|
|
3344
|
-
case "InternalServerErrorException":
|
|
3345
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
3346
|
-
response = {
|
|
3347
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3348
|
-
name: errorCode,
|
|
3349
|
-
$metadata: deserializeMetadata(output),
|
|
3350
|
-
};
|
|
3351
|
-
break;
|
|
3352
|
-
case "NotFoundException":
|
|
3353
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
3354
|
-
response = {
|
|
3355
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
3356
|
-
name: errorCode,
|
|
3357
|
-
$metadata: deserializeMetadata(output),
|
|
3358
|
-
};
|
|
3359
|
-
break;
|
|
3360
|
-
case "TooManyRequestsException":
|
|
3361
|
-
case "com.amazonaws.schemas#TooManyRequestsException":
|
|
3362
|
-
response = {
|
|
3363
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
3364
|
-
name: errorCode,
|
|
3365
|
-
$metadata: deserializeMetadata(output),
|
|
3366
|
-
};
|
|
3367
|
-
break;
|
|
3368
|
-
case "UnauthorizedException":
|
|
3369
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
3370
|
-
response = {
|
|
3371
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
3372
|
-
name: errorCode,
|
|
3373
|
-
$metadata: deserializeMetadata(output),
|
|
3374
|
-
};
|
|
3375
|
-
break;
|
|
3376
|
-
default:
|
|
3377
|
-
const parsedBody = parsedOutput.body;
|
|
3378
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3379
|
-
response = {
|
|
3380
|
-
...parsedBody,
|
|
3381
|
-
name: `${errorCode}`,
|
|
3382
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3383
|
-
$fault: "client",
|
|
3384
|
-
$metadata: deserializeMetadata(output),
|
|
3385
|
-
} as any;
|
|
3386
|
-
}
|
|
3387
|
-
const message = response.message || response.Message || errorCode;
|
|
3388
|
-
response.message = message;
|
|
3389
|
-
delete response.Message;
|
|
3390
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3391
|
-
};
|
|
3392
|
-
|
|
3393
|
-
export const deserializeAws_restJson1PutResourcePolicyCommand = async (
|
|
3394
|
-
output: __HttpResponse,
|
|
3395
|
-
context: __SerdeContext
|
|
3396
|
-
): Promise<PutResourcePolicyCommandOutput> => {
|
|
3397
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3398
|
-
return deserializeAws_restJson1PutResourcePolicyCommandError(output, context);
|
|
3399
|
-
}
|
|
3400
|
-
const contents: PutResourcePolicyCommandOutput = {
|
|
3401
|
-
$metadata: deserializeMetadata(output),
|
|
3402
|
-
Policy: undefined,
|
|
3403
|
-
RevisionId: undefined,
|
|
3404
|
-
};
|
|
3405
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3406
|
-
if (data.Policy !== undefined && data.Policy !== null) {
|
|
3407
|
-
contents.Policy = new __LazyJsonString(data.Policy);
|
|
3408
|
-
}
|
|
3409
|
-
if (data.RevisionId !== undefined && data.RevisionId !== null) {
|
|
3410
|
-
contents.RevisionId = __expectString(data.RevisionId);
|
|
3411
|
-
}
|
|
3412
|
-
return Promise.resolve(contents);
|
|
3413
|
-
};
|
|
3414
|
-
|
|
3415
|
-
const deserializeAws_restJson1PutResourcePolicyCommandError = async (
|
|
3416
|
-
output: __HttpResponse,
|
|
3417
|
-
context: __SerdeContext
|
|
3418
|
-
): Promise<PutResourcePolicyCommandOutput> => {
|
|
3419
|
-
const parsedOutput: any = {
|
|
3420
|
-
...output,
|
|
3421
|
-
body: await parseBody(output.body, context),
|
|
3422
|
-
};
|
|
3423
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3424
|
-
let errorCode: string = "UnknownError";
|
|
3425
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3426
|
-
switch (errorCode) {
|
|
3427
|
-
case "BadRequestException":
|
|
3428
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
3429
|
-
response = {
|
|
3430
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3431
|
-
name: errorCode,
|
|
3432
|
-
$metadata: deserializeMetadata(output),
|
|
3433
|
-
};
|
|
3434
|
-
break;
|
|
3435
|
-
case "ForbiddenException":
|
|
3436
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
3437
|
-
response = {
|
|
3438
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
3439
|
-
name: errorCode,
|
|
3440
|
-
$metadata: deserializeMetadata(output),
|
|
3441
|
-
};
|
|
3442
|
-
break;
|
|
3443
|
-
case "InternalServerErrorException":
|
|
3444
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
3445
|
-
response = {
|
|
3446
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3447
|
-
name: errorCode,
|
|
3448
|
-
$metadata: deserializeMetadata(output),
|
|
3449
|
-
};
|
|
3450
|
-
break;
|
|
3451
|
-
case "NotFoundException":
|
|
3452
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
3453
|
-
response = {
|
|
3454
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
3455
|
-
name: errorCode,
|
|
3456
|
-
$metadata: deserializeMetadata(output),
|
|
3457
|
-
};
|
|
3458
|
-
break;
|
|
3459
|
-
case "PreconditionFailedException":
|
|
3460
|
-
case "com.amazonaws.schemas#PreconditionFailedException":
|
|
3461
|
-
response = {
|
|
3462
|
-
...(await deserializeAws_restJson1PreconditionFailedExceptionResponse(parsedOutput, context)),
|
|
3463
|
-
name: errorCode,
|
|
3464
|
-
$metadata: deserializeMetadata(output),
|
|
3465
|
-
};
|
|
3466
|
-
break;
|
|
3467
|
-
case "ServiceUnavailableException":
|
|
3468
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
3469
|
-
response = {
|
|
3470
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3471
|
-
name: errorCode,
|
|
3472
|
-
$metadata: deserializeMetadata(output),
|
|
3473
|
-
};
|
|
3474
|
-
break;
|
|
3475
|
-
case "UnauthorizedException":
|
|
3476
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
3477
|
-
response = {
|
|
3478
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
3479
|
-
name: errorCode,
|
|
3480
|
-
$metadata: deserializeMetadata(output),
|
|
3481
|
-
};
|
|
3482
|
-
break;
|
|
3483
|
-
default:
|
|
3484
|
-
const parsedBody = parsedOutput.body;
|
|
3485
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3486
|
-
response = {
|
|
3487
|
-
...parsedBody,
|
|
3488
|
-
name: `${errorCode}`,
|
|
3489
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3490
|
-
$fault: "client",
|
|
3491
|
-
$metadata: deserializeMetadata(output),
|
|
3492
|
-
} as any;
|
|
3493
|
-
}
|
|
3494
|
-
const message = response.message || response.Message || errorCode;
|
|
3495
|
-
response.message = message;
|
|
3496
|
-
delete response.Message;
|
|
3497
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3498
|
-
};
|
|
3499
|
-
|
|
3500
|
-
export const deserializeAws_restJson1SearchSchemasCommand = async (
|
|
3501
|
-
output: __HttpResponse,
|
|
3502
|
-
context: __SerdeContext
|
|
3503
|
-
): Promise<SearchSchemasCommandOutput> => {
|
|
3504
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3505
|
-
return deserializeAws_restJson1SearchSchemasCommandError(output, context);
|
|
3506
|
-
}
|
|
3507
|
-
const contents: SearchSchemasCommandOutput = {
|
|
3508
|
-
$metadata: deserializeMetadata(output),
|
|
3509
|
-
NextToken: undefined,
|
|
3510
|
-
Schemas: undefined,
|
|
3511
|
-
};
|
|
3512
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3513
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
3514
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
3515
|
-
}
|
|
3516
|
-
if (data.Schemas !== undefined && data.Schemas !== null) {
|
|
3517
|
-
contents.Schemas = deserializeAws_restJson1__listOfSearchSchemaSummary(data.Schemas, context);
|
|
3518
|
-
}
|
|
3519
|
-
return Promise.resolve(contents);
|
|
3520
|
-
};
|
|
3521
|
-
|
|
3522
|
-
const deserializeAws_restJson1SearchSchemasCommandError = async (
|
|
3523
|
-
output: __HttpResponse,
|
|
3524
|
-
context: __SerdeContext
|
|
3525
|
-
): Promise<SearchSchemasCommandOutput> => {
|
|
3526
|
-
const parsedOutput: any = {
|
|
3527
|
-
...output,
|
|
3528
|
-
body: await parseBody(output.body, context),
|
|
3529
|
-
};
|
|
3530
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3531
|
-
let errorCode: string = "UnknownError";
|
|
3532
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3533
|
-
switch (errorCode) {
|
|
3534
|
-
case "BadRequestException":
|
|
3535
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
3536
|
-
response = {
|
|
3537
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3538
|
-
name: errorCode,
|
|
3539
|
-
$metadata: deserializeMetadata(output),
|
|
3540
|
-
};
|
|
3541
|
-
break;
|
|
3542
|
-
case "ForbiddenException":
|
|
3543
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
3544
|
-
response = {
|
|
3545
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
3546
|
-
name: errorCode,
|
|
3547
|
-
$metadata: deserializeMetadata(output),
|
|
3548
|
-
};
|
|
3549
|
-
break;
|
|
3550
|
-
case "InternalServerErrorException":
|
|
3551
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
3552
|
-
response = {
|
|
3553
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3554
|
-
name: errorCode,
|
|
3555
|
-
$metadata: deserializeMetadata(output),
|
|
3556
|
-
};
|
|
3557
|
-
break;
|
|
3558
|
-
case "ServiceUnavailableException":
|
|
3559
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
3560
|
-
response = {
|
|
3561
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3562
|
-
name: errorCode,
|
|
3563
|
-
$metadata: deserializeMetadata(output),
|
|
3564
|
-
};
|
|
3565
|
-
break;
|
|
3566
|
-
case "UnauthorizedException":
|
|
3567
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
3568
|
-
response = {
|
|
3569
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
3570
|
-
name: errorCode,
|
|
3571
|
-
$metadata: deserializeMetadata(output),
|
|
3572
|
-
};
|
|
3573
|
-
break;
|
|
3574
|
-
default:
|
|
3575
|
-
const parsedBody = parsedOutput.body;
|
|
3576
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3577
|
-
response = {
|
|
3578
|
-
...parsedBody,
|
|
3579
|
-
name: `${errorCode}`,
|
|
3580
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3581
|
-
$fault: "client",
|
|
3582
|
-
$metadata: deserializeMetadata(output),
|
|
3583
|
-
} as any;
|
|
3584
|
-
}
|
|
3585
|
-
const message = response.message || response.Message || errorCode;
|
|
3586
|
-
response.message = message;
|
|
3587
|
-
delete response.Message;
|
|
3588
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3589
|
-
};
|
|
3590
|
-
|
|
3591
|
-
export const deserializeAws_restJson1StartDiscovererCommand = async (
|
|
3592
|
-
output: __HttpResponse,
|
|
3593
|
-
context: __SerdeContext
|
|
3594
|
-
): Promise<StartDiscovererCommandOutput> => {
|
|
3595
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3596
|
-
return deserializeAws_restJson1StartDiscovererCommandError(output, context);
|
|
3597
|
-
}
|
|
3598
|
-
const contents: StartDiscovererCommandOutput = {
|
|
3599
|
-
$metadata: deserializeMetadata(output),
|
|
3600
|
-
DiscovererId: undefined,
|
|
3601
|
-
State: undefined,
|
|
3602
|
-
};
|
|
3603
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3604
|
-
if (data.DiscovererId !== undefined && data.DiscovererId !== null) {
|
|
3605
|
-
contents.DiscovererId = __expectString(data.DiscovererId);
|
|
3606
|
-
}
|
|
3607
|
-
if (data.State !== undefined && data.State !== null) {
|
|
3608
|
-
contents.State = __expectString(data.State);
|
|
3609
|
-
}
|
|
3610
|
-
return Promise.resolve(contents);
|
|
3611
|
-
};
|
|
3612
|
-
|
|
3613
|
-
const deserializeAws_restJson1StartDiscovererCommandError = async (
|
|
3614
|
-
output: __HttpResponse,
|
|
3615
|
-
context: __SerdeContext
|
|
3616
|
-
): Promise<StartDiscovererCommandOutput> => {
|
|
3617
|
-
const parsedOutput: any = {
|
|
3618
|
-
...output,
|
|
3619
|
-
body: await parseBody(output.body, context),
|
|
3620
|
-
};
|
|
3621
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3622
|
-
let errorCode: string = "UnknownError";
|
|
3623
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3624
|
-
switch (errorCode) {
|
|
3625
|
-
case "BadRequestException":
|
|
3626
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
3627
|
-
response = {
|
|
3628
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3629
|
-
name: errorCode,
|
|
3630
|
-
$metadata: deserializeMetadata(output),
|
|
3631
|
-
};
|
|
3632
|
-
break;
|
|
3633
|
-
case "ForbiddenException":
|
|
3634
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
3635
|
-
response = {
|
|
3636
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
3637
|
-
name: errorCode,
|
|
3638
|
-
$metadata: deserializeMetadata(output),
|
|
3639
|
-
};
|
|
3640
|
-
break;
|
|
3641
|
-
case "InternalServerErrorException":
|
|
3642
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
3643
|
-
response = {
|
|
3644
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3645
|
-
name: errorCode,
|
|
3646
|
-
$metadata: deserializeMetadata(output),
|
|
3647
|
-
};
|
|
3648
|
-
break;
|
|
3649
|
-
case "NotFoundException":
|
|
3650
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
3651
|
-
response = {
|
|
3652
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
3653
|
-
name: errorCode,
|
|
3654
|
-
$metadata: deserializeMetadata(output),
|
|
3655
|
-
};
|
|
3656
|
-
break;
|
|
3657
|
-
case "ServiceUnavailableException":
|
|
3658
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
3659
|
-
response = {
|
|
3660
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3661
|
-
name: errorCode,
|
|
3662
|
-
$metadata: deserializeMetadata(output),
|
|
3663
|
-
};
|
|
3664
|
-
break;
|
|
3665
|
-
case "UnauthorizedException":
|
|
3666
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
3667
|
-
response = {
|
|
3668
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
3669
|
-
name: errorCode,
|
|
3670
|
-
$metadata: deserializeMetadata(output),
|
|
3671
|
-
};
|
|
3672
|
-
break;
|
|
3673
|
-
default:
|
|
3674
|
-
const parsedBody = parsedOutput.body;
|
|
3675
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3676
|
-
response = {
|
|
3677
|
-
...parsedBody,
|
|
3678
|
-
name: `${errorCode}`,
|
|
3679
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3680
|
-
$fault: "client",
|
|
3681
|
-
$metadata: deserializeMetadata(output),
|
|
3682
|
-
} as any;
|
|
3683
|
-
}
|
|
3684
|
-
const message = response.message || response.Message || errorCode;
|
|
3685
|
-
response.message = message;
|
|
3686
|
-
delete response.Message;
|
|
3687
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3688
|
-
};
|
|
3689
|
-
|
|
3690
|
-
export const deserializeAws_restJson1StopDiscovererCommand = async (
|
|
3691
|
-
output: __HttpResponse,
|
|
3692
|
-
context: __SerdeContext
|
|
3693
|
-
): Promise<StopDiscovererCommandOutput> => {
|
|
3694
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3695
|
-
return deserializeAws_restJson1StopDiscovererCommandError(output, context);
|
|
3696
|
-
}
|
|
3697
|
-
const contents: StopDiscovererCommandOutput = {
|
|
3698
|
-
$metadata: deserializeMetadata(output),
|
|
3699
|
-
DiscovererId: undefined,
|
|
3700
|
-
State: undefined,
|
|
3701
|
-
};
|
|
3702
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3703
|
-
if (data.DiscovererId !== undefined && data.DiscovererId !== null) {
|
|
3704
|
-
contents.DiscovererId = __expectString(data.DiscovererId);
|
|
3705
|
-
}
|
|
3706
|
-
if (data.State !== undefined && data.State !== null) {
|
|
3707
|
-
contents.State = __expectString(data.State);
|
|
3708
|
-
}
|
|
3709
|
-
return Promise.resolve(contents);
|
|
3710
|
-
};
|
|
3711
|
-
|
|
3712
|
-
const deserializeAws_restJson1StopDiscovererCommandError = async (
|
|
3713
|
-
output: __HttpResponse,
|
|
3714
|
-
context: __SerdeContext
|
|
3715
|
-
): Promise<StopDiscovererCommandOutput> => {
|
|
3716
|
-
const parsedOutput: any = {
|
|
3717
|
-
...output,
|
|
3718
|
-
body: await parseBody(output.body, context),
|
|
3719
|
-
};
|
|
3720
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3721
|
-
let errorCode: string = "UnknownError";
|
|
3722
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3723
|
-
switch (errorCode) {
|
|
3724
|
-
case "BadRequestException":
|
|
3725
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
3726
|
-
response = {
|
|
3727
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3728
|
-
name: errorCode,
|
|
3729
|
-
$metadata: deserializeMetadata(output),
|
|
3730
|
-
};
|
|
3731
|
-
break;
|
|
3732
|
-
case "ForbiddenException":
|
|
3733
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
3734
|
-
response = {
|
|
3735
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
3736
|
-
name: errorCode,
|
|
3737
|
-
$metadata: deserializeMetadata(output),
|
|
3738
|
-
};
|
|
3739
|
-
break;
|
|
3740
|
-
case "InternalServerErrorException":
|
|
3741
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
3742
|
-
response = {
|
|
3743
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3744
|
-
name: errorCode,
|
|
3745
|
-
$metadata: deserializeMetadata(output),
|
|
3746
|
-
};
|
|
3747
|
-
break;
|
|
3748
|
-
case "NotFoundException":
|
|
3749
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
3750
|
-
response = {
|
|
3751
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
3752
|
-
name: errorCode,
|
|
3753
|
-
$metadata: deserializeMetadata(output),
|
|
3754
|
-
};
|
|
3755
|
-
break;
|
|
3756
|
-
case "ServiceUnavailableException":
|
|
3757
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
3758
|
-
response = {
|
|
3759
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3760
|
-
name: errorCode,
|
|
3761
|
-
$metadata: deserializeMetadata(output),
|
|
3762
|
-
};
|
|
3763
|
-
break;
|
|
3764
|
-
case "UnauthorizedException":
|
|
3765
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
3766
|
-
response = {
|
|
3767
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
3768
|
-
name: errorCode,
|
|
3769
|
-
$metadata: deserializeMetadata(output),
|
|
3770
|
-
};
|
|
3771
|
-
break;
|
|
3772
|
-
default:
|
|
3773
|
-
const parsedBody = parsedOutput.body;
|
|
3774
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3775
|
-
response = {
|
|
3776
|
-
...parsedBody,
|
|
3777
|
-
name: `${errorCode}`,
|
|
3778
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3779
|
-
$fault: "client",
|
|
3780
|
-
$metadata: deserializeMetadata(output),
|
|
3781
|
-
} as any;
|
|
3782
|
-
}
|
|
3783
|
-
const message = response.message || response.Message || errorCode;
|
|
3784
|
-
response.message = message;
|
|
3785
|
-
delete response.Message;
|
|
3786
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3787
|
-
};
|
|
3788
|
-
|
|
3789
|
-
export const deserializeAws_restJson1TagResourceCommand = async (
|
|
3790
|
-
output: __HttpResponse,
|
|
3791
|
-
context: __SerdeContext
|
|
3792
|
-
): Promise<TagResourceCommandOutput> => {
|
|
3793
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
3794
|
-
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
3795
|
-
}
|
|
3796
|
-
const contents: TagResourceCommandOutput = {
|
|
3797
|
-
$metadata: deserializeMetadata(output),
|
|
3798
|
-
};
|
|
3799
|
-
await collectBody(output.body, context);
|
|
3800
|
-
return Promise.resolve(contents);
|
|
3801
|
-
};
|
|
3802
|
-
|
|
3803
|
-
const deserializeAws_restJson1TagResourceCommandError = async (
|
|
3804
|
-
output: __HttpResponse,
|
|
3805
|
-
context: __SerdeContext
|
|
3806
|
-
): Promise<TagResourceCommandOutput> => {
|
|
3807
|
-
const parsedOutput: any = {
|
|
3808
|
-
...output,
|
|
3809
|
-
body: await parseBody(output.body, context),
|
|
3810
|
-
};
|
|
3811
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3812
|
-
let errorCode: string = "UnknownError";
|
|
3813
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3814
|
-
switch (errorCode) {
|
|
3815
|
-
case "BadRequestException":
|
|
3816
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
3817
|
-
response = {
|
|
3818
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3819
|
-
name: errorCode,
|
|
3820
|
-
$metadata: deserializeMetadata(output),
|
|
3821
|
-
};
|
|
3822
|
-
break;
|
|
3823
|
-
case "ForbiddenException":
|
|
3824
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
3825
|
-
response = {
|
|
3826
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
3827
|
-
name: errorCode,
|
|
3828
|
-
$metadata: deserializeMetadata(output),
|
|
3829
|
-
};
|
|
3830
|
-
break;
|
|
3831
|
-
case "InternalServerErrorException":
|
|
3832
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
3833
|
-
response = {
|
|
3834
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3835
|
-
name: errorCode,
|
|
3836
|
-
$metadata: deserializeMetadata(output),
|
|
3837
|
-
};
|
|
3838
|
-
break;
|
|
3839
|
-
case "NotFoundException":
|
|
3840
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
3841
|
-
response = {
|
|
3842
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
3843
|
-
name: errorCode,
|
|
3844
|
-
$metadata: deserializeMetadata(output),
|
|
3845
|
-
};
|
|
3846
|
-
break;
|
|
3847
|
-
default:
|
|
3848
|
-
const parsedBody = parsedOutput.body;
|
|
3849
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3850
|
-
response = {
|
|
3851
|
-
...parsedBody,
|
|
3852
|
-
name: `${errorCode}`,
|
|
3853
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3854
|
-
$fault: "client",
|
|
3855
|
-
$metadata: deserializeMetadata(output),
|
|
3856
|
-
} as any;
|
|
3857
|
-
}
|
|
3858
|
-
const message = response.message || response.Message || errorCode;
|
|
3859
|
-
response.message = message;
|
|
3860
|
-
delete response.Message;
|
|
3861
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3862
|
-
};
|
|
3863
|
-
|
|
3864
|
-
export const deserializeAws_restJson1UntagResourceCommand = async (
|
|
3865
|
-
output: __HttpResponse,
|
|
3866
|
-
context: __SerdeContext
|
|
3867
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
3868
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
3869
|
-
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
3870
|
-
}
|
|
3871
|
-
const contents: UntagResourceCommandOutput = {
|
|
3872
|
-
$metadata: deserializeMetadata(output),
|
|
3873
|
-
};
|
|
3874
|
-
await collectBody(output.body, context);
|
|
3875
|
-
return Promise.resolve(contents);
|
|
3876
|
-
};
|
|
3877
|
-
|
|
3878
|
-
const deserializeAws_restJson1UntagResourceCommandError = async (
|
|
3879
|
-
output: __HttpResponse,
|
|
3880
|
-
context: __SerdeContext
|
|
3881
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
3882
|
-
const parsedOutput: any = {
|
|
3883
|
-
...output,
|
|
3884
|
-
body: await parseBody(output.body, context),
|
|
3885
|
-
};
|
|
3886
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3887
|
-
let errorCode: string = "UnknownError";
|
|
3888
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3889
|
-
switch (errorCode) {
|
|
3890
|
-
case "BadRequestException":
|
|
3891
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
3892
|
-
response = {
|
|
3893
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3894
|
-
name: errorCode,
|
|
3895
|
-
$metadata: deserializeMetadata(output),
|
|
3896
|
-
};
|
|
3897
|
-
break;
|
|
3898
|
-
case "ForbiddenException":
|
|
3899
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
3900
|
-
response = {
|
|
3901
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
3902
|
-
name: errorCode,
|
|
3903
|
-
$metadata: deserializeMetadata(output),
|
|
3904
|
-
};
|
|
3905
|
-
break;
|
|
3906
|
-
case "InternalServerErrorException":
|
|
3907
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
3908
|
-
response = {
|
|
3909
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
3910
|
-
name: errorCode,
|
|
3911
|
-
$metadata: deserializeMetadata(output),
|
|
3912
|
-
};
|
|
3913
|
-
break;
|
|
3914
|
-
case "NotFoundException":
|
|
3915
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
3916
|
-
response = {
|
|
3917
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
3918
|
-
name: errorCode,
|
|
3919
|
-
$metadata: deserializeMetadata(output),
|
|
3920
|
-
};
|
|
3921
|
-
break;
|
|
3922
|
-
default:
|
|
3923
|
-
const parsedBody = parsedOutput.body;
|
|
3924
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3925
|
-
response = {
|
|
3926
|
-
...parsedBody,
|
|
3927
|
-
name: `${errorCode}`,
|
|
3928
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3929
|
-
$fault: "client",
|
|
3930
|
-
$metadata: deserializeMetadata(output),
|
|
3931
|
-
} as any;
|
|
3932
|
-
}
|
|
3933
|
-
const message = response.message || response.Message || errorCode;
|
|
3934
|
-
response.message = message;
|
|
3935
|
-
delete response.Message;
|
|
3936
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3937
|
-
};
|
|
3938
|
-
|
|
3939
|
-
export const deserializeAws_restJson1UpdateDiscovererCommand = async (
|
|
3940
|
-
output: __HttpResponse,
|
|
3941
|
-
context: __SerdeContext
|
|
3942
|
-
): Promise<UpdateDiscovererCommandOutput> => {
|
|
3943
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3944
|
-
return deserializeAws_restJson1UpdateDiscovererCommandError(output, context);
|
|
3945
|
-
}
|
|
3946
|
-
const contents: UpdateDiscovererCommandOutput = {
|
|
3947
|
-
$metadata: deserializeMetadata(output),
|
|
3948
|
-
CrossAccount: undefined,
|
|
3949
|
-
Description: undefined,
|
|
3950
|
-
DiscovererArn: undefined,
|
|
3951
|
-
DiscovererId: undefined,
|
|
3952
|
-
SourceArn: undefined,
|
|
3953
|
-
State: undefined,
|
|
3954
|
-
Tags: undefined,
|
|
3955
|
-
};
|
|
3956
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3957
|
-
if (data.CrossAccount !== undefined && data.CrossAccount !== null) {
|
|
3958
|
-
contents.CrossAccount = __expectBoolean(data.CrossAccount);
|
|
3959
|
-
}
|
|
3960
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
3961
|
-
contents.Description = __expectString(data.Description);
|
|
3962
|
-
}
|
|
3963
|
-
if (data.DiscovererArn !== undefined && data.DiscovererArn !== null) {
|
|
3964
|
-
contents.DiscovererArn = __expectString(data.DiscovererArn);
|
|
3965
|
-
}
|
|
3966
|
-
if (data.DiscovererId !== undefined && data.DiscovererId !== null) {
|
|
3967
|
-
contents.DiscovererId = __expectString(data.DiscovererId);
|
|
3968
|
-
}
|
|
3969
|
-
if (data.SourceArn !== undefined && data.SourceArn !== null) {
|
|
3970
|
-
contents.SourceArn = __expectString(data.SourceArn);
|
|
3971
|
-
}
|
|
3972
|
-
if (data.State !== undefined && data.State !== null) {
|
|
3973
|
-
contents.State = __expectString(data.State);
|
|
3974
|
-
}
|
|
3975
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
3976
|
-
contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
3977
|
-
}
|
|
3978
|
-
return Promise.resolve(contents);
|
|
3979
|
-
};
|
|
3980
|
-
|
|
3981
|
-
const deserializeAws_restJson1UpdateDiscovererCommandError = async (
|
|
3982
|
-
output: __HttpResponse,
|
|
3983
|
-
context: __SerdeContext
|
|
3984
|
-
): Promise<UpdateDiscovererCommandOutput> => {
|
|
3985
|
-
const parsedOutput: any = {
|
|
3986
|
-
...output,
|
|
3987
|
-
body: await parseBody(output.body, context),
|
|
3988
|
-
};
|
|
3989
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3990
|
-
let errorCode: string = "UnknownError";
|
|
3991
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3992
|
-
switch (errorCode) {
|
|
3993
|
-
case "BadRequestException":
|
|
3994
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
3995
|
-
response = {
|
|
3996
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3997
|
-
name: errorCode,
|
|
3998
|
-
$metadata: deserializeMetadata(output),
|
|
3999
|
-
};
|
|
4000
|
-
break;
|
|
4001
|
-
case "ForbiddenException":
|
|
4002
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
4003
|
-
response = {
|
|
4004
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
4005
|
-
name: errorCode,
|
|
4006
|
-
$metadata: deserializeMetadata(output),
|
|
4007
|
-
};
|
|
4008
|
-
break;
|
|
4009
|
-
case "InternalServerErrorException":
|
|
4010
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
4011
|
-
response = {
|
|
4012
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
4013
|
-
name: errorCode,
|
|
4014
|
-
$metadata: deserializeMetadata(output),
|
|
4015
|
-
};
|
|
4016
|
-
break;
|
|
4017
|
-
case "NotFoundException":
|
|
4018
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
4019
|
-
response = {
|
|
4020
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
4021
|
-
name: errorCode,
|
|
4022
|
-
$metadata: deserializeMetadata(output),
|
|
4023
|
-
};
|
|
4024
|
-
break;
|
|
4025
|
-
case "ServiceUnavailableException":
|
|
4026
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
4027
|
-
response = {
|
|
4028
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
4029
|
-
name: errorCode,
|
|
4030
|
-
$metadata: deserializeMetadata(output),
|
|
4031
|
-
};
|
|
4032
|
-
break;
|
|
4033
|
-
case "UnauthorizedException":
|
|
4034
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
4035
|
-
response = {
|
|
4036
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
4037
|
-
name: errorCode,
|
|
4038
|
-
$metadata: deserializeMetadata(output),
|
|
4039
|
-
};
|
|
4040
|
-
break;
|
|
4041
|
-
default:
|
|
4042
|
-
const parsedBody = parsedOutput.body;
|
|
4043
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
4044
|
-
response = {
|
|
4045
|
-
...parsedBody,
|
|
4046
|
-
name: `${errorCode}`,
|
|
4047
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
4048
|
-
$fault: "client",
|
|
4049
|
-
$metadata: deserializeMetadata(output),
|
|
4050
|
-
} as any;
|
|
4051
|
-
}
|
|
4052
|
-
const message = response.message || response.Message || errorCode;
|
|
4053
|
-
response.message = message;
|
|
4054
|
-
delete response.Message;
|
|
4055
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
4056
|
-
};
|
|
4057
|
-
|
|
4058
|
-
export const deserializeAws_restJson1UpdateRegistryCommand = async (
|
|
4059
|
-
output: __HttpResponse,
|
|
4060
|
-
context: __SerdeContext
|
|
4061
|
-
): Promise<UpdateRegistryCommandOutput> => {
|
|
4062
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4063
|
-
return deserializeAws_restJson1UpdateRegistryCommandError(output, context);
|
|
4064
|
-
}
|
|
4065
|
-
const contents: UpdateRegistryCommandOutput = {
|
|
4066
|
-
$metadata: deserializeMetadata(output),
|
|
4067
|
-
Description: undefined,
|
|
4068
|
-
RegistryArn: undefined,
|
|
4069
|
-
RegistryName: undefined,
|
|
4070
|
-
Tags: undefined,
|
|
4071
|
-
};
|
|
4072
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
4073
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
4074
|
-
contents.Description = __expectString(data.Description);
|
|
4075
|
-
}
|
|
4076
|
-
if (data.RegistryArn !== undefined && data.RegistryArn !== null) {
|
|
4077
|
-
contents.RegistryArn = __expectString(data.RegistryArn);
|
|
4078
|
-
}
|
|
4079
|
-
if (data.RegistryName !== undefined && data.RegistryName !== null) {
|
|
4080
|
-
contents.RegistryName = __expectString(data.RegistryName);
|
|
4081
|
-
}
|
|
4082
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
4083
|
-
contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
4084
|
-
}
|
|
4085
|
-
return Promise.resolve(contents);
|
|
4086
|
-
};
|
|
4087
|
-
|
|
4088
|
-
const deserializeAws_restJson1UpdateRegistryCommandError = async (
|
|
4089
|
-
output: __HttpResponse,
|
|
4090
|
-
context: __SerdeContext
|
|
4091
|
-
): Promise<UpdateRegistryCommandOutput> => {
|
|
4092
|
-
const parsedOutput: any = {
|
|
4093
|
-
...output,
|
|
4094
|
-
body: await parseBody(output.body, context),
|
|
4095
|
-
};
|
|
4096
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
4097
|
-
let errorCode: string = "UnknownError";
|
|
4098
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4099
|
-
switch (errorCode) {
|
|
4100
|
-
case "BadRequestException":
|
|
4101
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
4102
|
-
response = {
|
|
4103
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
4104
|
-
name: errorCode,
|
|
4105
|
-
$metadata: deserializeMetadata(output),
|
|
4106
|
-
};
|
|
4107
|
-
break;
|
|
4108
|
-
case "ForbiddenException":
|
|
4109
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
4110
|
-
response = {
|
|
4111
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
4112
|
-
name: errorCode,
|
|
4113
|
-
$metadata: deserializeMetadata(output),
|
|
4114
|
-
};
|
|
4115
|
-
break;
|
|
4116
|
-
case "InternalServerErrorException":
|
|
4117
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
4118
|
-
response = {
|
|
4119
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
4120
|
-
name: errorCode,
|
|
4121
|
-
$metadata: deserializeMetadata(output),
|
|
4122
|
-
};
|
|
4123
|
-
break;
|
|
4124
|
-
case "NotFoundException":
|
|
4125
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
4126
|
-
response = {
|
|
4127
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
4128
|
-
name: errorCode,
|
|
4129
|
-
$metadata: deserializeMetadata(output),
|
|
4130
|
-
};
|
|
4131
|
-
break;
|
|
4132
|
-
case "ServiceUnavailableException":
|
|
4133
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
4134
|
-
response = {
|
|
4135
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
4136
|
-
name: errorCode,
|
|
4137
|
-
$metadata: deserializeMetadata(output),
|
|
4138
|
-
};
|
|
4139
|
-
break;
|
|
4140
|
-
case "UnauthorizedException":
|
|
4141
|
-
case "com.amazonaws.schemas#UnauthorizedException":
|
|
4142
|
-
response = {
|
|
4143
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
4144
|
-
name: errorCode,
|
|
4145
|
-
$metadata: deserializeMetadata(output),
|
|
4146
|
-
};
|
|
4147
|
-
break;
|
|
4148
|
-
default:
|
|
4149
|
-
const parsedBody = parsedOutput.body;
|
|
4150
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
4151
|
-
response = {
|
|
4152
|
-
...parsedBody,
|
|
4153
|
-
name: `${errorCode}`,
|
|
4154
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
4155
|
-
$fault: "client",
|
|
4156
|
-
$metadata: deserializeMetadata(output),
|
|
4157
|
-
} as any;
|
|
4158
|
-
}
|
|
4159
|
-
const message = response.message || response.Message || errorCode;
|
|
4160
|
-
response.message = message;
|
|
4161
|
-
delete response.Message;
|
|
4162
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
4163
|
-
};
|
|
4164
|
-
|
|
4165
|
-
export const deserializeAws_restJson1UpdateSchemaCommand = async (
|
|
4166
|
-
output: __HttpResponse,
|
|
4167
|
-
context: __SerdeContext
|
|
4168
|
-
): Promise<UpdateSchemaCommandOutput> => {
|
|
4169
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4170
|
-
return deserializeAws_restJson1UpdateSchemaCommandError(output, context);
|
|
4171
|
-
}
|
|
4172
|
-
const contents: UpdateSchemaCommandOutput = {
|
|
4173
|
-
$metadata: deserializeMetadata(output),
|
|
4174
|
-
Description: undefined,
|
|
4175
|
-
LastModified: undefined,
|
|
4176
|
-
SchemaArn: undefined,
|
|
4177
|
-
SchemaName: undefined,
|
|
4178
|
-
SchemaVersion: undefined,
|
|
4179
|
-
Tags: undefined,
|
|
4180
|
-
Type: undefined,
|
|
4181
|
-
VersionCreatedDate: undefined,
|
|
4182
|
-
};
|
|
4183
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
4184
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
4185
|
-
contents.Description = __expectString(data.Description);
|
|
4186
|
-
}
|
|
4187
|
-
if (data.LastModified !== undefined && data.LastModified !== null) {
|
|
4188
|
-
contents.LastModified = __expectNonNull(__parseRfc3339DateTime(data.LastModified));
|
|
4189
|
-
}
|
|
4190
|
-
if (data.SchemaArn !== undefined && data.SchemaArn !== null) {
|
|
4191
|
-
contents.SchemaArn = __expectString(data.SchemaArn);
|
|
4192
|
-
}
|
|
4193
|
-
if (data.SchemaName !== undefined && data.SchemaName !== null) {
|
|
4194
|
-
contents.SchemaName = __expectString(data.SchemaName);
|
|
4195
|
-
}
|
|
4196
|
-
if (data.SchemaVersion !== undefined && data.SchemaVersion !== null) {
|
|
4197
|
-
contents.SchemaVersion = __expectString(data.SchemaVersion);
|
|
4198
|
-
}
|
|
4199
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
4200
|
-
contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
4201
|
-
}
|
|
4202
|
-
if (data.Type !== undefined && data.Type !== null) {
|
|
4203
|
-
contents.Type = __expectString(data.Type);
|
|
4204
|
-
}
|
|
4205
|
-
if (data.VersionCreatedDate !== undefined && data.VersionCreatedDate !== null) {
|
|
4206
|
-
contents.VersionCreatedDate = __expectNonNull(__parseRfc3339DateTime(data.VersionCreatedDate));
|
|
4207
|
-
}
|
|
4208
|
-
return Promise.resolve(contents);
|
|
4209
|
-
};
|
|
4210
|
-
|
|
4211
|
-
const deserializeAws_restJson1UpdateSchemaCommandError = async (
|
|
4212
|
-
output: __HttpResponse,
|
|
4213
|
-
context: __SerdeContext
|
|
4214
|
-
): Promise<UpdateSchemaCommandOutput> => {
|
|
4215
|
-
const parsedOutput: any = {
|
|
4216
|
-
...output,
|
|
4217
|
-
body: await parseBody(output.body, context),
|
|
4218
|
-
};
|
|
4219
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
4220
|
-
let errorCode: string = "UnknownError";
|
|
4221
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4222
|
-
switch (errorCode) {
|
|
4223
|
-
case "BadRequestException":
|
|
4224
|
-
case "com.amazonaws.schemas#BadRequestException":
|
|
4225
|
-
response = {
|
|
4226
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
4227
|
-
name: errorCode,
|
|
4228
|
-
$metadata: deserializeMetadata(output),
|
|
4229
|
-
};
|
|
4230
|
-
break;
|
|
4231
|
-
case "ForbiddenException":
|
|
4232
|
-
case "com.amazonaws.schemas#ForbiddenException":
|
|
4233
|
-
response = {
|
|
4234
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
4235
|
-
name: errorCode,
|
|
4236
|
-
$metadata: deserializeMetadata(output),
|
|
4237
|
-
};
|
|
4238
|
-
break;
|
|
4239
|
-
case "InternalServerErrorException":
|
|
4240
|
-
case "com.amazonaws.schemas#InternalServerErrorException":
|
|
4241
|
-
response = {
|
|
4242
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
4243
|
-
name: errorCode,
|
|
4244
|
-
$metadata: deserializeMetadata(output),
|
|
4245
|
-
};
|
|
4246
|
-
break;
|
|
4247
|
-
case "NotFoundException":
|
|
4248
|
-
case "com.amazonaws.schemas#NotFoundException":
|
|
4249
|
-
response = {
|
|
4250
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
4251
|
-
name: errorCode,
|
|
4252
|
-
$metadata: deserializeMetadata(output),
|
|
4253
|
-
};
|
|
4254
|
-
break;
|
|
4255
|
-
case "ServiceUnavailableException":
|
|
4256
|
-
case "com.amazonaws.schemas#ServiceUnavailableException":
|
|
4257
|
-
response = {
|
|
4258
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
4259
|
-
name: errorCode,
|
|
4260
|
-
$metadata: deserializeMetadata(output),
|
|
4261
|
-
};
|
|
4262
|
-
break;
|
|
4263
|
-
default:
|
|
4264
|
-
const parsedBody = parsedOutput.body;
|
|
4265
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
4266
|
-
response = {
|
|
4267
|
-
...parsedBody,
|
|
4268
|
-
name: `${errorCode}`,
|
|
4269
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
4270
|
-
$fault: "client",
|
|
4271
|
-
$metadata: deserializeMetadata(output),
|
|
4272
|
-
} as any;
|
|
4273
|
-
}
|
|
4274
|
-
const message = response.message || response.Message || errorCode;
|
|
4275
|
-
response.message = message;
|
|
4276
|
-
delete response.Message;
|
|
4277
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
4278
|
-
};
|
|
4279
|
-
|
|
4280
|
-
const deserializeAws_restJson1BadRequestExceptionResponse = async (
|
|
4281
|
-
parsedOutput: any,
|
|
4282
|
-
context: __SerdeContext
|
|
4283
|
-
): Promise<BadRequestException> => {
|
|
4284
|
-
const contents: BadRequestException = {
|
|
4285
|
-
name: "BadRequestException",
|
|
4286
|
-
$fault: "client",
|
|
4287
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4288
|
-
Code: undefined,
|
|
4289
|
-
Message: undefined,
|
|
4290
|
-
};
|
|
4291
|
-
const data: any = parsedOutput.body;
|
|
4292
|
-
if (data.Code !== undefined && data.Code !== null) {
|
|
4293
|
-
contents.Code = __expectString(data.Code);
|
|
4294
|
-
}
|
|
4295
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
4296
|
-
contents.Message = __expectString(data.Message);
|
|
4297
|
-
}
|
|
4298
|
-
return contents;
|
|
4299
|
-
};
|
|
4300
|
-
|
|
4301
|
-
const deserializeAws_restJson1ConflictExceptionResponse = async (
|
|
4302
|
-
parsedOutput: any,
|
|
4303
|
-
context: __SerdeContext
|
|
4304
|
-
): Promise<ConflictException> => {
|
|
4305
|
-
const contents: ConflictException = {
|
|
4306
|
-
name: "ConflictException",
|
|
4307
|
-
$fault: "client",
|
|
4308
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4309
|
-
Code: undefined,
|
|
4310
|
-
Message: undefined,
|
|
4311
|
-
};
|
|
4312
|
-
const data: any = parsedOutput.body;
|
|
4313
|
-
if (data.Code !== undefined && data.Code !== null) {
|
|
4314
|
-
contents.Code = __expectString(data.Code);
|
|
4315
|
-
}
|
|
4316
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
4317
|
-
contents.Message = __expectString(data.Message);
|
|
4318
|
-
}
|
|
4319
|
-
return contents;
|
|
4320
|
-
};
|
|
4321
|
-
|
|
4322
|
-
const deserializeAws_restJson1ForbiddenExceptionResponse = async (
|
|
4323
|
-
parsedOutput: any,
|
|
4324
|
-
context: __SerdeContext
|
|
4325
|
-
): Promise<ForbiddenException> => {
|
|
4326
|
-
const contents: ForbiddenException = {
|
|
4327
|
-
name: "ForbiddenException",
|
|
4328
|
-
$fault: "client",
|
|
4329
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4330
|
-
Code: undefined,
|
|
4331
|
-
Message: undefined,
|
|
4332
|
-
};
|
|
4333
|
-
const data: any = parsedOutput.body;
|
|
4334
|
-
if (data.Code !== undefined && data.Code !== null) {
|
|
4335
|
-
contents.Code = __expectString(data.Code);
|
|
4336
|
-
}
|
|
4337
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
4338
|
-
contents.Message = __expectString(data.Message);
|
|
4339
|
-
}
|
|
4340
|
-
return contents;
|
|
4341
|
-
};
|
|
4342
|
-
|
|
4343
|
-
const deserializeAws_restJson1GoneExceptionResponse = async (
|
|
4344
|
-
parsedOutput: any,
|
|
4345
|
-
context: __SerdeContext
|
|
4346
|
-
): Promise<GoneException> => {
|
|
4347
|
-
const contents: GoneException = {
|
|
4348
|
-
name: "GoneException",
|
|
4349
|
-
$fault: "client",
|
|
4350
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4351
|
-
Code: undefined,
|
|
4352
|
-
Message: undefined,
|
|
4353
|
-
};
|
|
4354
|
-
const data: any = parsedOutput.body;
|
|
4355
|
-
if (data.Code !== undefined && data.Code !== null) {
|
|
4356
|
-
contents.Code = __expectString(data.Code);
|
|
4357
|
-
}
|
|
4358
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
4359
|
-
contents.Message = __expectString(data.Message);
|
|
4360
|
-
}
|
|
4361
|
-
return contents;
|
|
4362
|
-
};
|
|
4363
|
-
|
|
4364
|
-
const deserializeAws_restJson1InternalServerErrorExceptionResponse = async (
|
|
4365
|
-
parsedOutput: any,
|
|
4366
|
-
context: __SerdeContext
|
|
4367
|
-
): Promise<InternalServerErrorException> => {
|
|
4368
|
-
const contents: InternalServerErrorException = {
|
|
4369
|
-
name: "InternalServerErrorException",
|
|
4370
|
-
$fault: "server",
|
|
4371
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4372
|
-
Code: undefined,
|
|
4373
|
-
Message: undefined,
|
|
4374
|
-
};
|
|
4375
|
-
const data: any = parsedOutput.body;
|
|
4376
|
-
if (data.Code !== undefined && data.Code !== null) {
|
|
4377
|
-
contents.Code = __expectString(data.Code);
|
|
4378
|
-
}
|
|
4379
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
4380
|
-
contents.Message = __expectString(data.Message);
|
|
4381
|
-
}
|
|
4382
|
-
return contents;
|
|
4383
|
-
};
|
|
4384
|
-
|
|
4385
|
-
const deserializeAws_restJson1NotFoundExceptionResponse = async (
|
|
4386
|
-
parsedOutput: any,
|
|
4387
|
-
context: __SerdeContext
|
|
4388
|
-
): Promise<NotFoundException> => {
|
|
4389
|
-
const contents: NotFoundException = {
|
|
4390
|
-
name: "NotFoundException",
|
|
4391
|
-
$fault: "client",
|
|
4392
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4393
|
-
Code: undefined,
|
|
4394
|
-
Message: undefined,
|
|
4395
|
-
};
|
|
4396
|
-
const data: any = parsedOutput.body;
|
|
4397
|
-
if (data.Code !== undefined && data.Code !== null) {
|
|
4398
|
-
contents.Code = __expectString(data.Code);
|
|
4399
|
-
}
|
|
4400
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
4401
|
-
contents.Message = __expectString(data.Message);
|
|
4402
|
-
}
|
|
4403
|
-
return contents;
|
|
4404
|
-
};
|
|
4405
|
-
|
|
4406
|
-
const deserializeAws_restJson1PreconditionFailedExceptionResponse = async (
|
|
4407
|
-
parsedOutput: any,
|
|
4408
|
-
context: __SerdeContext
|
|
4409
|
-
): Promise<PreconditionFailedException> => {
|
|
4410
|
-
const contents: PreconditionFailedException = {
|
|
4411
|
-
name: "PreconditionFailedException",
|
|
4412
|
-
$fault: "client",
|
|
4413
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4414
|
-
Code: undefined,
|
|
4415
|
-
Message: undefined,
|
|
4416
|
-
};
|
|
4417
|
-
const data: any = parsedOutput.body;
|
|
4418
|
-
if (data.Code !== undefined && data.Code !== null) {
|
|
4419
|
-
contents.Code = __expectString(data.Code);
|
|
4420
|
-
}
|
|
4421
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
4422
|
-
contents.Message = __expectString(data.Message);
|
|
4423
|
-
}
|
|
4424
|
-
return contents;
|
|
4425
|
-
};
|
|
4426
|
-
|
|
4427
|
-
const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (
|
|
4428
|
-
parsedOutput: any,
|
|
4429
|
-
context: __SerdeContext
|
|
4430
|
-
): Promise<ServiceUnavailableException> => {
|
|
4431
|
-
const contents: ServiceUnavailableException = {
|
|
4432
|
-
name: "ServiceUnavailableException",
|
|
4433
|
-
$fault: "server",
|
|
4434
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4435
|
-
Code: undefined,
|
|
4436
|
-
Message: undefined,
|
|
4437
|
-
};
|
|
4438
|
-
const data: any = parsedOutput.body;
|
|
4439
|
-
if (data.Code !== undefined && data.Code !== null) {
|
|
4440
|
-
contents.Code = __expectString(data.Code);
|
|
4441
|
-
}
|
|
4442
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
4443
|
-
contents.Message = __expectString(data.Message);
|
|
4444
|
-
}
|
|
4445
|
-
return contents;
|
|
4446
|
-
};
|
|
4447
|
-
|
|
4448
|
-
const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (
|
|
4449
|
-
parsedOutput: any,
|
|
4450
|
-
context: __SerdeContext
|
|
4451
|
-
): Promise<TooManyRequestsException> => {
|
|
4452
|
-
const contents: TooManyRequestsException = {
|
|
4453
|
-
name: "TooManyRequestsException",
|
|
4454
|
-
$fault: "client",
|
|
4455
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4456
|
-
Code: undefined,
|
|
4457
|
-
Message: undefined,
|
|
4458
|
-
};
|
|
4459
|
-
const data: any = parsedOutput.body;
|
|
4460
|
-
if (data.Code !== undefined && data.Code !== null) {
|
|
4461
|
-
contents.Code = __expectString(data.Code);
|
|
4462
|
-
}
|
|
4463
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
4464
|
-
contents.Message = __expectString(data.Message);
|
|
4465
|
-
}
|
|
4466
|
-
return contents;
|
|
4467
|
-
};
|
|
4468
|
-
|
|
4469
|
-
const deserializeAws_restJson1UnauthorizedExceptionResponse = async (
|
|
4470
|
-
parsedOutput: any,
|
|
4471
|
-
context: __SerdeContext
|
|
4472
|
-
): Promise<UnauthorizedException> => {
|
|
4473
|
-
const contents: UnauthorizedException = {
|
|
4474
|
-
name: "UnauthorizedException",
|
|
4475
|
-
$fault: "client",
|
|
4476
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
4477
|
-
Code: undefined,
|
|
4478
|
-
Message: undefined,
|
|
4479
|
-
};
|
|
4480
|
-
const data: any = parsedOutput.body;
|
|
4481
|
-
if (data.Code !== undefined && data.Code !== null) {
|
|
4482
|
-
contents.Code = __expectString(data.Code);
|
|
4483
|
-
}
|
|
4484
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
4485
|
-
contents.Message = __expectString(data.Message);
|
|
4486
|
-
}
|
|
4487
|
-
return contents;
|
|
4488
|
-
};
|
|
4489
|
-
|
|
4490
|
-
const serializeAws_restJson1__listOfGetDiscoveredSchemaVersionItemInput = (
|
|
4491
|
-
input: string[],
|
|
4492
|
-
context: __SerdeContext
|
|
4493
|
-
): any => {
|
|
4494
|
-
return input
|
|
4495
|
-
.filter((e: any) => e != null)
|
|
4496
|
-
.map((entry) => {
|
|
4497
|
-
if (entry === null) {
|
|
4498
|
-
return null as any;
|
|
4499
|
-
}
|
|
4500
|
-
return entry;
|
|
4501
|
-
});
|
|
4502
|
-
};
|
|
4503
|
-
|
|
4504
|
-
const serializeAws_restJson1Tags = (input: { [key: string]: string }, context: __SerdeContext): any => {
|
|
4505
|
-
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
|
|
4506
|
-
if (value === null) {
|
|
4507
|
-
return acc;
|
|
4508
|
-
}
|
|
4509
|
-
return {
|
|
4510
|
-
...acc,
|
|
4511
|
-
[key]: value,
|
|
4512
|
-
};
|
|
4513
|
-
}, {});
|
|
4514
|
-
};
|
|
4515
|
-
|
|
4516
|
-
const deserializeAws_restJson1__listOfDiscovererSummary = (
|
|
4517
|
-
output: any,
|
|
4518
|
-
context: __SerdeContext
|
|
4519
|
-
): DiscovererSummary[] => {
|
|
4520
|
-
return (output || [])
|
|
4521
|
-
.filter((e: any) => e != null)
|
|
4522
|
-
.map((entry: any) => {
|
|
4523
|
-
if (entry === null) {
|
|
4524
|
-
return null as any;
|
|
4525
|
-
}
|
|
4526
|
-
return deserializeAws_restJson1DiscovererSummary(entry, context);
|
|
4527
|
-
});
|
|
4528
|
-
};
|
|
4529
|
-
|
|
4530
|
-
const deserializeAws_restJson1__listOfRegistrySummary = (output: any, context: __SerdeContext): RegistrySummary[] => {
|
|
4531
|
-
return (output || [])
|
|
4532
|
-
.filter((e: any) => e != null)
|
|
4533
|
-
.map((entry: any) => {
|
|
4534
|
-
if (entry === null) {
|
|
4535
|
-
return null as any;
|
|
4536
|
-
}
|
|
4537
|
-
return deserializeAws_restJson1RegistrySummary(entry, context);
|
|
4538
|
-
});
|
|
4539
|
-
};
|
|
4540
|
-
|
|
4541
|
-
const deserializeAws_restJson1__listOfSchemaSummary = (output: any, context: __SerdeContext): SchemaSummary[] => {
|
|
4542
|
-
return (output || [])
|
|
4543
|
-
.filter((e: any) => e != null)
|
|
4544
|
-
.map((entry: any) => {
|
|
4545
|
-
if (entry === null) {
|
|
4546
|
-
return null as any;
|
|
4547
|
-
}
|
|
4548
|
-
return deserializeAws_restJson1SchemaSummary(entry, context);
|
|
4549
|
-
});
|
|
4550
|
-
};
|
|
4551
|
-
|
|
4552
|
-
const deserializeAws_restJson1__listOfSchemaVersionSummary = (
|
|
4553
|
-
output: any,
|
|
4554
|
-
context: __SerdeContext
|
|
4555
|
-
): SchemaVersionSummary[] => {
|
|
4556
|
-
return (output || [])
|
|
4557
|
-
.filter((e: any) => e != null)
|
|
4558
|
-
.map((entry: any) => {
|
|
4559
|
-
if (entry === null) {
|
|
4560
|
-
return null as any;
|
|
4561
|
-
}
|
|
4562
|
-
return deserializeAws_restJson1SchemaVersionSummary(entry, context);
|
|
4563
|
-
});
|
|
4564
|
-
};
|
|
4565
|
-
|
|
4566
|
-
const deserializeAws_restJson1__listOfSearchSchemaSummary = (
|
|
4567
|
-
output: any,
|
|
4568
|
-
context: __SerdeContext
|
|
4569
|
-
): SearchSchemaSummary[] => {
|
|
4570
|
-
return (output || [])
|
|
4571
|
-
.filter((e: any) => e != null)
|
|
4572
|
-
.map((entry: any) => {
|
|
4573
|
-
if (entry === null) {
|
|
4574
|
-
return null as any;
|
|
4575
|
-
}
|
|
4576
|
-
return deserializeAws_restJson1SearchSchemaSummary(entry, context);
|
|
4577
|
-
});
|
|
4578
|
-
};
|
|
4579
|
-
|
|
4580
|
-
const deserializeAws_restJson1__listOfSearchSchemaVersionSummary = (
|
|
4581
|
-
output: any,
|
|
4582
|
-
context: __SerdeContext
|
|
4583
|
-
): SearchSchemaVersionSummary[] => {
|
|
4584
|
-
return (output || [])
|
|
4585
|
-
.filter((e: any) => e != null)
|
|
4586
|
-
.map((entry: any) => {
|
|
4587
|
-
if (entry === null) {
|
|
4588
|
-
return null as any;
|
|
4589
|
-
}
|
|
4590
|
-
return deserializeAws_restJson1SearchSchemaVersionSummary(entry, context);
|
|
4591
|
-
});
|
|
4592
|
-
};
|
|
4593
|
-
|
|
4594
|
-
const deserializeAws_restJson1DiscovererSummary = (output: any, context: __SerdeContext): DiscovererSummary => {
|
|
4595
|
-
return {
|
|
4596
|
-
CrossAccount: __expectBoolean(output.CrossAccount),
|
|
4597
|
-
DiscovererArn: __expectString(output.DiscovererArn),
|
|
4598
|
-
DiscovererId: __expectString(output.DiscovererId),
|
|
4599
|
-
SourceArn: __expectString(output.SourceArn),
|
|
4600
|
-
State: __expectString(output.State),
|
|
4601
|
-
Tags:
|
|
4602
|
-
output.tags !== undefined && output.tags !== null
|
|
4603
|
-
? deserializeAws_restJson1Tags(output.tags, context)
|
|
4604
|
-
: undefined,
|
|
4605
|
-
} as any;
|
|
4606
|
-
};
|
|
4607
|
-
|
|
4608
|
-
const deserializeAws_restJson1RegistrySummary = (output: any, context: __SerdeContext): RegistrySummary => {
|
|
4609
|
-
return {
|
|
4610
|
-
RegistryArn: __expectString(output.RegistryArn),
|
|
4611
|
-
RegistryName: __expectString(output.RegistryName),
|
|
4612
|
-
Tags:
|
|
4613
|
-
output.tags !== undefined && output.tags !== null
|
|
4614
|
-
? deserializeAws_restJson1Tags(output.tags, context)
|
|
4615
|
-
: undefined,
|
|
4616
|
-
} as any;
|
|
4617
|
-
};
|
|
4618
|
-
|
|
4619
|
-
const deserializeAws_restJson1SchemaSummary = (output: any, context: __SerdeContext): SchemaSummary => {
|
|
4620
|
-
return {
|
|
4621
|
-
LastModified:
|
|
4622
|
-
output.LastModified !== undefined && output.LastModified !== null
|
|
4623
|
-
? __expectNonNull(__parseRfc3339DateTime(output.LastModified))
|
|
4624
|
-
: undefined,
|
|
4625
|
-
SchemaArn: __expectString(output.SchemaArn),
|
|
4626
|
-
SchemaName: __expectString(output.SchemaName),
|
|
4627
|
-
Tags:
|
|
4628
|
-
output.tags !== undefined && output.tags !== null
|
|
4629
|
-
? deserializeAws_restJson1Tags(output.tags, context)
|
|
4630
|
-
: undefined,
|
|
4631
|
-
VersionCount: __expectLong(output.VersionCount),
|
|
4632
|
-
} as any;
|
|
4633
|
-
};
|
|
4634
|
-
|
|
4635
|
-
const deserializeAws_restJson1SchemaVersionSummary = (output: any, context: __SerdeContext): SchemaVersionSummary => {
|
|
4636
|
-
return {
|
|
4637
|
-
SchemaArn: __expectString(output.SchemaArn),
|
|
4638
|
-
SchemaName: __expectString(output.SchemaName),
|
|
4639
|
-
SchemaVersion: __expectString(output.SchemaVersion),
|
|
4640
|
-
Type: __expectString(output.Type),
|
|
4641
|
-
} as any;
|
|
4642
|
-
};
|
|
4643
|
-
|
|
4644
|
-
const deserializeAws_restJson1SearchSchemaSummary = (output: any, context: __SerdeContext): SearchSchemaSummary => {
|
|
4645
|
-
return {
|
|
4646
|
-
RegistryName: __expectString(output.RegistryName),
|
|
4647
|
-
SchemaArn: __expectString(output.SchemaArn),
|
|
4648
|
-
SchemaName: __expectString(output.SchemaName),
|
|
4649
|
-
SchemaVersions:
|
|
4650
|
-
output.SchemaVersions !== undefined && output.SchemaVersions !== null
|
|
4651
|
-
? deserializeAws_restJson1__listOfSearchSchemaVersionSummary(output.SchemaVersions, context)
|
|
4652
|
-
: undefined,
|
|
4653
|
-
} as any;
|
|
4654
|
-
};
|
|
4655
|
-
|
|
4656
|
-
const deserializeAws_restJson1SearchSchemaVersionSummary = (
|
|
4657
|
-
output: any,
|
|
4658
|
-
context: __SerdeContext
|
|
4659
|
-
): SearchSchemaVersionSummary => {
|
|
4660
|
-
return {
|
|
4661
|
-
CreatedDate:
|
|
4662
|
-
output.CreatedDate !== undefined && output.CreatedDate !== null
|
|
4663
|
-
? __expectNonNull(__parseRfc3339DateTime(output.CreatedDate))
|
|
4664
|
-
: undefined,
|
|
4665
|
-
SchemaVersion: __expectString(output.SchemaVersion),
|
|
4666
|
-
Type: __expectString(output.Type),
|
|
4667
|
-
} as any;
|
|
4668
|
-
};
|
|
4669
|
-
|
|
4670
|
-
const deserializeAws_restJson1Tags = (output: any, context: __SerdeContext): { [key: string]: string } => {
|
|
4671
|
-
return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
|
|
4672
|
-
if (value === null) {
|
|
4673
|
-
return acc;
|
|
4674
|
-
}
|
|
4675
|
-
return {
|
|
4676
|
-
...acc,
|
|
4677
|
-
[key]: __expectString(value) as any,
|
|
4678
|
-
};
|
|
4679
|
-
}, {});
|
|
4680
|
-
};
|
|
4681
|
-
|
|
4682
|
-
const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
|
|
4683
|
-
httpStatusCode: output.statusCode,
|
|
4684
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
4685
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
4686
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
4687
|
-
});
|
|
4688
|
-
|
|
4689
|
-
// Collect low-level response body stream to Uint8Array.
|
|
4690
|
-
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
|
|
4691
|
-
if (streamBody instanceof Uint8Array) {
|
|
4692
|
-
return Promise.resolve(streamBody);
|
|
4693
|
-
}
|
|
4694
|
-
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
4695
|
-
};
|
|
4696
|
-
|
|
4697
|
-
// Encode Uint8Array data into string with utf-8.
|
|
4698
|
-
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
|
|
4699
|
-
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
4700
|
-
|
|
4701
|
-
const isSerializableHeaderValue = (value: any): boolean =>
|
|
4702
|
-
value !== undefined &&
|
|
4703
|
-
value !== null &&
|
|
4704
|
-
value !== "" &&
|
|
4705
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
4706
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
4707
|
-
|
|
4708
|
-
const parseBody = (streamBody: any, context: __SerdeContext): any =>
|
|
4709
|
-
collectBodyString(streamBody, context).then((encoded) => {
|
|
4710
|
-
if (encoded.length) {
|
|
4711
|
-
return JSON.parse(encoded);
|
|
4712
|
-
}
|
|
4713
|
-
return {};
|
|
4714
|
-
});
|
|
4715
|
-
|
|
4716
|
-
/**
|
|
4717
|
-
* Load an error code for the aws.rest-json-1.1 protocol.
|
|
4718
|
-
*/
|
|
4719
|
-
const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
|
|
4720
|
-
const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
4721
|
-
|
|
4722
|
-
const sanitizeErrorCode = (rawValue: string): string => {
|
|
4723
|
-
let cleanValue = rawValue;
|
|
4724
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
4725
|
-
cleanValue = cleanValue.split(":")[0];
|
|
4726
|
-
}
|
|
4727
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
4728
|
-
cleanValue = cleanValue.split("#")[1];
|
|
4729
|
-
}
|
|
4730
|
-
return cleanValue;
|
|
4731
|
-
};
|
|
4732
|
-
|
|
4733
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
4734
|
-
if (headerKey !== undefined) {
|
|
4735
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
4736
|
-
}
|
|
4737
|
-
|
|
4738
|
-
if (data.code !== undefined) {
|
|
4739
|
-
return sanitizeErrorCode(data.code);
|
|
4740
|
-
}
|
|
4741
|
-
|
|
4742
|
-
if (data["__type"] !== undefined) {
|
|
4743
|
-
return sanitizeErrorCode(data["__type"]);
|
|
4744
|
-
}
|
|
4745
|
-
|
|
4746
|
-
return "";
|
|
4747
|
-
};
|