@aws-sdk/client-datasync 3.489.0 → 3.495.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.
Files changed (83) hide show
  1. package/dist-cjs/DataSync.js +1 -131
  2. package/dist-cjs/DataSyncClient.js +1 -43
  3. package/dist-cjs/commands/AddStorageSystemCommand.js +1 -29
  4. package/dist-cjs/commands/CancelTaskExecutionCommand.js +1 -28
  5. package/dist-cjs/commands/CreateAgentCommand.js +1 -28
  6. package/dist-cjs/commands/CreateLocationAzureBlobCommand.js +1 -29
  7. package/dist-cjs/commands/CreateLocationEfsCommand.js +1 -28
  8. package/dist-cjs/commands/CreateLocationFsxLustreCommand.js +1 -28
  9. package/dist-cjs/commands/CreateLocationFsxOntapCommand.js +1 -29
  10. package/dist-cjs/commands/CreateLocationFsxOpenZfsCommand.js +1 -29
  11. package/dist-cjs/commands/CreateLocationFsxWindowsCommand.js +1 -29
  12. package/dist-cjs/commands/CreateLocationHdfsCommand.js +1 -28
  13. package/dist-cjs/commands/CreateLocationNfsCommand.js +1 -28
  14. package/dist-cjs/commands/CreateLocationObjectStorageCommand.js +1 -29
  15. package/dist-cjs/commands/CreateLocationS3Command.js +1 -28
  16. package/dist-cjs/commands/CreateLocationSmbCommand.js +1 -29
  17. package/dist-cjs/commands/CreateTaskCommand.js +1 -28
  18. package/dist-cjs/commands/DeleteAgentCommand.js +1 -28
  19. package/dist-cjs/commands/DeleteLocationCommand.js +1 -28
  20. package/dist-cjs/commands/DeleteTaskCommand.js +1 -28
  21. package/dist-cjs/commands/DescribeAgentCommand.js +1 -28
  22. package/dist-cjs/commands/DescribeDiscoveryJobCommand.js +1 -28
  23. package/dist-cjs/commands/DescribeLocationAzureBlobCommand.js +1 -28
  24. package/dist-cjs/commands/DescribeLocationEfsCommand.js +1 -28
  25. package/dist-cjs/commands/DescribeLocationFsxLustreCommand.js +1 -28
  26. package/dist-cjs/commands/DescribeLocationFsxOntapCommand.js +1 -29
  27. package/dist-cjs/commands/DescribeLocationFsxOpenZfsCommand.js +1 -29
  28. package/dist-cjs/commands/DescribeLocationFsxWindowsCommand.js +1 -28
  29. package/dist-cjs/commands/DescribeLocationHdfsCommand.js +1 -28
  30. package/dist-cjs/commands/DescribeLocationNfsCommand.js +1 -28
  31. package/dist-cjs/commands/DescribeLocationObjectStorageCommand.js +1 -28
  32. package/dist-cjs/commands/DescribeLocationS3Command.js +1 -28
  33. package/dist-cjs/commands/DescribeLocationSmbCommand.js +1 -28
  34. package/dist-cjs/commands/DescribeStorageSystemCommand.js +1 -28
  35. package/dist-cjs/commands/DescribeStorageSystemResourceMetricsCommand.js +1 -28
  36. package/dist-cjs/commands/DescribeStorageSystemResourcesCommand.js +1 -28
  37. package/dist-cjs/commands/DescribeTaskCommand.js +1 -28
  38. package/dist-cjs/commands/DescribeTaskExecutionCommand.js +1 -28
  39. package/dist-cjs/commands/GenerateRecommendationsCommand.js +1 -28
  40. package/dist-cjs/commands/ListAgentsCommand.js +1 -28
  41. package/dist-cjs/commands/ListDiscoveryJobsCommand.js +1 -28
  42. package/dist-cjs/commands/ListLocationsCommand.js +1 -28
  43. package/dist-cjs/commands/ListStorageSystemsCommand.js +1 -28
  44. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  45. package/dist-cjs/commands/ListTaskExecutionsCommand.js +1 -28
  46. package/dist-cjs/commands/ListTasksCommand.js +1 -28
  47. package/dist-cjs/commands/RemoveStorageSystemCommand.js +1 -28
  48. package/dist-cjs/commands/StartDiscoveryJobCommand.js +1 -28
  49. package/dist-cjs/commands/StartTaskExecutionCommand.js +1 -28
  50. package/dist-cjs/commands/StopDiscoveryJobCommand.js +1 -28
  51. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  52. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  53. package/dist-cjs/commands/UpdateAgentCommand.js +1 -28
  54. package/dist-cjs/commands/UpdateDiscoveryJobCommand.js +1 -28
  55. package/dist-cjs/commands/UpdateLocationAzureBlobCommand.js +1 -29
  56. package/dist-cjs/commands/UpdateLocationHdfsCommand.js +1 -28
  57. package/dist-cjs/commands/UpdateLocationNfsCommand.js +1 -28
  58. package/dist-cjs/commands/UpdateLocationObjectStorageCommand.js +1 -29
  59. package/dist-cjs/commands/UpdateLocationSmbCommand.js +1 -29
  60. package/dist-cjs/commands/UpdateStorageSystemCommand.js +1 -29
  61. package/dist-cjs/commands/UpdateTaskCommand.js +1 -28
  62. package/dist-cjs/commands/UpdateTaskExecutionCommand.js +1 -28
  63. package/dist-cjs/commands/index.js +1 -63
  64. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  65. package/dist-cjs/extensionConfiguration.js +1 -2
  66. package/dist-cjs/index.js +4944 -11
  67. package/dist-cjs/models/DataSyncServiceException.js +1 -12
  68. package/dist-cjs/models/index.js +1 -4
  69. package/dist-cjs/models/models_0.js +1 -339
  70. package/dist-cjs/pagination/DescribeStorageSystemResourceMetricsPaginator.js +1 -7
  71. package/dist-cjs/pagination/DescribeStorageSystemResourcesPaginator.js +1 -7
  72. package/dist-cjs/pagination/Interfaces.js +1 -2
  73. package/dist-cjs/pagination/ListAgentsPaginator.js +1 -7
  74. package/dist-cjs/pagination/ListDiscoveryJobsPaginator.js +1 -7
  75. package/dist-cjs/pagination/ListLocationsPaginator.js +1 -7
  76. package/dist-cjs/pagination/ListStorageSystemsPaginator.js +1 -7
  77. package/dist-cjs/pagination/ListTagsForResourcePaginator.js +1 -7
  78. package/dist-cjs/pagination/ListTaskExecutionsPaginator.js +1 -7
  79. package/dist-cjs/pagination/ListTasksPaginator.js +1 -7
  80. package/dist-cjs/pagination/index.js +1 -13
  81. package/dist-cjs/protocols/Aws_json1_1.js +1 -3218
  82. package/dist-cjs/runtimeExtensions.js +1 -22
  83. package/package.json +40 -40
