@aws-sdk/client-neptune-graph 3.474.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/LICENSE +201 -0
- package/README.md +383 -0
- package/dist-cjs/NeptuneGraph.js +55 -0
- package/dist-cjs/NeptuneGraphClient.js +43 -0
- package/dist-cjs/commands/CancelImportTaskCommand.js +52 -0
- package/dist-cjs/commands/CreateGraphCommand.js +52 -0
- package/dist-cjs/commands/CreateGraphSnapshotCommand.js +52 -0
- package/dist-cjs/commands/CreateGraphUsingImportTaskCommand.js +52 -0
- package/dist-cjs/commands/CreatePrivateGraphEndpointCommand.js +52 -0
- package/dist-cjs/commands/DeleteGraphCommand.js +52 -0
- package/dist-cjs/commands/DeleteGraphSnapshotCommand.js +52 -0
- package/dist-cjs/commands/DeletePrivateGraphEndpointCommand.js +52 -0
- package/dist-cjs/commands/GetGraphCommand.js +52 -0
- package/dist-cjs/commands/GetGraphSnapshotCommand.js +52 -0
- package/dist-cjs/commands/GetImportTaskCommand.js +52 -0
- package/dist-cjs/commands/GetPrivateGraphEndpointCommand.js +52 -0
- package/dist-cjs/commands/ListGraphSnapshotsCommand.js +52 -0
- package/dist-cjs/commands/ListGraphsCommand.js +52 -0
- package/dist-cjs/commands/ListImportTasksCommand.js +52 -0
- package/dist-cjs/commands/ListPrivateGraphEndpointsCommand.js +52 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +52 -0
- package/dist-cjs/commands/ResetGraphCommand.js +52 -0
- package/dist-cjs/commands/RestoreGraphFromSnapshotCommand.js +52 -0
- package/dist-cjs/commands/TagResourceCommand.js +52 -0
- package/dist-cjs/commands/UntagResourceCommand.js +52 -0
- package/dist-cjs/commands/UpdateGraphCommand.js +52 -0
- package/dist-cjs/commands/index.js +25 -0
- package/dist-cjs/endpoint/EndpointParameters.js +12 -0
- package/dist-cjs/endpoint/endpointResolver.js +12 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +12 -0
- package/dist-cjs/models/NeptuneGraphServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +149 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListGraphSnapshotsPaginator.js +29 -0
- package/dist-cjs/pagination/ListGraphsPaginator.js +29 -0
- package/dist-cjs/pagination/ListImportTasksPaginator.js +29 -0
- package/dist-cjs/pagination/ListPrivateGraphEndpointsPaginator.js +29 -0
- package/dist-cjs/pagination/index.js +8 -0
- package/dist-cjs/protocols/Aws_restJson1.js +1763 -0
- package/dist-cjs/runtimeConfig.browser.js +39 -0
- package/dist-cjs/runtimeConfig.js +50 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +24 -0
- package/dist-cjs/runtimeExtensions.js +22 -0
- package/dist-es/NeptuneGraph.js +51 -0
- package/dist-es/NeptuneGraphClient.js +39 -0
- package/dist-es/commands/CancelImportTaskCommand.js +48 -0
- package/dist-es/commands/CreateGraphCommand.js +48 -0
- package/dist-es/commands/CreateGraphSnapshotCommand.js +48 -0
- package/dist-es/commands/CreateGraphUsingImportTaskCommand.js +48 -0
- package/dist-es/commands/CreatePrivateGraphEndpointCommand.js +48 -0
- package/dist-es/commands/DeleteGraphCommand.js +48 -0
- package/dist-es/commands/DeleteGraphSnapshotCommand.js +48 -0
- package/dist-es/commands/DeletePrivateGraphEndpointCommand.js +48 -0
- package/dist-es/commands/GetGraphCommand.js +48 -0
- package/dist-es/commands/GetGraphSnapshotCommand.js +48 -0
- package/dist-es/commands/GetImportTaskCommand.js +48 -0
- package/dist-es/commands/GetPrivateGraphEndpointCommand.js +48 -0
- package/dist-es/commands/ListGraphSnapshotsCommand.js +48 -0
- package/dist-es/commands/ListGraphsCommand.js +48 -0
- package/dist-es/commands/ListImportTasksCommand.js +48 -0
- package/dist-es/commands/ListPrivateGraphEndpointsCommand.js +48 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +48 -0
- package/dist-es/commands/ResetGraphCommand.js +48 -0
- package/dist-es/commands/RestoreGraphFromSnapshotCommand.js +48 -0
- package/dist-es/commands/TagResourceCommand.js +48 -0
- package/dist-es/commands/UntagResourceCommand.js +48 -0
- package/dist-es/commands/UpdateGraphCommand.js +48 -0
- package/dist-es/commands/index.js +22 -0
- package/dist-es/endpoint/EndpointParameters.js +8 -0
- package/dist-es/endpoint/endpointResolver.js +8 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +7 -0
- package/dist-es/models/NeptuneGraphServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +140 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListGraphSnapshotsPaginator.js +25 -0
- package/dist-es/pagination/ListGraphsPaginator.js +25 -0
- package/dist-es/pagination/ListImportTasksPaginator.js +25 -0
- package/dist-es/pagination/ListPrivateGraphEndpointsPaginator.js +25 -0
- package/dist-es/pagination/index.js +5 -0
- package/dist-es/protocols/Aws_restJson1.js +1716 -0
- package/dist-es/runtimeConfig.browser.js +34 -0
- package/dist-es/runtimeConfig.js +45 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +20 -0
- package/dist-es/runtimeExtensions.js +18 -0
- package/dist-types/NeptuneGraph.d.ts +166 -0
- package/dist-types/NeptuneGraphClient.d.ts +193 -0
- package/dist-types/commands/CancelImportTaskCommand.d.ts +93 -0
- package/dist-types/commands/CreateGraphCommand.d.ts +115 -0
- package/dist-types/commands/CreateGraphSnapshotCommand.d.ts +101 -0
- package/dist-types/commands/CreateGraphUsingImportTaskCommand.d.ts +129 -0
- package/dist-types/commands/CreatePrivateGraphEndpointCommand.d.ts +104 -0
- package/dist-types/commands/DeleteGraphCommand.d.ts +105 -0
- package/dist-types/commands/DeleteGraphSnapshotCommand.d.ts +94 -0
- package/dist-types/commands/DeletePrivateGraphEndpointCommand.d.ts +94 -0
- package/dist-types/commands/GetGraphCommand.d.ts +101 -0
- package/dist-types/commands/GetGraphSnapshotCommand.d.ts +91 -0
- package/dist-types/commands/GetImportTaskCommand.d.ts +110 -0
- package/dist-types/commands/GetPrivateGraphEndpointCommand.d.ts +91 -0
- package/dist-types/commands/ListGraphSnapshotsCommand.d.ts +98 -0
- package/dist-types/commands/ListGraphsCommand.d.ts +97 -0
- package/dist-types/commands/ListImportTasksCommand.d.ts +96 -0
- package/dist-types/commands/ListPrivateGraphEndpointsCommand.d.ts +97 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +87 -0
- package/dist-types/commands/ResetGraphCommand.d.ts +105 -0
- package/dist-types/commands/RestoreGraphFromSnapshotCommand.d.ts +115 -0
- package/dist-types/commands/TagResourceCommand.d.ts +86 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +86 -0
- package/dist-types/commands/UpdateGraphCommand.d.ts +107 -0
- package/dist-types/commands/index.d.ts +22 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +23 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +8 -0
- package/dist-types/index.d.ts +17 -0
- package/dist-types/models/NeptuneGraphServiceException.d.ts +13 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +2021 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListGraphSnapshotsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListGraphsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListImportTasksPaginator.d.ts +7 -0
- package/dist-types/pagination/ListPrivateGraphEndpointsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +5 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +200 -0
- package/dist-types/runtimeConfig.browser.d.ts +46 -0
- package/dist-types/runtimeConfig.d.ts +46 -0
- package/dist-types/runtimeConfig.native.d.ts +45 -0
- package/dist-types/runtimeConfig.shared.d.ts +19 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/ts3.4/NeptuneGraph.d.ts +381 -0
- package/dist-types/ts3.4/NeptuneGraphClient.d.ts +251 -0
- package/dist-types/ts3.4/commands/CancelImportTaskCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/CreateGraphCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/CreateGraphSnapshotCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/CreateGraphUsingImportTaskCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/CreatePrivateGraphEndpointCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/DeleteGraphCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/DeleteGraphSnapshotCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/DeletePrivateGraphEndpointCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/GetGraphCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/GetGraphSnapshotCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetImportTaskCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/GetPrivateGraphEndpointCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListGraphSnapshotsCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListGraphsCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/ListImportTasksCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListPrivateGraphEndpointsCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ResetGraphCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/RestoreGraphFromSnapshotCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/UpdateGraphCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/index.d.ts +22 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +34 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +7 -0
- package/dist-types/ts3.4/index.d.ts +10 -0
- package/dist-types/ts3.4/models/NeptuneGraphServiceException.d.ts +8 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +494 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListGraphSnapshotsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListGraphsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListImportTasksPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListPrivateGraphEndpointsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +5 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +269 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +97 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +97 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +88 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +19 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/package.json +100 -0
|
@@ -0,0 +1,1716 @@
|
|
|
1
|
+
import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
|
|
2
|
+
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
3
|
+
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
+
import { ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
5
|
+
import { NeptuneGraphServiceException as __BaseException } from "../models/NeptuneGraphServiceException";
|
|
6
|
+
export const se_CancelImportTaskCommand = async (input, context) => {
|
|
7
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
|
+
const headers = {};
|
|
9
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/importtasks/{taskIdentifier}";
|
|
10
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "taskIdentifier", () => input.taskIdentifier, "{taskIdentifier}", false);
|
|
11
|
+
let body;
|
|
12
|
+
return new __HttpRequest({
|
|
13
|
+
protocol,
|
|
14
|
+
hostname,
|
|
15
|
+
port,
|
|
16
|
+
method: "DELETE",
|
|
17
|
+
headers,
|
|
18
|
+
path: resolvedPath,
|
|
19
|
+
body,
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
export const se_CreateGraphCommand = async (input, context) => {
|
|
23
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
24
|
+
const headers = {
|
|
25
|
+
"content-type": "application/json",
|
|
26
|
+
};
|
|
27
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/graphs";
|
|
28
|
+
let body;
|
|
29
|
+
body = JSON.stringify(take(input, {
|
|
30
|
+
deletionProtection: [],
|
|
31
|
+
graphName: [],
|
|
32
|
+
kmsKeyIdentifier: [],
|
|
33
|
+
provisionedMemory: [],
|
|
34
|
+
publicConnectivity: [],
|
|
35
|
+
replicaCount: [],
|
|
36
|
+
tags: (_) => _json(_),
|
|
37
|
+
vectorSearchConfiguration: (_) => _json(_),
|
|
38
|
+
}));
|
|
39
|
+
return new __HttpRequest({
|
|
40
|
+
protocol,
|
|
41
|
+
hostname,
|
|
42
|
+
port,
|
|
43
|
+
method: "POST",
|
|
44
|
+
headers,
|
|
45
|
+
path: resolvedPath,
|
|
46
|
+
body,
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
export const se_CreateGraphSnapshotCommand = async (input, context) => {
|
|
50
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
51
|
+
const headers = {
|
|
52
|
+
"content-type": "application/json",
|
|
53
|
+
};
|
|
54
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/snapshots";
|
|
55
|
+
let body;
|
|
56
|
+
body = JSON.stringify(take(input, {
|
|
57
|
+
graphIdentifier: [],
|
|
58
|
+
snapshotName: [],
|
|
59
|
+
tags: (_) => _json(_),
|
|
60
|
+
}));
|
|
61
|
+
return new __HttpRequest({
|
|
62
|
+
protocol,
|
|
63
|
+
hostname,
|
|
64
|
+
port,
|
|
65
|
+
method: "POST",
|
|
66
|
+
headers,
|
|
67
|
+
path: resolvedPath,
|
|
68
|
+
body,
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
export const se_CreateGraphUsingImportTaskCommand = async (input, context) => {
|
|
72
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
73
|
+
const headers = {
|
|
74
|
+
"content-type": "application/json",
|
|
75
|
+
};
|
|
76
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/importtasks";
|
|
77
|
+
let body;
|
|
78
|
+
body = JSON.stringify(take(input, {
|
|
79
|
+
deletionProtection: [],
|
|
80
|
+
failOnError: [],
|
|
81
|
+
format: [],
|
|
82
|
+
graphName: [],
|
|
83
|
+
importOptions: (_) => _json(_),
|
|
84
|
+
kmsKeyIdentifier: [],
|
|
85
|
+
maxProvisionedMemory: [],
|
|
86
|
+
minProvisionedMemory: [],
|
|
87
|
+
publicConnectivity: [],
|
|
88
|
+
replicaCount: [],
|
|
89
|
+
roleArn: [],
|
|
90
|
+
source: [],
|
|
91
|
+
tags: (_) => _json(_),
|
|
92
|
+
vectorSearchConfiguration: (_) => _json(_),
|
|
93
|
+
}));
|
|
94
|
+
return new __HttpRequest({
|
|
95
|
+
protocol,
|
|
96
|
+
hostname,
|
|
97
|
+
port,
|
|
98
|
+
method: "POST",
|
|
99
|
+
headers,
|
|
100
|
+
path: resolvedPath,
|
|
101
|
+
body,
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
export const se_CreatePrivateGraphEndpointCommand = async (input, context) => {
|
|
105
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
106
|
+
const headers = {
|
|
107
|
+
"content-type": "application/json",
|
|
108
|
+
};
|
|
109
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/graphs/{graphIdentifier}/endpoints";
|
|
110
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "graphIdentifier", () => input.graphIdentifier, "{graphIdentifier}", false);
|
|
111
|
+
let body;
|
|
112
|
+
body = JSON.stringify(take(input, {
|
|
113
|
+
subnetIds: (_) => _json(_),
|
|
114
|
+
vpcId: [],
|
|
115
|
+
vpcSecurityGroupIds: (_) => _json(_),
|
|
116
|
+
}));
|
|
117
|
+
return new __HttpRequest({
|
|
118
|
+
protocol,
|
|
119
|
+
hostname,
|
|
120
|
+
port,
|
|
121
|
+
method: "POST",
|
|
122
|
+
headers,
|
|
123
|
+
path: resolvedPath,
|
|
124
|
+
body,
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
export const se_DeleteGraphCommand = async (input, context) => {
|
|
128
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
129
|
+
const headers = {};
|
|
130
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/graphs/{graphIdentifier}";
|
|
131
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "graphIdentifier", () => input.graphIdentifier, "{graphIdentifier}", false);
|
|
132
|
+
const query = map({
|
|
133
|
+
skipSnapshot: [__expectNonNull(input.skipSnapshot, `skipSnapshot`) != null, () => input.skipSnapshot.toString()],
|
|
134
|
+
});
|
|
135
|
+
let body;
|
|
136
|
+
return new __HttpRequest({
|
|
137
|
+
protocol,
|
|
138
|
+
hostname,
|
|
139
|
+
port,
|
|
140
|
+
method: "DELETE",
|
|
141
|
+
headers,
|
|
142
|
+
path: resolvedPath,
|
|
143
|
+
query,
|
|
144
|
+
body,
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
export const se_DeleteGraphSnapshotCommand = async (input, context) => {
|
|
148
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
149
|
+
const headers = {};
|
|
150
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/snapshots/{snapshotIdentifier}";
|
|
151
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "snapshotIdentifier", () => input.snapshotIdentifier, "{snapshotIdentifier}", false);
|
|
152
|
+
let body;
|
|
153
|
+
return new __HttpRequest({
|
|
154
|
+
protocol,
|
|
155
|
+
hostname,
|
|
156
|
+
port,
|
|
157
|
+
method: "DELETE",
|
|
158
|
+
headers,
|
|
159
|
+
path: resolvedPath,
|
|
160
|
+
body,
|
|
161
|
+
});
|
|
162
|
+
};
|
|
163
|
+
export const se_DeletePrivateGraphEndpointCommand = async (input, context) => {
|
|
164
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
165
|
+
const headers = {};
|
|
166
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
167
|
+
"/graphs/{graphIdentifier}/endpoints/{vpcId}";
|
|
168
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "graphIdentifier", () => input.graphIdentifier, "{graphIdentifier}", false);
|
|
169
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "vpcId", () => input.vpcId, "{vpcId}", false);
|
|
170
|
+
let body;
|
|
171
|
+
return new __HttpRequest({
|
|
172
|
+
protocol,
|
|
173
|
+
hostname,
|
|
174
|
+
port,
|
|
175
|
+
method: "DELETE",
|
|
176
|
+
headers,
|
|
177
|
+
path: resolvedPath,
|
|
178
|
+
body,
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
export const se_GetGraphCommand = async (input, context) => {
|
|
182
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
183
|
+
const headers = {};
|
|
184
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/graphs/{graphIdentifier}";
|
|
185
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "graphIdentifier", () => input.graphIdentifier, "{graphIdentifier}", false);
|
|
186
|
+
let body;
|
|
187
|
+
return new __HttpRequest({
|
|
188
|
+
protocol,
|
|
189
|
+
hostname,
|
|
190
|
+
port,
|
|
191
|
+
method: "GET",
|
|
192
|
+
headers,
|
|
193
|
+
path: resolvedPath,
|
|
194
|
+
body,
|
|
195
|
+
});
|
|
196
|
+
};
|
|
197
|
+
export const se_GetGraphSnapshotCommand = async (input, context) => {
|
|
198
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
199
|
+
const headers = {};
|
|
200
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/snapshots/{snapshotIdentifier}";
|
|
201
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "snapshotIdentifier", () => input.snapshotIdentifier, "{snapshotIdentifier}", false);
|
|
202
|
+
let body;
|
|
203
|
+
return new __HttpRequest({
|
|
204
|
+
protocol,
|
|
205
|
+
hostname,
|
|
206
|
+
port,
|
|
207
|
+
method: "GET",
|
|
208
|
+
headers,
|
|
209
|
+
path: resolvedPath,
|
|
210
|
+
body,
|
|
211
|
+
});
|
|
212
|
+
};
|
|
213
|
+
export const se_GetImportTaskCommand = async (input, context) => {
|
|
214
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
215
|
+
const headers = {};
|
|
216
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/importtasks/{taskIdentifier}";
|
|
217
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "taskIdentifier", () => input.taskIdentifier, "{taskIdentifier}", false);
|
|
218
|
+
let body;
|
|
219
|
+
return new __HttpRequest({
|
|
220
|
+
protocol,
|
|
221
|
+
hostname,
|
|
222
|
+
port,
|
|
223
|
+
method: "GET",
|
|
224
|
+
headers,
|
|
225
|
+
path: resolvedPath,
|
|
226
|
+
body,
|
|
227
|
+
});
|
|
228
|
+
};
|
|
229
|
+
export const se_GetPrivateGraphEndpointCommand = async (input, context) => {
|
|
230
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
231
|
+
const headers = {};
|
|
232
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
233
|
+
"/graphs/{graphIdentifier}/endpoints/{vpcId}";
|
|
234
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "graphIdentifier", () => input.graphIdentifier, "{graphIdentifier}", false);
|
|
235
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "vpcId", () => input.vpcId, "{vpcId}", false);
|
|
236
|
+
let body;
|
|
237
|
+
return new __HttpRequest({
|
|
238
|
+
protocol,
|
|
239
|
+
hostname,
|
|
240
|
+
port,
|
|
241
|
+
method: "GET",
|
|
242
|
+
headers,
|
|
243
|
+
path: resolvedPath,
|
|
244
|
+
body,
|
|
245
|
+
});
|
|
246
|
+
};
|
|
247
|
+
export const se_ListGraphsCommand = async (input, context) => {
|
|
248
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
249
|
+
const headers = {};
|
|
250
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/graphs";
|
|
251
|
+
const query = map({
|
|
252
|
+
nextToken: [, input.nextToken],
|
|
253
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
254
|
+
});
|
|
255
|
+
let body;
|
|
256
|
+
return new __HttpRequest({
|
|
257
|
+
protocol,
|
|
258
|
+
hostname,
|
|
259
|
+
port,
|
|
260
|
+
method: "GET",
|
|
261
|
+
headers,
|
|
262
|
+
path: resolvedPath,
|
|
263
|
+
query,
|
|
264
|
+
body,
|
|
265
|
+
});
|
|
266
|
+
};
|
|
267
|
+
export const se_ListGraphSnapshotsCommand = async (input, context) => {
|
|
268
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
269
|
+
const headers = {};
|
|
270
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/snapshots";
|
|
271
|
+
const query = map({
|
|
272
|
+
graphIdentifier: [, input.graphIdentifier],
|
|
273
|
+
nextToken: [, input.nextToken],
|
|
274
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
275
|
+
});
|
|
276
|
+
let body;
|
|
277
|
+
return new __HttpRequest({
|
|
278
|
+
protocol,
|
|
279
|
+
hostname,
|
|
280
|
+
port,
|
|
281
|
+
method: "GET",
|
|
282
|
+
headers,
|
|
283
|
+
path: resolvedPath,
|
|
284
|
+
query,
|
|
285
|
+
body,
|
|
286
|
+
});
|
|
287
|
+
};
|
|
288
|
+
export const se_ListImportTasksCommand = async (input, context) => {
|
|
289
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
290
|
+
const headers = {};
|
|
291
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/importtasks";
|
|
292
|
+
const query = map({
|
|
293
|
+
nextToken: [, input.nextToken],
|
|
294
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
295
|
+
});
|
|
296
|
+
let body;
|
|
297
|
+
return new __HttpRequest({
|
|
298
|
+
protocol,
|
|
299
|
+
hostname,
|
|
300
|
+
port,
|
|
301
|
+
method: "GET",
|
|
302
|
+
headers,
|
|
303
|
+
path: resolvedPath,
|
|
304
|
+
query,
|
|
305
|
+
body,
|
|
306
|
+
});
|
|
307
|
+
};
|
|
308
|
+
export const se_ListPrivateGraphEndpointsCommand = async (input, context) => {
|
|
309
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
310
|
+
const headers = {};
|
|
311
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/graphs/{graphIdentifier}/endpoints";
|
|
312
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "graphIdentifier", () => input.graphIdentifier, "{graphIdentifier}", false);
|
|
313
|
+
const query = map({
|
|
314
|
+
nextToken: [, input.nextToken],
|
|
315
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
316
|
+
});
|
|
317
|
+
let body;
|
|
318
|
+
return new __HttpRequest({
|
|
319
|
+
protocol,
|
|
320
|
+
hostname,
|
|
321
|
+
port,
|
|
322
|
+
method: "GET",
|
|
323
|
+
headers,
|
|
324
|
+
path: resolvedPath,
|
|
325
|
+
query,
|
|
326
|
+
body,
|
|
327
|
+
});
|
|
328
|
+
};
|
|
329
|
+
export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
330
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
331
|
+
const headers = {};
|
|
332
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
333
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
334
|
+
let body;
|
|
335
|
+
return new __HttpRequest({
|
|
336
|
+
protocol,
|
|
337
|
+
hostname,
|
|
338
|
+
port,
|
|
339
|
+
method: "GET",
|
|
340
|
+
headers,
|
|
341
|
+
path: resolvedPath,
|
|
342
|
+
body,
|
|
343
|
+
});
|
|
344
|
+
};
|
|
345
|
+
export const se_ResetGraphCommand = async (input, context) => {
|
|
346
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
347
|
+
const headers = {
|
|
348
|
+
"content-type": "application/json",
|
|
349
|
+
};
|
|
350
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/graphs/{graphIdentifier}";
|
|
351
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "graphIdentifier", () => input.graphIdentifier, "{graphIdentifier}", false);
|
|
352
|
+
let body;
|
|
353
|
+
body = JSON.stringify(take(input, {
|
|
354
|
+
skipSnapshot: [],
|
|
355
|
+
}));
|
|
356
|
+
return new __HttpRequest({
|
|
357
|
+
protocol,
|
|
358
|
+
hostname,
|
|
359
|
+
port,
|
|
360
|
+
method: "PUT",
|
|
361
|
+
headers,
|
|
362
|
+
path: resolvedPath,
|
|
363
|
+
body,
|
|
364
|
+
});
|
|
365
|
+
};
|
|
366
|
+
export const se_RestoreGraphFromSnapshotCommand = async (input, context) => {
|
|
367
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
368
|
+
const headers = {
|
|
369
|
+
"content-type": "application/json",
|
|
370
|
+
};
|
|
371
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/snapshots/{snapshotIdentifier}/restore";
|
|
372
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "snapshotIdentifier", () => input.snapshotIdentifier, "{snapshotIdentifier}", false);
|
|
373
|
+
let body;
|
|
374
|
+
body = JSON.stringify(take(input, {
|
|
375
|
+
deletionProtection: [],
|
|
376
|
+
graphName: [],
|
|
377
|
+
provisionedMemory: [],
|
|
378
|
+
publicConnectivity: [],
|
|
379
|
+
replicaCount: [],
|
|
380
|
+
tags: (_) => _json(_),
|
|
381
|
+
}));
|
|
382
|
+
return new __HttpRequest({
|
|
383
|
+
protocol,
|
|
384
|
+
hostname,
|
|
385
|
+
port,
|
|
386
|
+
method: "POST",
|
|
387
|
+
headers,
|
|
388
|
+
path: resolvedPath,
|
|
389
|
+
body,
|
|
390
|
+
});
|
|
391
|
+
};
|
|
392
|
+
export const se_TagResourceCommand = async (input, context) => {
|
|
393
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
394
|
+
const headers = {
|
|
395
|
+
"content-type": "application/json",
|
|
396
|
+
};
|
|
397
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
398
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
399
|
+
let body;
|
|
400
|
+
body = JSON.stringify(take(input, {
|
|
401
|
+
tags: (_) => _json(_),
|
|
402
|
+
}));
|
|
403
|
+
return new __HttpRequest({
|
|
404
|
+
protocol,
|
|
405
|
+
hostname,
|
|
406
|
+
port,
|
|
407
|
+
method: "POST",
|
|
408
|
+
headers,
|
|
409
|
+
path: resolvedPath,
|
|
410
|
+
body,
|
|
411
|
+
});
|
|
412
|
+
};
|
|
413
|
+
export const se_UntagResourceCommand = async (input, context) => {
|
|
414
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
415
|
+
const headers = {};
|
|
416
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
417
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
418
|
+
const query = map({
|
|
419
|
+
tagKeys: [
|
|
420
|
+
__expectNonNull(input.tagKeys, `tagKeys`) != null,
|
|
421
|
+
() => (input.tagKeys || []).map((_entry) => _entry),
|
|
422
|
+
],
|
|
423
|
+
});
|
|
424
|
+
let body;
|
|
425
|
+
return new __HttpRequest({
|
|
426
|
+
protocol,
|
|
427
|
+
hostname,
|
|
428
|
+
port,
|
|
429
|
+
method: "DELETE",
|
|
430
|
+
headers,
|
|
431
|
+
path: resolvedPath,
|
|
432
|
+
query,
|
|
433
|
+
body,
|
|
434
|
+
});
|
|
435
|
+
};
|
|
436
|
+
export const se_UpdateGraphCommand = async (input, context) => {
|
|
437
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
438
|
+
const headers = {
|
|
439
|
+
"content-type": "application/json",
|
|
440
|
+
};
|
|
441
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/graphs/{graphIdentifier}";
|
|
442
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "graphIdentifier", () => input.graphIdentifier, "{graphIdentifier}", false);
|
|
443
|
+
let body;
|
|
444
|
+
body = JSON.stringify(take(input, {
|
|
445
|
+
deletionProtection: [],
|
|
446
|
+
provisionedMemory: [],
|
|
447
|
+
publicConnectivity: [],
|
|
448
|
+
}));
|
|
449
|
+
return new __HttpRequest({
|
|
450
|
+
protocol,
|
|
451
|
+
hostname,
|
|
452
|
+
port,
|
|
453
|
+
method: "PATCH",
|
|
454
|
+
headers,
|
|
455
|
+
path: resolvedPath,
|
|
456
|
+
body,
|
|
457
|
+
});
|
|
458
|
+
};
|
|
459
|
+
export const de_CancelImportTaskCommand = async (output, context) => {
|
|
460
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
461
|
+
return de_CancelImportTaskCommandError(output, context);
|
|
462
|
+
}
|
|
463
|
+
const contents = map({
|
|
464
|
+
$metadata: deserializeMetadata(output),
|
|
465
|
+
});
|
|
466
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
467
|
+
const doc = take(data, {
|
|
468
|
+
format: __expectString,
|
|
469
|
+
graphId: __expectString,
|
|
470
|
+
roleArn: __expectString,
|
|
471
|
+
source: __expectString,
|
|
472
|
+
status: __expectString,
|
|
473
|
+
taskId: __expectString,
|
|
474
|
+
});
|
|
475
|
+
Object.assign(contents, doc);
|
|
476
|
+
return contents;
|
|
477
|
+
};
|
|
478
|
+
const de_CancelImportTaskCommandError = async (output, context) => {
|
|
479
|
+
const parsedOutput = {
|
|
480
|
+
...output,
|
|
481
|
+
body: await parseErrorBody(output.body, context),
|
|
482
|
+
};
|
|
483
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
484
|
+
switch (errorCode) {
|
|
485
|
+
case "ConflictException":
|
|
486
|
+
case "com.amazonaws.neptunegraph#ConflictException":
|
|
487
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
488
|
+
case "InternalServerException":
|
|
489
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
490
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
491
|
+
case "ResourceNotFoundException":
|
|
492
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
493
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
494
|
+
case "ThrottlingException":
|
|
495
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
496
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
497
|
+
case "ValidationException":
|
|
498
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
499
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
500
|
+
default:
|
|
501
|
+
const parsedBody = parsedOutput.body;
|
|
502
|
+
return throwDefaultError({
|
|
503
|
+
output,
|
|
504
|
+
parsedBody,
|
|
505
|
+
errorCode,
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
};
|
|
509
|
+
export const de_CreateGraphCommand = async (output, context) => {
|
|
510
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
511
|
+
return de_CreateGraphCommandError(output, context);
|
|
512
|
+
}
|
|
513
|
+
const contents = map({
|
|
514
|
+
$metadata: deserializeMetadata(output),
|
|
515
|
+
});
|
|
516
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
517
|
+
const doc = take(data, {
|
|
518
|
+
arn: __expectString,
|
|
519
|
+
buildNumber: __expectString,
|
|
520
|
+
createTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
521
|
+
deletionProtection: __expectBoolean,
|
|
522
|
+
endpoint: __expectString,
|
|
523
|
+
id: __expectString,
|
|
524
|
+
kmsKeyIdentifier: __expectString,
|
|
525
|
+
name: __expectString,
|
|
526
|
+
provisionedMemory: __expectInt32,
|
|
527
|
+
publicConnectivity: __expectBoolean,
|
|
528
|
+
replicaCount: __expectInt32,
|
|
529
|
+
sourceSnapshotId: __expectString,
|
|
530
|
+
status: __expectString,
|
|
531
|
+
statusReason: __expectString,
|
|
532
|
+
vectorSearchConfiguration: _json,
|
|
533
|
+
});
|
|
534
|
+
Object.assign(contents, doc);
|
|
535
|
+
return contents;
|
|
536
|
+
};
|
|
537
|
+
const de_CreateGraphCommandError = async (output, context) => {
|
|
538
|
+
const parsedOutput = {
|
|
539
|
+
...output,
|
|
540
|
+
body: await parseErrorBody(output.body, context),
|
|
541
|
+
};
|
|
542
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
543
|
+
switch (errorCode) {
|
|
544
|
+
case "ConflictException":
|
|
545
|
+
case "com.amazonaws.neptunegraph#ConflictException":
|
|
546
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
547
|
+
case "InternalServerException":
|
|
548
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
549
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
550
|
+
case "ServiceQuotaExceededException":
|
|
551
|
+
case "com.amazonaws.neptunegraph#ServiceQuotaExceededException":
|
|
552
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
553
|
+
case "ThrottlingException":
|
|
554
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
555
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
556
|
+
case "ValidationException":
|
|
557
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
558
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
559
|
+
default:
|
|
560
|
+
const parsedBody = parsedOutput.body;
|
|
561
|
+
return throwDefaultError({
|
|
562
|
+
output,
|
|
563
|
+
parsedBody,
|
|
564
|
+
errorCode,
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
export const de_CreateGraphSnapshotCommand = async (output, context) => {
|
|
569
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
570
|
+
return de_CreateGraphSnapshotCommandError(output, context);
|
|
571
|
+
}
|
|
572
|
+
const contents = map({
|
|
573
|
+
$metadata: deserializeMetadata(output),
|
|
574
|
+
});
|
|
575
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
576
|
+
const doc = take(data, {
|
|
577
|
+
arn: __expectString,
|
|
578
|
+
id: __expectString,
|
|
579
|
+
kmsKeyIdentifier: __expectString,
|
|
580
|
+
name: __expectString,
|
|
581
|
+
snapshotCreateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
582
|
+
sourceGraphId: __expectString,
|
|
583
|
+
status: __expectString,
|
|
584
|
+
});
|
|
585
|
+
Object.assign(contents, doc);
|
|
586
|
+
return contents;
|
|
587
|
+
};
|
|
588
|
+
const de_CreateGraphSnapshotCommandError = async (output, context) => {
|
|
589
|
+
const parsedOutput = {
|
|
590
|
+
...output,
|
|
591
|
+
body: await parseErrorBody(output.body, context),
|
|
592
|
+
};
|
|
593
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
594
|
+
switch (errorCode) {
|
|
595
|
+
case "ConflictException":
|
|
596
|
+
case "com.amazonaws.neptunegraph#ConflictException":
|
|
597
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
598
|
+
case "InternalServerException":
|
|
599
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
600
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
601
|
+
case "ResourceNotFoundException":
|
|
602
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
603
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
604
|
+
case "ServiceQuotaExceededException":
|
|
605
|
+
case "com.amazonaws.neptunegraph#ServiceQuotaExceededException":
|
|
606
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
607
|
+
case "ThrottlingException":
|
|
608
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
609
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
610
|
+
case "ValidationException":
|
|
611
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
612
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
613
|
+
default:
|
|
614
|
+
const parsedBody = parsedOutput.body;
|
|
615
|
+
return throwDefaultError({
|
|
616
|
+
output,
|
|
617
|
+
parsedBody,
|
|
618
|
+
errorCode,
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
};
|
|
622
|
+
export const de_CreateGraphUsingImportTaskCommand = async (output, context) => {
|
|
623
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
624
|
+
return de_CreateGraphUsingImportTaskCommandError(output, context);
|
|
625
|
+
}
|
|
626
|
+
const contents = map({
|
|
627
|
+
$metadata: deserializeMetadata(output),
|
|
628
|
+
});
|
|
629
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
630
|
+
const doc = take(data, {
|
|
631
|
+
format: __expectString,
|
|
632
|
+
graphId: __expectString,
|
|
633
|
+
importOptions: (_) => _json(__expectUnion(_)),
|
|
634
|
+
roleArn: __expectString,
|
|
635
|
+
source: __expectString,
|
|
636
|
+
status: __expectString,
|
|
637
|
+
taskId: __expectString,
|
|
638
|
+
});
|
|
639
|
+
Object.assign(contents, doc);
|
|
640
|
+
return contents;
|
|
641
|
+
};
|
|
642
|
+
const de_CreateGraphUsingImportTaskCommandError = async (output, context) => {
|
|
643
|
+
const parsedOutput = {
|
|
644
|
+
...output,
|
|
645
|
+
body: await parseErrorBody(output.body, context),
|
|
646
|
+
};
|
|
647
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
648
|
+
switch (errorCode) {
|
|
649
|
+
case "ConflictException":
|
|
650
|
+
case "com.amazonaws.neptunegraph#ConflictException":
|
|
651
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
652
|
+
case "InternalServerException":
|
|
653
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
654
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
655
|
+
case "ServiceQuotaExceededException":
|
|
656
|
+
case "com.amazonaws.neptunegraph#ServiceQuotaExceededException":
|
|
657
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
658
|
+
case "ThrottlingException":
|
|
659
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
660
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
661
|
+
case "ValidationException":
|
|
662
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
663
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
664
|
+
default:
|
|
665
|
+
const parsedBody = parsedOutput.body;
|
|
666
|
+
return throwDefaultError({
|
|
667
|
+
output,
|
|
668
|
+
parsedBody,
|
|
669
|
+
errorCode,
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
};
|
|
673
|
+
export const de_CreatePrivateGraphEndpointCommand = async (output, context) => {
|
|
674
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
675
|
+
return de_CreatePrivateGraphEndpointCommandError(output, context);
|
|
676
|
+
}
|
|
677
|
+
const contents = map({
|
|
678
|
+
$metadata: deserializeMetadata(output),
|
|
679
|
+
});
|
|
680
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
681
|
+
const doc = take(data, {
|
|
682
|
+
status: __expectString,
|
|
683
|
+
subnetIds: _json,
|
|
684
|
+
vpcEndpointId: __expectString,
|
|
685
|
+
vpcId: __expectString,
|
|
686
|
+
});
|
|
687
|
+
Object.assign(contents, doc);
|
|
688
|
+
return contents;
|
|
689
|
+
};
|
|
690
|
+
const de_CreatePrivateGraphEndpointCommandError = async (output, context) => {
|
|
691
|
+
const parsedOutput = {
|
|
692
|
+
...output,
|
|
693
|
+
body: await parseErrorBody(output.body, context),
|
|
694
|
+
};
|
|
695
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
696
|
+
switch (errorCode) {
|
|
697
|
+
case "ConflictException":
|
|
698
|
+
case "com.amazonaws.neptunegraph#ConflictException":
|
|
699
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
700
|
+
case "InternalServerException":
|
|
701
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
702
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
703
|
+
case "ResourceNotFoundException":
|
|
704
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
705
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
706
|
+
case "ServiceQuotaExceededException":
|
|
707
|
+
case "com.amazonaws.neptunegraph#ServiceQuotaExceededException":
|
|
708
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
709
|
+
case "ThrottlingException":
|
|
710
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
711
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
712
|
+
case "ValidationException":
|
|
713
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
714
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
715
|
+
default:
|
|
716
|
+
const parsedBody = parsedOutput.body;
|
|
717
|
+
return throwDefaultError({
|
|
718
|
+
output,
|
|
719
|
+
parsedBody,
|
|
720
|
+
errorCode,
|
|
721
|
+
});
|
|
722
|
+
}
|
|
723
|
+
};
|
|
724
|
+
export const de_DeleteGraphCommand = async (output, context) => {
|
|
725
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
726
|
+
return de_DeleteGraphCommandError(output, context);
|
|
727
|
+
}
|
|
728
|
+
const contents = map({
|
|
729
|
+
$metadata: deserializeMetadata(output),
|
|
730
|
+
});
|
|
731
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
732
|
+
const doc = take(data, {
|
|
733
|
+
arn: __expectString,
|
|
734
|
+
buildNumber: __expectString,
|
|
735
|
+
createTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
736
|
+
deletionProtection: __expectBoolean,
|
|
737
|
+
endpoint: __expectString,
|
|
738
|
+
id: __expectString,
|
|
739
|
+
kmsKeyIdentifier: __expectString,
|
|
740
|
+
name: __expectString,
|
|
741
|
+
provisionedMemory: __expectInt32,
|
|
742
|
+
publicConnectivity: __expectBoolean,
|
|
743
|
+
replicaCount: __expectInt32,
|
|
744
|
+
sourceSnapshotId: __expectString,
|
|
745
|
+
status: __expectString,
|
|
746
|
+
statusReason: __expectString,
|
|
747
|
+
vectorSearchConfiguration: _json,
|
|
748
|
+
});
|
|
749
|
+
Object.assign(contents, doc);
|
|
750
|
+
return contents;
|
|
751
|
+
};
|
|
752
|
+
const de_DeleteGraphCommandError = async (output, context) => {
|
|
753
|
+
const parsedOutput = {
|
|
754
|
+
...output,
|
|
755
|
+
body: await parseErrorBody(output.body, context),
|
|
756
|
+
};
|
|
757
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
758
|
+
switch (errorCode) {
|
|
759
|
+
case "ConflictException":
|
|
760
|
+
case "com.amazonaws.neptunegraph#ConflictException":
|
|
761
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
762
|
+
case "InternalServerException":
|
|
763
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
764
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
765
|
+
case "ResourceNotFoundException":
|
|
766
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
767
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
768
|
+
case "ThrottlingException":
|
|
769
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
770
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
771
|
+
case "ValidationException":
|
|
772
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
773
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
774
|
+
default:
|
|
775
|
+
const parsedBody = parsedOutput.body;
|
|
776
|
+
return throwDefaultError({
|
|
777
|
+
output,
|
|
778
|
+
parsedBody,
|
|
779
|
+
errorCode,
|
|
780
|
+
});
|
|
781
|
+
}
|
|
782
|
+
};
|
|
783
|
+
export const de_DeleteGraphSnapshotCommand = async (output, context) => {
|
|
784
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
785
|
+
return de_DeleteGraphSnapshotCommandError(output, context);
|
|
786
|
+
}
|
|
787
|
+
const contents = map({
|
|
788
|
+
$metadata: deserializeMetadata(output),
|
|
789
|
+
});
|
|
790
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
791
|
+
const doc = take(data, {
|
|
792
|
+
arn: __expectString,
|
|
793
|
+
id: __expectString,
|
|
794
|
+
kmsKeyIdentifier: __expectString,
|
|
795
|
+
name: __expectString,
|
|
796
|
+
snapshotCreateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
797
|
+
sourceGraphId: __expectString,
|
|
798
|
+
status: __expectString,
|
|
799
|
+
});
|
|
800
|
+
Object.assign(contents, doc);
|
|
801
|
+
return contents;
|
|
802
|
+
};
|
|
803
|
+
const de_DeleteGraphSnapshotCommandError = async (output, context) => {
|
|
804
|
+
const parsedOutput = {
|
|
805
|
+
...output,
|
|
806
|
+
body: await parseErrorBody(output.body, context),
|
|
807
|
+
};
|
|
808
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
809
|
+
switch (errorCode) {
|
|
810
|
+
case "ConflictException":
|
|
811
|
+
case "com.amazonaws.neptunegraph#ConflictException":
|
|
812
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
813
|
+
case "InternalServerException":
|
|
814
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
815
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
816
|
+
case "ResourceNotFoundException":
|
|
817
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
818
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
819
|
+
case "ThrottlingException":
|
|
820
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
821
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
822
|
+
case "ValidationException":
|
|
823
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
824
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
825
|
+
default:
|
|
826
|
+
const parsedBody = parsedOutput.body;
|
|
827
|
+
return throwDefaultError({
|
|
828
|
+
output,
|
|
829
|
+
parsedBody,
|
|
830
|
+
errorCode,
|
|
831
|
+
});
|
|
832
|
+
}
|
|
833
|
+
};
|
|
834
|
+
export const de_DeletePrivateGraphEndpointCommand = async (output, context) => {
|
|
835
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
836
|
+
return de_DeletePrivateGraphEndpointCommandError(output, context);
|
|
837
|
+
}
|
|
838
|
+
const contents = map({
|
|
839
|
+
$metadata: deserializeMetadata(output),
|
|
840
|
+
});
|
|
841
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
842
|
+
const doc = take(data, {
|
|
843
|
+
status: __expectString,
|
|
844
|
+
subnetIds: _json,
|
|
845
|
+
vpcEndpointId: __expectString,
|
|
846
|
+
vpcId: __expectString,
|
|
847
|
+
});
|
|
848
|
+
Object.assign(contents, doc);
|
|
849
|
+
return contents;
|
|
850
|
+
};
|
|
851
|
+
const de_DeletePrivateGraphEndpointCommandError = async (output, context) => {
|
|
852
|
+
const parsedOutput = {
|
|
853
|
+
...output,
|
|
854
|
+
body: await parseErrorBody(output.body, context),
|
|
855
|
+
};
|
|
856
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
857
|
+
switch (errorCode) {
|
|
858
|
+
case "ConflictException":
|
|
859
|
+
case "com.amazonaws.neptunegraph#ConflictException":
|
|
860
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
861
|
+
case "InternalServerException":
|
|
862
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
863
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
864
|
+
case "ResourceNotFoundException":
|
|
865
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
866
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
867
|
+
case "ThrottlingException":
|
|
868
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
869
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
870
|
+
case "ValidationException":
|
|
871
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
872
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
873
|
+
default:
|
|
874
|
+
const parsedBody = parsedOutput.body;
|
|
875
|
+
return throwDefaultError({
|
|
876
|
+
output,
|
|
877
|
+
parsedBody,
|
|
878
|
+
errorCode,
|
|
879
|
+
});
|
|
880
|
+
}
|
|
881
|
+
};
|
|
882
|
+
export const de_GetGraphCommand = async (output, context) => {
|
|
883
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
884
|
+
return de_GetGraphCommandError(output, context);
|
|
885
|
+
}
|
|
886
|
+
const contents = map({
|
|
887
|
+
$metadata: deserializeMetadata(output),
|
|
888
|
+
});
|
|
889
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
890
|
+
const doc = take(data, {
|
|
891
|
+
arn: __expectString,
|
|
892
|
+
buildNumber: __expectString,
|
|
893
|
+
createTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
894
|
+
deletionProtection: __expectBoolean,
|
|
895
|
+
endpoint: __expectString,
|
|
896
|
+
id: __expectString,
|
|
897
|
+
kmsKeyIdentifier: __expectString,
|
|
898
|
+
name: __expectString,
|
|
899
|
+
provisionedMemory: __expectInt32,
|
|
900
|
+
publicConnectivity: __expectBoolean,
|
|
901
|
+
replicaCount: __expectInt32,
|
|
902
|
+
sourceSnapshotId: __expectString,
|
|
903
|
+
status: __expectString,
|
|
904
|
+
statusReason: __expectString,
|
|
905
|
+
vectorSearchConfiguration: _json,
|
|
906
|
+
});
|
|
907
|
+
Object.assign(contents, doc);
|
|
908
|
+
return contents;
|
|
909
|
+
};
|
|
910
|
+
const de_GetGraphCommandError = async (output, context) => {
|
|
911
|
+
const parsedOutput = {
|
|
912
|
+
...output,
|
|
913
|
+
body: await parseErrorBody(output.body, context),
|
|
914
|
+
};
|
|
915
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
916
|
+
switch (errorCode) {
|
|
917
|
+
case "InternalServerException":
|
|
918
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
919
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
920
|
+
case "ResourceNotFoundException":
|
|
921
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
922
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
923
|
+
case "ThrottlingException":
|
|
924
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
925
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
926
|
+
case "ValidationException":
|
|
927
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
928
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
929
|
+
default:
|
|
930
|
+
const parsedBody = parsedOutput.body;
|
|
931
|
+
return throwDefaultError({
|
|
932
|
+
output,
|
|
933
|
+
parsedBody,
|
|
934
|
+
errorCode,
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
};
|
|
938
|
+
export const de_GetGraphSnapshotCommand = async (output, context) => {
|
|
939
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
940
|
+
return de_GetGraphSnapshotCommandError(output, context);
|
|
941
|
+
}
|
|
942
|
+
const contents = map({
|
|
943
|
+
$metadata: deserializeMetadata(output),
|
|
944
|
+
});
|
|
945
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
946
|
+
const doc = take(data, {
|
|
947
|
+
arn: __expectString,
|
|
948
|
+
id: __expectString,
|
|
949
|
+
kmsKeyIdentifier: __expectString,
|
|
950
|
+
name: __expectString,
|
|
951
|
+
snapshotCreateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
952
|
+
sourceGraphId: __expectString,
|
|
953
|
+
status: __expectString,
|
|
954
|
+
});
|
|
955
|
+
Object.assign(contents, doc);
|
|
956
|
+
return contents;
|
|
957
|
+
};
|
|
958
|
+
const de_GetGraphSnapshotCommandError = async (output, context) => {
|
|
959
|
+
const parsedOutput = {
|
|
960
|
+
...output,
|
|
961
|
+
body: await parseErrorBody(output.body, context),
|
|
962
|
+
};
|
|
963
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
964
|
+
switch (errorCode) {
|
|
965
|
+
case "InternalServerException":
|
|
966
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
967
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
968
|
+
case "ResourceNotFoundException":
|
|
969
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
970
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
971
|
+
case "ThrottlingException":
|
|
972
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
973
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
974
|
+
case "ValidationException":
|
|
975
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
976
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
977
|
+
default:
|
|
978
|
+
const parsedBody = parsedOutput.body;
|
|
979
|
+
return throwDefaultError({
|
|
980
|
+
output,
|
|
981
|
+
parsedBody,
|
|
982
|
+
errorCode,
|
|
983
|
+
});
|
|
984
|
+
}
|
|
985
|
+
};
|
|
986
|
+
export const de_GetImportTaskCommand = async (output, context) => {
|
|
987
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
988
|
+
return de_GetImportTaskCommandError(output, context);
|
|
989
|
+
}
|
|
990
|
+
const contents = map({
|
|
991
|
+
$metadata: deserializeMetadata(output),
|
|
992
|
+
});
|
|
993
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
994
|
+
const doc = take(data, {
|
|
995
|
+
attemptNumber: __expectInt32,
|
|
996
|
+
format: __expectString,
|
|
997
|
+
graphId: __expectString,
|
|
998
|
+
importOptions: (_) => _json(__expectUnion(_)),
|
|
999
|
+
importTaskDetails: (_) => de_ImportTaskDetails(_, context),
|
|
1000
|
+
roleArn: __expectString,
|
|
1001
|
+
source: __expectString,
|
|
1002
|
+
status: __expectString,
|
|
1003
|
+
statusReason: __expectString,
|
|
1004
|
+
taskId: __expectString,
|
|
1005
|
+
});
|
|
1006
|
+
Object.assign(contents, doc);
|
|
1007
|
+
return contents;
|
|
1008
|
+
};
|
|
1009
|
+
const de_GetImportTaskCommandError = async (output, context) => {
|
|
1010
|
+
const parsedOutput = {
|
|
1011
|
+
...output,
|
|
1012
|
+
body: await parseErrorBody(output.body, context),
|
|
1013
|
+
};
|
|
1014
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1015
|
+
switch (errorCode) {
|
|
1016
|
+
case "InternalServerException":
|
|
1017
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
1018
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1019
|
+
case "ResourceNotFoundException":
|
|
1020
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
1021
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1022
|
+
case "ThrottlingException":
|
|
1023
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
1024
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1025
|
+
case "ValidationException":
|
|
1026
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
1027
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1028
|
+
default:
|
|
1029
|
+
const parsedBody = parsedOutput.body;
|
|
1030
|
+
return throwDefaultError({
|
|
1031
|
+
output,
|
|
1032
|
+
parsedBody,
|
|
1033
|
+
errorCode,
|
|
1034
|
+
});
|
|
1035
|
+
}
|
|
1036
|
+
};
|
|
1037
|
+
export const de_GetPrivateGraphEndpointCommand = async (output, context) => {
|
|
1038
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1039
|
+
return de_GetPrivateGraphEndpointCommandError(output, context);
|
|
1040
|
+
}
|
|
1041
|
+
const contents = map({
|
|
1042
|
+
$metadata: deserializeMetadata(output),
|
|
1043
|
+
});
|
|
1044
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1045
|
+
const doc = take(data, {
|
|
1046
|
+
status: __expectString,
|
|
1047
|
+
subnetIds: _json,
|
|
1048
|
+
vpcEndpointId: __expectString,
|
|
1049
|
+
vpcId: __expectString,
|
|
1050
|
+
});
|
|
1051
|
+
Object.assign(contents, doc);
|
|
1052
|
+
return contents;
|
|
1053
|
+
};
|
|
1054
|
+
const de_GetPrivateGraphEndpointCommandError = async (output, context) => {
|
|
1055
|
+
const parsedOutput = {
|
|
1056
|
+
...output,
|
|
1057
|
+
body: await parseErrorBody(output.body, context),
|
|
1058
|
+
};
|
|
1059
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1060
|
+
switch (errorCode) {
|
|
1061
|
+
case "InternalServerException":
|
|
1062
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
1063
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1064
|
+
case "ResourceNotFoundException":
|
|
1065
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
1066
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1067
|
+
case "ThrottlingException":
|
|
1068
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
1069
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1070
|
+
case "ValidationException":
|
|
1071
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
1072
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1073
|
+
default:
|
|
1074
|
+
const parsedBody = parsedOutput.body;
|
|
1075
|
+
return throwDefaultError({
|
|
1076
|
+
output,
|
|
1077
|
+
parsedBody,
|
|
1078
|
+
errorCode,
|
|
1079
|
+
});
|
|
1080
|
+
}
|
|
1081
|
+
};
|
|
1082
|
+
export const de_ListGraphsCommand = async (output, context) => {
|
|
1083
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1084
|
+
return de_ListGraphsCommandError(output, context);
|
|
1085
|
+
}
|
|
1086
|
+
const contents = map({
|
|
1087
|
+
$metadata: deserializeMetadata(output),
|
|
1088
|
+
});
|
|
1089
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1090
|
+
const doc = take(data, {
|
|
1091
|
+
graphs: _json,
|
|
1092
|
+
nextToken: __expectString,
|
|
1093
|
+
});
|
|
1094
|
+
Object.assign(contents, doc);
|
|
1095
|
+
return contents;
|
|
1096
|
+
};
|
|
1097
|
+
const de_ListGraphsCommandError = async (output, context) => {
|
|
1098
|
+
const parsedOutput = {
|
|
1099
|
+
...output,
|
|
1100
|
+
body: await parseErrorBody(output.body, context),
|
|
1101
|
+
};
|
|
1102
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1103
|
+
switch (errorCode) {
|
|
1104
|
+
case "InternalServerException":
|
|
1105
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
1106
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1107
|
+
case "ResourceNotFoundException":
|
|
1108
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
1109
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1110
|
+
case "ThrottlingException":
|
|
1111
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
1112
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1113
|
+
default:
|
|
1114
|
+
const parsedBody = parsedOutput.body;
|
|
1115
|
+
return throwDefaultError({
|
|
1116
|
+
output,
|
|
1117
|
+
parsedBody,
|
|
1118
|
+
errorCode,
|
|
1119
|
+
});
|
|
1120
|
+
}
|
|
1121
|
+
};
|
|
1122
|
+
export const de_ListGraphSnapshotsCommand = async (output, context) => {
|
|
1123
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1124
|
+
return de_ListGraphSnapshotsCommandError(output, context);
|
|
1125
|
+
}
|
|
1126
|
+
const contents = map({
|
|
1127
|
+
$metadata: deserializeMetadata(output),
|
|
1128
|
+
});
|
|
1129
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1130
|
+
const doc = take(data, {
|
|
1131
|
+
graphSnapshots: (_) => de_GraphSnapshotSummaryList(_, context),
|
|
1132
|
+
nextToken: __expectString,
|
|
1133
|
+
});
|
|
1134
|
+
Object.assign(contents, doc);
|
|
1135
|
+
return contents;
|
|
1136
|
+
};
|
|
1137
|
+
const de_ListGraphSnapshotsCommandError = async (output, context) => {
|
|
1138
|
+
const parsedOutput = {
|
|
1139
|
+
...output,
|
|
1140
|
+
body: await parseErrorBody(output.body, context),
|
|
1141
|
+
};
|
|
1142
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1143
|
+
switch (errorCode) {
|
|
1144
|
+
case "InternalServerException":
|
|
1145
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
1146
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1147
|
+
case "ResourceNotFoundException":
|
|
1148
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
1149
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1150
|
+
case "ThrottlingException":
|
|
1151
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
1152
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1153
|
+
case "ValidationException":
|
|
1154
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
1155
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1156
|
+
default:
|
|
1157
|
+
const parsedBody = parsedOutput.body;
|
|
1158
|
+
return throwDefaultError({
|
|
1159
|
+
output,
|
|
1160
|
+
parsedBody,
|
|
1161
|
+
errorCode,
|
|
1162
|
+
});
|
|
1163
|
+
}
|
|
1164
|
+
};
|
|
1165
|
+
export const de_ListImportTasksCommand = async (output, context) => {
|
|
1166
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1167
|
+
return de_ListImportTasksCommandError(output, context);
|
|
1168
|
+
}
|
|
1169
|
+
const contents = map({
|
|
1170
|
+
$metadata: deserializeMetadata(output),
|
|
1171
|
+
});
|
|
1172
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1173
|
+
const doc = take(data, {
|
|
1174
|
+
nextToken: __expectString,
|
|
1175
|
+
tasks: _json,
|
|
1176
|
+
});
|
|
1177
|
+
Object.assign(contents, doc);
|
|
1178
|
+
return contents;
|
|
1179
|
+
};
|
|
1180
|
+
const de_ListImportTasksCommandError = async (output, context) => {
|
|
1181
|
+
const parsedOutput = {
|
|
1182
|
+
...output,
|
|
1183
|
+
body: await parseErrorBody(output.body, context),
|
|
1184
|
+
};
|
|
1185
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1186
|
+
switch (errorCode) {
|
|
1187
|
+
case "InternalServerException":
|
|
1188
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
1189
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1190
|
+
case "ResourceNotFoundException":
|
|
1191
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
1192
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1193
|
+
case "ThrottlingException":
|
|
1194
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
1195
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1196
|
+
case "ValidationException":
|
|
1197
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
1198
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1199
|
+
default:
|
|
1200
|
+
const parsedBody = parsedOutput.body;
|
|
1201
|
+
return throwDefaultError({
|
|
1202
|
+
output,
|
|
1203
|
+
parsedBody,
|
|
1204
|
+
errorCode,
|
|
1205
|
+
});
|
|
1206
|
+
}
|
|
1207
|
+
};
|
|
1208
|
+
export const de_ListPrivateGraphEndpointsCommand = async (output, context) => {
|
|
1209
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1210
|
+
return de_ListPrivateGraphEndpointsCommandError(output, context);
|
|
1211
|
+
}
|
|
1212
|
+
const contents = map({
|
|
1213
|
+
$metadata: deserializeMetadata(output),
|
|
1214
|
+
});
|
|
1215
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1216
|
+
const doc = take(data, {
|
|
1217
|
+
nextToken: __expectString,
|
|
1218
|
+
privateGraphEndpoints: _json,
|
|
1219
|
+
});
|
|
1220
|
+
Object.assign(contents, doc);
|
|
1221
|
+
return contents;
|
|
1222
|
+
};
|
|
1223
|
+
const de_ListPrivateGraphEndpointsCommandError = async (output, context) => {
|
|
1224
|
+
const parsedOutput = {
|
|
1225
|
+
...output,
|
|
1226
|
+
body: await parseErrorBody(output.body, context),
|
|
1227
|
+
};
|
|
1228
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1229
|
+
switch (errorCode) {
|
|
1230
|
+
case "InternalServerException":
|
|
1231
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
1232
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1233
|
+
case "ResourceNotFoundException":
|
|
1234
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
1235
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1236
|
+
case "ThrottlingException":
|
|
1237
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
1238
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1239
|
+
case "ValidationException":
|
|
1240
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
1241
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1242
|
+
default:
|
|
1243
|
+
const parsedBody = parsedOutput.body;
|
|
1244
|
+
return throwDefaultError({
|
|
1245
|
+
output,
|
|
1246
|
+
parsedBody,
|
|
1247
|
+
errorCode,
|
|
1248
|
+
});
|
|
1249
|
+
}
|
|
1250
|
+
};
|
|
1251
|
+
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
1252
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1253
|
+
return de_ListTagsForResourceCommandError(output, context);
|
|
1254
|
+
}
|
|
1255
|
+
const contents = map({
|
|
1256
|
+
$metadata: deserializeMetadata(output),
|
|
1257
|
+
});
|
|
1258
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1259
|
+
const doc = take(data, {
|
|
1260
|
+
tags: _json,
|
|
1261
|
+
});
|
|
1262
|
+
Object.assign(contents, doc);
|
|
1263
|
+
return contents;
|
|
1264
|
+
};
|
|
1265
|
+
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
1266
|
+
const parsedOutput = {
|
|
1267
|
+
...output,
|
|
1268
|
+
body: await parseErrorBody(output.body, context),
|
|
1269
|
+
};
|
|
1270
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1271
|
+
switch (errorCode) {
|
|
1272
|
+
case "InternalServerException":
|
|
1273
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
1274
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1275
|
+
case "ResourceNotFoundException":
|
|
1276
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
1277
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1278
|
+
case "ThrottlingException":
|
|
1279
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
1280
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1281
|
+
case "ValidationException":
|
|
1282
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
1283
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1284
|
+
default:
|
|
1285
|
+
const parsedBody = parsedOutput.body;
|
|
1286
|
+
return throwDefaultError({
|
|
1287
|
+
output,
|
|
1288
|
+
parsedBody,
|
|
1289
|
+
errorCode,
|
|
1290
|
+
});
|
|
1291
|
+
}
|
|
1292
|
+
};
|
|
1293
|
+
export const de_ResetGraphCommand = async (output, context) => {
|
|
1294
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1295
|
+
return de_ResetGraphCommandError(output, context);
|
|
1296
|
+
}
|
|
1297
|
+
const contents = map({
|
|
1298
|
+
$metadata: deserializeMetadata(output),
|
|
1299
|
+
});
|
|
1300
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1301
|
+
const doc = take(data, {
|
|
1302
|
+
arn: __expectString,
|
|
1303
|
+
buildNumber: __expectString,
|
|
1304
|
+
createTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1305
|
+
deletionProtection: __expectBoolean,
|
|
1306
|
+
endpoint: __expectString,
|
|
1307
|
+
id: __expectString,
|
|
1308
|
+
kmsKeyIdentifier: __expectString,
|
|
1309
|
+
name: __expectString,
|
|
1310
|
+
provisionedMemory: __expectInt32,
|
|
1311
|
+
publicConnectivity: __expectBoolean,
|
|
1312
|
+
replicaCount: __expectInt32,
|
|
1313
|
+
sourceSnapshotId: __expectString,
|
|
1314
|
+
status: __expectString,
|
|
1315
|
+
statusReason: __expectString,
|
|
1316
|
+
vectorSearchConfiguration: _json,
|
|
1317
|
+
});
|
|
1318
|
+
Object.assign(contents, doc);
|
|
1319
|
+
return contents;
|
|
1320
|
+
};
|
|
1321
|
+
const de_ResetGraphCommandError = async (output, context) => {
|
|
1322
|
+
const parsedOutput = {
|
|
1323
|
+
...output,
|
|
1324
|
+
body: await parseErrorBody(output.body, context),
|
|
1325
|
+
};
|
|
1326
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1327
|
+
switch (errorCode) {
|
|
1328
|
+
case "ConflictException":
|
|
1329
|
+
case "com.amazonaws.neptunegraph#ConflictException":
|
|
1330
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1331
|
+
case "InternalServerException":
|
|
1332
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
1333
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1334
|
+
case "ResourceNotFoundException":
|
|
1335
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
1336
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1337
|
+
case "ThrottlingException":
|
|
1338
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
1339
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1340
|
+
case "ValidationException":
|
|
1341
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
1342
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1343
|
+
default:
|
|
1344
|
+
const parsedBody = parsedOutput.body;
|
|
1345
|
+
return throwDefaultError({
|
|
1346
|
+
output,
|
|
1347
|
+
parsedBody,
|
|
1348
|
+
errorCode,
|
|
1349
|
+
});
|
|
1350
|
+
}
|
|
1351
|
+
};
|
|
1352
|
+
export const de_RestoreGraphFromSnapshotCommand = async (output, context) => {
|
|
1353
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1354
|
+
return de_RestoreGraphFromSnapshotCommandError(output, context);
|
|
1355
|
+
}
|
|
1356
|
+
const contents = map({
|
|
1357
|
+
$metadata: deserializeMetadata(output),
|
|
1358
|
+
});
|
|
1359
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1360
|
+
const doc = take(data, {
|
|
1361
|
+
arn: __expectString,
|
|
1362
|
+
buildNumber: __expectString,
|
|
1363
|
+
createTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1364
|
+
deletionProtection: __expectBoolean,
|
|
1365
|
+
endpoint: __expectString,
|
|
1366
|
+
id: __expectString,
|
|
1367
|
+
kmsKeyIdentifier: __expectString,
|
|
1368
|
+
name: __expectString,
|
|
1369
|
+
provisionedMemory: __expectInt32,
|
|
1370
|
+
publicConnectivity: __expectBoolean,
|
|
1371
|
+
replicaCount: __expectInt32,
|
|
1372
|
+
sourceSnapshotId: __expectString,
|
|
1373
|
+
status: __expectString,
|
|
1374
|
+
statusReason: __expectString,
|
|
1375
|
+
vectorSearchConfiguration: _json,
|
|
1376
|
+
});
|
|
1377
|
+
Object.assign(contents, doc);
|
|
1378
|
+
return contents;
|
|
1379
|
+
};
|
|
1380
|
+
const de_RestoreGraphFromSnapshotCommandError = async (output, context) => {
|
|
1381
|
+
const parsedOutput = {
|
|
1382
|
+
...output,
|
|
1383
|
+
body: await parseErrorBody(output.body, context),
|
|
1384
|
+
};
|
|
1385
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1386
|
+
switch (errorCode) {
|
|
1387
|
+
case "ConflictException":
|
|
1388
|
+
case "com.amazonaws.neptunegraph#ConflictException":
|
|
1389
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1390
|
+
case "InternalServerException":
|
|
1391
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
1392
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1393
|
+
case "ResourceNotFoundException":
|
|
1394
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
1395
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1396
|
+
case "ServiceQuotaExceededException":
|
|
1397
|
+
case "com.amazonaws.neptunegraph#ServiceQuotaExceededException":
|
|
1398
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1399
|
+
case "ThrottlingException":
|
|
1400
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
1401
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1402
|
+
case "ValidationException":
|
|
1403
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
1404
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1405
|
+
default:
|
|
1406
|
+
const parsedBody = parsedOutput.body;
|
|
1407
|
+
return throwDefaultError({
|
|
1408
|
+
output,
|
|
1409
|
+
parsedBody,
|
|
1410
|
+
errorCode,
|
|
1411
|
+
});
|
|
1412
|
+
}
|
|
1413
|
+
};
|
|
1414
|
+
export const de_TagResourceCommand = async (output, context) => {
|
|
1415
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1416
|
+
return de_TagResourceCommandError(output, context);
|
|
1417
|
+
}
|
|
1418
|
+
const contents = map({
|
|
1419
|
+
$metadata: deserializeMetadata(output),
|
|
1420
|
+
});
|
|
1421
|
+
await collectBody(output.body, context);
|
|
1422
|
+
return contents;
|
|
1423
|
+
};
|
|
1424
|
+
const de_TagResourceCommandError = async (output, context) => {
|
|
1425
|
+
const parsedOutput = {
|
|
1426
|
+
...output,
|
|
1427
|
+
body: await parseErrorBody(output.body, context),
|
|
1428
|
+
};
|
|
1429
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1430
|
+
switch (errorCode) {
|
|
1431
|
+
case "InternalServerException":
|
|
1432
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
1433
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1434
|
+
case "ResourceNotFoundException":
|
|
1435
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
1436
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1437
|
+
case "ThrottlingException":
|
|
1438
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
1439
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1440
|
+
case "ValidationException":
|
|
1441
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
1442
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1443
|
+
default:
|
|
1444
|
+
const parsedBody = parsedOutput.body;
|
|
1445
|
+
return throwDefaultError({
|
|
1446
|
+
output,
|
|
1447
|
+
parsedBody,
|
|
1448
|
+
errorCode,
|
|
1449
|
+
});
|
|
1450
|
+
}
|
|
1451
|
+
};
|
|
1452
|
+
export const de_UntagResourceCommand = async (output, context) => {
|
|
1453
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1454
|
+
return de_UntagResourceCommandError(output, context);
|
|
1455
|
+
}
|
|
1456
|
+
const contents = map({
|
|
1457
|
+
$metadata: deserializeMetadata(output),
|
|
1458
|
+
});
|
|
1459
|
+
await collectBody(output.body, context);
|
|
1460
|
+
return contents;
|
|
1461
|
+
};
|
|
1462
|
+
const de_UntagResourceCommandError = async (output, context) => {
|
|
1463
|
+
const parsedOutput = {
|
|
1464
|
+
...output,
|
|
1465
|
+
body: await parseErrorBody(output.body, context),
|
|
1466
|
+
};
|
|
1467
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1468
|
+
switch (errorCode) {
|
|
1469
|
+
case "InternalServerException":
|
|
1470
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
1471
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1472
|
+
case "ResourceNotFoundException":
|
|
1473
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
1474
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1475
|
+
case "ThrottlingException":
|
|
1476
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
1477
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1478
|
+
case "ValidationException":
|
|
1479
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
1480
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1481
|
+
default:
|
|
1482
|
+
const parsedBody = parsedOutput.body;
|
|
1483
|
+
return throwDefaultError({
|
|
1484
|
+
output,
|
|
1485
|
+
parsedBody,
|
|
1486
|
+
errorCode,
|
|
1487
|
+
});
|
|
1488
|
+
}
|
|
1489
|
+
};
|
|
1490
|
+
export const de_UpdateGraphCommand = async (output, context) => {
|
|
1491
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1492
|
+
return de_UpdateGraphCommandError(output, context);
|
|
1493
|
+
}
|
|
1494
|
+
const contents = map({
|
|
1495
|
+
$metadata: deserializeMetadata(output),
|
|
1496
|
+
});
|
|
1497
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1498
|
+
const doc = take(data, {
|
|
1499
|
+
arn: __expectString,
|
|
1500
|
+
buildNumber: __expectString,
|
|
1501
|
+
createTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1502
|
+
deletionProtection: __expectBoolean,
|
|
1503
|
+
endpoint: __expectString,
|
|
1504
|
+
id: __expectString,
|
|
1505
|
+
kmsKeyIdentifier: __expectString,
|
|
1506
|
+
name: __expectString,
|
|
1507
|
+
provisionedMemory: __expectInt32,
|
|
1508
|
+
publicConnectivity: __expectBoolean,
|
|
1509
|
+
replicaCount: __expectInt32,
|
|
1510
|
+
sourceSnapshotId: __expectString,
|
|
1511
|
+
status: __expectString,
|
|
1512
|
+
statusReason: __expectString,
|
|
1513
|
+
vectorSearchConfiguration: _json,
|
|
1514
|
+
});
|
|
1515
|
+
Object.assign(contents, doc);
|
|
1516
|
+
return contents;
|
|
1517
|
+
};
|
|
1518
|
+
const de_UpdateGraphCommandError = async (output, context) => {
|
|
1519
|
+
const parsedOutput = {
|
|
1520
|
+
...output,
|
|
1521
|
+
body: await parseErrorBody(output.body, context),
|
|
1522
|
+
};
|
|
1523
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1524
|
+
switch (errorCode) {
|
|
1525
|
+
case "ConflictException":
|
|
1526
|
+
case "com.amazonaws.neptunegraph#ConflictException":
|
|
1527
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1528
|
+
case "InternalServerException":
|
|
1529
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
1530
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1531
|
+
case "ResourceNotFoundException":
|
|
1532
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
1533
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1534
|
+
case "ThrottlingException":
|
|
1535
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
1536
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1537
|
+
case "ValidationException":
|
|
1538
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
1539
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1540
|
+
default:
|
|
1541
|
+
const parsedBody = parsedOutput.body;
|
|
1542
|
+
return throwDefaultError({
|
|
1543
|
+
output,
|
|
1544
|
+
parsedBody,
|
|
1545
|
+
errorCode,
|
|
1546
|
+
});
|
|
1547
|
+
}
|
|
1548
|
+
};
|
|
1549
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
1550
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1551
|
+
const contents = map({});
|
|
1552
|
+
const data = parsedOutput.body;
|
|
1553
|
+
const doc = take(data, {
|
|
1554
|
+
message: __expectString,
|
|
1555
|
+
reason: __expectString,
|
|
1556
|
+
});
|
|
1557
|
+
Object.assign(contents, doc);
|
|
1558
|
+
const exception = new ConflictException({
|
|
1559
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1560
|
+
...contents,
|
|
1561
|
+
});
|
|
1562
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1563
|
+
};
|
|
1564
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
1565
|
+
const contents = map({});
|
|
1566
|
+
const data = parsedOutput.body;
|
|
1567
|
+
const doc = take(data, {
|
|
1568
|
+
message: __expectString,
|
|
1569
|
+
});
|
|
1570
|
+
Object.assign(contents, doc);
|
|
1571
|
+
const exception = new InternalServerException({
|
|
1572
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1573
|
+
...contents,
|
|
1574
|
+
});
|
|
1575
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1576
|
+
};
|
|
1577
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1578
|
+
const contents = map({});
|
|
1579
|
+
const data = parsedOutput.body;
|
|
1580
|
+
const doc = take(data, {
|
|
1581
|
+
message: __expectString,
|
|
1582
|
+
});
|
|
1583
|
+
Object.assign(contents, doc);
|
|
1584
|
+
const exception = new ResourceNotFoundException({
|
|
1585
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1586
|
+
...contents,
|
|
1587
|
+
});
|
|
1588
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1589
|
+
};
|
|
1590
|
+
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
1591
|
+
const contents = map({});
|
|
1592
|
+
const data = parsedOutput.body;
|
|
1593
|
+
const doc = take(data, {
|
|
1594
|
+
message: __expectString,
|
|
1595
|
+
quotaCode: __expectString,
|
|
1596
|
+
resourceId: __expectString,
|
|
1597
|
+
resourceType: __expectString,
|
|
1598
|
+
serviceCode: __expectString,
|
|
1599
|
+
});
|
|
1600
|
+
Object.assign(contents, doc);
|
|
1601
|
+
const exception = new ServiceQuotaExceededException({
|
|
1602
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1603
|
+
...contents,
|
|
1604
|
+
});
|
|
1605
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1606
|
+
};
|
|
1607
|
+
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
1608
|
+
const contents = map({});
|
|
1609
|
+
const data = parsedOutput.body;
|
|
1610
|
+
const doc = take(data, {
|
|
1611
|
+
message: __expectString,
|
|
1612
|
+
});
|
|
1613
|
+
Object.assign(contents, doc);
|
|
1614
|
+
const exception = new ThrottlingException({
|
|
1615
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1616
|
+
...contents,
|
|
1617
|
+
});
|
|
1618
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1619
|
+
};
|
|
1620
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1621
|
+
const contents = map({});
|
|
1622
|
+
const data = parsedOutput.body;
|
|
1623
|
+
const doc = take(data, {
|
|
1624
|
+
message: __expectString,
|
|
1625
|
+
reason: __expectString,
|
|
1626
|
+
});
|
|
1627
|
+
Object.assign(contents, doc);
|
|
1628
|
+
const exception = new ValidationException({
|
|
1629
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1630
|
+
...contents,
|
|
1631
|
+
});
|
|
1632
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1633
|
+
};
|
|
1634
|
+
const de_GraphSnapshotSummary = (output, context) => {
|
|
1635
|
+
return take(output, {
|
|
1636
|
+
arn: __expectString,
|
|
1637
|
+
id: __expectString,
|
|
1638
|
+
kmsKeyIdentifier: __expectString,
|
|
1639
|
+
name: __expectString,
|
|
1640
|
+
snapshotCreateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1641
|
+
sourceGraphId: __expectString,
|
|
1642
|
+
status: __expectString,
|
|
1643
|
+
});
|
|
1644
|
+
};
|
|
1645
|
+
const de_GraphSnapshotSummaryList = (output, context) => {
|
|
1646
|
+
const retVal = (output || [])
|
|
1647
|
+
.filter((e) => e != null)
|
|
1648
|
+
.map((entry) => {
|
|
1649
|
+
return de_GraphSnapshotSummary(entry, context);
|
|
1650
|
+
});
|
|
1651
|
+
return retVal;
|
|
1652
|
+
};
|
|
1653
|
+
const de_ImportTaskDetails = (output, context) => {
|
|
1654
|
+
return take(output, {
|
|
1655
|
+
dictionaryEntryCount: __expectLong,
|
|
1656
|
+
errorCount: __expectInt32,
|
|
1657
|
+
errorDetails: __expectString,
|
|
1658
|
+
progressPercentage: __expectInt32,
|
|
1659
|
+
startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1660
|
+
statementCount: __expectLong,
|
|
1661
|
+
status: __expectString,
|
|
1662
|
+
timeElapsedSeconds: __expectLong,
|
|
1663
|
+
});
|
|
1664
|
+
};
|
|
1665
|
+
const deserializeMetadata = (output) => ({
|
|
1666
|
+
httpStatusCode: output.statusCode,
|
|
1667
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1668
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1669
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1670
|
+
});
|
|
1671
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1672
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1673
|
+
value !== null &&
|
|
1674
|
+
value !== "" &&
|
|
1675
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1676
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1677
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1678
|
+
if (encoded.length) {
|
|
1679
|
+
return JSON.parse(encoded);
|
|
1680
|
+
}
|
|
1681
|
+
return {};
|
|
1682
|
+
});
|
|
1683
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1684
|
+
const value = await parseBody(errorBody, context);
|
|
1685
|
+
value.message = value.message ?? value.Message;
|
|
1686
|
+
return value;
|
|
1687
|
+
};
|
|
1688
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1689
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1690
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1691
|
+
let cleanValue = rawValue;
|
|
1692
|
+
if (typeof cleanValue === "number") {
|
|
1693
|
+
cleanValue = cleanValue.toString();
|
|
1694
|
+
}
|
|
1695
|
+
if (cleanValue.indexOf(",") >= 0) {
|
|
1696
|
+
cleanValue = cleanValue.split(",")[0];
|
|
1697
|
+
}
|
|
1698
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
1699
|
+
cleanValue = cleanValue.split(":")[0];
|
|
1700
|
+
}
|
|
1701
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
1702
|
+
cleanValue = cleanValue.split("#")[1];
|
|
1703
|
+
}
|
|
1704
|
+
return cleanValue;
|
|
1705
|
+
};
|
|
1706
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1707
|
+
if (headerKey !== undefined) {
|
|
1708
|
+
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1709
|
+
}
|
|
1710
|
+
if (data.code !== undefined) {
|
|
1711
|
+
return sanitizeErrorCode(data.code);
|
|
1712
|
+
}
|
|
1713
|
+
if (data["__type"] !== undefined) {
|
|
1714
|
+
return sanitizeErrorCode(data["__type"]);
|
|
1715
|
+
}
|
|
1716
|
+
};
|