@aws-sdk/client-kafkaconnect 3.33.0 → 3.36.1
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}/KafkaConnect.js +1 -5
- package/{dist/cjs → dist-cjs}/KafkaConnectClient.js +8 -17
- package/{dist/cjs → dist-cjs}/commands/CreateConnectorCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/CreateCustomPluginCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/CreateWorkerConfigurationCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/DeleteConnectorCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/DescribeConnectorCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/DescribeCustomPluginCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/DescribeWorkerConfigurationCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/ListConnectorsCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/ListCustomPluginsCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/ListWorkerConfigurationsCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/UpdateConnectorCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/endpoints.js +0 -1
- 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 -247
- package/{dist/cjs → dist-cjs}/pagination/Interfaces.js +0 -1
- package/{dist/cjs → dist-cjs}/pagination/ListConnectorsPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/pagination/ListCustomPluginsPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/pagination/ListWorkerConfigurationsPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/protocols/Aws_restJson1.js +6 -12
- 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/es → dist-es}/KafkaConnect.js +2 -6
- package/{dist/es → dist-es}/KafkaConnectClient.js +2 -11
- package/{dist/es → dist-es}/commands/CreateConnectorCommand.js +4 -30
- package/{dist/es → dist-es}/commands/CreateCustomPluginCommand.js +4 -30
- package/{dist/es → dist-es}/commands/CreateWorkerConfigurationCommand.js +4 -30
- package/{dist/es → dist-es}/commands/DeleteConnectorCommand.js +4 -30
- package/{dist/es → dist-es}/commands/DescribeConnectorCommand.js +4 -30
- package/{dist/es → dist-es}/commands/DescribeCustomPluginCommand.js +4 -30
- package/{dist/es → dist-es}/commands/DescribeWorkerConfigurationCommand.js +4 -30
- package/{dist/es → dist-es}/commands/ListConnectorsCommand.js +4 -30
- package/{dist/es → dist-es}/commands/ListCustomPluginsCommand.js +4 -30
- package/{dist/es → dist-es}/commands/ListWorkerConfigurationsCommand.js +4 -30
- package/{dist/es → dist-es}/commands/UpdateConnectorCommand.js +4 -30
- 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 -247
- package/dist-es/pagination/Interfaces.js +1 -0
- package/{dist/es → dist-es}/pagination/ListConnectorsPaginator.js +17 -30
- package/{dist/es → dist-es}/pagination/ListCustomPluginsPaginator.js +17 -30
- package/{dist/es → dist-es}/pagination/ListWorkerConfigurationsPaginator.js +17 -30
- package/{dist/es → dist-es}/protocols/Aws_restJson1.js +427 -433
- package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -5
- package/{dist/es → dist-es}/runtimeConfig.js +1 -5
- package/{dist/es → dist-es}/runtimeConfig.native.js +0 -4
- package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -5
- package/{dist/types → dist-types}/KafkaConnect.d.ts +2 -2
- package/{dist/types → dist-types}/KafkaConnectClient.d.ts +8 -8
- package/{dist/types → dist-types}/commands/CreateConnectorCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/CreateCustomPluginCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/CreateWorkerConfigurationCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/DeleteConnectorCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/DescribeConnectorCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/DescribeCustomPluginCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/DescribeWorkerConfigurationCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/ListConnectorsCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/ListCustomPluginsCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/ListWorkerConfigurationsCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/UpdateConnectorCommand.d.ts +2 -2
- 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/ListConnectorsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListCustomPluginsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListWorkerConfigurationsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/protocols/Aws_restJson1.d.ts +2 -2
- 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/KafkaConnect.d.ts +14 -38
- package/{dist/types → dist-types}/ts3.4/KafkaConnectClient.d.ts +32 -97
- package/dist-types/ts3.4/commands/CreateConnectorCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/commands/CreateCustomPluginCommand.d.ts +4 -22
- package/{dist/types → dist-types}/ts3.4/commands/CreateWorkerConfigurationCommand.d.ts +4 -22
- package/{dist/types → dist-types}/ts3.4/commands/DeleteConnectorCommand.d.ts +4 -22
- package/{dist/types → dist-types}/ts3.4/commands/DescribeConnectorCommand.d.ts +4 -22
- package/{dist/types → dist-types}/ts3.4/commands/DescribeCustomPluginCommand.d.ts +4 -22
- package/{dist/types → dist-types}/ts3.4/commands/DescribeWorkerConfigurationCommand.d.ts +4 -22
- package/dist-types/ts3.4/commands/ListConnectorsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListCustomPluginsCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/commands/ListWorkerConfigurationsCommand.d.ts +4 -22
- package/{dist/types → dist-types}/ts3.4/commands/UpdateConnectorCommand.d.ts +4 -22
- 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/ts3.4/models/models_0.d.ts +1028 -0
- package/{dist/types → dist-types}/ts3.4/pagination/Interfaces.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListConnectorsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListCustomPluginsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListWorkerConfigurationsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/protocols/Aws_restJson1.d.ts +2 -2
- 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/package.json +52 -49
- package/KafkaConnect.ts +0 -414
- package/KafkaConnectClient.ts +0 -280
- package/commands/CreateConnectorCommand.ts +0 -94
- package/commands/CreateCustomPluginCommand.ts +0 -94
- package/commands/CreateWorkerConfigurationCommand.ts +0 -97
- package/commands/DeleteConnectorCommand.ts +0 -94
- package/commands/DescribeConnectorCommand.ts +0 -94
- package/commands/DescribeCustomPluginCommand.ts +0 -94
- package/commands/DescribeWorkerConfigurationCommand.ts +0 -99
- package/commands/ListConnectorsCommand.ts +0 -94
- package/commands/ListCustomPluginsCommand.ts +0 -94
- package/commands/ListWorkerConfigurationsCommand.ts +0 -94
- package/commands/UpdateConnectorCommand.ts +0 -94
- package/dist/cjs/KafkaConnect.js.map +0 -1
- package/dist/cjs/KafkaConnectClient.js.map +0 -1
- package/dist/cjs/commands/CreateConnectorCommand.js.map +0 -1
- package/dist/cjs/commands/CreateCustomPluginCommand.js.map +0 -1
- package/dist/cjs/commands/CreateWorkerConfigurationCommand.js.map +0 -1
- package/dist/cjs/commands/DeleteConnectorCommand.js.map +0 -1
- package/dist/cjs/commands/DescribeConnectorCommand.js.map +0 -1
- package/dist/cjs/commands/DescribeCustomPluginCommand.js.map +0 -1
- package/dist/cjs/commands/DescribeWorkerConfigurationCommand.js.map +0 -1
- package/dist/cjs/commands/ListConnectorsCommand.js.map +0 -1
- package/dist/cjs/commands/ListCustomPluginsCommand.js.map +0 -1
- package/dist/cjs/commands/ListWorkerConfigurationsCommand.js.map +0 -1
- package/dist/cjs/commands/UpdateConnectorCommand.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 -91
- package/dist/cjs/pagination/Interfaces.js.map +0 -1
- package/dist/cjs/pagination/ListConnectorsPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListCustomPluginsPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListWorkerConfigurationsPaginator.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/es/KafkaConnect.js.map +0 -1
- package/dist/es/KafkaConnectClient.js.map +0 -1
- package/dist/es/commands/CreateConnectorCommand.js.map +0 -1
- package/dist/es/commands/CreateCustomPluginCommand.js.map +0 -1
- package/dist/es/commands/CreateWorkerConfigurationCommand.js.map +0 -1
- package/dist/es/commands/DeleteConnectorCommand.js.map +0 -1
- package/dist/es/commands/DescribeConnectorCommand.js.map +0 -1
- package/dist/es/commands/DescribeCustomPluginCommand.js.map +0 -1
- package/dist/es/commands/DescribeWorkerConfigurationCommand.js.map +0 -1
- package/dist/es/commands/ListConnectorsCommand.js.map +0 -1
- package/dist/es/commands/ListCustomPluginsCommand.js.map +0 -1
- package/dist/es/commands/ListWorkerConfigurationsCommand.js.map +0 -1
- package/dist/es/commands/UpdateConnectorCommand.js.map +0 -1
- package/dist/es/endpoints.js.map +0 -1
- package/dist/es/index.js +0 -19
- 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 -91
- package/dist/es/pagination/Interfaces.js +0 -2
- package/dist/es/pagination/Interfaces.js.map +0 -1
- package/dist/es/pagination/ListConnectorsPaginator.js.map +0 -1
- package/dist/es/pagination/ListCustomPluginsPaginator.js.map +0 -1
- package/dist/es/pagination/ListWorkerConfigurationsPaginator.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/types/ts3.4/commands/CreateConnectorCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/ListConnectorsCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/ListCustomPluginsCommand.d.ts +0 -35
- package/dist/types/ts3.4/models/models_0.d.ts +0 -1732
- package/endpoints.ts +0 -57
- package/jest.config.js +0 -4
- package/models/models_0.ts +0 -2197
- package/pagination/Interfaces.ts +0 -7
- package/pagination/ListConnectorsPaginator.ts +0 -58
- package/pagination/ListCustomPluginsPaginator.ts +0 -58
- package/pagination/ListWorkerConfigurationsPaginator.ts +0 -58
- package/protocols/Aws_restJson1.ts +0 -2700
- 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 -12
- package/tsconfig.json +0 -32
|
@@ -1,2700 +0,0 @@
|
|
|
1
|
-
import { CreateConnectorCommandInput, CreateConnectorCommandOutput } from "../commands/CreateConnectorCommand";
|
|
2
|
-
import { CreateCustomPluginCommandInput, CreateCustomPluginCommandOutput } from "../commands/CreateCustomPluginCommand";
|
|
3
|
-
import {
|
|
4
|
-
CreateWorkerConfigurationCommandInput,
|
|
5
|
-
CreateWorkerConfigurationCommandOutput,
|
|
6
|
-
} from "../commands/CreateWorkerConfigurationCommand";
|
|
7
|
-
import { DeleteConnectorCommandInput, DeleteConnectorCommandOutput } from "../commands/DeleteConnectorCommand";
|
|
8
|
-
import { DescribeConnectorCommandInput, DescribeConnectorCommandOutput } from "../commands/DescribeConnectorCommand";
|
|
9
|
-
import {
|
|
10
|
-
DescribeCustomPluginCommandInput,
|
|
11
|
-
DescribeCustomPluginCommandOutput,
|
|
12
|
-
} from "../commands/DescribeCustomPluginCommand";
|
|
13
|
-
import {
|
|
14
|
-
DescribeWorkerConfigurationCommandInput,
|
|
15
|
-
DescribeWorkerConfigurationCommandOutput,
|
|
16
|
-
} from "../commands/DescribeWorkerConfigurationCommand";
|
|
17
|
-
import { ListConnectorsCommandInput, ListConnectorsCommandOutput } from "../commands/ListConnectorsCommand";
|
|
18
|
-
import { ListCustomPluginsCommandInput, ListCustomPluginsCommandOutput } from "../commands/ListCustomPluginsCommand";
|
|
19
|
-
import {
|
|
20
|
-
ListWorkerConfigurationsCommandInput,
|
|
21
|
-
ListWorkerConfigurationsCommandOutput,
|
|
22
|
-
} from "../commands/ListWorkerConfigurationsCommand";
|
|
23
|
-
import { UpdateConnectorCommandInput, UpdateConnectorCommandOutput } from "../commands/UpdateConnectorCommand";
|
|
24
|
-
import {
|
|
25
|
-
ApacheKafkaCluster,
|
|
26
|
-
ApacheKafkaClusterDescription,
|
|
27
|
-
AutoScaling,
|
|
28
|
-
AutoScalingDescription,
|
|
29
|
-
AutoScalingUpdate,
|
|
30
|
-
BadRequestException,
|
|
31
|
-
Capacity,
|
|
32
|
-
CapacityDescription,
|
|
33
|
-
CapacityUpdate,
|
|
34
|
-
CloudWatchLogsLogDelivery,
|
|
35
|
-
CloudWatchLogsLogDeliveryDescription,
|
|
36
|
-
ConflictException,
|
|
37
|
-
ConnectorSummary,
|
|
38
|
-
CustomPlugin,
|
|
39
|
-
CustomPluginDescription,
|
|
40
|
-
CustomPluginFileDescription,
|
|
41
|
-
CustomPluginLocation,
|
|
42
|
-
CustomPluginLocationDescription,
|
|
43
|
-
CustomPluginRevisionSummary,
|
|
44
|
-
CustomPluginSummary,
|
|
45
|
-
FirehoseLogDelivery,
|
|
46
|
-
FirehoseLogDeliveryDescription,
|
|
47
|
-
ForbiddenException,
|
|
48
|
-
InternalServerErrorException,
|
|
49
|
-
KafkaCluster,
|
|
50
|
-
KafkaClusterClientAuthentication,
|
|
51
|
-
KafkaClusterClientAuthenticationDescription,
|
|
52
|
-
KafkaClusterDescription,
|
|
53
|
-
KafkaClusterEncryptionInTransit,
|
|
54
|
-
KafkaClusterEncryptionInTransitDescription,
|
|
55
|
-
LogDelivery,
|
|
56
|
-
LogDeliveryDescription,
|
|
57
|
-
NotFoundException,
|
|
58
|
-
Plugin,
|
|
59
|
-
PluginDescription,
|
|
60
|
-
ProvisionedCapacity,
|
|
61
|
-
ProvisionedCapacityDescription,
|
|
62
|
-
ProvisionedCapacityUpdate,
|
|
63
|
-
S3Location,
|
|
64
|
-
S3LocationDescription,
|
|
65
|
-
S3LogDelivery,
|
|
66
|
-
S3LogDeliveryDescription,
|
|
67
|
-
ScaleInPolicy,
|
|
68
|
-
ScaleInPolicyDescription,
|
|
69
|
-
ScaleInPolicyUpdate,
|
|
70
|
-
ScaleOutPolicy,
|
|
71
|
-
ScaleOutPolicyDescription,
|
|
72
|
-
ScaleOutPolicyUpdate,
|
|
73
|
-
ServiceUnavailableException,
|
|
74
|
-
TooManyRequestsException,
|
|
75
|
-
UnauthorizedException,
|
|
76
|
-
Vpc,
|
|
77
|
-
VpcDescription,
|
|
78
|
-
WorkerConfiguration,
|
|
79
|
-
WorkerConfigurationDescription,
|
|
80
|
-
WorkerConfigurationRevisionDescription,
|
|
81
|
-
WorkerConfigurationRevisionSummary,
|
|
82
|
-
WorkerConfigurationSummary,
|
|
83
|
-
WorkerLogDelivery,
|
|
84
|
-
WorkerLogDeliveryDescription,
|
|
85
|
-
} from "../models/models_0";
|
|
86
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
87
|
-
import {
|
|
88
|
-
expectBoolean as __expectBoolean,
|
|
89
|
-
expectInt32 as __expectInt32,
|
|
90
|
-
expectLong as __expectLong,
|
|
91
|
-
expectNonNull as __expectNonNull,
|
|
92
|
-
expectObject as __expectObject,
|
|
93
|
-
expectString as __expectString,
|
|
94
|
-
extendedEncodeURIComponent as __extendedEncodeURIComponent,
|
|
95
|
-
parseRfc3339DateTime as __parseRfc3339DateTime,
|
|
96
|
-
} from "@aws-sdk/smithy-client";
|
|
97
|
-
import {
|
|
98
|
-
Endpoint as __Endpoint,
|
|
99
|
-
MetadataBearer as __MetadataBearer,
|
|
100
|
-
ResponseMetadata as __ResponseMetadata,
|
|
101
|
-
SerdeContext as __SerdeContext,
|
|
102
|
-
SmithyException as __SmithyException,
|
|
103
|
-
} from "@aws-sdk/types";
|
|
104
|
-
|
|
105
|
-
export const serializeAws_restJson1CreateConnectorCommand = async (
|
|
106
|
-
input: CreateConnectorCommandInput,
|
|
107
|
-
context: __SerdeContext
|
|
108
|
-
): Promise<__HttpRequest> => {
|
|
109
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
110
|
-
const headers: any = {
|
|
111
|
-
"content-type": "application/json",
|
|
112
|
-
};
|
|
113
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/connectors";
|
|
114
|
-
let body: any;
|
|
115
|
-
body = JSON.stringify({
|
|
116
|
-
...(input.capacity !== undefined &&
|
|
117
|
-
input.capacity !== null && { capacity: serializeAws_restJson1Capacity(input.capacity, context) }),
|
|
118
|
-
...(input.connectorConfiguration !== undefined &&
|
|
119
|
-
input.connectorConfiguration !== null && {
|
|
120
|
-
connectorConfiguration: serializeAws_restJson1__mapOf__string(input.connectorConfiguration, context),
|
|
121
|
-
}),
|
|
122
|
-
...(input.connectorDescription !== undefined &&
|
|
123
|
-
input.connectorDescription !== null && { connectorDescription: input.connectorDescription }),
|
|
124
|
-
...(input.connectorName !== undefined && input.connectorName !== null && { connectorName: input.connectorName }),
|
|
125
|
-
...(input.kafkaCluster !== undefined &&
|
|
126
|
-
input.kafkaCluster !== null && { kafkaCluster: serializeAws_restJson1KafkaCluster(input.kafkaCluster, context) }),
|
|
127
|
-
...(input.kafkaClusterClientAuthentication !== undefined &&
|
|
128
|
-
input.kafkaClusterClientAuthentication !== null && {
|
|
129
|
-
kafkaClusterClientAuthentication: serializeAws_restJson1KafkaClusterClientAuthentication(
|
|
130
|
-
input.kafkaClusterClientAuthentication,
|
|
131
|
-
context
|
|
132
|
-
),
|
|
133
|
-
}),
|
|
134
|
-
...(input.kafkaClusterEncryptionInTransit !== undefined &&
|
|
135
|
-
input.kafkaClusterEncryptionInTransit !== null && {
|
|
136
|
-
kafkaClusterEncryptionInTransit: serializeAws_restJson1KafkaClusterEncryptionInTransit(
|
|
137
|
-
input.kafkaClusterEncryptionInTransit,
|
|
138
|
-
context
|
|
139
|
-
),
|
|
140
|
-
}),
|
|
141
|
-
...(input.kafkaConnectVersion !== undefined &&
|
|
142
|
-
input.kafkaConnectVersion !== null && { kafkaConnectVersion: input.kafkaConnectVersion }),
|
|
143
|
-
...(input.logDelivery !== undefined &&
|
|
144
|
-
input.logDelivery !== null && { logDelivery: serializeAws_restJson1LogDelivery(input.logDelivery, context) }),
|
|
145
|
-
...(input.plugins !== undefined &&
|
|
146
|
-
input.plugins !== null && { plugins: serializeAws_restJson1__listOfPlugin(input.plugins, context) }),
|
|
147
|
-
...(input.serviceExecutionRoleArn !== undefined &&
|
|
148
|
-
input.serviceExecutionRoleArn !== null && { serviceExecutionRoleArn: input.serviceExecutionRoleArn }),
|
|
149
|
-
...(input.workerConfiguration !== undefined &&
|
|
150
|
-
input.workerConfiguration !== null && {
|
|
151
|
-
workerConfiguration: serializeAws_restJson1WorkerConfiguration(input.workerConfiguration, context),
|
|
152
|
-
}),
|
|
153
|
-
});
|
|
154
|
-
return new __HttpRequest({
|
|
155
|
-
protocol,
|
|
156
|
-
hostname,
|
|
157
|
-
port,
|
|
158
|
-
method: "POST",
|
|
159
|
-
headers,
|
|
160
|
-
path: resolvedPath,
|
|
161
|
-
body,
|
|
162
|
-
});
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
export const serializeAws_restJson1CreateCustomPluginCommand = async (
|
|
166
|
-
input: CreateCustomPluginCommandInput,
|
|
167
|
-
context: __SerdeContext
|
|
168
|
-
): Promise<__HttpRequest> => {
|
|
169
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
170
|
-
const headers: any = {
|
|
171
|
-
"content-type": "application/json",
|
|
172
|
-
};
|
|
173
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/custom-plugins";
|
|
174
|
-
let body: any;
|
|
175
|
-
body = JSON.stringify({
|
|
176
|
-
...(input.contentType !== undefined && input.contentType !== null && { contentType: input.contentType }),
|
|
177
|
-
...(input.description !== undefined && input.description !== null && { description: input.description }),
|
|
178
|
-
...(input.location !== undefined &&
|
|
179
|
-
input.location !== null && { location: serializeAws_restJson1CustomPluginLocation(input.location, context) }),
|
|
180
|
-
...(input.name !== undefined && input.name !== null && { name: input.name }),
|
|
181
|
-
});
|
|
182
|
-
return new __HttpRequest({
|
|
183
|
-
protocol,
|
|
184
|
-
hostname,
|
|
185
|
-
port,
|
|
186
|
-
method: "POST",
|
|
187
|
-
headers,
|
|
188
|
-
path: resolvedPath,
|
|
189
|
-
body,
|
|
190
|
-
});
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
export const serializeAws_restJson1CreateWorkerConfigurationCommand = async (
|
|
194
|
-
input: CreateWorkerConfigurationCommandInput,
|
|
195
|
-
context: __SerdeContext
|
|
196
|
-
): Promise<__HttpRequest> => {
|
|
197
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
198
|
-
const headers: any = {
|
|
199
|
-
"content-type": "application/json",
|
|
200
|
-
};
|
|
201
|
-
let resolvedPath =
|
|
202
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/worker-configurations";
|
|
203
|
-
let body: any;
|
|
204
|
-
body = JSON.stringify({
|
|
205
|
-
...(input.description !== undefined && input.description !== null && { description: input.description }),
|
|
206
|
-
...(input.name !== undefined && input.name !== null && { name: input.name }),
|
|
207
|
-
...(input.propertiesFileContent !== undefined &&
|
|
208
|
-
input.propertiesFileContent !== null && { propertiesFileContent: input.propertiesFileContent }),
|
|
209
|
-
});
|
|
210
|
-
return new __HttpRequest({
|
|
211
|
-
protocol,
|
|
212
|
-
hostname,
|
|
213
|
-
port,
|
|
214
|
-
method: "POST",
|
|
215
|
-
headers,
|
|
216
|
-
path: resolvedPath,
|
|
217
|
-
body,
|
|
218
|
-
});
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
export const serializeAws_restJson1DeleteConnectorCommand = async (
|
|
222
|
-
input: DeleteConnectorCommandInput,
|
|
223
|
-
context: __SerdeContext
|
|
224
|
-
): Promise<__HttpRequest> => {
|
|
225
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
226
|
-
const headers: any = {};
|
|
227
|
-
let resolvedPath =
|
|
228
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/connectors/{connectorArn}";
|
|
229
|
-
if (input.connectorArn !== undefined) {
|
|
230
|
-
const labelValue: string = input.connectorArn;
|
|
231
|
-
if (labelValue.length <= 0) {
|
|
232
|
-
throw new Error("Empty value provided for input HTTP label: connectorArn.");
|
|
233
|
-
}
|
|
234
|
-
resolvedPath = resolvedPath.replace("{connectorArn}", __extendedEncodeURIComponent(labelValue));
|
|
235
|
-
} else {
|
|
236
|
-
throw new Error("No value provided for input HTTP label: connectorArn.");
|
|
237
|
-
}
|
|
238
|
-
const query: any = {
|
|
239
|
-
...(input.currentVersion !== undefined && { currentVersion: input.currentVersion }),
|
|
240
|
-
};
|
|
241
|
-
let body: any;
|
|
242
|
-
return new __HttpRequest({
|
|
243
|
-
protocol,
|
|
244
|
-
hostname,
|
|
245
|
-
port,
|
|
246
|
-
method: "DELETE",
|
|
247
|
-
headers,
|
|
248
|
-
path: resolvedPath,
|
|
249
|
-
query,
|
|
250
|
-
body,
|
|
251
|
-
});
|
|
252
|
-
};
|
|
253
|
-
|
|
254
|
-
export const serializeAws_restJson1DescribeConnectorCommand = async (
|
|
255
|
-
input: DescribeConnectorCommandInput,
|
|
256
|
-
context: __SerdeContext
|
|
257
|
-
): Promise<__HttpRequest> => {
|
|
258
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
259
|
-
const headers: any = {};
|
|
260
|
-
let resolvedPath =
|
|
261
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/connectors/{connectorArn}";
|
|
262
|
-
if (input.connectorArn !== undefined) {
|
|
263
|
-
const labelValue: string = input.connectorArn;
|
|
264
|
-
if (labelValue.length <= 0) {
|
|
265
|
-
throw new Error("Empty value provided for input HTTP label: connectorArn.");
|
|
266
|
-
}
|
|
267
|
-
resolvedPath = resolvedPath.replace("{connectorArn}", __extendedEncodeURIComponent(labelValue));
|
|
268
|
-
} else {
|
|
269
|
-
throw new Error("No value provided for input HTTP label: connectorArn.");
|
|
270
|
-
}
|
|
271
|
-
let body: any;
|
|
272
|
-
return new __HttpRequest({
|
|
273
|
-
protocol,
|
|
274
|
-
hostname,
|
|
275
|
-
port,
|
|
276
|
-
method: "GET",
|
|
277
|
-
headers,
|
|
278
|
-
path: resolvedPath,
|
|
279
|
-
body,
|
|
280
|
-
});
|
|
281
|
-
};
|
|
282
|
-
|
|
283
|
-
export const serializeAws_restJson1DescribeCustomPluginCommand = async (
|
|
284
|
-
input: DescribeCustomPluginCommandInput,
|
|
285
|
-
context: __SerdeContext
|
|
286
|
-
): Promise<__HttpRequest> => {
|
|
287
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
288
|
-
const headers: any = {};
|
|
289
|
-
let resolvedPath =
|
|
290
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/custom-plugins/{customPluginArn}";
|
|
291
|
-
if (input.customPluginArn !== undefined) {
|
|
292
|
-
const labelValue: string = input.customPluginArn;
|
|
293
|
-
if (labelValue.length <= 0) {
|
|
294
|
-
throw new Error("Empty value provided for input HTTP label: customPluginArn.");
|
|
295
|
-
}
|
|
296
|
-
resolvedPath = resolvedPath.replace("{customPluginArn}", __extendedEncodeURIComponent(labelValue));
|
|
297
|
-
} else {
|
|
298
|
-
throw new Error("No value provided for input HTTP label: customPluginArn.");
|
|
299
|
-
}
|
|
300
|
-
let body: any;
|
|
301
|
-
return new __HttpRequest({
|
|
302
|
-
protocol,
|
|
303
|
-
hostname,
|
|
304
|
-
port,
|
|
305
|
-
method: "GET",
|
|
306
|
-
headers,
|
|
307
|
-
path: resolvedPath,
|
|
308
|
-
body,
|
|
309
|
-
});
|
|
310
|
-
};
|
|
311
|
-
|
|
312
|
-
export const serializeAws_restJson1DescribeWorkerConfigurationCommand = async (
|
|
313
|
-
input: DescribeWorkerConfigurationCommandInput,
|
|
314
|
-
context: __SerdeContext
|
|
315
|
-
): Promise<__HttpRequest> => {
|
|
316
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
317
|
-
const headers: any = {};
|
|
318
|
-
let resolvedPath =
|
|
319
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
320
|
-
"/v1/worker-configurations/{workerConfigurationArn}";
|
|
321
|
-
if (input.workerConfigurationArn !== undefined) {
|
|
322
|
-
const labelValue: string = input.workerConfigurationArn;
|
|
323
|
-
if (labelValue.length <= 0) {
|
|
324
|
-
throw new Error("Empty value provided for input HTTP label: workerConfigurationArn.");
|
|
325
|
-
}
|
|
326
|
-
resolvedPath = resolvedPath.replace("{workerConfigurationArn}", __extendedEncodeURIComponent(labelValue));
|
|
327
|
-
} else {
|
|
328
|
-
throw new Error("No value provided for input HTTP label: workerConfigurationArn.");
|
|
329
|
-
}
|
|
330
|
-
let body: any;
|
|
331
|
-
return new __HttpRequest({
|
|
332
|
-
protocol,
|
|
333
|
-
hostname,
|
|
334
|
-
port,
|
|
335
|
-
method: "GET",
|
|
336
|
-
headers,
|
|
337
|
-
path: resolvedPath,
|
|
338
|
-
body,
|
|
339
|
-
});
|
|
340
|
-
};
|
|
341
|
-
|
|
342
|
-
export const serializeAws_restJson1ListConnectorsCommand = async (
|
|
343
|
-
input: ListConnectorsCommandInput,
|
|
344
|
-
context: __SerdeContext
|
|
345
|
-
): Promise<__HttpRequest> => {
|
|
346
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
347
|
-
const headers: any = {};
|
|
348
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/connectors";
|
|
349
|
-
const query: any = {
|
|
350
|
-
...(input.connectorNamePrefix !== undefined && { connectorNamePrefix: input.connectorNamePrefix }),
|
|
351
|
-
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
|
|
352
|
-
...(input.nextToken !== undefined && { nextToken: input.nextToken }),
|
|
353
|
-
};
|
|
354
|
-
let body: any;
|
|
355
|
-
return new __HttpRequest({
|
|
356
|
-
protocol,
|
|
357
|
-
hostname,
|
|
358
|
-
port,
|
|
359
|
-
method: "GET",
|
|
360
|
-
headers,
|
|
361
|
-
path: resolvedPath,
|
|
362
|
-
query,
|
|
363
|
-
body,
|
|
364
|
-
});
|
|
365
|
-
};
|
|
366
|
-
|
|
367
|
-
export const serializeAws_restJson1ListCustomPluginsCommand = async (
|
|
368
|
-
input: ListCustomPluginsCommandInput,
|
|
369
|
-
context: __SerdeContext
|
|
370
|
-
): Promise<__HttpRequest> => {
|
|
371
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
372
|
-
const headers: any = {};
|
|
373
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/custom-plugins";
|
|
374
|
-
const query: any = {
|
|
375
|
-
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
|
|
376
|
-
...(input.nextToken !== undefined && { nextToken: input.nextToken }),
|
|
377
|
-
};
|
|
378
|
-
let body: any;
|
|
379
|
-
return new __HttpRequest({
|
|
380
|
-
protocol,
|
|
381
|
-
hostname,
|
|
382
|
-
port,
|
|
383
|
-
method: "GET",
|
|
384
|
-
headers,
|
|
385
|
-
path: resolvedPath,
|
|
386
|
-
query,
|
|
387
|
-
body,
|
|
388
|
-
});
|
|
389
|
-
};
|
|
390
|
-
|
|
391
|
-
export const serializeAws_restJson1ListWorkerConfigurationsCommand = async (
|
|
392
|
-
input: ListWorkerConfigurationsCommandInput,
|
|
393
|
-
context: __SerdeContext
|
|
394
|
-
): Promise<__HttpRequest> => {
|
|
395
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
396
|
-
const headers: any = {};
|
|
397
|
-
let resolvedPath =
|
|
398
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/worker-configurations";
|
|
399
|
-
const query: any = {
|
|
400
|
-
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
|
|
401
|
-
...(input.nextToken !== undefined && { nextToken: input.nextToken }),
|
|
402
|
-
};
|
|
403
|
-
let body: any;
|
|
404
|
-
return new __HttpRequest({
|
|
405
|
-
protocol,
|
|
406
|
-
hostname,
|
|
407
|
-
port,
|
|
408
|
-
method: "GET",
|
|
409
|
-
headers,
|
|
410
|
-
path: resolvedPath,
|
|
411
|
-
query,
|
|
412
|
-
body,
|
|
413
|
-
});
|
|
414
|
-
};
|
|
415
|
-
|
|
416
|
-
export const serializeAws_restJson1UpdateConnectorCommand = async (
|
|
417
|
-
input: UpdateConnectorCommandInput,
|
|
418
|
-
context: __SerdeContext
|
|
419
|
-
): Promise<__HttpRequest> => {
|
|
420
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
421
|
-
const headers: any = {
|
|
422
|
-
"content-type": "application/json",
|
|
423
|
-
};
|
|
424
|
-
let resolvedPath =
|
|
425
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/connectors/{connectorArn}";
|
|
426
|
-
if (input.connectorArn !== undefined) {
|
|
427
|
-
const labelValue: string = input.connectorArn;
|
|
428
|
-
if (labelValue.length <= 0) {
|
|
429
|
-
throw new Error("Empty value provided for input HTTP label: connectorArn.");
|
|
430
|
-
}
|
|
431
|
-
resolvedPath = resolvedPath.replace("{connectorArn}", __extendedEncodeURIComponent(labelValue));
|
|
432
|
-
} else {
|
|
433
|
-
throw new Error("No value provided for input HTTP label: connectorArn.");
|
|
434
|
-
}
|
|
435
|
-
const query: any = {
|
|
436
|
-
...(input.currentVersion !== undefined && { currentVersion: input.currentVersion }),
|
|
437
|
-
};
|
|
438
|
-
let body: any;
|
|
439
|
-
body = JSON.stringify({
|
|
440
|
-
...(input.capacity !== undefined &&
|
|
441
|
-
input.capacity !== null && { capacity: serializeAws_restJson1CapacityUpdate(input.capacity, context) }),
|
|
442
|
-
});
|
|
443
|
-
return new __HttpRequest({
|
|
444
|
-
protocol,
|
|
445
|
-
hostname,
|
|
446
|
-
port,
|
|
447
|
-
method: "PUT",
|
|
448
|
-
headers,
|
|
449
|
-
path: resolvedPath,
|
|
450
|
-
query,
|
|
451
|
-
body,
|
|
452
|
-
});
|
|
453
|
-
};
|
|
454
|
-
|
|
455
|
-
export const deserializeAws_restJson1CreateConnectorCommand = async (
|
|
456
|
-
output: __HttpResponse,
|
|
457
|
-
context: __SerdeContext
|
|
458
|
-
): Promise<CreateConnectorCommandOutput> => {
|
|
459
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
460
|
-
return deserializeAws_restJson1CreateConnectorCommandError(output, context);
|
|
461
|
-
}
|
|
462
|
-
const contents: CreateConnectorCommandOutput = {
|
|
463
|
-
$metadata: deserializeMetadata(output),
|
|
464
|
-
connectorArn: undefined,
|
|
465
|
-
connectorName: undefined,
|
|
466
|
-
connectorState: undefined,
|
|
467
|
-
};
|
|
468
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
469
|
-
if (data.connectorArn !== undefined && data.connectorArn !== null) {
|
|
470
|
-
contents.connectorArn = __expectString(data.connectorArn);
|
|
471
|
-
}
|
|
472
|
-
if (data.connectorName !== undefined && data.connectorName !== null) {
|
|
473
|
-
contents.connectorName = __expectString(data.connectorName);
|
|
474
|
-
}
|
|
475
|
-
if (data.connectorState !== undefined && data.connectorState !== null) {
|
|
476
|
-
contents.connectorState = __expectString(data.connectorState);
|
|
477
|
-
}
|
|
478
|
-
return Promise.resolve(contents);
|
|
479
|
-
};
|
|
480
|
-
|
|
481
|
-
const deserializeAws_restJson1CreateConnectorCommandError = async (
|
|
482
|
-
output: __HttpResponse,
|
|
483
|
-
context: __SerdeContext
|
|
484
|
-
): Promise<CreateConnectorCommandOutput> => {
|
|
485
|
-
const parsedOutput: any = {
|
|
486
|
-
...output,
|
|
487
|
-
body: await parseBody(output.body, context),
|
|
488
|
-
};
|
|
489
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
490
|
-
let errorCode: string = "UnknownError";
|
|
491
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
492
|
-
switch (errorCode) {
|
|
493
|
-
case "BadRequestException":
|
|
494
|
-
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
495
|
-
response = {
|
|
496
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
497
|
-
name: errorCode,
|
|
498
|
-
$metadata: deserializeMetadata(output),
|
|
499
|
-
};
|
|
500
|
-
break;
|
|
501
|
-
case "ConflictException":
|
|
502
|
-
case "com.amazonaws.kafkaconnect#ConflictException":
|
|
503
|
-
response = {
|
|
504
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
505
|
-
name: errorCode,
|
|
506
|
-
$metadata: deserializeMetadata(output),
|
|
507
|
-
};
|
|
508
|
-
break;
|
|
509
|
-
case "ForbiddenException":
|
|
510
|
-
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
511
|
-
response = {
|
|
512
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
513
|
-
name: errorCode,
|
|
514
|
-
$metadata: deserializeMetadata(output),
|
|
515
|
-
};
|
|
516
|
-
break;
|
|
517
|
-
case "InternalServerErrorException":
|
|
518
|
-
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
519
|
-
response = {
|
|
520
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
521
|
-
name: errorCode,
|
|
522
|
-
$metadata: deserializeMetadata(output),
|
|
523
|
-
};
|
|
524
|
-
break;
|
|
525
|
-
case "NotFoundException":
|
|
526
|
-
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
527
|
-
response = {
|
|
528
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
529
|
-
name: errorCode,
|
|
530
|
-
$metadata: deserializeMetadata(output),
|
|
531
|
-
};
|
|
532
|
-
break;
|
|
533
|
-
case "ServiceUnavailableException":
|
|
534
|
-
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
535
|
-
response = {
|
|
536
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
537
|
-
name: errorCode,
|
|
538
|
-
$metadata: deserializeMetadata(output),
|
|
539
|
-
};
|
|
540
|
-
break;
|
|
541
|
-
case "TooManyRequestsException":
|
|
542
|
-
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
543
|
-
response = {
|
|
544
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
545
|
-
name: errorCode,
|
|
546
|
-
$metadata: deserializeMetadata(output),
|
|
547
|
-
};
|
|
548
|
-
break;
|
|
549
|
-
case "UnauthorizedException":
|
|
550
|
-
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
551
|
-
response = {
|
|
552
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
553
|
-
name: errorCode,
|
|
554
|
-
$metadata: deserializeMetadata(output),
|
|
555
|
-
};
|
|
556
|
-
break;
|
|
557
|
-
default:
|
|
558
|
-
const parsedBody = parsedOutput.body;
|
|
559
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
560
|
-
response = {
|
|
561
|
-
...parsedBody,
|
|
562
|
-
name: `${errorCode}`,
|
|
563
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
564
|
-
$fault: "client",
|
|
565
|
-
$metadata: deserializeMetadata(output),
|
|
566
|
-
} as any;
|
|
567
|
-
}
|
|
568
|
-
const message = response.message || response.Message || errorCode;
|
|
569
|
-
response.message = message;
|
|
570
|
-
delete response.Message;
|
|
571
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
572
|
-
};
|
|
573
|
-
|
|
574
|
-
export const deserializeAws_restJson1CreateCustomPluginCommand = async (
|
|
575
|
-
output: __HttpResponse,
|
|
576
|
-
context: __SerdeContext
|
|
577
|
-
): Promise<CreateCustomPluginCommandOutput> => {
|
|
578
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
579
|
-
return deserializeAws_restJson1CreateCustomPluginCommandError(output, context);
|
|
580
|
-
}
|
|
581
|
-
const contents: CreateCustomPluginCommandOutput = {
|
|
582
|
-
$metadata: deserializeMetadata(output),
|
|
583
|
-
customPluginArn: undefined,
|
|
584
|
-
customPluginState: undefined,
|
|
585
|
-
name: undefined,
|
|
586
|
-
revision: undefined,
|
|
587
|
-
};
|
|
588
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
589
|
-
if (data.customPluginArn !== undefined && data.customPluginArn !== null) {
|
|
590
|
-
contents.customPluginArn = __expectString(data.customPluginArn);
|
|
591
|
-
}
|
|
592
|
-
if (data.customPluginState !== undefined && data.customPluginState !== null) {
|
|
593
|
-
contents.customPluginState = __expectString(data.customPluginState);
|
|
594
|
-
}
|
|
595
|
-
if (data.name !== undefined && data.name !== null) {
|
|
596
|
-
contents.name = __expectString(data.name);
|
|
597
|
-
}
|
|
598
|
-
if (data.revision !== undefined && data.revision !== null) {
|
|
599
|
-
contents.revision = __expectLong(data.revision);
|
|
600
|
-
}
|
|
601
|
-
return Promise.resolve(contents);
|
|
602
|
-
};
|
|
603
|
-
|
|
604
|
-
const deserializeAws_restJson1CreateCustomPluginCommandError = async (
|
|
605
|
-
output: __HttpResponse,
|
|
606
|
-
context: __SerdeContext
|
|
607
|
-
): Promise<CreateCustomPluginCommandOutput> => {
|
|
608
|
-
const parsedOutput: any = {
|
|
609
|
-
...output,
|
|
610
|
-
body: await parseBody(output.body, context),
|
|
611
|
-
};
|
|
612
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
613
|
-
let errorCode: string = "UnknownError";
|
|
614
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
615
|
-
switch (errorCode) {
|
|
616
|
-
case "BadRequestException":
|
|
617
|
-
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
618
|
-
response = {
|
|
619
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
620
|
-
name: errorCode,
|
|
621
|
-
$metadata: deserializeMetadata(output),
|
|
622
|
-
};
|
|
623
|
-
break;
|
|
624
|
-
case "ConflictException":
|
|
625
|
-
case "com.amazonaws.kafkaconnect#ConflictException":
|
|
626
|
-
response = {
|
|
627
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
628
|
-
name: errorCode,
|
|
629
|
-
$metadata: deserializeMetadata(output),
|
|
630
|
-
};
|
|
631
|
-
break;
|
|
632
|
-
case "ForbiddenException":
|
|
633
|
-
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
634
|
-
response = {
|
|
635
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
636
|
-
name: errorCode,
|
|
637
|
-
$metadata: deserializeMetadata(output),
|
|
638
|
-
};
|
|
639
|
-
break;
|
|
640
|
-
case "InternalServerErrorException":
|
|
641
|
-
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
642
|
-
response = {
|
|
643
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
644
|
-
name: errorCode,
|
|
645
|
-
$metadata: deserializeMetadata(output),
|
|
646
|
-
};
|
|
647
|
-
break;
|
|
648
|
-
case "NotFoundException":
|
|
649
|
-
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
650
|
-
response = {
|
|
651
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
652
|
-
name: errorCode,
|
|
653
|
-
$metadata: deserializeMetadata(output),
|
|
654
|
-
};
|
|
655
|
-
break;
|
|
656
|
-
case "ServiceUnavailableException":
|
|
657
|
-
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
658
|
-
response = {
|
|
659
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
660
|
-
name: errorCode,
|
|
661
|
-
$metadata: deserializeMetadata(output),
|
|
662
|
-
};
|
|
663
|
-
break;
|
|
664
|
-
case "TooManyRequestsException":
|
|
665
|
-
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
666
|
-
response = {
|
|
667
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
668
|
-
name: errorCode,
|
|
669
|
-
$metadata: deserializeMetadata(output),
|
|
670
|
-
};
|
|
671
|
-
break;
|
|
672
|
-
case "UnauthorizedException":
|
|
673
|
-
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
674
|
-
response = {
|
|
675
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
676
|
-
name: errorCode,
|
|
677
|
-
$metadata: deserializeMetadata(output),
|
|
678
|
-
};
|
|
679
|
-
break;
|
|
680
|
-
default:
|
|
681
|
-
const parsedBody = parsedOutput.body;
|
|
682
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
683
|
-
response = {
|
|
684
|
-
...parsedBody,
|
|
685
|
-
name: `${errorCode}`,
|
|
686
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
687
|
-
$fault: "client",
|
|
688
|
-
$metadata: deserializeMetadata(output),
|
|
689
|
-
} as any;
|
|
690
|
-
}
|
|
691
|
-
const message = response.message || response.Message || errorCode;
|
|
692
|
-
response.message = message;
|
|
693
|
-
delete response.Message;
|
|
694
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
695
|
-
};
|
|
696
|
-
|
|
697
|
-
export const deserializeAws_restJson1CreateWorkerConfigurationCommand = async (
|
|
698
|
-
output: __HttpResponse,
|
|
699
|
-
context: __SerdeContext
|
|
700
|
-
): Promise<CreateWorkerConfigurationCommandOutput> => {
|
|
701
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
702
|
-
return deserializeAws_restJson1CreateWorkerConfigurationCommandError(output, context);
|
|
703
|
-
}
|
|
704
|
-
const contents: CreateWorkerConfigurationCommandOutput = {
|
|
705
|
-
$metadata: deserializeMetadata(output),
|
|
706
|
-
creationTime: undefined,
|
|
707
|
-
latestRevision: undefined,
|
|
708
|
-
name: undefined,
|
|
709
|
-
workerConfigurationArn: undefined,
|
|
710
|
-
};
|
|
711
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
712
|
-
if (data.creationTime !== undefined && data.creationTime !== null) {
|
|
713
|
-
contents.creationTime = __expectNonNull(__parseRfc3339DateTime(data.creationTime));
|
|
714
|
-
}
|
|
715
|
-
if (data.latestRevision !== undefined && data.latestRevision !== null) {
|
|
716
|
-
contents.latestRevision = deserializeAws_restJson1WorkerConfigurationRevisionSummary(data.latestRevision, context);
|
|
717
|
-
}
|
|
718
|
-
if (data.name !== undefined && data.name !== null) {
|
|
719
|
-
contents.name = __expectString(data.name);
|
|
720
|
-
}
|
|
721
|
-
if (data.workerConfigurationArn !== undefined && data.workerConfigurationArn !== null) {
|
|
722
|
-
contents.workerConfigurationArn = __expectString(data.workerConfigurationArn);
|
|
723
|
-
}
|
|
724
|
-
return Promise.resolve(contents);
|
|
725
|
-
};
|
|
726
|
-
|
|
727
|
-
const deserializeAws_restJson1CreateWorkerConfigurationCommandError = async (
|
|
728
|
-
output: __HttpResponse,
|
|
729
|
-
context: __SerdeContext
|
|
730
|
-
): Promise<CreateWorkerConfigurationCommandOutput> => {
|
|
731
|
-
const parsedOutput: any = {
|
|
732
|
-
...output,
|
|
733
|
-
body: await parseBody(output.body, context),
|
|
734
|
-
};
|
|
735
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
736
|
-
let errorCode: string = "UnknownError";
|
|
737
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
738
|
-
switch (errorCode) {
|
|
739
|
-
case "BadRequestException":
|
|
740
|
-
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
741
|
-
response = {
|
|
742
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
743
|
-
name: errorCode,
|
|
744
|
-
$metadata: deserializeMetadata(output),
|
|
745
|
-
};
|
|
746
|
-
break;
|
|
747
|
-
case "ConflictException":
|
|
748
|
-
case "com.amazonaws.kafkaconnect#ConflictException":
|
|
749
|
-
response = {
|
|
750
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
751
|
-
name: errorCode,
|
|
752
|
-
$metadata: deserializeMetadata(output),
|
|
753
|
-
};
|
|
754
|
-
break;
|
|
755
|
-
case "ForbiddenException":
|
|
756
|
-
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
757
|
-
response = {
|
|
758
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
759
|
-
name: errorCode,
|
|
760
|
-
$metadata: deserializeMetadata(output),
|
|
761
|
-
};
|
|
762
|
-
break;
|
|
763
|
-
case "InternalServerErrorException":
|
|
764
|
-
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
765
|
-
response = {
|
|
766
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
767
|
-
name: errorCode,
|
|
768
|
-
$metadata: deserializeMetadata(output),
|
|
769
|
-
};
|
|
770
|
-
break;
|
|
771
|
-
case "NotFoundException":
|
|
772
|
-
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
773
|
-
response = {
|
|
774
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
775
|
-
name: errorCode,
|
|
776
|
-
$metadata: deserializeMetadata(output),
|
|
777
|
-
};
|
|
778
|
-
break;
|
|
779
|
-
case "ServiceUnavailableException":
|
|
780
|
-
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
781
|
-
response = {
|
|
782
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
783
|
-
name: errorCode,
|
|
784
|
-
$metadata: deserializeMetadata(output),
|
|
785
|
-
};
|
|
786
|
-
break;
|
|
787
|
-
case "TooManyRequestsException":
|
|
788
|
-
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
789
|
-
response = {
|
|
790
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
791
|
-
name: errorCode,
|
|
792
|
-
$metadata: deserializeMetadata(output),
|
|
793
|
-
};
|
|
794
|
-
break;
|
|
795
|
-
case "UnauthorizedException":
|
|
796
|
-
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
797
|
-
response = {
|
|
798
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
799
|
-
name: errorCode,
|
|
800
|
-
$metadata: deserializeMetadata(output),
|
|
801
|
-
};
|
|
802
|
-
break;
|
|
803
|
-
default:
|
|
804
|
-
const parsedBody = parsedOutput.body;
|
|
805
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
806
|
-
response = {
|
|
807
|
-
...parsedBody,
|
|
808
|
-
name: `${errorCode}`,
|
|
809
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
810
|
-
$fault: "client",
|
|
811
|
-
$metadata: deserializeMetadata(output),
|
|
812
|
-
} as any;
|
|
813
|
-
}
|
|
814
|
-
const message = response.message || response.Message || errorCode;
|
|
815
|
-
response.message = message;
|
|
816
|
-
delete response.Message;
|
|
817
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
818
|
-
};
|
|
819
|
-
|
|
820
|
-
export const deserializeAws_restJson1DeleteConnectorCommand = async (
|
|
821
|
-
output: __HttpResponse,
|
|
822
|
-
context: __SerdeContext
|
|
823
|
-
): Promise<DeleteConnectorCommandOutput> => {
|
|
824
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
825
|
-
return deserializeAws_restJson1DeleteConnectorCommandError(output, context);
|
|
826
|
-
}
|
|
827
|
-
const contents: DeleteConnectorCommandOutput = {
|
|
828
|
-
$metadata: deserializeMetadata(output),
|
|
829
|
-
connectorArn: undefined,
|
|
830
|
-
connectorState: undefined,
|
|
831
|
-
};
|
|
832
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
833
|
-
if (data.connectorArn !== undefined && data.connectorArn !== null) {
|
|
834
|
-
contents.connectorArn = __expectString(data.connectorArn);
|
|
835
|
-
}
|
|
836
|
-
if (data.connectorState !== undefined && data.connectorState !== null) {
|
|
837
|
-
contents.connectorState = __expectString(data.connectorState);
|
|
838
|
-
}
|
|
839
|
-
return Promise.resolve(contents);
|
|
840
|
-
};
|
|
841
|
-
|
|
842
|
-
const deserializeAws_restJson1DeleteConnectorCommandError = async (
|
|
843
|
-
output: __HttpResponse,
|
|
844
|
-
context: __SerdeContext
|
|
845
|
-
): Promise<DeleteConnectorCommandOutput> => {
|
|
846
|
-
const parsedOutput: any = {
|
|
847
|
-
...output,
|
|
848
|
-
body: await parseBody(output.body, context),
|
|
849
|
-
};
|
|
850
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
851
|
-
let errorCode: string = "UnknownError";
|
|
852
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
853
|
-
switch (errorCode) {
|
|
854
|
-
case "BadRequestException":
|
|
855
|
-
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
856
|
-
response = {
|
|
857
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
858
|
-
name: errorCode,
|
|
859
|
-
$metadata: deserializeMetadata(output),
|
|
860
|
-
};
|
|
861
|
-
break;
|
|
862
|
-
case "ForbiddenException":
|
|
863
|
-
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
864
|
-
response = {
|
|
865
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
866
|
-
name: errorCode,
|
|
867
|
-
$metadata: deserializeMetadata(output),
|
|
868
|
-
};
|
|
869
|
-
break;
|
|
870
|
-
case "InternalServerErrorException":
|
|
871
|
-
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
872
|
-
response = {
|
|
873
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
874
|
-
name: errorCode,
|
|
875
|
-
$metadata: deserializeMetadata(output),
|
|
876
|
-
};
|
|
877
|
-
break;
|
|
878
|
-
case "NotFoundException":
|
|
879
|
-
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
880
|
-
response = {
|
|
881
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
882
|
-
name: errorCode,
|
|
883
|
-
$metadata: deserializeMetadata(output),
|
|
884
|
-
};
|
|
885
|
-
break;
|
|
886
|
-
case "ServiceUnavailableException":
|
|
887
|
-
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
888
|
-
response = {
|
|
889
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
890
|
-
name: errorCode,
|
|
891
|
-
$metadata: deserializeMetadata(output),
|
|
892
|
-
};
|
|
893
|
-
break;
|
|
894
|
-
case "TooManyRequestsException":
|
|
895
|
-
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
896
|
-
response = {
|
|
897
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
898
|
-
name: errorCode,
|
|
899
|
-
$metadata: deserializeMetadata(output),
|
|
900
|
-
};
|
|
901
|
-
break;
|
|
902
|
-
case "UnauthorizedException":
|
|
903
|
-
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
904
|
-
response = {
|
|
905
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
906
|
-
name: errorCode,
|
|
907
|
-
$metadata: deserializeMetadata(output),
|
|
908
|
-
};
|
|
909
|
-
break;
|
|
910
|
-
default:
|
|
911
|
-
const parsedBody = parsedOutput.body;
|
|
912
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
913
|
-
response = {
|
|
914
|
-
...parsedBody,
|
|
915
|
-
name: `${errorCode}`,
|
|
916
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
917
|
-
$fault: "client",
|
|
918
|
-
$metadata: deserializeMetadata(output),
|
|
919
|
-
} as any;
|
|
920
|
-
}
|
|
921
|
-
const message = response.message || response.Message || errorCode;
|
|
922
|
-
response.message = message;
|
|
923
|
-
delete response.Message;
|
|
924
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
925
|
-
};
|
|
926
|
-
|
|
927
|
-
export const deserializeAws_restJson1DescribeConnectorCommand = async (
|
|
928
|
-
output: __HttpResponse,
|
|
929
|
-
context: __SerdeContext
|
|
930
|
-
): Promise<DescribeConnectorCommandOutput> => {
|
|
931
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
932
|
-
return deserializeAws_restJson1DescribeConnectorCommandError(output, context);
|
|
933
|
-
}
|
|
934
|
-
const contents: DescribeConnectorCommandOutput = {
|
|
935
|
-
$metadata: deserializeMetadata(output),
|
|
936
|
-
capacity: undefined,
|
|
937
|
-
connectorArn: undefined,
|
|
938
|
-
connectorConfiguration: undefined,
|
|
939
|
-
connectorDescription: undefined,
|
|
940
|
-
connectorName: undefined,
|
|
941
|
-
connectorState: undefined,
|
|
942
|
-
creationTime: undefined,
|
|
943
|
-
currentVersion: undefined,
|
|
944
|
-
kafkaCluster: undefined,
|
|
945
|
-
kafkaClusterClientAuthentication: undefined,
|
|
946
|
-
kafkaClusterEncryptionInTransit: undefined,
|
|
947
|
-
kafkaConnectVersion: undefined,
|
|
948
|
-
logDelivery: undefined,
|
|
949
|
-
plugins: undefined,
|
|
950
|
-
serviceExecutionRoleArn: undefined,
|
|
951
|
-
workerConfiguration: undefined,
|
|
952
|
-
};
|
|
953
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
954
|
-
if (data.capacity !== undefined && data.capacity !== null) {
|
|
955
|
-
contents.capacity = deserializeAws_restJson1CapacityDescription(data.capacity, context);
|
|
956
|
-
}
|
|
957
|
-
if (data.connectorArn !== undefined && data.connectorArn !== null) {
|
|
958
|
-
contents.connectorArn = __expectString(data.connectorArn);
|
|
959
|
-
}
|
|
960
|
-
if (data.connectorConfiguration !== undefined && data.connectorConfiguration !== null) {
|
|
961
|
-
contents.connectorConfiguration = deserializeAws_restJson1__mapOf__string(data.connectorConfiguration, context);
|
|
962
|
-
}
|
|
963
|
-
if (data.connectorDescription !== undefined && data.connectorDescription !== null) {
|
|
964
|
-
contents.connectorDescription = __expectString(data.connectorDescription);
|
|
965
|
-
}
|
|
966
|
-
if (data.connectorName !== undefined && data.connectorName !== null) {
|
|
967
|
-
contents.connectorName = __expectString(data.connectorName);
|
|
968
|
-
}
|
|
969
|
-
if (data.connectorState !== undefined && data.connectorState !== null) {
|
|
970
|
-
contents.connectorState = __expectString(data.connectorState);
|
|
971
|
-
}
|
|
972
|
-
if (data.creationTime !== undefined && data.creationTime !== null) {
|
|
973
|
-
contents.creationTime = __expectNonNull(__parseRfc3339DateTime(data.creationTime));
|
|
974
|
-
}
|
|
975
|
-
if (data.currentVersion !== undefined && data.currentVersion !== null) {
|
|
976
|
-
contents.currentVersion = __expectString(data.currentVersion);
|
|
977
|
-
}
|
|
978
|
-
if (data.kafkaCluster !== undefined && data.kafkaCluster !== null) {
|
|
979
|
-
contents.kafkaCluster = deserializeAws_restJson1KafkaClusterDescription(data.kafkaCluster, context);
|
|
980
|
-
}
|
|
981
|
-
if (data.kafkaClusterClientAuthentication !== undefined && data.kafkaClusterClientAuthentication !== null) {
|
|
982
|
-
contents.kafkaClusterClientAuthentication = deserializeAws_restJson1KafkaClusterClientAuthenticationDescription(
|
|
983
|
-
data.kafkaClusterClientAuthentication,
|
|
984
|
-
context
|
|
985
|
-
);
|
|
986
|
-
}
|
|
987
|
-
if (data.kafkaClusterEncryptionInTransit !== undefined && data.kafkaClusterEncryptionInTransit !== null) {
|
|
988
|
-
contents.kafkaClusterEncryptionInTransit = deserializeAws_restJson1KafkaClusterEncryptionInTransitDescription(
|
|
989
|
-
data.kafkaClusterEncryptionInTransit,
|
|
990
|
-
context
|
|
991
|
-
);
|
|
992
|
-
}
|
|
993
|
-
if (data.kafkaConnectVersion !== undefined && data.kafkaConnectVersion !== null) {
|
|
994
|
-
contents.kafkaConnectVersion = __expectString(data.kafkaConnectVersion);
|
|
995
|
-
}
|
|
996
|
-
if (data.logDelivery !== undefined && data.logDelivery !== null) {
|
|
997
|
-
contents.logDelivery = deserializeAws_restJson1LogDeliveryDescription(data.logDelivery, context);
|
|
998
|
-
}
|
|
999
|
-
if (data.plugins !== undefined && data.plugins !== null) {
|
|
1000
|
-
contents.plugins = deserializeAws_restJson1__listOfPluginDescription(data.plugins, context);
|
|
1001
|
-
}
|
|
1002
|
-
if (data.serviceExecutionRoleArn !== undefined && data.serviceExecutionRoleArn !== null) {
|
|
1003
|
-
contents.serviceExecutionRoleArn = __expectString(data.serviceExecutionRoleArn);
|
|
1004
|
-
}
|
|
1005
|
-
if (data.workerConfiguration !== undefined && data.workerConfiguration !== null) {
|
|
1006
|
-
contents.workerConfiguration = deserializeAws_restJson1WorkerConfigurationDescription(
|
|
1007
|
-
data.workerConfiguration,
|
|
1008
|
-
context
|
|
1009
|
-
);
|
|
1010
|
-
}
|
|
1011
|
-
return Promise.resolve(contents);
|
|
1012
|
-
};
|
|
1013
|
-
|
|
1014
|
-
const deserializeAws_restJson1DescribeConnectorCommandError = async (
|
|
1015
|
-
output: __HttpResponse,
|
|
1016
|
-
context: __SerdeContext
|
|
1017
|
-
): Promise<DescribeConnectorCommandOutput> => {
|
|
1018
|
-
const parsedOutput: any = {
|
|
1019
|
-
...output,
|
|
1020
|
-
body: await parseBody(output.body, context),
|
|
1021
|
-
};
|
|
1022
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1023
|
-
let errorCode: string = "UnknownError";
|
|
1024
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1025
|
-
switch (errorCode) {
|
|
1026
|
-
case "BadRequestException":
|
|
1027
|
-
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
1028
|
-
response = {
|
|
1029
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1030
|
-
name: errorCode,
|
|
1031
|
-
$metadata: deserializeMetadata(output),
|
|
1032
|
-
};
|
|
1033
|
-
break;
|
|
1034
|
-
case "ForbiddenException":
|
|
1035
|
-
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
1036
|
-
response = {
|
|
1037
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1038
|
-
name: errorCode,
|
|
1039
|
-
$metadata: deserializeMetadata(output),
|
|
1040
|
-
};
|
|
1041
|
-
break;
|
|
1042
|
-
case "InternalServerErrorException":
|
|
1043
|
-
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
1044
|
-
response = {
|
|
1045
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1046
|
-
name: errorCode,
|
|
1047
|
-
$metadata: deserializeMetadata(output),
|
|
1048
|
-
};
|
|
1049
|
-
break;
|
|
1050
|
-
case "NotFoundException":
|
|
1051
|
-
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
1052
|
-
response = {
|
|
1053
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1054
|
-
name: errorCode,
|
|
1055
|
-
$metadata: deserializeMetadata(output),
|
|
1056
|
-
};
|
|
1057
|
-
break;
|
|
1058
|
-
case "ServiceUnavailableException":
|
|
1059
|
-
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
1060
|
-
response = {
|
|
1061
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1062
|
-
name: errorCode,
|
|
1063
|
-
$metadata: deserializeMetadata(output),
|
|
1064
|
-
};
|
|
1065
|
-
break;
|
|
1066
|
-
case "TooManyRequestsException":
|
|
1067
|
-
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
1068
|
-
response = {
|
|
1069
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1070
|
-
name: errorCode,
|
|
1071
|
-
$metadata: deserializeMetadata(output),
|
|
1072
|
-
};
|
|
1073
|
-
break;
|
|
1074
|
-
case "UnauthorizedException":
|
|
1075
|
-
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
1076
|
-
response = {
|
|
1077
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1078
|
-
name: errorCode,
|
|
1079
|
-
$metadata: deserializeMetadata(output),
|
|
1080
|
-
};
|
|
1081
|
-
break;
|
|
1082
|
-
default:
|
|
1083
|
-
const parsedBody = parsedOutput.body;
|
|
1084
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1085
|
-
response = {
|
|
1086
|
-
...parsedBody,
|
|
1087
|
-
name: `${errorCode}`,
|
|
1088
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1089
|
-
$fault: "client",
|
|
1090
|
-
$metadata: deserializeMetadata(output),
|
|
1091
|
-
} as any;
|
|
1092
|
-
}
|
|
1093
|
-
const message = response.message || response.Message || errorCode;
|
|
1094
|
-
response.message = message;
|
|
1095
|
-
delete response.Message;
|
|
1096
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1097
|
-
};
|
|
1098
|
-
|
|
1099
|
-
export const deserializeAws_restJson1DescribeCustomPluginCommand = async (
|
|
1100
|
-
output: __HttpResponse,
|
|
1101
|
-
context: __SerdeContext
|
|
1102
|
-
): Promise<DescribeCustomPluginCommandOutput> => {
|
|
1103
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1104
|
-
return deserializeAws_restJson1DescribeCustomPluginCommandError(output, context);
|
|
1105
|
-
}
|
|
1106
|
-
const contents: DescribeCustomPluginCommandOutput = {
|
|
1107
|
-
$metadata: deserializeMetadata(output),
|
|
1108
|
-
creationTime: undefined,
|
|
1109
|
-
customPluginArn: undefined,
|
|
1110
|
-
customPluginState: undefined,
|
|
1111
|
-
description: undefined,
|
|
1112
|
-
latestRevision: undefined,
|
|
1113
|
-
name: undefined,
|
|
1114
|
-
};
|
|
1115
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1116
|
-
if (data.creationTime !== undefined && data.creationTime !== null) {
|
|
1117
|
-
contents.creationTime = __expectNonNull(__parseRfc3339DateTime(data.creationTime));
|
|
1118
|
-
}
|
|
1119
|
-
if (data.customPluginArn !== undefined && data.customPluginArn !== null) {
|
|
1120
|
-
contents.customPluginArn = __expectString(data.customPluginArn);
|
|
1121
|
-
}
|
|
1122
|
-
if (data.customPluginState !== undefined && data.customPluginState !== null) {
|
|
1123
|
-
contents.customPluginState = __expectString(data.customPluginState);
|
|
1124
|
-
}
|
|
1125
|
-
if (data.description !== undefined && data.description !== null) {
|
|
1126
|
-
contents.description = __expectString(data.description);
|
|
1127
|
-
}
|
|
1128
|
-
if (data.latestRevision !== undefined && data.latestRevision !== null) {
|
|
1129
|
-
contents.latestRevision = deserializeAws_restJson1CustomPluginRevisionSummary(data.latestRevision, context);
|
|
1130
|
-
}
|
|
1131
|
-
if (data.name !== undefined && data.name !== null) {
|
|
1132
|
-
contents.name = __expectString(data.name);
|
|
1133
|
-
}
|
|
1134
|
-
return Promise.resolve(contents);
|
|
1135
|
-
};
|
|
1136
|
-
|
|
1137
|
-
const deserializeAws_restJson1DescribeCustomPluginCommandError = async (
|
|
1138
|
-
output: __HttpResponse,
|
|
1139
|
-
context: __SerdeContext
|
|
1140
|
-
): Promise<DescribeCustomPluginCommandOutput> => {
|
|
1141
|
-
const parsedOutput: any = {
|
|
1142
|
-
...output,
|
|
1143
|
-
body: await parseBody(output.body, context),
|
|
1144
|
-
};
|
|
1145
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1146
|
-
let errorCode: string = "UnknownError";
|
|
1147
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1148
|
-
switch (errorCode) {
|
|
1149
|
-
case "BadRequestException":
|
|
1150
|
-
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
1151
|
-
response = {
|
|
1152
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1153
|
-
name: errorCode,
|
|
1154
|
-
$metadata: deserializeMetadata(output),
|
|
1155
|
-
};
|
|
1156
|
-
break;
|
|
1157
|
-
case "ForbiddenException":
|
|
1158
|
-
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
1159
|
-
response = {
|
|
1160
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1161
|
-
name: errorCode,
|
|
1162
|
-
$metadata: deserializeMetadata(output),
|
|
1163
|
-
};
|
|
1164
|
-
break;
|
|
1165
|
-
case "InternalServerErrorException":
|
|
1166
|
-
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
1167
|
-
response = {
|
|
1168
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1169
|
-
name: errorCode,
|
|
1170
|
-
$metadata: deserializeMetadata(output),
|
|
1171
|
-
};
|
|
1172
|
-
break;
|
|
1173
|
-
case "NotFoundException":
|
|
1174
|
-
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
1175
|
-
response = {
|
|
1176
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1177
|
-
name: errorCode,
|
|
1178
|
-
$metadata: deserializeMetadata(output),
|
|
1179
|
-
};
|
|
1180
|
-
break;
|
|
1181
|
-
case "ServiceUnavailableException":
|
|
1182
|
-
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
1183
|
-
response = {
|
|
1184
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1185
|
-
name: errorCode,
|
|
1186
|
-
$metadata: deserializeMetadata(output),
|
|
1187
|
-
};
|
|
1188
|
-
break;
|
|
1189
|
-
case "TooManyRequestsException":
|
|
1190
|
-
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
1191
|
-
response = {
|
|
1192
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1193
|
-
name: errorCode,
|
|
1194
|
-
$metadata: deserializeMetadata(output),
|
|
1195
|
-
};
|
|
1196
|
-
break;
|
|
1197
|
-
case "UnauthorizedException":
|
|
1198
|
-
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
1199
|
-
response = {
|
|
1200
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1201
|
-
name: errorCode,
|
|
1202
|
-
$metadata: deserializeMetadata(output),
|
|
1203
|
-
};
|
|
1204
|
-
break;
|
|
1205
|
-
default:
|
|
1206
|
-
const parsedBody = parsedOutput.body;
|
|
1207
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1208
|
-
response = {
|
|
1209
|
-
...parsedBody,
|
|
1210
|
-
name: `${errorCode}`,
|
|
1211
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1212
|
-
$fault: "client",
|
|
1213
|
-
$metadata: deserializeMetadata(output),
|
|
1214
|
-
} as any;
|
|
1215
|
-
}
|
|
1216
|
-
const message = response.message || response.Message || errorCode;
|
|
1217
|
-
response.message = message;
|
|
1218
|
-
delete response.Message;
|
|
1219
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1220
|
-
};
|
|
1221
|
-
|
|
1222
|
-
export const deserializeAws_restJson1DescribeWorkerConfigurationCommand = async (
|
|
1223
|
-
output: __HttpResponse,
|
|
1224
|
-
context: __SerdeContext
|
|
1225
|
-
): Promise<DescribeWorkerConfigurationCommandOutput> => {
|
|
1226
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1227
|
-
return deserializeAws_restJson1DescribeWorkerConfigurationCommandError(output, context);
|
|
1228
|
-
}
|
|
1229
|
-
const contents: DescribeWorkerConfigurationCommandOutput = {
|
|
1230
|
-
$metadata: deserializeMetadata(output),
|
|
1231
|
-
creationTime: undefined,
|
|
1232
|
-
description: undefined,
|
|
1233
|
-
latestRevision: undefined,
|
|
1234
|
-
name: undefined,
|
|
1235
|
-
workerConfigurationArn: undefined,
|
|
1236
|
-
};
|
|
1237
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1238
|
-
if (data.creationTime !== undefined && data.creationTime !== null) {
|
|
1239
|
-
contents.creationTime = __expectNonNull(__parseRfc3339DateTime(data.creationTime));
|
|
1240
|
-
}
|
|
1241
|
-
if (data.description !== undefined && data.description !== null) {
|
|
1242
|
-
contents.description = __expectString(data.description);
|
|
1243
|
-
}
|
|
1244
|
-
if (data.latestRevision !== undefined && data.latestRevision !== null) {
|
|
1245
|
-
contents.latestRevision = deserializeAws_restJson1WorkerConfigurationRevisionDescription(
|
|
1246
|
-
data.latestRevision,
|
|
1247
|
-
context
|
|
1248
|
-
);
|
|
1249
|
-
}
|
|
1250
|
-
if (data.name !== undefined && data.name !== null) {
|
|
1251
|
-
contents.name = __expectString(data.name);
|
|
1252
|
-
}
|
|
1253
|
-
if (data.workerConfigurationArn !== undefined && data.workerConfigurationArn !== null) {
|
|
1254
|
-
contents.workerConfigurationArn = __expectString(data.workerConfigurationArn);
|
|
1255
|
-
}
|
|
1256
|
-
return Promise.resolve(contents);
|
|
1257
|
-
};
|
|
1258
|
-
|
|
1259
|
-
const deserializeAws_restJson1DescribeWorkerConfigurationCommandError = async (
|
|
1260
|
-
output: __HttpResponse,
|
|
1261
|
-
context: __SerdeContext
|
|
1262
|
-
): Promise<DescribeWorkerConfigurationCommandOutput> => {
|
|
1263
|
-
const parsedOutput: any = {
|
|
1264
|
-
...output,
|
|
1265
|
-
body: await parseBody(output.body, context),
|
|
1266
|
-
};
|
|
1267
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1268
|
-
let errorCode: string = "UnknownError";
|
|
1269
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1270
|
-
switch (errorCode) {
|
|
1271
|
-
case "BadRequestException":
|
|
1272
|
-
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
1273
|
-
response = {
|
|
1274
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1275
|
-
name: errorCode,
|
|
1276
|
-
$metadata: deserializeMetadata(output),
|
|
1277
|
-
};
|
|
1278
|
-
break;
|
|
1279
|
-
case "ForbiddenException":
|
|
1280
|
-
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
1281
|
-
response = {
|
|
1282
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1283
|
-
name: errorCode,
|
|
1284
|
-
$metadata: deserializeMetadata(output),
|
|
1285
|
-
};
|
|
1286
|
-
break;
|
|
1287
|
-
case "InternalServerErrorException":
|
|
1288
|
-
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
1289
|
-
response = {
|
|
1290
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1291
|
-
name: errorCode,
|
|
1292
|
-
$metadata: deserializeMetadata(output),
|
|
1293
|
-
};
|
|
1294
|
-
break;
|
|
1295
|
-
case "NotFoundException":
|
|
1296
|
-
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
1297
|
-
response = {
|
|
1298
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1299
|
-
name: errorCode,
|
|
1300
|
-
$metadata: deserializeMetadata(output),
|
|
1301
|
-
};
|
|
1302
|
-
break;
|
|
1303
|
-
case "ServiceUnavailableException":
|
|
1304
|
-
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
1305
|
-
response = {
|
|
1306
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1307
|
-
name: errorCode,
|
|
1308
|
-
$metadata: deserializeMetadata(output),
|
|
1309
|
-
};
|
|
1310
|
-
break;
|
|
1311
|
-
case "TooManyRequestsException":
|
|
1312
|
-
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
1313
|
-
response = {
|
|
1314
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1315
|
-
name: errorCode,
|
|
1316
|
-
$metadata: deserializeMetadata(output),
|
|
1317
|
-
};
|
|
1318
|
-
break;
|
|
1319
|
-
case "UnauthorizedException":
|
|
1320
|
-
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
1321
|
-
response = {
|
|
1322
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1323
|
-
name: errorCode,
|
|
1324
|
-
$metadata: deserializeMetadata(output),
|
|
1325
|
-
};
|
|
1326
|
-
break;
|
|
1327
|
-
default:
|
|
1328
|
-
const parsedBody = parsedOutput.body;
|
|
1329
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1330
|
-
response = {
|
|
1331
|
-
...parsedBody,
|
|
1332
|
-
name: `${errorCode}`,
|
|
1333
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1334
|
-
$fault: "client",
|
|
1335
|
-
$metadata: deserializeMetadata(output),
|
|
1336
|
-
} as any;
|
|
1337
|
-
}
|
|
1338
|
-
const message = response.message || response.Message || errorCode;
|
|
1339
|
-
response.message = message;
|
|
1340
|
-
delete response.Message;
|
|
1341
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1342
|
-
};
|
|
1343
|
-
|
|
1344
|
-
export const deserializeAws_restJson1ListConnectorsCommand = async (
|
|
1345
|
-
output: __HttpResponse,
|
|
1346
|
-
context: __SerdeContext
|
|
1347
|
-
): Promise<ListConnectorsCommandOutput> => {
|
|
1348
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1349
|
-
return deserializeAws_restJson1ListConnectorsCommandError(output, context);
|
|
1350
|
-
}
|
|
1351
|
-
const contents: ListConnectorsCommandOutput = {
|
|
1352
|
-
$metadata: deserializeMetadata(output),
|
|
1353
|
-
connectors: undefined,
|
|
1354
|
-
nextToken: undefined,
|
|
1355
|
-
};
|
|
1356
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1357
|
-
if (data.connectors !== undefined && data.connectors !== null) {
|
|
1358
|
-
contents.connectors = deserializeAws_restJson1__listOfConnectorSummary(data.connectors, context);
|
|
1359
|
-
}
|
|
1360
|
-
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
1361
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
1362
|
-
}
|
|
1363
|
-
return Promise.resolve(contents);
|
|
1364
|
-
};
|
|
1365
|
-
|
|
1366
|
-
const deserializeAws_restJson1ListConnectorsCommandError = async (
|
|
1367
|
-
output: __HttpResponse,
|
|
1368
|
-
context: __SerdeContext
|
|
1369
|
-
): Promise<ListConnectorsCommandOutput> => {
|
|
1370
|
-
const parsedOutput: any = {
|
|
1371
|
-
...output,
|
|
1372
|
-
body: await parseBody(output.body, context),
|
|
1373
|
-
};
|
|
1374
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1375
|
-
let errorCode: string = "UnknownError";
|
|
1376
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1377
|
-
switch (errorCode) {
|
|
1378
|
-
case "BadRequestException":
|
|
1379
|
-
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
1380
|
-
response = {
|
|
1381
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1382
|
-
name: errorCode,
|
|
1383
|
-
$metadata: deserializeMetadata(output),
|
|
1384
|
-
};
|
|
1385
|
-
break;
|
|
1386
|
-
case "ForbiddenException":
|
|
1387
|
-
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
1388
|
-
response = {
|
|
1389
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1390
|
-
name: errorCode,
|
|
1391
|
-
$metadata: deserializeMetadata(output),
|
|
1392
|
-
};
|
|
1393
|
-
break;
|
|
1394
|
-
case "InternalServerErrorException":
|
|
1395
|
-
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
1396
|
-
response = {
|
|
1397
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1398
|
-
name: errorCode,
|
|
1399
|
-
$metadata: deserializeMetadata(output),
|
|
1400
|
-
};
|
|
1401
|
-
break;
|
|
1402
|
-
case "NotFoundException":
|
|
1403
|
-
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
1404
|
-
response = {
|
|
1405
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1406
|
-
name: errorCode,
|
|
1407
|
-
$metadata: deserializeMetadata(output),
|
|
1408
|
-
};
|
|
1409
|
-
break;
|
|
1410
|
-
case "ServiceUnavailableException":
|
|
1411
|
-
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
1412
|
-
response = {
|
|
1413
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1414
|
-
name: errorCode,
|
|
1415
|
-
$metadata: deserializeMetadata(output),
|
|
1416
|
-
};
|
|
1417
|
-
break;
|
|
1418
|
-
case "TooManyRequestsException":
|
|
1419
|
-
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
1420
|
-
response = {
|
|
1421
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1422
|
-
name: errorCode,
|
|
1423
|
-
$metadata: deserializeMetadata(output),
|
|
1424
|
-
};
|
|
1425
|
-
break;
|
|
1426
|
-
case "UnauthorizedException":
|
|
1427
|
-
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
1428
|
-
response = {
|
|
1429
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1430
|
-
name: errorCode,
|
|
1431
|
-
$metadata: deserializeMetadata(output),
|
|
1432
|
-
};
|
|
1433
|
-
break;
|
|
1434
|
-
default:
|
|
1435
|
-
const parsedBody = parsedOutput.body;
|
|
1436
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1437
|
-
response = {
|
|
1438
|
-
...parsedBody,
|
|
1439
|
-
name: `${errorCode}`,
|
|
1440
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1441
|
-
$fault: "client",
|
|
1442
|
-
$metadata: deserializeMetadata(output),
|
|
1443
|
-
} as any;
|
|
1444
|
-
}
|
|
1445
|
-
const message = response.message || response.Message || errorCode;
|
|
1446
|
-
response.message = message;
|
|
1447
|
-
delete response.Message;
|
|
1448
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1449
|
-
};
|
|
1450
|
-
|
|
1451
|
-
export const deserializeAws_restJson1ListCustomPluginsCommand = async (
|
|
1452
|
-
output: __HttpResponse,
|
|
1453
|
-
context: __SerdeContext
|
|
1454
|
-
): Promise<ListCustomPluginsCommandOutput> => {
|
|
1455
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1456
|
-
return deserializeAws_restJson1ListCustomPluginsCommandError(output, context);
|
|
1457
|
-
}
|
|
1458
|
-
const contents: ListCustomPluginsCommandOutput = {
|
|
1459
|
-
$metadata: deserializeMetadata(output),
|
|
1460
|
-
customPlugins: undefined,
|
|
1461
|
-
nextToken: undefined,
|
|
1462
|
-
};
|
|
1463
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1464
|
-
if (data.customPlugins !== undefined && data.customPlugins !== null) {
|
|
1465
|
-
contents.customPlugins = deserializeAws_restJson1__listOfCustomPluginSummary(data.customPlugins, context);
|
|
1466
|
-
}
|
|
1467
|
-
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
1468
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
1469
|
-
}
|
|
1470
|
-
return Promise.resolve(contents);
|
|
1471
|
-
};
|
|
1472
|
-
|
|
1473
|
-
const deserializeAws_restJson1ListCustomPluginsCommandError = async (
|
|
1474
|
-
output: __HttpResponse,
|
|
1475
|
-
context: __SerdeContext
|
|
1476
|
-
): Promise<ListCustomPluginsCommandOutput> => {
|
|
1477
|
-
const parsedOutput: any = {
|
|
1478
|
-
...output,
|
|
1479
|
-
body: await parseBody(output.body, context),
|
|
1480
|
-
};
|
|
1481
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1482
|
-
let errorCode: string = "UnknownError";
|
|
1483
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1484
|
-
switch (errorCode) {
|
|
1485
|
-
case "BadRequestException":
|
|
1486
|
-
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
1487
|
-
response = {
|
|
1488
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1489
|
-
name: errorCode,
|
|
1490
|
-
$metadata: deserializeMetadata(output),
|
|
1491
|
-
};
|
|
1492
|
-
break;
|
|
1493
|
-
case "ForbiddenException":
|
|
1494
|
-
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
1495
|
-
response = {
|
|
1496
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1497
|
-
name: errorCode,
|
|
1498
|
-
$metadata: deserializeMetadata(output),
|
|
1499
|
-
};
|
|
1500
|
-
break;
|
|
1501
|
-
case "InternalServerErrorException":
|
|
1502
|
-
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
1503
|
-
response = {
|
|
1504
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1505
|
-
name: errorCode,
|
|
1506
|
-
$metadata: deserializeMetadata(output),
|
|
1507
|
-
};
|
|
1508
|
-
break;
|
|
1509
|
-
case "NotFoundException":
|
|
1510
|
-
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
1511
|
-
response = {
|
|
1512
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1513
|
-
name: errorCode,
|
|
1514
|
-
$metadata: deserializeMetadata(output),
|
|
1515
|
-
};
|
|
1516
|
-
break;
|
|
1517
|
-
case "ServiceUnavailableException":
|
|
1518
|
-
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
1519
|
-
response = {
|
|
1520
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1521
|
-
name: errorCode,
|
|
1522
|
-
$metadata: deserializeMetadata(output),
|
|
1523
|
-
};
|
|
1524
|
-
break;
|
|
1525
|
-
case "TooManyRequestsException":
|
|
1526
|
-
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
1527
|
-
response = {
|
|
1528
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1529
|
-
name: errorCode,
|
|
1530
|
-
$metadata: deserializeMetadata(output),
|
|
1531
|
-
};
|
|
1532
|
-
break;
|
|
1533
|
-
case "UnauthorizedException":
|
|
1534
|
-
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
1535
|
-
response = {
|
|
1536
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1537
|
-
name: errorCode,
|
|
1538
|
-
$metadata: deserializeMetadata(output),
|
|
1539
|
-
};
|
|
1540
|
-
break;
|
|
1541
|
-
default:
|
|
1542
|
-
const parsedBody = parsedOutput.body;
|
|
1543
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1544
|
-
response = {
|
|
1545
|
-
...parsedBody,
|
|
1546
|
-
name: `${errorCode}`,
|
|
1547
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1548
|
-
$fault: "client",
|
|
1549
|
-
$metadata: deserializeMetadata(output),
|
|
1550
|
-
} as any;
|
|
1551
|
-
}
|
|
1552
|
-
const message = response.message || response.Message || errorCode;
|
|
1553
|
-
response.message = message;
|
|
1554
|
-
delete response.Message;
|
|
1555
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1556
|
-
};
|
|
1557
|
-
|
|
1558
|
-
export const deserializeAws_restJson1ListWorkerConfigurationsCommand = async (
|
|
1559
|
-
output: __HttpResponse,
|
|
1560
|
-
context: __SerdeContext
|
|
1561
|
-
): Promise<ListWorkerConfigurationsCommandOutput> => {
|
|
1562
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1563
|
-
return deserializeAws_restJson1ListWorkerConfigurationsCommandError(output, context);
|
|
1564
|
-
}
|
|
1565
|
-
const contents: ListWorkerConfigurationsCommandOutput = {
|
|
1566
|
-
$metadata: deserializeMetadata(output),
|
|
1567
|
-
nextToken: undefined,
|
|
1568
|
-
workerConfigurations: undefined,
|
|
1569
|
-
};
|
|
1570
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1571
|
-
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
1572
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
1573
|
-
}
|
|
1574
|
-
if (data.workerConfigurations !== undefined && data.workerConfigurations !== null) {
|
|
1575
|
-
contents.workerConfigurations = deserializeAws_restJson1__listOfWorkerConfigurationSummary(
|
|
1576
|
-
data.workerConfigurations,
|
|
1577
|
-
context
|
|
1578
|
-
);
|
|
1579
|
-
}
|
|
1580
|
-
return Promise.resolve(contents);
|
|
1581
|
-
};
|
|
1582
|
-
|
|
1583
|
-
const deserializeAws_restJson1ListWorkerConfigurationsCommandError = async (
|
|
1584
|
-
output: __HttpResponse,
|
|
1585
|
-
context: __SerdeContext
|
|
1586
|
-
): Promise<ListWorkerConfigurationsCommandOutput> => {
|
|
1587
|
-
const parsedOutput: any = {
|
|
1588
|
-
...output,
|
|
1589
|
-
body: await parseBody(output.body, context),
|
|
1590
|
-
};
|
|
1591
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1592
|
-
let errorCode: string = "UnknownError";
|
|
1593
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1594
|
-
switch (errorCode) {
|
|
1595
|
-
case "BadRequestException":
|
|
1596
|
-
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
1597
|
-
response = {
|
|
1598
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1599
|
-
name: errorCode,
|
|
1600
|
-
$metadata: deserializeMetadata(output),
|
|
1601
|
-
};
|
|
1602
|
-
break;
|
|
1603
|
-
case "ForbiddenException":
|
|
1604
|
-
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
1605
|
-
response = {
|
|
1606
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1607
|
-
name: errorCode,
|
|
1608
|
-
$metadata: deserializeMetadata(output),
|
|
1609
|
-
};
|
|
1610
|
-
break;
|
|
1611
|
-
case "InternalServerErrorException":
|
|
1612
|
-
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
1613
|
-
response = {
|
|
1614
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1615
|
-
name: errorCode,
|
|
1616
|
-
$metadata: deserializeMetadata(output),
|
|
1617
|
-
};
|
|
1618
|
-
break;
|
|
1619
|
-
case "NotFoundException":
|
|
1620
|
-
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
1621
|
-
response = {
|
|
1622
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1623
|
-
name: errorCode,
|
|
1624
|
-
$metadata: deserializeMetadata(output),
|
|
1625
|
-
};
|
|
1626
|
-
break;
|
|
1627
|
-
case "ServiceUnavailableException":
|
|
1628
|
-
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
1629
|
-
response = {
|
|
1630
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1631
|
-
name: errorCode,
|
|
1632
|
-
$metadata: deserializeMetadata(output),
|
|
1633
|
-
};
|
|
1634
|
-
break;
|
|
1635
|
-
case "TooManyRequestsException":
|
|
1636
|
-
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
1637
|
-
response = {
|
|
1638
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1639
|
-
name: errorCode,
|
|
1640
|
-
$metadata: deserializeMetadata(output),
|
|
1641
|
-
};
|
|
1642
|
-
break;
|
|
1643
|
-
case "UnauthorizedException":
|
|
1644
|
-
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
1645
|
-
response = {
|
|
1646
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1647
|
-
name: errorCode,
|
|
1648
|
-
$metadata: deserializeMetadata(output),
|
|
1649
|
-
};
|
|
1650
|
-
break;
|
|
1651
|
-
default:
|
|
1652
|
-
const parsedBody = parsedOutput.body;
|
|
1653
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1654
|
-
response = {
|
|
1655
|
-
...parsedBody,
|
|
1656
|
-
name: `${errorCode}`,
|
|
1657
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1658
|
-
$fault: "client",
|
|
1659
|
-
$metadata: deserializeMetadata(output),
|
|
1660
|
-
} as any;
|
|
1661
|
-
}
|
|
1662
|
-
const message = response.message || response.Message || errorCode;
|
|
1663
|
-
response.message = message;
|
|
1664
|
-
delete response.Message;
|
|
1665
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1666
|
-
};
|
|
1667
|
-
|
|
1668
|
-
export const deserializeAws_restJson1UpdateConnectorCommand = async (
|
|
1669
|
-
output: __HttpResponse,
|
|
1670
|
-
context: __SerdeContext
|
|
1671
|
-
): Promise<UpdateConnectorCommandOutput> => {
|
|
1672
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1673
|
-
return deserializeAws_restJson1UpdateConnectorCommandError(output, context);
|
|
1674
|
-
}
|
|
1675
|
-
const contents: UpdateConnectorCommandOutput = {
|
|
1676
|
-
$metadata: deserializeMetadata(output),
|
|
1677
|
-
connectorArn: undefined,
|
|
1678
|
-
connectorState: undefined,
|
|
1679
|
-
};
|
|
1680
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1681
|
-
if (data.connectorArn !== undefined && data.connectorArn !== null) {
|
|
1682
|
-
contents.connectorArn = __expectString(data.connectorArn);
|
|
1683
|
-
}
|
|
1684
|
-
if (data.connectorState !== undefined && data.connectorState !== null) {
|
|
1685
|
-
contents.connectorState = __expectString(data.connectorState);
|
|
1686
|
-
}
|
|
1687
|
-
return Promise.resolve(contents);
|
|
1688
|
-
};
|
|
1689
|
-
|
|
1690
|
-
const deserializeAws_restJson1UpdateConnectorCommandError = async (
|
|
1691
|
-
output: __HttpResponse,
|
|
1692
|
-
context: __SerdeContext
|
|
1693
|
-
): Promise<UpdateConnectorCommandOutput> => {
|
|
1694
|
-
const parsedOutput: any = {
|
|
1695
|
-
...output,
|
|
1696
|
-
body: await parseBody(output.body, context),
|
|
1697
|
-
};
|
|
1698
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1699
|
-
let errorCode: string = "UnknownError";
|
|
1700
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1701
|
-
switch (errorCode) {
|
|
1702
|
-
case "BadRequestException":
|
|
1703
|
-
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
1704
|
-
response = {
|
|
1705
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1706
|
-
name: errorCode,
|
|
1707
|
-
$metadata: deserializeMetadata(output),
|
|
1708
|
-
};
|
|
1709
|
-
break;
|
|
1710
|
-
case "ForbiddenException":
|
|
1711
|
-
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
1712
|
-
response = {
|
|
1713
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1714
|
-
name: errorCode,
|
|
1715
|
-
$metadata: deserializeMetadata(output),
|
|
1716
|
-
};
|
|
1717
|
-
break;
|
|
1718
|
-
case "InternalServerErrorException":
|
|
1719
|
-
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
1720
|
-
response = {
|
|
1721
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1722
|
-
name: errorCode,
|
|
1723
|
-
$metadata: deserializeMetadata(output),
|
|
1724
|
-
};
|
|
1725
|
-
break;
|
|
1726
|
-
case "NotFoundException":
|
|
1727
|
-
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
1728
|
-
response = {
|
|
1729
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1730
|
-
name: errorCode,
|
|
1731
|
-
$metadata: deserializeMetadata(output),
|
|
1732
|
-
};
|
|
1733
|
-
break;
|
|
1734
|
-
case "ServiceUnavailableException":
|
|
1735
|
-
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
1736
|
-
response = {
|
|
1737
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1738
|
-
name: errorCode,
|
|
1739
|
-
$metadata: deserializeMetadata(output),
|
|
1740
|
-
};
|
|
1741
|
-
break;
|
|
1742
|
-
case "TooManyRequestsException":
|
|
1743
|
-
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
1744
|
-
response = {
|
|
1745
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1746
|
-
name: errorCode,
|
|
1747
|
-
$metadata: deserializeMetadata(output),
|
|
1748
|
-
};
|
|
1749
|
-
break;
|
|
1750
|
-
case "UnauthorizedException":
|
|
1751
|
-
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
1752
|
-
response = {
|
|
1753
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
1754
|
-
name: errorCode,
|
|
1755
|
-
$metadata: deserializeMetadata(output),
|
|
1756
|
-
};
|
|
1757
|
-
break;
|
|
1758
|
-
default:
|
|
1759
|
-
const parsedBody = parsedOutput.body;
|
|
1760
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1761
|
-
response = {
|
|
1762
|
-
...parsedBody,
|
|
1763
|
-
name: `${errorCode}`,
|
|
1764
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1765
|
-
$fault: "client",
|
|
1766
|
-
$metadata: deserializeMetadata(output),
|
|
1767
|
-
} as any;
|
|
1768
|
-
}
|
|
1769
|
-
const message = response.message || response.Message || errorCode;
|
|
1770
|
-
response.message = message;
|
|
1771
|
-
delete response.Message;
|
|
1772
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1773
|
-
};
|
|
1774
|
-
|
|
1775
|
-
const deserializeAws_restJson1BadRequestExceptionResponse = async (
|
|
1776
|
-
parsedOutput: any,
|
|
1777
|
-
context: __SerdeContext
|
|
1778
|
-
): Promise<BadRequestException> => {
|
|
1779
|
-
const contents: BadRequestException = {
|
|
1780
|
-
name: "BadRequestException",
|
|
1781
|
-
$fault: "client",
|
|
1782
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1783
|
-
message: undefined,
|
|
1784
|
-
};
|
|
1785
|
-
const data: any = parsedOutput.body;
|
|
1786
|
-
if (data.message !== undefined && data.message !== null) {
|
|
1787
|
-
contents.message = __expectString(data.message);
|
|
1788
|
-
}
|
|
1789
|
-
return contents;
|
|
1790
|
-
};
|
|
1791
|
-
|
|
1792
|
-
const deserializeAws_restJson1ConflictExceptionResponse = async (
|
|
1793
|
-
parsedOutput: any,
|
|
1794
|
-
context: __SerdeContext
|
|
1795
|
-
): Promise<ConflictException> => {
|
|
1796
|
-
const contents: ConflictException = {
|
|
1797
|
-
name: "ConflictException",
|
|
1798
|
-
$fault: "client",
|
|
1799
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1800
|
-
message: undefined,
|
|
1801
|
-
};
|
|
1802
|
-
const data: any = parsedOutput.body;
|
|
1803
|
-
if (data.message !== undefined && data.message !== null) {
|
|
1804
|
-
contents.message = __expectString(data.message);
|
|
1805
|
-
}
|
|
1806
|
-
return contents;
|
|
1807
|
-
};
|
|
1808
|
-
|
|
1809
|
-
const deserializeAws_restJson1ForbiddenExceptionResponse = async (
|
|
1810
|
-
parsedOutput: any,
|
|
1811
|
-
context: __SerdeContext
|
|
1812
|
-
): Promise<ForbiddenException> => {
|
|
1813
|
-
const contents: ForbiddenException = {
|
|
1814
|
-
name: "ForbiddenException",
|
|
1815
|
-
$fault: "client",
|
|
1816
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1817
|
-
message: undefined,
|
|
1818
|
-
};
|
|
1819
|
-
const data: any = parsedOutput.body;
|
|
1820
|
-
if (data.message !== undefined && data.message !== null) {
|
|
1821
|
-
contents.message = __expectString(data.message);
|
|
1822
|
-
}
|
|
1823
|
-
return contents;
|
|
1824
|
-
};
|
|
1825
|
-
|
|
1826
|
-
const deserializeAws_restJson1InternalServerErrorExceptionResponse = async (
|
|
1827
|
-
parsedOutput: any,
|
|
1828
|
-
context: __SerdeContext
|
|
1829
|
-
): Promise<InternalServerErrorException> => {
|
|
1830
|
-
const contents: InternalServerErrorException = {
|
|
1831
|
-
name: "InternalServerErrorException",
|
|
1832
|
-
$fault: "server",
|
|
1833
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1834
|
-
message: undefined,
|
|
1835
|
-
};
|
|
1836
|
-
const data: any = parsedOutput.body;
|
|
1837
|
-
if (data.message !== undefined && data.message !== null) {
|
|
1838
|
-
contents.message = __expectString(data.message);
|
|
1839
|
-
}
|
|
1840
|
-
return contents;
|
|
1841
|
-
};
|
|
1842
|
-
|
|
1843
|
-
const deserializeAws_restJson1NotFoundExceptionResponse = async (
|
|
1844
|
-
parsedOutput: any,
|
|
1845
|
-
context: __SerdeContext
|
|
1846
|
-
): Promise<NotFoundException> => {
|
|
1847
|
-
const contents: NotFoundException = {
|
|
1848
|
-
name: "NotFoundException",
|
|
1849
|
-
$fault: "client",
|
|
1850
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1851
|
-
message: undefined,
|
|
1852
|
-
};
|
|
1853
|
-
const data: any = parsedOutput.body;
|
|
1854
|
-
if (data.message !== undefined && data.message !== null) {
|
|
1855
|
-
contents.message = __expectString(data.message);
|
|
1856
|
-
}
|
|
1857
|
-
return contents;
|
|
1858
|
-
};
|
|
1859
|
-
|
|
1860
|
-
const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (
|
|
1861
|
-
parsedOutput: any,
|
|
1862
|
-
context: __SerdeContext
|
|
1863
|
-
): Promise<ServiceUnavailableException> => {
|
|
1864
|
-
const contents: ServiceUnavailableException = {
|
|
1865
|
-
name: "ServiceUnavailableException",
|
|
1866
|
-
$fault: "server",
|
|
1867
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1868
|
-
message: undefined,
|
|
1869
|
-
};
|
|
1870
|
-
const data: any = parsedOutput.body;
|
|
1871
|
-
if (data.message !== undefined && data.message !== null) {
|
|
1872
|
-
contents.message = __expectString(data.message);
|
|
1873
|
-
}
|
|
1874
|
-
return contents;
|
|
1875
|
-
};
|
|
1876
|
-
|
|
1877
|
-
const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (
|
|
1878
|
-
parsedOutput: any,
|
|
1879
|
-
context: __SerdeContext
|
|
1880
|
-
): Promise<TooManyRequestsException> => {
|
|
1881
|
-
const contents: TooManyRequestsException = {
|
|
1882
|
-
name: "TooManyRequestsException",
|
|
1883
|
-
$fault: "client",
|
|
1884
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1885
|
-
message: undefined,
|
|
1886
|
-
};
|
|
1887
|
-
const data: any = parsedOutput.body;
|
|
1888
|
-
if (data.message !== undefined && data.message !== null) {
|
|
1889
|
-
contents.message = __expectString(data.message);
|
|
1890
|
-
}
|
|
1891
|
-
return contents;
|
|
1892
|
-
};
|
|
1893
|
-
|
|
1894
|
-
const deserializeAws_restJson1UnauthorizedExceptionResponse = async (
|
|
1895
|
-
parsedOutput: any,
|
|
1896
|
-
context: __SerdeContext
|
|
1897
|
-
): Promise<UnauthorizedException> => {
|
|
1898
|
-
const contents: UnauthorizedException = {
|
|
1899
|
-
name: "UnauthorizedException",
|
|
1900
|
-
$fault: "client",
|
|
1901
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1902
|
-
message: undefined,
|
|
1903
|
-
};
|
|
1904
|
-
const data: any = parsedOutput.body;
|
|
1905
|
-
if (data.message !== undefined && data.message !== null) {
|
|
1906
|
-
contents.message = __expectString(data.message);
|
|
1907
|
-
}
|
|
1908
|
-
return contents;
|
|
1909
|
-
};
|
|
1910
|
-
|
|
1911
|
-
const serializeAws_restJson1__listOf__string = (input: string[], context: __SerdeContext): any => {
|
|
1912
|
-
return input
|
|
1913
|
-
.filter((e: any) => e != null)
|
|
1914
|
-
.map((entry) => {
|
|
1915
|
-
if (entry === null) {
|
|
1916
|
-
return null as any;
|
|
1917
|
-
}
|
|
1918
|
-
return entry;
|
|
1919
|
-
});
|
|
1920
|
-
};
|
|
1921
|
-
|
|
1922
|
-
const serializeAws_restJson1__listOfPlugin = (input: Plugin[], context: __SerdeContext): any => {
|
|
1923
|
-
return input
|
|
1924
|
-
.filter((e: any) => e != null)
|
|
1925
|
-
.map((entry) => {
|
|
1926
|
-
if (entry === null) {
|
|
1927
|
-
return null as any;
|
|
1928
|
-
}
|
|
1929
|
-
return serializeAws_restJson1Plugin(entry, context);
|
|
1930
|
-
});
|
|
1931
|
-
};
|
|
1932
|
-
|
|
1933
|
-
const serializeAws_restJson1__mapOf__string = (input: { [key: string]: string }, context: __SerdeContext): any => {
|
|
1934
|
-
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
|
|
1935
|
-
if (value === null) {
|
|
1936
|
-
return acc;
|
|
1937
|
-
}
|
|
1938
|
-
return {
|
|
1939
|
-
...acc,
|
|
1940
|
-
[key]: value,
|
|
1941
|
-
};
|
|
1942
|
-
}, {});
|
|
1943
|
-
};
|
|
1944
|
-
|
|
1945
|
-
const serializeAws_restJson1ApacheKafkaCluster = (input: ApacheKafkaCluster, context: __SerdeContext): any => {
|
|
1946
|
-
return {
|
|
1947
|
-
...(input.bootstrapServers !== undefined &&
|
|
1948
|
-
input.bootstrapServers !== null && { bootstrapServers: input.bootstrapServers }),
|
|
1949
|
-
...(input.vpc !== undefined && input.vpc !== null && { vpc: serializeAws_restJson1Vpc(input.vpc, context) }),
|
|
1950
|
-
};
|
|
1951
|
-
};
|
|
1952
|
-
|
|
1953
|
-
const serializeAws_restJson1AutoScaling = (input: AutoScaling, context: __SerdeContext): any => {
|
|
1954
|
-
return {
|
|
1955
|
-
...(input.maxWorkerCount !== undefined &&
|
|
1956
|
-
input.maxWorkerCount !== null && { maxWorkerCount: input.maxWorkerCount }),
|
|
1957
|
-
...(input.mcuCount !== undefined && input.mcuCount !== null && { mcuCount: input.mcuCount }),
|
|
1958
|
-
...(input.minWorkerCount !== undefined &&
|
|
1959
|
-
input.minWorkerCount !== null && { minWorkerCount: input.minWorkerCount }),
|
|
1960
|
-
...(input.scaleInPolicy !== undefined &&
|
|
1961
|
-
input.scaleInPolicy !== null && {
|
|
1962
|
-
scaleInPolicy: serializeAws_restJson1ScaleInPolicy(input.scaleInPolicy, context),
|
|
1963
|
-
}),
|
|
1964
|
-
...(input.scaleOutPolicy !== undefined &&
|
|
1965
|
-
input.scaleOutPolicy !== null && {
|
|
1966
|
-
scaleOutPolicy: serializeAws_restJson1ScaleOutPolicy(input.scaleOutPolicy, context),
|
|
1967
|
-
}),
|
|
1968
|
-
};
|
|
1969
|
-
};
|
|
1970
|
-
|
|
1971
|
-
const serializeAws_restJson1AutoScalingUpdate = (input: AutoScalingUpdate, context: __SerdeContext): any => {
|
|
1972
|
-
return {
|
|
1973
|
-
...(input.maxWorkerCount !== undefined &&
|
|
1974
|
-
input.maxWorkerCount !== null && { maxWorkerCount: input.maxWorkerCount }),
|
|
1975
|
-
...(input.mcuCount !== undefined && input.mcuCount !== null && { mcuCount: input.mcuCount }),
|
|
1976
|
-
...(input.minWorkerCount !== undefined &&
|
|
1977
|
-
input.minWorkerCount !== null && { minWorkerCount: input.minWorkerCount }),
|
|
1978
|
-
...(input.scaleInPolicy !== undefined &&
|
|
1979
|
-
input.scaleInPolicy !== null && {
|
|
1980
|
-
scaleInPolicy: serializeAws_restJson1ScaleInPolicyUpdate(input.scaleInPolicy, context),
|
|
1981
|
-
}),
|
|
1982
|
-
...(input.scaleOutPolicy !== undefined &&
|
|
1983
|
-
input.scaleOutPolicy !== null && {
|
|
1984
|
-
scaleOutPolicy: serializeAws_restJson1ScaleOutPolicyUpdate(input.scaleOutPolicy, context),
|
|
1985
|
-
}),
|
|
1986
|
-
};
|
|
1987
|
-
};
|
|
1988
|
-
|
|
1989
|
-
const serializeAws_restJson1Capacity = (input: Capacity, context: __SerdeContext): any => {
|
|
1990
|
-
return {
|
|
1991
|
-
...(input.autoScaling !== undefined &&
|
|
1992
|
-
input.autoScaling !== null && { autoScaling: serializeAws_restJson1AutoScaling(input.autoScaling, context) }),
|
|
1993
|
-
...(input.provisionedCapacity !== undefined &&
|
|
1994
|
-
input.provisionedCapacity !== null && {
|
|
1995
|
-
provisionedCapacity: serializeAws_restJson1ProvisionedCapacity(input.provisionedCapacity, context),
|
|
1996
|
-
}),
|
|
1997
|
-
};
|
|
1998
|
-
};
|
|
1999
|
-
|
|
2000
|
-
const serializeAws_restJson1CapacityUpdate = (input: CapacityUpdate, context: __SerdeContext): any => {
|
|
2001
|
-
return {
|
|
2002
|
-
...(input.autoScaling !== undefined &&
|
|
2003
|
-
input.autoScaling !== null && {
|
|
2004
|
-
autoScaling: serializeAws_restJson1AutoScalingUpdate(input.autoScaling, context),
|
|
2005
|
-
}),
|
|
2006
|
-
...(input.provisionedCapacity !== undefined &&
|
|
2007
|
-
input.provisionedCapacity !== null && {
|
|
2008
|
-
provisionedCapacity: serializeAws_restJson1ProvisionedCapacityUpdate(input.provisionedCapacity, context),
|
|
2009
|
-
}),
|
|
2010
|
-
};
|
|
2011
|
-
};
|
|
2012
|
-
|
|
2013
|
-
const serializeAws_restJson1CloudWatchLogsLogDelivery = (
|
|
2014
|
-
input: CloudWatchLogsLogDelivery,
|
|
2015
|
-
context: __SerdeContext
|
|
2016
|
-
): any => {
|
|
2017
|
-
return {
|
|
2018
|
-
...(input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled }),
|
|
2019
|
-
...(input.logGroup !== undefined && input.logGroup !== null && { logGroup: input.logGroup }),
|
|
2020
|
-
};
|
|
2021
|
-
};
|
|
2022
|
-
|
|
2023
|
-
const serializeAws_restJson1CustomPlugin = (input: CustomPlugin, context: __SerdeContext): any => {
|
|
2024
|
-
return {
|
|
2025
|
-
...(input.customPluginArn !== undefined &&
|
|
2026
|
-
input.customPluginArn !== null && { customPluginArn: input.customPluginArn }),
|
|
2027
|
-
...(input.revision !== undefined && input.revision !== null && { revision: input.revision }),
|
|
2028
|
-
};
|
|
2029
|
-
};
|
|
2030
|
-
|
|
2031
|
-
const serializeAws_restJson1CustomPluginLocation = (input: CustomPluginLocation, context: __SerdeContext): any => {
|
|
2032
|
-
return {
|
|
2033
|
-
...(input.s3Location !== undefined &&
|
|
2034
|
-
input.s3Location !== null && { s3Location: serializeAws_restJson1S3Location(input.s3Location, context) }),
|
|
2035
|
-
};
|
|
2036
|
-
};
|
|
2037
|
-
|
|
2038
|
-
const serializeAws_restJson1FirehoseLogDelivery = (input: FirehoseLogDelivery, context: __SerdeContext): any => {
|
|
2039
|
-
return {
|
|
2040
|
-
...(input.deliveryStream !== undefined &&
|
|
2041
|
-
input.deliveryStream !== null && { deliveryStream: input.deliveryStream }),
|
|
2042
|
-
...(input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled }),
|
|
2043
|
-
};
|
|
2044
|
-
};
|
|
2045
|
-
|
|
2046
|
-
const serializeAws_restJson1KafkaCluster = (input: KafkaCluster, context: __SerdeContext): any => {
|
|
2047
|
-
return {
|
|
2048
|
-
...(input.apacheKafkaCluster !== undefined &&
|
|
2049
|
-
input.apacheKafkaCluster !== null && {
|
|
2050
|
-
apacheKafkaCluster: serializeAws_restJson1ApacheKafkaCluster(input.apacheKafkaCluster, context),
|
|
2051
|
-
}),
|
|
2052
|
-
};
|
|
2053
|
-
};
|
|
2054
|
-
|
|
2055
|
-
const serializeAws_restJson1KafkaClusterClientAuthentication = (
|
|
2056
|
-
input: KafkaClusterClientAuthentication,
|
|
2057
|
-
context: __SerdeContext
|
|
2058
|
-
): any => {
|
|
2059
|
-
return {
|
|
2060
|
-
...(input.authenticationType !== undefined &&
|
|
2061
|
-
input.authenticationType !== null && { authenticationType: input.authenticationType }),
|
|
2062
|
-
};
|
|
2063
|
-
};
|
|
2064
|
-
|
|
2065
|
-
const serializeAws_restJson1KafkaClusterEncryptionInTransit = (
|
|
2066
|
-
input: KafkaClusterEncryptionInTransit,
|
|
2067
|
-
context: __SerdeContext
|
|
2068
|
-
): any => {
|
|
2069
|
-
return {
|
|
2070
|
-
...(input.encryptionType !== undefined &&
|
|
2071
|
-
input.encryptionType !== null && { encryptionType: input.encryptionType }),
|
|
2072
|
-
};
|
|
2073
|
-
};
|
|
2074
|
-
|
|
2075
|
-
const serializeAws_restJson1LogDelivery = (input: LogDelivery, context: __SerdeContext): any => {
|
|
2076
|
-
return {
|
|
2077
|
-
...(input.workerLogDelivery !== undefined &&
|
|
2078
|
-
input.workerLogDelivery !== null && {
|
|
2079
|
-
workerLogDelivery: serializeAws_restJson1WorkerLogDelivery(input.workerLogDelivery, context),
|
|
2080
|
-
}),
|
|
2081
|
-
};
|
|
2082
|
-
};
|
|
2083
|
-
|
|
2084
|
-
const serializeAws_restJson1Plugin = (input: Plugin, context: __SerdeContext): any => {
|
|
2085
|
-
return {
|
|
2086
|
-
...(input.customPlugin !== undefined &&
|
|
2087
|
-
input.customPlugin !== null && { customPlugin: serializeAws_restJson1CustomPlugin(input.customPlugin, context) }),
|
|
2088
|
-
};
|
|
2089
|
-
};
|
|
2090
|
-
|
|
2091
|
-
const serializeAws_restJson1ProvisionedCapacity = (input: ProvisionedCapacity, context: __SerdeContext): any => {
|
|
2092
|
-
return {
|
|
2093
|
-
...(input.mcuCount !== undefined && input.mcuCount !== null && { mcuCount: input.mcuCount }),
|
|
2094
|
-
...(input.workerCount !== undefined && input.workerCount !== null && { workerCount: input.workerCount }),
|
|
2095
|
-
};
|
|
2096
|
-
};
|
|
2097
|
-
|
|
2098
|
-
const serializeAws_restJson1ProvisionedCapacityUpdate = (
|
|
2099
|
-
input: ProvisionedCapacityUpdate,
|
|
2100
|
-
context: __SerdeContext
|
|
2101
|
-
): any => {
|
|
2102
|
-
return {
|
|
2103
|
-
...(input.mcuCount !== undefined && input.mcuCount !== null && { mcuCount: input.mcuCount }),
|
|
2104
|
-
...(input.workerCount !== undefined && input.workerCount !== null && { workerCount: input.workerCount }),
|
|
2105
|
-
};
|
|
2106
|
-
};
|
|
2107
|
-
|
|
2108
|
-
const serializeAws_restJson1S3Location = (input: S3Location, context: __SerdeContext): any => {
|
|
2109
|
-
return {
|
|
2110
|
-
...(input.bucketArn !== undefined && input.bucketArn !== null && { bucketArn: input.bucketArn }),
|
|
2111
|
-
...(input.fileKey !== undefined && input.fileKey !== null && { fileKey: input.fileKey }),
|
|
2112
|
-
...(input.objectVersion !== undefined && input.objectVersion !== null && { objectVersion: input.objectVersion }),
|
|
2113
|
-
};
|
|
2114
|
-
};
|
|
2115
|
-
|
|
2116
|
-
const serializeAws_restJson1S3LogDelivery = (input: S3LogDelivery, context: __SerdeContext): any => {
|
|
2117
|
-
return {
|
|
2118
|
-
...(input.bucket !== undefined && input.bucket !== null && { bucket: input.bucket }),
|
|
2119
|
-
...(input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled }),
|
|
2120
|
-
...(input.prefix !== undefined && input.prefix !== null && { prefix: input.prefix }),
|
|
2121
|
-
};
|
|
2122
|
-
};
|
|
2123
|
-
|
|
2124
|
-
const serializeAws_restJson1ScaleInPolicy = (input: ScaleInPolicy, context: __SerdeContext): any => {
|
|
2125
|
-
return {
|
|
2126
|
-
...(input.cpuUtilizationPercentage !== undefined &&
|
|
2127
|
-
input.cpuUtilizationPercentage !== null && { cpuUtilizationPercentage: input.cpuUtilizationPercentage }),
|
|
2128
|
-
};
|
|
2129
|
-
};
|
|
2130
|
-
|
|
2131
|
-
const serializeAws_restJson1ScaleInPolicyUpdate = (input: ScaleInPolicyUpdate, context: __SerdeContext): any => {
|
|
2132
|
-
return {
|
|
2133
|
-
...(input.cpuUtilizationPercentage !== undefined &&
|
|
2134
|
-
input.cpuUtilizationPercentage !== null && { cpuUtilizationPercentage: input.cpuUtilizationPercentage }),
|
|
2135
|
-
};
|
|
2136
|
-
};
|
|
2137
|
-
|
|
2138
|
-
const serializeAws_restJson1ScaleOutPolicy = (input: ScaleOutPolicy, context: __SerdeContext): any => {
|
|
2139
|
-
return {
|
|
2140
|
-
...(input.cpuUtilizationPercentage !== undefined &&
|
|
2141
|
-
input.cpuUtilizationPercentage !== null && { cpuUtilizationPercentage: input.cpuUtilizationPercentage }),
|
|
2142
|
-
};
|
|
2143
|
-
};
|
|
2144
|
-
|
|
2145
|
-
const serializeAws_restJson1ScaleOutPolicyUpdate = (input: ScaleOutPolicyUpdate, context: __SerdeContext): any => {
|
|
2146
|
-
return {
|
|
2147
|
-
...(input.cpuUtilizationPercentage !== undefined &&
|
|
2148
|
-
input.cpuUtilizationPercentage !== null && { cpuUtilizationPercentage: input.cpuUtilizationPercentage }),
|
|
2149
|
-
};
|
|
2150
|
-
};
|
|
2151
|
-
|
|
2152
|
-
const serializeAws_restJson1Vpc = (input: Vpc, context: __SerdeContext): any => {
|
|
2153
|
-
return {
|
|
2154
|
-
...(input.securityGroups !== undefined &&
|
|
2155
|
-
input.securityGroups !== null && {
|
|
2156
|
-
securityGroups: serializeAws_restJson1__listOf__string(input.securityGroups, context),
|
|
2157
|
-
}),
|
|
2158
|
-
...(input.subnets !== undefined &&
|
|
2159
|
-
input.subnets !== null && { subnets: serializeAws_restJson1__listOf__string(input.subnets, context) }),
|
|
2160
|
-
};
|
|
2161
|
-
};
|
|
2162
|
-
|
|
2163
|
-
const serializeAws_restJson1WorkerConfiguration = (input: WorkerConfiguration, context: __SerdeContext): any => {
|
|
2164
|
-
return {
|
|
2165
|
-
...(input.revision !== undefined && input.revision !== null && { revision: input.revision }),
|
|
2166
|
-
...(input.workerConfigurationArn !== undefined &&
|
|
2167
|
-
input.workerConfigurationArn !== null && { workerConfigurationArn: input.workerConfigurationArn }),
|
|
2168
|
-
};
|
|
2169
|
-
};
|
|
2170
|
-
|
|
2171
|
-
const serializeAws_restJson1WorkerLogDelivery = (input: WorkerLogDelivery, context: __SerdeContext): any => {
|
|
2172
|
-
return {
|
|
2173
|
-
...(input.cloudWatchLogs !== undefined &&
|
|
2174
|
-
input.cloudWatchLogs !== null && {
|
|
2175
|
-
cloudWatchLogs: serializeAws_restJson1CloudWatchLogsLogDelivery(input.cloudWatchLogs, context),
|
|
2176
|
-
}),
|
|
2177
|
-
...(input.firehose !== undefined &&
|
|
2178
|
-
input.firehose !== null && { firehose: serializeAws_restJson1FirehoseLogDelivery(input.firehose, context) }),
|
|
2179
|
-
...(input.s3 !== undefined && input.s3 !== null && { s3: serializeAws_restJson1S3LogDelivery(input.s3, context) }),
|
|
2180
|
-
};
|
|
2181
|
-
};
|
|
2182
|
-
|
|
2183
|
-
const deserializeAws_restJson1__listOf__string = (output: any, context: __SerdeContext): string[] => {
|
|
2184
|
-
return (output || [])
|
|
2185
|
-
.filter((e: any) => e != null)
|
|
2186
|
-
.map((entry: any) => {
|
|
2187
|
-
if (entry === null) {
|
|
2188
|
-
return null as any;
|
|
2189
|
-
}
|
|
2190
|
-
return __expectString(entry) as any;
|
|
2191
|
-
});
|
|
2192
|
-
};
|
|
2193
|
-
|
|
2194
|
-
const deserializeAws_restJson1__listOfConnectorSummary = (output: any, context: __SerdeContext): ConnectorSummary[] => {
|
|
2195
|
-
return (output || [])
|
|
2196
|
-
.filter((e: any) => e != null)
|
|
2197
|
-
.map((entry: any) => {
|
|
2198
|
-
if (entry === null) {
|
|
2199
|
-
return null as any;
|
|
2200
|
-
}
|
|
2201
|
-
return deserializeAws_restJson1ConnectorSummary(entry, context);
|
|
2202
|
-
});
|
|
2203
|
-
};
|
|
2204
|
-
|
|
2205
|
-
const deserializeAws_restJson1__listOfCustomPluginSummary = (
|
|
2206
|
-
output: any,
|
|
2207
|
-
context: __SerdeContext
|
|
2208
|
-
): CustomPluginSummary[] => {
|
|
2209
|
-
return (output || [])
|
|
2210
|
-
.filter((e: any) => e != null)
|
|
2211
|
-
.map((entry: any) => {
|
|
2212
|
-
if (entry === null) {
|
|
2213
|
-
return null as any;
|
|
2214
|
-
}
|
|
2215
|
-
return deserializeAws_restJson1CustomPluginSummary(entry, context);
|
|
2216
|
-
});
|
|
2217
|
-
};
|
|
2218
|
-
|
|
2219
|
-
const deserializeAws_restJson1__listOfPluginDescription = (
|
|
2220
|
-
output: any,
|
|
2221
|
-
context: __SerdeContext
|
|
2222
|
-
): PluginDescription[] => {
|
|
2223
|
-
return (output || [])
|
|
2224
|
-
.filter((e: any) => e != null)
|
|
2225
|
-
.map((entry: any) => {
|
|
2226
|
-
if (entry === null) {
|
|
2227
|
-
return null as any;
|
|
2228
|
-
}
|
|
2229
|
-
return deserializeAws_restJson1PluginDescription(entry, context);
|
|
2230
|
-
});
|
|
2231
|
-
};
|
|
2232
|
-
|
|
2233
|
-
const deserializeAws_restJson1__listOfWorkerConfigurationSummary = (
|
|
2234
|
-
output: any,
|
|
2235
|
-
context: __SerdeContext
|
|
2236
|
-
): WorkerConfigurationSummary[] => {
|
|
2237
|
-
return (output || [])
|
|
2238
|
-
.filter((e: any) => e != null)
|
|
2239
|
-
.map((entry: any) => {
|
|
2240
|
-
if (entry === null) {
|
|
2241
|
-
return null as any;
|
|
2242
|
-
}
|
|
2243
|
-
return deserializeAws_restJson1WorkerConfigurationSummary(entry, context);
|
|
2244
|
-
});
|
|
2245
|
-
};
|
|
2246
|
-
|
|
2247
|
-
const deserializeAws_restJson1__mapOf__string = (output: any, context: __SerdeContext): { [key: string]: string } => {
|
|
2248
|
-
return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
|
|
2249
|
-
if (value === null) {
|
|
2250
|
-
return acc;
|
|
2251
|
-
}
|
|
2252
|
-
return {
|
|
2253
|
-
...acc,
|
|
2254
|
-
[key]: __expectString(value) as any,
|
|
2255
|
-
};
|
|
2256
|
-
}, {});
|
|
2257
|
-
};
|
|
2258
|
-
|
|
2259
|
-
const deserializeAws_restJson1ApacheKafkaClusterDescription = (
|
|
2260
|
-
output: any,
|
|
2261
|
-
context: __SerdeContext
|
|
2262
|
-
): ApacheKafkaClusterDescription => {
|
|
2263
|
-
return {
|
|
2264
|
-
bootstrapServers: __expectString(output.bootstrapServers),
|
|
2265
|
-
vpc:
|
|
2266
|
-
output.vpc !== undefined && output.vpc !== null
|
|
2267
|
-
? deserializeAws_restJson1VpcDescription(output.vpc, context)
|
|
2268
|
-
: undefined,
|
|
2269
|
-
} as any;
|
|
2270
|
-
};
|
|
2271
|
-
|
|
2272
|
-
const deserializeAws_restJson1AutoScalingDescription = (
|
|
2273
|
-
output: any,
|
|
2274
|
-
context: __SerdeContext
|
|
2275
|
-
): AutoScalingDescription => {
|
|
2276
|
-
return {
|
|
2277
|
-
maxWorkerCount: __expectInt32(output.maxWorkerCount),
|
|
2278
|
-
mcuCount: __expectInt32(output.mcuCount),
|
|
2279
|
-
minWorkerCount: __expectInt32(output.minWorkerCount),
|
|
2280
|
-
scaleInPolicy:
|
|
2281
|
-
output.scaleInPolicy !== undefined && output.scaleInPolicy !== null
|
|
2282
|
-
? deserializeAws_restJson1ScaleInPolicyDescription(output.scaleInPolicy, context)
|
|
2283
|
-
: undefined,
|
|
2284
|
-
scaleOutPolicy:
|
|
2285
|
-
output.scaleOutPolicy !== undefined && output.scaleOutPolicy !== null
|
|
2286
|
-
? deserializeAws_restJson1ScaleOutPolicyDescription(output.scaleOutPolicy, context)
|
|
2287
|
-
: undefined,
|
|
2288
|
-
} as any;
|
|
2289
|
-
};
|
|
2290
|
-
|
|
2291
|
-
const deserializeAws_restJson1CapacityDescription = (output: any, context: __SerdeContext): CapacityDescription => {
|
|
2292
|
-
return {
|
|
2293
|
-
autoScaling:
|
|
2294
|
-
output.autoScaling !== undefined && output.autoScaling !== null
|
|
2295
|
-
? deserializeAws_restJson1AutoScalingDescription(output.autoScaling, context)
|
|
2296
|
-
: undefined,
|
|
2297
|
-
provisionedCapacity:
|
|
2298
|
-
output.provisionedCapacity !== undefined && output.provisionedCapacity !== null
|
|
2299
|
-
? deserializeAws_restJson1ProvisionedCapacityDescription(output.provisionedCapacity, context)
|
|
2300
|
-
: undefined,
|
|
2301
|
-
} as any;
|
|
2302
|
-
};
|
|
2303
|
-
|
|
2304
|
-
const deserializeAws_restJson1CloudWatchLogsLogDeliveryDescription = (
|
|
2305
|
-
output: any,
|
|
2306
|
-
context: __SerdeContext
|
|
2307
|
-
): CloudWatchLogsLogDeliveryDescription => {
|
|
2308
|
-
return {
|
|
2309
|
-
enabled: __expectBoolean(output.enabled),
|
|
2310
|
-
logGroup: __expectString(output.logGroup),
|
|
2311
|
-
} as any;
|
|
2312
|
-
};
|
|
2313
|
-
|
|
2314
|
-
const deserializeAws_restJson1ConnectorSummary = (output: any, context: __SerdeContext): ConnectorSummary => {
|
|
2315
|
-
return {
|
|
2316
|
-
capacity:
|
|
2317
|
-
output.capacity !== undefined && output.capacity !== null
|
|
2318
|
-
? deserializeAws_restJson1CapacityDescription(output.capacity, context)
|
|
2319
|
-
: undefined,
|
|
2320
|
-
connectorArn: __expectString(output.connectorArn),
|
|
2321
|
-
connectorDescription: __expectString(output.connectorDescription),
|
|
2322
|
-
connectorName: __expectString(output.connectorName),
|
|
2323
|
-
connectorState: __expectString(output.connectorState),
|
|
2324
|
-
creationTime:
|
|
2325
|
-
output.creationTime !== undefined && output.creationTime !== null
|
|
2326
|
-
? __expectNonNull(__parseRfc3339DateTime(output.creationTime))
|
|
2327
|
-
: undefined,
|
|
2328
|
-
currentVersion: __expectString(output.currentVersion),
|
|
2329
|
-
kafkaCluster:
|
|
2330
|
-
output.kafkaCluster !== undefined && output.kafkaCluster !== null
|
|
2331
|
-
? deserializeAws_restJson1KafkaClusterDescription(output.kafkaCluster, context)
|
|
2332
|
-
: undefined,
|
|
2333
|
-
kafkaClusterClientAuthentication:
|
|
2334
|
-
output.kafkaClusterClientAuthentication !== undefined && output.kafkaClusterClientAuthentication !== null
|
|
2335
|
-
? deserializeAws_restJson1KafkaClusterClientAuthenticationDescription(
|
|
2336
|
-
output.kafkaClusterClientAuthentication,
|
|
2337
|
-
context
|
|
2338
|
-
)
|
|
2339
|
-
: undefined,
|
|
2340
|
-
kafkaClusterEncryptionInTransit:
|
|
2341
|
-
output.kafkaClusterEncryptionInTransit !== undefined && output.kafkaClusterEncryptionInTransit !== null
|
|
2342
|
-
? deserializeAws_restJson1KafkaClusterEncryptionInTransitDescription(
|
|
2343
|
-
output.kafkaClusterEncryptionInTransit,
|
|
2344
|
-
context
|
|
2345
|
-
)
|
|
2346
|
-
: undefined,
|
|
2347
|
-
kafkaConnectVersion: __expectString(output.kafkaConnectVersion),
|
|
2348
|
-
logDelivery:
|
|
2349
|
-
output.logDelivery !== undefined && output.logDelivery !== null
|
|
2350
|
-
? deserializeAws_restJson1LogDeliveryDescription(output.logDelivery, context)
|
|
2351
|
-
: undefined,
|
|
2352
|
-
plugins:
|
|
2353
|
-
output.plugins !== undefined && output.plugins !== null
|
|
2354
|
-
? deserializeAws_restJson1__listOfPluginDescription(output.plugins, context)
|
|
2355
|
-
: undefined,
|
|
2356
|
-
serviceExecutionRoleArn: __expectString(output.serviceExecutionRoleArn),
|
|
2357
|
-
workerConfiguration:
|
|
2358
|
-
output.workerConfiguration !== undefined && output.workerConfiguration !== null
|
|
2359
|
-
? deserializeAws_restJson1WorkerConfigurationDescription(output.workerConfiguration, context)
|
|
2360
|
-
: undefined,
|
|
2361
|
-
} as any;
|
|
2362
|
-
};
|
|
2363
|
-
|
|
2364
|
-
const deserializeAws_restJson1CustomPluginDescription = (
|
|
2365
|
-
output: any,
|
|
2366
|
-
context: __SerdeContext
|
|
2367
|
-
): CustomPluginDescription => {
|
|
2368
|
-
return {
|
|
2369
|
-
customPluginArn: __expectString(output.customPluginArn),
|
|
2370
|
-
revision: __expectLong(output.revision),
|
|
2371
|
-
} as any;
|
|
2372
|
-
};
|
|
2373
|
-
|
|
2374
|
-
const deserializeAws_restJson1CustomPluginFileDescription = (
|
|
2375
|
-
output: any,
|
|
2376
|
-
context: __SerdeContext
|
|
2377
|
-
): CustomPluginFileDescription => {
|
|
2378
|
-
return {
|
|
2379
|
-
fileMd5: __expectString(output.fileMd5),
|
|
2380
|
-
fileSize: __expectLong(output.fileSize),
|
|
2381
|
-
} as any;
|
|
2382
|
-
};
|
|
2383
|
-
|
|
2384
|
-
const deserializeAws_restJson1CustomPluginLocationDescription = (
|
|
2385
|
-
output: any,
|
|
2386
|
-
context: __SerdeContext
|
|
2387
|
-
): CustomPluginLocationDescription => {
|
|
2388
|
-
return {
|
|
2389
|
-
s3Location:
|
|
2390
|
-
output.s3Location !== undefined && output.s3Location !== null
|
|
2391
|
-
? deserializeAws_restJson1S3LocationDescription(output.s3Location, context)
|
|
2392
|
-
: undefined,
|
|
2393
|
-
} as any;
|
|
2394
|
-
};
|
|
2395
|
-
|
|
2396
|
-
const deserializeAws_restJson1CustomPluginRevisionSummary = (
|
|
2397
|
-
output: any,
|
|
2398
|
-
context: __SerdeContext
|
|
2399
|
-
): CustomPluginRevisionSummary => {
|
|
2400
|
-
return {
|
|
2401
|
-
contentType: __expectString(output.contentType),
|
|
2402
|
-
creationTime:
|
|
2403
|
-
output.creationTime !== undefined && output.creationTime !== null
|
|
2404
|
-
? __expectNonNull(__parseRfc3339DateTime(output.creationTime))
|
|
2405
|
-
: undefined,
|
|
2406
|
-
description: __expectString(output.description),
|
|
2407
|
-
fileDescription:
|
|
2408
|
-
output.fileDescription !== undefined && output.fileDescription !== null
|
|
2409
|
-
? deserializeAws_restJson1CustomPluginFileDescription(output.fileDescription, context)
|
|
2410
|
-
: undefined,
|
|
2411
|
-
location:
|
|
2412
|
-
output.location !== undefined && output.location !== null
|
|
2413
|
-
? deserializeAws_restJson1CustomPluginLocationDescription(output.location, context)
|
|
2414
|
-
: undefined,
|
|
2415
|
-
revision: __expectLong(output.revision),
|
|
2416
|
-
} as any;
|
|
2417
|
-
};
|
|
2418
|
-
|
|
2419
|
-
const deserializeAws_restJson1CustomPluginSummary = (output: any, context: __SerdeContext): CustomPluginSummary => {
|
|
2420
|
-
return {
|
|
2421
|
-
creationTime:
|
|
2422
|
-
output.creationTime !== undefined && output.creationTime !== null
|
|
2423
|
-
? __expectNonNull(__parseRfc3339DateTime(output.creationTime))
|
|
2424
|
-
: undefined,
|
|
2425
|
-
customPluginArn: __expectString(output.customPluginArn),
|
|
2426
|
-
customPluginState: __expectString(output.customPluginState),
|
|
2427
|
-
description: __expectString(output.description),
|
|
2428
|
-
latestRevision:
|
|
2429
|
-
output.latestRevision !== undefined && output.latestRevision !== null
|
|
2430
|
-
? deserializeAws_restJson1CustomPluginRevisionSummary(output.latestRevision, context)
|
|
2431
|
-
: undefined,
|
|
2432
|
-
name: __expectString(output.name),
|
|
2433
|
-
} as any;
|
|
2434
|
-
};
|
|
2435
|
-
|
|
2436
|
-
const deserializeAws_restJson1FirehoseLogDeliveryDescription = (
|
|
2437
|
-
output: any,
|
|
2438
|
-
context: __SerdeContext
|
|
2439
|
-
): FirehoseLogDeliveryDescription => {
|
|
2440
|
-
return {
|
|
2441
|
-
deliveryStream: __expectString(output.deliveryStream),
|
|
2442
|
-
enabled: __expectBoolean(output.enabled),
|
|
2443
|
-
} as any;
|
|
2444
|
-
};
|
|
2445
|
-
|
|
2446
|
-
const deserializeAws_restJson1KafkaClusterClientAuthenticationDescription = (
|
|
2447
|
-
output: any,
|
|
2448
|
-
context: __SerdeContext
|
|
2449
|
-
): KafkaClusterClientAuthenticationDescription => {
|
|
2450
|
-
return {
|
|
2451
|
-
authenticationType: __expectString(output.authenticationType),
|
|
2452
|
-
} as any;
|
|
2453
|
-
};
|
|
2454
|
-
|
|
2455
|
-
const deserializeAws_restJson1KafkaClusterDescription = (
|
|
2456
|
-
output: any,
|
|
2457
|
-
context: __SerdeContext
|
|
2458
|
-
): KafkaClusterDescription => {
|
|
2459
|
-
return {
|
|
2460
|
-
apacheKafkaCluster:
|
|
2461
|
-
output.apacheKafkaCluster !== undefined && output.apacheKafkaCluster !== null
|
|
2462
|
-
? deserializeAws_restJson1ApacheKafkaClusterDescription(output.apacheKafkaCluster, context)
|
|
2463
|
-
: undefined,
|
|
2464
|
-
} as any;
|
|
2465
|
-
};
|
|
2466
|
-
|
|
2467
|
-
const deserializeAws_restJson1KafkaClusterEncryptionInTransitDescription = (
|
|
2468
|
-
output: any,
|
|
2469
|
-
context: __SerdeContext
|
|
2470
|
-
): KafkaClusterEncryptionInTransitDescription => {
|
|
2471
|
-
return {
|
|
2472
|
-
encryptionType: __expectString(output.encryptionType),
|
|
2473
|
-
} as any;
|
|
2474
|
-
};
|
|
2475
|
-
|
|
2476
|
-
const deserializeAws_restJson1LogDeliveryDescription = (
|
|
2477
|
-
output: any,
|
|
2478
|
-
context: __SerdeContext
|
|
2479
|
-
): LogDeliveryDescription => {
|
|
2480
|
-
return {
|
|
2481
|
-
workerLogDelivery:
|
|
2482
|
-
output.workerLogDelivery !== undefined && output.workerLogDelivery !== null
|
|
2483
|
-
? deserializeAws_restJson1WorkerLogDeliveryDescription(output.workerLogDelivery, context)
|
|
2484
|
-
: undefined,
|
|
2485
|
-
} as any;
|
|
2486
|
-
};
|
|
2487
|
-
|
|
2488
|
-
const deserializeAws_restJson1PluginDescription = (output: any, context: __SerdeContext): PluginDescription => {
|
|
2489
|
-
return {
|
|
2490
|
-
customPlugin:
|
|
2491
|
-
output.customPlugin !== undefined && output.customPlugin !== null
|
|
2492
|
-
? deserializeAws_restJson1CustomPluginDescription(output.customPlugin, context)
|
|
2493
|
-
: undefined,
|
|
2494
|
-
} as any;
|
|
2495
|
-
};
|
|
2496
|
-
|
|
2497
|
-
const deserializeAws_restJson1ProvisionedCapacityDescription = (
|
|
2498
|
-
output: any,
|
|
2499
|
-
context: __SerdeContext
|
|
2500
|
-
): ProvisionedCapacityDescription => {
|
|
2501
|
-
return {
|
|
2502
|
-
mcuCount: __expectInt32(output.mcuCount),
|
|
2503
|
-
workerCount: __expectInt32(output.workerCount),
|
|
2504
|
-
} as any;
|
|
2505
|
-
};
|
|
2506
|
-
|
|
2507
|
-
const deserializeAws_restJson1S3LocationDescription = (output: any, context: __SerdeContext): S3LocationDescription => {
|
|
2508
|
-
return {
|
|
2509
|
-
bucketArn: __expectString(output.bucketArn),
|
|
2510
|
-
fileKey: __expectString(output.fileKey),
|
|
2511
|
-
objectVersion: __expectString(output.objectVersion),
|
|
2512
|
-
} as any;
|
|
2513
|
-
};
|
|
2514
|
-
|
|
2515
|
-
const deserializeAws_restJson1S3LogDeliveryDescription = (
|
|
2516
|
-
output: any,
|
|
2517
|
-
context: __SerdeContext
|
|
2518
|
-
): S3LogDeliveryDescription => {
|
|
2519
|
-
return {
|
|
2520
|
-
bucket: __expectString(output.bucket),
|
|
2521
|
-
enabled: __expectBoolean(output.enabled),
|
|
2522
|
-
prefix: __expectString(output.prefix),
|
|
2523
|
-
} as any;
|
|
2524
|
-
};
|
|
2525
|
-
|
|
2526
|
-
const deserializeAws_restJson1ScaleInPolicyDescription = (
|
|
2527
|
-
output: any,
|
|
2528
|
-
context: __SerdeContext
|
|
2529
|
-
): ScaleInPolicyDescription => {
|
|
2530
|
-
return {
|
|
2531
|
-
cpuUtilizationPercentage: __expectInt32(output.cpuUtilizationPercentage),
|
|
2532
|
-
} as any;
|
|
2533
|
-
};
|
|
2534
|
-
|
|
2535
|
-
const deserializeAws_restJson1ScaleOutPolicyDescription = (
|
|
2536
|
-
output: any,
|
|
2537
|
-
context: __SerdeContext
|
|
2538
|
-
): ScaleOutPolicyDescription => {
|
|
2539
|
-
return {
|
|
2540
|
-
cpuUtilizationPercentage: __expectInt32(output.cpuUtilizationPercentage),
|
|
2541
|
-
} as any;
|
|
2542
|
-
};
|
|
2543
|
-
|
|
2544
|
-
const deserializeAws_restJson1VpcDescription = (output: any, context: __SerdeContext): VpcDescription => {
|
|
2545
|
-
return {
|
|
2546
|
-
securityGroups:
|
|
2547
|
-
output.securityGroups !== undefined && output.securityGroups !== null
|
|
2548
|
-
? deserializeAws_restJson1__listOf__string(output.securityGroups, context)
|
|
2549
|
-
: undefined,
|
|
2550
|
-
subnets:
|
|
2551
|
-
output.subnets !== undefined && output.subnets !== null
|
|
2552
|
-
? deserializeAws_restJson1__listOf__string(output.subnets, context)
|
|
2553
|
-
: undefined,
|
|
2554
|
-
} as any;
|
|
2555
|
-
};
|
|
2556
|
-
|
|
2557
|
-
const deserializeAws_restJson1WorkerConfigurationDescription = (
|
|
2558
|
-
output: any,
|
|
2559
|
-
context: __SerdeContext
|
|
2560
|
-
): WorkerConfigurationDescription => {
|
|
2561
|
-
return {
|
|
2562
|
-
revision: __expectLong(output.revision),
|
|
2563
|
-
workerConfigurationArn: __expectString(output.workerConfigurationArn),
|
|
2564
|
-
} as any;
|
|
2565
|
-
};
|
|
2566
|
-
|
|
2567
|
-
const deserializeAws_restJson1WorkerConfigurationRevisionDescription = (
|
|
2568
|
-
output: any,
|
|
2569
|
-
context: __SerdeContext
|
|
2570
|
-
): WorkerConfigurationRevisionDescription => {
|
|
2571
|
-
return {
|
|
2572
|
-
creationTime:
|
|
2573
|
-
output.creationTime !== undefined && output.creationTime !== null
|
|
2574
|
-
? __expectNonNull(__parseRfc3339DateTime(output.creationTime))
|
|
2575
|
-
: undefined,
|
|
2576
|
-
description: __expectString(output.description),
|
|
2577
|
-
propertiesFileContent: __expectString(output.propertiesFileContent),
|
|
2578
|
-
revision: __expectLong(output.revision),
|
|
2579
|
-
} as any;
|
|
2580
|
-
};
|
|
2581
|
-
|
|
2582
|
-
const deserializeAws_restJson1WorkerConfigurationRevisionSummary = (
|
|
2583
|
-
output: any,
|
|
2584
|
-
context: __SerdeContext
|
|
2585
|
-
): WorkerConfigurationRevisionSummary => {
|
|
2586
|
-
return {
|
|
2587
|
-
creationTime:
|
|
2588
|
-
output.creationTime !== undefined && output.creationTime !== null
|
|
2589
|
-
? __expectNonNull(__parseRfc3339DateTime(output.creationTime))
|
|
2590
|
-
: undefined,
|
|
2591
|
-
description: __expectString(output.description),
|
|
2592
|
-
revision: __expectLong(output.revision),
|
|
2593
|
-
} as any;
|
|
2594
|
-
};
|
|
2595
|
-
|
|
2596
|
-
const deserializeAws_restJson1WorkerConfigurationSummary = (
|
|
2597
|
-
output: any,
|
|
2598
|
-
context: __SerdeContext
|
|
2599
|
-
): WorkerConfigurationSummary => {
|
|
2600
|
-
return {
|
|
2601
|
-
creationTime:
|
|
2602
|
-
output.creationTime !== undefined && output.creationTime !== null
|
|
2603
|
-
? __expectNonNull(__parseRfc3339DateTime(output.creationTime))
|
|
2604
|
-
: undefined,
|
|
2605
|
-
description: __expectString(output.description),
|
|
2606
|
-
latestRevision:
|
|
2607
|
-
output.latestRevision !== undefined && output.latestRevision !== null
|
|
2608
|
-
? deserializeAws_restJson1WorkerConfigurationRevisionSummary(output.latestRevision, context)
|
|
2609
|
-
: undefined,
|
|
2610
|
-
name: __expectString(output.name),
|
|
2611
|
-
workerConfigurationArn: __expectString(output.workerConfigurationArn),
|
|
2612
|
-
} as any;
|
|
2613
|
-
};
|
|
2614
|
-
|
|
2615
|
-
const deserializeAws_restJson1WorkerLogDeliveryDescription = (
|
|
2616
|
-
output: any,
|
|
2617
|
-
context: __SerdeContext
|
|
2618
|
-
): WorkerLogDeliveryDescription => {
|
|
2619
|
-
return {
|
|
2620
|
-
cloudWatchLogs:
|
|
2621
|
-
output.cloudWatchLogs !== undefined && output.cloudWatchLogs !== null
|
|
2622
|
-
? deserializeAws_restJson1CloudWatchLogsLogDeliveryDescription(output.cloudWatchLogs, context)
|
|
2623
|
-
: undefined,
|
|
2624
|
-
firehose:
|
|
2625
|
-
output.firehose !== undefined && output.firehose !== null
|
|
2626
|
-
? deserializeAws_restJson1FirehoseLogDeliveryDescription(output.firehose, context)
|
|
2627
|
-
: undefined,
|
|
2628
|
-
s3:
|
|
2629
|
-
output.s3 !== undefined && output.s3 !== null
|
|
2630
|
-
? deserializeAws_restJson1S3LogDeliveryDescription(output.s3, context)
|
|
2631
|
-
: undefined,
|
|
2632
|
-
} as any;
|
|
2633
|
-
};
|
|
2634
|
-
|
|
2635
|
-
const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
|
|
2636
|
-
httpStatusCode: output.statusCode,
|
|
2637
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
2638
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
2639
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
2640
|
-
});
|
|
2641
|
-
|
|
2642
|
-
// Collect low-level response body stream to Uint8Array.
|
|
2643
|
-
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
|
|
2644
|
-
if (streamBody instanceof Uint8Array) {
|
|
2645
|
-
return Promise.resolve(streamBody);
|
|
2646
|
-
}
|
|
2647
|
-
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
2648
|
-
};
|
|
2649
|
-
|
|
2650
|
-
// Encode Uint8Array data into string with utf-8.
|
|
2651
|
-
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
|
|
2652
|
-
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
2653
|
-
|
|
2654
|
-
const isSerializableHeaderValue = (value: any): boolean =>
|
|
2655
|
-
value !== undefined &&
|
|
2656
|
-
value !== null &&
|
|
2657
|
-
value !== "" &&
|
|
2658
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
2659
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
2660
|
-
|
|
2661
|
-
const parseBody = (streamBody: any, context: __SerdeContext): any =>
|
|
2662
|
-
collectBodyString(streamBody, context).then((encoded) => {
|
|
2663
|
-
if (encoded.length) {
|
|
2664
|
-
return JSON.parse(encoded);
|
|
2665
|
-
}
|
|
2666
|
-
return {};
|
|
2667
|
-
});
|
|
2668
|
-
|
|
2669
|
-
/**
|
|
2670
|
-
* Load an error code for the aws.rest-json-1.1 protocol.
|
|
2671
|
-
*/
|
|
2672
|
-
const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
|
|
2673
|
-
const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
2674
|
-
|
|
2675
|
-
const sanitizeErrorCode = (rawValue: string): string => {
|
|
2676
|
-
let cleanValue = rawValue;
|
|
2677
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
2678
|
-
cleanValue = cleanValue.split(":")[0];
|
|
2679
|
-
}
|
|
2680
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
2681
|
-
cleanValue = cleanValue.split("#")[1];
|
|
2682
|
-
}
|
|
2683
|
-
return cleanValue;
|
|
2684
|
-
};
|
|
2685
|
-
|
|
2686
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2687
|
-
if (headerKey !== undefined) {
|
|
2688
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
2689
|
-
}
|
|
2690
|
-
|
|
2691
|
-
if (data.code !== undefined) {
|
|
2692
|
-
return sanitizeErrorCode(data.code);
|
|
2693
|
-
}
|
|
2694
|
-
|
|
2695
|
-
if (data["__type"] !== undefined) {
|
|
2696
|
-
return sanitizeErrorCode(data["__type"]);
|
|
2697
|
-
}
|
|
2698
|
-
|
|
2699
|
-
return "";
|
|
2700
|
-
};
|