@@ -1,3218 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopDiscoveryJobCommand = exports.se_StartTaskExecutionCommand = exports.se_StartDiscoveryJobCommand = exports.se_RemoveStorageSystemCommand = exports.se_ListTasksCommand = exports.se_ListTaskExecutionsCommand = exports.se_ListTagsForResourceCommand = exports.se_ListStorageSystemsCommand = exports.se_ListLocationsCommand = exports.se_ListDiscoveryJobsCommand = exports.se_ListAgentsCommand = exports.se_GenerateRecommendationsCommand = exports.se_DescribeTaskExecutionCommand = exports.se_DescribeTaskCommand = exports.se_DescribeStorageSystemResourcesCommand = exports.se_DescribeStorageSystemResourceMetricsCommand = exports.se_DescribeStorageSystemCommand = exports.se_DescribeLocationSmbCommand = exports.se_DescribeLocationS3Command = exports.se_DescribeLocationObjectStorageCommand = exports.se_DescribeLocationNfsCommand = exports.se_DescribeLocationHdfsCommand = exports.se_DescribeLocationFsxWindowsCommand = exports.se_DescribeLocationFsxOpenZfsCommand = exports.se_DescribeLocationFsxOntapCommand = exports.se_DescribeLocationFsxLustreCommand = exports.se_DescribeLocationEfsCommand = exports.se_DescribeLocationAzureBlobCommand = exports.se_DescribeDiscoveryJobCommand = exports.se_DescribeAgentCommand = exports.se_DeleteTaskCommand = exports.se_DeleteLocationCommand = exports.se_DeleteAgentCommand = exports.se_CreateTaskCommand = exports.se_CreateLocationSmbCommand = exports.se_CreateLocationS3Command = exports.se_CreateLocationObjectStorageCommand = exports.se_CreateLocationNfsCommand = exports.se_CreateLocationHdfsCommand = exports.se_CreateLocationFsxWindowsCommand = exports.se_CreateLocationFsxOpenZfsCommand = exports.se_CreateLocationFsxOntapCommand = exports.se_CreateLocationFsxLustreCommand = exports.se_CreateLocationEfsCommand = exports.se_CreateLocationAzureBlobCommand = exports.se_CreateAgentCommand = exports.se_CancelTaskExecutionCommand = exports.se_AddStorageSystemCommand = void 0;
4
- exports.de_ListLocationsCommand = exports.de_ListDiscoveryJobsCommand = exports.de_ListAgentsCommand = exports.de_GenerateRecommendationsCommand = exports.de_DescribeTaskExecutionCommand = exports.de_DescribeTaskCommand = exports.de_DescribeStorageSystemResourcesCommand = exports.de_DescribeStorageSystemResourceMetricsCommand = exports.de_DescribeStorageSystemCommand = exports.de_DescribeLocationSmbCommand = exports.de_DescribeLocationS3Command = exports.de_DescribeLocationObjectStorageCommand = exports.de_DescribeLocationNfsCommand = exports.de_DescribeLocationHdfsCommand = exports.de_DescribeLocationFsxWindowsCommand = exports.de_DescribeLocationFsxOpenZfsCommand = exports.de_DescribeLocationFsxOntapCommand = exports.de_DescribeLocationFsxLustreCommand = exports.de_DescribeLocationEfsCommand = exports.de_DescribeLocationAzureBlobCommand = exports.de_DescribeDiscoveryJobCommand = exports.de_DescribeAgentCommand = exports.de_DeleteTaskCommand = exports.de_DeleteLocationCommand = exports.de_DeleteAgentCommand = exports.de_CreateTaskCommand = exports.de_CreateLocationSmbCommand = exports.de_CreateLocationS3Command = exports.de_CreateLocationObjectStorageCommand = exports.de_CreateLocationNfsCommand = exports.de_CreateLocationHdfsCommand = exports.de_CreateLocationFsxWindowsCommand = exports.de_CreateLocationFsxOpenZfsCommand = exports.de_CreateLocationFsxOntapCommand = exports.de_CreateLocationFsxLustreCommand = exports.de_CreateLocationEfsCommand = exports.de_CreateLocationAzureBlobCommand = exports.de_CreateAgentCommand = exports.de_CancelTaskExecutionCommand = exports.de_AddStorageSystemCommand = exports.se_UpdateTaskExecutionCommand = exports.se_UpdateTaskCommand = exports.se_UpdateStorageSystemCommand = exports.se_UpdateLocationSmbCommand = exports.se_UpdateLocationObjectStorageCommand = exports.se_UpdateLocationNfsCommand = exports.se_UpdateLocationHdfsCommand = exports.se_UpdateLocationAzureBlobCommand = exports.se_UpdateDiscoveryJobCommand = exports.se_UpdateAgentCommand = void 0;
5
- exports.de_UpdateTaskExecutionCommand = exports.de_UpdateTaskCommand = exports.de_UpdateStorageSystemCommand = exports.de_UpdateLocationSmbCommand = exports.de_UpdateLocationObjectStorageCommand = exports.de_UpdateLocationNfsCommand = exports.de_UpdateLocationHdfsCommand = exports.de_UpdateLocationAzureBlobCommand = exports.de_UpdateDiscoveryJobCommand = exports.de_UpdateAgentCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopDiscoveryJobCommand = exports.de_StartTaskExecutionCommand = exports.de_StartDiscoveryJobCommand = exports.de_RemoveStorageSystemCommand = exports.de_ListTasksCommand = exports.de_ListTaskExecutionsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListStorageSystemsCommand = void 0;
6
- const protocol_http_1 = require("@smithy/protocol-http");
7
- const smithy_client_1 = require("@smithy/smithy-client");
8
- const uuid_1 = require("uuid");
9
- const DataSyncServiceException_1 = require("../models/DataSyncServiceException");
10
- const models_0_1 = require("../models/models_0");
11
- const se_AddStorageSystemCommand = async (input, context) => {
12
- const headers = sharedHeaders("AddStorageSystem");
13
- let body;
14
- body = JSON.stringify(se_AddStorageSystemRequest(input, context));
15
- let { hostname: resolvedHostname } = await context.endpoint();
16
- if (context.disableHostPrefix !== true) {
17
- resolvedHostname = "discovery-" + resolvedHostname;
18
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
19
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
20
- }
21
- }
22
- return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
23
- };
24
- exports.se_AddStorageSystemCommand = se_AddStorageSystemCommand;
25
- const se_CancelTaskExecutionCommand = async (input, context) => {
26
- const headers = sharedHeaders("CancelTaskExecution");
27
- let body;
28
- body = JSON.stringify((0, smithy_client_1._json)(input));
29
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
30
- };
31
- exports.se_CancelTaskExecutionCommand = se_CancelTaskExecutionCommand;
32
- const se_CreateAgentCommand = async (input, context) => {
33
- const headers = sharedHeaders("CreateAgent");
34
- let body;
35
- body = JSON.stringify((0, smithy_client_1._json)(input));
36
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
37
- };
38
- exports.se_CreateAgentCommand = se_CreateAgentCommand;
39
- const se_CreateLocationAzureBlobCommand = async (input, context) => {
40
- const headers = sharedHeaders("CreateLocationAzureBlob");
41
- let body;
42
- body = JSON.stringify((0, smithy_client_1._json)(input));
43
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
44
- };
45
- exports.se_CreateLocationAzureBlobCommand = se_CreateLocationAzureBlobCommand;
46
- const se_CreateLocationEfsCommand = async (input, context) => {
47
- const headers = sharedHeaders("CreateLocationEfs");
48
- let body;
49
- body = JSON.stringify((0, smithy_client_1._json)(input));
50
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
51
- };
52
- exports.se_CreateLocationEfsCommand = se_CreateLocationEfsCommand;
53
- const se_CreateLocationFsxLustreCommand = async (input, context) => {
54
- const headers = sharedHeaders("CreateLocationFsxLustre");
55
- let body;
56
- body = JSON.stringify((0, smithy_client_1._json)(input));
57
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
- };
59
- exports.se_CreateLocationFsxLustreCommand = se_CreateLocationFsxLustreCommand;
60
- const se_CreateLocationFsxOntapCommand = async (input, context) => {
61
- const headers = sharedHeaders("CreateLocationFsxOntap");
62
- let body;
63
- body = JSON.stringify((0, smithy_client_1._json)(input));
64
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
65
- };
66
- exports.se_CreateLocationFsxOntapCommand = se_CreateLocationFsxOntapCommand;
67
- const se_CreateLocationFsxOpenZfsCommand = async (input, context) => {
68
- const headers = sharedHeaders("CreateLocationFsxOpenZfs");
69
- let body;
70
- body = JSON.stringify((0, smithy_client_1._json)(input));
71
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
72
- };
73
- exports.se_CreateLocationFsxOpenZfsCommand = se_CreateLocationFsxOpenZfsCommand;
74
- const se_CreateLocationFsxWindowsCommand = async (input, context) => {
75
- const headers = sharedHeaders("CreateLocationFsxWindows");
76
- let body;
77
- body = JSON.stringify((0, smithy_client_1._json)(input));
78
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
79
- };
80
- exports.se_CreateLocationFsxWindowsCommand = se_CreateLocationFsxWindowsCommand;
81
- const se_CreateLocationHdfsCommand = async (input, context) => {
82
- const headers = sharedHeaders("CreateLocationHdfs");
83
- let body;
84
- body = JSON.stringify(se_CreateLocationHdfsRequest(input, context));
85
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
86
- };
87
- exports.se_CreateLocationHdfsCommand = se_CreateLocationHdfsCommand;
88
- const se_CreateLocationNfsCommand = async (input, context) => {
89
- const headers = sharedHeaders("CreateLocationNfs");
90
- let body;
91
- body = JSON.stringify((0, smithy_client_1._json)(input));
92
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
93
- };
94
- exports.se_CreateLocationNfsCommand = se_CreateLocationNfsCommand;
95
- const se_CreateLocationObjectStorageCommand = async (input, context) => {
96
- const headers = sharedHeaders("CreateLocationObjectStorage");
97
- let body;
98
- body = JSON.stringify(se_CreateLocationObjectStorageRequest(input, context));
99
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
100
- };
101
- exports.se_CreateLocationObjectStorageCommand = se_CreateLocationObjectStorageCommand;
102
- const se_CreateLocationS3Command = async (input, context) => {
103
- const headers = sharedHeaders("CreateLocationS3");
104
- let body;
105
- body = JSON.stringify((0, smithy_client_1._json)(input));
106
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
- };
108
- exports.se_CreateLocationS3Command = se_CreateLocationS3Command;
109
- const se_CreateLocationSmbCommand = async (input, context) => {
110
- const headers = sharedHeaders("CreateLocationSmb");
111
- let body;
112
- body = JSON.stringify((0, smithy_client_1._json)(input));
113
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
114
- };
115
- exports.se_CreateLocationSmbCommand = se_CreateLocationSmbCommand;
116
- const se_CreateTaskCommand = async (input, context) => {
117
- const headers = sharedHeaders("CreateTask");
118
- let body;
119
- body = JSON.stringify((0, smithy_client_1._json)(input));
120
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
121
- };
122
- exports.se_CreateTaskCommand = se_CreateTaskCommand;
123
- const se_DeleteAgentCommand = async (input, context) => {
124
- const headers = sharedHeaders("DeleteAgent");
125
- let body;
126
- body = JSON.stringify((0, smithy_client_1._json)(input));
127
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
128
- };
129
- exports.se_DeleteAgentCommand = se_DeleteAgentCommand;
130
- const se_DeleteLocationCommand = async (input, context) => {
131
- const headers = sharedHeaders("DeleteLocation");
132
- let body;
133
- body = JSON.stringify((0, smithy_client_1._json)(input));
134
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
135
- };
136
- exports.se_DeleteLocationCommand = se_DeleteLocationCommand;
137
- const se_DeleteTaskCommand = async (input, context) => {
138
- const headers = sharedHeaders("DeleteTask");
139
- let body;
140
- body = JSON.stringify((0, smithy_client_1._json)(input));
141
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
142
- };
143
- exports.se_DeleteTaskCommand = se_DeleteTaskCommand;
144
- const se_DescribeAgentCommand = async (input, context) => {
145
- const headers = sharedHeaders("DescribeAgent");
146
- let body;
147
- body = JSON.stringify((0, smithy_client_1._json)(input));
148
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
149
- };
150
- exports.se_DescribeAgentCommand = se_DescribeAgentCommand;
151
- const se_DescribeDiscoveryJobCommand = async (input, context) => {
152
- const headers = sharedHeaders("DescribeDiscoveryJob");
153
- let body;
154
- body = JSON.stringify((0, smithy_client_1._json)(input));
155
- let { hostname: resolvedHostname } = await context.endpoint();
156
- if (context.disableHostPrefix !== true) {
157
- resolvedHostname = "discovery-" + resolvedHostname;
158
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
159
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
160
- }
161
- }
162
- return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
163
- };
164
- exports.se_DescribeDiscoveryJobCommand = se_DescribeDiscoveryJobCommand;
165
- const se_DescribeLocationAzureBlobCommand = async (input, context) => {
166
- const headers = sharedHeaders("DescribeLocationAzureBlob");
167
- let body;
168
- body = JSON.stringify((0, smithy_client_1._json)(input));
169
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
170
- };
171
- exports.se_DescribeLocationAzureBlobCommand = se_DescribeLocationAzureBlobCommand;
172
- const se_DescribeLocationEfsCommand = async (input, context) => {
173
- const headers = sharedHeaders("DescribeLocationEfs");
174
- let body;
175
- body = JSON.stringify((0, smithy_client_1._json)(input));
176
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
177
- };
178
- exports.se_DescribeLocationEfsCommand = se_DescribeLocationEfsCommand;
179
- const se_DescribeLocationFsxLustreCommand = async (input, context) => {
180
- const headers = sharedHeaders("DescribeLocationFsxLustre");
181
- let body;
182
- body = JSON.stringify((0, smithy_client_1._json)(input));
183
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
184
- };
185
- exports.se_DescribeLocationFsxLustreCommand = se_DescribeLocationFsxLustreCommand;
186
- const se_DescribeLocationFsxOntapCommand = async (input, context) => {
187
- const headers = sharedHeaders("DescribeLocationFsxOntap");
188
- let body;
189
- body = JSON.stringify((0, smithy_client_1._json)(input));
190
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
191
- };
192
- exports.se_DescribeLocationFsxOntapCommand = se_DescribeLocationFsxOntapCommand;
193
- const se_DescribeLocationFsxOpenZfsCommand = async (input, context) => {
194
- const headers = sharedHeaders("DescribeLocationFsxOpenZfs");
195
- let body;
196
- body = JSON.stringify((0, smithy_client_1._json)(input));
197
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
198
- };
199
- exports.se_DescribeLocationFsxOpenZfsCommand = se_DescribeLocationFsxOpenZfsCommand;
200
- const se_DescribeLocationFsxWindowsCommand = async (input, context) => {
201
- const headers = sharedHeaders("DescribeLocationFsxWindows");
202
- let body;
203
- body = JSON.stringify((0, smithy_client_1._json)(input));
204
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
205
- };
206
- exports.se_DescribeLocationFsxWindowsCommand = se_DescribeLocationFsxWindowsCommand;
207
- const se_DescribeLocationHdfsCommand = async (input, context) => {
208
- const headers = sharedHeaders("DescribeLocationHdfs");
209
- let body;
210
- body = JSON.stringify((0, smithy_client_1._json)(input));
211
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
212
- };
213
- exports.se_DescribeLocationHdfsCommand = se_DescribeLocationHdfsCommand;
214
- const se_DescribeLocationNfsCommand = async (input, context) => {
215
- const headers = sharedHeaders("DescribeLocationNfs");
216
- let body;
217
- body = JSON.stringify((0, smithy_client_1._json)(input));
218
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
219
- };
220
- exports.se_DescribeLocationNfsCommand = se_DescribeLocationNfsCommand;
221
- const se_DescribeLocationObjectStorageCommand = async (input, context) => {
222
- const headers = sharedHeaders("DescribeLocationObjectStorage");
223
- let body;
224
- body = JSON.stringify((0, smithy_client_1._json)(input));
225
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
226
- };
227
- exports.se_DescribeLocationObjectStorageCommand = se_DescribeLocationObjectStorageCommand;
228
- const se_DescribeLocationS3Command = async (input, context) => {
229
- const headers = sharedHeaders("DescribeLocationS3");
230
- let body;
231
- body = JSON.stringify((0, smithy_client_1._json)(input));
232
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
233
- };
234
- exports.se_DescribeLocationS3Command = se_DescribeLocationS3Command;
235
- const se_DescribeLocationSmbCommand = async (input, context) => {
236
- const headers = sharedHeaders("DescribeLocationSmb");
237
- let body;
238
- body = JSON.stringify((0, smithy_client_1._json)(input));
239
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
240
- };
241
- exports.se_DescribeLocationSmbCommand = se_DescribeLocationSmbCommand;
242
- const se_DescribeStorageSystemCommand = async (input, context) => {
243
- const headers = sharedHeaders("DescribeStorageSystem");
244
- let body;
245
- body = JSON.stringify((0, smithy_client_1._json)(input));
246
- let { hostname: resolvedHostname } = await context.endpoint();
247
- if (context.disableHostPrefix !== true) {
248
- resolvedHostname = "discovery-" + resolvedHostname;
249
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
250
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
251
- }
252
- }
253
- return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
254
- };
255
- exports.se_DescribeStorageSystemCommand = se_DescribeStorageSystemCommand;
256
- const se_DescribeStorageSystemResourceMetricsCommand = async (input, context) => {
257
- const headers = sharedHeaders("DescribeStorageSystemResourceMetrics");
258
- let body;
259
- body = JSON.stringify(se_DescribeStorageSystemResourceMetricsRequest(input, context));
260
- let { hostname: resolvedHostname } = await context.endpoint();
261
- if (context.disableHostPrefix !== true) {
262
- resolvedHostname = "discovery-" + resolvedHostname;
263
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
264
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
265
- }
266
- }
267
- return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
268
- };
269
- exports.se_DescribeStorageSystemResourceMetricsCommand = se_DescribeStorageSystemResourceMetricsCommand;
270
- const se_DescribeStorageSystemResourcesCommand = async (input, context) => {
271
- const headers = sharedHeaders("DescribeStorageSystemResources");
272
- let body;
273
- body = JSON.stringify((0, smithy_client_1._json)(input));
274
- let { hostname: resolvedHostname } = await context.endpoint();
275
- if (context.disableHostPrefix !== true) {
276
- resolvedHostname = "discovery-" + resolvedHostname;
277
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
278
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
279
- }
280
- }
281
- return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
282
- };
283
- exports.se_DescribeStorageSystemResourcesCommand = se_DescribeStorageSystemResourcesCommand;
284
- const se_DescribeTaskCommand = async (input, context) => {
285
- const headers = sharedHeaders("DescribeTask");
286
- let body;
287
- body = JSON.stringify((0, smithy_client_1._json)(input));
288
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
289
- };
290
- exports.se_DescribeTaskCommand = se_DescribeTaskCommand;
291
- const se_DescribeTaskExecutionCommand = async (input, context) => {
292
- const headers = sharedHeaders("DescribeTaskExecution");
293
- let body;
294
- body = JSON.stringify((0, smithy_client_1._json)(input));
295
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
296
- };
297
- exports.se_DescribeTaskExecutionCommand = se_DescribeTaskExecutionCommand;
298
- const se_GenerateRecommendationsCommand = async (input, context) => {
299
- const headers = sharedHeaders("GenerateRecommendations");
300
- let body;
301
- body = JSON.stringify((0, smithy_client_1._json)(input));
302
- let { hostname: resolvedHostname } = await context.endpoint();
303
- if (context.disableHostPrefix !== true) {
304
- resolvedHostname = "discovery-" + resolvedHostname;
305
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
306
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
307
- }
308
- }
309
- return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
310
- };
311
- exports.se_GenerateRecommendationsCommand = se_GenerateRecommendationsCommand;
312
- const se_ListAgentsCommand = async (input, context) => {
313
- const headers = sharedHeaders("ListAgents");
314
- let body;
315
- body = JSON.stringify((0, smithy_client_1._json)(input));
316
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
317
- };
318
- exports.se_ListAgentsCommand = se_ListAgentsCommand;
319
- const se_ListDiscoveryJobsCommand = async (input, context) => {
320
- const headers = sharedHeaders("ListDiscoveryJobs");
321
- let body;
322
- body = JSON.stringify((0, smithy_client_1._json)(input));
323
- let { hostname: resolvedHostname } = await context.endpoint();
324
- if (context.disableHostPrefix !== true) {
325
- resolvedHostname = "discovery-" + resolvedHostname;
326
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
327
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
328
- }
329
- }
330
- return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
331
- };
332
- exports.se_ListDiscoveryJobsCommand = se_ListDiscoveryJobsCommand;
333
- const se_ListLocationsCommand = async (input, context) => {
334
- const headers = sharedHeaders("ListLocations");
335
- let body;
336
- body = JSON.stringify((0, smithy_client_1._json)(input));
337
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
338
- };
339
- exports.se_ListLocationsCommand = se_ListLocationsCommand;
340
- const se_ListStorageSystemsCommand = async (input, context) => {
341
- const headers = sharedHeaders("ListStorageSystems");
342
- let body;
343
- body = JSON.stringify((0, smithy_client_1._json)(input));
344
- let { hostname: resolvedHostname } = await context.endpoint();
345
- if (context.disableHostPrefix !== true) {
346
- resolvedHostname = "discovery-" + resolvedHostname;
347
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
348
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
349
- }
350
- }
351
- return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
352
- };
353
- exports.se_ListStorageSystemsCommand = se_ListStorageSystemsCommand;
354
- const se_ListTagsForResourceCommand = async (input, context) => {
355
- const headers = sharedHeaders("ListTagsForResource");
356
- let body;
357
- body = JSON.stringify((0, smithy_client_1._json)(input));
358
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
359
- };
360
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
361
- const se_ListTaskExecutionsCommand = async (input, context) => {
362
- const headers = sharedHeaders("ListTaskExecutions");
363
- let body;
364
- body = JSON.stringify((0, smithy_client_1._json)(input));
365
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
366
- };
367
- exports.se_ListTaskExecutionsCommand = se_ListTaskExecutionsCommand;
368
- const se_ListTasksCommand = async (input, context) => {
369
- const headers = sharedHeaders("ListTasks");
370
- let body;
371
- body = JSON.stringify((0, smithy_client_1._json)(input));
372
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
373
- };
374
- exports.se_ListTasksCommand = se_ListTasksCommand;
375
- const se_RemoveStorageSystemCommand = async (input, context) => {
376
- const headers = sharedHeaders("RemoveStorageSystem");
377
- let body;
378
- body = JSON.stringify((0, smithy_client_1._json)(input));
379
- let { hostname: resolvedHostname } = await context.endpoint();
380
- if (context.disableHostPrefix !== true) {
381
- resolvedHostname = "discovery-" + resolvedHostname;
382
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
383
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
384
- }
385
- }
386
- return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
387
- };
388
- exports.se_RemoveStorageSystemCommand = se_RemoveStorageSystemCommand;
389
- const se_StartDiscoveryJobCommand = async (input, context) => {
390
- const headers = sharedHeaders("StartDiscoveryJob");
391
- let body;
392
- body = JSON.stringify(se_StartDiscoveryJobRequest(input, context));
393
- let { hostname: resolvedHostname } = await context.endpoint();
394
- if (context.disableHostPrefix !== true) {
395
- resolvedHostname = "discovery-" + resolvedHostname;
396
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
397
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
398
- }
399
- }
400
- return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
401
- };
402
- exports.se_StartDiscoveryJobCommand = se_StartDiscoveryJobCommand;
403
- const se_StartTaskExecutionCommand = async (input, context) => {
404
- const headers = sharedHeaders("StartTaskExecution");
405
- let body;
406
- body = JSON.stringify((0, smithy_client_1._json)(input));
407
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
408
- };
409
- exports.se_StartTaskExecutionCommand = se_StartTaskExecutionCommand;
410
- const se_StopDiscoveryJobCommand = async (input, context) => {
411
- const headers = sharedHeaders("StopDiscoveryJob");
412
- let body;
413
- body = JSON.stringify((0, smithy_client_1._json)(input));
414
- let { hostname: resolvedHostname } = await context.endpoint();
415
- if (context.disableHostPrefix !== true) {
416
- resolvedHostname = "discovery-" + resolvedHostname;
417
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
418
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
419
- }
420
- }
421
- return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
422
- };
423
- exports.se_StopDiscoveryJobCommand = se_StopDiscoveryJobCommand;
424
- const se_TagResourceCommand = async (input, context) => {
425
- const headers = sharedHeaders("TagResource");
426
- let body;
427
- body = JSON.stringify((0, smithy_client_1._json)(input));
428
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
429
- };
430
- exports.se_TagResourceCommand = se_TagResourceCommand;
431
- const se_UntagResourceCommand = async (input, context) => {
432
- const headers = sharedHeaders("UntagResource");
433
- let body;
434
- body = JSON.stringify((0, smithy_client_1._json)(input));
435
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
436
- };
437
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
438
- const se_UpdateAgentCommand = async (input, context) => {
439
- const headers = sharedHeaders("UpdateAgent");
440
- let body;
441
- body = JSON.stringify((0, smithy_client_1._json)(input));
442
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
443
- };
444
- exports.se_UpdateAgentCommand = se_UpdateAgentCommand;
445
- const se_UpdateDiscoveryJobCommand = async (input, context) => {
446
- const headers = sharedHeaders("UpdateDiscoveryJob");
447
- let body;
448
- body = JSON.stringify((0, smithy_client_1._json)(input));
449
- let { hostname: resolvedHostname } = await context.endpoint();
450
- if (context.disableHostPrefix !== true) {
451
- resolvedHostname = "discovery-" + resolvedHostname;
452
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
453
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
454
- }
455
- }
456
- return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
457
- };
458
- exports.se_UpdateDiscoveryJobCommand = se_UpdateDiscoveryJobCommand;
459
- const se_UpdateLocationAzureBlobCommand = async (input, context) => {
460
- const headers = sharedHeaders("UpdateLocationAzureBlob");
461
- let body;
462
- body = JSON.stringify((0, smithy_client_1._json)(input));
463
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
464
- };
465
- exports.se_UpdateLocationAzureBlobCommand = se_UpdateLocationAzureBlobCommand;
466
- const se_UpdateLocationHdfsCommand = async (input, context) => {
467
- const headers = sharedHeaders("UpdateLocationHdfs");
468
- let body;
469
- body = JSON.stringify(se_UpdateLocationHdfsRequest(input, context));
470
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
471
- };
472
- exports.se_UpdateLocationHdfsCommand = se_UpdateLocationHdfsCommand;
473
- const se_UpdateLocationNfsCommand = async (input, context) => {
474
- const headers = sharedHeaders("UpdateLocationNfs");
475
- let body;
476
- body = JSON.stringify((0, smithy_client_1._json)(input));
477
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
478
- };
479
- exports.se_UpdateLocationNfsCommand = se_UpdateLocationNfsCommand;
480
- const se_UpdateLocationObjectStorageCommand = async (input, context) => {
481
- const headers = sharedHeaders("UpdateLocationObjectStorage");
482
- let body;
483
- body = JSON.stringify(se_UpdateLocationObjectStorageRequest(input, context));
484
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
485
- };
486
- exports.se_UpdateLocationObjectStorageCommand = se_UpdateLocationObjectStorageCommand;
487
- const se_UpdateLocationSmbCommand = async (input, context) => {
488
- const headers = sharedHeaders("UpdateLocationSmb");
489
- let body;
490
- body = JSON.stringify((0, smithy_client_1._json)(input));
491
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
492
- };
493
- exports.se_UpdateLocationSmbCommand = se_UpdateLocationSmbCommand;
494
- const se_UpdateStorageSystemCommand = async (input, context) => {
495
- const headers = sharedHeaders("UpdateStorageSystem");
496
- let body;
497
- body = JSON.stringify((0, smithy_client_1._json)(input));
498
- let { hostname: resolvedHostname } = await context.endpoint();
499
- if (context.disableHostPrefix !== true) {
500
- resolvedHostname = "discovery-" + resolvedHostname;
501
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
502
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
503
- }
504
- }
505
- return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
506
- };
507
- exports.se_UpdateStorageSystemCommand = se_UpdateStorageSystemCommand;
508
- const se_UpdateTaskCommand = async (input, context) => {
509
- const headers = sharedHeaders("UpdateTask");
510
- let body;
511
- body = JSON.stringify((0, smithy_client_1._json)(input));
512
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
513
- };
514
- exports.se_UpdateTaskCommand = se_UpdateTaskCommand;
515
- const se_UpdateTaskExecutionCommand = async (input, context) => {
516
- const headers = sharedHeaders("UpdateTaskExecution");
517
- let body;
518
- body = JSON.stringify((0, smithy_client_1._json)(input));
519
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
520
- };
521
- exports.se_UpdateTaskExecutionCommand = se_UpdateTaskExecutionCommand;
522
- const de_AddStorageSystemCommand = async (output, context) => {
523
- if (output.statusCode >= 300) {
524
- return de_AddStorageSystemCommandError(output, context);
525
- }
526
- const data = await parseBody(output.body, context);
527
- let contents = {};
528
- contents = (0, smithy_client_1._json)(data);
529
- const response = {
530
- $metadata: deserializeMetadata(output),
531
- ...contents,
532
- };
533
- return response;
534
- };
535
- exports.de_AddStorageSystemCommand = de_AddStorageSystemCommand;
536
- const de_AddStorageSystemCommandError = async (output, context) => {
537
- const parsedOutput = {
538
- ...output,
539
- body: await parseErrorBody(output.body, context),
540
- };
541
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
542
- switch (errorCode) {
543
- case "InternalException":
544
- case "com.amazonaws.datasync#InternalException":
545
- throw await de_InternalExceptionRes(parsedOutput, context);
546
- case "InvalidRequestException":
547
- case "com.amazonaws.datasync#InvalidRequestException":
548
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
549
- default:
550
- const parsedBody = parsedOutput.body;
551
- return throwDefaultError({
552
- output,
553
- parsedBody,
554
- errorCode,
555
- });
556
- }
557
- };
558
- const de_CancelTaskExecutionCommand = async (output, context) => {
559
- if (output.statusCode >= 300) {
560
- return de_CancelTaskExecutionCommandError(output, context);
561
- }
562
- const data = await parseBody(output.body, context);
563
- let contents = {};
564
- contents = (0, smithy_client_1._json)(data);
565
- const response = {
566
- $metadata: deserializeMetadata(output),
567
- ...contents,
568
- };
569
- return response;
570
- };
571
- exports.de_CancelTaskExecutionCommand = de_CancelTaskExecutionCommand;
572
- const de_CancelTaskExecutionCommandError = async (output, context) => {
573
- const parsedOutput = {
574
- ...output,
575
- body: await parseErrorBody(output.body, context),
576
- };
577
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
578
- switch (errorCode) {
579
- case "InternalException":
580
- case "com.amazonaws.datasync#InternalException":
581
- throw await de_InternalExceptionRes(parsedOutput, context);
582
- case "InvalidRequestException":
583
- case "com.amazonaws.datasync#InvalidRequestException":
584
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
585
- default:
586
- const parsedBody = parsedOutput.body;
587
- return throwDefaultError({
588
- output,
589
- parsedBody,
590
- errorCode,
591
- });
592
- }
593
- };
594
- const de_CreateAgentCommand = async (output, context) => {
595
- if (output.statusCode >= 300) {
596
- return de_CreateAgentCommandError(output, context);
597
- }
598
- const data = await parseBody(output.body, context);
599
- let contents = {};
600
- contents = (0, smithy_client_1._json)(data);
601
- const response = {
602
- $metadata: deserializeMetadata(output),
603
- ...contents,
604
- };
605
- return response;
606
- };
607
- exports.de_CreateAgentCommand = de_CreateAgentCommand;
608
- const de_CreateAgentCommandError = async (output, context) => {
609
- const parsedOutput = {
610
- ...output,
611
- body: await parseErrorBody(output.body, context),
612
- };
613
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
614
- switch (errorCode) {
615
- case "InternalException":
616
- case "com.amazonaws.datasync#InternalException":
617
- throw await de_InternalExceptionRes(parsedOutput, context);
618
- case "InvalidRequestException":
619
- case "com.amazonaws.datasync#InvalidRequestException":
620
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
621
- default:
622
- const parsedBody = parsedOutput.body;
623
- return throwDefaultError({
624
- output,
625
- parsedBody,
626
- errorCode,
627
- });
628
- }
629
- };
630
- const de_CreateLocationAzureBlobCommand = async (output, context) => {
631
- if (output.statusCode >= 300) {
632
- return de_CreateLocationAzureBlobCommandError(output, context);
633
- }
634
- const data = await parseBody(output.body, context);
635
- let contents = {};
636
- contents = (0, smithy_client_1._json)(data);
637
- const response = {
638
- $metadata: deserializeMetadata(output),
639
- ...contents,
640
- };
641
- return response;
642
- };
643
- exports.de_CreateLocationAzureBlobCommand = de_CreateLocationAzureBlobCommand;
644
- const de_CreateLocationAzureBlobCommandError = async (output, context) => {
645
- const parsedOutput = {
646
- ...output,
647
- body: await parseErrorBody(output.body, context),
648
- };
649
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
650
- switch (errorCode) {
651
- case "InternalException":
652
- case "com.amazonaws.datasync#InternalException":
653
- throw await de_InternalExceptionRes(parsedOutput, context);
654
- case "InvalidRequestException":
655
- case "com.amazonaws.datasync#InvalidRequestException":
656
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
657
- default:
658
- const parsedBody = parsedOutput.body;
659
- return throwDefaultError({
660
- output,
661
- parsedBody,
662
- errorCode,
663
- });
664
- }
665
- };
666
- const de_CreateLocationEfsCommand = async (output, context) => {
667
- if (output.statusCode >= 300) {
668
- return de_CreateLocationEfsCommandError(output, context);
669
- }
670
- const data = await parseBody(output.body, context);
671
- let contents = {};
672
- contents = (0, smithy_client_1._json)(data);
673
- const response = {
674
- $metadata: deserializeMetadata(output),
675
- ...contents,
676
- };
677
- return response;
678
- };
679
- exports.de_CreateLocationEfsCommand = de_CreateLocationEfsCommand;
680
- const de_CreateLocationEfsCommandError = async (output, context) => {
681
- const parsedOutput = {
682
- ...output,
683
- body: await parseErrorBody(output.body, context),
684
- };
685
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
686
- switch (errorCode) {
687
- case "InternalException":
688
- case "com.amazonaws.datasync#InternalException":
689
- throw await de_InternalExceptionRes(parsedOutput, context);
690
- case "InvalidRequestException":
691
- case "com.amazonaws.datasync#InvalidRequestException":
692
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
693
- default:
694
- const parsedBody = parsedOutput.body;
695
- return throwDefaultError({
696
- output,
697
- parsedBody,
698
- errorCode,
699
- });
700
- }
701
- };
702
- const de_CreateLocationFsxLustreCommand = async (output, context) => {
703
- if (output.statusCode >= 300) {
704
- return de_CreateLocationFsxLustreCommandError(output, context);
705
- }
706
- const data = await parseBody(output.body, context);
707
- let contents = {};
708
- contents = (0, smithy_client_1._json)(data);
709
- const response = {
710
- $metadata: deserializeMetadata(output),
711
- ...contents,
712
- };
713
- return response;
714
- };
715
- exports.de_CreateLocationFsxLustreCommand = de_CreateLocationFsxLustreCommand;
716
- const de_CreateLocationFsxLustreCommandError = async (output, context) => {
717
- const parsedOutput = {
718
- ...output,
719
- body: await parseErrorBody(output.body, context),
720
- };
721
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
722
- switch (errorCode) {
723
- case "InternalException":
724
- case "com.amazonaws.datasync#InternalException":
725
- throw await de_InternalExceptionRes(parsedOutput, context);
726
- case "InvalidRequestException":
727
- case "com.amazonaws.datasync#InvalidRequestException":
728
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
729
- default:
730
- const parsedBody = parsedOutput.body;
731
- return throwDefaultError({
732
- output,
733
- parsedBody,
734
- errorCode,
735
- });
736
- }
737
- };
738
- const de_CreateLocationFsxOntapCommand = async (output, context) => {
739
- if (output.statusCode >= 300) {
740
- return de_CreateLocationFsxOntapCommandError(output, context);
741
- }
742
- const data = await parseBody(output.body, context);
743
- let contents = {};
744
- contents = (0, smithy_client_1._json)(data);
745
- const response = {
746
- $metadata: deserializeMetadata(output),
747
- ...contents,
748
- };
749
- return response;
750
- };
751
- exports.de_CreateLocationFsxOntapCommand = de_CreateLocationFsxOntapCommand;
752
- const de_CreateLocationFsxOntapCommandError = 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 "InternalException":
760
- case "com.amazonaws.datasync#InternalException":
761
- throw await de_InternalExceptionRes(parsedOutput, context);
762
- case "InvalidRequestException":
763
- case "com.amazonaws.datasync#InvalidRequestException":
764
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
765
- default:
766
- const parsedBody = parsedOutput.body;
767
- return throwDefaultError({
768
- output,
769
- parsedBody,
770
- errorCode,
771
- });
772
- }
773
- };
774
- const de_CreateLocationFsxOpenZfsCommand = async (output, context) => {
775
- if (output.statusCode >= 300) {
776
- return de_CreateLocationFsxOpenZfsCommandError(output, context);
777
- }
778
- const data = await parseBody(output.body, context);
779
- let contents = {};
780
- contents = (0, smithy_client_1._json)(data);
781
- const response = {
782
- $metadata: deserializeMetadata(output),
783
- ...contents,
784
- };
785
- return response;
786
- };
787
- exports.de_CreateLocationFsxOpenZfsCommand = de_CreateLocationFsxOpenZfsCommand;
788
- const de_CreateLocationFsxOpenZfsCommandError = async (output, context) => {
789
- const parsedOutput = {
790
- ...output,
791
- body: await parseErrorBody(output.body, context),
792
- };
793
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
794
- switch (errorCode) {
795
- case "InternalException":
796
- case "com.amazonaws.datasync#InternalException":
797
- throw await de_InternalExceptionRes(parsedOutput, context);
798
- case "InvalidRequestException":
799
- case "com.amazonaws.datasync#InvalidRequestException":
800
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
801
- default:
802
- const parsedBody = parsedOutput.body;
803
- return throwDefaultError({
804
- output,
805
- parsedBody,
806
- errorCode,
807
- });
808
- }
809
- };
810
- const de_CreateLocationFsxWindowsCommand = async (output, context) => {
811
- if (output.statusCode >= 300) {
812
- return de_CreateLocationFsxWindowsCommandError(output, context);
813
- }
814
- const data = await parseBody(output.body, context);
815
- let contents = {};
816
- contents = (0, smithy_client_1._json)(data);
817
- const response = {
818
- $metadata: deserializeMetadata(output),
819
- ...contents,
820
- };
821
- return response;
822
- };
823
- exports.de_CreateLocationFsxWindowsCommand = de_CreateLocationFsxWindowsCommand;
824
- const de_CreateLocationFsxWindowsCommandError = async (output, context) => {
825
- const parsedOutput = {
826
- ...output,
827
- body: await parseErrorBody(output.body, context),
828
- };
829
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
830
- switch (errorCode) {
831
- case "InternalException":
832
- case "com.amazonaws.datasync#InternalException":
833
- throw await de_InternalExceptionRes(parsedOutput, context);
834
- case "InvalidRequestException":
835
- case "com.amazonaws.datasync#InvalidRequestException":
836
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
837
- default:
838
- const parsedBody = parsedOutput.body;
839
- return throwDefaultError({
840
- output,
841
- parsedBody,
842
- errorCode,
843
- });
844
- }
845
- };
846
- const de_CreateLocationHdfsCommand = async (output, context) => {
847
- if (output.statusCode >= 300) {
848
- return de_CreateLocationHdfsCommandError(output, context);
849
- }
850
- const data = await parseBody(output.body, context);
851
- let contents = {};
852
- contents = (0, smithy_client_1._json)(data);
853
- const response = {
854
- $metadata: deserializeMetadata(output),
855
- ...contents,
856
- };
857
- return response;
858
- };
859
- exports.de_CreateLocationHdfsCommand = de_CreateLocationHdfsCommand;
860
- const de_CreateLocationHdfsCommandError = async (output, context) => {
861
- const parsedOutput = {
862
- ...output,
863
- body: await parseErrorBody(output.body, context),
864
- };
865
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
866
- switch (errorCode) {
867
- case "InternalException":
868
- case "com.amazonaws.datasync#InternalException":
869
- throw await de_InternalExceptionRes(parsedOutput, context);
870
- case "InvalidRequestException":
871
- case "com.amazonaws.datasync#InvalidRequestException":
872
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
873
- default:
874
- const parsedBody = parsedOutput.body;
875
- return throwDefaultError({
876
- output,
877
- parsedBody,
878
- errorCode,
879
- });
880
- }
881
- };
882
- const de_CreateLocationNfsCommand = async (output, context) => {
883
- if (output.statusCode >= 300) {
884
- return de_CreateLocationNfsCommandError(output, context);
885
- }
886
- const data = await parseBody(output.body, context);
887
- let contents = {};
888
- contents = (0, smithy_client_1._json)(data);
889
- const response = {
890
- $metadata: deserializeMetadata(output),
891
- ...contents,
892
- };
893
- return response;
894
- };
895
- exports.de_CreateLocationNfsCommand = de_CreateLocationNfsCommand;
896
- const de_CreateLocationNfsCommandError = async (output, context) => {
897
- const parsedOutput = {
898
- ...output,
899
- body: await parseErrorBody(output.body, context),
900
- };
901
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
902
- switch (errorCode) {
903
- case "InternalException":
904
- case "com.amazonaws.datasync#InternalException":
905
- throw await de_InternalExceptionRes(parsedOutput, context);
906
- case "InvalidRequestException":
907
- case "com.amazonaws.datasync#InvalidRequestException":
908
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
909
- default:
910
- const parsedBody = parsedOutput.body;
911
- return throwDefaultError({
912
- output,
913
- parsedBody,
914
- errorCode,
915
- });
916
- }
917
- };
918
- const de_CreateLocationObjectStorageCommand = async (output, context) => {
919
- if (output.statusCode >= 300) {
920
- return de_CreateLocationObjectStorageCommandError(output, context);
921
- }
922
- const data = await parseBody(output.body, context);
923
- let contents = {};
924
- contents = (0, smithy_client_1._json)(data);
925
- const response = {
926
- $metadata: deserializeMetadata(output),
927
- ...contents,
928
- };
929
- return response;
930
- };
931
- exports.de_CreateLocationObjectStorageCommand = de_CreateLocationObjectStorageCommand;
932
- const de_CreateLocationObjectStorageCommandError = async (output, context) => {
933
- const parsedOutput = {
934
- ...output,
935
- body: await parseErrorBody(output.body, context),
936
- };
937
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
938
- switch (errorCode) {
939
- case "InternalException":
940
- case "com.amazonaws.datasync#InternalException":
941
- throw await de_InternalExceptionRes(parsedOutput, context);
942
- case "InvalidRequestException":
943
- case "com.amazonaws.datasync#InvalidRequestException":
944
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
945
- default:
946
- const parsedBody = parsedOutput.body;
947
- return throwDefaultError({
948
- output,
949
- parsedBody,
950
- errorCode,
951
- });
952
- }
953
- };
954
- const de_CreateLocationS3Command = async (output, context) => {
955
- if (output.statusCode >= 300) {
956
- return de_CreateLocationS3CommandError(output, context);
957
- }
958
- const data = await parseBody(output.body, context);
959
- let contents = {};
960
- contents = (0, smithy_client_1._json)(data);
961
- const response = {
962
- $metadata: deserializeMetadata(output),
963
- ...contents,
964
- };
965
- return response;
966
- };
967
- exports.de_CreateLocationS3Command = de_CreateLocationS3Command;
968
- const de_CreateLocationS3CommandError = async (output, context) => {
969
- const parsedOutput = {
970
- ...output,
971
- body: await parseErrorBody(output.body, context),
972
- };
973
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
974
- switch (errorCode) {
975
- case "InternalException":
976
- case "com.amazonaws.datasync#InternalException":
977
- throw await de_InternalExceptionRes(parsedOutput, context);
978
- case "InvalidRequestException":
979
- case "com.amazonaws.datasync#InvalidRequestException":
980
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
981
- default:
982
- const parsedBody = parsedOutput.body;
983
- return throwDefaultError({
984
- output,
985
- parsedBody,
986
- errorCode,
987
- });
988
- }
989
- };
990
- const de_CreateLocationSmbCommand = async (output, context) => {
991
- if (output.statusCode >= 300) {
992
- return de_CreateLocationSmbCommandError(output, context);
993
- }
994
- const data = await parseBody(output.body, context);
995
- let contents = {};
996
- contents = (0, smithy_client_1._json)(data);
997
- const response = {
998
- $metadata: deserializeMetadata(output),
999
- ...contents,
1000
- };
1001
- return response;
1002
- };
1003
- exports.de_CreateLocationSmbCommand = de_CreateLocationSmbCommand;
1004
- const de_CreateLocationSmbCommandError = async (output, context) => {
1005
- const parsedOutput = {
1006
- ...output,
1007
- body: await parseErrorBody(output.body, context),
1008
- };
1009
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1010
- switch (errorCode) {
1011
- case "InternalException":
1012
- case "com.amazonaws.datasync#InternalException":
1013
- throw await de_InternalExceptionRes(parsedOutput, context);
1014
- case "InvalidRequestException":
1015
- case "com.amazonaws.datasync#InvalidRequestException":
1016
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1017
- default:
1018
- const parsedBody = parsedOutput.body;
1019
- return throwDefaultError({
1020
- output,
1021
- parsedBody,
1022
- errorCode,
1023
- });
1024
- }
1025
- };
1026
- const de_CreateTaskCommand = async (output, context) => {
1027
- if (output.statusCode >= 300) {
1028
- return de_CreateTaskCommandError(output, context);
1029
- }
1030
- const data = await parseBody(output.body, context);
1031
- let contents = {};
1032
- contents = (0, smithy_client_1._json)(data);
1033
- const response = {
1034
- $metadata: deserializeMetadata(output),
1035
- ...contents,
1036
- };
1037
- return response;
1038
- };
1039
- exports.de_CreateTaskCommand = de_CreateTaskCommand;
1040
- const de_CreateTaskCommandError = async (output, context) => {
1041
- const parsedOutput = {
1042
- ...output,
1043
- body: await parseErrorBody(output.body, context),
1044
- };
1045
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1046
- switch (errorCode) {
1047
- case "InternalException":
1048
- case "com.amazonaws.datasync#InternalException":
1049
- throw await de_InternalExceptionRes(parsedOutput, context);
1050
- case "InvalidRequestException":
1051
- case "com.amazonaws.datasync#InvalidRequestException":
1052
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1053
- default:
1054
- const parsedBody = parsedOutput.body;
1055
- return throwDefaultError({
1056
- output,
1057
- parsedBody,
1058
- errorCode,
1059
- });
1060
- }
1061
- };
1062
- const de_DeleteAgentCommand = async (output, context) => {
1063
- if (output.statusCode >= 300) {
1064
- return de_DeleteAgentCommandError(output, context);
1065
- }
1066
- const data = await parseBody(output.body, context);
1067
- let contents = {};
1068
- contents = (0, smithy_client_1._json)(data);
1069
- const response = {
1070
- $metadata: deserializeMetadata(output),
1071
- ...contents,
1072
- };
1073
- return response;
1074
- };
1075
- exports.de_DeleteAgentCommand = de_DeleteAgentCommand;
1076
- const de_DeleteAgentCommandError = async (output, context) => {
1077
- const parsedOutput = {
1078
- ...output,
1079
- body: await parseErrorBody(output.body, context),
1080
- };
1081
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1082
- switch (errorCode) {
1083
- case "InternalException":
1084
- case "com.amazonaws.datasync#InternalException":
1085
- throw await de_InternalExceptionRes(parsedOutput, context);
1086
- case "InvalidRequestException":
1087
- case "com.amazonaws.datasync#InvalidRequestException":
1088
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1089
- default:
1090
- const parsedBody = parsedOutput.body;
1091
- return throwDefaultError({
1092
- output,
1093
- parsedBody,
1094
- errorCode,
1095
- });
1096
- }
1097
- };
1098
- const de_DeleteLocationCommand = async (output, context) => {
1099
- if (output.statusCode >= 300) {
1100
- return de_DeleteLocationCommandError(output, context);
1101
- }
1102
- const data = await parseBody(output.body, context);
1103
- let contents = {};
1104
- contents = (0, smithy_client_1._json)(data);
1105
- const response = {
1106
- $metadata: deserializeMetadata(output),
1107
- ...contents,
1108
- };
1109
- return response;
1110
- };
1111
- exports.de_DeleteLocationCommand = de_DeleteLocationCommand;
1112
- const de_DeleteLocationCommandError = async (output, context) => {
1113
- const parsedOutput = {
1114
- ...output,
1115
- body: await parseErrorBody(output.body, context),
1116
- };
1117
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1118
- switch (errorCode) {
1119
- case "InternalException":
1120
- case "com.amazonaws.datasync#InternalException":
1121
- throw await de_InternalExceptionRes(parsedOutput, context);
1122
- case "InvalidRequestException":
1123
- case "com.amazonaws.datasync#InvalidRequestException":
1124
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1125
- default:
1126
- const parsedBody = parsedOutput.body;
1127
- return throwDefaultError({
1128
- output,
1129
- parsedBody,
1130
- errorCode,
1131
- });
1132
- }
1133
- };
1134
- const de_DeleteTaskCommand = async (output, context) => {
1135
- if (output.statusCode >= 300) {
1136
- return de_DeleteTaskCommandError(output, context);
1137
- }
1138
- const data = await parseBody(output.body, context);
1139
- let contents = {};
1140
- contents = (0, smithy_client_1._json)(data);
1141
- const response = {
1142
- $metadata: deserializeMetadata(output),
1143
- ...contents,
1144
- };
1145
- return response;
1146
- };
1147
- exports.de_DeleteTaskCommand = de_DeleteTaskCommand;
1148
- const de_DeleteTaskCommandError = async (output, context) => {
1149
- const parsedOutput = {
1150
- ...output,
1151
- body: await parseErrorBody(output.body, context),
1152
- };
1153
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1154
- switch (errorCode) {
1155
- case "InternalException":
1156
- case "com.amazonaws.datasync#InternalException":
1157
- throw await de_InternalExceptionRes(parsedOutput, context);
1158
- case "InvalidRequestException":
1159
- case "com.amazonaws.datasync#InvalidRequestException":
1160
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1161
- default:
1162
- const parsedBody = parsedOutput.body;
1163
- return throwDefaultError({
1164
- output,
1165
- parsedBody,
1166
- errorCode,
1167
- });
1168
- }
1169
- };
1170
- const de_DescribeAgentCommand = async (output, context) => {
1171
- if (output.statusCode >= 300) {
1172
- return de_DescribeAgentCommandError(output, context);
1173
- }
1174
- const data = await parseBody(output.body, context);
1175
- let contents = {};
1176
- contents = de_DescribeAgentResponse(data, context);
1177
- const response = {
1178
- $metadata: deserializeMetadata(output),
1179
- ...contents,
1180
- };
1181
- return response;
1182
- };
1183
- exports.de_DescribeAgentCommand = de_DescribeAgentCommand;
1184
- const de_DescribeAgentCommandError = async (output, context) => {
1185
- const parsedOutput = {
1186
- ...output,
1187
- body: await parseErrorBody(output.body, context),
1188
- };
1189
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1190
- switch (errorCode) {
1191
- case "InternalException":
1192
- case "com.amazonaws.datasync#InternalException":
1193
- throw await de_InternalExceptionRes(parsedOutput, context);
1194
- case "InvalidRequestException":
1195
- case "com.amazonaws.datasync#InvalidRequestException":
1196
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1197
- default:
1198
- const parsedBody = parsedOutput.body;
1199
- return throwDefaultError({
1200
- output,
1201
- parsedBody,
1202
- errorCode,
1203
- });
1204
- }
1205
- };
1206
- const de_DescribeDiscoveryJobCommand = async (output, context) => {
1207
- if (output.statusCode >= 300) {
1208
- return de_DescribeDiscoveryJobCommandError(output, context);
1209
- }
1210
- const data = await parseBody(output.body, context);
1211
- let contents = {};
1212
- contents = de_DescribeDiscoveryJobResponse(data, context);
1213
- const response = {
1214
- $metadata: deserializeMetadata(output),
1215
- ...contents,
1216
- };
1217
- return response;
1218
- };
1219
- exports.de_DescribeDiscoveryJobCommand = de_DescribeDiscoveryJobCommand;
1220
- const de_DescribeDiscoveryJobCommandError = async (output, context) => {
1221
- const parsedOutput = {
1222
- ...output,
1223
- body: await parseErrorBody(output.body, context),
1224
- };
1225
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1226
- switch (errorCode) {
1227
- case "InternalException":
1228
- case "com.amazonaws.datasync#InternalException":
1229
- throw await de_InternalExceptionRes(parsedOutput, context);
1230
- case "InvalidRequestException":
1231
- case "com.amazonaws.datasync#InvalidRequestException":
1232
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1233
- default:
1234
- const parsedBody = parsedOutput.body;
1235
- return throwDefaultError({
1236
- output,
1237
- parsedBody,
1238
- errorCode,
1239
- });
1240
- }
1241
- };
1242
- const de_DescribeLocationAzureBlobCommand = async (output, context) => {
1243
- if (output.statusCode >= 300) {
1244
- return de_DescribeLocationAzureBlobCommandError(output, context);
1245
- }
1246
- const data = await parseBody(output.body, context);
1247
- let contents = {};
1248
- contents = de_DescribeLocationAzureBlobResponse(data, context);
1249
- const response = {
1250
- $metadata: deserializeMetadata(output),
1251
- ...contents,
1252
- };
1253
- return response;
1254
- };
1255
- exports.de_DescribeLocationAzureBlobCommand = de_DescribeLocationAzureBlobCommand;
1256
- const de_DescribeLocationAzureBlobCommandError = async (output, context) => {
1257
- const parsedOutput = {
1258
- ...output,
1259
- body: await parseErrorBody(output.body, context),
1260
- };
1261
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1262
- switch (errorCode) {
1263
- case "InternalException":
1264
- case "com.amazonaws.datasync#InternalException":
1265
- throw await de_InternalExceptionRes(parsedOutput, context);
1266
- case "InvalidRequestException":
1267
- case "com.amazonaws.datasync#InvalidRequestException":
1268
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1269
- default:
1270
- const parsedBody = parsedOutput.body;
1271
- return throwDefaultError({
1272
- output,
1273
- parsedBody,
1274
- errorCode,
1275
- });
1276
- }
1277
- };
1278
- const de_DescribeLocationEfsCommand = async (output, context) => {
1279
- if (output.statusCode >= 300) {
1280
- return de_DescribeLocationEfsCommandError(output, context);
1281
- }
1282
- const data = await parseBody(output.body, context);
1283
- let contents = {};
1284
- contents = de_DescribeLocationEfsResponse(data, context);
1285
- const response = {
1286
- $metadata: deserializeMetadata(output),
1287
- ...contents,
1288
- };
1289
- return response;
1290
- };
1291
- exports.de_DescribeLocationEfsCommand = de_DescribeLocationEfsCommand;
1292
- const de_DescribeLocationEfsCommandError = async (output, context) => {
1293
- const parsedOutput = {
1294
- ...output,
1295
- body: await parseErrorBody(output.body, context),
1296
- };
1297
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1298
- switch (errorCode) {
1299
- case "InternalException":
1300
- case "com.amazonaws.datasync#InternalException":
1301
- throw await de_InternalExceptionRes(parsedOutput, context);
1302
- case "InvalidRequestException":
1303
- case "com.amazonaws.datasync#InvalidRequestException":
1304
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1305
- default:
1306
- const parsedBody = parsedOutput.body;
1307
- return throwDefaultError({
1308
- output,
1309
- parsedBody,
1310
- errorCode,
1311
- });
1312
- }
1313
- };
1314
- const de_DescribeLocationFsxLustreCommand = async (output, context) => {
1315
- if (output.statusCode >= 300) {
1316
- return de_DescribeLocationFsxLustreCommandError(output, context);
1317
- }
1318
- const data = await parseBody(output.body, context);
1319
- let contents = {};
1320
- contents = de_DescribeLocationFsxLustreResponse(data, context);
1321
- const response = {
1322
- $metadata: deserializeMetadata(output),
1323
- ...contents,
1324
- };
1325
- return response;
1326
- };
1327
- exports.de_DescribeLocationFsxLustreCommand = de_DescribeLocationFsxLustreCommand;
1328
- const de_DescribeLocationFsxLustreCommandError = async (output, context) => {
1329
- const parsedOutput = {
1330
- ...output,
1331
- body: await parseErrorBody(output.body, context),
1332
- };
1333
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1334
- switch (errorCode) {
1335
- case "InternalException":
1336
- case "com.amazonaws.datasync#InternalException":
1337
- throw await de_InternalExceptionRes(parsedOutput, context);
1338
- case "InvalidRequestException":
1339
- case "com.amazonaws.datasync#InvalidRequestException":
1340
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1341
- default:
1342
- const parsedBody = parsedOutput.body;
1343
- return throwDefaultError({
1344
- output,
1345
- parsedBody,
1346
- errorCode,
1347
- });
1348
- }
1349
- };
1350
- const de_DescribeLocationFsxOntapCommand = async (output, context) => {
1351
- if (output.statusCode >= 300) {
1352
- return de_DescribeLocationFsxOntapCommandError(output, context);
1353
- }
1354
- const data = await parseBody(output.body, context);
1355
- let contents = {};
1356
- contents = de_DescribeLocationFsxOntapResponse(data, context);
1357
- const response = {
1358
- $metadata: deserializeMetadata(output),
1359
- ...contents,
1360
- };
1361
- return response;
1362
- };
1363
- exports.de_DescribeLocationFsxOntapCommand = de_DescribeLocationFsxOntapCommand;
1364
- const de_DescribeLocationFsxOntapCommandError = async (output, context) => {
1365
- const parsedOutput = {
1366
- ...output,
1367
- body: await parseErrorBody(output.body, context),
1368
- };
1369
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1370
- switch (errorCode) {
1371
- case "InternalException":
1372
- case "com.amazonaws.datasync#InternalException":
1373
- throw await de_InternalExceptionRes(parsedOutput, context);
1374
- case "InvalidRequestException":
1375
- case "com.amazonaws.datasync#InvalidRequestException":
1376
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1377
- default:
1378
- const parsedBody = parsedOutput.body;
1379
- return throwDefaultError({
1380
- output,
1381
- parsedBody,
1382
- errorCode,
1383
- });
1384
- }
1385
- };
1386
- const de_DescribeLocationFsxOpenZfsCommand = async (output, context) => {
1387
- if (output.statusCode >= 300) {
1388
- return de_DescribeLocationFsxOpenZfsCommandError(output, context);
1389
- }
1390
- const data = await parseBody(output.body, context);
1391
- let contents = {};
1392
- contents = de_DescribeLocationFsxOpenZfsResponse(data, context);
1393
- const response = {
1394
- $metadata: deserializeMetadata(output),
1395
- ...contents,
1396
- };
1397
- return response;
1398
- };
1399
- exports.de_DescribeLocationFsxOpenZfsCommand = de_DescribeLocationFsxOpenZfsCommand;
1400
- const de_DescribeLocationFsxOpenZfsCommandError = async (output, context) => {
1401
- const parsedOutput = {
1402
- ...output,
1403
- body: await parseErrorBody(output.body, context),
1404
- };
1405
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1406
- switch (errorCode) {
1407
- case "InternalException":
1408
- case "com.amazonaws.datasync#InternalException":
1409
- throw await de_InternalExceptionRes(parsedOutput, context);
1410
- case "InvalidRequestException":
1411
- case "com.amazonaws.datasync#InvalidRequestException":
1412
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1413
- default:
1414
- const parsedBody = parsedOutput.body;
1415
- return throwDefaultError({
1416
- output,
1417
- parsedBody,
1418
- errorCode,
1419
- });
1420
- }
1421
- };
1422
- const de_DescribeLocationFsxWindowsCommand = async (output, context) => {
1423
- if (output.statusCode >= 300) {
1424
- return de_DescribeLocationFsxWindowsCommandError(output, context);
1425
- }
1426
- const data = await parseBody(output.body, context);
1427
- let contents = {};
1428
- contents = de_DescribeLocationFsxWindowsResponse(data, context);
1429
- const response = {
1430
- $metadata: deserializeMetadata(output),
1431
- ...contents,
1432
- };
1433
- return response;
1434
- };
1435
- exports.de_DescribeLocationFsxWindowsCommand = de_DescribeLocationFsxWindowsCommand;
1436
- const de_DescribeLocationFsxWindowsCommandError = async (output, context) => {
1437
- const parsedOutput = {
1438
- ...output,
1439
- body: await parseErrorBody(output.body, context),
1440
- };
1441
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1442
- switch (errorCode) {
1443
- case "InternalException":
1444
- case "com.amazonaws.datasync#InternalException":
1445
- throw await de_InternalExceptionRes(parsedOutput, context);
1446
- case "InvalidRequestException":
1447
- case "com.amazonaws.datasync#InvalidRequestException":
1448
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1449
- default:
1450
- const parsedBody = parsedOutput.body;
1451
- return throwDefaultError({
1452
- output,
1453
- parsedBody,
1454
- errorCode,
1455
- });
1456
- }
1457
- };
1458
- const de_DescribeLocationHdfsCommand = async (output, context) => {
1459
- if (output.statusCode >= 300) {
1460
- return de_DescribeLocationHdfsCommandError(output, context);
1461
- }
1462
- const data = await parseBody(output.body, context);
1463
- let contents = {};
1464
- contents = de_DescribeLocationHdfsResponse(data, context);
1465
- const response = {
1466
- $metadata: deserializeMetadata(output),
1467
- ...contents,
1468
- };
1469
- return response;
1470
- };
1471
- exports.de_DescribeLocationHdfsCommand = de_DescribeLocationHdfsCommand;
1472
- const de_DescribeLocationHdfsCommandError = async (output, context) => {
1473
- const parsedOutput = {
1474
- ...output,
1475
- body: await parseErrorBody(output.body, context),
1476
- };
1477
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1478
- switch (errorCode) {
1479
- case "InternalException":
1480
- case "com.amazonaws.datasync#InternalException":
1481
- throw await de_InternalExceptionRes(parsedOutput, context);
1482
- case "InvalidRequestException":
1483
- case "com.amazonaws.datasync#InvalidRequestException":
1484
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1485
- default:
1486
- const parsedBody = parsedOutput.body;
1487
- return throwDefaultError({
1488
- output,
1489
- parsedBody,
1490
- errorCode,
1491
- });
1492
- }
1493
- };
1494
- const de_DescribeLocationNfsCommand = async (output, context) => {
1495
- if (output.statusCode >= 300) {
1496
- return de_DescribeLocationNfsCommandError(output, context);
1497
- }
1498
- const data = await parseBody(output.body, context);
1499
- let contents = {};
1500
- contents = de_DescribeLocationNfsResponse(data, context);
1501
- const response = {
1502
- $metadata: deserializeMetadata(output),
1503
- ...contents,
1504
- };
1505
- return response;
1506
- };
1507
- exports.de_DescribeLocationNfsCommand = de_DescribeLocationNfsCommand;
1508
- const de_DescribeLocationNfsCommandError = async (output, context) => {
1509
- const parsedOutput = {
1510
- ...output,
1511
- body: await parseErrorBody(output.body, context),
1512
- };
1513
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1514
- switch (errorCode) {
1515
- case "InternalException":
1516
- case "com.amazonaws.datasync#InternalException":
1517
- throw await de_InternalExceptionRes(parsedOutput, context);
1518
- case "InvalidRequestException":
1519
- case "com.amazonaws.datasync#InvalidRequestException":
1520
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1521
- default:
1522
- const parsedBody = parsedOutput.body;
1523
- return throwDefaultError({
1524
- output,
1525
- parsedBody,
1526
- errorCode,
1527
- });
1528
- }
1529
- };
1530
- const de_DescribeLocationObjectStorageCommand = async (output, context) => {
1531
- if (output.statusCode >= 300) {
1532
- return de_DescribeLocationObjectStorageCommandError(output, context);
1533
- }
1534
- const data = await parseBody(output.body, context);
1535
- let contents = {};
1536
- contents = de_DescribeLocationObjectStorageResponse(data, context);
1537
- const response = {
1538
- $metadata: deserializeMetadata(output),
1539
- ...contents,
1540
- };
1541
- return response;
1542
- };
1543
- exports.de_DescribeLocationObjectStorageCommand = de_DescribeLocationObjectStorageCommand;
1544
- const de_DescribeLocationObjectStorageCommandError = async (output, context) => {
1545
- const parsedOutput = {
1546
- ...output,
1547
- body: await parseErrorBody(output.body, context),
1548
- };
1549
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1550
- switch (errorCode) {
1551
- case "InternalException":
1552
- case "com.amazonaws.datasync#InternalException":
1553
- throw await de_InternalExceptionRes(parsedOutput, context);
1554
- case "InvalidRequestException":
1555
- case "com.amazonaws.datasync#InvalidRequestException":
1556
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1557
- default:
1558
- const parsedBody = parsedOutput.body;
1559
- return throwDefaultError({
1560
- output,
1561
- parsedBody,
1562
- errorCode,
1563
- });
1564
- }
1565
- };
1566
- const de_DescribeLocationS3Command = async (output, context) => {
1567
- if (output.statusCode >= 300) {
1568
- return de_DescribeLocationS3CommandError(output, context);
1569
- }
1570
- const data = await parseBody(output.body, context);
1571
- let contents = {};
1572
- contents = de_DescribeLocationS3Response(data, context);
1573
- const response = {
1574
- $metadata: deserializeMetadata(output),
1575
- ...contents,
1576
- };
1577
- return response;
1578
- };
1579
- exports.de_DescribeLocationS3Command = de_DescribeLocationS3Command;
1580
- const de_DescribeLocationS3CommandError = async (output, context) => {
1581
- const parsedOutput = {
1582
- ...output,
1583
- body: await parseErrorBody(output.body, context),
1584
- };
1585
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1586
- switch (errorCode) {
1587
- case "InternalException":
1588
- case "com.amazonaws.datasync#InternalException":
1589
- throw await de_InternalExceptionRes(parsedOutput, context);
1590
- case "InvalidRequestException":
1591
- case "com.amazonaws.datasync#InvalidRequestException":
1592
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1593
- default:
1594
- const parsedBody = parsedOutput.body;
1595
- return throwDefaultError({
1596
- output,
1597
- parsedBody,
1598
- errorCode,
1599
- });
1600
- }
1601
- };
1602
- const de_DescribeLocationSmbCommand = async (output, context) => {
1603
- if (output.statusCode >= 300) {
1604
- return de_DescribeLocationSmbCommandError(output, context);
1605
- }
1606
- const data = await parseBody(output.body, context);
1607
- let contents = {};
1608
- contents = de_DescribeLocationSmbResponse(data, context);
1609
- const response = {
1610
- $metadata: deserializeMetadata(output),
1611
- ...contents,
1612
- };
1613
- return response;
1614
- };
1615
- exports.de_DescribeLocationSmbCommand = de_DescribeLocationSmbCommand;
1616
- const de_DescribeLocationSmbCommandError = async (output, context) => {
1617
- const parsedOutput = {
1618
- ...output,
1619
- body: await parseErrorBody(output.body, context),
1620
- };
1621
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1622
- switch (errorCode) {
1623
- case "InternalException":
1624
- case "com.amazonaws.datasync#InternalException":
1625
- throw await de_InternalExceptionRes(parsedOutput, context);
1626
- case "InvalidRequestException":
1627
- case "com.amazonaws.datasync#InvalidRequestException":
1628
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1629
- default:
1630
- const parsedBody = parsedOutput.body;
1631
- return throwDefaultError({
1632
- output,
1633
- parsedBody,
1634
- errorCode,
1635
- });
1636
- }
1637
- };
1638
- const de_DescribeStorageSystemCommand = async (output, context) => {
1639
- if (output.statusCode >= 300) {
1640
- return de_DescribeStorageSystemCommandError(output, context);
1641
- }
1642
- const data = await parseBody(output.body, context);
1643
- let contents = {};
1644
- contents = de_DescribeStorageSystemResponse(data, context);
1645
- const response = {
1646
- $metadata: deserializeMetadata(output),
1647
- ...contents,
1648
- };
1649
- return response;
1650
- };
1651
- exports.de_DescribeStorageSystemCommand = de_DescribeStorageSystemCommand;
1652
- const de_DescribeStorageSystemCommandError = async (output, context) => {
1653
- const parsedOutput = {
1654
- ...output,
1655
- body: await parseErrorBody(output.body, context),
1656
- };
1657
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1658
- switch (errorCode) {
1659
- case "InternalException":
1660
- case "com.amazonaws.datasync#InternalException":
1661
- throw await de_InternalExceptionRes(parsedOutput, context);
1662
- case "InvalidRequestException":
1663
- case "com.amazonaws.datasync#InvalidRequestException":
1664
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1665
- default:
1666
- const parsedBody = parsedOutput.body;
1667
- return throwDefaultError({
1668
- output,
1669
- parsedBody,
1670
- errorCode,
1671
- });
1672
- }
1673
- };
1674
- const de_DescribeStorageSystemResourceMetricsCommand = async (output, context) => {
1675
- if (output.statusCode >= 300) {
1676
- return de_DescribeStorageSystemResourceMetricsCommandError(output, context);
1677
- }
1678
- const data = await parseBody(output.body, context);
1679
- let contents = {};
1680
- contents = de_DescribeStorageSystemResourceMetricsResponse(data, context);
1681
- const response = {
1682
- $metadata: deserializeMetadata(output),
1683
- ...contents,
1684
- };
1685
- return response;
1686
- };
1687
- exports.de_DescribeStorageSystemResourceMetricsCommand = de_DescribeStorageSystemResourceMetricsCommand;
1688
- const de_DescribeStorageSystemResourceMetricsCommandError = async (output, context) => {
1689
- const parsedOutput = {
1690
- ...output,
1691
- body: await parseErrorBody(output.body, context),
1692
- };
1693
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1694
- switch (errorCode) {
1695
- case "InternalException":
1696
- case "com.amazonaws.datasync#InternalException":
1697
- throw await de_InternalExceptionRes(parsedOutput, context);
1698
- case "InvalidRequestException":
1699
- case "com.amazonaws.datasync#InvalidRequestException":
1700
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1701
- default:
1702
- const parsedBody = parsedOutput.body;
1703
- return throwDefaultError({
1704
- output,
1705
- parsedBody,
1706
- errorCode,
1707
- });
1708
- }
1709
- };
1710
- const de_DescribeStorageSystemResourcesCommand = async (output, context) => {
1711
- if (output.statusCode >= 300) {
1712
- return de_DescribeStorageSystemResourcesCommandError(output, context);
1713
- }
1714
- const data = await parseBody(output.body, context);
1715
- let contents = {};
1716
- contents = de_DescribeStorageSystemResourcesResponse(data, context);
1717
- const response = {
1718
- $metadata: deserializeMetadata(output),
1719
- ...contents,
1720
- };
1721
- return response;
1722
- };
1723
- exports.de_DescribeStorageSystemResourcesCommand = de_DescribeStorageSystemResourcesCommand;
1724
- const de_DescribeStorageSystemResourcesCommandError = async (output, context) => {
1725
- const parsedOutput = {
1726
- ...output,
1727
- body: await parseErrorBody(output.body, context),
1728
- };
1729
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1730
- switch (errorCode) {
1731
- case "InternalException":
1732
- case "com.amazonaws.datasync#InternalException":
1733
- throw await de_InternalExceptionRes(parsedOutput, context);
1734
- case "InvalidRequestException":
1735
- case "com.amazonaws.datasync#InvalidRequestException":
1736
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1737
- default:
1738
- const parsedBody = parsedOutput.body;
1739
- return throwDefaultError({
1740
- output,
1741
- parsedBody,
1742
- errorCode,
1743
- });
1744
- }
1745
- };
1746
- const de_DescribeTaskCommand = async (output, context) => {
1747
- if (output.statusCode >= 300) {
1748
- return de_DescribeTaskCommandError(output, context);
1749
- }
1750
- const data = await parseBody(output.body, context);
1751
- let contents = {};
1752
- contents = de_DescribeTaskResponse(data, context);
1753
- const response = {
1754
- $metadata: deserializeMetadata(output),
1755
- ...contents,
1756
- };
1757
- return response;
1758
- };
1759
- exports.de_DescribeTaskCommand = de_DescribeTaskCommand;
1760
- const de_DescribeTaskCommandError = async (output, context) => {
1761
- const parsedOutput = {
1762
- ...output,
1763
- body: await parseErrorBody(output.body, context),
1764
- };
1765
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1766
- switch (errorCode) {
1767
- case "InternalException":
1768
- case "com.amazonaws.datasync#InternalException":
1769
- throw await de_InternalExceptionRes(parsedOutput, context);
1770
- case "InvalidRequestException":
1771
- case "com.amazonaws.datasync#InvalidRequestException":
1772
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1773
- default:
1774
- const parsedBody = parsedOutput.body;
1775
- return throwDefaultError({
1776
- output,
1777
- parsedBody,
1778
- errorCode,
1779
- });
1780
- }
1781
- };
1782
- const de_DescribeTaskExecutionCommand = async (output, context) => {
1783
- if (output.statusCode >= 300) {
1784
- return de_DescribeTaskExecutionCommandError(output, context);
1785
- }
1786
- const data = await parseBody(output.body, context);
1787
- let contents = {};
1788
- contents = de_DescribeTaskExecutionResponse(data, context);
1789
- const response = {
1790
- $metadata: deserializeMetadata(output),
1791
- ...contents,
1792
- };
1793
- return response;
1794
- };
1795
- exports.de_DescribeTaskExecutionCommand = de_DescribeTaskExecutionCommand;
1796
- const de_DescribeTaskExecutionCommandError = async (output, context) => {
1797
- const parsedOutput = {
1798
- ...output,
1799
- body: await parseErrorBody(output.body, context),
1800
- };
1801
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1802
- switch (errorCode) {
1803
- case "InternalException":
1804
- case "com.amazonaws.datasync#InternalException":
1805
- throw await de_InternalExceptionRes(parsedOutput, context);
1806
- case "InvalidRequestException":
1807
- case "com.amazonaws.datasync#InvalidRequestException":
1808
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1809
- default:
1810
- const parsedBody = parsedOutput.body;
1811
- return throwDefaultError({
1812
- output,
1813
- parsedBody,
1814
- errorCode,
1815
- });
1816
- }
1817
- };
1818
- const de_GenerateRecommendationsCommand = async (output, context) => {
1819
- if (output.statusCode >= 300) {
1820
- return de_GenerateRecommendationsCommandError(output, context);
1821
- }
1822
- const data = await parseBody(output.body, context);
1823
- let contents = {};
1824
- contents = (0, smithy_client_1._json)(data);
1825
- const response = {
1826
- $metadata: deserializeMetadata(output),
1827
- ...contents,
1828
- };
1829
- return response;
1830
- };
1831
- exports.de_GenerateRecommendationsCommand = de_GenerateRecommendationsCommand;
1832
- const de_GenerateRecommendationsCommandError = async (output, context) => {
1833
- const parsedOutput = {
1834
- ...output,
1835
- body: await parseErrorBody(output.body, context),
1836
- };
1837
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1838
- switch (errorCode) {
1839
- case "InternalException":
1840
- case "com.amazonaws.datasync#InternalException":
1841
- throw await de_InternalExceptionRes(parsedOutput, context);
1842
- case "InvalidRequestException":
1843
- case "com.amazonaws.datasync#InvalidRequestException":
1844
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1845
- default:
1846
- const parsedBody = parsedOutput.body;
1847
- return throwDefaultError({
1848
- output,
1849
- parsedBody,
1850
- errorCode,
1851
- });
1852
- }
1853
- };
1854
- const de_ListAgentsCommand = async (output, context) => {
1855
- if (output.statusCode >= 300) {
1856
- return de_ListAgentsCommandError(output, context);
1857
- }
1858
- const data = await parseBody(output.body, context);
1859
- let contents = {};
1860
- contents = (0, smithy_client_1._json)(data);
1861
- const response = {
1862
- $metadata: deserializeMetadata(output),
1863
- ...contents,
1864
- };
1865
- return response;
1866
- };
1867
- exports.de_ListAgentsCommand = de_ListAgentsCommand;
1868
- const de_ListAgentsCommandError = async (output, context) => {
1869
- const parsedOutput = {
1870
- ...output,
1871
- body: await parseErrorBody(output.body, context),
1872
- };
1873
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1874
- switch (errorCode) {
1875
- case "InternalException":
1876
- case "com.amazonaws.datasync#InternalException":
1877
- throw await de_InternalExceptionRes(parsedOutput, context);
1878
- case "InvalidRequestException":
1879
- case "com.amazonaws.datasync#InvalidRequestException":
1880
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1881
- default:
1882
- const parsedBody = parsedOutput.body;
1883
- return throwDefaultError({
1884
- output,
1885
- parsedBody,
1886
- errorCode,
1887
- });
1888
- }
1889
- };
1890
- const de_ListDiscoveryJobsCommand = async (output, context) => {
1891
- if (output.statusCode >= 300) {
1892
- return de_ListDiscoveryJobsCommandError(output, context);
1893
- }
1894
- const data = await parseBody(output.body, context);
1895
- let contents = {};
1896
- contents = (0, smithy_client_1._json)(data);
1897
- const response = {
1898
- $metadata: deserializeMetadata(output),
1899
- ...contents,
1900
- };
1901
- return response;
1902
- };
1903
- exports.de_ListDiscoveryJobsCommand = de_ListDiscoveryJobsCommand;
1904
- const de_ListDiscoveryJobsCommandError = async (output, context) => {
1905
- const parsedOutput = {
1906
- ...output,
1907
- body: await parseErrorBody(output.body, context),
1908
- };
1909
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1910
- switch (errorCode) {
1911
- case "InternalException":
1912
- case "com.amazonaws.datasync#InternalException":
1913
- throw await de_InternalExceptionRes(parsedOutput, context);
1914
- case "InvalidRequestException":
1915
- case "com.amazonaws.datasync#InvalidRequestException":
1916
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1917
- default:
1918
- const parsedBody = parsedOutput.body;
1919
- return throwDefaultError({
1920
- output,
1921
- parsedBody,
1922
- errorCode,
1923
- });
1924
- }
1925
- };
1926
- const de_ListLocationsCommand = async (output, context) => {
1927
- if (output.statusCode >= 300) {
1928
- return de_ListLocationsCommandError(output, context);
1929
- }
1930
- const data = await parseBody(output.body, context);
1931
- let contents = {};
1932
- contents = (0, smithy_client_1._json)(data);
1933
- const response = {
1934
- $metadata: deserializeMetadata(output),
1935
- ...contents,
1936
- };
1937
- return response;
1938
- };
1939
- exports.de_ListLocationsCommand = de_ListLocationsCommand;
1940
- const de_ListLocationsCommandError = async (output, context) => {
1941
- const parsedOutput = {
1942
- ...output,
1943
- body: await parseErrorBody(output.body, context),
1944
- };
1945
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1946
- switch (errorCode) {
1947
- case "InternalException":
1948
- case "com.amazonaws.datasync#InternalException":
1949
- throw await de_InternalExceptionRes(parsedOutput, context);
1950
- case "InvalidRequestException":
1951
- case "com.amazonaws.datasync#InvalidRequestException":
1952
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1953
- default:
1954
- const parsedBody = parsedOutput.body;
1955
- return throwDefaultError({
1956
- output,
1957
- parsedBody,
1958
- errorCode,
1959
- });
1960
- }
1961
- };
1962
- const de_ListStorageSystemsCommand = async (output, context) => {
1963
- if (output.statusCode >= 300) {
1964
- return de_ListStorageSystemsCommandError(output, context);
1965
- }
1966
- const data = await parseBody(output.body, context);
1967
- let contents = {};
1968
- contents = (0, smithy_client_1._json)(data);
1969
- const response = {
1970
- $metadata: deserializeMetadata(output),
1971
- ...contents,
1972
- };
1973
- return response;
1974
- };
1975
- exports.de_ListStorageSystemsCommand = de_ListStorageSystemsCommand;
1976
- const de_ListStorageSystemsCommandError = async (output, context) => {
1977
- const parsedOutput = {
1978
- ...output,
1979
- body: await parseErrorBody(output.body, context),
1980
- };
1981
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1982
- switch (errorCode) {
1983
- case "InternalException":
1984
- case "com.amazonaws.datasync#InternalException":
1985
- throw await de_InternalExceptionRes(parsedOutput, context);
1986
- case "InvalidRequestException":
1987
- case "com.amazonaws.datasync#InvalidRequestException":
1988
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1989
- default:
1990
- const parsedBody = parsedOutput.body;
1991
- return throwDefaultError({
1992
- output,
1993
- parsedBody,
1994
- errorCode,
1995
- });
1996
- }
1997
- };
1998
- const de_ListTagsForResourceCommand = async (output, context) => {
1999
- if (output.statusCode >= 300) {
2000
- return de_ListTagsForResourceCommandError(output, context);
2001
- }
2002
- const data = await parseBody(output.body, context);
2003
- let contents = {};
2004
- contents = (0, smithy_client_1._json)(data);
2005
- const response = {
2006
- $metadata: deserializeMetadata(output),
2007
- ...contents,
2008
- };
2009
- return response;
2010
- };
2011
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
2012
- const de_ListTagsForResourceCommandError = async (output, context) => {
2013
- const parsedOutput = {
2014
- ...output,
2015
- body: await parseErrorBody(output.body, context),
2016
- };
2017
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2018
- switch (errorCode) {
2019
- case "InternalException":
2020
- case "com.amazonaws.datasync#InternalException":
2021
- throw await de_InternalExceptionRes(parsedOutput, context);
2022
- case "InvalidRequestException":
2023
- case "com.amazonaws.datasync#InvalidRequestException":
2024
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2025
- default:
2026
- const parsedBody = parsedOutput.body;
2027
- return throwDefaultError({
2028
- output,
2029
- parsedBody,
2030
- errorCode,
2031
- });
2032
- }
2033
- };
2034
- const de_ListTaskExecutionsCommand = async (output, context) => {
2035
- if (output.statusCode >= 300) {
2036
- return de_ListTaskExecutionsCommandError(output, context);
2037
- }
2038
- const data = await parseBody(output.body, context);
2039
- let contents = {};
2040
- contents = (0, smithy_client_1._json)(data);
2041
- const response = {
2042
- $metadata: deserializeMetadata(output),
2043
- ...contents,
2044
- };
2045
- return response;
2046
- };
2047
- exports.de_ListTaskExecutionsCommand = de_ListTaskExecutionsCommand;
2048
- const de_ListTaskExecutionsCommandError = async (output, context) => {
2049
- const parsedOutput = {
2050
- ...output,
2051
- body: await parseErrorBody(output.body, context),
2052
- };
2053
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2054
- switch (errorCode) {
2055
- case "InternalException":
2056
- case "com.amazonaws.datasync#InternalException":
2057
- throw await de_InternalExceptionRes(parsedOutput, context);
2058
- case "InvalidRequestException":
2059
- case "com.amazonaws.datasync#InvalidRequestException":
2060
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2061
- default:
2062
- const parsedBody = parsedOutput.body;
2063
- return throwDefaultError({
2064
- output,
2065
- parsedBody,
2066
- errorCode,
2067
- });
2068
- }
2069
- };
2070
- const de_ListTasksCommand = async (output, context) => {
2071
- if (output.statusCode >= 300) {
2072
- return de_ListTasksCommandError(output, context);
2073
- }
2074
- const data = await parseBody(output.body, context);
2075
- let contents = {};
2076
- contents = (0, smithy_client_1._json)(data);
2077
- const response = {
2078
- $metadata: deserializeMetadata(output),
2079
- ...contents,
2080
- };
2081
- return response;
2082
- };
2083
- exports.de_ListTasksCommand = de_ListTasksCommand;
2084
- const de_ListTasksCommandError = async (output, context) => {
2085
- const parsedOutput = {
2086
- ...output,
2087
- body: await parseErrorBody(output.body, context),
2088
- };
2089
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2090
- switch (errorCode) {
2091
- case "InternalException":
2092
- case "com.amazonaws.datasync#InternalException":
2093
- throw await de_InternalExceptionRes(parsedOutput, context);
2094
- case "InvalidRequestException":
2095
- case "com.amazonaws.datasync#InvalidRequestException":
2096
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2097
- default:
2098
- const parsedBody = parsedOutput.body;
2099
- return throwDefaultError({
2100
- output,
2101
- parsedBody,
2102
- errorCode,
2103
- });
2104
- }
2105
- };
2106
- const de_RemoveStorageSystemCommand = async (output, context) => {
2107
- if (output.statusCode >= 300) {
2108
- return de_RemoveStorageSystemCommandError(output, context);
2109
- }
2110
- const data = await parseBody(output.body, context);
2111
- let contents = {};
2112
- contents = (0, smithy_client_1._json)(data);
2113
- const response = {
2114
- $metadata: deserializeMetadata(output),
2115
- ...contents,
2116
- };
2117
- return response;
2118
- };
2119
- exports.de_RemoveStorageSystemCommand = de_RemoveStorageSystemCommand;
2120
- const de_RemoveStorageSystemCommandError = async (output, context) => {
2121
- const parsedOutput = {
2122
- ...output,
2123
- body: await parseErrorBody(output.body, context),
2124
- };
2125
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2126
- switch (errorCode) {
2127
- case "InternalException":
2128
- case "com.amazonaws.datasync#InternalException":
2129
- throw await de_InternalExceptionRes(parsedOutput, context);
2130
- case "InvalidRequestException":
2131
- case "com.amazonaws.datasync#InvalidRequestException":
2132
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2133
- default:
2134
- const parsedBody = parsedOutput.body;
2135
- return throwDefaultError({
2136
- output,
2137
- parsedBody,
2138
- errorCode,
2139
- });
2140
- }
2141
- };
2142
- const de_StartDiscoveryJobCommand = async (output, context) => {
2143
- if (output.statusCode >= 300) {
2144
- return de_StartDiscoveryJobCommandError(output, context);
2145
- }
2146
- const data = await parseBody(output.body, context);
2147
- let contents = {};
2148
- contents = (0, smithy_client_1._json)(data);
2149
- const response = {
2150
- $metadata: deserializeMetadata(output),
2151
- ...contents,
2152
- };
2153
- return response;
2154
- };
2155
- exports.de_StartDiscoveryJobCommand = de_StartDiscoveryJobCommand;
2156
- const de_StartDiscoveryJobCommandError = async (output, context) => {
2157
- const parsedOutput = {
2158
- ...output,
2159
- body: await parseErrorBody(output.body, context),
2160
- };
2161
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2162
- switch (errorCode) {
2163
- case "InternalException":
2164
- case "com.amazonaws.datasync#InternalException":
2165
- throw await de_InternalExceptionRes(parsedOutput, context);
2166
- case "InvalidRequestException":
2167
- case "com.amazonaws.datasync#InvalidRequestException":
2168
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2169
- default:
2170
- const parsedBody = parsedOutput.body;
2171
- return throwDefaultError({
2172
- output,
2173
- parsedBody,
2174
- errorCode,
2175
- });
2176
- }
2177
- };
2178
- const de_StartTaskExecutionCommand = async (output, context) => {
2179
- if (output.statusCode >= 300) {
2180
- return de_StartTaskExecutionCommandError(output, context);
2181
- }
2182
- const data = await parseBody(output.body, context);
2183
- let contents = {};
2184
- contents = (0, smithy_client_1._json)(data);
2185
- const response = {
2186
- $metadata: deserializeMetadata(output),
2187
- ...contents,
2188
- };
2189
- return response;
2190
- };
2191
- exports.de_StartTaskExecutionCommand = de_StartTaskExecutionCommand;
2192
- const de_StartTaskExecutionCommandError = async (output, context) => {
2193
- const parsedOutput = {
2194
- ...output,
2195
- body: await parseErrorBody(output.body, context),
2196
- };
2197
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2198
- switch (errorCode) {
2199
- case "InternalException":
2200
- case "com.amazonaws.datasync#InternalException":
2201
- throw await de_InternalExceptionRes(parsedOutput, context);
2202
- case "InvalidRequestException":
2203
- case "com.amazonaws.datasync#InvalidRequestException":
2204
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2205
- default:
2206
- const parsedBody = parsedOutput.body;
2207
- return throwDefaultError({
2208
- output,
2209
- parsedBody,
2210
- errorCode,
2211
- });
2212
- }
2213
- };
2214
- const de_StopDiscoveryJobCommand = async (output, context) => {
2215
- if (output.statusCode >= 300) {
2216
- return de_StopDiscoveryJobCommandError(output, context);
2217
- }
2218
- const data = await parseBody(output.body, context);
2219
- let contents = {};
2220
- contents = (0, smithy_client_1._json)(data);
2221
- const response = {
2222
- $metadata: deserializeMetadata(output),
2223
- ...contents,
2224
- };
2225
- return response;
2226
- };
2227
- exports.de_StopDiscoveryJobCommand = de_StopDiscoveryJobCommand;
2228
- const de_StopDiscoveryJobCommandError = async (output, context) => {
2229
- const parsedOutput = {
2230
- ...output,
2231
- body: await parseErrorBody(output.body, context),
2232
- };
2233
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2234
- switch (errorCode) {
2235
- case "InternalException":
2236
- case "com.amazonaws.datasync#InternalException":
2237
- throw await de_InternalExceptionRes(parsedOutput, context);
2238
- case "InvalidRequestException":
2239
- case "com.amazonaws.datasync#InvalidRequestException":
2240
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2241
- default:
2242
- const parsedBody = parsedOutput.body;
2243
- return throwDefaultError({
2244
- output,
2245
- parsedBody,
2246
- errorCode,
2247
- });
2248
- }
2249
- };
2250
- const de_TagResourceCommand = async (output, context) => {
2251
- if (output.statusCode >= 300) {
2252
- return de_TagResourceCommandError(output, context);
2253
- }
2254
- const data = await parseBody(output.body, context);
2255
- let contents = {};
2256
- contents = (0, smithy_client_1._json)(data);
2257
- const response = {
2258
- $metadata: deserializeMetadata(output),
2259
- ...contents,
2260
- };
2261
- return response;
2262
- };
2263
- exports.de_TagResourceCommand = de_TagResourceCommand;
2264
- const de_TagResourceCommandError = async (output, context) => {
2265
- const parsedOutput = {
2266
- ...output,
2267
- body: await parseErrorBody(output.body, context),
2268
- };
2269
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2270
- switch (errorCode) {
2271
- case "InternalException":
2272
- case "com.amazonaws.datasync#InternalException":
2273
- throw await de_InternalExceptionRes(parsedOutput, context);
2274
- case "InvalidRequestException":
2275
- case "com.amazonaws.datasync#InvalidRequestException":
2276
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2277
- default:
2278
- const parsedBody = parsedOutput.body;
2279
- return throwDefaultError({
2280
- output,
2281
- parsedBody,
2282
- errorCode,
2283
- });
2284
- }
2285
- };
2286
- const de_UntagResourceCommand = async (output, context) => {
2287
- if (output.statusCode >= 300) {
2288
- return de_UntagResourceCommandError(output, context);
2289
- }
2290
- const data = await parseBody(output.body, context);
2291
- let contents = {};
2292
- contents = (0, smithy_client_1._json)(data);
2293
- const response = {
2294
- $metadata: deserializeMetadata(output),
2295
- ...contents,
2296
- };
2297
- return response;
2298
- };
2299
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
2300
- const de_UntagResourceCommandError = async (output, context) => {
2301
- const parsedOutput = {
2302
- ...output,
2303
- body: await parseErrorBody(output.body, context),
2304
- };
2305
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2306
- switch (errorCode) {
2307
- case "InternalException":
2308
- case "com.amazonaws.datasync#InternalException":
2309
- throw await de_InternalExceptionRes(parsedOutput, context);
2310
- case "InvalidRequestException":
2311
- case "com.amazonaws.datasync#InvalidRequestException":
2312
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2313
- default:
2314
- const parsedBody = parsedOutput.body;
2315
- return throwDefaultError({
2316
- output,
2317
- parsedBody,
2318
- errorCode,
2319
- });
2320
- }
2321
- };
2322
- const de_UpdateAgentCommand = async (output, context) => {
2323
- if (output.statusCode >= 300) {
2324
- return de_UpdateAgentCommandError(output, context);
2325
- }
2326
- const data = await parseBody(output.body, context);
2327
- let contents = {};
2328
- contents = (0, smithy_client_1._json)(data);
2329
- const response = {
2330
- $metadata: deserializeMetadata(output),
2331
- ...contents,
2332
- };
2333
- return response;
2334
- };
2335
- exports.de_UpdateAgentCommand = de_UpdateAgentCommand;
2336
- const de_UpdateAgentCommandError = async (output, context) => {
2337
- const parsedOutput = {
2338
- ...output,
2339
- body: await parseErrorBody(output.body, context),
2340
- };
2341
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2342
- switch (errorCode) {
2343
- case "InternalException":
2344
- case "com.amazonaws.datasync#InternalException":
2345
- throw await de_InternalExceptionRes(parsedOutput, context);
2346
- case "InvalidRequestException":
2347
- case "com.amazonaws.datasync#InvalidRequestException":
2348
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2349
- default:
2350
- const parsedBody = parsedOutput.body;
2351
- return throwDefaultError({
2352
- output,
2353
- parsedBody,
2354
- errorCode,
2355
- });
2356
- }
2357
- };
2358
- const de_UpdateDiscoveryJobCommand = async (output, context) => {
2359
- if (output.statusCode >= 300) {
2360
- return de_UpdateDiscoveryJobCommandError(output, context);
2361
- }
2362
- const data = await parseBody(output.body, context);
2363
- let contents = {};
2364
- contents = (0, smithy_client_1._json)(data);
2365
- const response = {
2366
- $metadata: deserializeMetadata(output),
2367
- ...contents,
2368
- };
2369
- return response;
2370
- };
2371
- exports.de_UpdateDiscoveryJobCommand = de_UpdateDiscoveryJobCommand;
2372
- const de_UpdateDiscoveryJobCommandError = async (output, context) => {
2373
- const parsedOutput = {
2374
- ...output,
2375
- body: await parseErrorBody(output.body, context),
2376
- };
2377
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2378
- switch (errorCode) {
2379
- case "InternalException":
2380
- case "com.amazonaws.datasync#InternalException":
2381
- throw await de_InternalExceptionRes(parsedOutput, context);
2382
- case "InvalidRequestException":
2383
- case "com.amazonaws.datasync#InvalidRequestException":
2384
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2385
- default:
2386
- const parsedBody = parsedOutput.body;
2387
- return throwDefaultError({
2388
- output,
2389
- parsedBody,
2390
- errorCode,
2391
- });
2392
- }
2393
- };
2394
- const de_UpdateLocationAzureBlobCommand = async (output, context) => {
2395
- if (output.statusCode >= 300) {
2396
- return de_UpdateLocationAzureBlobCommandError(output, context);
2397
- }
2398
- const data = await parseBody(output.body, context);
2399
- let contents = {};
2400
- contents = (0, smithy_client_1._json)(data);
2401
- const response = {
2402
- $metadata: deserializeMetadata(output),
2403
- ...contents,
2404
- };
2405
- return response;
2406
- };
2407
- exports.de_UpdateLocationAzureBlobCommand = de_UpdateLocationAzureBlobCommand;
2408
- const de_UpdateLocationAzureBlobCommandError = async (output, context) => {
2409
- const parsedOutput = {
2410
- ...output,
2411
- body: await parseErrorBody(output.body, context),
2412
- };
2413
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2414
- switch (errorCode) {
2415
- case "InternalException":
2416
- case "com.amazonaws.datasync#InternalException":
2417
- throw await de_InternalExceptionRes(parsedOutput, context);
2418
- case "InvalidRequestException":
2419
- case "com.amazonaws.datasync#InvalidRequestException":
2420
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2421
- default:
2422
- const parsedBody = parsedOutput.body;
2423
- return throwDefaultError({
2424
- output,
2425
- parsedBody,
2426
- errorCode,
2427
- });
2428
- }
2429
- };
2430
- const de_UpdateLocationHdfsCommand = async (output, context) => {
2431
- if (output.statusCode >= 300) {
2432
- return de_UpdateLocationHdfsCommandError(output, context);
2433
- }
2434
- const data = await parseBody(output.body, context);
2435
- let contents = {};
2436
- contents = (0, smithy_client_1._json)(data);
2437
- const response = {
2438
- $metadata: deserializeMetadata(output),
2439
- ...contents,
2440
- };
2441
- return response;
2442
- };
2443
- exports.de_UpdateLocationHdfsCommand = de_UpdateLocationHdfsCommand;
2444
- const de_UpdateLocationHdfsCommandError = async (output, context) => {
2445
- const parsedOutput = {
2446
- ...output,
2447
- body: await parseErrorBody(output.body, context),
2448
- };
2449
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2450
- switch (errorCode) {
2451
- case "InternalException":
2452
- case "com.amazonaws.datasync#InternalException":
2453
- throw await de_InternalExceptionRes(parsedOutput, context);
2454
- case "InvalidRequestException":
2455
- case "com.amazonaws.datasync#InvalidRequestException":
2456
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2457
- default:
2458
- const parsedBody = parsedOutput.body;
2459
- return throwDefaultError({
2460
- output,
2461
- parsedBody,
2462
- errorCode,
2463
- });
2464
- }
2465
- };
2466
- const de_UpdateLocationNfsCommand = async (output, context) => {
2467
- if (output.statusCode >= 300) {
2468
- return de_UpdateLocationNfsCommandError(output, context);
2469
- }
2470
- const data = await parseBody(output.body, context);
2471
- let contents = {};
2472
- contents = (0, smithy_client_1._json)(data);
2473
- const response = {
2474
- $metadata: deserializeMetadata(output),
2475
- ...contents,
2476
- };
2477
- return response;
2478
- };
2479
- exports.de_UpdateLocationNfsCommand = de_UpdateLocationNfsCommand;
2480
- const de_UpdateLocationNfsCommandError = async (output, context) => {
2481
- const parsedOutput = {
2482
- ...output,
2483
- body: await parseErrorBody(output.body, context),
2484
- };
2485
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2486
- switch (errorCode) {
2487
- case "InternalException":
2488
- case "com.amazonaws.datasync#InternalException":
2489
- throw await de_InternalExceptionRes(parsedOutput, context);
2490
- case "InvalidRequestException":
2491
- case "com.amazonaws.datasync#InvalidRequestException":
2492
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2493
- default:
2494
- const parsedBody = parsedOutput.body;
2495
- return throwDefaultError({
2496
- output,
2497
- parsedBody,
2498
- errorCode,
2499
- });
2500
- }
2501
- };
2502
- const de_UpdateLocationObjectStorageCommand = async (output, context) => {
2503
- if (output.statusCode >= 300) {
2504
- return de_UpdateLocationObjectStorageCommandError(output, context);
2505
- }
2506
- const data = await parseBody(output.body, context);
2507
- let contents = {};
2508
- contents = (0, smithy_client_1._json)(data);
2509
- const response = {
2510
- $metadata: deserializeMetadata(output),
2511
- ...contents,
2512
- };
2513
- return response;
2514
- };
2515
- exports.de_UpdateLocationObjectStorageCommand = de_UpdateLocationObjectStorageCommand;
2516
- const de_UpdateLocationObjectStorageCommandError = async (output, context) => {
2517
- const parsedOutput = {
2518
- ...output,
2519
- body: await parseErrorBody(output.body, context),
2520
- };
2521
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2522
- switch (errorCode) {
2523
- case "InternalException":
2524
- case "com.amazonaws.datasync#InternalException":
2525
- throw await de_InternalExceptionRes(parsedOutput, context);
2526
- case "InvalidRequestException":
2527
- case "com.amazonaws.datasync#InvalidRequestException":
2528
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2529
- default:
2530
- const parsedBody = parsedOutput.body;
2531
- return throwDefaultError({
2532
- output,
2533
- parsedBody,
2534
- errorCode,
2535
- });
2536
- }
2537
- };
2538
- const de_UpdateLocationSmbCommand = async (output, context) => {
2539
- if (output.statusCode >= 300) {
2540
- return de_UpdateLocationSmbCommandError(output, context);
2541
- }
2542
- const data = await parseBody(output.body, context);
2543
- let contents = {};
2544
- contents = (0, smithy_client_1._json)(data);
2545
- const response = {
2546
- $metadata: deserializeMetadata(output),
2547
- ...contents,
2548
- };
2549
- return response;
2550
- };
2551
- exports.de_UpdateLocationSmbCommand = de_UpdateLocationSmbCommand;
2552
- const de_UpdateLocationSmbCommandError = async (output, context) => {
2553
- const parsedOutput = {
2554
- ...output,
2555
- body: await parseErrorBody(output.body, context),
2556
- };
2557
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2558
- switch (errorCode) {
2559
- case "InternalException":
2560
- case "com.amazonaws.datasync#InternalException":
2561
- throw await de_InternalExceptionRes(parsedOutput, context);
2562
- case "InvalidRequestException":
2563
- case "com.amazonaws.datasync#InvalidRequestException":
2564
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2565
- default:
2566
- const parsedBody = parsedOutput.body;
2567
- return throwDefaultError({
2568
- output,
2569
- parsedBody,
2570
- errorCode,
2571
- });
2572
- }
2573
- };
2574
- const de_UpdateStorageSystemCommand = async (output, context) => {
2575
- if (output.statusCode >= 300) {
2576
- return de_UpdateStorageSystemCommandError(output, context);
2577
- }
2578
- const data = await parseBody(output.body, context);
2579
- let contents = {};
2580
- contents = (0, smithy_client_1._json)(data);
2581
- const response = {
2582
- $metadata: deserializeMetadata(output),
2583
- ...contents,
2584
- };
2585
- return response;
2586
- };
2587
- exports.de_UpdateStorageSystemCommand = de_UpdateStorageSystemCommand;
2588
- const de_UpdateStorageSystemCommandError = async (output, context) => {
2589
- const parsedOutput = {
2590
- ...output,
2591
- body: await parseErrorBody(output.body, context),
2592
- };
2593
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2594
- switch (errorCode) {
2595
- case "InternalException":
2596
- case "com.amazonaws.datasync#InternalException":
2597
- throw await de_InternalExceptionRes(parsedOutput, context);
2598
- case "InvalidRequestException":
2599
- case "com.amazonaws.datasync#InvalidRequestException":
2600
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2601
- default:
2602
- const parsedBody = parsedOutput.body;
2603
- return throwDefaultError({
2604
- output,
2605
- parsedBody,
2606
- errorCode,
2607
- });
2608
- }
2609
- };
2610
- const de_UpdateTaskCommand = async (output, context) => {
2611
- if (output.statusCode >= 300) {
2612
- return de_UpdateTaskCommandError(output, context);
2613
- }
2614
- const data = await parseBody(output.body, context);
2615
- let contents = {};
2616
- contents = (0, smithy_client_1._json)(data);
2617
- const response = {
2618
- $metadata: deserializeMetadata(output),
2619
- ...contents,
2620
- };
2621
- return response;
2622
- };
2623
- exports.de_UpdateTaskCommand = de_UpdateTaskCommand;
2624
- const de_UpdateTaskCommandError = async (output, context) => {
2625
- const parsedOutput = {
2626
- ...output,
2627
- body: await parseErrorBody(output.body, context),
2628
- };
2629
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2630
- switch (errorCode) {
2631
- case "InternalException":
2632
- case "com.amazonaws.datasync#InternalException":
2633
- throw await de_InternalExceptionRes(parsedOutput, context);
2634
- case "InvalidRequestException":
2635
- case "com.amazonaws.datasync#InvalidRequestException":
2636
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2637
- default:
2638
- const parsedBody = parsedOutput.body;
2639
- return throwDefaultError({
2640
- output,
2641
- parsedBody,
2642
- errorCode,
2643
- });
2644
- }
2645
- };
2646
- const de_UpdateTaskExecutionCommand = async (output, context) => {
2647
- if (output.statusCode >= 300) {
2648
- return de_UpdateTaskExecutionCommandError(output, context);
2649
- }
2650
- const data = await parseBody(output.body, context);
2651
- let contents = {};
2652
- contents = (0, smithy_client_1._json)(data);
2653
- const response = {
2654
- $metadata: deserializeMetadata(output),
2655
- ...contents,
2656
- };
2657
- return response;
2658
- };
2659
- exports.de_UpdateTaskExecutionCommand = de_UpdateTaskExecutionCommand;
2660
- const de_UpdateTaskExecutionCommandError = async (output, context) => {
2661
- const parsedOutput = {
2662
- ...output,
2663
- body: await parseErrorBody(output.body, context),
2664
- };
2665
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2666
- switch (errorCode) {
2667
- case "InternalException":
2668
- case "com.amazonaws.datasync#InternalException":
2669
- throw await de_InternalExceptionRes(parsedOutput, context);
2670
- case "InvalidRequestException":
2671
- case "com.amazonaws.datasync#InvalidRequestException":
2672
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2673
- default:
2674
- const parsedBody = parsedOutput.body;
2675
- return throwDefaultError({
2676
- output,
2677
- parsedBody,
2678
- errorCode,
2679
- });
2680
- }
2681
- };
2682
- const de_InternalExceptionRes = async (parsedOutput, context) => {
2683
- const body = parsedOutput.body;
2684
- const deserialized = (0, smithy_client_1._json)(body);
2685
- const exception = new models_0_1.InternalException({
2686
- $metadata: deserializeMetadata(parsedOutput),
2687
- ...deserialized,
2688
- });
2689
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2690
- };
2691
- const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
2692
- const body = parsedOutput.body;
2693
- const deserialized = (0, smithy_client_1._json)(body);
2694
- const exception = new models_0_1.InvalidRequestException({
2695
- $metadata: deserializeMetadata(parsedOutput),
2696
- ...deserialized,
2697
- });
2698
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2699
- };
2700
- const se_AddStorageSystemRequest = (input, context) => {
2701
- return (0, smithy_client_1.take)(input, {
2702
- AgentArns: smithy_client_1._json,
2703
- ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
2704
- CloudWatchLogGroupArn: [],
2705
- Credentials: smithy_client_1._json,
2706
- Name: [],
2707
- ServerConfiguration: smithy_client_1._json,
2708
- SystemType: [],
2709
- Tags: smithy_client_1._json,
2710
- });
2711
- };
2712
- const se_CreateLocationHdfsRequest = (input, context) => {
2713
- return (0, smithy_client_1.take)(input, {
2714
- AgentArns: smithy_client_1._json,
2715
- AuthenticationType: [],
2716
- BlockSize: [],
2717
- KerberosKeytab: context.base64Encoder,
2718
- KerberosKrb5Conf: context.base64Encoder,
2719
- KerberosPrincipal: [],
2720
- KmsKeyProviderUri: [],
2721
- NameNodes: smithy_client_1._json,
2722
- QopConfiguration: smithy_client_1._json,
2723
- ReplicationFactor: [],
2724
- SimpleUser: [],
2725
- Subdirectory: [],
2726
- Tags: smithy_client_1._json,
2727
- });
2728
- };
2729
- const se_CreateLocationObjectStorageRequest = (input, context) => {
2730
- return (0, smithy_client_1.take)(input, {
2731
- AccessKey: [],
2732
- AgentArns: smithy_client_1._json,
2733
- BucketName: [],
2734
- SecretKey: [],
2735
- ServerCertificate: context.base64Encoder,
2736
- ServerHostname: [],
2737
- ServerPort: [],
2738
- ServerProtocol: [],
2739
- Subdirectory: [],
2740
- Tags: smithy_client_1._json,
2741
- });
2742
- };
2743
- const se_DescribeStorageSystemResourceMetricsRequest = (input, context) => {
2744
- return (0, smithy_client_1.take)(input, {
2745
- DiscoveryJobArn: [],
2746
- EndTime: (_) => Math.round(_.getTime() / 1000),
2747
- MaxResults: [],
2748
- NextToken: [],
2749
- ResourceId: [],
2750
- ResourceType: [],
2751
- StartTime: (_) => Math.round(_.getTime() / 1000),
2752
- });
2753
- };
2754
- const se_StartDiscoveryJobRequest = (input, context) => {
2755
- return (0, smithy_client_1.take)(input, {
2756
- ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
2757
- CollectionDurationMinutes: [],
2758
- StorageSystemArn: [],
2759
- Tags: smithy_client_1._json,
2760
- });
2761
- };
2762
- const se_UpdateLocationHdfsRequest = (input, context) => {
2763
- return (0, smithy_client_1.take)(input, {
2764
- AgentArns: smithy_client_1._json,
2765
- AuthenticationType: [],
2766
- BlockSize: [],
2767
- KerberosKeytab: context.base64Encoder,
2768
- KerberosKrb5Conf: context.base64Encoder,
2769
- KerberosPrincipal: [],
2770
- KmsKeyProviderUri: [],
2771
- LocationArn: [],
2772
- NameNodes: smithy_client_1._json,
2773
- QopConfiguration: smithy_client_1._json,
2774
- ReplicationFactor: [],
2775
- SimpleUser: [],
2776
- Subdirectory: [],
2777
- });
2778
- };
2779
- const se_UpdateLocationObjectStorageRequest = (input, context) => {
2780
- return (0, smithy_client_1.take)(input, {
2781
- AccessKey: [],
2782
- AgentArns: smithy_client_1._json,
2783
- LocationArn: [],
2784
- SecretKey: [],
2785
- ServerCertificate: context.base64Encoder,
2786
- ServerPort: [],
2787
- ServerProtocol: [],
2788
- Subdirectory: [],
2789
- });
2790
- };
2791
- const de_DescribeAgentResponse = (output, context) => {
2792
- return (0, smithy_client_1.take)(output, {
2793
- AgentArn: smithy_client_1.expectString,
2794
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2795
- EndpointType: smithy_client_1.expectString,
2796
- LastConnectionTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2797
- Name: smithy_client_1.expectString,
2798
- Platform: smithy_client_1._json,
2799
- PrivateLinkConfig: smithy_client_1._json,
2800
- Status: smithy_client_1.expectString,
2801
- });
2802
- };
2803
- const de_DescribeDiscoveryJobResponse = (output, context) => {
2804
- return (0, smithy_client_1.take)(output, {
2805
- CollectionDurationMinutes: smithy_client_1.expectInt32,
2806
- DiscoveryJobArn: smithy_client_1.expectString,
2807
- JobEndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2808
- JobStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2809
- Status: smithy_client_1.expectString,
2810
- StorageSystemArn: smithy_client_1.expectString,
2811
- });
2812
- };
2813
- const de_DescribeLocationAzureBlobResponse = (output, context) => {
2814
- return (0, smithy_client_1.take)(output, {
2815
- AccessTier: smithy_client_1.expectString,
2816
- AgentArns: smithy_client_1._json,
2817
- AuthenticationType: smithy_client_1.expectString,
2818
- BlobType: smithy_client_1.expectString,
2819
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2820
- LocationArn: smithy_client_1.expectString,
2821
- LocationUri: smithy_client_1.expectString,
2822
- });
2823
- };
2824
- const de_DescribeLocationEfsResponse = (output, context) => {
2825
- return (0, smithy_client_1.take)(output, {
2826
- AccessPointArn: smithy_client_1.expectString,
2827
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2828
- Ec2Config: smithy_client_1._json,
2829
- FileSystemAccessRoleArn: smithy_client_1.expectString,
2830
- InTransitEncryption: smithy_client_1.expectString,
2831
- LocationArn: smithy_client_1.expectString,
2832
- LocationUri: smithy_client_1.expectString,
2833
- });
2834
- };
2835
- const de_DescribeLocationFsxLustreResponse = (output, context) => {
2836
- return (0, smithy_client_1.take)(output, {
2837
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2838
- LocationArn: smithy_client_1.expectString,
2839
- LocationUri: smithy_client_1.expectString,
2840
- SecurityGroupArns: smithy_client_1._json,
2841
- });
2842
- };
2843
- const de_DescribeLocationFsxOntapResponse = (output, context) => {
2844
- return (0, smithy_client_1.take)(output, {
2845
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2846
- FsxFilesystemArn: smithy_client_1.expectString,
2847
- LocationArn: smithy_client_1.expectString,
2848
- LocationUri: smithy_client_1.expectString,
2849
- Protocol: smithy_client_1._json,
2850
- SecurityGroupArns: smithy_client_1._json,
2851
- StorageVirtualMachineArn: smithy_client_1.expectString,
2852
- });
2853
- };
2854
- const de_DescribeLocationFsxOpenZfsResponse = (output, context) => {
2855
- return (0, smithy_client_1.take)(output, {
2856
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2857
- LocationArn: smithy_client_1.expectString,
2858
- LocationUri: smithy_client_1.expectString,
2859
- Protocol: smithy_client_1._json,
2860
- SecurityGroupArns: smithy_client_1._json,
2861
- });
2862
- };
2863
- const de_DescribeLocationFsxWindowsResponse = (output, context) => {
2864
- return (0, smithy_client_1.take)(output, {
2865
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2866
- Domain: smithy_client_1.expectString,
2867
- LocationArn: smithy_client_1.expectString,
2868
- LocationUri: smithy_client_1.expectString,
2869
- SecurityGroupArns: smithy_client_1._json,
2870
- User: smithy_client_1.expectString,
2871
- });
2872
- };
2873
- const de_DescribeLocationHdfsResponse = (output, context) => {
2874
- return (0, smithy_client_1.take)(output, {
2875
- AgentArns: smithy_client_1._json,
2876
- AuthenticationType: smithy_client_1.expectString,
2877
- BlockSize: smithy_client_1.expectInt32,
2878
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2879
- KerberosPrincipal: smithy_client_1.expectString,
2880
- KmsKeyProviderUri: smithy_client_1.expectString,
2881
- LocationArn: smithy_client_1.expectString,
2882
- LocationUri: smithy_client_1.expectString,
2883
- NameNodes: smithy_client_1._json,
2884
- QopConfiguration: smithy_client_1._json,
2885
- ReplicationFactor: smithy_client_1.expectInt32,
2886
- SimpleUser: smithy_client_1.expectString,
2887
- });
2888
- };
2889
- const de_DescribeLocationNfsResponse = (output, context) => {
2890
- return (0, smithy_client_1.take)(output, {
2891
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2892
- LocationArn: smithy_client_1.expectString,
2893
- LocationUri: smithy_client_1.expectString,
2894
- MountOptions: smithy_client_1._json,
2895
- OnPremConfig: smithy_client_1._json,
2896
- });
2897
- };
2898
- const de_DescribeLocationObjectStorageResponse = (output, context) => {
2899
- return (0, smithy_client_1.take)(output, {
2900
- AccessKey: smithy_client_1.expectString,
2901
- AgentArns: smithy_client_1._json,
2902
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2903
- LocationArn: smithy_client_1.expectString,
2904
- LocationUri: smithy_client_1.expectString,
2905
- ServerCertificate: context.base64Decoder,
2906
- ServerPort: smithy_client_1.expectInt32,
2907
- ServerProtocol: smithy_client_1.expectString,
2908
- });
2909
- };
2910
- const de_DescribeLocationS3Response = (output, context) => {
2911
- return (0, smithy_client_1.take)(output, {
2912
- AgentArns: smithy_client_1._json,
2913
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2914
- LocationArn: smithy_client_1.expectString,
2915
- LocationUri: smithy_client_1.expectString,
2916
- S3Config: smithy_client_1._json,
2917
- S3StorageClass: smithy_client_1.expectString,
2918
- });
2919
- };
2920
- const de_DescribeLocationSmbResponse = (output, context) => {
2921
- return (0, smithy_client_1.take)(output, {
2922
- AgentArns: smithy_client_1._json,
2923
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2924
- Domain: smithy_client_1.expectString,
2925
- LocationArn: smithy_client_1.expectString,
2926
- LocationUri: smithy_client_1.expectString,
2927
- MountOptions: smithy_client_1._json,
2928
- User: smithy_client_1.expectString,
2929
- });
2930
- };
2931
- const de_DescribeStorageSystemResourceMetricsResponse = (output, context) => {
2932
- return (0, smithy_client_1.take)(output, {
2933
- Metrics: (_) => de_Metrics(_, context),
2934
- NextToken: smithy_client_1.expectString,
2935
- });
2936
- };
2937
- const de_DescribeStorageSystemResourcesResponse = (output, context) => {
2938
- return (0, smithy_client_1.take)(output, {
2939
- NextToken: smithy_client_1.expectString,
2940
- ResourceDetails: (_) => de_ResourceDetails(_, context),
2941
- });
2942
- };
2943
- const de_DescribeStorageSystemResponse = (output, context) => {
2944
- return (0, smithy_client_1.take)(output, {
2945
- AgentArns: smithy_client_1._json,
2946
- CloudWatchLogGroupArn: smithy_client_1.expectString,
2947
- ConnectivityStatus: smithy_client_1.expectString,
2948
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2949
- ErrorMessage: smithy_client_1.expectString,
2950
- Name: smithy_client_1.expectString,
2951
- SecretsManagerArn: smithy_client_1.expectString,
2952
- ServerConfiguration: smithy_client_1._json,
2953
- StorageSystemArn: smithy_client_1.expectString,
2954
- SystemType: smithy_client_1.expectString,
2955
- });
2956
- };
2957
- const de_DescribeTaskExecutionResponse = (output, context) => {
2958
- return (0, smithy_client_1.take)(output, {
2959
- BytesCompressed: smithy_client_1.expectLong,
2960
- BytesTransferred: smithy_client_1.expectLong,
2961
- BytesWritten: smithy_client_1.expectLong,
2962
- EstimatedBytesToTransfer: smithy_client_1.expectLong,
2963
- EstimatedFilesToDelete: smithy_client_1.expectLong,
2964
- EstimatedFilesToTransfer: smithy_client_1.expectLong,
2965
- Excludes: smithy_client_1._json,
2966
- FilesDeleted: smithy_client_1.expectLong,
2967
- FilesSkipped: smithy_client_1.expectLong,
2968
- FilesTransferred: smithy_client_1.expectLong,
2969
- FilesVerified: smithy_client_1.expectLong,
2970
- Includes: smithy_client_1._json,
2971
- Options: smithy_client_1._json,
2972
- ReportResult: smithy_client_1._json,
2973
- Result: smithy_client_1._json,
2974
- StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2975
- Status: smithy_client_1.expectString,
2976
- TaskExecutionArn: smithy_client_1.expectString,
2977
- TaskReportConfig: smithy_client_1._json,
2978
- });
2979
- };
2980
- const de_DescribeTaskResponse = (output, context) => {
2981
- return (0, smithy_client_1.take)(output, {
2982
- CloudWatchLogGroupArn: smithy_client_1.expectString,
2983
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2984
- CurrentTaskExecutionArn: smithy_client_1.expectString,
2985
- DestinationLocationArn: smithy_client_1.expectString,
2986
- DestinationNetworkInterfaceArns: smithy_client_1._json,
2987
- ErrorCode: smithy_client_1.expectString,
2988
- ErrorDetail: smithy_client_1.expectString,
2989
- Excludes: smithy_client_1._json,
2990
- Includes: smithy_client_1._json,
2991
- Name: smithy_client_1.expectString,
2992
- Options: smithy_client_1._json,
2993
- Schedule: smithy_client_1._json,
2994
- SourceLocationArn: smithy_client_1.expectString,
2995
- SourceNetworkInterfaceArns: smithy_client_1._json,
2996
- Status: smithy_client_1.expectString,
2997
- TaskArn: smithy_client_1.expectString,
2998
- TaskReportConfig: smithy_client_1._json,
2999
- });
3000
- };
3001
- const de_IOPS = (output, context) => {
3002
- return (0, smithy_client_1.take)(output, {
3003
- Other: smithy_client_1.limitedParseDouble,
3004
- Read: smithy_client_1.limitedParseDouble,
3005
- Total: smithy_client_1.limitedParseDouble,
3006
- Write: smithy_client_1.limitedParseDouble,
3007
- });
3008
- };
3009
- const de_Latency = (output, context) => {
3010
- return (0, smithy_client_1.take)(output, {
3011
- Other: smithy_client_1.limitedParseDouble,
3012
- Read: smithy_client_1.limitedParseDouble,
3013
- Write: smithy_client_1.limitedParseDouble,
3014
- });
3015
- };
3016
- const de_MaxP95Performance = (output, context) => {
3017
- return (0, smithy_client_1.take)(output, {
3018
- IopsOther: smithy_client_1.limitedParseDouble,
3019
- IopsRead: smithy_client_1.limitedParseDouble,
3020
- IopsTotal: smithy_client_1.limitedParseDouble,
3021
- IopsWrite: smithy_client_1.limitedParseDouble,
3022
- LatencyOther: smithy_client_1.limitedParseDouble,
3023
- LatencyRead: smithy_client_1.limitedParseDouble,
3024
- LatencyWrite: smithy_client_1.limitedParseDouble,
3025
- ThroughputOther: smithy_client_1.limitedParseDouble,
3026
- ThroughputRead: smithy_client_1.limitedParseDouble,
3027
- ThroughputTotal: smithy_client_1.limitedParseDouble,
3028
- ThroughputWrite: smithy_client_1.limitedParseDouble,
3029
- });
3030
- };
3031
- const de_Metrics = (output, context) => {
3032
- const retVal = (output || [])
3033
- .filter((e) => e != null)
3034
- .map((entry) => {
3035
- return de_ResourceMetrics(entry, context);
3036
- });
3037
- return retVal;
3038
- };
3039
- const de_NetAppONTAPCluster = (output, context) => {
3040
- return (0, smithy_client_1.take)(output, {
3041
- CifsShareCount: smithy_client_1.expectLong,
3042
- ClusterBlockStorageLogicalUsed: smithy_client_1.expectLong,
3043
- ClusterBlockStorageSize: smithy_client_1.expectLong,
3044
- ClusterBlockStorageUsed: smithy_client_1.expectLong,
3045
- ClusterCloudStorageUsed: smithy_client_1.expectLong,
3046
- ClusterName: smithy_client_1.expectString,
3047
- LunCount: smithy_client_1.expectLong,
3048
- MaxP95Performance: (_) => de_MaxP95Performance(_, context),
3049
- NfsExportedVolumes: smithy_client_1.expectLong,
3050
- RecommendationStatus: smithy_client_1.expectString,
3051
- Recommendations: smithy_client_1._json,
3052
- ResourceId: smithy_client_1.expectString,
3053
- });
3054
- };
3055
- const de_NetAppONTAPClusters = (output, context) => {
3056
- const retVal = (output || [])
3057
- .filter((e) => e != null)
3058
- .map((entry) => {
3059
- return de_NetAppONTAPCluster(entry, context);
3060
- });
3061
- return retVal;
3062
- };
3063
- const de_NetAppONTAPSVM = (output, context) => {
3064
- return (0, smithy_client_1.take)(output, {
3065
- CifsShareCount: smithy_client_1.expectLong,
3066
- ClusterUuid: smithy_client_1.expectString,
3067
- EnabledProtocols: smithy_client_1._json,
3068
- LunCount: smithy_client_1.expectLong,
3069
- MaxP95Performance: (_) => de_MaxP95Performance(_, context),
3070
- NfsExportedVolumes: smithy_client_1.expectLong,
3071
- RecommendationStatus: smithy_client_1.expectString,
3072
- Recommendations: smithy_client_1._json,
3073
- ResourceId: smithy_client_1.expectString,
3074
- SvmName: smithy_client_1.expectString,
3075
- TotalCapacityProvisioned: smithy_client_1.expectLong,
3076
- TotalCapacityUsed: smithy_client_1.expectLong,
3077
- TotalLogicalCapacityUsed: smithy_client_1.expectLong,
3078
- TotalSnapshotCapacityUsed: smithy_client_1.expectLong,
3079
- });
3080
- };
3081
- const de_NetAppONTAPSVMs = (output, context) => {
3082
- const retVal = (output || [])
3083
- .filter((e) => e != null)
3084
- .map((entry) => {
3085
- return de_NetAppONTAPSVM(entry, context);
3086
- });
3087
- return retVal;
3088
- };
3089
- const de_NetAppONTAPVolume = (output, context) => {
3090
- return (0, smithy_client_1.take)(output, {
3091
- CapacityProvisioned: smithy_client_1.expectLong,
3092
- CapacityUsed: smithy_client_1.expectLong,
3093
- CifsShareCount: smithy_client_1.expectLong,
3094
- LogicalCapacityUsed: smithy_client_1.expectLong,
3095
- LunCount: smithy_client_1.expectLong,
3096
- MaxP95Performance: (_) => de_MaxP95Performance(_, context),
3097
- NfsExported: smithy_client_1.expectBoolean,
3098
- RecommendationStatus: smithy_client_1.expectString,
3099
- Recommendations: smithy_client_1._json,
3100
- ResourceId: smithy_client_1.expectString,
3101
- SecurityStyle: smithy_client_1.expectString,
3102
- SnapshotCapacityUsed: smithy_client_1.expectLong,
3103
- SvmName: smithy_client_1.expectString,
3104
- SvmUuid: smithy_client_1.expectString,
3105
- VolumeName: smithy_client_1.expectString,
3106
- });
3107
- };
3108
- const de_NetAppONTAPVolumes = (output, context) => {
3109
- const retVal = (output || [])
3110
- .filter((e) => e != null)
3111
- .map((entry) => {
3112
- return de_NetAppONTAPVolume(entry, context);
3113
- });
3114
- return retVal;
3115
- };
3116
- const de_P95Metrics = (output, context) => {
3117
- return (0, smithy_client_1.take)(output, {
3118
- IOPS: (_) => de_IOPS(_, context),
3119
- Latency: (_) => de_Latency(_, context),
3120
- Throughput: (_) => de_Throughput(_, context),
3121
- });
3122
- };
3123
- const de_ResourceDetails = (output, context) => {
3124
- return (0, smithy_client_1.take)(output, {
3125
- NetAppONTAPClusters: (_) => de_NetAppONTAPClusters(_, context),
3126
- NetAppONTAPSVMs: (_) => de_NetAppONTAPSVMs(_, context),
3127
- NetAppONTAPVolumes: (_) => de_NetAppONTAPVolumes(_, context),
3128
- });
3129
- };
3130
- const de_ResourceMetrics = (output, context) => {
3131
- return (0, smithy_client_1.take)(output, {
3132
- Capacity: smithy_client_1._json,
3133
- P95Metrics: (_) => de_P95Metrics(_, context),
3134
- ResourceId: smithy_client_1.expectString,
3135
- ResourceType: smithy_client_1.expectString,
3136
- Timestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3137
- });
3138
- };
3139
- const de_Throughput = (output, context) => {
3140
- return (0, smithy_client_1.take)(output, {
3141
- Other: smithy_client_1.limitedParseDouble,
3142
- Read: smithy_client_1.limitedParseDouble,
3143
- Total: smithy_client_1.limitedParseDouble,
3144
- Write: smithy_client_1.limitedParseDouble,
3145
- });
3146
- };
3147
- const deserializeMetadata = (output) => ({
3148
- httpStatusCode: output.statusCode,
3149
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
3150
- extendedRequestId: output.headers["x-amz-id-2"],
3151
- cfId: output.headers["x-amz-cf-id"],
3152
- });
3153
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
3154
- const throwDefaultError = (0, smithy_client_1.withBaseException)(DataSyncServiceException_1.DataSyncServiceException);
3155
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
3156
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3157
- const contents = {
3158
- protocol,
3159
- hostname,
3160
- port,
3161
- method: "POST",
3162
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
3163
- headers,
3164
- };
3165
- if (resolvedHostname !== undefined) {
3166
- contents.hostname = resolvedHostname;
3167
- }
3168
- if (body !== undefined) {
3169
- contents.body = body;
3170
- }
3171
- return new protocol_http_1.HttpRequest(contents);
3172
- };
3173
- function sharedHeaders(operation) {
3174
- return {
3175
- "content-type": "application/x-amz-json-1.1",
3176
- "x-amz-target": `FmrsService.${operation}`,
3177
- };
3178
- }
3179
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
3180
- if (encoded.length) {
3181
- return JSON.parse(encoded);
3182
- }
3183
- return {};
3184
- });
3185
- const parseErrorBody = async (errorBody, context) => {
3186
- const value = await parseBody(errorBody, context);
3187
- value.message = value.message ?? value.Message;
3188
- return value;
3189
- };
3190
- const loadRestJsonErrorCode = (output, data) => {
3191
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3192
- const sanitizeErrorCode = (rawValue) => {
3193
- let cleanValue = rawValue;
3194
- if (typeof cleanValue === "number") {
3195
- cleanValue = cleanValue.toString();
3196
- }
3197
- if (cleanValue.indexOf(",") >= 0) {
3198
- cleanValue = cleanValue.split(",")[0];
3199
- }
3200
- if (cleanValue.indexOf(":") >= 0) {
3201
- cleanValue = cleanValue.split(":")[0];
3202
- }
3203
- if (cleanValue.indexOf("#") >= 0) {
3204
- cleanValue = cleanValue.split("#")[1];
3205
- }
3206
- return cleanValue;
3207
- };
3208
- const headerKey = findKey(output.headers, "x-amzn-errortype");
3209
- if (headerKey !== undefined) {
3210
- return sanitizeErrorCode(output.headers[headerKey]);
3211
- }
3212
- if (data.code !== undefined) {
3213
- return sanitizeErrorCode(data.code);
3214
- }
3215
- if (data["__type"] !== undefined) {
3216
- return sanitizeErrorCode(data["__type"]);
3217
- }
3218
- };
1
+ module.exports = require("../index.js");