@aws-sdk/client-mediapackage 3.35.0 → 3.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist-cjs/MediaPackage.js +0 -1
- package/dist-cjs/MediaPackageClient.js +0 -1
- package/dist-cjs/commands/ConfigureLogsCommand.js +0 -1
- package/dist-cjs/commands/CreateChannelCommand.js +0 -1
- package/dist-cjs/commands/CreateHarvestJobCommand.js +0 -1
- package/dist-cjs/commands/CreateOriginEndpointCommand.js +0 -1
- package/dist-cjs/commands/DeleteChannelCommand.js +0 -1
- package/dist-cjs/commands/DeleteOriginEndpointCommand.js +0 -1
- package/dist-cjs/commands/DescribeChannelCommand.js +0 -1
- package/dist-cjs/commands/DescribeHarvestJobCommand.js +0 -1
- package/dist-cjs/commands/DescribeOriginEndpointCommand.js +0 -1
- package/dist-cjs/commands/ListChannelsCommand.js +0 -1
- package/dist-cjs/commands/ListHarvestJobsCommand.js +0 -1
- package/dist-cjs/commands/ListOriginEndpointsCommand.js +0 -1
- package/dist-cjs/commands/ListTagsForResourceCommand.js +0 -1
- package/dist-cjs/commands/RotateChannelCredentialsCommand.js +0 -1
- package/dist-cjs/commands/RotateIngestEndpointCredentialsCommand.js +0 -1
- package/dist-cjs/commands/TagResourceCommand.js +0 -1
- package/dist-cjs/commands/UntagResourceCommand.js +0 -1
- package/dist-cjs/commands/UpdateChannelCommand.js +0 -1
- package/dist-cjs/commands/UpdateOriginEndpointCommand.js +0 -1
- package/dist-cjs/endpoints.js +0 -1
- package/dist-cjs/index.js +0 -1
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -1
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/ListChannelsPaginator.js +0 -1
- package/dist-cjs/pagination/ListHarvestJobsPaginator.js +0 -1
- package/dist-cjs/pagination/ListOriginEndpointsPaginator.js +0 -1
- package/dist-cjs/protocols/Aws_restJson1.js +0 -1
- package/dist-cjs/runtimeConfig.browser.js +2 -3
- package/dist-cjs/runtimeConfig.js +3 -4
- package/dist-cjs/runtimeConfig.native.js +0 -1
- package/dist-cjs/runtimeConfig.shared.js +0 -1
- package/dist-es/MediaPackage.js +0 -1
- package/dist-es/MediaPackageClient.js +0 -1
- package/dist-es/commands/ConfigureLogsCommand.js +0 -1
- package/dist-es/commands/CreateChannelCommand.js +0 -1
- package/dist-es/commands/CreateHarvestJobCommand.js +0 -1
- package/dist-es/commands/CreateOriginEndpointCommand.js +0 -1
- package/dist-es/commands/DeleteChannelCommand.js +0 -1
- package/dist-es/commands/DeleteOriginEndpointCommand.js +0 -1
- package/dist-es/commands/DescribeChannelCommand.js +0 -1
- package/dist-es/commands/DescribeHarvestJobCommand.js +0 -1
- package/dist-es/commands/DescribeOriginEndpointCommand.js +0 -1
- package/dist-es/commands/ListChannelsCommand.js +0 -1
- package/dist-es/commands/ListHarvestJobsCommand.js +0 -1
- package/dist-es/commands/ListOriginEndpointsCommand.js +0 -1
- package/dist-es/commands/ListTagsForResourceCommand.js +0 -1
- package/dist-es/commands/RotateChannelCredentialsCommand.js +0 -1
- package/dist-es/commands/RotateIngestEndpointCredentialsCommand.js +0 -1
- package/dist-es/commands/TagResourceCommand.js +0 -1
- package/dist-es/commands/UntagResourceCommand.js +0 -1
- package/dist-es/commands/UpdateChannelCommand.js +0 -1
- package/dist-es/commands/UpdateOriginEndpointCommand.js +0 -1
- package/dist-es/endpoints.js +0 -1
- package/dist-es/index.js +0 -1
- package/dist-es/models/index.js +0 -1
- package/dist-es/models/models_0.js +0 -1
- package/dist-es/pagination/Interfaces.js +0 -1
- package/dist-es/pagination/ListChannelsPaginator.js +0 -1
- package/dist-es/pagination/ListHarvestJobsPaginator.js +0 -1
- package/dist-es/pagination/ListOriginEndpointsPaginator.js +0 -1
- package/dist-es/protocols/Aws_restJson1.js +0 -1
- package/dist-es/runtimeConfig.browser.js +1 -2
- package/dist-es/runtimeConfig.js +2 -3
- package/dist-es/runtimeConfig.native.js +0 -1
- package/dist-es/runtimeConfig.shared.js +0 -1
- package/package.json +33 -30
- package/dist-cjs/MediaPackage.js.map +0 -1
- package/dist-cjs/MediaPackageClient.js.map +0 -1
- package/dist-cjs/commands/ConfigureLogsCommand.js.map +0 -1
- package/dist-cjs/commands/CreateChannelCommand.js.map +0 -1
- package/dist-cjs/commands/CreateHarvestJobCommand.js.map +0 -1
- package/dist-cjs/commands/CreateOriginEndpointCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteChannelCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteOriginEndpointCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeChannelCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeHarvestJobCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeOriginEndpointCommand.js.map +0 -1
- package/dist-cjs/commands/ListChannelsCommand.js.map +0 -1
- package/dist-cjs/commands/ListHarvestJobsCommand.js.map +0 -1
- package/dist-cjs/commands/ListOriginEndpointsCommand.js.map +0 -1
- package/dist-cjs/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist-cjs/commands/RotateChannelCredentialsCommand.js.map +0 -1
- package/dist-cjs/commands/RotateIngestEndpointCredentialsCommand.js.map +0 -1
- package/dist-cjs/commands/TagResourceCommand.js.map +0 -1
- package/dist-cjs/commands/UntagResourceCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateChannelCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateOriginEndpointCommand.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/pagination/Interfaces.js.map +0 -1
- package/dist-cjs/pagination/ListChannelsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListHarvestJobsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListOriginEndpointsPaginator.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/MediaPackage.js.map +0 -1
- package/dist-es/MediaPackageClient.js.map +0 -1
- package/dist-es/commands/ConfigureLogsCommand.js.map +0 -1
- package/dist-es/commands/CreateChannelCommand.js.map +0 -1
- package/dist-es/commands/CreateHarvestJobCommand.js.map +0 -1
- package/dist-es/commands/CreateOriginEndpointCommand.js.map +0 -1
- package/dist-es/commands/DeleteChannelCommand.js.map +0 -1
- package/dist-es/commands/DeleteOriginEndpointCommand.js.map +0 -1
- package/dist-es/commands/DescribeChannelCommand.js.map +0 -1
- package/dist-es/commands/DescribeHarvestJobCommand.js.map +0 -1
- package/dist-es/commands/DescribeOriginEndpointCommand.js.map +0 -1
- package/dist-es/commands/ListChannelsCommand.js.map +0 -1
- package/dist-es/commands/ListHarvestJobsCommand.js.map +0 -1
- package/dist-es/commands/ListOriginEndpointsCommand.js.map +0 -1
- package/dist-es/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist-es/commands/RotateChannelCredentialsCommand.js.map +0 -1
- package/dist-es/commands/RotateIngestEndpointCredentialsCommand.js.map +0 -1
- package/dist-es/commands/TagResourceCommand.js.map +0 -1
- package/dist-es/commands/UntagResourceCommand.js.map +0 -1
- package/dist-es/commands/UpdateChannelCommand.js.map +0 -1
- package/dist-es/commands/UpdateOriginEndpointCommand.js.map +0 -1
- package/dist-es/endpoints.js.map +0 -1
- package/dist-es/index.js.map +0 -1
- package/dist-es/models/index.js.map +0 -1
- package/dist-es/models/models_0.js.map +0 -1
- package/dist-es/pagination/Interfaces.js.map +0 -1
- package/dist-es/pagination/ListChannelsPaginator.js.map +0 -1
- package/dist-es/pagination/ListHarvestJobsPaginator.js.map +0 -1
- package/dist-es/pagination/ListOriginEndpointsPaginator.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/jest.config.js +0 -4
- package/src/MediaPackage.ts +0 -691
- package/src/MediaPackageClient.ts +0 -317
- package/src/commands/ConfigureLogsCommand.ts +0 -95
- package/src/commands/CreateChannelCommand.ts +0 -95
- package/src/commands/CreateHarvestJobCommand.ts +0 -95
- package/src/commands/CreateOriginEndpointCommand.ts +0 -95
- package/src/commands/DeleteChannelCommand.ts +0 -95
- package/src/commands/DeleteOriginEndpointCommand.ts +0 -95
- package/src/commands/DescribeChannelCommand.ts +0 -95
- package/src/commands/DescribeHarvestJobCommand.ts +0 -95
- package/src/commands/DescribeOriginEndpointCommand.ts +0 -95
- package/src/commands/ListChannelsCommand.ts +0 -95
- package/src/commands/ListHarvestJobsCommand.ts +0 -95
- package/src/commands/ListOriginEndpointsCommand.ts +0 -95
- package/src/commands/ListTagsForResourceCommand.ts +0 -78
- package/src/commands/RotateChannelCredentialsCommand.ts +0 -97
- package/src/commands/RotateIngestEndpointCredentialsCommand.ts +0 -103
- package/src/commands/TagResourceCommand.ts +0 -78
- package/src/commands/UntagResourceCommand.ts +0 -78
- package/src/commands/UpdateChannelCommand.ts +0 -95
- package/src/commands/UpdateOriginEndpointCommand.ts +0 -95
- package/src/endpoints.ts +0 -57
- package/src/index.ts +0 -26
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -2553
- package/src/pagination/Interfaces.ts +0 -8
- package/src/pagination/ListChannelsPaginator.ts +0 -59
- package/src/pagination/ListHarvestJobsPaginator.ts +0 -59
- package/src/pagination/ListOriginEndpointsPaginator.ts +0 -59
- package/src/protocols/Aws_restJson1.ts +0 -3669
- package/src/runtimeConfig.browser.ts +0 -41
- package/src/runtimeConfig.native.ts +0 -17
- package/src/runtimeConfig.shared.ts +0 -17
- package/src/runtimeConfig.ts +0 -46
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -33
- package/tsconfig.types.json +0 -9
|
@@ -1,3669 +0,0 @@
|
|
|
1
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
2
|
-
import {
|
|
3
|
-
expectBoolean as __expectBoolean,
|
|
4
|
-
expectInt32 as __expectInt32,
|
|
5
|
-
expectNonNull as __expectNonNull,
|
|
6
|
-
expectObject as __expectObject,
|
|
7
|
-
expectString as __expectString,
|
|
8
|
-
extendedEncodeURIComponent as __extendedEncodeURIComponent,
|
|
9
|
-
} from "@aws-sdk/smithy-client";
|
|
10
|
-
import {
|
|
11
|
-
Endpoint as __Endpoint,
|
|
12
|
-
MetadataBearer as __MetadataBearer,
|
|
13
|
-
ResponseMetadata as __ResponseMetadata,
|
|
14
|
-
SerdeContext as __SerdeContext,
|
|
15
|
-
SmithyException as __SmithyException,
|
|
16
|
-
} from "@aws-sdk/types";
|
|
17
|
-
|
|
18
|
-
import { ConfigureLogsCommandInput, ConfigureLogsCommandOutput } from "../commands/ConfigureLogsCommand";
|
|
19
|
-
import { CreateChannelCommandInput, CreateChannelCommandOutput } from "../commands/CreateChannelCommand";
|
|
20
|
-
import { CreateHarvestJobCommandInput, CreateHarvestJobCommandOutput } from "../commands/CreateHarvestJobCommand";
|
|
21
|
-
import {
|
|
22
|
-
CreateOriginEndpointCommandInput,
|
|
23
|
-
CreateOriginEndpointCommandOutput,
|
|
24
|
-
} from "../commands/CreateOriginEndpointCommand";
|
|
25
|
-
import { DeleteChannelCommandInput, DeleteChannelCommandOutput } from "../commands/DeleteChannelCommand";
|
|
26
|
-
import {
|
|
27
|
-
DeleteOriginEndpointCommandInput,
|
|
28
|
-
DeleteOriginEndpointCommandOutput,
|
|
29
|
-
} from "../commands/DeleteOriginEndpointCommand";
|
|
30
|
-
import { DescribeChannelCommandInput, DescribeChannelCommandOutput } from "../commands/DescribeChannelCommand";
|
|
31
|
-
import { DescribeHarvestJobCommandInput, DescribeHarvestJobCommandOutput } from "../commands/DescribeHarvestJobCommand";
|
|
32
|
-
import {
|
|
33
|
-
DescribeOriginEndpointCommandInput,
|
|
34
|
-
DescribeOriginEndpointCommandOutput,
|
|
35
|
-
} from "../commands/DescribeOriginEndpointCommand";
|
|
36
|
-
import { ListChannelsCommandInput, ListChannelsCommandOutput } from "../commands/ListChannelsCommand";
|
|
37
|
-
import { ListHarvestJobsCommandInput, ListHarvestJobsCommandOutput } from "../commands/ListHarvestJobsCommand";
|
|
38
|
-
import {
|
|
39
|
-
ListOriginEndpointsCommandInput,
|
|
40
|
-
ListOriginEndpointsCommandOutput,
|
|
41
|
-
} from "../commands/ListOriginEndpointsCommand";
|
|
42
|
-
import {
|
|
43
|
-
ListTagsForResourceCommandInput,
|
|
44
|
-
ListTagsForResourceCommandOutput,
|
|
45
|
-
} from "../commands/ListTagsForResourceCommand";
|
|
46
|
-
import {
|
|
47
|
-
RotateChannelCredentialsCommandInput,
|
|
48
|
-
RotateChannelCredentialsCommandOutput,
|
|
49
|
-
} from "../commands/RotateChannelCredentialsCommand";
|
|
50
|
-
import {
|
|
51
|
-
RotateIngestEndpointCredentialsCommandInput,
|
|
52
|
-
RotateIngestEndpointCredentialsCommandOutput,
|
|
53
|
-
} from "../commands/RotateIngestEndpointCredentialsCommand";
|
|
54
|
-
import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
|
|
55
|
-
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
|
|
56
|
-
import { UpdateChannelCommandInput, UpdateChannelCommandOutput } from "../commands/UpdateChannelCommand";
|
|
57
|
-
import {
|
|
58
|
-
UpdateOriginEndpointCommandInput,
|
|
59
|
-
UpdateOriginEndpointCommandOutput,
|
|
60
|
-
} from "../commands/UpdateOriginEndpointCommand";
|
|
61
|
-
import {
|
|
62
|
-
__AdTriggersElement,
|
|
63
|
-
__PeriodTriggersElement,
|
|
64
|
-
Authorization,
|
|
65
|
-
Channel,
|
|
66
|
-
CmafEncryption,
|
|
67
|
-
CmafPackage,
|
|
68
|
-
CmafPackageCreateOrUpdateParameters,
|
|
69
|
-
DashEncryption,
|
|
70
|
-
DashPackage,
|
|
71
|
-
EgressAccessLogs,
|
|
72
|
-
EncryptionContractConfiguration,
|
|
73
|
-
ForbiddenException,
|
|
74
|
-
HarvestJob,
|
|
75
|
-
HlsEncryption,
|
|
76
|
-
HlsIngest,
|
|
77
|
-
HlsManifest,
|
|
78
|
-
HlsManifestCreateOrUpdateParameters,
|
|
79
|
-
HlsPackage,
|
|
80
|
-
IngestEndpoint,
|
|
81
|
-
IngressAccessLogs,
|
|
82
|
-
InternalServerErrorException,
|
|
83
|
-
MssEncryption,
|
|
84
|
-
MssPackage,
|
|
85
|
-
NotFoundException,
|
|
86
|
-
OriginEndpoint,
|
|
87
|
-
S3Destination,
|
|
88
|
-
ServiceUnavailableException,
|
|
89
|
-
SpekeKeyProvider,
|
|
90
|
-
StreamSelection,
|
|
91
|
-
TooManyRequestsException,
|
|
92
|
-
UnprocessableEntityException,
|
|
93
|
-
} from "../models/models_0";
|
|
94
|
-
|
|
95
|
-
export const serializeAws_restJson1ConfigureLogsCommand = async (
|
|
96
|
-
input: ConfigureLogsCommandInput,
|
|
97
|
-
context: __SerdeContext
|
|
98
|
-
): Promise<__HttpRequest> => {
|
|
99
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
100
|
-
const headers: any = {
|
|
101
|
-
"content-type": "application/json",
|
|
102
|
-
};
|
|
103
|
-
let resolvedPath =
|
|
104
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{Id}/configure_logs";
|
|
105
|
-
if (input.Id !== undefined) {
|
|
106
|
-
const labelValue: string = input.Id;
|
|
107
|
-
if (labelValue.length <= 0) {
|
|
108
|
-
throw new Error("Empty value provided for input HTTP label: Id.");
|
|
109
|
-
}
|
|
110
|
-
resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue));
|
|
111
|
-
} else {
|
|
112
|
-
throw new Error("No value provided for input HTTP label: Id.");
|
|
113
|
-
}
|
|
114
|
-
let body: any;
|
|
115
|
-
body = JSON.stringify({
|
|
116
|
-
...(input.EgressAccessLogs !== undefined &&
|
|
117
|
-
input.EgressAccessLogs !== null && {
|
|
118
|
-
egressAccessLogs: serializeAws_restJson1EgressAccessLogs(input.EgressAccessLogs, context),
|
|
119
|
-
}),
|
|
120
|
-
...(input.IngressAccessLogs !== undefined &&
|
|
121
|
-
input.IngressAccessLogs !== null && {
|
|
122
|
-
ingressAccessLogs: serializeAws_restJson1IngressAccessLogs(input.IngressAccessLogs, context),
|
|
123
|
-
}),
|
|
124
|
-
});
|
|
125
|
-
return new __HttpRequest({
|
|
126
|
-
protocol,
|
|
127
|
-
hostname,
|
|
128
|
-
port,
|
|
129
|
-
method: "PUT",
|
|
130
|
-
headers,
|
|
131
|
-
path: resolvedPath,
|
|
132
|
-
body,
|
|
133
|
-
});
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
export const serializeAws_restJson1CreateChannelCommand = async (
|
|
137
|
-
input: CreateChannelCommandInput,
|
|
138
|
-
context: __SerdeContext
|
|
139
|
-
): Promise<__HttpRequest> => {
|
|
140
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
141
|
-
const headers: any = {
|
|
142
|
-
"content-type": "application/json",
|
|
143
|
-
};
|
|
144
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
|
|
145
|
-
let body: any;
|
|
146
|
-
body = JSON.stringify({
|
|
147
|
-
...(input.Description !== undefined && input.Description !== null && { description: input.Description }),
|
|
148
|
-
...(input.Id !== undefined && input.Id !== null && { id: input.Id }),
|
|
149
|
-
...(input.Tags !== undefined && input.Tags !== null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
|
|
150
|
-
});
|
|
151
|
-
return new __HttpRequest({
|
|
152
|
-
protocol,
|
|
153
|
-
hostname,
|
|
154
|
-
port,
|
|
155
|
-
method: "POST",
|
|
156
|
-
headers,
|
|
157
|
-
path: resolvedPath,
|
|
158
|
-
body,
|
|
159
|
-
});
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
export const serializeAws_restJson1CreateHarvestJobCommand = async (
|
|
163
|
-
input: CreateHarvestJobCommandInput,
|
|
164
|
-
context: __SerdeContext
|
|
165
|
-
): Promise<__HttpRequest> => {
|
|
166
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
167
|
-
const headers: any = {
|
|
168
|
-
"content-type": "application/json",
|
|
169
|
-
};
|
|
170
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/harvest_jobs";
|
|
171
|
-
let body: any;
|
|
172
|
-
body = JSON.stringify({
|
|
173
|
-
...(input.EndTime !== undefined && input.EndTime !== null && { endTime: input.EndTime }),
|
|
174
|
-
...(input.Id !== undefined && input.Id !== null && { id: input.Id }),
|
|
175
|
-
...(input.OriginEndpointId !== undefined &&
|
|
176
|
-
input.OriginEndpointId !== null && { originEndpointId: input.OriginEndpointId }),
|
|
177
|
-
...(input.S3Destination !== undefined &&
|
|
178
|
-
input.S3Destination !== null && {
|
|
179
|
-
s3Destination: serializeAws_restJson1S3Destination(input.S3Destination, context),
|
|
180
|
-
}),
|
|
181
|
-
...(input.StartTime !== undefined && input.StartTime !== null && { startTime: input.StartTime }),
|
|
182
|
-
});
|
|
183
|
-
return new __HttpRequest({
|
|
184
|
-
protocol,
|
|
185
|
-
hostname,
|
|
186
|
-
port,
|
|
187
|
-
method: "POST",
|
|
188
|
-
headers,
|
|
189
|
-
path: resolvedPath,
|
|
190
|
-
body,
|
|
191
|
-
});
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
export const serializeAws_restJson1CreateOriginEndpointCommand = async (
|
|
195
|
-
input: CreateOriginEndpointCommandInput,
|
|
196
|
-
context: __SerdeContext
|
|
197
|
-
): Promise<__HttpRequest> => {
|
|
198
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
199
|
-
const headers: any = {
|
|
200
|
-
"content-type": "application/json",
|
|
201
|
-
};
|
|
202
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/origin_endpoints";
|
|
203
|
-
let body: any;
|
|
204
|
-
body = JSON.stringify({
|
|
205
|
-
...(input.Authorization !== undefined &&
|
|
206
|
-
input.Authorization !== null && {
|
|
207
|
-
authorization: serializeAws_restJson1Authorization(input.Authorization, context),
|
|
208
|
-
}),
|
|
209
|
-
...(input.ChannelId !== undefined && input.ChannelId !== null && { channelId: input.ChannelId }),
|
|
210
|
-
...(input.CmafPackage !== undefined &&
|
|
211
|
-
input.CmafPackage !== null && {
|
|
212
|
-
cmafPackage: serializeAws_restJson1CmafPackageCreateOrUpdateParameters(input.CmafPackage, context),
|
|
213
|
-
}),
|
|
214
|
-
...(input.DashPackage !== undefined &&
|
|
215
|
-
input.DashPackage !== null && { dashPackage: serializeAws_restJson1DashPackage(input.DashPackage, context) }),
|
|
216
|
-
...(input.Description !== undefined && input.Description !== null && { description: input.Description }),
|
|
217
|
-
...(input.HlsPackage !== undefined &&
|
|
218
|
-
input.HlsPackage !== null && { hlsPackage: serializeAws_restJson1HlsPackage(input.HlsPackage, context) }),
|
|
219
|
-
...(input.Id !== undefined && input.Id !== null && { id: input.Id }),
|
|
220
|
-
...(input.ManifestName !== undefined && input.ManifestName !== null && { manifestName: input.ManifestName }),
|
|
221
|
-
...(input.MssPackage !== undefined &&
|
|
222
|
-
input.MssPackage !== null && { mssPackage: serializeAws_restJson1MssPackage(input.MssPackage, context) }),
|
|
223
|
-
...(input.Origination !== undefined && input.Origination !== null && { origination: input.Origination }),
|
|
224
|
-
...(input.StartoverWindowSeconds !== undefined &&
|
|
225
|
-
input.StartoverWindowSeconds !== null && { startoverWindowSeconds: input.StartoverWindowSeconds }),
|
|
226
|
-
...(input.Tags !== undefined && input.Tags !== null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
|
|
227
|
-
...(input.TimeDelaySeconds !== undefined &&
|
|
228
|
-
input.TimeDelaySeconds !== null && { timeDelaySeconds: input.TimeDelaySeconds }),
|
|
229
|
-
...(input.Whitelist !== undefined &&
|
|
230
|
-
input.Whitelist !== null && { whitelist: serializeAws_restJson1__listOf__string(input.Whitelist, context) }),
|
|
231
|
-
});
|
|
232
|
-
return new __HttpRequest({
|
|
233
|
-
protocol,
|
|
234
|
-
hostname,
|
|
235
|
-
port,
|
|
236
|
-
method: "POST",
|
|
237
|
-
headers,
|
|
238
|
-
path: resolvedPath,
|
|
239
|
-
body,
|
|
240
|
-
});
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
export const serializeAws_restJson1DeleteChannelCommand = async (
|
|
244
|
-
input: DeleteChannelCommandInput,
|
|
245
|
-
context: __SerdeContext
|
|
246
|
-
): Promise<__HttpRequest> => {
|
|
247
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
248
|
-
const headers: any = {};
|
|
249
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{Id}";
|
|
250
|
-
if (input.Id !== undefined) {
|
|
251
|
-
const labelValue: string = input.Id;
|
|
252
|
-
if (labelValue.length <= 0) {
|
|
253
|
-
throw new Error("Empty value provided for input HTTP label: Id.");
|
|
254
|
-
}
|
|
255
|
-
resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue));
|
|
256
|
-
} else {
|
|
257
|
-
throw new Error("No value provided for input HTTP label: Id.");
|
|
258
|
-
}
|
|
259
|
-
let body: any;
|
|
260
|
-
return new __HttpRequest({
|
|
261
|
-
protocol,
|
|
262
|
-
hostname,
|
|
263
|
-
port,
|
|
264
|
-
method: "DELETE",
|
|
265
|
-
headers,
|
|
266
|
-
path: resolvedPath,
|
|
267
|
-
body,
|
|
268
|
-
});
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
export const serializeAws_restJson1DeleteOriginEndpointCommand = async (
|
|
272
|
-
input: DeleteOriginEndpointCommandInput,
|
|
273
|
-
context: __SerdeContext
|
|
274
|
-
): Promise<__HttpRequest> => {
|
|
275
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
276
|
-
const headers: any = {};
|
|
277
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/origin_endpoints/{Id}";
|
|
278
|
-
if (input.Id !== undefined) {
|
|
279
|
-
const labelValue: string = input.Id;
|
|
280
|
-
if (labelValue.length <= 0) {
|
|
281
|
-
throw new Error("Empty value provided for input HTTP label: Id.");
|
|
282
|
-
}
|
|
283
|
-
resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue));
|
|
284
|
-
} else {
|
|
285
|
-
throw new Error("No value provided for input HTTP label: Id.");
|
|
286
|
-
}
|
|
287
|
-
let body: any;
|
|
288
|
-
return new __HttpRequest({
|
|
289
|
-
protocol,
|
|
290
|
-
hostname,
|
|
291
|
-
port,
|
|
292
|
-
method: "DELETE",
|
|
293
|
-
headers,
|
|
294
|
-
path: resolvedPath,
|
|
295
|
-
body,
|
|
296
|
-
});
|
|
297
|
-
};
|
|
298
|
-
|
|
299
|
-
export const serializeAws_restJson1DescribeChannelCommand = async (
|
|
300
|
-
input: DescribeChannelCommandInput,
|
|
301
|
-
context: __SerdeContext
|
|
302
|
-
): Promise<__HttpRequest> => {
|
|
303
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
304
|
-
const headers: any = {};
|
|
305
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{Id}";
|
|
306
|
-
if (input.Id !== undefined) {
|
|
307
|
-
const labelValue: string = input.Id;
|
|
308
|
-
if (labelValue.length <= 0) {
|
|
309
|
-
throw new Error("Empty value provided for input HTTP label: Id.");
|
|
310
|
-
}
|
|
311
|
-
resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue));
|
|
312
|
-
} else {
|
|
313
|
-
throw new Error("No value provided for input HTTP label: Id.");
|
|
314
|
-
}
|
|
315
|
-
let body: any;
|
|
316
|
-
return new __HttpRequest({
|
|
317
|
-
protocol,
|
|
318
|
-
hostname,
|
|
319
|
-
port,
|
|
320
|
-
method: "GET",
|
|
321
|
-
headers,
|
|
322
|
-
path: resolvedPath,
|
|
323
|
-
body,
|
|
324
|
-
});
|
|
325
|
-
};
|
|
326
|
-
|
|
327
|
-
export const serializeAws_restJson1DescribeHarvestJobCommand = async (
|
|
328
|
-
input: DescribeHarvestJobCommandInput,
|
|
329
|
-
context: __SerdeContext
|
|
330
|
-
): Promise<__HttpRequest> => {
|
|
331
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
332
|
-
const headers: any = {};
|
|
333
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/harvest_jobs/{Id}";
|
|
334
|
-
if (input.Id !== undefined) {
|
|
335
|
-
const labelValue: string = input.Id;
|
|
336
|
-
if (labelValue.length <= 0) {
|
|
337
|
-
throw new Error("Empty value provided for input HTTP label: Id.");
|
|
338
|
-
}
|
|
339
|
-
resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue));
|
|
340
|
-
} else {
|
|
341
|
-
throw new Error("No value provided for input HTTP label: Id.");
|
|
342
|
-
}
|
|
343
|
-
let body: any;
|
|
344
|
-
return new __HttpRequest({
|
|
345
|
-
protocol,
|
|
346
|
-
hostname,
|
|
347
|
-
port,
|
|
348
|
-
method: "GET",
|
|
349
|
-
headers,
|
|
350
|
-
path: resolvedPath,
|
|
351
|
-
body,
|
|
352
|
-
});
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
export const serializeAws_restJson1DescribeOriginEndpointCommand = async (
|
|
356
|
-
input: DescribeOriginEndpointCommandInput,
|
|
357
|
-
context: __SerdeContext
|
|
358
|
-
): Promise<__HttpRequest> => {
|
|
359
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
360
|
-
const headers: any = {};
|
|
361
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/origin_endpoints/{Id}";
|
|
362
|
-
if (input.Id !== undefined) {
|
|
363
|
-
const labelValue: string = input.Id;
|
|
364
|
-
if (labelValue.length <= 0) {
|
|
365
|
-
throw new Error("Empty value provided for input HTTP label: Id.");
|
|
366
|
-
}
|
|
367
|
-
resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue));
|
|
368
|
-
} else {
|
|
369
|
-
throw new Error("No value provided for input HTTP label: Id.");
|
|
370
|
-
}
|
|
371
|
-
let body: any;
|
|
372
|
-
return new __HttpRequest({
|
|
373
|
-
protocol,
|
|
374
|
-
hostname,
|
|
375
|
-
port,
|
|
376
|
-
method: "GET",
|
|
377
|
-
headers,
|
|
378
|
-
path: resolvedPath,
|
|
379
|
-
body,
|
|
380
|
-
});
|
|
381
|
-
};
|
|
382
|
-
|
|
383
|
-
export const serializeAws_restJson1ListChannelsCommand = async (
|
|
384
|
-
input: ListChannelsCommandInput,
|
|
385
|
-
context: __SerdeContext
|
|
386
|
-
): Promise<__HttpRequest> => {
|
|
387
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
388
|
-
const headers: any = {};
|
|
389
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
|
|
390
|
-
const query: any = {
|
|
391
|
-
...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
|
|
392
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
393
|
-
};
|
|
394
|
-
let body: any;
|
|
395
|
-
return new __HttpRequest({
|
|
396
|
-
protocol,
|
|
397
|
-
hostname,
|
|
398
|
-
port,
|
|
399
|
-
method: "GET",
|
|
400
|
-
headers,
|
|
401
|
-
path: resolvedPath,
|
|
402
|
-
query,
|
|
403
|
-
body,
|
|
404
|
-
});
|
|
405
|
-
};
|
|
406
|
-
|
|
407
|
-
export const serializeAws_restJson1ListHarvestJobsCommand = async (
|
|
408
|
-
input: ListHarvestJobsCommandInput,
|
|
409
|
-
context: __SerdeContext
|
|
410
|
-
): Promise<__HttpRequest> => {
|
|
411
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
412
|
-
const headers: any = {};
|
|
413
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/harvest_jobs";
|
|
414
|
-
const query: any = {
|
|
415
|
-
...(input.IncludeChannelId !== undefined && { includeChannelId: input.IncludeChannelId }),
|
|
416
|
-
...(input.IncludeStatus !== undefined && { includeStatus: input.IncludeStatus }),
|
|
417
|
-
...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
|
|
418
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
419
|
-
};
|
|
420
|
-
let body: any;
|
|
421
|
-
return new __HttpRequest({
|
|
422
|
-
protocol,
|
|
423
|
-
hostname,
|
|
424
|
-
port,
|
|
425
|
-
method: "GET",
|
|
426
|
-
headers,
|
|
427
|
-
path: resolvedPath,
|
|
428
|
-
query,
|
|
429
|
-
body,
|
|
430
|
-
});
|
|
431
|
-
};
|
|
432
|
-
|
|
433
|
-
export const serializeAws_restJson1ListOriginEndpointsCommand = async (
|
|
434
|
-
input: ListOriginEndpointsCommandInput,
|
|
435
|
-
context: __SerdeContext
|
|
436
|
-
): Promise<__HttpRequest> => {
|
|
437
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
438
|
-
const headers: any = {};
|
|
439
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/origin_endpoints";
|
|
440
|
-
const query: any = {
|
|
441
|
-
...(input.ChannelId !== undefined && { channelId: input.ChannelId }),
|
|
442
|
-
...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
|
|
443
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
444
|
-
};
|
|
445
|
-
let body: any;
|
|
446
|
-
return new __HttpRequest({
|
|
447
|
-
protocol,
|
|
448
|
-
hostname,
|
|
449
|
-
port,
|
|
450
|
-
method: "GET",
|
|
451
|
-
headers,
|
|
452
|
-
path: resolvedPath,
|
|
453
|
-
query,
|
|
454
|
-
body,
|
|
455
|
-
});
|
|
456
|
-
};
|
|
457
|
-
|
|
458
|
-
export const serializeAws_restJson1ListTagsForResourceCommand = async (
|
|
459
|
-
input: ListTagsForResourceCommandInput,
|
|
460
|
-
context: __SerdeContext
|
|
461
|
-
): Promise<__HttpRequest> => {
|
|
462
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
463
|
-
const headers: any = {};
|
|
464
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
465
|
-
if (input.ResourceArn !== undefined) {
|
|
466
|
-
const labelValue: string = input.ResourceArn;
|
|
467
|
-
if (labelValue.length <= 0) {
|
|
468
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
469
|
-
}
|
|
470
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
471
|
-
} else {
|
|
472
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
473
|
-
}
|
|
474
|
-
let body: any;
|
|
475
|
-
return new __HttpRequest({
|
|
476
|
-
protocol,
|
|
477
|
-
hostname,
|
|
478
|
-
port,
|
|
479
|
-
method: "GET",
|
|
480
|
-
headers,
|
|
481
|
-
path: resolvedPath,
|
|
482
|
-
body,
|
|
483
|
-
});
|
|
484
|
-
};
|
|
485
|
-
|
|
486
|
-
export const serializeAws_restJson1RotateChannelCredentialsCommand = async (
|
|
487
|
-
input: RotateChannelCredentialsCommandInput,
|
|
488
|
-
context: __SerdeContext
|
|
489
|
-
): Promise<__HttpRequest> => {
|
|
490
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
491
|
-
const headers: any = {};
|
|
492
|
-
let resolvedPath =
|
|
493
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{Id}/credentials";
|
|
494
|
-
if (input.Id !== undefined) {
|
|
495
|
-
const labelValue: string = input.Id;
|
|
496
|
-
if (labelValue.length <= 0) {
|
|
497
|
-
throw new Error("Empty value provided for input HTTP label: Id.");
|
|
498
|
-
}
|
|
499
|
-
resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue));
|
|
500
|
-
} else {
|
|
501
|
-
throw new Error("No value provided for input HTTP label: Id.");
|
|
502
|
-
}
|
|
503
|
-
let body: any;
|
|
504
|
-
return new __HttpRequest({
|
|
505
|
-
protocol,
|
|
506
|
-
hostname,
|
|
507
|
-
port,
|
|
508
|
-
method: "PUT",
|
|
509
|
-
headers,
|
|
510
|
-
path: resolvedPath,
|
|
511
|
-
body,
|
|
512
|
-
});
|
|
513
|
-
};
|
|
514
|
-
|
|
515
|
-
export const serializeAws_restJson1RotateIngestEndpointCredentialsCommand = async (
|
|
516
|
-
input: RotateIngestEndpointCredentialsCommandInput,
|
|
517
|
-
context: __SerdeContext
|
|
518
|
-
): Promise<__HttpRequest> => {
|
|
519
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
520
|
-
const headers: any = {};
|
|
521
|
-
let resolvedPath =
|
|
522
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
523
|
-
"/channels/{Id}/ingest_endpoints/{IngestEndpointId}/credentials";
|
|
524
|
-
if (input.Id !== undefined) {
|
|
525
|
-
const labelValue: string = input.Id;
|
|
526
|
-
if (labelValue.length <= 0) {
|
|
527
|
-
throw new Error("Empty value provided for input HTTP label: Id.");
|
|
528
|
-
}
|
|
529
|
-
resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue));
|
|
530
|
-
} else {
|
|
531
|
-
throw new Error("No value provided for input HTTP label: Id.");
|
|
532
|
-
}
|
|
533
|
-
if (input.IngestEndpointId !== undefined) {
|
|
534
|
-
const labelValue: string = input.IngestEndpointId;
|
|
535
|
-
if (labelValue.length <= 0) {
|
|
536
|
-
throw new Error("Empty value provided for input HTTP label: IngestEndpointId.");
|
|
537
|
-
}
|
|
538
|
-
resolvedPath = resolvedPath.replace("{IngestEndpointId}", __extendedEncodeURIComponent(labelValue));
|
|
539
|
-
} else {
|
|
540
|
-
throw new Error("No value provided for input HTTP label: IngestEndpointId.");
|
|
541
|
-
}
|
|
542
|
-
let body: any;
|
|
543
|
-
return new __HttpRequest({
|
|
544
|
-
protocol,
|
|
545
|
-
hostname,
|
|
546
|
-
port,
|
|
547
|
-
method: "PUT",
|
|
548
|
-
headers,
|
|
549
|
-
path: resolvedPath,
|
|
550
|
-
body,
|
|
551
|
-
});
|
|
552
|
-
};
|
|
553
|
-
|
|
554
|
-
export const serializeAws_restJson1TagResourceCommand = async (
|
|
555
|
-
input: TagResourceCommandInput,
|
|
556
|
-
context: __SerdeContext
|
|
557
|
-
): Promise<__HttpRequest> => {
|
|
558
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
559
|
-
const headers: any = {
|
|
560
|
-
"content-type": "application/json",
|
|
561
|
-
};
|
|
562
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
563
|
-
if (input.ResourceArn !== undefined) {
|
|
564
|
-
const labelValue: string = input.ResourceArn;
|
|
565
|
-
if (labelValue.length <= 0) {
|
|
566
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
567
|
-
}
|
|
568
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
569
|
-
} else {
|
|
570
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
571
|
-
}
|
|
572
|
-
let body: any;
|
|
573
|
-
body = JSON.stringify({
|
|
574
|
-
...(input.Tags !== undefined &&
|
|
575
|
-
input.Tags !== null && { tags: serializeAws_restJson1__mapOf__string(input.Tags, context) }),
|
|
576
|
-
});
|
|
577
|
-
return new __HttpRequest({
|
|
578
|
-
protocol,
|
|
579
|
-
hostname,
|
|
580
|
-
port,
|
|
581
|
-
method: "POST",
|
|
582
|
-
headers,
|
|
583
|
-
path: resolvedPath,
|
|
584
|
-
body,
|
|
585
|
-
});
|
|
586
|
-
};
|
|
587
|
-
|
|
588
|
-
export const serializeAws_restJson1UntagResourceCommand = async (
|
|
589
|
-
input: UntagResourceCommandInput,
|
|
590
|
-
context: __SerdeContext
|
|
591
|
-
): Promise<__HttpRequest> => {
|
|
592
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
593
|
-
const headers: any = {};
|
|
594
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
595
|
-
if (input.ResourceArn !== undefined) {
|
|
596
|
-
const labelValue: string = input.ResourceArn;
|
|
597
|
-
if (labelValue.length <= 0) {
|
|
598
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
599
|
-
}
|
|
600
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
601
|
-
} else {
|
|
602
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
603
|
-
}
|
|
604
|
-
const query: any = {
|
|
605
|
-
...(input.TagKeys !== undefined && { tagKeys: (input.TagKeys || []).map((_entry) => _entry as any) }),
|
|
606
|
-
};
|
|
607
|
-
let body: any;
|
|
608
|
-
return new __HttpRequest({
|
|
609
|
-
protocol,
|
|
610
|
-
hostname,
|
|
611
|
-
port,
|
|
612
|
-
method: "DELETE",
|
|
613
|
-
headers,
|
|
614
|
-
path: resolvedPath,
|
|
615
|
-
query,
|
|
616
|
-
body,
|
|
617
|
-
});
|
|
618
|
-
};
|
|
619
|
-
|
|
620
|
-
export const serializeAws_restJson1UpdateChannelCommand = async (
|
|
621
|
-
input: UpdateChannelCommandInput,
|
|
622
|
-
context: __SerdeContext
|
|
623
|
-
): Promise<__HttpRequest> => {
|
|
624
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
625
|
-
const headers: any = {
|
|
626
|
-
"content-type": "application/json",
|
|
627
|
-
};
|
|
628
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{Id}";
|
|
629
|
-
if (input.Id !== undefined) {
|
|
630
|
-
const labelValue: string = input.Id;
|
|
631
|
-
if (labelValue.length <= 0) {
|
|
632
|
-
throw new Error("Empty value provided for input HTTP label: Id.");
|
|
633
|
-
}
|
|
634
|
-
resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue));
|
|
635
|
-
} else {
|
|
636
|
-
throw new Error("No value provided for input HTTP label: Id.");
|
|
637
|
-
}
|
|
638
|
-
let body: any;
|
|
639
|
-
body = JSON.stringify({
|
|
640
|
-
...(input.Description !== undefined && input.Description !== null && { description: input.Description }),
|
|
641
|
-
});
|
|
642
|
-
return new __HttpRequest({
|
|
643
|
-
protocol,
|
|
644
|
-
hostname,
|
|
645
|
-
port,
|
|
646
|
-
method: "PUT",
|
|
647
|
-
headers,
|
|
648
|
-
path: resolvedPath,
|
|
649
|
-
body,
|
|
650
|
-
});
|
|
651
|
-
};
|
|
652
|
-
|
|
653
|
-
export const serializeAws_restJson1UpdateOriginEndpointCommand = async (
|
|
654
|
-
input: UpdateOriginEndpointCommandInput,
|
|
655
|
-
context: __SerdeContext
|
|
656
|
-
): Promise<__HttpRequest> => {
|
|
657
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
658
|
-
const headers: any = {
|
|
659
|
-
"content-type": "application/json",
|
|
660
|
-
};
|
|
661
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/origin_endpoints/{Id}";
|
|
662
|
-
if (input.Id !== undefined) {
|
|
663
|
-
const labelValue: string = input.Id;
|
|
664
|
-
if (labelValue.length <= 0) {
|
|
665
|
-
throw new Error("Empty value provided for input HTTP label: Id.");
|
|
666
|
-
}
|
|
667
|
-
resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue));
|
|
668
|
-
} else {
|
|
669
|
-
throw new Error("No value provided for input HTTP label: Id.");
|
|
670
|
-
}
|
|
671
|
-
let body: any;
|
|
672
|
-
body = JSON.stringify({
|
|
673
|
-
...(input.Authorization !== undefined &&
|
|
674
|
-
input.Authorization !== null && {
|
|
675
|
-
authorization: serializeAws_restJson1Authorization(input.Authorization, context),
|
|
676
|
-
}),
|
|
677
|
-
...(input.CmafPackage !== undefined &&
|
|
678
|
-
input.CmafPackage !== null && {
|
|
679
|
-
cmafPackage: serializeAws_restJson1CmafPackageCreateOrUpdateParameters(input.CmafPackage, context),
|
|
680
|
-
}),
|
|
681
|
-
...(input.DashPackage !== undefined &&
|
|
682
|
-
input.DashPackage !== null && { dashPackage: serializeAws_restJson1DashPackage(input.DashPackage, context) }),
|
|
683
|
-
...(input.Description !== undefined && input.Description !== null && { description: input.Description }),
|
|
684
|
-
...(input.HlsPackage !== undefined &&
|
|
685
|
-
input.HlsPackage !== null && { hlsPackage: serializeAws_restJson1HlsPackage(input.HlsPackage, context) }),
|
|
686
|
-
...(input.ManifestName !== undefined && input.ManifestName !== null && { manifestName: input.ManifestName }),
|
|
687
|
-
...(input.MssPackage !== undefined &&
|
|
688
|
-
input.MssPackage !== null && { mssPackage: serializeAws_restJson1MssPackage(input.MssPackage, context) }),
|
|
689
|
-
...(input.Origination !== undefined && input.Origination !== null && { origination: input.Origination }),
|
|
690
|
-
...(input.StartoverWindowSeconds !== undefined &&
|
|
691
|
-
input.StartoverWindowSeconds !== null && { startoverWindowSeconds: input.StartoverWindowSeconds }),
|
|
692
|
-
...(input.TimeDelaySeconds !== undefined &&
|
|
693
|
-
input.TimeDelaySeconds !== null && { timeDelaySeconds: input.TimeDelaySeconds }),
|
|
694
|
-
...(input.Whitelist !== undefined &&
|
|
695
|
-
input.Whitelist !== null && { whitelist: serializeAws_restJson1__listOf__string(input.Whitelist, context) }),
|
|
696
|
-
});
|
|
697
|
-
return new __HttpRequest({
|
|
698
|
-
protocol,
|
|
699
|
-
hostname,
|
|
700
|
-
port,
|
|
701
|
-
method: "PUT",
|
|
702
|
-
headers,
|
|
703
|
-
path: resolvedPath,
|
|
704
|
-
body,
|
|
705
|
-
});
|
|
706
|
-
};
|
|
707
|
-
|
|
708
|
-
export const deserializeAws_restJson1ConfigureLogsCommand = async (
|
|
709
|
-
output: __HttpResponse,
|
|
710
|
-
context: __SerdeContext
|
|
711
|
-
): Promise<ConfigureLogsCommandOutput> => {
|
|
712
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
713
|
-
return deserializeAws_restJson1ConfigureLogsCommandError(output, context);
|
|
714
|
-
}
|
|
715
|
-
const contents: ConfigureLogsCommandOutput = {
|
|
716
|
-
$metadata: deserializeMetadata(output),
|
|
717
|
-
Arn: undefined,
|
|
718
|
-
Description: undefined,
|
|
719
|
-
EgressAccessLogs: undefined,
|
|
720
|
-
HlsIngest: undefined,
|
|
721
|
-
Id: undefined,
|
|
722
|
-
IngressAccessLogs: undefined,
|
|
723
|
-
Tags: undefined,
|
|
724
|
-
};
|
|
725
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
726
|
-
if (data.arn !== undefined && data.arn !== null) {
|
|
727
|
-
contents.Arn = __expectString(data.arn);
|
|
728
|
-
}
|
|
729
|
-
if (data.description !== undefined && data.description !== null) {
|
|
730
|
-
contents.Description = __expectString(data.description);
|
|
731
|
-
}
|
|
732
|
-
if (data.egressAccessLogs !== undefined && data.egressAccessLogs !== null) {
|
|
733
|
-
contents.EgressAccessLogs = deserializeAws_restJson1EgressAccessLogs(data.egressAccessLogs, context);
|
|
734
|
-
}
|
|
735
|
-
if (data.hlsIngest !== undefined && data.hlsIngest !== null) {
|
|
736
|
-
contents.HlsIngest = deserializeAws_restJson1HlsIngest(data.hlsIngest, context);
|
|
737
|
-
}
|
|
738
|
-
if (data.id !== undefined && data.id !== null) {
|
|
739
|
-
contents.Id = __expectString(data.id);
|
|
740
|
-
}
|
|
741
|
-
if (data.ingressAccessLogs !== undefined && data.ingressAccessLogs !== null) {
|
|
742
|
-
contents.IngressAccessLogs = deserializeAws_restJson1IngressAccessLogs(data.ingressAccessLogs, context);
|
|
743
|
-
}
|
|
744
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
745
|
-
contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
746
|
-
}
|
|
747
|
-
return Promise.resolve(contents);
|
|
748
|
-
};
|
|
749
|
-
|
|
750
|
-
const deserializeAws_restJson1ConfigureLogsCommandError = async (
|
|
751
|
-
output: __HttpResponse,
|
|
752
|
-
context: __SerdeContext
|
|
753
|
-
): Promise<ConfigureLogsCommandOutput> => {
|
|
754
|
-
const parsedOutput: any = {
|
|
755
|
-
...output,
|
|
756
|
-
body: await parseBody(output.body, context),
|
|
757
|
-
};
|
|
758
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
759
|
-
let errorCode = "UnknownError";
|
|
760
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
761
|
-
switch (errorCode) {
|
|
762
|
-
case "ForbiddenException":
|
|
763
|
-
case "com.amazonaws.mediapackage#ForbiddenException":
|
|
764
|
-
response = {
|
|
765
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
766
|
-
name: errorCode,
|
|
767
|
-
$metadata: deserializeMetadata(output),
|
|
768
|
-
};
|
|
769
|
-
break;
|
|
770
|
-
case "InternalServerErrorException":
|
|
771
|
-
case "com.amazonaws.mediapackage#InternalServerErrorException":
|
|
772
|
-
response = {
|
|
773
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
774
|
-
name: errorCode,
|
|
775
|
-
$metadata: deserializeMetadata(output),
|
|
776
|
-
};
|
|
777
|
-
break;
|
|
778
|
-
case "NotFoundException":
|
|
779
|
-
case "com.amazonaws.mediapackage#NotFoundException":
|
|
780
|
-
response = {
|
|
781
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
782
|
-
name: errorCode,
|
|
783
|
-
$metadata: deserializeMetadata(output),
|
|
784
|
-
};
|
|
785
|
-
break;
|
|
786
|
-
case "ServiceUnavailableException":
|
|
787
|
-
case "com.amazonaws.mediapackage#ServiceUnavailableException":
|
|
788
|
-
response = {
|
|
789
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
790
|
-
name: errorCode,
|
|
791
|
-
$metadata: deserializeMetadata(output),
|
|
792
|
-
};
|
|
793
|
-
break;
|
|
794
|
-
case "TooManyRequestsException":
|
|
795
|
-
case "com.amazonaws.mediapackage#TooManyRequestsException":
|
|
796
|
-
response = {
|
|
797
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
798
|
-
name: errorCode,
|
|
799
|
-
$metadata: deserializeMetadata(output),
|
|
800
|
-
};
|
|
801
|
-
break;
|
|
802
|
-
case "UnprocessableEntityException":
|
|
803
|
-
case "com.amazonaws.mediapackage#UnprocessableEntityException":
|
|
804
|
-
response = {
|
|
805
|
-
...(await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)),
|
|
806
|
-
name: errorCode,
|
|
807
|
-
$metadata: deserializeMetadata(output),
|
|
808
|
-
};
|
|
809
|
-
break;
|
|
810
|
-
default:
|
|
811
|
-
const parsedBody = parsedOutput.body;
|
|
812
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
813
|
-
response = {
|
|
814
|
-
...parsedBody,
|
|
815
|
-
name: `${errorCode}`,
|
|
816
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
817
|
-
$fault: "client",
|
|
818
|
-
$metadata: deserializeMetadata(output),
|
|
819
|
-
} as any;
|
|
820
|
-
}
|
|
821
|
-
const message = response.message || response.Message || errorCode;
|
|
822
|
-
response.message = message;
|
|
823
|
-
delete response.Message;
|
|
824
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
825
|
-
};
|
|
826
|
-
|
|
827
|
-
export const deserializeAws_restJson1CreateChannelCommand = async (
|
|
828
|
-
output: __HttpResponse,
|
|
829
|
-
context: __SerdeContext
|
|
830
|
-
): Promise<CreateChannelCommandOutput> => {
|
|
831
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
832
|
-
return deserializeAws_restJson1CreateChannelCommandError(output, context);
|
|
833
|
-
}
|
|
834
|
-
const contents: CreateChannelCommandOutput = {
|
|
835
|
-
$metadata: deserializeMetadata(output),
|
|
836
|
-
Arn: undefined,
|
|
837
|
-
Description: undefined,
|
|
838
|
-
EgressAccessLogs: undefined,
|
|
839
|
-
HlsIngest: undefined,
|
|
840
|
-
Id: undefined,
|
|
841
|
-
IngressAccessLogs: undefined,
|
|
842
|
-
Tags: undefined,
|
|
843
|
-
};
|
|
844
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
845
|
-
if (data.arn !== undefined && data.arn !== null) {
|
|
846
|
-
contents.Arn = __expectString(data.arn);
|
|
847
|
-
}
|
|
848
|
-
if (data.description !== undefined && data.description !== null) {
|
|
849
|
-
contents.Description = __expectString(data.description);
|
|
850
|
-
}
|
|
851
|
-
if (data.egressAccessLogs !== undefined && data.egressAccessLogs !== null) {
|
|
852
|
-
contents.EgressAccessLogs = deserializeAws_restJson1EgressAccessLogs(data.egressAccessLogs, context);
|
|
853
|
-
}
|
|
854
|
-
if (data.hlsIngest !== undefined && data.hlsIngest !== null) {
|
|
855
|
-
contents.HlsIngest = deserializeAws_restJson1HlsIngest(data.hlsIngest, context);
|
|
856
|
-
}
|
|
857
|
-
if (data.id !== undefined && data.id !== null) {
|
|
858
|
-
contents.Id = __expectString(data.id);
|
|
859
|
-
}
|
|
860
|
-
if (data.ingressAccessLogs !== undefined && data.ingressAccessLogs !== null) {
|
|
861
|
-
contents.IngressAccessLogs = deserializeAws_restJson1IngressAccessLogs(data.ingressAccessLogs, context);
|
|
862
|
-
}
|
|
863
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
864
|
-
contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
865
|
-
}
|
|
866
|
-
return Promise.resolve(contents);
|
|
867
|
-
};
|
|
868
|
-
|
|
869
|
-
const deserializeAws_restJson1CreateChannelCommandError = async (
|
|
870
|
-
output: __HttpResponse,
|
|
871
|
-
context: __SerdeContext
|
|
872
|
-
): Promise<CreateChannelCommandOutput> => {
|
|
873
|
-
const parsedOutput: any = {
|
|
874
|
-
...output,
|
|
875
|
-
body: await parseBody(output.body, context),
|
|
876
|
-
};
|
|
877
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
878
|
-
let errorCode = "UnknownError";
|
|
879
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
880
|
-
switch (errorCode) {
|
|
881
|
-
case "ForbiddenException":
|
|
882
|
-
case "com.amazonaws.mediapackage#ForbiddenException":
|
|
883
|
-
response = {
|
|
884
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
885
|
-
name: errorCode,
|
|
886
|
-
$metadata: deserializeMetadata(output),
|
|
887
|
-
};
|
|
888
|
-
break;
|
|
889
|
-
case "InternalServerErrorException":
|
|
890
|
-
case "com.amazonaws.mediapackage#InternalServerErrorException":
|
|
891
|
-
response = {
|
|
892
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
893
|
-
name: errorCode,
|
|
894
|
-
$metadata: deserializeMetadata(output),
|
|
895
|
-
};
|
|
896
|
-
break;
|
|
897
|
-
case "NotFoundException":
|
|
898
|
-
case "com.amazonaws.mediapackage#NotFoundException":
|
|
899
|
-
response = {
|
|
900
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
901
|
-
name: errorCode,
|
|
902
|
-
$metadata: deserializeMetadata(output),
|
|
903
|
-
};
|
|
904
|
-
break;
|
|
905
|
-
case "ServiceUnavailableException":
|
|
906
|
-
case "com.amazonaws.mediapackage#ServiceUnavailableException":
|
|
907
|
-
response = {
|
|
908
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
909
|
-
name: errorCode,
|
|
910
|
-
$metadata: deserializeMetadata(output),
|
|
911
|
-
};
|
|
912
|
-
break;
|
|
913
|
-
case "TooManyRequestsException":
|
|
914
|
-
case "com.amazonaws.mediapackage#TooManyRequestsException":
|
|
915
|
-
response = {
|
|
916
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
917
|
-
name: errorCode,
|
|
918
|
-
$metadata: deserializeMetadata(output),
|
|
919
|
-
};
|
|
920
|
-
break;
|
|
921
|
-
case "UnprocessableEntityException":
|
|
922
|
-
case "com.amazonaws.mediapackage#UnprocessableEntityException":
|
|
923
|
-
response = {
|
|
924
|
-
...(await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)),
|
|
925
|
-
name: errorCode,
|
|
926
|
-
$metadata: deserializeMetadata(output),
|
|
927
|
-
};
|
|
928
|
-
break;
|
|
929
|
-
default:
|
|
930
|
-
const parsedBody = parsedOutput.body;
|
|
931
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
932
|
-
response = {
|
|
933
|
-
...parsedBody,
|
|
934
|
-
name: `${errorCode}`,
|
|
935
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
936
|
-
$fault: "client",
|
|
937
|
-
$metadata: deserializeMetadata(output),
|
|
938
|
-
} as any;
|
|
939
|
-
}
|
|
940
|
-
const message = response.message || response.Message || errorCode;
|
|
941
|
-
response.message = message;
|
|
942
|
-
delete response.Message;
|
|
943
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
944
|
-
};
|
|
945
|
-
|
|
946
|
-
export const deserializeAws_restJson1CreateHarvestJobCommand = async (
|
|
947
|
-
output: __HttpResponse,
|
|
948
|
-
context: __SerdeContext
|
|
949
|
-
): Promise<CreateHarvestJobCommandOutput> => {
|
|
950
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
951
|
-
return deserializeAws_restJson1CreateHarvestJobCommandError(output, context);
|
|
952
|
-
}
|
|
953
|
-
const contents: CreateHarvestJobCommandOutput = {
|
|
954
|
-
$metadata: deserializeMetadata(output),
|
|
955
|
-
Arn: undefined,
|
|
956
|
-
ChannelId: undefined,
|
|
957
|
-
CreatedAt: undefined,
|
|
958
|
-
EndTime: undefined,
|
|
959
|
-
Id: undefined,
|
|
960
|
-
OriginEndpointId: undefined,
|
|
961
|
-
S3Destination: undefined,
|
|
962
|
-
StartTime: undefined,
|
|
963
|
-
Status: undefined,
|
|
964
|
-
};
|
|
965
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
966
|
-
if (data.arn !== undefined && data.arn !== null) {
|
|
967
|
-
contents.Arn = __expectString(data.arn);
|
|
968
|
-
}
|
|
969
|
-
if (data.channelId !== undefined && data.channelId !== null) {
|
|
970
|
-
contents.ChannelId = __expectString(data.channelId);
|
|
971
|
-
}
|
|
972
|
-
if (data.createdAt !== undefined && data.createdAt !== null) {
|
|
973
|
-
contents.CreatedAt = __expectString(data.createdAt);
|
|
974
|
-
}
|
|
975
|
-
if (data.endTime !== undefined && data.endTime !== null) {
|
|
976
|
-
contents.EndTime = __expectString(data.endTime);
|
|
977
|
-
}
|
|
978
|
-
if (data.id !== undefined && data.id !== null) {
|
|
979
|
-
contents.Id = __expectString(data.id);
|
|
980
|
-
}
|
|
981
|
-
if (data.originEndpointId !== undefined && data.originEndpointId !== null) {
|
|
982
|
-
contents.OriginEndpointId = __expectString(data.originEndpointId);
|
|
983
|
-
}
|
|
984
|
-
if (data.s3Destination !== undefined && data.s3Destination !== null) {
|
|
985
|
-
contents.S3Destination = deserializeAws_restJson1S3Destination(data.s3Destination, context);
|
|
986
|
-
}
|
|
987
|
-
if (data.startTime !== undefined && data.startTime !== null) {
|
|
988
|
-
contents.StartTime = __expectString(data.startTime);
|
|
989
|
-
}
|
|
990
|
-
if (data.status !== undefined && data.status !== null) {
|
|
991
|
-
contents.Status = __expectString(data.status);
|
|
992
|
-
}
|
|
993
|
-
return Promise.resolve(contents);
|
|
994
|
-
};
|
|
995
|
-
|
|
996
|
-
const deserializeAws_restJson1CreateHarvestJobCommandError = async (
|
|
997
|
-
output: __HttpResponse,
|
|
998
|
-
context: __SerdeContext
|
|
999
|
-
): Promise<CreateHarvestJobCommandOutput> => {
|
|
1000
|
-
const parsedOutput: any = {
|
|
1001
|
-
...output,
|
|
1002
|
-
body: await parseBody(output.body, context),
|
|
1003
|
-
};
|
|
1004
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1005
|
-
let errorCode = "UnknownError";
|
|
1006
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1007
|
-
switch (errorCode) {
|
|
1008
|
-
case "ForbiddenException":
|
|
1009
|
-
case "com.amazonaws.mediapackage#ForbiddenException":
|
|
1010
|
-
response = {
|
|
1011
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1012
|
-
name: errorCode,
|
|
1013
|
-
$metadata: deserializeMetadata(output),
|
|
1014
|
-
};
|
|
1015
|
-
break;
|
|
1016
|
-
case "InternalServerErrorException":
|
|
1017
|
-
case "com.amazonaws.mediapackage#InternalServerErrorException":
|
|
1018
|
-
response = {
|
|
1019
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1020
|
-
name: errorCode,
|
|
1021
|
-
$metadata: deserializeMetadata(output),
|
|
1022
|
-
};
|
|
1023
|
-
break;
|
|
1024
|
-
case "NotFoundException":
|
|
1025
|
-
case "com.amazonaws.mediapackage#NotFoundException":
|
|
1026
|
-
response = {
|
|
1027
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1028
|
-
name: errorCode,
|
|
1029
|
-
$metadata: deserializeMetadata(output),
|
|
1030
|
-
};
|
|
1031
|
-
break;
|
|
1032
|
-
case "ServiceUnavailableException":
|
|
1033
|
-
case "com.amazonaws.mediapackage#ServiceUnavailableException":
|
|
1034
|
-
response = {
|
|
1035
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1036
|
-
name: errorCode,
|
|
1037
|
-
$metadata: deserializeMetadata(output),
|
|
1038
|
-
};
|
|
1039
|
-
break;
|
|
1040
|
-
case "TooManyRequestsException":
|
|
1041
|
-
case "com.amazonaws.mediapackage#TooManyRequestsException":
|
|
1042
|
-
response = {
|
|
1043
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1044
|
-
name: errorCode,
|
|
1045
|
-
$metadata: deserializeMetadata(output),
|
|
1046
|
-
};
|
|
1047
|
-
break;
|
|
1048
|
-
case "UnprocessableEntityException":
|
|
1049
|
-
case "com.amazonaws.mediapackage#UnprocessableEntityException":
|
|
1050
|
-
response = {
|
|
1051
|
-
...(await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)),
|
|
1052
|
-
name: errorCode,
|
|
1053
|
-
$metadata: deserializeMetadata(output),
|
|
1054
|
-
};
|
|
1055
|
-
break;
|
|
1056
|
-
default:
|
|
1057
|
-
const parsedBody = parsedOutput.body;
|
|
1058
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1059
|
-
response = {
|
|
1060
|
-
...parsedBody,
|
|
1061
|
-
name: `${errorCode}`,
|
|
1062
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1063
|
-
$fault: "client",
|
|
1064
|
-
$metadata: deserializeMetadata(output),
|
|
1065
|
-
} as any;
|
|
1066
|
-
}
|
|
1067
|
-
const message = response.message || response.Message || errorCode;
|
|
1068
|
-
response.message = message;
|
|
1069
|
-
delete response.Message;
|
|
1070
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1071
|
-
};
|
|
1072
|
-
|
|
1073
|
-
export const deserializeAws_restJson1CreateOriginEndpointCommand = async (
|
|
1074
|
-
output: __HttpResponse,
|
|
1075
|
-
context: __SerdeContext
|
|
1076
|
-
): Promise<CreateOriginEndpointCommandOutput> => {
|
|
1077
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1078
|
-
return deserializeAws_restJson1CreateOriginEndpointCommandError(output, context);
|
|
1079
|
-
}
|
|
1080
|
-
const contents: CreateOriginEndpointCommandOutput = {
|
|
1081
|
-
$metadata: deserializeMetadata(output),
|
|
1082
|
-
Arn: undefined,
|
|
1083
|
-
Authorization: undefined,
|
|
1084
|
-
ChannelId: undefined,
|
|
1085
|
-
CmafPackage: undefined,
|
|
1086
|
-
DashPackage: undefined,
|
|
1087
|
-
Description: undefined,
|
|
1088
|
-
HlsPackage: undefined,
|
|
1089
|
-
Id: undefined,
|
|
1090
|
-
ManifestName: undefined,
|
|
1091
|
-
MssPackage: undefined,
|
|
1092
|
-
Origination: undefined,
|
|
1093
|
-
StartoverWindowSeconds: undefined,
|
|
1094
|
-
Tags: undefined,
|
|
1095
|
-
TimeDelaySeconds: undefined,
|
|
1096
|
-
Url: undefined,
|
|
1097
|
-
Whitelist: undefined,
|
|
1098
|
-
};
|
|
1099
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1100
|
-
if (data.arn !== undefined && data.arn !== null) {
|
|
1101
|
-
contents.Arn = __expectString(data.arn);
|
|
1102
|
-
}
|
|
1103
|
-
if (data.authorization !== undefined && data.authorization !== null) {
|
|
1104
|
-
contents.Authorization = deserializeAws_restJson1Authorization(data.authorization, context);
|
|
1105
|
-
}
|
|
1106
|
-
if (data.channelId !== undefined && data.channelId !== null) {
|
|
1107
|
-
contents.ChannelId = __expectString(data.channelId);
|
|
1108
|
-
}
|
|
1109
|
-
if (data.cmafPackage !== undefined && data.cmafPackage !== null) {
|
|
1110
|
-
contents.CmafPackage = deserializeAws_restJson1CmafPackage(data.cmafPackage, context);
|
|
1111
|
-
}
|
|
1112
|
-
if (data.dashPackage !== undefined && data.dashPackage !== null) {
|
|
1113
|
-
contents.DashPackage = deserializeAws_restJson1DashPackage(data.dashPackage, context);
|
|
1114
|
-
}
|
|
1115
|
-
if (data.description !== undefined && data.description !== null) {
|
|
1116
|
-
contents.Description = __expectString(data.description);
|
|
1117
|
-
}
|
|
1118
|
-
if (data.hlsPackage !== undefined && data.hlsPackage !== null) {
|
|
1119
|
-
contents.HlsPackage = deserializeAws_restJson1HlsPackage(data.hlsPackage, context);
|
|
1120
|
-
}
|
|
1121
|
-
if (data.id !== undefined && data.id !== null) {
|
|
1122
|
-
contents.Id = __expectString(data.id);
|
|
1123
|
-
}
|
|
1124
|
-
if (data.manifestName !== undefined && data.manifestName !== null) {
|
|
1125
|
-
contents.ManifestName = __expectString(data.manifestName);
|
|
1126
|
-
}
|
|
1127
|
-
if (data.mssPackage !== undefined && data.mssPackage !== null) {
|
|
1128
|
-
contents.MssPackage = deserializeAws_restJson1MssPackage(data.mssPackage, context);
|
|
1129
|
-
}
|
|
1130
|
-
if (data.origination !== undefined && data.origination !== null) {
|
|
1131
|
-
contents.Origination = __expectString(data.origination);
|
|
1132
|
-
}
|
|
1133
|
-
if (data.startoverWindowSeconds !== undefined && data.startoverWindowSeconds !== null) {
|
|
1134
|
-
contents.StartoverWindowSeconds = __expectInt32(data.startoverWindowSeconds);
|
|
1135
|
-
}
|
|
1136
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
1137
|
-
contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
1138
|
-
}
|
|
1139
|
-
if (data.timeDelaySeconds !== undefined && data.timeDelaySeconds !== null) {
|
|
1140
|
-
contents.TimeDelaySeconds = __expectInt32(data.timeDelaySeconds);
|
|
1141
|
-
}
|
|
1142
|
-
if (data.url !== undefined && data.url !== null) {
|
|
1143
|
-
contents.Url = __expectString(data.url);
|
|
1144
|
-
}
|
|
1145
|
-
if (data.whitelist !== undefined && data.whitelist !== null) {
|
|
1146
|
-
contents.Whitelist = deserializeAws_restJson1__listOf__string(data.whitelist, context);
|
|
1147
|
-
}
|
|
1148
|
-
return Promise.resolve(contents);
|
|
1149
|
-
};
|
|
1150
|
-
|
|
1151
|
-
const deserializeAws_restJson1CreateOriginEndpointCommandError = async (
|
|
1152
|
-
output: __HttpResponse,
|
|
1153
|
-
context: __SerdeContext
|
|
1154
|
-
): Promise<CreateOriginEndpointCommandOutput> => {
|
|
1155
|
-
const parsedOutput: any = {
|
|
1156
|
-
...output,
|
|
1157
|
-
body: await parseBody(output.body, context),
|
|
1158
|
-
};
|
|
1159
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1160
|
-
let errorCode = "UnknownError";
|
|
1161
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1162
|
-
switch (errorCode) {
|
|
1163
|
-
case "ForbiddenException":
|
|
1164
|
-
case "com.amazonaws.mediapackage#ForbiddenException":
|
|
1165
|
-
response = {
|
|
1166
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1167
|
-
name: errorCode,
|
|
1168
|
-
$metadata: deserializeMetadata(output),
|
|
1169
|
-
};
|
|
1170
|
-
break;
|
|
1171
|
-
case "InternalServerErrorException":
|
|
1172
|
-
case "com.amazonaws.mediapackage#InternalServerErrorException":
|
|
1173
|
-
response = {
|
|
1174
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1175
|
-
name: errorCode,
|
|
1176
|
-
$metadata: deserializeMetadata(output),
|
|
1177
|
-
};
|
|
1178
|
-
break;
|
|
1179
|
-
case "NotFoundException":
|
|
1180
|
-
case "com.amazonaws.mediapackage#NotFoundException":
|
|
1181
|
-
response = {
|
|
1182
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1183
|
-
name: errorCode,
|
|
1184
|
-
$metadata: deserializeMetadata(output),
|
|
1185
|
-
};
|
|
1186
|
-
break;
|
|
1187
|
-
case "ServiceUnavailableException":
|
|
1188
|
-
case "com.amazonaws.mediapackage#ServiceUnavailableException":
|
|
1189
|
-
response = {
|
|
1190
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1191
|
-
name: errorCode,
|
|
1192
|
-
$metadata: deserializeMetadata(output),
|
|
1193
|
-
};
|
|
1194
|
-
break;
|
|
1195
|
-
case "TooManyRequestsException":
|
|
1196
|
-
case "com.amazonaws.mediapackage#TooManyRequestsException":
|
|
1197
|
-
response = {
|
|
1198
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1199
|
-
name: errorCode,
|
|
1200
|
-
$metadata: deserializeMetadata(output),
|
|
1201
|
-
};
|
|
1202
|
-
break;
|
|
1203
|
-
case "UnprocessableEntityException":
|
|
1204
|
-
case "com.amazonaws.mediapackage#UnprocessableEntityException":
|
|
1205
|
-
response = {
|
|
1206
|
-
...(await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)),
|
|
1207
|
-
name: errorCode,
|
|
1208
|
-
$metadata: deserializeMetadata(output),
|
|
1209
|
-
};
|
|
1210
|
-
break;
|
|
1211
|
-
default:
|
|
1212
|
-
const parsedBody = parsedOutput.body;
|
|
1213
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1214
|
-
response = {
|
|
1215
|
-
...parsedBody,
|
|
1216
|
-
name: `${errorCode}`,
|
|
1217
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1218
|
-
$fault: "client",
|
|
1219
|
-
$metadata: deserializeMetadata(output),
|
|
1220
|
-
} as any;
|
|
1221
|
-
}
|
|
1222
|
-
const message = response.message || response.Message || errorCode;
|
|
1223
|
-
response.message = message;
|
|
1224
|
-
delete response.Message;
|
|
1225
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1226
|
-
};
|
|
1227
|
-
|
|
1228
|
-
export const deserializeAws_restJson1DeleteChannelCommand = async (
|
|
1229
|
-
output: __HttpResponse,
|
|
1230
|
-
context: __SerdeContext
|
|
1231
|
-
): Promise<DeleteChannelCommandOutput> => {
|
|
1232
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1233
|
-
return deserializeAws_restJson1DeleteChannelCommandError(output, context);
|
|
1234
|
-
}
|
|
1235
|
-
const contents: DeleteChannelCommandOutput = {
|
|
1236
|
-
$metadata: deserializeMetadata(output),
|
|
1237
|
-
};
|
|
1238
|
-
await collectBody(output.body, context);
|
|
1239
|
-
return Promise.resolve(contents);
|
|
1240
|
-
};
|
|
1241
|
-
|
|
1242
|
-
const deserializeAws_restJson1DeleteChannelCommandError = async (
|
|
1243
|
-
output: __HttpResponse,
|
|
1244
|
-
context: __SerdeContext
|
|
1245
|
-
): Promise<DeleteChannelCommandOutput> => {
|
|
1246
|
-
const parsedOutput: any = {
|
|
1247
|
-
...output,
|
|
1248
|
-
body: await parseBody(output.body, context),
|
|
1249
|
-
};
|
|
1250
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1251
|
-
let errorCode = "UnknownError";
|
|
1252
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1253
|
-
switch (errorCode) {
|
|
1254
|
-
case "ForbiddenException":
|
|
1255
|
-
case "com.amazonaws.mediapackage#ForbiddenException":
|
|
1256
|
-
response = {
|
|
1257
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1258
|
-
name: errorCode,
|
|
1259
|
-
$metadata: deserializeMetadata(output),
|
|
1260
|
-
};
|
|
1261
|
-
break;
|
|
1262
|
-
case "InternalServerErrorException":
|
|
1263
|
-
case "com.amazonaws.mediapackage#InternalServerErrorException":
|
|
1264
|
-
response = {
|
|
1265
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1266
|
-
name: errorCode,
|
|
1267
|
-
$metadata: deserializeMetadata(output),
|
|
1268
|
-
};
|
|
1269
|
-
break;
|
|
1270
|
-
case "NotFoundException":
|
|
1271
|
-
case "com.amazonaws.mediapackage#NotFoundException":
|
|
1272
|
-
response = {
|
|
1273
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1274
|
-
name: errorCode,
|
|
1275
|
-
$metadata: deserializeMetadata(output),
|
|
1276
|
-
};
|
|
1277
|
-
break;
|
|
1278
|
-
case "ServiceUnavailableException":
|
|
1279
|
-
case "com.amazonaws.mediapackage#ServiceUnavailableException":
|
|
1280
|
-
response = {
|
|
1281
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1282
|
-
name: errorCode,
|
|
1283
|
-
$metadata: deserializeMetadata(output),
|
|
1284
|
-
};
|
|
1285
|
-
break;
|
|
1286
|
-
case "TooManyRequestsException":
|
|
1287
|
-
case "com.amazonaws.mediapackage#TooManyRequestsException":
|
|
1288
|
-
response = {
|
|
1289
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1290
|
-
name: errorCode,
|
|
1291
|
-
$metadata: deserializeMetadata(output),
|
|
1292
|
-
};
|
|
1293
|
-
break;
|
|
1294
|
-
case "UnprocessableEntityException":
|
|
1295
|
-
case "com.amazonaws.mediapackage#UnprocessableEntityException":
|
|
1296
|
-
response = {
|
|
1297
|
-
...(await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)),
|
|
1298
|
-
name: errorCode,
|
|
1299
|
-
$metadata: deserializeMetadata(output),
|
|
1300
|
-
};
|
|
1301
|
-
break;
|
|
1302
|
-
default:
|
|
1303
|
-
const parsedBody = parsedOutput.body;
|
|
1304
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1305
|
-
response = {
|
|
1306
|
-
...parsedBody,
|
|
1307
|
-
name: `${errorCode}`,
|
|
1308
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1309
|
-
$fault: "client",
|
|
1310
|
-
$metadata: deserializeMetadata(output),
|
|
1311
|
-
} as any;
|
|
1312
|
-
}
|
|
1313
|
-
const message = response.message || response.Message || errorCode;
|
|
1314
|
-
response.message = message;
|
|
1315
|
-
delete response.Message;
|
|
1316
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1317
|
-
};
|
|
1318
|
-
|
|
1319
|
-
export const deserializeAws_restJson1DeleteOriginEndpointCommand = async (
|
|
1320
|
-
output: __HttpResponse,
|
|
1321
|
-
context: __SerdeContext
|
|
1322
|
-
): Promise<DeleteOriginEndpointCommandOutput> => {
|
|
1323
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1324
|
-
return deserializeAws_restJson1DeleteOriginEndpointCommandError(output, context);
|
|
1325
|
-
}
|
|
1326
|
-
const contents: DeleteOriginEndpointCommandOutput = {
|
|
1327
|
-
$metadata: deserializeMetadata(output),
|
|
1328
|
-
};
|
|
1329
|
-
await collectBody(output.body, context);
|
|
1330
|
-
return Promise.resolve(contents);
|
|
1331
|
-
};
|
|
1332
|
-
|
|
1333
|
-
const deserializeAws_restJson1DeleteOriginEndpointCommandError = async (
|
|
1334
|
-
output: __HttpResponse,
|
|
1335
|
-
context: __SerdeContext
|
|
1336
|
-
): Promise<DeleteOriginEndpointCommandOutput> => {
|
|
1337
|
-
const parsedOutput: any = {
|
|
1338
|
-
...output,
|
|
1339
|
-
body: await parseBody(output.body, context),
|
|
1340
|
-
};
|
|
1341
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1342
|
-
let errorCode = "UnknownError";
|
|
1343
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1344
|
-
switch (errorCode) {
|
|
1345
|
-
case "ForbiddenException":
|
|
1346
|
-
case "com.amazonaws.mediapackage#ForbiddenException":
|
|
1347
|
-
response = {
|
|
1348
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1349
|
-
name: errorCode,
|
|
1350
|
-
$metadata: deserializeMetadata(output),
|
|
1351
|
-
};
|
|
1352
|
-
break;
|
|
1353
|
-
case "InternalServerErrorException":
|
|
1354
|
-
case "com.amazonaws.mediapackage#InternalServerErrorException":
|
|
1355
|
-
response = {
|
|
1356
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1357
|
-
name: errorCode,
|
|
1358
|
-
$metadata: deserializeMetadata(output),
|
|
1359
|
-
};
|
|
1360
|
-
break;
|
|
1361
|
-
case "NotFoundException":
|
|
1362
|
-
case "com.amazonaws.mediapackage#NotFoundException":
|
|
1363
|
-
response = {
|
|
1364
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1365
|
-
name: errorCode,
|
|
1366
|
-
$metadata: deserializeMetadata(output),
|
|
1367
|
-
};
|
|
1368
|
-
break;
|
|
1369
|
-
case "ServiceUnavailableException":
|
|
1370
|
-
case "com.amazonaws.mediapackage#ServiceUnavailableException":
|
|
1371
|
-
response = {
|
|
1372
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1373
|
-
name: errorCode,
|
|
1374
|
-
$metadata: deserializeMetadata(output),
|
|
1375
|
-
};
|
|
1376
|
-
break;
|
|
1377
|
-
case "TooManyRequestsException":
|
|
1378
|
-
case "com.amazonaws.mediapackage#TooManyRequestsException":
|
|
1379
|
-
response = {
|
|
1380
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1381
|
-
name: errorCode,
|
|
1382
|
-
$metadata: deserializeMetadata(output),
|
|
1383
|
-
};
|
|
1384
|
-
break;
|
|
1385
|
-
case "UnprocessableEntityException":
|
|
1386
|
-
case "com.amazonaws.mediapackage#UnprocessableEntityException":
|
|
1387
|
-
response = {
|
|
1388
|
-
...(await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)),
|
|
1389
|
-
name: errorCode,
|
|
1390
|
-
$metadata: deserializeMetadata(output),
|
|
1391
|
-
};
|
|
1392
|
-
break;
|
|
1393
|
-
default:
|
|
1394
|
-
const parsedBody = parsedOutput.body;
|
|
1395
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1396
|
-
response = {
|
|
1397
|
-
...parsedBody,
|
|
1398
|
-
name: `${errorCode}`,
|
|
1399
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1400
|
-
$fault: "client",
|
|
1401
|
-
$metadata: deserializeMetadata(output),
|
|
1402
|
-
} as any;
|
|
1403
|
-
}
|
|
1404
|
-
const message = response.message || response.Message || errorCode;
|
|
1405
|
-
response.message = message;
|
|
1406
|
-
delete response.Message;
|
|
1407
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1408
|
-
};
|
|
1409
|
-
|
|
1410
|
-
export const deserializeAws_restJson1DescribeChannelCommand = async (
|
|
1411
|
-
output: __HttpResponse,
|
|
1412
|
-
context: __SerdeContext
|
|
1413
|
-
): Promise<DescribeChannelCommandOutput> => {
|
|
1414
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1415
|
-
return deserializeAws_restJson1DescribeChannelCommandError(output, context);
|
|
1416
|
-
}
|
|
1417
|
-
const contents: DescribeChannelCommandOutput = {
|
|
1418
|
-
$metadata: deserializeMetadata(output),
|
|
1419
|
-
Arn: undefined,
|
|
1420
|
-
Description: undefined,
|
|
1421
|
-
EgressAccessLogs: undefined,
|
|
1422
|
-
HlsIngest: undefined,
|
|
1423
|
-
Id: undefined,
|
|
1424
|
-
IngressAccessLogs: undefined,
|
|
1425
|
-
Tags: undefined,
|
|
1426
|
-
};
|
|
1427
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1428
|
-
if (data.arn !== undefined && data.arn !== null) {
|
|
1429
|
-
contents.Arn = __expectString(data.arn);
|
|
1430
|
-
}
|
|
1431
|
-
if (data.description !== undefined && data.description !== null) {
|
|
1432
|
-
contents.Description = __expectString(data.description);
|
|
1433
|
-
}
|
|
1434
|
-
if (data.egressAccessLogs !== undefined && data.egressAccessLogs !== null) {
|
|
1435
|
-
contents.EgressAccessLogs = deserializeAws_restJson1EgressAccessLogs(data.egressAccessLogs, context);
|
|
1436
|
-
}
|
|
1437
|
-
if (data.hlsIngest !== undefined && data.hlsIngest !== null) {
|
|
1438
|
-
contents.HlsIngest = deserializeAws_restJson1HlsIngest(data.hlsIngest, context);
|
|
1439
|
-
}
|
|
1440
|
-
if (data.id !== undefined && data.id !== null) {
|
|
1441
|
-
contents.Id = __expectString(data.id);
|
|
1442
|
-
}
|
|
1443
|
-
if (data.ingressAccessLogs !== undefined && data.ingressAccessLogs !== null) {
|
|
1444
|
-
contents.IngressAccessLogs = deserializeAws_restJson1IngressAccessLogs(data.ingressAccessLogs, context);
|
|
1445
|
-
}
|
|
1446
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
1447
|
-
contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
1448
|
-
}
|
|
1449
|
-
return Promise.resolve(contents);
|
|
1450
|
-
};
|
|
1451
|
-
|
|
1452
|
-
const deserializeAws_restJson1DescribeChannelCommandError = async (
|
|
1453
|
-
output: __HttpResponse,
|
|
1454
|
-
context: __SerdeContext
|
|
1455
|
-
): Promise<DescribeChannelCommandOutput> => {
|
|
1456
|
-
const parsedOutput: any = {
|
|
1457
|
-
...output,
|
|
1458
|
-
body: await parseBody(output.body, context),
|
|
1459
|
-
};
|
|
1460
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1461
|
-
let errorCode = "UnknownError";
|
|
1462
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1463
|
-
switch (errorCode) {
|
|
1464
|
-
case "ForbiddenException":
|
|
1465
|
-
case "com.amazonaws.mediapackage#ForbiddenException":
|
|
1466
|
-
response = {
|
|
1467
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1468
|
-
name: errorCode,
|
|
1469
|
-
$metadata: deserializeMetadata(output),
|
|
1470
|
-
};
|
|
1471
|
-
break;
|
|
1472
|
-
case "InternalServerErrorException":
|
|
1473
|
-
case "com.amazonaws.mediapackage#InternalServerErrorException":
|
|
1474
|
-
response = {
|
|
1475
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1476
|
-
name: errorCode,
|
|
1477
|
-
$metadata: deserializeMetadata(output),
|
|
1478
|
-
};
|
|
1479
|
-
break;
|
|
1480
|
-
case "NotFoundException":
|
|
1481
|
-
case "com.amazonaws.mediapackage#NotFoundException":
|
|
1482
|
-
response = {
|
|
1483
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1484
|
-
name: errorCode,
|
|
1485
|
-
$metadata: deserializeMetadata(output),
|
|
1486
|
-
};
|
|
1487
|
-
break;
|
|
1488
|
-
case "ServiceUnavailableException":
|
|
1489
|
-
case "com.amazonaws.mediapackage#ServiceUnavailableException":
|
|
1490
|
-
response = {
|
|
1491
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1492
|
-
name: errorCode,
|
|
1493
|
-
$metadata: deserializeMetadata(output),
|
|
1494
|
-
};
|
|
1495
|
-
break;
|
|
1496
|
-
case "TooManyRequestsException":
|
|
1497
|
-
case "com.amazonaws.mediapackage#TooManyRequestsException":
|
|
1498
|
-
response = {
|
|
1499
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1500
|
-
name: errorCode,
|
|
1501
|
-
$metadata: deserializeMetadata(output),
|
|
1502
|
-
};
|
|
1503
|
-
break;
|
|
1504
|
-
case "UnprocessableEntityException":
|
|
1505
|
-
case "com.amazonaws.mediapackage#UnprocessableEntityException":
|
|
1506
|
-
response = {
|
|
1507
|
-
...(await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)),
|
|
1508
|
-
name: errorCode,
|
|
1509
|
-
$metadata: deserializeMetadata(output),
|
|
1510
|
-
};
|
|
1511
|
-
break;
|
|
1512
|
-
default:
|
|
1513
|
-
const parsedBody = parsedOutput.body;
|
|
1514
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1515
|
-
response = {
|
|
1516
|
-
...parsedBody,
|
|
1517
|
-
name: `${errorCode}`,
|
|
1518
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1519
|
-
$fault: "client",
|
|
1520
|
-
$metadata: deserializeMetadata(output),
|
|
1521
|
-
} as any;
|
|
1522
|
-
}
|
|
1523
|
-
const message = response.message || response.Message || errorCode;
|
|
1524
|
-
response.message = message;
|
|
1525
|
-
delete response.Message;
|
|
1526
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1527
|
-
};
|
|
1528
|
-
|
|
1529
|
-
export const deserializeAws_restJson1DescribeHarvestJobCommand = async (
|
|
1530
|
-
output: __HttpResponse,
|
|
1531
|
-
context: __SerdeContext
|
|
1532
|
-
): Promise<DescribeHarvestJobCommandOutput> => {
|
|
1533
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1534
|
-
return deserializeAws_restJson1DescribeHarvestJobCommandError(output, context);
|
|
1535
|
-
}
|
|
1536
|
-
const contents: DescribeHarvestJobCommandOutput = {
|
|
1537
|
-
$metadata: deserializeMetadata(output),
|
|
1538
|
-
Arn: undefined,
|
|
1539
|
-
ChannelId: undefined,
|
|
1540
|
-
CreatedAt: undefined,
|
|
1541
|
-
EndTime: undefined,
|
|
1542
|
-
Id: undefined,
|
|
1543
|
-
OriginEndpointId: undefined,
|
|
1544
|
-
S3Destination: undefined,
|
|
1545
|
-
StartTime: undefined,
|
|
1546
|
-
Status: undefined,
|
|
1547
|
-
};
|
|
1548
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1549
|
-
if (data.arn !== undefined && data.arn !== null) {
|
|
1550
|
-
contents.Arn = __expectString(data.arn);
|
|
1551
|
-
}
|
|
1552
|
-
if (data.channelId !== undefined && data.channelId !== null) {
|
|
1553
|
-
contents.ChannelId = __expectString(data.channelId);
|
|
1554
|
-
}
|
|
1555
|
-
if (data.createdAt !== undefined && data.createdAt !== null) {
|
|
1556
|
-
contents.CreatedAt = __expectString(data.createdAt);
|
|
1557
|
-
}
|
|
1558
|
-
if (data.endTime !== undefined && data.endTime !== null) {
|
|
1559
|
-
contents.EndTime = __expectString(data.endTime);
|
|
1560
|
-
}
|
|
1561
|
-
if (data.id !== undefined && data.id !== null) {
|
|
1562
|
-
contents.Id = __expectString(data.id);
|
|
1563
|
-
}
|
|
1564
|
-
if (data.originEndpointId !== undefined && data.originEndpointId !== null) {
|
|
1565
|
-
contents.OriginEndpointId = __expectString(data.originEndpointId);
|
|
1566
|
-
}
|
|
1567
|
-
if (data.s3Destination !== undefined && data.s3Destination !== null) {
|
|
1568
|
-
contents.S3Destination = deserializeAws_restJson1S3Destination(data.s3Destination, context);
|
|
1569
|
-
}
|
|
1570
|
-
if (data.startTime !== undefined && data.startTime !== null) {
|
|
1571
|
-
contents.StartTime = __expectString(data.startTime);
|
|
1572
|
-
}
|
|
1573
|
-
if (data.status !== undefined && data.status !== null) {
|
|
1574
|
-
contents.Status = __expectString(data.status);
|
|
1575
|
-
}
|
|
1576
|
-
return Promise.resolve(contents);
|
|
1577
|
-
};
|
|
1578
|
-
|
|
1579
|
-
const deserializeAws_restJson1DescribeHarvestJobCommandError = async (
|
|
1580
|
-
output: __HttpResponse,
|
|
1581
|
-
context: __SerdeContext
|
|
1582
|
-
): Promise<DescribeHarvestJobCommandOutput> => {
|
|
1583
|
-
const parsedOutput: any = {
|
|
1584
|
-
...output,
|
|
1585
|
-
body: await parseBody(output.body, context),
|
|
1586
|
-
};
|
|
1587
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1588
|
-
let errorCode = "UnknownError";
|
|
1589
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1590
|
-
switch (errorCode) {
|
|
1591
|
-
case "ForbiddenException":
|
|
1592
|
-
case "com.amazonaws.mediapackage#ForbiddenException":
|
|
1593
|
-
response = {
|
|
1594
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1595
|
-
name: errorCode,
|
|
1596
|
-
$metadata: deserializeMetadata(output),
|
|
1597
|
-
};
|
|
1598
|
-
break;
|
|
1599
|
-
case "InternalServerErrorException":
|
|
1600
|
-
case "com.amazonaws.mediapackage#InternalServerErrorException":
|
|
1601
|
-
response = {
|
|
1602
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1603
|
-
name: errorCode,
|
|
1604
|
-
$metadata: deserializeMetadata(output),
|
|
1605
|
-
};
|
|
1606
|
-
break;
|
|
1607
|
-
case "NotFoundException":
|
|
1608
|
-
case "com.amazonaws.mediapackage#NotFoundException":
|
|
1609
|
-
response = {
|
|
1610
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1611
|
-
name: errorCode,
|
|
1612
|
-
$metadata: deserializeMetadata(output),
|
|
1613
|
-
};
|
|
1614
|
-
break;
|
|
1615
|
-
case "ServiceUnavailableException":
|
|
1616
|
-
case "com.amazonaws.mediapackage#ServiceUnavailableException":
|
|
1617
|
-
response = {
|
|
1618
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1619
|
-
name: errorCode,
|
|
1620
|
-
$metadata: deserializeMetadata(output),
|
|
1621
|
-
};
|
|
1622
|
-
break;
|
|
1623
|
-
case "TooManyRequestsException":
|
|
1624
|
-
case "com.amazonaws.mediapackage#TooManyRequestsException":
|
|
1625
|
-
response = {
|
|
1626
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1627
|
-
name: errorCode,
|
|
1628
|
-
$metadata: deserializeMetadata(output),
|
|
1629
|
-
};
|
|
1630
|
-
break;
|
|
1631
|
-
case "UnprocessableEntityException":
|
|
1632
|
-
case "com.amazonaws.mediapackage#UnprocessableEntityException":
|
|
1633
|
-
response = {
|
|
1634
|
-
...(await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)),
|
|
1635
|
-
name: errorCode,
|
|
1636
|
-
$metadata: deserializeMetadata(output),
|
|
1637
|
-
};
|
|
1638
|
-
break;
|
|
1639
|
-
default:
|
|
1640
|
-
const parsedBody = parsedOutput.body;
|
|
1641
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1642
|
-
response = {
|
|
1643
|
-
...parsedBody,
|
|
1644
|
-
name: `${errorCode}`,
|
|
1645
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1646
|
-
$fault: "client",
|
|
1647
|
-
$metadata: deserializeMetadata(output),
|
|
1648
|
-
} as any;
|
|
1649
|
-
}
|
|
1650
|
-
const message = response.message || response.Message || errorCode;
|
|
1651
|
-
response.message = message;
|
|
1652
|
-
delete response.Message;
|
|
1653
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1654
|
-
};
|
|
1655
|
-
|
|
1656
|
-
export const deserializeAws_restJson1DescribeOriginEndpointCommand = async (
|
|
1657
|
-
output: __HttpResponse,
|
|
1658
|
-
context: __SerdeContext
|
|
1659
|
-
): Promise<DescribeOriginEndpointCommandOutput> => {
|
|
1660
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1661
|
-
return deserializeAws_restJson1DescribeOriginEndpointCommandError(output, context);
|
|
1662
|
-
}
|
|
1663
|
-
const contents: DescribeOriginEndpointCommandOutput = {
|
|
1664
|
-
$metadata: deserializeMetadata(output),
|
|
1665
|
-
Arn: undefined,
|
|
1666
|
-
Authorization: undefined,
|
|
1667
|
-
ChannelId: undefined,
|
|
1668
|
-
CmafPackage: undefined,
|
|
1669
|
-
DashPackage: undefined,
|
|
1670
|
-
Description: undefined,
|
|
1671
|
-
HlsPackage: undefined,
|
|
1672
|
-
Id: undefined,
|
|
1673
|
-
ManifestName: undefined,
|
|
1674
|
-
MssPackage: undefined,
|
|
1675
|
-
Origination: undefined,
|
|
1676
|
-
StartoverWindowSeconds: undefined,
|
|
1677
|
-
Tags: undefined,
|
|
1678
|
-
TimeDelaySeconds: undefined,
|
|
1679
|
-
Url: undefined,
|
|
1680
|
-
Whitelist: undefined,
|
|
1681
|
-
};
|
|
1682
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1683
|
-
if (data.arn !== undefined && data.arn !== null) {
|
|
1684
|
-
contents.Arn = __expectString(data.arn);
|
|
1685
|
-
}
|
|
1686
|
-
if (data.authorization !== undefined && data.authorization !== null) {
|
|
1687
|
-
contents.Authorization = deserializeAws_restJson1Authorization(data.authorization, context);
|
|
1688
|
-
}
|
|
1689
|
-
if (data.channelId !== undefined && data.channelId !== null) {
|
|
1690
|
-
contents.ChannelId = __expectString(data.channelId);
|
|
1691
|
-
}
|
|
1692
|
-
if (data.cmafPackage !== undefined && data.cmafPackage !== null) {
|
|
1693
|
-
contents.CmafPackage = deserializeAws_restJson1CmafPackage(data.cmafPackage, context);
|
|
1694
|
-
}
|
|
1695
|
-
if (data.dashPackage !== undefined && data.dashPackage !== null) {
|
|
1696
|
-
contents.DashPackage = deserializeAws_restJson1DashPackage(data.dashPackage, context);
|
|
1697
|
-
}
|
|
1698
|
-
if (data.description !== undefined && data.description !== null) {
|
|
1699
|
-
contents.Description = __expectString(data.description);
|
|
1700
|
-
}
|
|
1701
|
-
if (data.hlsPackage !== undefined && data.hlsPackage !== null) {
|
|
1702
|
-
contents.HlsPackage = deserializeAws_restJson1HlsPackage(data.hlsPackage, context);
|
|
1703
|
-
}
|
|
1704
|
-
if (data.id !== undefined && data.id !== null) {
|
|
1705
|
-
contents.Id = __expectString(data.id);
|
|
1706
|
-
}
|
|
1707
|
-
if (data.manifestName !== undefined && data.manifestName !== null) {
|
|
1708
|
-
contents.ManifestName = __expectString(data.manifestName);
|
|
1709
|
-
}
|
|
1710
|
-
if (data.mssPackage !== undefined && data.mssPackage !== null) {
|
|
1711
|
-
contents.MssPackage = deserializeAws_restJson1MssPackage(data.mssPackage, context);
|
|
1712
|
-
}
|
|
1713
|
-
if (data.origination !== undefined && data.origination !== null) {
|
|
1714
|
-
contents.Origination = __expectString(data.origination);
|
|
1715
|
-
}
|
|
1716
|
-
if (data.startoverWindowSeconds !== undefined && data.startoverWindowSeconds !== null) {
|
|
1717
|
-
contents.StartoverWindowSeconds = __expectInt32(data.startoverWindowSeconds);
|
|
1718
|
-
}
|
|
1719
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
1720
|
-
contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
1721
|
-
}
|
|
1722
|
-
if (data.timeDelaySeconds !== undefined && data.timeDelaySeconds !== null) {
|
|
1723
|
-
contents.TimeDelaySeconds = __expectInt32(data.timeDelaySeconds);
|
|
1724
|
-
}
|
|
1725
|
-
if (data.url !== undefined && data.url !== null) {
|
|
1726
|
-
contents.Url = __expectString(data.url);
|
|
1727
|
-
}
|
|
1728
|
-
if (data.whitelist !== undefined && data.whitelist !== null) {
|
|
1729
|
-
contents.Whitelist = deserializeAws_restJson1__listOf__string(data.whitelist, context);
|
|
1730
|
-
}
|
|
1731
|
-
return Promise.resolve(contents);
|
|
1732
|
-
};
|
|
1733
|
-
|
|
1734
|
-
const deserializeAws_restJson1DescribeOriginEndpointCommandError = async (
|
|
1735
|
-
output: __HttpResponse,
|
|
1736
|
-
context: __SerdeContext
|
|
1737
|
-
): Promise<DescribeOriginEndpointCommandOutput> => {
|
|
1738
|
-
const parsedOutput: any = {
|
|
1739
|
-
...output,
|
|
1740
|
-
body: await parseBody(output.body, context),
|
|
1741
|
-
};
|
|
1742
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1743
|
-
let errorCode = "UnknownError";
|
|
1744
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1745
|
-
switch (errorCode) {
|
|
1746
|
-
case "ForbiddenException":
|
|
1747
|
-
case "com.amazonaws.mediapackage#ForbiddenException":
|
|
1748
|
-
response = {
|
|
1749
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1750
|
-
name: errorCode,
|
|
1751
|
-
$metadata: deserializeMetadata(output),
|
|
1752
|
-
};
|
|
1753
|
-
break;
|
|
1754
|
-
case "InternalServerErrorException":
|
|
1755
|
-
case "com.amazonaws.mediapackage#InternalServerErrorException":
|
|
1756
|
-
response = {
|
|
1757
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1758
|
-
name: errorCode,
|
|
1759
|
-
$metadata: deserializeMetadata(output),
|
|
1760
|
-
};
|
|
1761
|
-
break;
|
|
1762
|
-
case "NotFoundException":
|
|
1763
|
-
case "com.amazonaws.mediapackage#NotFoundException":
|
|
1764
|
-
response = {
|
|
1765
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1766
|
-
name: errorCode,
|
|
1767
|
-
$metadata: deserializeMetadata(output),
|
|
1768
|
-
};
|
|
1769
|
-
break;
|
|
1770
|
-
case "ServiceUnavailableException":
|
|
1771
|
-
case "com.amazonaws.mediapackage#ServiceUnavailableException":
|
|
1772
|
-
response = {
|
|
1773
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1774
|
-
name: errorCode,
|
|
1775
|
-
$metadata: deserializeMetadata(output),
|
|
1776
|
-
};
|
|
1777
|
-
break;
|
|
1778
|
-
case "TooManyRequestsException":
|
|
1779
|
-
case "com.amazonaws.mediapackage#TooManyRequestsException":
|
|
1780
|
-
response = {
|
|
1781
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1782
|
-
name: errorCode,
|
|
1783
|
-
$metadata: deserializeMetadata(output),
|
|
1784
|
-
};
|
|
1785
|
-
break;
|
|
1786
|
-
case "UnprocessableEntityException":
|
|
1787
|
-
case "com.amazonaws.mediapackage#UnprocessableEntityException":
|
|
1788
|
-
response = {
|
|
1789
|
-
...(await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)),
|
|
1790
|
-
name: errorCode,
|
|
1791
|
-
$metadata: deserializeMetadata(output),
|
|
1792
|
-
};
|
|
1793
|
-
break;
|
|
1794
|
-
default:
|
|
1795
|
-
const parsedBody = parsedOutput.body;
|
|
1796
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1797
|
-
response = {
|
|
1798
|
-
...parsedBody,
|
|
1799
|
-
name: `${errorCode}`,
|
|
1800
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1801
|
-
$fault: "client",
|
|
1802
|
-
$metadata: deserializeMetadata(output),
|
|
1803
|
-
} as any;
|
|
1804
|
-
}
|
|
1805
|
-
const message = response.message || response.Message || errorCode;
|
|
1806
|
-
response.message = message;
|
|
1807
|
-
delete response.Message;
|
|
1808
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1809
|
-
};
|
|
1810
|
-
|
|
1811
|
-
export const deserializeAws_restJson1ListChannelsCommand = async (
|
|
1812
|
-
output: __HttpResponse,
|
|
1813
|
-
context: __SerdeContext
|
|
1814
|
-
): Promise<ListChannelsCommandOutput> => {
|
|
1815
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1816
|
-
return deserializeAws_restJson1ListChannelsCommandError(output, context);
|
|
1817
|
-
}
|
|
1818
|
-
const contents: ListChannelsCommandOutput = {
|
|
1819
|
-
$metadata: deserializeMetadata(output),
|
|
1820
|
-
Channels: undefined,
|
|
1821
|
-
NextToken: undefined,
|
|
1822
|
-
};
|
|
1823
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1824
|
-
if (data.channels !== undefined && data.channels !== null) {
|
|
1825
|
-
contents.Channels = deserializeAws_restJson1__listOfChannel(data.channels, context);
|
|
1826
|
-
}
|
|
1827
|
-
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
1828
|
-
contents.NextToken = __expectString(data.nextToken);
|
|
1829
|
-
}
|
|
1830
|
-
return Promise.resolve(contents);
|
|
1831
|
-
};
|
|
1832
|
-
|
|
1833
|
-
const deserializeAws_restJson1ListChannelsCommandError = async (
|
|
1834
|
-
output: __HttpResponse,
|
|
1835
|
-
context: __SerdeContext
|
|
1836
|
-
): Promise<ListChannelsCommandOutput> => {
|
|
1837
|
-
const parsedOutput: any = {
|
|
1838
|
-
...output,
|
|
1839
|
-
body: await parseBody(output.body, context),
|
|
1840
|
-
};
|
|
1841
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1842
|
-
let errorCode = "UnknownError";
|
|
1843
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1844
|
-
switch (errorCode) {
|
|
1845
|
-
case "ForbiddenException":
|
|
1846
|
-
case "com.amazonaws.mediapackage#ForbiddenException":
|
|
1847
|
-
response = {
|
|
1848
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1849
|
-
name: errorCode,
|
|
1850
|
-
$metadata: deserializeMetadata(output),
|
|
1851
|
-
};
|
|
1852
|
-
break;
|
|
1853
|
-
case "InternalServerErrorException":
|
|
1854
|
-
case "com.amazonaws.mediapackage#InternalServerErrorException":
|
|
1855
|
-
response = {
|
|
1856
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1857
|
-
name: errorCode,
|
|
1858
|
-
$metadata: deserializeMetadata(output),
|
|
1859
|
-
};
|
|
1860
|
-
break;
|
|
1861
|
-
case "NotFoundException":
|
|
1862
|
-
case "com.amazonaws.mediapackage#NotFoundException":
|
|
1863
|
-
response = {
|
|
1864
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1865
|
-
name: errorCode,
|
|
1866
|
-
$metadata: deserializeMetadata(output),
|
|
1867
|
-
};
|
|
1868
|
-
break;
|
|
1869
|
-
case "ServiceUnavailableException":
|
|
1870
|
-
case "com.amazonaws.mediapackage#ServiceUnavailableException":
|
|
1871
|
-
response = {
|
|
1872
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1873
|
-
name: errorCode,
|
|
1874
|
-
$metadata: deserializeMetadata(output),
|
|
1875
|
-
};
|
|
1876
|
-
break;
|
|
1877
|
-
case "TooManyRequestsException":
|
|
1878
|
-
case "com.amazonaws.mediapackage#TooManyRequestsException":
|
|
1879
|
-
response = {
|
|
1880
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1881
|
-
name: errorCode,
|
|
1882
|
-
$metadata: deserializeMetadata(output),
|
|
1883
|
-
};
|
|
1884
|
-
break;
|
|
1885
|
-
case "UnprocessableEntityException":
|
|
1886
|
-
case "com.amazonaws.mediapackage#UnprocessableEntityException":
|
|
1887
|
-
response = {
|
|
1888
|
-
...(await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)),
|
|
1889
|
-
name: errorCode,
|
|
1890
|
-
$metadata: deserializeMetadata(output),
|
|
1891
|
-
};
|
|
1892
|
-
break;
|
|
1893
|
-
default:
|
|
1894
|
-
const parsedBody = parsedOutput.body;
|
|
1895
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1896
|
-
response = {
|
|
1897
|
-
...parsedBody,
|
|
1898
|
-
name: `${errorCode}`,
|
|
1899
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1900
|
-
$fault: "client",
|
|
1901
|
-
$metadata: deserializeMetadata(output),
|
|
1902
|
-
} as any;
|
|
1903
|
-
}
|
|
1904
|
-
const message = response.message || response.Message || errorCode;
|
|
1905
|
-
response.message = message;
|
|
1906
|
-
delete response.Message;
|
|
1907
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1908
|
-
};
|
|
1909
|
-
|
|
1910
|
-
export const deserializeAws_restJson1ListHarvestJobsCommand = async (
|
|
1911
|
-
output: __HttpResponse,
|
|
1912
|
-
context: __SerdeContext
|
|
1913
|
-
): Promise<ListHarvestJobsCommandOutput> => {
|
|
1914
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1915
|
-
return deserializeAws_restJson1ListHarvestJobsCommandError(output, context);
|
|
1916
|
-
}
|
|
1917
|
-
const contents: ListHarvestJobsCommandOutput = {
|
|
1918
|
-
$metadata: deserializeMetadata(output),
|
|
1919
|
-
HarvestJobs: undefined,
|
|
1920
|
-
NextToken: undefined,
|
|
1921
|
-
};
|
|
1922
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1923
|
-
if (data.harvestJobs !== undefined && data.harvestJobs !== null) {
|
|
1924
|
-
contents.HarvestJobs = deserializeAws_restJson1__listOfHarvestJob(data.harvestJobs, context);
|
|
1925
|
-
}
|
|
1926
|
-
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
1927
|
-
contents.NextToken = __expectString(data.nextToken);
|
|
1928
|
-
}
|
|
1929
|
-
return Promise.resolve(contents);
|
|
1930
|
-
};
|
|
1931
|
-
|
|
1932
|
-
const deserializeAws_restJson1ListHarvestJobsCommandError = async (
|
|
1933
|
-
output: __HttpResponse,
|
|
1934
|
-
context: __SerdeContext
|
|
1935
|
-
): Promise<ListHarvestJobsCommandOutput> => {
|
|
1936
|
-
const parsedOutput: any = {
|
|
1937
|
-
...output,
|
|
1938
|
-
body: await parseBody(output.body, context),
|
|
1939
|
-
};
|
|
1940
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1941
|
-
let errorCode = "UnknownError";
|
|
1942
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1943
|
-
switch (errorCode) {
|
|
1944
|
-
case "ForbiddenException":
|
|
1945
|
-
case "com.amazonaws.mediapackage#ForbiddenException":
|
|
1946
|
-
response = {
|
|
1947
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
1948
|
-
name: errorCode,
|
|
1949
|
-
$metadata: deserializeMetadata(output),
|
|
1950
|
-
};
|
|
1951
|
-
break;
|
|
1952
|
-
case "InternalServerErrorException":
|
|
1953
|
-
case "com.amazonaws.mediapackage#InternalServerErrorException":
|
|
1954
|
-
response = {
|
|
1955
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
1956
|
-
name: errorCode,
|
|
1957
|
-
$metadata: deserializeMetadata(output),
|
|
1958
|
-
};
|
|
1959
|
-
break;
|
|
1960
|
-
case "NotFoundException":
|
|
1961
|
-
case "com.amazonaws.mediapackage#NotFoundException":
|
|
1962
|
-
response = {
|
|
1963
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1964
|
-
name: errorCode,
|
|
1965
|
-
$metadata: deserializeMetadata(output),
|
|
1966
|
-
};
|
|
1967
|
-
break;
|
|
1968
|
-
case "ServiceUnavailableException":
|
|
1969
|
-
case "com.amazonaws.mediapackage#ServiceUnavailableException":
|
|
1970
|
-
response = {
|
|
1971
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1972
|
-
name: errorCode,
|
|
1973
|
-
$metadata: deserializeMetadata(output),
|
|
1974
|
-
};
|
|
1975
|
-
break;
|
|
1976
|
-
case "TooManyRequestsException":
|
|
1977
|
-
case "com.amazonaws.mediapackage#TooManyRequestsException":
|
|
1978
|
-
response = {
|
|
1979
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1980
|
-
name: errorCode,
|
|
1981
|
-
$metadata: deserializeMetadata(output),
|
|
1982
|
-
};
|
|
1983
|
-
break;
|
|
1984
|
-
case "UnprocessableEntityException":
|
|
1985
|
-
case "com.amazonaws.mediapackage#UnprocessableEntityException":
|
|
1986
|
-
response = {
|
|
1987
|
-
...(await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)),
|
|
1988
|
-
name: errorCode,
|
|
1989
|
-
$metadata: deserializeMetadata(output),
|
|
1990
|
-
};
|
|
1991
|
-
break;
|
|
1992
|
-
default:
|
|
1993
|
-
const parsedBody = parsedOutput.body;
|
|
1994
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1995
|
-
response = {
|
|
1996
|
-
...parsedBody,
|
|
1997
|
-
name: `${errorCode}`,
|
|
1998
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1999
|
-
$fault: "client",
|
|
2000
|
-
$metadata: deserializeMetadata(output),
|
|
2001
|
-
} as any;
|
|
2002
|
-
}
|
|
2003
|
-
const message = response.message || response.Message || errorCode;
|
|
2004
|
-
response.message = message;
|
|
2005
|
-
delete response.Message;
|
|
2006
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2007
|
-
};
|
|
2008
|
-
|
|
2009
|
-
export const deserializeAws_restJson1ListOriginEndpointsCommand = async (
|
|
2010
|
-
output: __HttpResponse,
|
|
2011
|
-
context: __SerdeContext
|
|
2012
|
-
): Promise<ListOriginEndpointsCommandOutput> => {
|
|
2013
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2014
|
-
return deserializeAws_restJson1ListOriginEndpointsCommandError(output, context);
|
|
2015
|
-
}
|
|
2016
|
-
const contents: ListOriginEndpointsCommandOutput = {
|
|
2017
|
-
$metadata: deserializeMetadata(output),
|
|
2018
|
-
NextToken: undefined,
|
|
2019
|
-
OriginEndpoints: undefined,
|
|
2020
|
-
};
|
|
2021
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2022
|
-
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2023
|
-
contents.NextToken = __expectString(data.nextToken);
|
|
2024
|
-
}
|
|
2025
|
-
if (data.originEndpoints !== undefined && data.originEndpoints !== null) {
|
|
2026
|
-
contents.OriginEndpoints = deserializeAws_restJson1__listOfOriginEndpoint(data.originEndpoints, context);
|
|
2027
|
-
}
|
|
2028
|
-
return Promise.resolve(contents);
|
|
2029
|
-
};
|
|
2030
|
-
|
|
2031
|
-
const deserializeAws_restJson1ListOriginEndpointsCommandError = async (
|
|
2032
|
-
output: __HttpResponse,
|
|
2033
|
-
context: __SerdeContext
|
|
2034
|
-
): Promise<ListOriginEndpointsCommandOutput> => {
|
|
2035
|
-
const parsedOutput: any = {
|
|
2036
|
-
...output,
|
|
2037
|
-
body: await parseBody(output.body, context),
|
|
2038
|
-
};
|
|
2039
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2040
|
-
let errorCode = "UnknownError";
|
|
2041
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2042
|
-
switch (errorCode) {
|
|
2043
|
-
case "ForbiddenException":
|
|
2044
|
-
case "com.amazonaws.mediapackage#ForbiddenException":
|
|
2045
|
-
response = {
|
|
2046
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2047
|
-
name: errorCode,
|
|
2048
|
-
$metadata: deserializeMetadata(output),
|
|
2049
|
-
};
|
|
2050
|
-
break;
|
|
2051
|
-
case "InternalServerErrorException":
|
|
2052
|
-
case "com.amazonaws.mediapackage#InternalServerErrorException":
|
|
2053
|
-
response = {
|
|
2054
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2055
|
-
name: errorCode,
|
|
2056
|
-
$metadata: deserializeMetadata(output),
|
|
2057
|
-
};
|
|
2058
|
-
break;
|
|
2059
|
-
case "NotFoundException":
|
|
2060
|
-
case "com.amazonaws.mediapackage#NotFoundException":
|
|
2061
|
-
response = {
|
|
2062
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2063
|
-
name: errorCode,
|
|
2064
|
-
$metadata: deserializeMetadata(output),
|
|
2065
|
-
};
|
|
2066
|
-
break;
|
|
2067
|
-
case "ServiceUnavailableException":
|
|
2068
|
-
case "com.amazonaws.mediapackage#ServiceUnavailableException":
|
|
2069
|
-
response = {
|
|
2070
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2071
|
-
name: errorCode,
|
|
2072
|
-
$metadata: deserializeMetadata(output),
|
|
2073
|
-
};
|
|
2074
|
-
break;
|
|
2075
|
-
case "TooManyRequestsException":
|
|
2076
|
-
case "com.amazonaws.mediapackage#TooManyRequestsException":
|
|
2077
|
-
response = {
|
|
2078
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
2079
|
-
name: errorCode,
|
|
2080
|
-
$metadata: deserializeMetadata(output),
|
|
2081
|
-
};
|
|
2082
|
-
break;
|
|
2083
|
-
case "UnprocessableEntityException":
|
|
2084
|
-
case "com.amazonaws.mediapackage#UnprocessableEntityException":
|
|
2085
|
-
response = {
|
|
2086
|
-
...(await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)),
|
|
2087
|
-
name: errorCode,
|
|
2088
|
-
$metadata: deserializeMetadata(output),
|
|
2089
|
-
};
|
|
2090
|
-
break;
|
|
2091
|
-
default:
|
|
2092
|
-
const parsedBody = parsedOutput.body;
|
|
2093
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2094
|
-
response = {
|
|
2095
|
-
...parsedBody,
|
|
2096
|
-
name: `${errorCode}`,
|
|
2097
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2098
|
-
$fault: "client",
|
|
2099
|
-
$metadata: deserializeMetadata(output),
|
|
2100
|
-
} as any;
|
|
2101
|
-
}
|
|
2102
|
-
const message = response.message || response.Message || errorCode;
|
|
2103
|
-
response.message = message;
|
|
2104
|
-
delete response.Message;
|
|
2105
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2106
|
-
};
|
|
2107
|
-
|
|
2108
|
-
export const deserializeAws_restJson1ListTagsForResourceCommand = async (
|
|
2109
|
-
output: __HttpResponse,
|
|
2110
|
-
context: __SerdeContext
|
|
2111
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
2112
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2113
|
-
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
2114
|
-
}
|
|
2115
|
-
const contents: ListTagsForResourceCommandOutput = {
|
|
2116
|
-
$metadata: deserializeMetadata(output),
|
|
2117
|
-
Tags: undefined,
|
|
2118
|
-
};
|
|
2119
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2120
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
2121
|
-
contents.Tags = deserializeAws_restJson1__mapOf__string(data.tags, context);
|
|
2122
|
-
}
|
|
2123
|
-
return Promise.resolve(contents);
|
|
2124
|
-
};
|
|
2125
|
-
|
|
2126
|
-
const deserializeAws_restJson1ListTagsForResourceCommandError = async (
|
|
2127
|
-
output: __HttpResponse,
|
|
2128
|
-
context: __SerdeContext
|
|
2129
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
2130
|
-
const parsedOutput: any = {
|
|
2131
|
-
...output,
|
|
2132
|
-
body: await parseBody(output.body, context),
|
|
2133
|
-
};
|
|
2134
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2135
|
-
let errorCode = "UnknownError";
|
|
2136
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2137
|
-
switch (errorCode) {
|
|
2138
|
-
default:
|
|
2139
|
-
const parsedBody = parsedOutput.body;
|
|
2140
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2141
|
-
response = {
|
|
2142
|
-
...parsedBody,
|
|
2143
|
-
name: `${errorCode}`,
|
|
2144
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2145
|
-
$fault: "client",
|
|
2146
|
-
$metadata: deserializeMetadata(output),
|
|
2147
|
-
} as any;
|
|
2148
|
-
}
|
|
2149
|
-
const message = response.message || response.Message || errorCode;
|
|
2150
|
-
response.message = message;
|
|
2151
|
-
delete response.Message;
|
|
2152
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2153
|
-
};
|
|
2154
|
-
|
|
2155
|
-
export const deserializeAws_restJson1RotateChannelCredentialsCommand = async (
|
|
2156
|
-
output: __HttpResponse,
|
|
2157
|
-
context: __SerdeContext
|
|
2158
|
-
): Promise<RotateChannelCredentialsCommandOutput> => {
|
|
2159
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2160
|
-
return deserializeAws_restJson1RotateChannelCredentialsCommandError(output, context);
|
|
2161
|
-
}
|
|
2162
|
-
const contents: RotateChannelCredentialsCommandOutput = {
|
|
2163
|
-
$metadata: deserializeMetadata(output),
|
|
2164
|
-
Arn: undefined,
|
|
2165
|
-
Description: undefined,
|
|
2166
|
-
EgressAccessLogs: undefined,
|
|
2167
|
-
HlsIngest: undefined,
|
|
2168
|
-
Id: undefined,
|
|
2169
|
-
IngressAccessLogs: undefined,
|
|
2170
|
-
Tags: undefined,
|
|
2171
|
-
};
|
|
2172
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2173
|
-
if (data.arn !== undefined && data.arn !== null) {
|
|
2174
|
-
contents.Arn = __expectString(data.arn);
|
|
2175
|
-
}
|
|
2176
|
-
if (data.description !== undefined && data.description !== null) {
|
|
2177
|
-
contents.Description = __expectString(data.description);
|
|
2178
|
-
}
|
|
2179
|
-
if (data.egressAccessLogs !== undefined && data.egressAccessLogs !== null) {
|
|
2180
|
-
contents.EgressAccessLogs = deserializeAws_restJson1EgressAccessLogs(data.egressAccessLogs, context);
|
|
2181
|
-
}
|
|
2182
|
-
if (data.hlsIngest !== undefined && data.hlsIngest !== null) {
|
|
2183
|
-
contents.HlsIngest = deserializeAws_restJson1HlsIngest(data.hlsIngest, context);
|
|
2184
|
-
}
|
|
2185
|
-
if (data.id !== undefined && data.id !== null) {
|
|
2186
|
-
contents.Id = __expectString(data.id);
|
|
2187
|
-
}
|
|
2188
|
-
if (data.ingressAccessLogs !== undefined && data.ingressAccessLogs !== null) {
|
|
2189
|
-
contents.IngressAccessLogs = deserializeAws_restJson1IngressAccessLogs(data.ingressAccessLogs, context);
|
|
2190
|
-
}
|
|
2191
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
2192
|
-
contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
2193
|
-
}
|
|
2194
|
-
return Promise.resolve(contents);
|
|
2195
|
-
};
|
|
2196
|
-
|
|
2197
|
-
const deserializeAws_restJson1RotateChannelCredentialsCommandError = async (
|
|
2198
|
-
output: __HttpResponse,
|
|
2199
|
-
context: __SerdeContext
|
|
2200
|
-
): Promise<RotateChannelCredentialsCommandOutput> => {
|
|
2201
|
-
const parsedOutput: any = {
|
|
2202
|
-
...output,
|
|
2203
|
-
body: await parseBody(output.body, context),
|
|
2204
|
-
};
|
|
2205
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2206
|
-
let errorCode = "UnknownError";
|
|
2207
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2208
|
-
switch (errorCode) {
|
|
2209
|
-
case "ForbiddenException":
|
|
2210
|
-
case "com.amazonaws.mediapackage#ForbiddenException":
|
|
2211
|
-
response = {
|
|
2212
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2213
|
-
name: errorCode,
|
|
2214
|
-
$metadata: deserializeMetadata(output),
|
|
2215
|
-
};
|
|
2216
|
-
break;
|
|
2217
|
-
case "InternalServerErrorException":
|
|
2218
|
-
case "com.amazonaws.mediapackage#InternalServerErrorException":
|
|
2219
|
-
response = {
|
|
2220
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2221
|
-
name: errorCode,
|
|
2222
|
-
$metadata: deserializeMetadata(output),
|
|
2223
|
-
};
|
|
2224
|
-
break;
|
|
2225
|
-
case "NotFoundException":
|
|
2226
|
-
case "com.amazonaws.mediapackage#NotFoundException":
|
|
2227
|
-
response = {
|
|
2228
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2229
|
-
name: errorCode,
|
|
2230
|
-
$metadata: deserializeMetadata(output),
|
|
2231
|
-
};
|
|
2232
|
-
break;
|
|
2233
|
-
case "ServiceUnavailableException":
|
|
2234
|
-
case "com.amazonaws.mediapackage#ServiceUnavailableException":
|
|
2235
|
-
response = {
|
|
2236
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2237
|
-
name: errorCode,
|
|
2238
|
-
$metadata: deserializeMetadata(output),
|
|
2239
|
-
};
|
|
2240
|
-
break;
|
|
2241
|
-
case "TooManyRequestsException":
|
|
2242
|
-
case "com.amazonaws.mediapackage#TooManyRequestsException":
|
|
2243
|
-
response = {
|
|
2244
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
2245
|
-
name: errorCode,
|
|
2246
|
-
$metadata: deserializeMetadata(output),
|
|
2247
|
-
};
|
|
2248
|
-
break;
|
|
2249
|
-
case "UnprocessableEntityException":
|
|
2250
|
-
case "com.amazonaws.mediapackage#UnprocessableEntityException":
|
|
2251
|
-
response = {
|
|
2252
|
-
...(await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)),
|
|
2253
|
-
name: errorCode,
|
|
2254
|
-
$metadata: deserializeMetadata(output),
|
|
2255
|
-
};
|
|
2256
|
-
break;
|
|
2257
|
-
default:
|
|
2258
|
-
const parsedBody = parsedOutput.body;
|
|
2259
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2260
|
-
response = {
|
|
2261
|
-
...parsedBody,
|
|
2262
|
-
name: `${errorCode}`,
|
|
2263
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2264
|
-
$fault: "client",
|
|
2265
|
-
$metadata: deserializeMetadata(output),
|
|
2266
|
-
} as any;
|
|
2267
|
-
}
|
|
2268
|
-
const message = response.message || response.Message || errorCode;
|
|
2269
|
-
response.message = message;
|
|
2270
|
-
delete response.Message;
|
|
2271
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2272
|
-
};
|
|
2273
|
-
|
|
2274
|
-
export const deserializeAws_restJson1RotateIngestEndpointCredentialsCommand = async (
|
|
2275
|
-
output: __HttpResponse,
|
|
2276
|
-
context: __SerdeContext
|
|
2277
|
-
): Promise<RotateIngestEndpointCredentialsCommandOutput> => {
|
|
2278
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2279
|
-
return deserializeAws_restJson1RotateIngestEndpointCredentialsCommandError(output, context);
|
|
2280
|
-
}
|
|
2281
|
-
const contents: RotateIngestEndpointCredentialsCommandOutput = {
|
|
2282
|
-
$metadata: deserializeMetadata(output),
|
|
2283
|
-
Arn: undefined,
|
|
2284
|
-
Description: undefined,
|
|
2285
|
-
EgressAccessLogs: undefined,
|
|
2286
|
-
HlsIngest: undefined,
|
|
2287
|
-
Id: undefined,
|
|
2288
|
-
IngressAccessLogs: undefined,
|
|
2289
|
-
Tags: undefined,
|
|
2290
|
-
};
|
|
2291
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2292
|
-
if (data.arn !== undefined && data.arn !== null) {
|
|
2293
|
-
contents.Arn = __expectString(data.arn);
|
|
2294
|
-
}
|
|
2295
|
-
if (data.description !== undefined && data.description !== null) {
|
|
2296
|
-
contents.Description = __expectString(data.description);
|
|
2297
|
-
}
|
|
2298
|
-
if (data.egressAccessLogs !== undefined && data.egressAccessLogs !== null) {
|
|
2299
|
-
contents.EgressAccessLogs = deserializeAws_restJson1EgressAccessLogs(data.egressAccessLogs, context);
|
|
2300
|
-
}
|
|
2301
|
-
if (data.hlsIngest !== undefined && data.hlsIngest !== null) {
|
|
2302
|
-
contents.HlsIngest = deserializeAws_restJson1HlsIngest(data.hlsIngest, context);
|
|
2303
|
-
}
|
|
2304
|
-
if (data.id !== undefined && data.id !== null) {
|
|
2305
|
-
contents.Id = __expectString(data.id);
|
|
2306
|
-
}
|
|
2307
|
-
if (data.ingressAccessLogs !== undefined && data.ingressAccessLogs !== null) {
|
|
2308
|
-
contents.IngressAccessLogs = deserializeAws_restJson1IngressAccessLogs(data.ingressAccessLogs, context);
|
|
2309
|
-
}
|
|
2310
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
2311
|
-
contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
2312
|
-
}
|
|
2313
|
-
return Promise.resolve(contents);
|
|
2314
|
-
};
|
|
2315
|
-
|
|
2316
|
-
const deserializeAws_restJson1RotateIngestEndpointCredentialsCommandError = async (
|
|
2317
|
-
output: __HttpResponse,
|
|
2318
|
-
context: __SerdeContext
|
|
2319
|
-
): Promise<RotateIngestEndpointCredentialsCommandOutput> => {
|
|
2320
|
-
const parsedOutput: any = {
|
|
2321
|
-
...output,
|
|
2322
|
-
body: await parseBody(output.body, context),
|
|
2323
|
-
};
|
|
2324
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2325
|
-
let errorCode = "UnknownError";
|
|
2326
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2327
|
-
switch (errorCode) {
|
|
2328
|
-
case "ForbiddenException":
|
|
2329
|
-
case "com.amazonaws.mediapackage#ForbiddenException":
|
|
2330
|
-
response = {
|
|
2331
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2332
|
-
name: errorCode,
|
|
2333
|
-
$metadata: deserializeMetadata(output),
|
|
2334
|
-
};
|
|
2335
|
-
break;
|
|
2336
|
-
case "InternalServerErrorException":
|
|
2337
|
-
case "com.amazonaws.mediapackage#InternalServerErrorException":
|
|
2338
|
-
response = {
|
|
2339
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2340
|
-
name: errorCode,
|
|
2341
|
-
$metadata: deserializeMetadata(output),
|
|
2342
|
-
};
|
|
2343
|
-
break;
|
|
2344
|
-
case "NotFoundException":
|
|
2345
|
-
case "com.amazonaws.mediapackage#NotFoundException":
|
|
2346
|
-
response = {
|
|
2347
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2348
|
-
name: errorCode,
|
|
2349
|
-
$metadata: deserializeMetadata(output),
|
|
2350
|
-
};
|
|
2351
|
-
break;
|
|
2352
|
-
case "ServiceUnavailableException":
|
|
2353
|
-
case "com.amazonaws.mediapackage#ServiceUnavailableException":
|
|
2354
|
-
response = {
|
|
2355
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2356
|
-
name: errorCode,
|
|
2357
|
-
$metadata: deserializeMetadata(output),
|
|
2358
|
-
};
|
|
2359
|
-
break;
|
|
2360
|
-
case "TooManyRequestsException":
|
|
2361
|
-
case "com.amazonaws.mediapackage#TooManyRequestsException":
|
|
2362
|
-
response = {
|
|
2363
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
2364
|
-
name: errorCode,
|
|
2365
|
-
$metadata: deserializeMetadata(output),
|
|
2366
|
-
};
|
|
2367
|
-
break;
|
|
2368
|
-
case "UnprocessableEntityException":
|
|
2369
|
-
case "com.amazonaws.mediapackage#UnprocessableEntityException":
|
|
2370
|
-
response = {
|
|
2371
|
-
...(await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)),
|
|
2372
|
-
name: errorCode,
|
|
2373
|
-
$metadata: deserializeMetadata(output),
|
|
2374
|
-
};
|
|
2375
|
-
break;
|
|
2376
|
-
default:
|
|
2377
|
-
const parsedBody = parsedOutput.body;
|
|
2378
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2379
|
-
response = {
|
|
2380
|
-
...parsedBody,
|
|
2381
|
-
name: `${errorCode}`,
|
|
2382
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2383
|
-
$fault: "client",
|
|
2384
|
-
$metadata: deserializeMetadata(output),
|
|
2385
|
-
} as any;
|
|
2386
|
-
}
|
|
2387
|
-
const message = response.message || response.Message || errorCode;
|
|
2388
|
-
response.message = message;
|
|
2389
|
-
delete response.Message;
|
|
2390
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2391
|
-
};
|
|
2392
|
-
|
|
2393
|
-
export const deserializeAws_restJson1TagResourceCommand = async (
|
|
2394
|
-
output: __HttpResponse,
|
|
2395
|
-
context: __SerdeContext
|
|
2396
|
-
): Promise<TagResourceCommandOutput> => {
|
|
2397
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
2398
|
-
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
2399
|
-
}
|
|
2400
|
-
const contents: TagResourceCommandOutput = {
|
|
2401
|
-
$metadata: deserializeMetadata(output),
|
|
2402
|
-
};
|
|
2403
|
-
await collectBody(output.body, context);
|
|
2404
|
-
return Promise.resolve(contents);
|
|
2405
|
-
};
|
|
2406
|
-
|
|
2407
|
-
const deserializeAws_restJson1TagResourceCommandError = async (
|
|
2408
|
-
output: __HttpResponse,
|
|
2409
|
-
context: __SerdeContext
|
|
2410
|
-
): Promise<TagResourceCommandOutput> => {
|
|
2411
|
-
const parsedOutput: any = {
|
|
2412
|
-
...output,
|
|
2413
|
-
body: await parseBody(output.body, context),
|
|
2414
|
-
};
|
|
2415
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2416
|
-
let errorCode = "UnknownError";
|
|
2417
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2418
|
-
switch (errorCode) {
|
|
2419
|
-
default:
|
|
2420
|
-
const parsedBody = parsedOutput.body;
|
|
2421
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2422
|
-
response = {
|
|
2423
|
-
...parsedBody,
|
|
2424
|
-
name: `${errorCode}`,
|
|
2425
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2426
|
-
$fault: "client",
|
|
2427
|
-
$metadata: deserializeMetadata(output),
|
|
2428
|
-
} as any;
|
|
2429
|
-
}
|
|
2430
|
-
const message = response.message || response.Message || errorCode;
|
|
2431
|
-
response.message = message;
|
|
2432
|
-
delete response.Message;
|
|
2433
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2434
|
-
};
|
|
2435
|
-
|
|
2436
|
-
export const deserializeAws_restJson1UntagResourceCommand = async (
|
|
2437
|
-
output: __HttpResponse,
|
|
2438
|
-
context: __SerdeContext
|
|
2439
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
2440
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
2441
|
-
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
2442
|
-
}
|
|
2443
|
-
const contents: UntagResourceCommandOutput = {
|
|
2444
|
-
$metadata: deserializeMetadata(output),
|
|
2445
|
-
};
|
|
2446
|
-
await collectBody(output.body, context);
|
|
2447
|
-
return Promise.resolve(contents);
|
|
2448
|
-
};
|
|
2449
|
-
|
|
2450
|
-
const deserializeAws_restJson1UntagResourceCommandError = async (
|
|
2451
|
-
output: __HttpResponse,
|
|
2452
|
-
context: __SerdeContext
|
|
2453
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
2454
|
-
const parsedOutput: any = {
|
|
2455
|
-
...output,
|
|
2456
|
-
body: await parseBody(output.body, context),
|
|
2457
|
-
};
|
|
2458
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2459
|
-
let errorCode = "UnknownError";
|
|
2460
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2461
|
-
switch (errorCode) {
|
|
2462
|
-
default:
|
|
2463
|
-
const parsedBody = parsedOutput.body;
|
|
2464
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2465
|
-
response = {
|
|
2466
|
-
...parsedBody,
|
|
2467
|
-
name: `${errorCode}`,
|
|
2468
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2469
|
-
$fault: "client",
|
|
2470
|
-
$metadata: deserializeMetadata(output),
|
|
2471
|
-
} as any;
|
|
2472
|
-
}
|
|
2473
|
-
const message = response.message || response.Message || errorCode;
|
|
2474
|
-
response.message = message;
|
|
2475
|
-
delete response.Message;
|
|
2476
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2477
|
-
};
|
|
2478
|
-
|
|
2479
|
-
export const deserializeAws_restJson1UpdateChannelCommand = async (
|
|
2480
|
-
output: __HttpResponse,
|
|
2481
|
-
context: __SerdeContext
|
|
2482
|
-
): Promise<UpdateChannelCommandOutput> => {
|
|
2483
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2484
|
-
return deserializeAws_restJson1UpdateChannelCommandError(output, context);
|
|
2485
|
-
}
|
|
2486
|
-
const contents: UpdateChannelCommandOutput = {
|
|
2487
|
-
$metadata: deserializeMetadata(output),
|
|
2488
|
-
Arn: undefined,
|
|
2489
|
-
Description: undefined,
|
|
2490
|
-
EgressAccessLogs: undefined,
|
|
2491
|
-
HlsIngest: undefined,
|
|
2492
|
-
Id: undefined,
|
|
2493
|
-
IngressAccessLogs: undefined,
|
|
2494
|
-
Tags: undefined,
|
|
2495
|
-
};
|
|
2496
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2497
|
-
if (data.arn !== undefined && data.arn !== null) {
|
|
2498
|
-
contents.Arn = __expectString(data.arn);
|
|
2499
|
-
}
|
|
2500
|
-
if (data.description !== undefined && data.description !== null) {
|
|
2501
|
-
contents.Description = __expectString(data.description);
|
|
2502
|
-
}
|
|
2503
|
-
if (data.egressAccessLogs !== undefined && data.egressAccessLogs !== null) {
|
|
2504
|
-
contents.EgressAccessLogs = deserializeAws_restJson1EgressAccessLogs(data.egressAccessLogs, context);
|
|
2505
|
-
}
|
|
2506
|
-
if (data.hlsIngest !== undefined && data.hlsIngest !== null) {
|
|
2507
|
-
contents.HlsIngest = deserializeAws_restJson1HlsIngest(data.hlsIngest, context);
|
|
2508
|
-
}
|
|
2509
|
-
if (data.id !== undefined && data.id !== null) {
|
|
2510
|
-
contents.Id = __expectString(data.id);
|
|
2511
|
-
}
|
|
2512
|
-
if (data.ingressAccessLogs !== undefined && data.ingressAccessLogs !== null) {
|
|
2513
|
-
contents.IngressAccessLogs = deserializeAws_restJson1IngressAccessLogs(data.ingressAccessLogs, context);
|
|
2514
|
-
}
|
|
2515
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
2516
|
-
contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
2517
|
-
}
|
|
2518
|
-
return Promise.resolve(contents);
|
|
2519
|
-
};
|
|
2520
|
-
|
|
2521
|
-
const deserializeAws_restJson1UpdateChannelCommandError = async (
|
|
2522
|
-
output: __HttpResponse,
|
|
2523
|
-
context: __SerdeContext
|
|
2524
|
-
): Promise<UpdateChannelCommandOutput> => {
|
|
2525
|
-
const parsedOutput: any = {
|
|
2526
|
-
...output,
|
|
2527
|
-
body: await parseBody(output.body, context),
|
|
2528
|
-
};
|
|
2529
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2530
|
-
let errorCode = "UnknownError";
|
|
2531
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2532
|
-
switch (errorCode) {
|
|
2533
|
-
case "ForbiddenException":
|
|
2534
|
-
case "com.amazonaws.mediapackage#ForbiddenException":
|
|
2535
|
-
response = {
|
|
2536
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2537
|
-
name: errorCode,
|
|
2538
|
-
$metadata: deserializeMetadata(output),
|
|
2539
|
-
};
|
|
2540
|
-
break;
|
|
2541
|
-
case "InternalServerErrorException":
|
|
2542
|
-
case "com.amazonaws.mediapackage#InternalServerErrorException":
|
|
2543
|
-
response = {
|
|
2544
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2545
|
-
name: errorCode,
|
|
2546
|
-
$metadata: deserializeMetadata(output),
|
|
2547
|
-
};
|
|
2548
|
-
break;
|
|
2549
|
-
case "NotFoundException":
|
|
2550
|
-
case "com.amazonaws.mediapackage#NotFoundException":
|
|
2551
|
-
response = {
|
|
2552
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2553
|
-
name: errorCode,
|
|
2554
|
-
$metadata: deserializeMetadata(output),
|
|
2555
|
-
};
|
|
2556
|
-
break;
|
|
2557
|
-
case "ServiceUnavailableException":
|
|
2558
|
-
case "com.amazonaws.mediapackage#ServiceUnavailableException":
|
|
2559
|
-
response = {
|
|
2560
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2561
|
-
name: errorCode,
|
|
2562
|
-
$metadata: deserializeMetadata(output),
|
|
2563
|
-
};
|
|
2564
|
-
break;
|
|
2565
|
-
case "TooManyRequestsException":
|
|
2566
|
-
case "com.amazonaws.mediapackage#TooManyRequestsException":
|
|
2567
|
-
response = {
|
|
2568
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
2569
|
-
name: errorCode,
|
|
2570
|
-
$metadata: deserializeMetadata(output),
|
|
2571
|
-
};
|
|
2572
|
-
break;
|
|
2573
|
-
case "UnprocessableEntityException":
|
|
2574
|
-
case "com.amazonaws.mediapackage#UnprocessableEntityException":
|
|
2575
|
-
response = {
|
|
2576
|
-
...(await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)),
|
|
2577
|
-
name: errorCode,
|
|
2578
|
-
$metadata: deserializeMetadata(output),
|
|
2579
|
-
};
|
|
2580
|
-
break;
|
|
2581
|
-
default:
|
|
2582
|
-
const parsedBody = parsedOutput.body;
|
|
2583
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2584
|
-
response = {
|
|
2585
|
-
...parsedBody,
|
|
2586
|
-
name: `${errorCode}`,
|
|
2587
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2588
|
-
$fault: "client",
|
|
2589
|
-
$metadata: deserializeMetadata(output),
|
|
2590
|
-
} as any;
|
|
2591
|
-
}
|
|
2592
|
-
const message = response.message || response.Message || errorCode;
|
|
2593
|
-
response.message = message;
|
|
2594
|
-
delete response.Message;
|
|
2595
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2596
|
-
};
|
|
2597
|
-
|
|
2598
|
-
export const deserializeAws_restJson1UpdateOriginEndpointCommand = async (
|
|
2599
|
-
output: __HttpResponse,
|
|
2600
|
-
context: __SerdeContext
|
|
2601
|
-
): Promise<UpdateOriginEndpointCommandOutput> => {
|
|
2602
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2603
|
-
return deserializeAws_restJson1UpdateOriginEndpointCommandError(output, context);
|
|
2604
|
-
}
|
|
2605
|
-
const contents: UpdateOriginEndpointCommandOutput = {
|
|
2606
|
-
$metadata: deserializeMetadata(output),
|
|
2607
|
-
Arn: undefined,
|
|
2608
|
-
Authorization: undefined,
|
|
2609
|
-
ChannelId: undefined,
|
|
2610
|
-
CmafPackage: undefined,
|
|
2611
|
-
DashPackage: undefined,
|
|
2612
|
-
Description: undefined,
|
|
2613
|
-
HlsPackage: undefined,
|
|
2614
|
-
Id: undefined,
|
|
2615
|
-
ManifestName: undefined,
|
|
2616
|
-
MssPackage: undefined,
|
|
2617
|
-
Origination: undefined,
|
|
2618
|
-
StartoverWindowSeconds: undefined,
|
|
2619
|
-
Tags: undefined,
|
|
2620
|
-
TimeDelaySeconds: undefined,
|
|
2621
|
-
Url: undefined,
|
|
2622
|
-
Whitelist: undefined,
|
|
2623
|
-
};
|
|
2624
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2625
|
-
if (data.arn !== undefined && data.arn !== null) {
|
|
2626
|
-
contents.Arn = __expectString(data.arn);
|
|
2627
|
-
}
|
|
2628
|
-
if (data.authorization !== undefined && data.authorization !== null) {
|
|
2629
|
-
contents.Authorization = deserializeAws_restJson1Authorization(data.authorization, context);
|
|
2630
|
-
}
|
|
2631
|
-
if (data.channelId !== undefined && data.channelId !== null) {
|
|
2632
|
-
contents.ChannelId = __expectString(data.channelId);
|
|
2633
|
-
}
|
|
2634
|
-
if (data.cmafPackage !== undefined && data.cmafPackage !== null) {
|
|
2635
|
-
contents.CmafPackage = deserializeAws_restJson1CmafPackage(data.cmafPackage, context);
|
|
2636
|
-
}
|
|
2637
|
-
if (data.dashPackage !== undefined && data.dashPackage !== null) {
|
|
2638
|
-
contents.DashPackage = deserializeAws_restJson1DashPackage(data.dashPackage, context);
|
|
2639
|
-
}
|
|
2640
|
-
if (data.description !== undefined && data.description !== null) {
|
|
2641
|
-
contents.Description = __expectString(data.description);
|
|
2642
|
-
}
|
|
2643
|
-
if (data.hlsPackage !== undefined && data.hlsPackage !== null) {
|
|
2644
|
-
contents.HlsPackage = deserializeAws_restJson1HlsPackage(data.hlsPackage, context);
|
|
2645
|
-
}
|
|
2646
|
-
if (data.id !== undefined && data.id !== null) {
|
|
2647
|
-
contents.Id = __expectString(data.id);
|
|
2648
|
-
}
|
|
2649
|
-
if (data.manifestName !== undefined && data.manifestName !== null) {
|
|
2650
|
-
contents.ManifestName = __expectString(data.manifestName);
|
|
2651
|
-
}
|
|
2652
|
-
if (data.mssPackage !== undefined && data.mssPackage !== null) {
|
|
2653
|
-
contents.MssPackage = deserializeAws_restJson1MssPackage(data.mssPackage, context);
|
|
2654
|
-
}
|
|
2655
|
-
if (data.origination !== undefined && data.origination !== null) {
|
|
2656
|
-
contents.Origination = __expectString(data.origination);
|
|
2657
|
-
}
|
|
2658
|
-
if (data.startoverWindowSeconds !== undefined && data.startoverWindowSeconds !== null) {
|
|
2659
|
-
contents.StartoverWindowSeconds = __expectInt32(data.startoverWindowSeconds);
|
|
2660
|
-
}
|
|
2661
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
2662
|
-
contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
2663
|
-
}
|
|
2664
|
-
if (data.timeDelaySeconds !== undefined && data.timeDelaySeconds !== null) {
|
|
2665
|
-
contents.TimeDelaySeconds = __expectInt32(data.timeDelaySeconds);
|
|
2666
|
-
}
|
|
2667
|
-
if (data.url !== undefined && data.url !== null) {
|
|
2668
|
-
contents.Url = __expectString(data.url);
|
|
2669
|
-
}
|
|
2670
|
-
if (data.whitelist !== undefined && data.whitelist !== null) {
|
|
2671
|
-
contents.Whitelist = deserializeAws_restJson1__listOf__string(data.whitelist, context);
|
|
2672
|
-
}
|
|
2673
|
-
return Promise.resolve(contents);
|
|
2674
|
-
};
|
|
2675
|
-
|
|
2676
|
-
const deserializeAws_restJson1UpdateOriginEndpointCommandError = async (
|
|
2677
|
-
output: __HttpResponse,
|
|
2678
|
-
context: __SerdeContext
|
|
2679
|
-
): Promise<UpdateOriginEndpointCommandOutput> => {
|
|
2680
|
-
const parsedOutput: any = {
|
|
2681
|
-
...output,
|
|
2682
|
-
body: await parseBody(output.body, context),
|
|
2683
|
-
};
|
|
2684
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2685
|
-
let errorCode = "UnknownError";
|
|
2686
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2687
|
-
switch (errorCode) {
|
|
2688
|
-
case "ForbiddenException":
|
|
2689
|
-
case "com.amazonaws.mediapackage#ForbiddenException":
|
|
2690
|
-
response = {
|
|
2691
|
-
...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
|
|
2692
|
-
name: errorCode,
|
|
2693
|
-
$metadata: deserializeMetadata(output),
|
|
2694
|
-
};
|
|
2695
|
-
break;
|
|
2696
|
-
case "InternalServerErrorException":
|
|
2697
|
-
case "com.amazonaws.mediapackage#InternalServerErrorException":
|
|
2698
|
-
response = {
|
|
2699
|
-
...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
|
|
2700
|
-
name: errorCode,
|
|
2701
|
-
$metadata: deserializeMetadata(output),
|
|
2702
|
-
};
|
|
2703
|
-
break;
|
|
2704
|
-
case "NotFoundException":
|
|
2705
|
-
case "com.amazonaws.mediapackage#NotFoundException":
|
|
2706
|
-
response = {
|
|
2707
|
-
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2708
|
-
name: errorCode,
|
|
2709
|
-
$metadata: deserializeMetadata(output),
|
|
2710
|
-
};
|
|
2711
|
-
break;
|
|
2712
|
-
case "ServiceUnavailableException":
|
|
2713
|
-
case "com.amazonaws.mediapackage#ServiceUnavailableException":
|
|
2714
|
-
response = {
|
|
2715
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2716
|
-
name: errorCode,
|
|
2717
|
-
$metadata: deserializeMetadata(output),
|
|
2718
|
-
};
|
|
2719
|
-
break;
|
|
2720
|
-
case "TooManyRequestsException":
|
|
2721
|
-
case "com.amazonaws.mediapackage#TooManyRequestsException":
|
|
2722
|
-
response = {
|
|
2723
|
-
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
2724
|
-
name: errorCode,
|
|
2725
|
-
$metadata: deserializeMetadata(output),
|
|
2726
|
-
};
|
|
2727
|
-
break;
|
|
2728
|
-
case "UnprocessableEntityException":
|
|
2729
|
-
case "com.amazonaws.mediapackage#UnprocessableEntityException":
|
|
2730
|
-
response = {
|
|
2731
|
-
...(await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)),
|
|
2732
|
-
name: errorCode,
|
|
2733
|
-
$metadata: deserializeMetadata(output),
|
|
2734
|
-
};
|
|
2735
|
-
break;
|
|
2736
|
-
default:
|
|
2737
|
-
const parsedBody = parsedOutput.body;
|
|
2738
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2739
|
-
response = {
|
|
2740
|
-
...parsedBody,
|
|
2741
|
-
name: `${errorCode}`,
|
|
2742
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2743
|
-
$fault: "client",
|
|
2744
|
-
$metadata: deserializeMetadata(output),
|
|
2745
|
-
} as any;
|
|
2746
|
-
}
|
|
2747
|
-
const message = response.message || response.Message || errorCode;
|
|
2748
|
-
response.message = message;
|
|
2749
|
-
delete response.Message;
|
|
2750
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2751
|
-
};
|
|
2752
|
-
|
|
2753
|
-
const deserializeAws_restJson1ForbiddenExceptionResponse = async (
|
|
2754
|
-
parsedOutput: any,
|
|
2755
|
-
context: __SerdeContext
|
|
2756
|
-
): Promise<ForbiddenException> => {
|
|
2757
|
-
const contents: ForbiddenException = {
|
|
2758
|
-
name: "ForbiddenException",
|
|
2759
|
-
$fault: "client",
|
|
2760
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2761
|
-
Message: undefined,
|
|
2762
|
-
};
|
|
2763
|
-
const data: any = parsedOutput.body;
|
|
2764
|
-
if (data.message !== undefined && data.message !== null) {
|
|
2765
|
-
contents.Message = __expectString(data.message);
|
|
2766
|
-
}
|
|
2767
|
-
return contents;
|
|
2768
|
-
};
|
|
2769
|
-
|
|
2770
|
-
const deserializeAws_restJson1InternalServerErrorExceptionResponse = async (
|
|
2771
|
-
parsedOutput: any,
|
|
2772
|
-
context: __SerdeContext
|
|
2773
|
-
): Promise<InternalServerErrorException> => {
|
|
2774
|
-
const contents: InternalServerErrorException = {
|
|
2775
|
-
name: "InternalServerErrorException",
|
|
2776
|
-
$fault: "server",
|
|
2777
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2778
|
-
Message: undefined,
|
|
2779
|
-
};
|
|
2780
|
-
const data: any = parsedOutput.body;
|
|
2781
|
-
if (data.message !== undefined && data.message !== null) {
|
|
2782
|
-
contents.Message = __expectString(data.message);
|
|
2783
|
-
}
|
|
2784
|
-
return contents;
|
|
2785
|
-
};
|
|
2786
|
-
|
|
2787
|
-
const deserializeAws_restJson1NotFoundExceptionResponse = async (
|
|
2788
|
-
parsedOutput: any,
|
|
2789
|
-
context: __SerdeContext
|
|
2790
|
-
): Promise<NotFoundException> => {
|
|
2791
|
-
const contents: NotFoundException = {
|
|
2792
|
-
name: "NotFoundException",
|
|
2793
|
-
$fault: "client",
|
|
2794
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2795
|
-
Message: undefined,
|
|
2796
|
-
};
|
|
2797
|
-
const data: any = parsedOutput.body;
|
|
2798
|
-
if (data.message !== undefined && data.message !== null) {
|
|
2799
|
-
contents.Message = __expectString(data.message);
|
|
2800
|
-
}
|
|
2801
|
-
return contents;
|
|
2802
|
-
};
|
|
2803
|
-
|
|
2804
|
-
const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (
|
|
2805
|
-
parsedOutput: any,
|
|
2806
|
-
context: __SerdeContext
|
|
2807
|
-
): Promise<ServiceUnavailableException> => {
|
|
2808
|
-
const contents: ServiceUnavailableException = {
|
|
2809
|
-
name: "ServiceUnavailableException",
|
|
2810
|
-
$fault: "server",
|
|
2811
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2812
|
-
Message: undefined,
|
|
2813
|
-
};
|
|
2814
|
-
const data: any = parsedOutput.body;
|
|
2815
|
-
if (data.message !== undefined && data.message !== null) {
|
|
2816
|
-
contents.Message = __expectString(data.message);
|
|
2817
|
-
}
|
|
2818
|
-
return contents;
|
|
2819
|
-
};
|
|
2820
|
-
|
|
2821
|
-
const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (
|
|
2822
|
-
parsedOutput: any,
|
|
2823
|
-
context: __SerdeContext
|
|
2824
|
-
): Promise<TooManyRequestsException> => {
|
|
2825
|
-
const contents: TooManyRequestsException = {
|
|
2826
|
-
name: "TooManyRequestsException",
|
|
2827
|
-
$fault: "client",
|
|
2828
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2829
|
-
Message: undefined,
|
|
2830
|
-
};
|
|
2831
|
-
const data: any = parsedOutput.body;
|
|
2832
|
-
if (data.message !== undefined && data.message !== null) {
|
|
2833
|
-
contents.Message = __expectString(data.message);
|
|
2834
|
-
}
|
|
2835
|
-
return contents;
|
|
2836
|
-
};
|
|
2837
|
-
|
|
2838
|
-
const deserializeAws_restJson1UnprocessableEntityExceptionResponse = async (
|
|
2839
|
-
parsedOutput: any,
|
|
2840
|
-
context: __SerdeContext
|
|
2841
|
-
): Promise<UnprocessableEntityException> => {
|
|
2842
|
-
const contents: UnprocessableEntityException = {
|
|
2843
|
-
name: "UnprocessableEntityException",
|
|
2844
|
-
$fault: "client",
|
|
2845
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2846
|
-
Message: undefined,
|
|
2847
|
-
};
|
|
2848
|
-
const data: any = parsedOutput.body;
|
|
2849
|
-
if (data.message !== undefined && data.message !== null) {
|
|
2850
|
-
contents.Message = __expectString(data.message);
|
|
2851
|
-
}
|
|
2852
|
-
return contents;
|
|
2853
|
-
};
|
|
2854
|
-
|
|
2855
|
-
const serializeAws_restJson1__listOf__PeriodTriggersElement = (
|
|
2856
|
-
input: (__PeriodTriggersElement | string)[],
|
|
2857
|
-
context: __SerdeContext
|
|
2858
|
-
): any => {
|
|
2859
|
-
return input
|
|
2860
|
-
.filter((e: any) => e != null)
|
|
2861
|
-
.map((entry) => {
|
|
2862
|
-
if (entry === null) {
|
|
2863
|
-
return null as any;
|
|
2864
|
-
}
|
|
2865
|
-
return entry;
|
|
2866
|
-
});
|
|
2867
|
-
};
|
|
2868
|
-
|
|
2869
|
-
const serializeAws_restJson1__listOf__string = (input: string[], context: __SerdeContext): any => {
|
|
2870
|
-
return input
|
|
2871
|
-
.filter((e: any) => e != null)
|
|
2872
|
-
.map((entry) => {
|
|
2873
|
-
if (entry === null) {
|
|
2874
|
-
return null as any;
|
|
2875
|
-
}
|
|
2876
|
-
return entry;
|
|
2877
|
-
});
|
|
2878
|
-
};
|
|
2879
|
-
|
|
2880
|
-
const serializeAws_restJson1__listOfHlsManifestCreateOrUpdateParameters = (
|
|
2881
|
-
input: HlsManifestCreateOrUpdateParameters[],
|
|
2882
|
-
context: __SerdeContext
|
|
2883
|
-
): any => {
|
|
2884
|
-
return input
|
|
2885
|
-
.filter((e: any) => e != null)
|
|
2886
|
-
.map((entry) => {
|
|
2887
|
-
if (entry === null) {
|
|
2888
|
-
return null as any;
|
|
2889
|
-
}
|
|
2890
|
-
return serializeAws_restJson1HlsManifestCreateOrUpdateParameters(entry, context);
|
|
2891
|
-
});
|
|
2892
|
-
};
|
|
2893
|
-
|
|
2894
|
-
const serializeAws_restJson1__mapOf__string = (input: { [key: string]: string }, context: __SerdeContext): any => {
|
|
2895
|
-
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
|
|
2896
|
-
if (value === null) {
|
|
2897
|
-
return acc;
|
|
2898
|
-
}
|
|
2899
|
-
return {
|
|
2900
|
-
...acc,
|
|
2901
|
-
[key]: value,
|
|
2902
|
-
};
|
|
2903
|
-
}, {});
|
|
2904
|
-
};
|
|
2905
|
-
|
|
2906
|
-
const serializeAws_restJson1AdTriggers = (input: (__AdTriggersElement | string)[], context: __SerdeContext): any => {
|
|
2907
|
-
return input
|
|
2908
|
-
.filter((e: any) => e != null)
|
|
2909
|
-
.map((entry) => {
|
|
2910
|
-
if (entry === null) {
|
|
2911
|
-
return null as any;
|
|
2912
|
-
}
|
|
2913
|
-
return entry;
|
|
2914
|
-
});
|
|
2915
|
-
};
|
|
2916
|
-
|
|
2917
|
-
const serializeAws_restJson1Authorization = (input: Authorization, context: __SerdeContext): any => {
|
|
2918
|
-
return {
|
|
2919
|
-
...(input.CdnIdentifierSecret !== undefined &&
|
|
2920
|
-
input.CdnIdentifierSecret !== null && { cdnIdentifierSecret: input.CdnIdentifierSecret }),
|
|
2921
|
-
...(input.SecretsRoleArn !== undefined &&
|
|
2922
|
-
input.SecretsRoleArn !== null && { secretsRoleArn: input.SecretsRoleArn }),
|
|
2923
|
-
};
|
|
2924
|
-
};
|
|
2925
|
-
|
|
2926
|
-
const serializeAws_restJson1CmafEncryption = (input: CmafEncryption, context: __SerdeContext): any => {
|
|
2927
|
-
return {
|
|
2928
|
-
...(input.ConstantInitializationVector !== undefined &&
|
|
2929
|
-
input.ConstantInitializationVector !== null && {
|
|
2930
|
-
constantInitializationVector: input.ConstantInitializationVector,
|
|
2931
|
-
}),
|
|
2932
|
-
...(input.KeyRotationIntervalSeconds !== undefined &&
|
|
2933
|
-
input.KeyRotationIntervalSeconds !== null && { keyRotationIntervalSeconds: input.KeyRotationIntervalSeconds }),
|
|
2934
|
-
...(input.SpekeKeyProvider !== undefined &&
|
|
2935
|
-
input.SpekeKeyProvider !== null && {
|
|
2936
|
-
spekeKeyProvider: serializeAws_restJson1SpekeKeyProvider(input.SpekeKeyProvider, context),
|
|
2937
|
-
}),
|
|
2938
|
-
};
|
|
2939
|
-
};
|
|
2940
|
-
|
|
2941
|
-
const serializeAws_restJson1CmafPackageCreateOrUpdateParameters = (
|
|
2942
|
-
input: CmafPackageCreateOrUpdateParameters,
|
|
2943
|
-
context: __SerdeContext
|
|
2944
|
-
): any => {
|
|
2945
|
-
return {
|
|
2946
|
-
...(input.Encryption !== undefined &&
|
|
2947
|
-
input.Encryption !== null && { encryption: serializeAws_restJson1CmafEncryption(input.Encryption, context) }),
|
|
2948
|
-
...(input.HlsManifests !== undefined &&
|
|
2949
|
-
input.HlsManifests !== null && {
|
|
2950
|
-
hlsManifests: serializeAws_restJson1__listOfHlsManifestCreateOrUpdateParameters(input.HlsManifests, context),
|
|
2951
|
-
}),
|
|
2952
|
-
...(input.SegmentDurationSeconds !== undefined &&
|
|
2953
|
-
input.SegmentDurationSeconds !== null && { segmentDurationSeconds: input.SegmentDurationSeconds }),
|
|
2954
|
-
...(input.SegmentPrefix !== undefined && input.SegmentPrefix !== null && { segmentPrefix: input.SegmentPrefix }),
|
|
2955
|
-
...(input.StreamSelection !== undefined &&
|
|
2956
|
-
input.StreamSelection !== null && {
|
|
2957
|
-
streamSelection: serializeAws_restJson1StreamSelection(input.StreamSelection, context),
|
|
2958
|
-
}),
|
|
2959
|
-
};
|
|
2960
|
-
};
|
|
2961
|
-
|
|
2962
|
-
const serializeAws_restJson1DashEncryption = (input: DashEncryption, context: __SerdeContext): any => {
|
|
2963
|
-
return {
|
|
2964
|
-
...(input.KeyRotationIntervalSeconds !== undefined &&
|
|
2965
|
-
input.KeyRotationIntervalSeconds !== null && { keyRotationIntervalSeconds: input.KeyRotationIntervalSeconds }),
|
|
2966
|
-
...(input.SpekeKeyProvider !== undefined &&
|
|
2967
|
-
input.SpekeKeyProvider !== null && {
|
|
2968
|
-
spekeKeyProvider: serializeAws_restJson1SpekeKeyProvider(input.SpekeKeyProvider, context),
|
|
2969
|
-
}),
|
|
2970
|
-
};
|
|
2971
|
-
};
|
|
2972
|
-
|
|
2973
|
-
const serializeAws_restJson1DashPackage = (input: DashPackage, context: __SerdeContext): any => {
|
|
2974
|
-
return {
|
|
2975
|
-
...(input.AdTriggers !== undefined &&
|
|
2976
|
-
input.AdTriggers !== null && { adTriggers: serializeAws_restJson1AdTriggers(input.AdTriggers, context) }),
|
|
2977
|
-
...(input.AdsOnDeliveryRestrictions !== undefined &&
|
|
2978
|
-
input.AdsOnDeliveryRestrictions !== null && { adsOnDeliveryRestrictions: input.AdsOnDeliveryRestrictions }),
|
|
2979
|
-
...(input.Encryption !== undefined &&
|
|
2980
|
-
input.Encryption !== null && { encryption: serializeAws_restJson1DashEncryption(input.Encryption, context) }),
|
|
2981
|
-
...(input.ManifestLayout !== undefined &&
|
|
2982
|
-
input.ManifestLayout !== null && { manifestLayout: input.ManifestLayout }),
|
|
2983
|
-
...(input.ManifestWindowSeconds !== undefined &&
|
|
2984
|
-
input.ManifestWindowSeconds !== null && { manifestWindowSeconds: input.ManifestWindowSeconds }),
|
|
2985
|
-
...(input.MinBufferTimeSeconds !== undefined &&
|
|
2986
|
-
input.MinBufferTimeSeconds !== null && { minBufferTimeSeconds: input.MinBufferTimeSeconds }),
|
|
2987
|
-
...(input.MinUpdatePeriodSeconds !== undefined &&
|
|
2988
|
-
input.MinUpdatePeriodSeconds !== null && { minUpdatePeriodSeconds: input.MinUpdatePeriodSeconds }),
|
|
2989
|
-
...(input.PeriodTriggers !== undefined &&
|
|
2990
|
-
input.PeriodTriggers !== null && {
|
|
2991
|
-
periodTriggers: serializeAws_restJson1__listOf__PeriodTriggersElement(input.PeriodTriggers, context),
|
|
2992
|
-
}),
|
|
2993
|
-
...(input.Profile !== undefined && input.Profile !== null && { profile: input.Profile }),
|
|
2994
|
-
...(input.SegmentDurationSeconds !== undefined &&
|
|
2995
|
-
input.SegmentDurationSeconds !== null && { segmentDurationSeconds: input.SegmentDurationSeconds }),
|
|
2996
|
-
...(input.SegmentTemplateFormat !== undefined &&
|
|
2997
|
-
input.SegmentTemplateFormat !== null && { segmentTemplateFormat: input.SegmentTemplateFormat }),
|
|
2998
|
-
...(input.StreamSelection !== undefined &&
|
|
2999
|
-
input.StreamSelection !== null && {
|
|
3000
|
-
streamSelection: serializeAws_restJson1StreamSelection(input.StreamSelection, context),
|
|
3001
|
-
}),
|
|
3002
|
-
...(input.SuggestedPresentationDelaySeconds !== undefined &&
|
|
3003
|
-
input.SuggestedPresentationDelaySeconds !== null && {
|
|
3004
|
-
suggestedPresentationDelaySeconds: input.SuggestedPresentationDelaySeconds,
|
|
3005
|
-
}),
|
|
3006
|
-
...(input.UtcTiming !== undefined && input.UtcTiming !== null && { utcTiming: input.UtcTiming }),
|
|
3007
|
-
...(input.UtcTimingUri !== undefined && input.UtcTimingUri !== null && { utcTimingUri: input.UtcTimingUri }),
|
|
3008
|
-
};
|
|
3009
|
-
};
|
|
3010
|
-
|
|
3011
|
-
const serializeAws_restJson1EgressAccessLogs = (input: EgressAccessLogs, context: __SerdeContext): any => {
|
|
3012
|
-
return {
|
|
3013
|
-
...(input.LogGroupName !== undefined && input.LogGroupName !== null && { logGroupName: input.LogGroupName }),
|
|
3014
|
-
};
|
|
3015
|
-
};
|
|
3016
|
-
|
|
3017
|
-
const serializeAws_restJson1EncryptionContractConfiguration = (
|
|
3018
|
-
input: EncryptionContractConfiguration,
|
|
3019
|
-
context: __SerdeContext
|
|
3020
|
-
): any => {
|
|
3021
|
-
return {
|
|
3022
|
-
...(input.PresetSpeke20Audio !== undefined &&
|
|
3023
|
-
input.PresetSpeke20Audio !== null && { presetSpeke20Audio: input.PresetSpeke20Audio }),
|
|
3024
|
-
...(input.PresetSpeke20Video !== undefined &&
|
|
3025
|
-
input.PresetSpeke20Video !== null && { presetSpeke20Video: input.PresetSpeke20Video }),
|
|
3026
|
-
};
|
|
3027
|
-
};
|
|
3028
|
-
|
|
3029
|
-
const serializeAws_restJson1HlsEncryption = (input: HlsEncryption, context: __SerdeContext): any => {
|
|
3030
|
-
return {
|
|
3031
|
-
...(input.ConstantInitializationVector !== undefined &&
|
|
3032
|
-
input.ConstantInitializationVector !== null && {
|
|
3033
|
-
constantInitializationVector: input.ConstantInitializationVector,
|
|
3034
|
-
}),
|
|
3035
|
-
...(input.EncryptionMethod !== undefined &&
|
|
3036
|
-
input.EncryptionMethod !== null && { encryptionMethod: input.EncryptionMethod }),
|
|
3037
|
-
...(input.KeyRotationIntervalSeconds !== undefined &&
|
|
3038
|
-
input.KeyRotationIntervalSeconds !== null && { keyRotationIntervalSeconds: input.KeyRotationIntervalSeconds }),
|
|
3039
|
-
...(input.RepeatExtXKey !== undefined && input.RepeatExtXKey !== null && { repeatExtXKey: input.RepeatExtXKey }),
|
|
3040
|
-
...(input.SpekeKeyProvider !== undefined &&
|
|
3041
|
-
input.SpekeKeyProvider !== null && {
|
|
3042
|
-
spekeKeyProvider: serializeAws_restJson1SpekeKeyProvider(input.SpekeKeyProvider, context),
|
|
3043
|
-
}),
|
|
3044
|
-
};
|
|
3045
|
-
};
|
|
3046
|
-
|
|
3047
|
-
const serializeAws_restJson1HlsManifestCreateOrUpdateParameters = (
|
|
3048
|
-
input: HlsManifestCreateOrUpdateParameters,
|
|
3049
|
-
context: __SerdeContext
|
|
3050
|
-
): any => {
|
|
3051
|
-
return {
|
|
3052
|
-
...(input.AdMarkers !== undefined && input.AdMarkers !== null && { adMarkers: input.AdMarkers }),
|
|
3053
|
-
...(input.AdTriggers !== undefined &&
|
|
3054
|
-
input.AdTriggers !== null && { adTriggers: serializeAws_restJson1AdTriggers(input.AdTriggers, context) }),
|
|
3055
|
-
...(input.AdsOnDeliveryRestrictions !== undefined &&
|
|
3056
|
-
input.AdsOnDeliveryRestrictions !== null && { adsOnDeliveryRestrictions: input.AdsOnDeliveryRestrictions }),
|
|
3057
|
-
...(input.Id !== undefined && input.Id !== null && { id: input.Id }),
|
|
3058
|
-
...(input.IncludeIframeOnlyStream !== undefined &&
|
|
3059
|
-
input.IncludeIframeOnlyStream !== null && { includeIframeOnlyStream: input.IncludeIframeOnlyStream }),
|
|
3060
|
-
...(input.ManifestName !== undefined && input.ManifestName !== null && { manifestName: input.ManifestName }),
|
|
3061
|
-
...(input.PlaylistType !== undefined && input.PlaylistType !== null && { playlistType: input.PlaylistType }),
|
|
3062
|
-
...(input.PlaylistWindowSeconds !== undefined &&
|
|
3063
|
-
input.PlaylistWindowSeconds !== null && { playlistWindowSeconds: input.PlaylistWindowSeconds }),
|
|
3064
|
-
...(input.ProgramDateTimeIntervalSeconds !== undefined &&
|
|
3065
|
-
input.ProgramDateTimeIntervalSeconds !== null && {
|
|
3066
|
-
programDateTimeIntervalSeconds: input.ProgramDateTimeIntervalSeconds,
|
|
3067
|
-
}),
|
|
3068
|
-
};
|
|
3069
|
-
};
|
|
3070
|
-
|
|
3071
|
-
const serializeAws_restJson1HlsPackage = (input: HlsPackage, context: __SerdeContext): any => {
|
|
3072
|
-
return {
|
|
3073
|
-
...(input.AdMarkers !== undefined && input.AdMarkers !== null && { adMarkers: input.AdMarkers }),
|
|
3074
|
-
...(input.AdTriggers !== undefined &&
|
|
3075
|
-
input.AdTriggers !== null && { adTriggers: serializeAws_restJson1AdTriggers(input.AdTriggers, context) }),
|
|
3076
|
-
...(input.AdsOnDeliveryRestrictions !== undefined &&
|
|
3077
|
-
input.AdsOnDeliveryRestrictions !== null && { adsOnDeliveryRestrictions: input.AdsOnDeliveryRestrictions }),
|
|
3078
|
-
...(input.Encryption !== undefined &&
|
|
3079
|
-
input.Encryption !== null && { encryption: serializeAws_restJson1HlsEncryption(input.Encryption, context) }),
|
|
3080
|
-
...(input.IncludeIframeOnlyStream !== undefined &&
|
|
3081
|
-
input.IncludeIframeOnlyStream !== null && { includeIframeOnlyStream: input.IncludeIframeOnlyStream }),
|
|
3082
|
-
...(input.PlaylistType !== undefined && input.PlaylistType !== null && { playlistType: input.PlaylistType }),
|
|
3083
|
-
...(input.PlaylistWindowSeconds !== undefined &&
|
|
3084
|
-
input.PlaylistWindowSeconds !== null && { playlistWindowSeconds: input.PlaylistWindowSeconds }),
|
|
3085
|
-
...(input.ProgramDateTimeIntervalSeconds !== undefined &&
|
|
3086
|
-
input.ProgramDateTimeIntervalSeconds !== null && {
|
|
3087
|
-
programDateTimeIntervalSeconds: input.ProgramDateTimeIntervalSeconds,
|
|
3088
|
-
}),
|
|
3089
|
-
...(input.SegmentDurationSeconds !== undefined &&
|
|
3090
|
-
input.SegmentDurationSeconds !== null && { segmentDurationSeconds: input.SegmentDurationSeconds }),
|
|
3091
|
-
...(input.StreamSelection !== undefined &&
|
|
3092
|
-
input.StreamSelection !== null && {
|
|
3093
|
-
streamSelection: serializeAws_restJson1StreamSelection(input.StreamSelection, context),
|
|
3094
|
-
}),
|
|
3095
|
-
...(input.UseAudioRenditionGroup !== undefined &&
|
|
3096
|
-
input.UseAudioRenditionGroup !== null && { useAudioRenditionGroup: input.UseAudioRenditionGroup }),
|
|
3097
|
-
};
|
|
3098
|
-
};
|
|
3099
|
-
|
|
3100
|
-
const serializeAws_restJson1IngressAccessLogs = (input: IngressAccessLogs, context: __SerdeContext): any => {
|
|
3101
|
-
return {
|
|
3102
|
-
...(input.LogGroupName !== undefined && input.LogGroupName !== null && { logGroupName: input.LogGroupName }),
|
|
3103
|
-
};
|
|
3104
|
-
};
|
|
3105
|
-
|
|
3106
|
-
const serializeAws_restJson1MssEncryption = (input: MssEncryption, context: __SerdeContext): any => {
|
|
3107
|
-
return {
|
|
3108
|
-
...(input.SpekeKeyProvider !== undefined &&
|
|
3109
|
-
input.SpekeKeyProvider !== null && {
|
|
3110
|
-
spekeKeyProvider: serializeAws_restJson1SpekeKeyProvider(input.SpekeKeyProvider, context),
|
|
3111
|
-
}),
|
|
3112
|
-
};
|
|
3113
|
-
};
|
|
3114
|
-
|
|
3115
|
-
const serializeAws_restJson1MssPackage = (input: MssPackage, context: __SerdeContext): any => {
|
|
3116
|
-
return {
|
|
3117
|
-
...(input.Encryption !== undefined &&
|
|
3118
|
-
input.Encryption !== null && { encryption: serializeAws_restJson1MssEncryption(input.Encryption, context) }),
|
|
3119
|
-
...(input.ManifestWindowSeconds !== undefined &&
|
|
3120
|
-
input.ManifestWindowSeconds !== null && { manifestWindowSeconds: input.ManifestWindowSeconds }),
|
|
3121
|
-
...(input.SegmentDurationSeconds !== undefined &&
|
|
3122
|
-
input.SegmentDurationSeconds !== null && { segmentDurationSeconds: input.SegmentDurationSeconds }),
|
|
3123
|
-
...(input.StreamSelection !== undefined &&
|
|
3124
|
-
input.StreamSelection !== null && {
|
|
3125
|
-
streamSelection: serializeAws_restJson1StreamSelection(input.StreamSelection, context),
|
|
3126
|
-
}),
|
|
3127
|
-
};
|
|
3128
|
-
};
|
|
3129
|
-
|
|
3130
|
-
const serializeAws_restJson1S3Destination = (input: S3Destination, context: __SerdeContext): any => {
|
|
3131
|
-
return {
|
|
3132
|
-
...(input.BucketName !== undefined && input.BucketName !== null && { bucketName: input.BucketName }),
|
|
3133
|
-
...(input.ManifestKey !== undefined && input.ManifestKey !== null && { manifestKey: input.ManifestKey }),
|
|
3134
|
-
...(input.RoleArn !== undefined && input.RoleArn !== null && { roleArn: input.RoleArn }),
|
|
3135
|
-
};
|
|
3136
|
-
};
|
|
3137
|
-
|
|
3138
|
-
const serializeAws_restJson1SpekeKeyProvider = (input: SpekeKeyProvider, context: __SerdeContext): any => {
|
|
3139
|
-
return {
|
|
3140
|
-
...(input.CertificateArn !== undefined &&
|
|
3141
|
-
input.CertificateArn !== null && { certificateArn: input.CertificateArn }),
|
|
3142
|
-
...(input.EncryptionContractConfiguration !== undefined &&
|
|
3143
|
-
input.EncryptionContractConfiguration !== null && {
|
|
3144
|
-
encryptionContractConfiguration: serializeAws_restJson1EncryptionContractConfiguration(
|
|
3145
|
-
input.EncryptionContractConfiguration,
|
|
3146
|
-
context
|
|
3147
|
-
),
|
|
3148
|
-
}),
|
|
3149
|
-
...(input.ResourceId !== undefined && input.ResourceId !== null && { resourceId: input.ResourceId }),
|
|
3150
|
-
...(input.RoleArn !== undefined && input.RoleArn !== null && { roleArn: input.RoleArn }),
|
|
3151
|
-
...(input.SystemIds !== undefined &&
|
|
3152
|
-
input.SystemIds !== null && { systemIds: serializeAws_restJson1__listOf__string(input.SystemIds, context) }),
|
|
3153
|
-
...(input.Url !== undefined && input.Url !== null && { url: input.Url }),
|
|
3154
|
-
};
|
|
3155
|
-
};
|
|
3156
|
-
|
|
3157
|
-
const serializeAws_restJson1StreamSelection = (input: StreamSelection, context: __SerdeContext): any => {
|
|
3158
|
-
return {
|
|
3159
|
-
...(input.MaxVideoBitsPerSecond !== undefined &&
|
|
3160
|
-
input.MaxVideoBitsPerSecond !== null && { maxVideoBitsPerSecond: input.MaxVideoBitsPerSecond }),
|
|
3161
|
-
...(input.MinVideoBitsPerSecond !== undefined &&
|
|
3162
|
-
input.MinVideoBitsPerSecond !== null && { minVideoBitsPerSecond: input.MinVideoBitsPerSecond }),
|
|
3163
|
-
...(input.StreamOrder !== undefined && input.StreamOrder !== null && { streamOrder: input.StreamOrder }),
|
|
3164
|
-
};
|
|
3165
|
-
};
|
|
3166
|
-
|
|
3167
|
-
const serializeAws_restJson1Tags = (input: { [key: string]: string }, context: __SerdeContext): any => {
|
|
3168
|
-
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
|
|
3169
|
-
if (value === null) {
|
|
3170
|
-
return acc;
|
|
3171
|
-
}
|
|
3172
|
-
return {
|
|
3173
|
-
...acc,
|
|
3174
|
-
[key]: value,
|
|
3175
|
-
};
|
|
3176
|
-
}, {});
|
|
3177
|
-
};
|
|
3178
|
-
|
|
3179
|
-
const deserializeAws_restJson1__listOf__PeriodTriggersElement = (
|
|
3180
|
-
output: any,
|
|
3181
|
-
context: __SerdeContext
|
|
3182
|
-
): (__PeriodTriggersElement | string)[] => {
|
|
3183
|
-
return (output || [])
|
|
3184
|
-
.filter((e: any) => e != null)
|
|
3185
|
-
.map((entry: any) => {
|
|
3186
|
-
if (entry === null) {
|
|
3187
|
-
return null as any;
|
|
3188
|
-
}
|
|
3189
|
-
return __expectString(entry) as any;
|
|
3190
|
-
});
|
|
3191
|
-
};
|
|
3192
|
-
|
|
3193
|
-
const deserializeAws_restJson1__listOf__string = (output: any, context: __SerdeContext): string[] => {
|
|
3194
|
-
return (output || [])
|
|
3195
|
-
.filter((e: any) => e != null)
|
|
3196
|
-
.map((entry: any) => {
|
|
3197
|
-
if (entry === null) {
|
|
3198
|
-
return null as any;
|
|
3199
|
-
}
|
|
3200
|
-
return __expectString(entry) as any;
|
|
3201
|
-
});
|
|
3202
|
-
};
|
|
3203
|
-
|
|
3204
|
-
const deserializeAws_restJson1__listOfChannel = (output: any, context: __SerdeContext): Channel[] => {
|
|
3205
|
-
return (output || [])
|
|
3206
|
-
.filter((e: any) => e != null)
|
|
3207
|
-
.map((entry: any) => {
|
|
3208
|
-
if (entry === null) {
|
|
3209
|
-
return null as any;
|
|
3210
|
-
}
|
|
3211
|
-
return deserializeAws_restJson1Channel(entry, context);
|
|
3212
|
-
});
|
|
3213
|
-
};
|
|
3214
|
-
|
|
3215
|
-
const deserializeAws_restJson1__listOfHarvestJob = (output: any, context: __SerdeContext): HarvestJob[] => {
|
|
3216
|
-
return (output || [])
|
|
3217
|
-
.filter((e: any) => e != null)
|
|
3218
|
-
.map((entry: any) => {
|
|
3219
|
-
if (entry === null) {
|
|
3220
|
-
return null as any;
|
|
3221
|
-
}
|
|
3222
|
-
return deserializeAws_restJson1HarvestJob(entry, context);
|
|
3223
|
-
});
|
|
3224
|
-
};
|
|
3225
|
-
|
|
3226
|
-
const deserializeAws_restJson1__listOfHlsManifest = (output: any, context: __SerdeContext): HlsManifest[] => {
|
|
3227
|
-
return (output || [])
|
|
3228
|
-
.filter((e: any) => e != null)
|
|
3229
|
-
.map((entry: any) => {
|
|
3230
|
-
if (entry === null) {
|
|
3231
|
-
return null as any;
|
|
3232
|
-
}
|
|
3233
|
-
return deserializeAws_restJson1HlsManifest(entry, context);
|
|
3234
|
-
});
|
|
3235
|
-
};
|
|
3236
|
-
|
|
3237
|
-
const deserializeAws_restJson1__listOfIngestEndpoint = (output: any, context: __SerdeContext): IngestEndpoint[] => {
|
|
3238
|
-
return (output || [])
|
|
3239
|
-
.filter((e: any) => e != null)
|
|
3240
|
-
.map((entry: any) => {
|
|
3241
|
-
if (entry === null) {
|
|
3242
|
-
return null as any;
|
|
3243
|
-
}
|
|
3244
|
-
return deserializeAws_restJson1IngestEndpoint(entry, context);
|
|
3245
|
-
});
|
|
3246
|
-
};
|
|
3247
|
-
|
|
3248
|
-
const deserializeAws_restJson1__listOfOriginEndpoint = (output: any, context: __SerdeContext): OriginEndpoint[] => {
|
|
3249
|
-
return (output || [])
|
|
3250
|
-
.filter((e: any) => e != null)
|
|
3251
|
-
.map((entry: any) => {
|
|
3252
|
-
if (entry === null) {
|
|
3253
|
-
return null as any;
|
|
3254
|
-
}
|
|
3255
|
-
return deserializeAws_restJson1OriginEndpoint(entry, context);
|
|
3256
|
-
});
|
|
3257
|
-
};
|
|
3258
|
-
|
|
3259
|
-
const deserializeAws_restJson1__mapOf__string = (output: any, context: __SerdeContext): { [key: string]: string } => {
|
|
3260
|
-
return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
|
|
3261
|
-
if (value === null) {
|
|
3262
|
-
return acc;
|
|
3263
|
-
}
|
|
3264
|
-
return {
|
|
3265
|
-
...acc,
|
|
3266
|
-
[key]: __expectString(value) as any,
|
|
3267
|
-
};
|
|
3268
|
-
}, {});
|
|
3269
|
-
};
|
|
3270
|
-
|
|
3271
|
-
const deserializeAws_restJson1AdTriggers = (output: any, context: __SerdeContext): (__AdTriggersElement | string)[] => {
|
|
3272
|
-
return (output || [])
|
|
3273
|
-
.filter((e: any) => e != null)
|
|
3274
|
-
.map((entry: any) => {
|
|
3275
|
-
if (entry === null) {
|
|
3276
|
-
return null as any;
|
|
3277
|
-
}
|
|
3278
|
-
return __expectString(entry) as any;
|
|
3279
|
-
});
|
|
3280
|
-
};
|
|
3281
|
-
|
|
3282
|
-
const deserializeAws_restJson1Authorization = (output: any, context: __SerdeContext): Authorization => {
|
|
3283
|
-
return {
|
|
3284
|
-
CdnIdentifierSecret: __expectString(output.cdnIdentifierSecret),
|
|
3285
|
-
SecretsRoleArn: __expectString(output.secretsRoleArn),
|
|
3286
|
-
} as any;
|
|
3287
|
-
};
|
|
3288
|
-
|
|
3289
|
-
const deserializeAws_restJson1Channel = (output: any, context: __SerdeContext): Channel => {
|
|
3290
|
-
return {
|
|
3291
|
-
Arn: __expectString(output.arn),
|
|
3292
|
-
Description: __expectString(output.description),
|
|
3293
|
-
EgressAccessLogs:
|
|
3294
|
-
output.egressAccessLogs !== undefined && output.egressAccessLogs !== null
|
|
3295
|
-
? deserializeAws_restJson1EgressAccessLogs(output.egressAccessLogs, context)
|
|
3296
|
-
: undefined,
|
|
3297
|
-
HlsIngest:
|
|
3298
|
-
output.hlsIngest !== undefined && output.hlsIngest !== null
|
|
3299
|
-
? deserializeAws_restJson1HlsIngest(output.hlsIngest, context)
|
|
3300
|
-
: undefined,
|
|
3301
|
-
Id: __expectString(output.id),
|
|
3302
|
-
IngressAccessLogs:
|
|
3303
|
-
output.ingressAccessLogs !== undefined && output.ingressAccessLogs !== null
|
|
3304
|
-
? deserializeAws_restJson1IngressAccessLogs(output.ingressAccessLogs, context)
|
|
3305
|
-
: undefined,
|
|
3306
|
-
Tags:
|
|
3307
|
-
output.tags !== undefined && output.tags !== null
|
|
3308
|
-
? deserializeAws_restJson1Tags(output.tags, context)
|
|
3309
|
-
: undefined,
|
|
3310
|
-
} as any;
|
|
3311
|
-
};
|
|
3312
|
-
|
|
3313
|
-
const deserializeAws_restJson1CmafEncryption = (output: any, context: __SerdeContext): CmafEncryption => {
|
|
3314
|
-
return {
|
|
3315
|
-
ConstantInitializationVector: __expectString(output.constantInitializationVector),
|
|
3316
|
-
KeyRotationIntervalSeconds: __expectInt32(output.keyRotationIntervalSeconds),
|
|
3317
|
-
SpekeKeyProvider:
|
|
3318
|
-
output.spekeKeyProvider !== undefined && output.spekeKeyProvider !== null
|
|
3319
|
-
? deserializeAws_restJson1SpekeKeyProvider(output.spekeKeyProvider, context)
|
|
3320
|
-
: undefined,
|
|
3321
|
-
} as any;
|
|
3322
|
-
};
|
|
3323
|
-
|
|
3324
|
-
const deserializeAws_restJson1CmafPackage = (output: any, context: __SerdeContext): CmafPackage => {
|
|
3325
|
-
return {
|
|
3326
|
-
Encryption:
|
|
3327
|
-
output.encryption !== undefined && output.encryption !== null
|
|
3328
|
-
? deserializeAws_restJson1CmafEncryption(output.encryption, context)
|
|
3329
|
-
: undefined,
|
|
3330
|
-
HlsManifests:
|
|
3331
|
-
output.hlsManifests !== undefined && output.hlsManifests !== null
|
|
3332
|
-
? deserializeAws_restJson1__listOfHlsManifest(output.hlsManifests, context)
|
|
3333
|
-
: undefined,
|
|
3334
|
-
SegmentDurationSeconds: __expectInt32(output.segmentDurationSeconds),
|
|
3335
|
-
SegmentPrefix: __expectString(output.segmentPrefix),
|
|
3336
|
-
StreamSelection:
|
|
3337
|
-
output.streamSelection !== undefined && output.streamSelection !== null
|
|
3338
|
-
? deserializeAws_restJson1StreamSelection(output.streamSelection, context)
|
|
3339
|
-
: undefined,
|
|
3340
|
-
} as any;
|
|
3341
|
-
};
|
|
3342
|
-
|
|
3343
|
-
const deserializeAws_restJson1DashEncryption = (output: any, context: __SerdeContext): DashEncryption => {
|
|
3344
|
-
return {
|
|
3345
|
-
KeyRotationIntervalSeconds: __expectInt32(output.keyRotationIntervalSeconds),
|
|
3346
|
-
SpekeKeyProvider:
|
|
3347
|
-
output.spekeKeyProvider !== undefined && output.spekeKeyProvider !== null
|
|
3348
|
-
? deserializeAws_restJson1SpekeKeyProvider(output.spekeKeyProvider, context)
|
|
3349
|
-
: undefined,
|
|
3350
|
-
} as any;
|
|
3351
|
-
};
|
|
3352
|
-
|
|
3353
|
-
const deserializeAws_restJson1DashPackage = (output: any, context: __SerdeContext): DashPackage => {
|
|
3354
|
-
return {
|
|
3355
|
-
AdTriggers:
|
|
3356
|
-
output.adTriggers !== undefined && output.adTriggers !== null
|
|
3357
|
-
? deserializeAws_restJson1AdTriggers(output.adTriggers, context)
|
|
3358
|
-
: undefined,
|
|
3359
|
-
AdsOnDeliveryRestrictions: __expectString(output.adsOnDeliveryRestrictions),
|
|
3360
|
-
Encryption:
|
|
3361
|
-
output.encryption !== undefined && output.encryption !== null
|
|
3362
|
-
? deserializeAws_restJson1DashEncryption(output.encryption, context)
|
|
3363
|
-
: undefined,
|
|
3364
|
-
ManifestLayout: __expectString(output.manifestLayout),
|
|
3365
|
-
ManifestWindowSeconds: __expectInt32(output.manifestWindowSeconds),
|
|
3366
|
-
MinBufferTimeSeconds: __expectInt32(output.minBufferTimeSeconds),
|
|
3367
|
-
MinUpdatePeriodSeconds: __expectInt32(output.minUpdatePeriodSeconds),
|
|
3368
|
-
PeriodTriggers:
|
|
3369
|
-
output.periodTriggers !== undefined && output.periodTriggers !== null
|
|
3370
|
-
? deserializeAws_restJson1__listOf__PeriodTriggersElement(output.periodTriggers, context)
|
|
3371
|
-
: undefined,
|
|
3372
|
-
Profile: __expectString(output.profile),
|
|
3373
|
-
SegmentDurationSeconds: __expectInt32(output.segmentDurationSeconds),
|
|
3374
|
-
SegmentTemplateFormat: __expectString(output.segmentTemplateFormat),
|
|
3375
|
-
StreamSelection:
|
|
3376
|
-
output.streamSelection !== undefined && output.streamSelection !== null
|
|
3377
|
-
? deserializeAws_restJson1StreamSelection(output.streamSelection, context)
|
|
3378
|
-
: undefined,
|
|
3379
|
-
SuggestedPresentationDelaySeconds: __expectInt32(output.suggestedPresentationDelaySeconds),
|
|
3380
|
-
UtcTiming: __expectString(output.utcTiming),
|
|
3381
|
-
UtcTimingUri: __expectString(output.utcTimingUri),
|
|
3382
|
-
} as any;
|
|
3383
|
-
};
|
|
3384
|
-
|
|
3385
|
-
const deserializeAws_restJson1EgressAccessLogs = (output: any, context: __SerdeContext): EgressAccessLogs => {
|
|
3386
|
-
return {
|
|
3387
|
-
LogGroupName: __expectString(output.logGroupName),
|
|
3388
|
-
} as any;
|
|
3389
|
-
};
|
|
3390
|
-
|
|
3391
|
-
const deserializeAws_restJson1EncryptionContractConfiguration = (
|
|
3392
|
-
output: any,
|
|
3393
|
-
context: __SerdeContext
|
|
3394
|
-
): EncryptionContractConfiguration => {
|
|
3395
|
-
return {
|
|
3396
|
-
PresetSpeke20Audio: __expectString(output.presetSpeke20Audio),
|
|
3397
|
-
PresetSpeke20Video: __expectString(output.presetSpeke20Video),
|
|
3398
|
-
} as any;
|
|
3399
|
-
};
|
|
3400
|
-
|
|
3401
|
-
const deserializeAws_restJson1HarvestJob = (output: any, context: __SerdeContext): HarvestJob => {
|
|
3402
|
-
return {
|
|
3403
|
-
Arn: __expectString(output.arn),
|
|
3404
|
-
ChannelId: __expectString(output.channelId),
|
|
3405
|
-
CreatedAt: __expectString(output.createdAt),
|
|
3406
|
-
EndTime: __expectString(output.endTime),
|
|
3407
|
-
Id: __expectString(output.id),
|
|
3408
|
-
OriginEndpointId: __expectString(output.originEndpointId),
|
|
3409
|
-
S3Destination:
|
|
3410
|
-
output.s3Destination !== undefined && output.s3Destination !== null
|
|
3411
|
-
? deserializeAws_restJson1S3Destination(output.s3Destination, context)
|
|
3412
|
-
: undefined,
|
|
3413
|
-
StartTime: __expectString(output.startTime),
|
|
3414
|
-
Status: __expectString(output.status),
|
|
3415
|
-
} as any;
|
|
3416
|
-
};
|
|
3417
|
-
|
|
3418
|
-
const deserializeAws_restJson1HlsEncryption = (output: any, context: __SerdeContext): HlsEncryption => {
|
|
3419
|
-
return {
|
|
3420
|
-
ConstantInitializationVector: __expectString(output.constantInitializationVector),
|
|
3421
|
-
EncryptionMethod: __expectString(output.encryptionMethod),
|
|
3422
|
-
KeyRotationIntervalSeconds: __expectInt32(output.keyRotationIntervalSeconds),
|
|
3423
|
-
RepeatExtXKey: __expectBoolean(output.repeatExtXKey),
|
|
3424
|
-
SpekeKeyProvider:
|
|
3425
|
-
output.spekeKeyProvider !== undefined && output.spekeKeyProvider !== null
|
|
3426
|
-
? deserializeAws_restJson1SpekeKeyProvider(output.spekeKeyProvider, context)
|
|
3427
|
-
: undefined,
|
|
3428
|
-
} as any;
|
|
3429
|
-
};
|
|
3430
|
-
|
|
3431
|
-
const deserializeAws_restJson1HlsIngest = (output: any, context: __SerdeContext): HlsIngest => {
|
|
3432
|
-
return {
|
|
3433
|
-
IngestEndpoints:
|
|
3434
|
-
output.ingestEndpoints !== undefined && output.ingestEndpoints !== null
|
|
3435
|
-
? deserializeAws_restJson1__listOfIngestEndpoint(output.ingestEndpoints, context)
|
|
3436
|
-
: undefined,
|
|
3437
|
-
} as any;
|
|
3438
|
-
};
|
|
3439
|
-
|
|
3440
|
-
const deserializeAws_restJson1HlsManifest = (output: any, context: __SerdeContext): HlsManifest => {
|
|
3441
|
-
return {
|
|
3442
|
-
AdMarkers: __expectString(output.adMarkers),
|
|
3443
|
-
Id: __expectString(output.id),
|
|
3444
|
-
IncludeIframeOnlyStream: __expectBoolean(output.includeIframeOnlyStream),
|
|
3445
|
-
ManifestName: __expectString(output.manifestName),
|
|
3446
|
-
PlaylistType: __expectString(output.playlistType),
|
|
3447
|
-
PlaylistWindowSeconds: __expectInt32(output.playlistWindowSeconds),
|
|
3448
|
-
ProgramDateTimeIntervalSeconds: __expectInt32(output.programDateTimeIntervalSeconds),
|
|
3449
|
-
Url: __expectString(output.url),
|
|
3450
|
-
} as any;
|
|
3451
|
-
};
|
|
3452
|
-
|
|
3453
|
-
const deserializeAws_restJson1HlsPackage = (output: any, context: __SerdeContext): HlsPackage => {
|
|
3454
|
-
return {
|
|
3455
|
-
AdMarkers: __expectString(output.adMarkers),
|
|
3456
|
-
AdTriggers:
|
|
3457
|
-
output.adTriggers !== undefined && output.adTriggers !== null
|
|
3458
|
-
? deserializeAws_restJson1AdTriggers(output.adTriggers, context)
|
|
3459
|
-
: undefined,
|
|
3460
|
-
AdsOnDeliveryRestrictions: __expectString(output.adsOnDeliveryRestrictions),
|
|
3461
|
-
Encryption:
|
|
3462
|
-
output.encryption !== undefined && output.encryption !== null
|
|
3463
|
-
? deserializeAws_restJson1HlsEncryption(output.encryption, context)
|
|
3464
|
-
: undefined,
|
|
3465
|
-
IncludeIframeOnlyStream: __expectBoolean(output.includeIframeOnlyStream),
|
|
3466
|
-
PlaylistType: __expectString(output.playlistType),
|
|
3467
|
-
PlaylistWindowSeconds: __expectInt32(output.playlistWindowSeconds),
|
|
3468
|
-
ProgramDateTimeIntervalSeconds: __expectInt32(output.programDateTimeIntervalSeconds),
|
|
3469
|
-
SegmentDurationSeconds: __expectInt32(output.segmentDurationSeconds),
|
|
3470
|
-
StreamSelection:
|
|
3471
|
-
output.streamSelection !== undefined && output.streamSelection !== null
|
|
3472
|
-
? deserializeAws_restJson1StreamSelection(output.streamSelection, context)
|
|
3473
|
-
: undefined,
|
|
3474
|
-
UseAudioRenditionGroup: __expectBoolean(output.useAudioRenditionGroup),
|
|
3475
|
-
} as any;
|
|
3476
|
-
};
|
|
3477
|
-
|
|
3478
|
-
const deserializeAws_restJson1IngestEndpoint = (output: any, context: __SerdeContext): IngestEndpoint => {
|
|
3479
|
-
return {
|
|
3480
|
-
Id: __expectString(output.id),
|
|
3481
|
-
Password: __expectString(output.password),
|
|
3482
|
-
Url: __expectString(output.url),
|
|
3483
|
-
Username: __expectString(output.username),
|
|
3484
|
-
} as any;
|
|
3485
|
-
};
|
|
3486
|
-
|
|
3487
|
-
const deserializeAws_restJson1IngressAccessLogs = (output: any, context: __SerdeContext): IngressAccessLogs => {
|
|
3488
|
-
return {
|
|
3489
|
-
LogGroupName: __expectString(output.logGroupName),
|
|
3490
|
-
} as any;
|
|
3491
|
-
};
|
|
3492
|
-
|
|
3493
|
-
const deserializeAws_restJson1MssEncryption = (output: any, context: __SerdeContext): MssEncryption => {
|
|
3494
|
-
return {
|
|
3495
|
-
SpekeKeyProvider:
|
|
3496
|
-
output.spekeKeyProvider !== undefined && output.spekeKeyProvider !== null
|
|
3497
|
-
? deserializeAws_restJson1SpekeKeyProvider(output.spekeKeyProvider, context)
|
|
3498
|
-
: undefined,
|
|
3499
|
-
} as any;
|
|
3500
|
-
};
|
|
3501
|
-
|
|
3502
|
-
const deserializeAws_restJson1MssPackage = (output: any, context: __SerdeContext): MssPackage => {
|
|
3503
|
-
return {
|
|
3504
|
-
Encryption:
|
|
3505
|
-
output.encryption !== undefined && output.encryption !== null
|
|
3506
|
-
? deserializeAws_restJson1MssEncryption(output.encryption, context)
|
|
3507
|
-
: undefined,
|
|
3508
|
-
ManifestWindowSeconds: __expectInt32(output.manifestWindowSeconds),
|
|
3509
|
-
SegmentDurationSeconds: __expectInt32(output.segmentDurationSeconds),
|
|
3510
|
-
StreamSelection:
|
|
3511
|
-
output.streamSelection !== undefined && output.streamSelection !== null
|
|
3512
|
-
? deserializeAws_restJson1StreamSelection(output.streamSelection, context)
|
|
3513
|
-
: undefined,
|
|
3514
|
-
} as any;
|
|
3515
|
-
};
|
|
3516
|
-
|
|
3517
|
-
const deserializeAws_restJson1OriginEndpoint = (output: any, context: __SerdeContext): OriginEndpoint => {
|
|
3518
|
-
return {
|
|
3519
|
-
Arn: __expectString(output.arn),
|
|
3520
|
-
Authorization:
|
|
3521
|
-
output.authorization !== undefined && output.authorization !== null
|
|
3522
|
-
? deserializeAws_restJson1Authorization(output.authorization, context)
|
|
3523
|
-
: undefined,
|
|
3524
|
-
ChannelId: __expectString(output.channelId),
|
|
3525
|
-
CmafPackage:
|
|
3526
|
-
output.cmafPackage !== undefined && output.cmafPackage !== null
|
|
3527
|
-
? deserializeAws_restJson1CmafPackage(output.cmafPackage, context)
|
|
3528
|
-
: undefined,
|
|
3529
|
-
DashPackage:
|
|
3530
|
-
output.dashPackage !== undefined && output.dashPackage !== null
|
|
3531
|
-
? deserializeAws_restJson1DashPackage(output.dashPackage, context)
|
|
3532
|
-
: undefined,
|
|
3533
|
-
Description: __expectString(output.description),
|
|
3534
|
-
HlsPackage:
|
|
3535
|
-
output.hlsPackage !== undefined && output.hlsPackage !== null
|
|
3536
|
-
? deserializeAws_restJson1HlsPackage(output.hlsPackage, context)
|
|
3537
|
-
: undefined,
|
|
3538
|
-
Id: __expectString(output.id),
|
|
3539
|
-
ManifestName: __expectString(output.manifestName),
|
|
3540
|
-
MssPackage:
|
|
3541
|
-
output.mssPackage !== undefined && output.mssPackage !== null
|
|
3542
|
-
? deserializeAws_restJson1MssPackage(output.mssPackage, context)
|
|
3543
|
-
: undefined,
|
|
3544
|
-
Origination: __expectString(output.origination),
|
|
3545
|
-
StartoverWindowSeconds: __expectInt32(output.startoverWindowSeconds),
|
|
3546
|
-
Tags:
|
|
3547
|
-
output.tags !== undefined && output.tags !== null
|
|
3548
|
-
? deserializeAws_restJson1Tags(output.tags, context)
|
|
3549
|
-
: undefined,
|
|
3550
|
-
TimeDelaySeconds: __expectInt32(output.timeDelaySeconds),
|
|
3551
|
-
Url: __expectString(output.url),
|
|
3552
|
-
Whitelist:
|
|
3553
|
-
output.whitelist !== undefined && output.whitelist !== null
|
|
3554
|
-
? deserializeAws_restJson1__listOf__string(output.whitelist, context)
|
|
3555
|
-
: undefined,
|
|
3556
|
-
} as any;
|
|
3557
|
-
};
|
|
3558
|
-
|
|
3559
|
-
const deserializeAws_restJson1S3Destination = (output: any, context: __SerdeContext): S3Destination => {
|
|
3560
|
-
return {
|
|
3561
|
-
BucketName: __expectString(output.bucketName),
|
|
3562
|
-
ManifestKey: __expectString(output.manifestKey),
|
|
3563
|
-
RoleArn: __expectString(output.roleArn),
|
|
3564
|
-
} as any;
|
|
3565
|
-
};
|
|
3566
|
-
|
|
3567
|
-
const deserializeAws_restJson1SpekeKeyProvider = (output: any, context: __SerdeContext): SpekeKeyProvider => {
|
|
3568
|
-
return {
|
|
3569
|
-
CertificateArn: __expectString(output.certificateArn),
|
|
3570
|
-
EncryptionContractConfiguration:
|
|
3571
|
-
output.encryptionContractConfiguration !== undefined && output.encryptionContractConfiguration !== null
|
|
3572
|
-
? deserializeAws_restJson1EncryptionContractConfiguration(output.encryptionContractConfiguration, context)
|
|
3573
|
-
: undefined,
|
|
3574
|
-
ResourceId: __expectString(output.resourceId),
|
|
3575
|
-
RoleArn: __expectString(output.roleArn),
|
|
3576
|
-
SystemIds:
|
|
3577
|
-
output.systemIds !== undefined && output.systemIds !== null
|
|
3578
|
-
? deserializeAws_restJson1__listOf__string(output.systemIds, context)
|
|
3579
|
-
: undefined,
|
|
3580
|
-
Url: __expectString(output.url),
|
|
3581
|
-
} as any;
|
|
3582
|
-
};
|
|
3583
|
-
|
|
3584
|
-
const deserializeAws_restJson1StreamSelection = (output: any, context: __SerdeContext): StreamSelection => {
|
|
3585
|
-
return {
|
|
3586
|
-
MaxVideoBitsPerSecond: __expectInt32(output.maxVideoBitsPerSecond),
|
|
3587
|
-
MinVideoBitsPerSecond: __expectInt32(output.minVideoBitsPerSecond),
|
|
3588
|
-
StreamOrder: __expectString(output.streamOrder),
|
|
3589
|
-
} as any;
|
|
3590
|
-
};
|
|
3591
|
-
|
|
3592
|
-
const deserializeAws_restJson1Tags = (output: any, context: __SerdeContext): { [key: string]: string } => {
|
|
3593
|
-
return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
|
|
3594
|
-
if (value === null) {
|
|
3595
|
-
return acc;
|
|
3596
|
-
}
|
|
3597
|
-
return {
|
|
3598
|
-
...acc,
|
|
3599
|
-
[key]: __expectString(value) as any,
|
|
3600
|
-
};
|
|
3601
|
-
}, {});
|
|
3602
|
-
};
|
|
3603
|
-
|
|
3604
|
-
const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
|
|
3605
|
-
httpStatusCode: output.statusCode,
|
|
3606
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
3607
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
3608
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
3609
|
-
});
|
|
3610
|
-
|
|
3611
|
-
// Collect low-level response body stream to Uint8Array.
|
|
3612
|
-
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
|
|
3613
|
-
if (streamBody instanceof Uint8Array) {
|
|
3614
|
-
return Promise.resolve(streamBody);
|
|
3615
|
-
}
|
|
3616
|
-
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
3617
|
-
};
|
|
3618
|
-
|
|
3619
|
-
// Encode Uint8Array data into string with utf-8.
|
|
3620
|
-
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
|
|
3621
|
-
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
3622
|
-
|
|
3623
|
-
const isSerializableHeaderValue = (value: any): boolean =>
|
|
3624
|
-
value !== undefined &&
|
|
3625
|
-
value !== null &&
|
|
3626
|
-
value !== "" &&
|
|
3627
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
3628
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
3629
|
-
|
|
3630
|
-
const parseBody = (streamBody: any, context: __SerdeContext): any =>
|
|
3631
|
-
collectBodyString(streamBody, context).then((encoded) => {
|
|
3632
|
-
if (encoded.length) {
|
|
3633
|
-
return JSON.parse(encoded);
|
|
3634
|
-
}
|
|
3635
|
-
return {};
|
|
3636
|
-
});
|
|
3637
|
-
|
|
3638
|
-
/**
|
|
3639
|
-
* Load an error code for the aws.rest-json-1.1 protocol.
|
|
3640
|
-
*/
|
|
3641
|
-
const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
|
|
3642
|
-
const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
3643
|
-
|
|
3644
|
-
const sanitizeErrorCode = (rawValue: string): string => {
|
|
3645
|
-
let cleanValue = rawValue;
|
|
3646
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
3647
|
-
cleanValue = cleanValue.split(":")[0];
|
|
3648
|
-
}
|
|
3649
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
3650
|
-
cleanValue = cleanValue.split("#")[1];
|
|
3651
|
-
}
|
|
3652
|
-
return cleanValue;
|
|
3653
|
-
};
|
|
3654
|
-
|
|
3655
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
3656
|
-
if (headerKey !== undefined) {
|
|
3657
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
3658
|
-
}
|
|
3659
|
-
|
|
3660
|
-
if (data.code !== undefined) {
|
|
3661
|
-
return sanitizeErrorCode(data.code);
|
|
3662
|
-
}
|
|
3663
|
-
|
|
3664
|
-
if (data["__type"] !== undefined) {
|
|
3665
|
-
return sanitizeErrorCode(data["__type"]);
|
|
3666
|
-
}
|
|
3667
|
-
|
|
3668
|
-
return "";
|
|
3669
|
-
};
|