@aws-sdk/client-clouddirectory 3.504.0 → 3.509.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -2117,7 +2117,7 @@ var se_UpgradePublishedSchemaCommand = /* @__PURE__ */ __name(async (input, cont
2117
2117
  }, "se_UpgradePublishedSchemaCommand");
2118
2118
  var de_AddFacetToObjectCommand = /* @__PURE__ */ __name(async (output, context) => {
2119
2119
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2120
- return de_AddFacetToObjectCommandError(output, context);
2120
+ return de_CommandError(output, context);
2121
2121
  }
2122
2122
  const contents = (0, import_smithy_client.map)({
2123
2123
  $metadata: deserializeMetadata(output)
@@ -2125,52 +2125,9 @@ var de_AddFacetToObjectCommand = /* @__PURE__ */ __name(async (output, context)
2125
2125
  await (0, import_smithy_client.collectBody)(output.body, context);
2126
2126
  return contents;
2127
2127
  }, "de_AddFacetToObjectCommand");
2128
- var de_AddFacetToObjectCommandError = /* @__PURE__ */ __name(async (output, context) => {
2129
- const parsedOutput = {
2130
- ...output,
2131
- body: await parseErrorBody(output.body, context)
2132
- };
2133
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2134
- switch (errorCode) {
2135
- case "AccessDeniedException":
2136
- case "com.amazonaws.clouddirectory#AccessDeniedException":
2137
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2138
- case "DirectoryNotEnabledException":
2139
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
2140
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
2141
- case "FacetValidationException":
2142
- case "com.amazonaws.clouddirectory#FacetValidationException":
2143
- throw await de_FacetValidationExceptionRes(parsedOutput, context);
2144
- case "InternalServiceException":
2145
- case "com.amazonaws.clouddirectory#InternalServiceException":
2146
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
2147
- case "InvalidArnException":
2148
- case "com.amazonaws.clouddirectory#InvalidArnException":
2149
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
2150
- case "LimitExceededException":
2151
- case "com.amazonaws.clouddirectory#LimitExceededException":
2152
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2153
- case "ResourceNotFoundException":
2154
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
2155
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2156
- case "RetryableConflictException":
2157
- case "com.amazonaws.clouddirectory#RetryableConflictException":
2158
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
2159
- case "ValidationException":
2160
- case "com.amazonaws.clouddirectory#ValidationException":
2161
- throw await de_ValidationExceptionRes(parsedOutput, context);
2162
- default:
2163
- const parsedBody = parsedOutput.body;
2164
- return throwDefaultError({
2165
- output,
2166
- parsedBody,
2167
- errorCode
2168
- });
2169
- }
2170
- }, "de_AddFacetToObjectCommandError");
2171
2128
  var de_ApplySchemaCommand = /* @__PURE__ */ __name(async (output, context) => {
2172
2129
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2173
- return de_ApplySchemaCommandError(output, context);
2130
+ return de_CommandError(output, context);
2174
2131
  }
2175
2132
  const contents = (0, import_smithy_client.map)({
2176
2133
  $metadata: deserializeMetadata(output)
@@ -2183,52 +2140,9 @@ var de_ApplySchemaCommand = /* @__PURE__ */ __name(async (output, context) => {
2183
2140
  Object.assign(contents, doc);
2184
2141
  return contents;
2185
2142
  }, "de_ApplySchemaCommand");
2186
- var de_ApplySchemaCommandError = /* @__PURE__ */ __name(async (output, context) => {
2187
- const parsedOutput = {
2188
- ...output,
2189
- body: await parseErrorBody(output.body, context)
2190
- };
2191
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2192
- switch (errorCode) {
2193
- case "AccessDeniedException":
2194
- case "com.amazonaws.clouddirectory#AccessDeniedException":
2195
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2196
- case "InternalServiceException":
2197
- case "com.amazonaws.clouddirectory#InternalServiceException":
2198
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
2199
- case "InvalidArnException":
2200
- case "com.amazonaws.clouddirectory#InvalidArnException":
2201
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
2202
- case "InvalidAttachmentException":
2203
- case "com.amazonaws.clouddirectory#InvalidAttachmentException":
2204
- throw await de_InvalidAttachmentExceptionRes(parsedOutput, context);
2205
- case "LimitExceededException":
2206
- case "com.amazonaws.clouddirectory#LimitExceededException":
2207
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2208
- case "ResourceNotFoundException":
2209
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
2210
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2211
- case "RetryableConflictException":
2212
- case "com.amazonaws.clouddirectory#RetryableConflictException":
2213
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
2214
- case "SchemaAlreadyExistsException":
2215
- case "com.amazonaws.clouddirectory#SchemaAlreadyExistsException":
2216
- throw await de_SchemaAlreadyExistsExceptionRes(parsedOutput, context);
2217
- case "ValidationException":
2218
- case "com.amazonaws.clouddirectory#ValidationException":
2219
- throw await de_ValidationExceptionRes(parsedOutput, context);
2220
- default:
2221
- const parsedBody = parsedOutput.body;
2222
- return throwDefaultError({
2223
- output,
2224
- parsedBody,
2225
- errorCode
2226
- });
2227
- }
2228
- }, "de_ApplySchemaCommandError");
2229
2143
  var de_AttachObjectCommand = /* @__PURE__ */ __name(async (output, context) => {
2230
2144
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2231
- return de_AttachObjectCommandError(output, context);
2145
+ return de_CommandError(output, context);
2232
2146
  }
2233
2147
  const contents = (0, import_smithy_client.map)({
2234
2148
  $metadata: deserializeMetadata(output)
@@ -2240,58 +2154,9 @@ var de_AttachObjectCommand = /* @__PURE__ */ __name(async (output, context) => {
2240
2154
  Object.assign(contents, doc);
2241
2155
  return contents;
2242
2156
  }, "de_AttachObjectCommand");
2243
- var de_AttachObjectCommandError = /* @__PURE__ */ __name(async (output, context) => {
2244
- const parsedOutput = {
2245
- ...output,
2246
- body: await parseErrorBody(output.body, context)
2247
- };
2248
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2249
- switch (errorCode) {
2250
- case "AccessDeniedException":
2251
- case "com.amazonaws.clouddirectory#AccessDeniedException":
2252
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2253
- case "DirectoryNotEnabledException":
2254
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
2255
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
2256
- case "FacetValidationException":
2257
- case "com.amazonaws.clouddirectory#FacetValidationException":
2258
- throw await de_FacetValidationExceptionRes(parsedOutput, context);
2259
- case "InternalServiceException":
2260
- case "com.amazonaws.clouddirectory#InternalServiceException":
2261
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
2262
- case "InvalidArnException":
2263
- case "com.amazonaws.clouddirectory#InvalidArnException":
2264
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
2265
- case "InvalidAttachmentException":
2266
- case "com.amazonaws.clouddirectory#InvalidAttachmentException":
2267
- throw await de_InvalidAttachmentExceptionRes(parsedOutput, context);
2268
- case "LimitExceededException":
2269
- case "com.amazonaws.clouddirectory#LimitExceededException":
2270
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2271
- case "LinkNameAlreadyInUseException":
2272
- case "com.amazonaws.clouddirectory#LinkNameAlreadyInUseException":
2273
- throw await de_LinkNameAlreadyInUseExceptionRes(parsedOutput, context);
2274
- case "ResourceNotFoundException":
2275
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
2276
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2277
- case "RetryableConflictException":
2278
- case "com.amazonaws.clouddirectory#RetryableConflictException":
2279
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
2280
- case "ValidationException":
2281
- case "com.amazonaws.clouddirectory#ValidationException":
2282
- throw await de_ValidationExceptionRes(parsedOutput, context);
2283
- default:
2284
- const parsedBody = parsedOutput.body;
2285
- return throwDefaultError({
2286
- output,
2287
- parsedBody,
2288
- errorCode
2289
- });
2290
- }
2291
- }, "de_AttachObjectCommandError");
2292
2157
  var de_AttachPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
2293
2158
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2294
- return de_AttachPolicyCommandError(output, context);
2159
+ return de_CommandError(output, context);
2295
2160
  }
2296
2161
  const contents = (0, import_smithy_client.map)({
2297
2162
  $metadata: deserializeMetadata(output)
@@ -2299,52 +2164,9 @@ var de_AttachPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
2299
2164
  await (0, import_smithy_client.collectBody)(output.body, context);
2300
2165
  return contents;
2301
2166
  }, "de_AttachPolicyCommand");
2302
- var de_AttachPolicyCommandError = /* @__PURE__ */ __name(async (output, context) => {
2303
- const parsedOutput = {
2304
- ...output,
2305
- body: await parseErrorBody(output.body, context)
2306
- };
2307
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2308
- switch (errorCode) {
2309
- case "AccessDeniedException":
2310
- case "com.amazonaws.clouddirectory#AccessDeniedException":
2311
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2312
- case "DirectoryNotEnabledException":
2313
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
2314
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
2315
- case "InternalServiceException":
2316
- case "com.amazonaws.clouddirectory#InternalServiceException":
2317
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
2318
- case "InvalidArnException":
2319
- case "com.amazonaws.clouddirectory#InvalidArnException":
2320
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
2321
- case "LimitExceededException":
2322
- case "com.amazonaws.clouddirectory#LimitExceededException":
2323
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2324
- case "NotPolicyException":
2325
- case "com.amazonaws.clouddirectory#NotPolicyException":
2326
- throw await de_NotPolicyExceptionRes(parsedOutput, context);
2327
- case "ResourceNotFoundException":
2328
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
2329
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2330
- case "RetryableConflictException":
2331
- case "com.amazonaws.clouddirectory#RetryableConflictException":
2332
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
2333
- case "ValidationException":
2334
- case "com.amazonaws.clouddirectory#ValidationException":
2335
- throw await de_ValidationExceptionRes(parsedOutput, context);
2336
- default:
2337
- const parsedBody = parsedOutput.body;
2338
- return throwDefaultError({
2339
- output,
2340
- parsedBody,
2341
- errorCode
2342
- });
2343
- }
2344
- }, "de_AttachPolicyCommandError");
2345
2167
  var de_AttachToIndexCommand = /* @__PURE__ */ __name(async (output, context) => {
2346
2168
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2347
- return de_AttachToIndexCommandError(output, context);
2169
+ return de_CommandError(output, context);
2348
2170
  }
2349
2171
  const contents = (0, import_smithy_client.map)({
2350
2172
  $metadata: deserializeMetadata(output)
@@ -2356,61 +2178,9 @@ var de_AttachToIndexCommand = /* @__PURE__ */ __name(async (output, context) =>
2356
2178
  Object.assign(contents, doc);
2357
2179
  return contents;
2358
2180
  }, "de_AttachToIndexCommand");
2359
- var de_AttachToIndexCommandError = /* @__PURE__ */ __name(async (output, context) => {
2360
- const parsedOutput = {
2361
- ...output,
2362
- body: await parseErrorBody(output.body, context)
2363
- };
2364
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2365
- switch (errorCode) {
2366
- case "AccessDeniedException":
2367
- case "com.amazonaws.clouddirectory#AccessDeniedException":
2368
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2369
- case "DirectoryNotEnabledException":
2370
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
2371
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
2372
- case "IndexedAttributeMissingException":
2373
- case "com.amazonaws.clouddirectory#IndexedAttributeMissingException":
2374
- throw await de_IndexedAttributeMissingExceptionRes(parsedOutput, context);
2375
- case "InternalServiceException":
2376
- case "com.amazonaws.clouddirectory#InternalServiceException":
2377
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
2378
- case "InvalidArnException":
2379
- case "com.amazonaws.clouddirectory#InvalidArnException":
2380
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
2381
- case "InvalidAttachmentException":
2382
- case "com.amazonaws.clouddirectory#InvalidAttachmentException":
2383
- throw await de_InvalidAttachmentExceptionRes(parsedOutput, context);
2384
- case "LimitExceededException":
2385
- case "com.amazonaws.clouddirectory#LimitExceededException":
2386
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2387
- case "LinkNameAlreadyInUseException":
2388
- case "com.amazonaws.clouddirectory#LinkNameAlreadyInUseException":
2389
- throw await de_LinkNameAlreadyInUseExceptionRes(parsedOutput, context);
2390
- case "NotIndexException":
2391
- case "com.amazonaws.clouddirectory#NotIndexException":
2392
- throw await de_NotIndexExceptionRes(parsedOutput, context);
2393
- case "ResourceNotFoundException":
2394
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
2395
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2396
- case "RetryableConflictException":
2397
- case "com.amazonaws.clouddirectory#RetryableConflictException":
2398
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
2399
- case "ValidationException":
2400
- case "com.amazonaws.clouddirectory#ValidationException":
2401
- throw await de_ValidationExceptionRes(parsedOutput, context);
2402
- default:
2403
- const parsedBody = parsedOutput.body;
2404
- return throwDefaultError({
2405
- output,
2406
- parsedBody,
2407
- errorCode
2408
- });
2409
- }
2410
- }, "de_AttachToIndexCommandError");
2411
2181
  var de_AttachTypedLinkCommand = /* @__PURE__ */ __name(async (output, context) => {
2412
2182
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2413
- return de_AttachTypedLinkCommandError(output, context);
2183
+ return de_CommandError(output, context);
2414
2184
  }
2415
2185
  const contents = (0, import_smithy_client.map)({
2416
2186
  $metadata: deserializeMetadata(output)
@@ -2422,55 +2192,9 @@ var de_AttachTypedLinkCommand = /* @__PURE__ */ __name(async (output, context) =
2422
2192
  Object.assign(contents, doc);
2423
2193
  return contents;
2424
2194
  }, "de_AttachTypedLinkCommand");
2425
- var de_AttachTypedLinkCommandError = /* @__PURE__ */ __name(async (output, context) => {
2426
- const parsedOutput = {
2427
- ...output,
2428
- body: await parseErrorBody(output.body, context)
2429
- };
2430
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2431
- switch (errorCode) {
2432
- case "AccessDeniedException":
2433
- case "com.amazonaws.clouddirectory#AccessDeniedException":
2434
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2435
- case "DirectoryNotEnabledException":
2436
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
2437
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
2438
- case "FacetValidationException":
2439
- case "com.amazonaws.clouddirectory#FacetValidationException":
2440
- throw await de_FacetValidationExceptionRes(parsedOutput, context);
2441
- case "InternalServiceException":
2442
- case "com.amazonaws.clouddirectory#InternalServiceException":
2443
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
2444
- case "InvalidArnException":
2445
- case "com.amazonaws.clouddirectory#InvalidArnException":
2446
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
2447
- case "InvalidAttachmentException":
2448
- case "com.amazonaws.clouddirectory#InvalidAttachmentException":
2449
- throw await de_InvalidAttachmentExceptionRes(parsedOutput, context);
2450
- case "LimitExceededException":
2451
- case "com.amazonaws.clouddirectory#LimitExceededException":
2452
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2453
- case "ResourceNotFoundException":
2454
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
2455
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2456
- case "RetryableConflictException":
2457
- case "com.amazonaws.clouddirectory#RetryableConflictException":
2458
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
2459
- case "ValidationException":
2460
- case "com.amazonaws.clouddirectory#ValidationException":
2461
- throw await de_ValidationExceptionRes(parsedOutput, context);
2462
- default:
2463
- const parsedBody = parsedOutput.body;
2464
- return throwDefaultError({
2465
- output,
2466
- parsedBody,
2467
- errorCode
2468
- });
2469
- }
2470
- }, "de_AttachTypedLinkCommandError");
2471
2195
  var de_BatchReadCommand = /* @__PURE__ */ __name(async (output, context) => {
2472
2196
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2473
- return de_BatchReadCommandError(output, context);
2197
+ return de_CommandError(output, context);
2474
2198
  }
2475
2199
  const contents = (0, import_smithy_client.map)({
2476
2200
  $metadata: deserializeMetadata(output)
@@ -2482,46 +2206,9 @@ var de_BatchReadCommand = /* @__PURE__ */ __name(async (output, context) => {
2482
2206
  Object.assign(contents, doc);
2483
2207
  return contents;
2484
2208
  }, "de_BatchReadCommand");
2485
- var de_BatchReadCommandError = /* @__PURE__ */ __name(async (output, context) => {
2486
- const parsedOutput = {
2487
- ...output,
2488
- body: await parseErrorBody(output.body, context)
2489
- };
2490
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2491
- switch (errorCode) {
2492
- case "AccessDeniedException":
2493
- case "com.amazonaws.clouddirectory#AccessDeniedException":
2494
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2495
- case "DirectoryNotEnabledException":
2496
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
2497
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
2498
- case "InternalServiceException":
2499
- case "com.amazonaws.clouddirectory#InternalServiceException":
2500
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
2501
- case "InvalidArnException":
2502
- case "com.amazonaws.clouddirectory#InvalidArnException":
2503
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
2504
- case "LimitExceededException":
2505
- case "com.amazonaws.clouddirectory#LimitExceededException":
2506
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2507
- case "RetryableConflictException":
2508
- case "com.amazonaws.clouddirectory#RetryableConflictException":
2509
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
2510
- case "ValidationException":
2511
- case "com.amazonaws.clouddirectory#ValidationException":
2512
- throw await de_ValidationExceptionRes(parsedOutput, context);
2513
- default:
2514
- const parsedBody = parsedOutput.body;
2515
- return throwDefaultError({
2516
- output,
2517
- parsedBody,
2518
- errorCode
2519
- });
2520
- }
2521
- }, "de_BatchReadCommandError");
2522
2209
  var de_BatchWriteCommand = /* @__PURE__ */ __name(async (output, context) => {
2523
2210
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2524
- return de_BatchWriteCommandError(output, context);
2211
+ return de_CommandError(output, context);
2525
2212
  }
2526
2213
  const contents = (0, import_smithy_client.map)({
2527
2214
  $metadata: deserializeMetadata(output)
@@ -2533,49 +2220,9 @@ var de_BatchWriteCommand = /* @__PURE__ */ __name(async (output, context) => {
2533
2220
  Object.assign(contents, doc);
2534
2221
  return contents;
2535
2222
  }, "de_BatchWriteCommand");
2536
- var de_BatchWriteCommandError = /* @__PURE__ */ __name(async (output, context) => {
2537
- const parsedOutput = {
2538
- ...output,
2539
- body: await parseErrorBody(output.body, context)
2540
- };
2541
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2542
- switch (errorCode) {
2543
- case "AccessDeniedException":
2544
- case "com.amazonaws.clouddirectory#AccessDeniedException":
2545
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2546
- case "BatchWriteException":
2547
- case "com.amazonaws.clouddirectory#BatchWriteException":
2548
- throw await de_BatchWriteExceptionRes(parsedOutput, context);
2549
- case "DirectoryNotEnabledException":
2550
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
2551
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
2552
- case "InternalServiceException":
2553
- case "com.amazonaws.clouddirectory#InternalServiceException":
2554
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
2555
- case "InvalidArnException":
2556
- case "com.amazonaws.clouddirectory#InvalidArnException":
2557
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
2558
- case "LimitExceededException":
2559
- case "com.amazonaws.clouddirectory#LimitExceededException":
2560
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2561
- case "RetryableConflictException":
2562
- case "com.amazonaws.clouddirectory#RetryableConflictException":
2563
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
2564
- case "ValidationException":
2565
- case "com.amazonaws.clouddirectory#ValidationException":
2566
- throw await de_ValidationExceptionRes(parsedOutput, context);
2567
- default:
2568
- const parsedBody = parsedOutput.body;
2569
- return throwDefaultError({
2570
- output,
2571
- parsedBody,
2572
- errorCode
2573
- });
2574
- }
2575
- }, "de_BatchWriteCommandError");
2576
2223
  var de_CreateDirectoryCommand = /* @__PURE__ */ __name(async (output, context) => {
2577
2224
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2578
- return de_CreateDirectoryCommandError(output, context);
2225
+ return de_CommandError(output, context);
2579
2226
  }
2580
2227
  const contents = (0, import_smithy_client.map)({
2581
2228
  $metadata: deserializeMetadata(output)
@@ -2590,49 +2237,9 @@ var de_CreateDirectoryCommand = /* @__PURE__ */ __name(async (output, context) =
2590
2237
  Object.assign(contents, doc);
2591
2238
  return contents;
2592
2239
  }, "de_CreateDirectoryCommand");
2593
- var de_CreateDirectoryCommandError = /* @__PURE__ */ __name(async (output, context) => {
2594
- const parsedOutput = {
2595
- ...output,
2596
- body: await parseErrorBody(output.body, context)
2597
- };
2598
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2599
- switch (errorCode) {
2600
- case "AccessDeniedException":
2601
- case "com.amazonaws.clouddirectory#AccessDeniedException":
2602
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2603
- case "DirectoryAlreadyExistsException":
2604
- case "com.amazonaws.clouddirectory#DirectoryAlreadyExistsException":
2605
- throw await de_DirectoryAlreadyExistsExceptionRes(parsedOutput, context);
2606
- case "InternalServiceException":
2607
- case "com.amazonaws.clouddirectory#InternalServiceException":
2608
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
2609
- case "InvalidArnException":
2610
- case "com.amazonaws.clouddirectory#InvalidArnException":
2611
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
2612
- case "LimitExceededException":
2613
- case "com.amazonaws.clouddirectory#LimitExceededException":
2614
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2615
- case "ResourceNotFoundException":
2616
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
2617
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2618
- case "RetryableConflictException":
2619
- case "com.amazonaws.clouddirectory#RetryableConflictException":
2620
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
2621
- case "ValidationException":
2622
- case "com.amazonaws.clouddirectory#ValidationException":
2623
- throw await de_ValidationExceptionRes(parsedOutput, context);
2624
- default:
2625
- const parsedBody = parsedOutput.body;
2626
- return throwDefaultError({
2627
- output,
2628
- parsedBody,
2629
- errorCode
2630
- });
2631
- }
2632
- }, "de_CreateDirectoryCommandError");
2633
2240
  var de_CreateFacetCommand = /* @__PURE__ */ __name(async (output, context) => {
2634
2241
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2635
- return de_CreateFacetCommandError(output, context);
2242
+ return de_CommandError(output, context);
2636
2243
  }
2637
2244
  const contents = (0, import_smithy_client.map)({
2638
2245
  $metadata: deserializeMetadata(output)
@@ -2640,55 +2247,9 @@ var de_CreateFacetCommand = /* @__PURE__ */ __name(async (output, context) => {
2640
2247
  await (0, import_smithy_client.collectBody)(output.body, context);
2641
2248
  return contents;
2642
2249
  }, "de_CreateFacetCommand");
2643
- var de_CreateFacetCommandError = /* @__PURE__ */ __name(async (output, context) => {
2644
- const parsedOutput = {
2645
- ...output,
2646
- body: await parseErrorBody(output.body, context)
2647
- };
2648
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2649
- switch (errorCode) {
2650
- case "AccessDeniedException":
2651
- case "com.amazonaws.clouddirectory#AccessDeniedException":
2652
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2653
- case "FacetAlreadyExistsException":
2654
- case "com.amazonaws.clouddirectory#FacetAlreadyExistsException":
2655
- throw await de_FacetAlreadyExistsExceptionRes(parsedOutput, context);
2656
- case "FacetValidationException":
2657
- case "com.amazonaws.clouddirectory#FacetValidationException":
2658
- throw await de_FacetValidationExceptionRes(parsedOutput, context);
2659
- case "InternalServiceException":
2660
- case "com.amazonaws.clouddirectory#InternalServiceException":
2661
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
2662
- case "InvalidArnException":
2663
- case "com.amazonaws.clouddirectory#InvalidArnException":
2664
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
2665
- case "InvalidRuleException":
2666
- case "com.amazonaws.clouddirectory#InvalidRuleException":
2667
- throw await de_InvalidRuleExceptionRes(parsedOutput, context);
2668
- case "LimitExceededException":
2669
- case "com.amazonaws.clouddirectory#LimitExceededException":
2670
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2671
- case "ResourceNotFoundException":
2672
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
2673
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2674
- case "RetryableConflictException":
2675
- case "com.amazonaws.clouddirectory#RetryableConflictException":
2676
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
2677
- case "ValidationException":
2678
- case "com.amazonaws.clouddirectory#ValidationException":
2679
- throw await de_ValidationExceptionRes(parsedOutput, context);
2680
- default:
2681
- const parsedBody = parsedOutput.body;
2682
- return throwDefaultError({
2683
- output,
2684
- parsedBody,
2685
- errorCode
2686
- });
2687
- }
2688
- }, "de_CreateFacetCommandError");
2689
2250
  var de_CreateIndexCommand = /* @__PURE__ */ __name(async (output, context) => {
2690
2251
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2691
- return de_CreateIndexCommandError(output, context);
2252
+ return de_CommandError(output, context);
2692
2253
  }
2693
2254
  const contents = (0, import_smithy_client.map)({
2694
2255
  $metadata: deserializeMetadata(output)
@@ -2700,58 +2261,9 @@ var de_CreateIndexCommand = /* @__PURE__ */ __name(async (output, context) => {
2700
2261
  Object.assign(contents, doc);
2701
2262
  return contents;
2702
2263
  }, "de_CreateIndexCommand");
2703
- var de_CreateIndexCommandError = /* @__PURE__ */ __name(async (output, context) => {
2704
- const parsedOutput = {
2705
- ...output,
2706
- body: await parseErrorBody(output.body, context)
2707
- };
2708
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2709
- switch (errorCode) {
2710
- case "AccessDeniedException":
2711
- case "com.amazonaws.clouddirectory#AccessDeniedException":
2712
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2713
- case "DirectoryNotEnabledException":
2714
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
2715
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
2716
- case "FacetValidationException":
2717
- case "com.amazonaws.clouddirectory#FacetValidationException":
2718
- throw await de_FacetValidationExceptionRes(parsedOutput, context);
2719
- case "InternalServiceException":
2720
- case "com.amazonaws.clouddirectory#InternalServiceException":
2721
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
2722
- case "InvalidArnException":
2723
- case "com.amazonaws.clouddirectory#InvalidArnException":
2724
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
2725
- case "LimitExceededException":
2726
- case "com.amazonaws.clouddirectory#LimitExceededException":
2727
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2728
- case "LinkNameAlreadyInUseException":
2729
- case "com.amazonaws.clouddirectory#LinkNameAlreadyInUseException":
2730
- throw await de_LinkNameAlreadyInUseExceptionRes(parsedOutput, context);
2731
- case "ResourceNotFoundException":
2732
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
2733
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2734
- case "RetryableConflictException":
2735
- case "com.amazonaws.clouddirectory#RetryableConflictException":
2736
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
2737
- case "UnsupportedIndexTypeException":
2738
- case "com.amazonaws.clouddirectory#UnsupportedIndexTypeException":
2739
- throw await de_UnsupportedIndexTypeExceptionRes(parsedOutput, context);
2740
- case "ValidationException":
2741
- case "com.amazonaws.clouddirectory#ValidationException":
2742
- throw await de_ValidationExceptionRes(parsedOutput, context);
2743
- default:
2744
- const parsedBody = parsedOutput.body;
2745
- return throwDefaultError({
2746
- output,
2747
- parsedBody,
2748
- errorCode
2749
- });
2750
- }
2751
- }, "de_CreateIndexCommandError");
2752
2264
  var de_CreateObjectCommand = /* @__PURE__ */ __name(async (output, context) => {
2753
2265
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2754
- return de_CreateObjectCommandError(output, context);
2266
+ return de_CommandError(output, context);
2755
2267
  }
2756
2268
  const contents = (0, import_smithy_client.map)({
2757
2269
  $metadata: deserializeMetadata(output)
@@ -2763,58 +2275,9 @@ var de_CreateObjectCommand = /* @__PURE__ */ __name(async (output, context) => {
2763
2275
  Object.assign(contents, doc);
2764
2276
  return contents;
2765
2277
  }, "de_CreateObjectCommand");
2766
- var de_CreateObjectCommandError = /* @__PURE__ */ __name(async (output, context) => {
2767
- const parsedOutput = {
2768
- ...output,
2769
- body: await parseErrorBody(output.body, context)
2770
- };
2771
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2772
- switch (errorCode) {
2773
- case "AccessDeniedException":
2774
- case "com.amazonaws.clouddirectory#AccessDeniedException":
2775
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2776
- case "DirectoryNotEnabledException":
2777
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
2778
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
2779
- case "FacetValidationException":
2780
- case "com.amazonaws.clouddirectory#FacetValidationException":
2781
- throw await de_FacetValidationExceptionRes(parsedOutput, context);
2782
- case "InternalServiceException":
2783
- case "com.amazonaws.clouddirectory#InternalServiceException":
2784
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
2785
- case "InvalidArnException":
2786
- case "com.amazonaws.clouddirectory#InvalidArnException":
2787
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
2788
- case "LimitExceededException":
2789
- case "com.amazonaws.clouddirectory#LimitExceededException":
2790
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2791
- case "LinkNameAlreadyInUseException":
2792
- case "com.amazonaws.clouddirectory#LinkNameAlreadyInUseException":
2793
- throw await de_LinkNameAlreadyInUseExceptionRes(parsedOutput, context);
2794
- case "ResourceNotFoundException":
2795
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
2796
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2797
- case "RetryableConflictException":
2798
- case "com.amazonaws.clouddirectory#RetryableConflictException":
2799
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
2800
- case "UnsupportedIndexTypeException":
2801
- case "com.amazonaws.clouddirectory#UnsupportedIndexTypeException":
2802
- throw await de_UnsupportedIndexTypeExceptionRes(parsedOutput, context);
2803
- case "ValidationException":
2804
- case "com.amazonaws.clouddirectory#ValidationException":
2805
- throw await de_ValidationExceptionRes(parsedOutput, context);
2806
- default:
2807
- const parsedBody = parsedOutput.body;
2808
- return throwDefaultError({
2809
- output,
2810
- parsedBody,
2811
- errorCode
2812
- });
2813
- }
2814
- }, "de_CreateObjectCommandError");
2815
2278
  var de_CreateSchemaCommand = /* @__PURE__ */ __name(async (output, context) => {
2816
2279
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2817
- return de_CreateSchemaCommandError(output, context);
2280
+ return de_CommandError(output, context);
2818
2281
  }
2819
2282
  const contents = (0, import_smithy_client.map)({
2820
2283
  $metadata: deserializeMetadata(output)
@@ -2826,46 +2289,9 @@ var de_CreateSchemaCommand = /* @__PURE__ */ __name(async (output, context) => {
2826
2289
  Object.assign(contents, doc);
2827
2290
  return contents;
2828
2291
  }, "de_CreateSchemaCommand");
2829
- var de_CreateSchemaCommandError = /* @__PURE__ */ __name(async (output, context) => {
2830
- const parsedOutput = {
2831
- ...output,
2832
- body: await parseErrorBody(output.body, context)
2833
- };
2834
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2835
- switch (errorCode) {
2836
- case "AccessDeniedException":
2837
- case "com.amazonaws.clouddirectory#AccessDeniedException":
2838
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2839
- case "InternalServiceException":
2840
- case "com.amazonaws.clouddirectory#InternalServiceException":
2841
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
2842
- case "InvalidArnException":
2843
- case "com.amazonaws.clouddirectory#InvalidArnException":
2844
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
2845
- case "LimitExceededException":
2846
- case "com.amazonaws.clouddirectory#LimitExceededException":
2847
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2848
- case "RetryableConflictException":
2849
- case "com.amazonaws.clouddirectory#RetryableConflictException":
2850
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
2851
- case "SchemaAlreadyExistsException":
2852
- case "com.amazonaws.clouddirectory#SchemaAlreadyExistsException":
2853
- throw await de_SchemaAlreadyExistsExceptionRes(parsedOutput, context);
2854
- case "ValidationException":
2855
- case "com.amazonaws.clouddirectory#ValidationException":
2856
- throw await de_ValidationExceptionRes(parsedOutput, context);
2857
- default:
2858
- const parsedBody = parsedOutput.body;
2859
- return throwDefaultError({
2860
- output,
2861
- parsedBody,
2862
- errorCode
2863
- });
2864
- }
2865
- }, "de_CreateSchemaCommandError");
2866
2292
  var de_CreateTypedLinkFacetCommand = /* @__PURE__ */ __name(async (output, context) => {
2867
2293
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2868
- return de_CreateTypedLinkFacetCommandError(output, context);
2294
+ return de_CommandError(output, context);
2869
2295
  }
2870
2296
  const contents = (0, import_smithy_client.map)({
2871
2297
  $metadata: deserializeMetadata(output)
@@ -2873,55 +2299,9 @@ var de_CreateTypedLinkFacetCommand = /* @__PURE__ */ __name(async (output, conte
2873
2299
  await (0, import_smithy_client.collectBody)(output.body, context);
2874
2300
  return contents;
2875
2301
  }, "de_CreateTypedLinkFacetCommand");
2876
- var de_CreateTypedLinkFacetCommandError = /* @__PURE__ */ __name(async (output, context) => {
2877
- const parsedOutput = {
2878
- ...output,
2879
- body: await parseErrorBody(output.body, context)
2880
- };
2881
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2882
- switch (errorCode) {
2883
- case "AccessDeniedException":
2884
- case "com.amazonaws.clouddirectory#AccessDeniedException":
2885
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2886
- case "FacetAlreadyExistsException":
2887
- case "com.amazonaws.clouddirectory#FacetAlreadyExistsException":
2888
- throw await de_FacetAlreadyExistsExceptionRes(parsedOutput, context);
2889
- case "FacetValidationException":
2890
- case "com.amazonaws.clouddirectory#FacetValidationException":
2891
- throw await de_FacetValidationExceptionRes(parsedOutput, context);
2892
- case "InternalServiceException":
2893
- case "com.amazonaws.clouddirectory#InternalServiceException":
2894
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
2895
- case "InvalidArnException":
2896
- case "com.amazonaws.clouddirectory#InvalidArnException":
2897
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
2898
- case "InvalidRuleException":
2899
- case "com.amazonaws.clouddirectory#InvalidRuleException":
2900
- throw await de_InvalidRuleExceptionRes(parsedOutput, context);
2901
- case "LimitExceededException":
2902
- case "com.amazonaws.clouddirectory#LimitExceededException":
2903
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2904
- case "ResourceNotFoundException":
2905
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
2906
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2907
- case "RetryableConflictException":
2908
- case "com.amazonaws.clouddirectory#RetryableConflictException":
2909
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
2910
- case "ValidationException":
2911
- case "com.amazonaws.clouddirectory#ValidationException":
2912
- throw await de_ValidationExceptionRes(parsedOutput, context);
2913
- default:
2914
- const parsedBody = parsedOutput.body;
2915
- return throwDefaultError({
2916
- output,
2917
- parsedBody,
2918
- errorCode
2919
- });
2920
- }
2921
- }, "de_CreateTypedLinkFacetCommandError");
2922
2302
  var de_DeleteDirectoryCommand = /* @__PURE__ */ __name(async (output, context) => {
2923
2303
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2924
- return de_DeleteDirectoryCommandError(output, context);
2304
+ return de_CommandError(output, context);
2925
2305
  }
2926
2306
  const contents = (0, import_smithy_client.map)({
2927
2307
  $metadata: deserializeMetadata(output)
@@ -2933,52 +2313,9 @@ var de_DeleteDirectoryCommand = /* @__PURE__ */ __name(async (output, context) =
2933
2313
  Object.assign(contents, doc);
2934
2314
  return contents;
2935
2315
  }, "de_DeleteDirectoryCommand");
2936
- var de_DeleteDirectoryCommandError = /* @__PURE__ */ __name(async (output, context) => {
2937
- const parsedOutput = {
2938
- ...output,
2939
- body: await parseErrorBody(output.body, context)
2940
- };
2941
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2942
- switch (errorCode) {
2943
- case "AccessDeniedException":
2944
- case "com.amazonaws.clouddirectory#AccessDeniedException":
2945
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2946
- case "DirectoryDeletedException":
2947
- case "com.amazonaws.clouddirectory#DirectoryDeletedException":
2948
- throw await de_DirectoryDeletedExceptionRes(parsedOutput, context);
2949
- case "DirectoryNotDisabledException":
2950
- case "com.amazonaws.clouddirectory#DirectoryNotDisabledException":
2951
- throw await de_DirectoryNotDisabledExceptionRes(parsedOutput, context);
2952
- case "InternalServiceException":
2953
- case "com.amazonaws.clouddirectory#InternalServiceException":
2954
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
2955
- case "InvalidArnException":
2956
- case "com.amazonaws.clouddirectory#InvalidArnException":
2957
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
2958
- case "LimitExceededException":
2959
- case "com.amazonaws.clouddirectory#LimitExceededException":
2960
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2961
- case "ResourceNotFoundException":
2962
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
2963
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2964
- case "RetryableConflictException":
2965
- case "com.amazonaws.clouddirectory#RetryableConflictException":
2966
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
2967
- case "ValidationException":
2968
- case "com.amazonaws.clouddirectory#ValidationException":
2969
- throw await de_ValidationExceptionRes(parsedOutput, context);
2970
- default:
2971
- const parsedBody = parsedOutput.body;
2972
- return throwDefaultError({
2973
- output,
2974
- parsedBody,
2975
- errorCode
2976
- });
2977
- }
2978
- }, "de_DeleteDirectoryCommandError");
2979
2316
  var de_DeleteFacetCommand = /* @__PURE__ */ __name(async (output, context) => {
2980
2317
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2981
- return de_DeleteFacetCommandError(output, context);
2318
+ return de_CommandError(output, context);
2982
2319
  }
2983
2320
  const contents = (0, import_smithy_client.map)({
2984
2321
  $metadata: deserializeMetadata(output)
@@ -2986,52 +2323,9 @@ var de_DeleteFacetCommand = /* @__PURE__ */ __name(async (output, context) => {
2986
2323
  await (0, import_smithy_client.collectBody)(output.body, context);
2987
2324
  return contents;
2988
2325
  }, "de_DeleteFacetCommand");
2989
- var de_DeleteFacetCommandError = /* @__PURE__ */ __name(async (output, context) => {
2990
- const parsedOutput = {
2991
- ...output,
2992
- body: await parseErrorBody(output.body, context)
2993
- };
2994
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2995
- switch (errorCode) {
2996
- case "AccessDeniedException":
2997
- case "com.amazonaws.clouddirectory#AccessDeniedException":
2998
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2999
- case "FacetInUseException":
3000
- case "com.amazonaws.clouddirectory#FacetInUseException":
3001
- throw await de_FacetInUseExceptionRes(parsedOutput, context);
3002
- case "FacetNotFoundException":
3003
- case "com.amazonaws.clouddirectory#FacetNotFoundException":
3004
- throw await de_FacetNotFoundExceptionRes(parsedOutput, context);
3005
- case "InternalServiceException":
3006
- case "com.amazonaws.clouddirectory#InternalServiceException":
3007
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
3008
- case "InvalidArnException":
3009
- case "com.amazonaws.clouddirectory#InvalidArnException":
3010
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
3011
- case "LimitExceededException":
3012
- case "com.amazonaws.clouddirectory#LimitExceededException":
3013
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3014
- case "ResourceNotFoundException":
3015
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
3016
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3017
- case "RetryableConflictException":
3018
- case "com.amazonaws.clouddirectory#RetryableConflictException":
3019
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
3020
- case "ValidationException":
3021
- case "com.amazonaws.clouddirectory#ValidationException":
3022
- throw await de_ValidationExceptionRes(parsedOutput, context);
3023
- default:
3024
- const parsedBody = parsedOutput.body;
3025
- return throwDefaultError({
3026
- output,
3027
- parsedBody,
3028
- errorCode
3029
- });
3030
- }
3031
- }, "de_DeleteFacetCommandError");
3032
2326
  var de_DeleteObjectCommand = /* @__PURE__ */ __name(async (output, context) => {
3033
2327
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3034
- return de_DeleteObjectCommandError(output, context);
2328
+ return de_CommandError(output, context);
3035
2329
  }
3036
2330
  const contents = (0, import_smithy_client.map)({
3037
2331
  $metadata: deserializeMetadata(output)
@@ -3039,52 +2333,9 @@ var de_DeleteObjectCommand = /* @__PURE__ */ __name(async (output, context) => {
3039
2333
  await (0, import_smithy_client.collectBody)(output.body, context);
3040
2334
  return contents;
3041
2335
  }, "de_DeleteObjectCommand");
3042
- var de_DeleteObjectCommandError = /* @__PURE__ */ __name(async (output, context) => {
3043
- const parsedOutput = {
3044
- ...output,
3045
- body: await parseErrorBody(output.body, context)
3046
- };
3047
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3048
- switch (errorCode) {
3049
- case "AccessDeniedException":
3050
- case "com.amazonaws.clouddirectory#AccessDeniedException":
3051
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3052
- case "DirectoryNotEnabledException":
3053
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
3054
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
3055
- case "InternalServiceException":
3056
- case "com.amazonaws.clouddirectory#InternalServiceException":
3057
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
3058
- case "InvalidArnException":
3059
- case "com.amazonaws.clouddirectory#InvalidArnException":
3060
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
3061
- case "LimitExceededException":
3062
- case "com.amazonaws.clouddirectory#LimitExceededException":
3063
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3064
- case "ObjectNotDetachedException":
3065
- case "com.amazonaws.clouddirectory#ObjectNotDetachedException":
3066
- throw await de_ObjectNotDetachedExceptionRes(parsedOutput, context);
3067
- case "ResourceNotFoundException":
3068
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
3069
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3070
- case "RetryableConflictException":
3071
- case "com.amazonaws.clouddirectory#RetryableConflictException":
3072
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
3073
- case "ValidationException":
3074
- case "com.amazonaws.clouddirectory#ValidationException":
3075
- throw await de_ValidationExceptionRes(parsedOutput, context);
3076
- default:
3077
- const parsedBody = parsedOutput.body;
3078
- return throwDefaultError({
3079
- output,
3080
- parsedBody,
3081
- errorCode
3082
- });
3083
- }
3084
- }, "de_DeleteObjectCommandError");
3085
2336
  var de_DeleteSchemaCommand = /* @__PURE__ */ __name(async (output, context) => {
3086
2337
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3087
- return de_DeleteSchemaCommandError(output, context);
2338
+ return de_CommandError(output, context);
3088
2339
  }
3089
2340
  const contents = (0, import_smithy_client.map)({
3090
2341
  $metadata: deserializeMetadata(output)
@@ -3096,49 +2347,9 @@ var de_DeleteSchemaCommand = /* @__PURE__ */ __name(async (output, context) => {
3096
2347
  Object.assign(contents, doc);
3097
2348
  return contents;
3098
2349
  }, "de_DeleteSchemaCommand");
3099
- var de_DeleteSchemaCommandError = /* @__PURE__ */ __name(async (output, context) => {
3100
- const parsedOutput = {
3101
- ...output,
3102
- body: await parseErrorBody(output.body, context)
3103
- };
3104
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3105
- switch (errorCode) {
3106
- case "AccessDeniedException":
3107
- case "com.amazonaws.clouddirectory#AccessDeniedException":
3108
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3109
- case "InternalServiceException":
3110
- case "com.amazonaws.clouddirectory#InternalServiceException":
3111
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
3112
- case "InvalidArnException":
3113
- case "com.amazonaws.clouddirectory#InvalidArnException":
3114
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
3115
- case "LimitExceededException":
3116
- case "com.amazonaws.clouddirectory#LimitExceededException":
3117
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3118
- case "ResourceNotFoundException":
3119
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
3120
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3121
- case "RetryableConflictException":
3122
- case "com.amazonaws.clouddirectory#RetryableConflictException":
3123
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
3124
- case "StillContainsLinksException":
3125
- case "com.amazonaws.clouddirectory#StillContainsLinksException":
3126
- throw await de_StillContainsLinksExceptionRes(parsedOutput, context);
3127
- case "ValidationException":
3128
- case "com.amazonaws.clouddirectory#ValidationException":
3129
- throw await de_ValidationExceptionRes(parsedOutput, context);
3130
- default:
3131
- const parsedBody = parsedOutput.body;
3132
- return throwDefaultError({
3133
- output,
3134
- parsedBody,
3135
- errorCode
3136
- });
3137
- }
3138
- }, "de_DeleteSchemaCommandError");
3139
2350
  var de_DeleteTypedLinkFacetCommand = /* @__PURE__ */ __name(async (output, context) => {
3140
2351
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3141
- return de_DeleteTypedLinkFacetCommandError(output, context);
2352
+ return de_CommandError(output, context);
3142
2353
  }
3143
2354
  const contents = (0, import_smithy_client.map)({
3144
2355
  $metadata: deserializeMetadata(output)
@@ -3146,49 +2357,9 @@ var de_DeleteTypedLinkFacetCommand = /* @__PURE__ */ __name(async (output, conte
3146
2357
  await (0, import_smithy_client.collectBody)(output.body, context);
3147
2358
  return contents;
3148
2359
  }, "de_DeleteTypedLinkFacetCommand");
3149
- var de_DeleteTypedLinkFacetCommandError = /* @__PURE__ */ __name(async (output, context) => {
3150
- const parsedOutput = {
3151
- ...output,
3152
- body: await parseErrorBody(output.body, context)
3153
- };
3154
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3155
- switch (errorCode) {
3156
- case "AccessDeniedException":
3157
- case "com.amazonaws.clouddirectory#AccessDeniedException":
3158
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3159
- case "FacetNotFoundException":
3160
- case "com.amazonaws.clouddirectory#FacetNotFoundException":
3161
- throw await de_FacetNotFoundExceptionRes(parsedOutput, context);
3162
- case "InternalServiceException":
3163
- case "com.amazonaws.clouddirectory#InternalServiceException":
3164
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
3165
- case "InvalidArnException":
3166
- case "com.amazonaws.clouddirectory#InvalidArnException":
3167
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
3168
- case "LimitExceededException":
3169
- case "com.amazonaws.clouddirectory#LimitExceededException":
3170
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3171
- case "ResourceNotFoundException":
3172
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
3173
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3174
- case "RetryableConflictException":
3175
- case "com.amazonaws.clouddirectory#RetryableConflictException":
3176
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
3177
- case "ValidationException":
3178
- case "com.amazonaws.clouddirectory#ValidationException":
3179
- throw await de_ValidationExceptionRes(parsedOutput, context);
3180
- default:
3181
- const parsedBody = parsedOutput.body;
3182
- return throwDefaultError({
3183
- output,
3184
- parsedBody,
3185
- errorCode
3186
- });
3187
- }
3188
- }, "de_DeleteTypedLinkFacetCommandError");
3189
2360
  var de_DetachFromIndexCommand = /* @__PURE__ */ __name(async (output, context) => {
3190
2361
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3191
- return de_DetachFromIndexCommandError(output, context);
2362
+ return de_CommandError(output, context);
3192
2363
  }
3193
2364
  const contents = (0, import_smithy_client.map)({
3194
2365
  $metadata: deserializeMetadata(output)
@@ -3200,55 +2371,9 @@ var de_DetachFromIndexCommand = /* @__PURE__ */ __name(async (output, context) =
3200
2371
  Object.assign(contents, doc);
3201
2372
  return contents;
3202
2373
  }, "de_DetachFromIndexCommand");
3203
- var de_DetachFromIndexCommandError = /* @__PURE__ */ __name(async (output, context) => {
3204
- const parsedOutput = {
3205
- ...output,
3206
- body: await parseErrorBody(output.body, context)
3207
- };
3208
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3209
- switch (errorCode) {
3210
- case "AccessDeniedException":
3211
- case "com.amazonaws.clouddirectory#AccessDeniedException":
3212
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3213
- case "DirectoryNotEnabledException":
3214
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
3215
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
3216
- case "InternalServiceException":
3217
- case "com.amazonaws.clouddirectory#InternalServiceException":
3218
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
3219
- case "InvalidArnException":
3220
- case "com.amazonaws.clouddirectory#InvalidArnException":
3221
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
3222
- case "LimitExceededException":
3223
- case "com.amazonaws.clouddirectory#LimitExceededException":
3224
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3225
- case "NotIndexException":
3226
- case "com.amazonaws.clouddirectory#NotIndexException":
3227
- throw await de_NotIndexExceptionRes(parsedOutput, context);
3228
- case "ObjectAlreadyDetachedException":
3229
- case "com.amazonaws.clouddirectory#ObjectAlreadyDetachedException":
3230
- throw await de_ObjectAlreadyDetachedExceptionRes(parsedOutput, context);
3231
- case "ResourceNotFoundException":
3232
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
3233
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3234
- case "RetryableConflictException":
3235
- case "com.amazonaws.clouddirectory#RetryableConflictException":
3236
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
3237
- case "ValidationException":
3238
- case "com.amazonaws.clouddirectory#ValidationException":
3239
- throw await de_ValidationExceptionRes(parsedOutput, context);
3240
- default:
3241
- const parsedBody = parsedOutput.body;
3242
- return throwDefaultError({
3243
- output,
3244
- parsedBody,
3245
- errorCode
3246
- });
3247
- }
3248
- }, "de_DetachFromIndexCommandError");
3249
2374
  var de_DetachObjectCommand = /* @__PURE__ */ __name(async (output, context) => {
3250
2375
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3251
- return de_DetachObjectCommandError(output, context);
2376
+ return de_CommandError(output, context);
3252
2377
  }
3253
2378
  const contents = (0, import_smithy_client.map)({
3254
2379
  $metadata: deserializeMetadata(output)
@@ -3260,52 +2385,9 @@ var de_DetachObjectCommand = /* @__PURE__ */ __name(async (output, context) => {
3260
2385
  Object.assign(contents, doc);
3261
2386
  return contents;
3262
2387
  }, "de_DetachObjectCommand");
3263
- var de_DetachObjectCommandError = /* @__PURE__ */ __name(async (output, context) => {
3264
- const parsedOutput = {
3265
- ...output,
3266
- body: await parseErrorBody(output.body, context)
3267
- };
3268
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3269
- switch (errorCode) {
3270
- case "AccessDeniedException":
3271
- case "com.amazonaws.clouddirectory#AccessDeniedException":
3272
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3273
- case "DirectoryNotEnabledException":
3274
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
3275
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
3276
- case "InternalServiceException":
3277
- case "com.amazonaws.clouddirectory#InternalServiceException":
3278
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
3279
- case "InvalidArnException":
3280
- case "com.amazonaws.clouddirectory#InvalidArnException":
3281
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
3282
- case "LimitExceededException":
3283
- case "com.amazonaws.clouddirectory#LimitExceededException":
3284
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3285
- case "NotNodeException":
3286
- case "com.amazonaws.clouddirectory#NotNodeException":
3287
- throw await de_NotNodeExceptionRes(parsedOutput, context);
3288
- case "ResourceNotFoundException":
3289
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
3290
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3291
- case "RetryableConflictException":
3292
- case "com.amazonaws.clouddirectory#RetryableConflictException":
3293
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
3294
- case "ValidationException":
3295
- case "com.amazonaws.clouddirectory#ValidationException":
3296
- throw await de_ValidationExceptionRes(parsedOutput, context);
3297
- default:
3298
- const parsedBody = parsedOutput.body;
3299
- return throwDefaultError({
3300
- output,
3301
- parsedBody,
3302
- errorCode
3303
- });
3304
- }
3305
- }, "de_DetachObjectCommandError");
3306
2388
  var de_DetachPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
3307
2389
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3308
- return de_DetachPolicyCommandError(output, context);
2390
+ return de_CommandError(output, context);
3309
2391
  }
3310
2392
  const contents = (0, import_smithy_client.map)({
3311
2393
  $metadata: deserializeMetadata(output)
@@ -3313,52 +2395,9 @@ var de_DetachPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
3313
2395
  await (0, import_smithy_client.collectBody)(output.body, context);
3314
2396
  return contents;
3315
2397
  }, "de_DetachPolicyCommand");
3316
- var de_DetachPolicyCommandError = /* @__PURE__ */ __name(async (output, context) => {
3317
- const parsedOutput = {
3318
- ...output,
3319
- body: await parseErrorBody(output.body, context)
3320
- };
3321
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3322
- switch (errorCode) {
3323
- case "AccessDeniedException":
3324
- case "com.amazonaws.clouddirectory#AccessDeniedException":
3325
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3326
- case "DirectoryNotEnabledException":
3327
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
3328
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
3329
- case "InternalServiceException":
3330
- case "com.amazonaws.clouddirectory#InternalServiceException":
3331
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
3332
- case "InvalidArnException":
3333
- case "com.amazonaws.clouddirectory#InvalidArnException":
3334
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
3335
- case "LimitExceededException":
3336
- case "com.amazonaws.clouddirectory#LimitExceededException":
3337
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3338
- case "NotPolicyException":
3339
- case "com.amazonaws.clouddirectory#NotPolicyException":
3340
- throw await de_NotPolicyExceptionRes(parsedOutput, context);
3341
- case "ResourceNotFoundException":
3342
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
3343
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3344
- case "RetryableConflictException":
3345
- case "com.amazonaws.clouddirectory#RetryableConflictException":
3346
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
3347
- case "ValidationException":
3348
- case "com.amazonaws.clouddirectory#ValidationException":
3349
- throw await de_ValidationExceptionRes(parsedOutput, context);
3350
- default:
3351
- const parsedBody = parsedOutput.body;
3352
- return throwDefaultError({
3353
- output,
3354
- parsedBody,
3355
- errorCode
3356
- });
3357
- }
3358
- }, "de_DetachPolicyCommandError");
3359
2398
  var de_DetachTypedLinkCommand = /* @__PURE__ */ __name(async (output, context) => {
3360
2399
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3361
- return de_DetachTypedLinkCommandError(output, context);
2400
+ return de_CommandError(output, context);
3362
2401
  }
3363
2402
  const contents = (0, import_smithy_client.map)({
3364
2403
  $metadata: deserializeMetadata(output)
@@ -3366,52 +2405,9 @@ var de_DetachTypedLinkCommand = /* @__PURE__ */ __name(async (output, context) =
3366
2405
  await (0, import_smithy_client.collectBody)(output.body, context);
3367
2406
  return contents;
3368
2407
  }, "de_DetachTypedLinkCommand");
3369
- var de_DetachTypedLinkCommandError = /* @__PURE__ */ __name(async (output, context) => {
3370
- const parsedOutput = {
3371
- ...output,
3372
- body: await parseErrorBody(output.body, context)
3373
- };
3374
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3375
- switch (errorCode) {
3376
- case "AccessDeniedException":
3377
- case "com.amazonaws.clouddirectory#AccessDeniedException":
3378
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3379
- case "DirectoryNotEnabledException":
3380
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
3381
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
3382
- case "FacetValidationException":
3383
- case "com.amazonaws.clouddirectory#FacetValidationException":
3384
- throw await de_FacetValidationExceptionRes(parsedOutput, context);
3385
- case "InternalServiceException":
3386
- case "com.amazonaws.clouddirectory#InternalServiceException":
3387
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
3388
- case "InvalidArnException":
3389
- case "com.amazonaws.clouddirectory#InvalidArnException":
3390
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
3391
- case "LimitExceededException":
3392
- case "com.amazonaws.clouddirectory#LimitExceededException":
3393
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3394
- case "ResourceNotFoundException":
3395
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
3396
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3397
- case "RetryableConflictException":
3398
- case "com.amazonaws.clouddirectory#RetryableConflictException":
3399
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
3400
- case "ValidationException":
3401
- case "com.amazonaws.clouddirectory#ValidationException":
3402
- throw await de_ValidationExceptionRes(parsedOutput, context);
3403
- default:
3404
- const parsedBody = parsedOutput.body;
3405
- return throwDefaultError({
3406
- output,
3407
- parsedBody,
3408
- errorCode
3409
- });
3410
- }
3411
- }, "de_DetachTypedLinkCommandError");
3412
2408
  var de_DisableDirectoryCommand = /* @__PURE__ */ __name(async (output, context) => {
3413
2409
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3414
- return de_DisableDirectoryCommandError(output, context);
2410
+ return de_CommandError(output, context);
3415
2411
  }
3416
2412
  const contents = (0, import_smithy_client.map)({
3417
2413
  $metadata: deserializeMetadata(output)
@@ -3423,49 +2419,9 @@ var de_DisableDirectoryCommand = /* @__PURE__ */ __name(async (output, context)
3423
2419
  Object.assign(contents, doc);
3424
2420
  return contents;
3425
2421
  }, "de_DisableDirectoryCommand");
3426
- var de_DisableDirectoryCommandError = /* @__PURE__ */ __name(async (output, context) => {
3427
- const parsedOutput = {
3428
- ...output,
3429
- body: await parseErrorBody(output.body, context)
3430
- };
3431
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3432
- switch (errorCode) {
3433
- case "AccessDeniedException":
3434
- case "com.amazonaws.clouddirectory#AccessDeniedException":
3435
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3436
- case "DirectoryDeletedException":
3437
- case "com.amazonaws.clouddirectory#DirectoryDeletedException":
3438
- throw await de_DirectoryDeletedExceptionRes(parsedOutput, context);
3439
- case "InternalServiceException":
3440
- case "com.amazonaws.clouddirectory#InternalServiceException":
3441
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
3442
- case "InvalidArnException":
3443
- case "com.amazonaws.clouddirectory#InvalidArnException":
3444
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
3445
- case "LimitExceededException":
3446
- case "com.amazonaws.clouddirectory#LimitExceededException":
3447
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3448
- case "ResourceNotFoundException":
3449
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
3450
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3451
- case "RetryableConflictException":
3452
- case "com.amazonaws.clouddirectory#RetryableConflictException":
3453
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
3454
- case "ValidationException":
3455
- case "com.amazonaws.clouddirectory#ValidationException":
3456
- throw await de_ValidationExceptionRes(parsedOutput, context);
3457
- default:
3458
- const parsedBody = parsedOutput.body;
3459
- return throwDefaultError({
3460
- output,
3461
- parsedBody,
3462
- errorCode
3463
- });
3464
- }
3465
- }, "de_DisableDirectoryCommandError");
3466
2422
  var de_EnableDirectoryCommand = /* @__PURE__ */ __name(async (output, context) => {
3467
2423
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3468
- return de_EnableDirectoryCommandError(output, context);
2424
+ return de_CommandError(output, context);
3469
2425
  }
3470
2426
  const contents = (0, import_smithy_client.map)({
3471
2427
  $metadata: deserializeMetadata(output)
@@ -3477,49 +2433,9 @@ var de_EnableDirectoryCommand = /* @__PURE__ */ __name(async (output, context) =
3477
2433
  Object.assign(contents, doc);
3478
2434
  return contents;
3479
2435
  }, "de_EnableDirectoryCommand");
3480
- var de_EnableDirectoryCommandError = /* @__PURE__ */ __name(async (output, context) => {
3481
- const parsedOutput = {
3482
- ...output,
3483
- body: await parseErrorBody(output.body, context)
3484
- };
3485
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3486
- switch (errorCode) {
3487
- case "AccessDeniedException":
3488
- case "com.amazonaws.clouddirectory#AccessDeniedException":
3489
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3490
- case "DirectoryDeletedException":
3491
- case "com.amazonaws.clouddirectory#DirectoryDeletedException":
3492
- throw await de_DirectoryDeletedExceptionRes(parsedOutput, context);
3493
- case "InternalServiceException":
3494
- case "com.amazonaws.clouddirectory#InternalServiceException":
3495
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
3496
- case "InvalidArnException":
3497
- case "com.amazonaws.clouddirectory#InvalidArnException":
3498
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
3499
- case "LimitExceededException":
3500
- case "com.amazonaws.clouddirectory#LimitExceededException":
3501
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3502
- case "ResourceNotFoundException":
3503
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
3504
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3505
- case "RetryableConflictException":
3506
- case "com.amazonaws.clouddirectory#RetryableConflictException":
3507
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
3508
- case "ValidationException":
3509
- case "com.amazonaws.clouddirectory#ValidationException":
3510
- throw await de_ValidationExceptionRes(parsedOutput, context);
3511
- default:
3512
- const parsedBody = parsedOutput.body;
3513
- return throwDefaultError({
3514
- output,
3515
- parsedBody,
3516
- errorCode
3517
- });
3518
- }
3519
- }, "de_EnableDirectoryCommandError");
3520
2436
  var de_GetAppliedSchemaVersionCommand = /* @__PURE__ */ __name(async (output, context) => {
3521
2437
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3522
- return de_GetAppliedSchemaVersionCommandError(output, context);
2438
+ return de_CommandError(output, context);
3523
2439
  }
3524
2440
  const contents = (0, import_smithy_client.map)({
3525
2441
  $metadata: deserializeMetadata(output)
@@ -3531,46 +2447,9 @@ var de_GetAppliedSchemaVersionCommand = /* @__PURE__ */ __name(async (output, co
3531
2447
  Object.assign(contents, doc);
3532
2448
  return contents;
3533
2449
  }, "de_GetAppliedSchemaVersionCommand");
3534
- var de_GetAppliedSchemaVersionCommandError = /* @__PURE__ */ __name(async (output, context) => {
3535
- const parsedOutput = {
3536
- ...output,
3537
- body: await parseErrorBody(output.body, context)
3538
- };
3539
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3540
- switch (errorCode) {
3541
- case "AccessDeniedException":
3542
- case "com.amazonaws.clouddirectory#AccessDeniedException":
3543
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3544
- case "InternalServiceException":
3545
- case "com.amazonaws.clouddirectory#InternalServiceException":
3546
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
3547
- case "InvalidArnException":
3548
- case "com.amazonaws.clouddirectory#InvalidArnException":
3549
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
3550
- case "LimitExceededException":
3551
- case "com.amazonaws.clouddirectory#LimitExceededException":
3552
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3553
- case "ResourceNotFoundException":
3554
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
3555
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3556
- case "RetryableConflictException":
3557
- case "com.amazonaws.clouddirectory#RetryableConflictException":
3558
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
3559
- case "ValidationException":
3560
- case "com.amazonaws.clouddirectory#ValidationException":
3561
- throw await de_ValidationExceptionRes(parsedOutput, context);
3562
- default:
3563
- const parsedBody = parsedOutput.body;
3564
- return throwDefaultError({
3565
- output,
3566
- parsedBody,
3567
- errorCode
3568
- });
3569
- }
3570
- }, "de_GetAppliedSchemaVersionCommandError");
3571
2450
  var de_GetDirectoryCommand = /* @__PURE__ */ __name(async (output, context) => {
3572
2451
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3573
- return de_GetDirectoryCommandError(output, context);
2452
+ return de_CommandError(output, context);
3574
2453
  }
3575
2454
  const contents = (0, import_smithy_client.map)({
3576
2455
  $metadata: deserializeMetadata(output)
@@ -3582,43 +2461,9 @@ var de_GetDirectoryCommand = /* @__PURE__ */ __name(async (output, context) => {
3582
2461
  Object.assign(contents, doc);
3583
2462
  return contents;
3584
2463
  }, "de_GetDirectoryCommand");
3585
- var de_GetDirectoryCommandError = /* @__PURE__ */ __name(async (output, context) => {
3586
- const parsedOutput = {
3587
- ...output,
3588
- body: await parseErrorBody(output.body, context)
3589
- };
3590
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3591
- switch (errorCode) {
3592
- case "AccessDeniedException":
3593
- case "com.amazonaws.clouddirectory#AccessDeniedException":
3594
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3595
- case "InternalServiceException":
3596
- case "com.amazonaws.clouddirectory#InternalServiceException":
3597
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
3598
- case "InvalidArnException":
3599
- case "com.amazonaws.clouddirectory#InvalidArnException":
3600
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
3601
- case "LimitExceededException":
3602
- case "com.amazonaws.clouddirectory#LimitExceededException":
3603
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3604
- case "RetryableConflictException":
3605
- case "com.amazonaws.clouddirectory#RetryableConflictException":
3606
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
3607
- case "ValidationException":
3608
- case "com.amazonaws.clouddirectory#ValidationException":
3609
- throw await de_ValidationExceptionRes(parsedOutput, context);
3610
- default:
3611
- const parsedBody = parsedOutput.body;
3612
- return throwDefaultError({
3613
- output,
3614
- parsedBody,
3615
- errorCode
3616
- });
3617
- }
3618
- }, "de_GetDirectoryCommandError");
3619
2464
  var de_GetFacetCommand = /* @__PURE__ */ __name(async (output, context) => {
3620
2465
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3621
- return de_GetFacetCommandError(output, context);
2466
+ return de_CommandError(output, context);
3622
2467
  }
3623
2468
  const contents = (0, import_smithy_client.map)({
3624
2469
  $metadata: deserializeMetadata(output)
@@ -3630,49 +2475,9 @@ var de_GetFacetCommand = /* @__PURE__ */ __name(async (output, context) => {
3630
2475
  Object.assign(contents, doc);
3631
2476
  return contents;
3632
2477
  }, "de_GetFacetCommand");
3633
- var de_GetFacetCommandError = /* @__PURE__ */ __name(async (output, context) => {
3634
- const parsedOutput = {
3635
- ...output,
3636
- body: await parseErrorBody(output.body, context)
3637
- };
3638
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3639
- switch (errorCode) {
3640
- case "AccessDeniedException":
3641
- case "com.amazonaws.clouddirectory#AccessDeniedException":
3642
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3643
- case "FacetNotFoundException":
3644
- case "com.amazonaws.clouddirectory#FacetNotFoundException":
3645
- throw await de_FacetNotFoundExceptionRes(parsedOutput, context);
3646
- case "InternalServiceException":
3647
- case "com.amazonaws.clouddirectory#InternalServiceException":
3648
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
3649
- case "InvalidArnException":
3650
- case "com.amazonaws.clouddirectory#InvalidArnException":
3651
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
3652
- case "LimitExceededException":
3653
- case "com.amazonaws.clouddirectory#LimitExceededException":
3654
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3655
- case "ResourceNotFoundException":
3656
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
3657
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3658
- case "RetryableConflictException":
3659
- case "com.amazonaws.clouddirectory#RetryableConflictException":
3660
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
3661
- case "ValidationException":
3662
- case "com.amazonaws.clouddirectory#ValidationException":
3663
- throw await de_ValidationExceptionRes(parsedOutput, context);
3664
- default:
3665
- const parsedBody = parsedOutput.body;
3666
- return throwDefaultError({
3667
- output,
3668
- parsedBody,
3669
- errorCode
3670
- });
3671
- }
3672
- }, "de_GetFacetCommandError");
3673
2478
  var de_GetLinkAttributesCommand = /* @__PURE__ */ __name(async (output, context) => {
3674
2479
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3675
- return de_GetLinkAttributesCommandError(output, context);
2480
+ return de_CommandError(output, context);
3676
2481
  }
3677
2482
  const contents = (0, import_smithy_client.map)({
3678
2483
  $metadata: deserializeMetadata(output)
@@ -3684,52 +2489,9 @@ var de_GetLinkAttributesCommand = /* @__PURE__ */ __name(async (output, context)
3684
2489
  Object.assign(contents, doc);
3685
2490
  return contents;
3686
2491
  }, "de_GetLinkAttributesCommand");
3687
- var de_GetLinkAttributesCommandError = /* @__PURE__ */ __name(async (output, context) => {
3688
- const parsedOutput = {
3689
- ...output,
3690
- body: await parseErrorBody(output.body, context)
3691
- };
3692
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3693
- switch (errorCode) {
3694
- case "AccessDeniedException":
3695
- case "com.amazonaws.clouddirectory#AccessDeniedException":
3696
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3697
- case "DirectoryNotEnabledException":
3698
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
3699
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
3700
- case "FacetValidationException":
3701
- case "com.amazonaws.clouddirectory#FacetValidationException":
3702
- throw await de_FacetValidationExceptionRes(parsedOutput, context);
3703
- case "InternalServiceException":
3704
- case "com.amazonaws.clouddirectory#InternalServiceException":
3705
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
3706
- case "InvalidArnException":
3707
- case "com.amazonaws.clouddirectory#InvalidArnException":
3708
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
3709
- case "LimitExceededException":
3710
- case "com.amazonaws.clouddirectory#LimitExceededException":
3711
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3712
- case "ResourceNotFoundException":
3713
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
3714
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3715
- case "RetryableConflictException":
3716
- case "com.amazonaws.clouddirectory#RetryableConflictException":
3717
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
3718
- case "ValidationException":
3719
- case "com.amazonaws.clouddirectory#ValidationException":
3720
- throw await de_ValidationExceptionRes(parsedOutput, context);
3721
- default:
3722
- const parsedBody = parsedOutput.body;
3723
- return throwDefaultError({
3724
- output,
3725
- parsedBody,
3726
- errorCode
3727
- });
3728
- }
3729
- }, "de_GetLinkAttributesCommandError");
3730
2492
  var de_GetObjectAttributesCommand = /* @__PURE__ */ __name(async (output, context) => {
3731
2493
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3732
- return de_GetObjectAttributesCommandError(output, context);
2494
+ return de_CommandError(output, context);
3733
2495
  }
3734
2496
  const contents = (0, import_smithy_client.map)({
3735
2497
  $metadata: deserializeMetadata(output)
@@ -3741,52 +2503,9 @@ var de_GetObjectAttributesCommand = /* @__PURE__ */ __name(async (output, contex
3741
2503
  Object.assign(contents, doc);
3742
2504
  return contents;
3743
2505
  }, "de_GetObjectAttributesCommand");
3744
- var de_GetObjectAttributesCommandError = /* @__PURE__ */ __name(async (output, context) => {
3745
- const parsedOutput = {
3746
- ...output,
3747
- body: await parseErrorBody(output.body, context)
3748
- };
3749
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3750
- switch (errorCode) {
3751
- case "AccessDeniedException":
3752
- case "com.amazonaws.clouddirectory#AccessDeniedException":
3753
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3754
- case "DirectoryNotEnabledException":
3755
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
3756
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
3757
- case "FacetValidationException":
3758
- case "com.amazonaws.clouddirectory#FacetValidationException":
3759
- throw await de_FacetValidationExceptionRes(parsedOutput, context);
3760
- case "InternalServiceException":
3761
- case "com.amazonaws.clouddirectory#InternalServiceException":
3762
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
3763
- case "InvalidArnException":
3764
- case "com.amazonaws.clouddirectory#InvalidArnException":
3765
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
3766
- case "LimitExceededException":
3767
- case "com.amazonaws.clouddirectory#LimitExceededException":
3768
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3769
- case "ResourceNotFoundException":
3770
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
3771
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3772
- case "RetryableConflictException":
3773
- case "com.amazonaws.clouddirectory#RetryableConflictException":
3774
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
3775
- case "ValidationException":
3776
- case "com.amazonaws.clouddirectory#ValidationException":
3777
- throw await de_ValidationExceptionRes(parsedOutput, context);
3778
- default:
3779
- const parsedBody = parsedOutput.body;
3780
- return throwDefaultError({
3781
- output,
3782
- parsedBody,
3783
- errorCode
3784
- });
3785
- }
3786
- }, "de_GetObjectAttributesCommandError");
3787
2506
  var de_GetObjectInformationCommand = /* @__PURE__ */ __name(async (output, context) => {
3788
2507
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3789
- return de_GetObjectInformationCommandError(output, context);
2508
+ return de_CommandError(output, context);
3790
2509
  }
3791
2510
  const contents = (0, import_smithy_client.map)({
3792
2511
  $metadata: deserializeMetadata(output)
@@ -3799,49 +2518,9 @@ var de_GetObjectInformationCommand = /* @__PURE__ */ __name(async (output, conte
3799
2518
  Object.assign(contents, doc);
3800
2519
  return contents;
3801
2520
  }, "de_GetObjectInformationCommand");
3802
- var de_GetObjectInformationCommandError = /* @__PURE__ */ __name(async (output, context) => {
3803
- const parsedOutput = {
3804
- ...output,
3805
- body: await parseErrorBody(output.body, context)
3806
- };
3807
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3808
- switch (errorCode) {
3809
- case "AccessDeniedException":
3810
- case "com.amazonaws.clouddirectory#AccessDeniedException":
3811
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3812
- case "DirectoryNotEnabledException":
3813
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
3814
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
3815
- case "InternalServiceException":
3816
- case "com.amazonaws.clouddirectory#InternalServiceException":
3817
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
3818
- case "InvalidArnException":
3819
- case "com.amazonaws.clouddirectory#InvalidArnException":
3820
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
3821
- case "LimitExceededException":
3822
- case "com.amazonaws.clouddirectory#LimitExceededException":
3823
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3824
- case "ResourceNotFoundException":
3825
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
3826
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3827
- case "RetryableConflictException":
3828
- case "com.amazonaws.clouddirectory#RetryableConflictException":
3829
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
3830
- case "ValidationException":
3831
- case "com.amazonaws.clouddirectory#ValidationException":
3832
- throw await de_ValidationExceptionRes(parsedOutput, context);
3833
- default:
3834
- const parsedBody = parsedOutput.body;
3835
- return throwDefaultError({
3836
- output,
3837
- parsedBody,
3838
- errorCode
3839
- });
3840
- }
3841
- }, "de_GetObjectInformationCommandError");
3842
2521
  var de_GetSchemaAsJsonCommand = /* @__PURE__ */ __name(async (output, context) => {
3843
2522
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3844
- return de_GetSchemaAsJsonCommandError(output, context);
2523
+ return de_CommandError(output, context);
3845
2524
  }
3846
2525
  const contents = (0, import_smithy_client.map)({
3847
2526
  $metadata: deserializeMetadata(output)
@@ -3854,46 +2533,9 @@ var de_GetSchemaAsJsonCommand = /* @__PURE__ */ __name(async (output, context) =
3854
2533
  Object.assign(contents, doc);
3855
2534
  return contents;
3856
2535
  }, "de_GetSchemaAsJsonCommand");
3857
- var de_GetSchemaAsJsonCommandError = /* @__PURE__ */ __name(async (output, context) => {
3858
- const parsedOutput = {
3859
- ...output,
3860
- body: await parseErrorBody(output.body, context)
3861
- };
3862
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3863
- switch (errorCode) {
3864
- case "AccessDeniedException":
3865
- case "com.amazonaws.clouddirectory#AccessDeniedException":
3866
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3867
- case "InternalServiceException":
3868
- case "com.amazonaws.clouddirectory#InternalServiceException":
3869
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
3870
- case "InvalidArnException":
3871
- case "com.amazonaws.clouddirectory#InvalidArnException":
3872
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
3873
- case "LimitExceededException":
3874
- case "com.amazonaws.clouddirectory#LimitExceededException":
3875
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3876
- case "ResourceNotFoundException":
3877
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
3878
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3879
- case "RetryableConflictException":
3880
- case "com.amazonaws.clouddirectory#RetryableConflictException":
3881
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
3882
- case "ValidationException":
3883
- case "com.amazonaws.clouddirectory#ValidationException":
3884
- throw await de_ValidationExceptionRes(parsedOutput, context);
3885
- default:
3886
- const parsedBody = parsedOutput.body;
3887
- return throwDefaultError({
3888
- output,
3889
- parsedBody,
3890
- errorCode
3891
- });
3892
- }
3893
- }, "de_GetSchemaAsJsonCommandError");
3894
2536
  var de_GetTypedLinkFacetInformationCommand = /* @__PURE__ */ __name(async (output, context) => {
3895
2537
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3896
- return de_GetTypedLinkFacetInformationCommandError(output, context);
2538
+ return de_CommandError(output, context);
3897
2539
  }
3898
2540
  const contents = (0, import_smithy_client.map)({
3899
2541
  $metadata: deserializeMetadata(output)
@@ -3905,52 +2547,9 @@ var de_GetTypedLinkFacetInformationCommand = /* @__PURE__ */ __name(async (outpu
3905
2547
  Object.assign(contents, doc);
3906
2548
  return contents;
3907
2549
  }, "de_GetTypedLinkFacetInformationCommand");
3908
- var de_GetTypedLinkFacetInformationCommandError = /* @__PURE__ */ __name(async (output, context) => {
3909
- const parsedOutput = {
3910
- ...output,
3911
- body: await parseErrorBody(output.body, context)
3912
- };
3913
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3914
- switch (errorCode) {
3915
- case "AccessDeniedException":
3916
- case "com.amazonaws.clouddirectory#AccessDeniedException":
3917
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3918
- case "FacetNotFoundException":
3919
- case "com.amazonaws.clouddirectory#FacetNotFoundException":
3920
- throw await de_FacetNotFoundExceptionRes(parsedOutput, context);
3921
- case "InternalServiceException":
3922
- case "com.amazonaws.clouddirectory#InternalServiceException":
3923
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
3924
- case "InvalidArnException":
3925
- case "com.amazonaws.clouddirectory#InvalidArnException":
3926
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
3927
- case "InvalidNextTokenException":
3928
- case "com.amazonaws.clouddirectory#InvalidNextTokenException":
3929
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
3930
- case "LimitExceededException":
3931
- case "com.amazonaws.clouddirectory#LimitExceededException":
3932
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3933
- case "ResourceNotFoundException":
3934
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
3935
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3936
- case "RetryableConflictException":
3937
- case "com.amazonaws.clouddirectory#RetryableConflictException":
3938
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
3939
- case "ValidationException":
3940
- case "com.amazonaws.clouddirectory#ValidationException":
3941
- throw await de_ValidationExceptionRes(parsedOutput, context);
3942
- default:
3943
- const parsedBody = parsedOutput.body;
3944
- return throwDefaultError({
3945
- output,
3946
- parsedBody,
3947
- errorCode
3948
- });
3949
- }
3950
- }, "de_GetTypedLinkFacetInformationCommandError");
3951
2550
  var de_ListAppliedSchemaArnsCommand = /* @__PURE__ */ __name(async (output, context) => {
3952
2551
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3953
- return de_ListAppliedSchemaArnsCommandError(output, context);
2552
+ return de_CommandError(output, context);
3954
2553
  }
3955
2554
  const contents = (0, import_smithy_client.map)({
3956
2555
  $metadata: deserializeMetadata(output)
@@ -3963,49 +2562,9 @@ var de_ListAppliedSchemaArnsCommand = /* @__PURE__ */ __name(async (output, cont
3963
2562
  Object.assign(contents, doc);
3964
2563
  return contents;
3965
2564
  }, "de_ListAppliedSchemaArnsCommand");
3966
- var de_ListAppliedSchemaArnsCommandError = /* @__PURE__ */ __name(async (output, context) => {
3967
- const parsedOutput = {
3968
- ...output,
3969
- body: await parseErrorBody(output.body, context)
3970
- };
3971
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3972
- switch (errorCode) {
3973
- case "AccessDeniedException":
3974
- case "com.amazonaws.clouddirectory#AccessDeniedException":
3975
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3976
- case "InternalServiceException":
3977
- case "com.amazonaws.clouddirectory#InternalServiceException":
3978
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
3979
- case "InvalidArnException":
3980
- case "com.amazonaws.clouddirectory#InvalidArnException":
3981
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
3982
- case "InvalidNextTokenException":
3983
- case "com.amazonaws.clouddirectory#InvalidNextTokenException":
3984
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
3985
- case "LimitExceededException":
3986
- case "com.amazonaws.clouddirectory#LimitExceededException":
3987
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3988
- case "ResourceNotFoundException":
3989
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
3990
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3991
- case "RetryableConflictException":
3992
- case "com.amazonaws.clouddirectory#RetryableConflictException":
3993
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
3994
- case "ValidationException":
3995
- case "com.amazonaws.clouddirectory#ValidationException":
3996
- throw await de_ValidationExceptionRes(parsedOutput, context);
3997
- default:
3998
- const parsedBody = parsedOutput.body;
3999
- return throwDefaultError({
4000
- output,
4001
- parsedBody,
4002
- errorCode
4003
- });
4004
- }
4005
- }, "de_ListAppliedSchemaArnsCommandError");
4006
2565
  var de_ListAttachedIndicesCommand = /* @__PURE__ */ __name(async (output, context) => {
4007
2566
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4008
- return de_ListAttachedIndicesCommandError(output, context);
2567
+ return de_CommandError(output, context);
4009
2568
  }
4010
2569
  const contents = (0, import_smithy_client.map)({
4011
2570
  $metadata: deserializeMetadata(output)
@@ -4018,49 +2577,9 @@ var de_ListAttachedIndicesCommand = /* @__PURE__ */ __name(async (output, contex
4018
2577
  Object.assign(contents, doc);
4019
2578
  return contents;
4020
2579
  }, "de_ListAttachedIndicesCommand");
4021
- var de_ListAttachedIndicesCommandError = /* @__PURE__ */ __name(async (output, context) => {
4022
- const parsedOutput = {
4023
- ...output,
4024
- body: await parseErrorBody(output.body, context)
4025
- };
4026
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4027
- switch (errorCode) {
4028
- case "AccessDeniedException":
4029
- case "com.amazonaws.clouddirectory#AccessDeniedException":
4030
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4031
- case "DirectoryNotEnabledException":
4032
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
4033
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
4034
- case "InternalServiceException":
4035
- case "com.amazonaws.clouddirectory#InternalServiceException":
4036
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
4037
- case "InvalidArnException":
4038
- case "com.amazonaws.clouddirectory#InvalidArnException":
4039
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
4040
- case "LimitExceededException":
4041
- case "com.amazonaws.clouddirectory#LimitExceededException":
4042
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4043
- case "ResourceNotFoundException":
4044
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
4045
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4046
- case "RetryableConflictException":
4047
- case "com.amazonaws.clouddirectory#RetryableConflictException":
4048
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
4049
- case "ValidationException":
4050
- case "com.amazonaws.clouddirectory#ValidationException":
4051
- throw await de_ValidationExceptionRes(parsedOutput, context);
4052
- default:
4053
- const parsedBody = parsedOutput.body;
4054
- return throwDefaultError({
4055
- output,
4056
- parsedBody,
4057
- errorCode
4058
- });
4059
- }
4060
- }, "de_ListAttachedIndicesCommandError");
4061
2580
  var de_ListDevelopmentSchemaArnsCommand = /* @__PURE__ */ __name(async (output, context) => {
4062
2581
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4063
- return de_ListDevelopmentSchemaArnsCommandError(output, context);
2582
+ return de_CommandError(output, context);
4064
2583
  }
4065
2584
  const contents = (0, import_smithy_client.map)({
4066
2585
  $metadata: deserializeMetadata(output)
@@ -4073,49 +2592,9 @@ var de_ListDevelopmentSchemaArnsCommand = /* @__PURE__ */ __name(async (output,
4073
2592
  Object.assign(contents, doc);
4074
2593
  return contents;
4075
2594
  }, "de_ListDevelopmentSchemaArnsCommand");
4076
- var de_ListDevelopmentSchemaArnsCommandError = /* @__PURE__ */ __name(async (output, context) => {
4077
- const parsedOutput = {
4078
- ...output,
4079
- body: await parseErrorBody(output.body, context)
4080
- };
4081
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4082
- switch (errorCode) {
4083
- case "AccessDeniedException":
4084
- case "com.amazonaws.clouddirectory#AccessDeniedException":
4085
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4086
- case "InternalServiceException":
4087
- case "com.amazonaws.clouddirectory#InternalServiceException":
4088
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
4089
- case "InvalidArnException":
4090
- case "com.amazonaws.clouddirectory#InvalidArnException":
4091
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
4092
- case "InvalidNextTokenException":
4093
- case "com.amazonaws.clouddirectory#InvalidNextTokenException":
4094
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
4095
- case "LimitExceededException":
4096
- case "com.amazonaws.clouddirectory#LimitExceededException":
4097
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4098
- case "ResourceNotFoundException":
4099
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
4100
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4101
- case "RetryableConflictException":
4102
- case "com.amazonaws.clouddirectory#RetryableConflictException":
4103
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
4104
- case "ValidationException":
4105
- case "com.amazonaws.clouddirectory#ValidationException":
4106
- throw await de_ValidationExceptionRes(parsedOutput, context);
4107
- default:
4108
- const parsedBody = parsedOutput.body;
4109
- return throwDefaultError({
4110
- output,
4111
- parsedBody,
4112
- errorCode
4113
- });
4114
- }
4115
- }, "de_ListDevelopmentSchemaArnsCommandError");
4116
2595
  var de_ListDirectoriesCommand = /* @__PURE__ */ __name(async (output, context) => {
4117
2596
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4118
- return de_ListDirectoriesCommandError(output, context);
2597
+ return de_CommandError(output, context);
4119
2598
  }
4120
2599
  const contents = (0, import_smithy_client.map)({
4121
2600
  $metadata: deserializeMetadata(output)
@@ -4128,46 +2607,9 @@ var de_ListDirectoriesCommand = /* @__PURE__ */ __name(async (output, context) =
4128
2607
  Object.assign(contents, doc);
4129
2608
  return contents;
4130
2609
  }, "de_ListDirectoriesCommand");
4131
- var de_ListDirectoriesCommandError = /* @__PURE__ */ __name(async (output, context) => {
4132
- const parsedOutput = {
4133
- ...output,
4134
- body: await parseErrorBody(output.body, context)
4135
- };
4136
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4137
- switch (errorCode) {
4138
- case "AccessDeniedException":
4139
- case "com.amazonaws.clouddirectory#AccessDeniedException":
4140
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4141
- case "InternalServiceException":
4142
- case "com.amazonaws.clouddirectory#InternalServiceException":
4143
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
4144
- case "InvalidArnException":
4145
- case "com.amazonaws.clouddirectory#InvalidArnException":
4146
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
4147
- case "InvalidNextTokenException":
4148
- case "com.amazonaws.clouddirectory#InvalidNextTokenException":
4149
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
4150
- case "LimitExceededException":
4151
- case "com.amazonaws.clouddirectory#LimitExceededException":
4152
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4153
- case "RetryableConflictException":
4154
- case "com.amazonaws.clouddirectory#RetryableConflictException":
4155
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
4156
- case "ValidationException":
4157
- case "com.amazonaws.clouddirectory#ValidationException":
4158
- throw await de_ValidationExceptionRes(parsedOutput, context);
4159
- default:
4160
- const parsedBody = parsedOutput.body;
4161
- return throwDefaultError({
4162
- output,
4163
- parsedBody,
4164
- errorCode
4165
- });
4166
- }
4167
- }, "de_ListDirectoriesCommandError");
4168
2610
  var de_ListFacetAttributesCommand = /* @__PURE__ */ __name(async (output, context) => {
4169
2611
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4170
- return de_ListFacetAttributesCommandError(output, context);
2612
+ return de_CommandError(output, context);
4171
2613
  }
4172
2614
  const contents = (0, import_smithy_client.map)({
4173
2615
  $metadata: deserializeMetadata(output)
@@ -4180,52 +2622,9 @@ var de_ListFacetAttributesCommand = /* @__PURE__ */ __name(async (output, contex
4180
2622
  Object.assign(contents, doc);
4181
2623
  return contents;
4182
2624
  }, "de_ListFacetAttributesCommand");
4183
- var de_ListFacetAttributesCommandError = /* @__PURE__ */ __name(async (output, context) => {
4184
- const parsedOutput = {
4185
- ...output,
4186
- body: await parseErrorBody(output.body, context)
4187
- };
4188
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4189
- switch (errorCode) {
4190
- case "AccessDeniedException":
4191
- case "com.amazonaws.clouddirectory#AccessDeniedException":
4192
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4193
- case "FacetNotFoundException":
4194
- case "com.amazonaws.clouddirectory#FacetNotFoundException":
4195
- throw await de_FacetNotFoundExceptionRes(parsedOutput, context);
4196
- case "InternalServiceException":
4197
- case "com.amazonaws.clouddirectory#InternalServiceException":
4198
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
4199
- case "InvalidArnException":
4200
- case "com.amazonaws.clouddirectory#InvalidArnException":
4201
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
4202
- case "InvalidNextTokenException":
4203
- case "com.amazonaws.clouddirectory#InvalidNextTokenException":
4204
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
4205
- case "LimitExceededException":
4206
- case "com.amazonaws.clouddirectory#LimitExceededException":
4207
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4208
- case "ResourceNotFoundException":
4209
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
4210
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4211
- case "RetryableConflictException":
4212
- case "com.amazonaws.clouddirectory#RetryableConflictException":
4213
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
4214
- case "ValidationException":
4215
- case "com.amazonaws.clouddirectory#ValidationException":
4216
- throw await de_ValidationExceptionRes(parsedOutput, context);
4217
- default:
4218
- const parsedBody = parsedOutput.body;
4219
- return throwDefaultError({
4220
- output,
4221
- parsedBody,
4222
- errorCode
4223
- });
4224
- }
4225
- }, "de_ListFacetAttributesCommandError");
4226
2625
  var de_ListFacetNamesCommand = /* @__PURE__ */ __name(async (output, context) => {
4227
2626
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4228
- return de_ListFacetNamesCommandError(output, context);
2627
+ return de_CommandError(output, context);
4229
2628
  }
4230
2629
  const contents = (0, import_smithy_client.map)({
4231
2630
  $metadata: deserializeMetadata(output)
@@ -4238,49 +2637,9 @@ var de_ListFacetNamesCommand = /* @__PURE__ */ __name(async (output, context) =>
4238
2637
  Object.assign(contents, doc);
4239
2638
  return contents;
4240
2639
  }, "de_ListFacetNamesCommand");
4241
- var de_ListFacetNamesCommandError = /* @__PURE__ */ __name(async (output, context) => {
4242
- const parsedOutput = {
4243
- ...output,
4244
- body: await parseErrorBody(output.body, context)
4245
- };
4246
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4247
- switch (errorCode) {
4248
- case "AccessDeniedException":
4249
- case "com.amazonaws.clouddirectory#AccessDeniedException":
4250
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4251
- case "InternalServiceException":
4252
- case "com.amazonaws.clouddirectory#InternalServiceException":
4253
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
4254
- case "InvalidArnException":
4255
- case "com.amazonaws.clouddirectory#InvalidArnException":
4256
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
4257
- case "InvalidNextTokenException":
4258
- case "com.amazonaws.clouddirectory#InvalidNextTokenException":
4259
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
4260
- case "LimitExceededException":
4261
- case "com.amazonaws.clouddirectory#LimitExceededException":
4262
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4263
- case "ResourceNotFoundException":
4264
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
4265
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4266
- case "RetryableConflictException":
4267
- case "com.amazonaws.clouddirectory#RetryableConflictException":
4268
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
4269
- case "ValidationException":
4270
- case "com.amazonaws.clouddirectory#ValidationException":
4271
- throw await de_ValidationExceptionRes(parsedOutput, context);
4272
- default:
4273
- const parsedBody = parsedOutput.body;
4274
- return throwDefaultError({
4275
- output,
4276
- parsedBody,
4277
- errorCode
4278
- });
4279
- }
4280
- }, "de_ListFacetNamesCommandError");
4281
2640
  var de_ListIncomingTypedLinksCommand = /* @__PURE__ */ __name(async (output, context) => {
4282
2641
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4283
- return de_ListIncomingTypedLinksCommandError(output, context);
2642
+ return de_CommandError(output, context);
4284
2643
  }
4285
2644
  const contents = (0, import_smithy_client.map)({
4286
2645
  $metadata: deserializeMetadata(output)
@@ -4293,55 +2652,9 @@ var de_ListIncomingTypedLinksCommand = /* @__PURE__ */ __name(async (output, con
4293
2652
  Object.assign(contents, doc);
4294
2653
  return contents;
4295
2654
  }, "de_ListIncomingTypedLinksCommand");
4296
- var de_ListIncomingTypedLinksCommandError = /* @__PURE__ */ __name(async (output, context) => {
4297
- const parsedOutput = {
4298
- ...output,
4299
- body: await parseErrorBody(output.body, context)
4300
- };
4301
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4302
- switch (errorCode) {
4303
- case "AccessDeniedException":
4304
- case "com.amazonaws.clouddirectory#AccessDeniedException":
4305
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4306
- case "DirectoryNotEnabledException":
4307
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
4308
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
4309
- case "FacetValidationException":
4310
- case "com.amazonaws.clouddirectory#FacetValidationException":
4311
- throw await de_FacetValidationExceptionRes(parsedOutput, context);
4312
- case "InternalServiceException":
4313
- case "com.amazonaws.clouddirectory#InternalServiceException":
4314
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
4315
- case "InvalidArnException":
4316
- case "com.amazonaws.clouddirectory#InvalidArnException":
4317
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
4318
- case "InvalidNextTokenException":
4319
- case "com.amazonaws.clouddirectory#InvalidNextTokenException":
4320
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
4321
- case "LimitExceededException":
4322
- case "com.amazonaws.clouddirectory#LimitExceededException":
4323
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4324
- case "ResourceNotFoundException":
4325
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
4326
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4327
- case "RetryableConflictException":
4328
- case "com.amazonaws.clouddirectory#RetryableConflictException":
4329
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
4330
- case "ValidationException":
4331
- case "com.amazonaws.clouddirectory#ValidationException":
4332
- throw await de_ValidationExceptionRes(parsedOutput, context);
4333
- default:
4334
- const parsedBody = parsedOutput.body;
4335
- return throwDefaultError({
4336
- output,
4337
- parsedBody,
4338
- errorCode
4339
- });
4340
- }
4341
- }, "de_ListIncomingTypedLinksCommandError");
4342
2655
  var de_ListIndexCommand = /* @__PURE__ */ __name(async (output, context) => {
4343
2656
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4344
- return de_ListIndexCommandError(output, context);
2657
+ return de_CommandError(output, context);
4345
2658
  }
4346
2659
  const contents = (0, import_smithy_client.map)({
4347
2660
  $metadata: deserializeMetadata(output)
@@ -4354,58 +2667,9 @@ var de_ListIndexCommand = /* @__PURE__ */ __name(async (output, context) => {
4354
2667
  Object.assign(contents, doc);
4355
2668
  return contents;
4356
2669
  }, "de_ListIndexCommand");
4357
- var de_ListIndexCommandError = /* @__PURE__ */ __name(async (output, context) => {
4358
- const parsedOutput = {
4359
- ...output,
4360
- body: await parseErrorBody(output.body, context)
4361
- };
4362
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4363
- switch (errorCode) {
4364
- case "AccessDeniedException":
4365
- case "com.amazonaws.clouddirectory#AccessDeniedException":
4366
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4367
- case "DirectoryNotEnabledException":
4368
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
4369
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
4370
- case "FacetValidationException":
4371
- case "com.amazonaws.clouddirectory#FacetValidationException":
4372
- throw await de_FacetValidationExceptionRes(parsedOutput, context);
4373
- case "InternalServiceException":
4374
- case "com.amazonaws.clouddirectory#InternalServiceException":
4375
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
4376
- case "InvalidArnException":
4377
- case "com.amazonaws.clouddirectory#InvalidArnException":
4378
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
4379
- case "InvalidNextTokenException":
4380
- case "com.amazonaws.clouddirectory#InvalidNextTokenException":
4381
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
4382
- case "LimitExceededException":
4383
- case "com.amazonaws.clouddirectory#LimitExceededException":
4384
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4385
- case "NotIndexException":
4386
- case "com.amazonaws.clouddirectory#NotIndexException":
4387
- throw await de_NotIndexExceptionRes(parsedOutput, context);
4388
- case "ResourceNotFoundException":
4389
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
4390
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4391
- case "RetryableConflictException":
4392
- case "com.amazonaws.clouddirectory#RetryableConflictException":
4393
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
4394
- case "ValidationException":
4395
- case "com.amazonaws.clouddirectory#ValidationException":
4396
- throw await de_ValidationExceptionRes(parsedOutput, context);
4397
- default:
4398
- const parsedBody = parsedOutput.body;
4399
- return throwDefaultError({
4400
- output,
4401
- parsedBody,
4402
- errorCode
4403
- });
4404
- }
4405
- }, "de_ListIndexCommandError");
4406
2670
  var de_ListManagedSchemaArnsCommand = /* @__PURE__ */ __name(async (output, context) => {
4407
2671
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4408
- return de_ListManagedSchemaArnsCommandError(output, context);
2672
+ return de_CommandError(output, context);
4409
2673
  }
4410
2674
  const contents = (0, import_smithy_client.map)({
4411
2675
  $metadata: deserializeMetadata(output)
@@ -4418,43 +2682,9 @@ var de_ListManagedSchemaArnsCommand = /* @__PURE__ */ __name(async (output, cont
4418
2682
  Object.assign(contents, doc);
4419
2683
  return contents;
4420
2684
  }, "de_ListManagedSchemaArnsCommand");
4421
- var de_ListManagedSchemaArnsCommandError = /* @__PURE__ */ __name(async (output, context) => {
4422
- const parsedOutput = {
4423
- ...output,
4424
- body: await parseErrorBody(output.body, context)
4425
- };
4426
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4427
- switch (errorCode) {
4428
- case "AccessDeniedException":
4429
- case "com.amazonaws.clouddirectory#AccessDeniedException":
4430
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4431
- case "InternalServiceException":
4432
- case "com.amazonaws.clouddirectory#InternalServiceException":
4433
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
4434
- case "InvalidArnException":
4435
- case "com.amazonaws.clouddirectory#InvalidArnException":
4436
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
4437
- case "InvalidNextTokenException":
4438
- case "com.amazonaws.clouddirectory#InvalidNextTokenException":
4439
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
4440
- case "ResourceNotFoundException":
4441
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
4442
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4443
- case "ValidationException":
4444
- case "com.amazonaws.clouddirectory#ValidationException":
4445
- throw await de_ValidationExceptionRes(parsedOutput, context);
4446
- default:
4447
- const parsedBody = parsedOutput.body;
4448
- return throwDefaultError({
4449
- output,
4450
- parsedBody,
4451
- errorCode
4452
- });
4453
- }
4454
- }, "de_ListManagedSchemaArnsCommandError");
4455
2685
  var de_ListObjectAttributesCommand = /* @__PURE__ */ __name(async (output, context) => {
4456
2686
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4457
- return de_ListObjectAttributesCommandError(output, context);
2687
+ return de_CommandError(output, context);
4458
2688
  }
4459
2689
  const contents = (0, import_smithy_client.map)({
4460
2690
  $metadata: deserializeMetadata(output)
@@ -4467,55 +2697,9 @@ var de_ListObjectAttributesCommand = /* @__PURE__ */ __name(async (output, conte
4467
2697
  Object.assign(contents, doc);
4468
2698
  return contents;
4469
2699
  }, "de_ListObjectAttributesCommand");
4470
- var de_ListObjectAttributesCommandError = /* @__PURE__ */ __name(async (output, context) => {
4471
- const parsedOutput = {
4472
- ...output,
4473
- body: await parseErrorBody(output.body, context)
4474
- };
4475
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4476
- switch (errorCode) {
4477
- case "AccessDeniedException":
4478
- case "com.amazonaws.clouddirectory#AccessDeniedException":
4479
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4480
- case "DirectoryNotEnabledException":
4481
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
4482
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
4483
- case "FacetValidationException":
4484
- case "com.amazonaws.clouddirectory#FacetValidationException":
4485
- throw await de_FacetValidationExceptionRes(parsedOutput, context);
4486
- case "InternalServiceException":
4487
- case "com.amazonaws.clouddirectory#InternalServiceException":
4488
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
4489
- case "InvalidArnException":
4490
- case "com.amazonaws.clouddirectory#InvalidArnException":
4491
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
4492
- case "InvalidNextTokenException":
4493
- case "com.amazonaws.clouddirectory#InvalidNextTokenException":
4494
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
4495
- case "LimitExceededException":
4496
- case "com.amazonaws.clouddirectory#LimitExceededException":
4497
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4498
- case "ResourceNotFoundException":
4499
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
4500
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4501
- case "RetryableConflictException":
4502
- case "com.amazonaws.clouddirectory#RetryableConflictException":
4503
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
4504
- case "ValidationException":
4505
- case "com.amazonaws.clouddirectory#ValidationException":
4506
- throw await de_ValidationExceptionRes(parsedOutput, context);
4507
- default:
4508
- const parsedBody = parsedOutput.body;
4509
- return throwDefaultError({
4510
- output,
4511
- parsedBody,
4512
- errorCode
4513
- });
4514
- }
4515
- }, "de_ListObjectAttributesCommandError");
4516
2700
  var de_ListObjectChildrenCommand = /* @__PURE__ */ __name(async (output, context) => {
4517
2701
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4518
- return de_ListObjectChildrenCommandError(output, context);
2702
+ return de_CommandError(output, context);
4519
2703
  }
4520
2704
  const contents = (0, import_smithy_client.map)({
4521
2705
  $metadata: deserializeMetadata(output)
@@ -4528,55 +2712,9 @@ var de_ListObjectChildrenCommand = /* @__PURE__ */ __name(async (output, context
4528
2712
  Object.assign(contents, doc);
4529
2713
  return contents;
4530
2714
  }, "de_ListObjectChildrenCommand");
4531
- var de_ListObjectChildrenCommandError = /* @__PURE__ */ __name(async (output, context) => {
4532
- const parsedOutput = {
4533
- ...output,
4534
- body: await parseErrorBody(output.body, context)
4535
- };
4536
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4537
- switch (errorCode) {
4538
- case "AccessDeniedException":
4539
- case "com.amazonaws.clouddirectory#AccessDeniedException":
4540
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4541
- case "DirectoryNotEnabledException":
4542
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
4543
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
4544
- case "InternalServiceException":
4545
- case "com.amazonaws.clouddirectory#InternalServiceException":
4546
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
4547
- case "InvalidArnException":
4548
- case "com.amazonaws.clouddirectory#InvalidArnException":
4549
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
4550
- case "InvalidNextTokenException":
4551
- case "com.amazonaws.clouddirectory#InvalidNextTokenException":
4552
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
4553
- case "LimitExceededException":
4554
- case "com.amazonaws.clouddirectory#LimitExceededException":
4555
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4556
- case "NotNodeException":
4557
- case "com.amazonaws.clouddirectory#NotNodeException":
4558
- throw await de_NotNodeExceptionRes(parsedOutput, context);
4559
- case "ResourceNotFoundException":
4560
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
4561
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4562
- case "RetryableConflictException":
4563
- case "com.amazonaws.clouddirectory#RetryableConflictException":
4564
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
4565
- case "ValidationException":
4566
- case "com.amazonaws.clouddirectory#ValidationException":
4567
- throw await de_ValidationExceptionRes(parsedOutput, context);
4568
- default:
4569
- const parsedBody = parsedOutput.body;
4570
- return throwDefaultError({
4571
- output,
4572
- parsedBody,
4573
- errorCode
4574
- });
4575
- }
4576
- }, "de_ListObjectChildrenCommandError");
4577
2715
  var de_ListObjectParentPathsCommand = /* @__PURE__ */ __name(async (output, context) => {
4578
2716
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4579
- return de_ListObjectParentPathsCommandError(output, context);
2717
+ return de_CommandError(output, context);
4580
2718
  }
4581
2719
  const contents = (0, import_smithy_client.map)({
4582
2720
  $metadata: deserializeMetadata(output)
@@ -4589,52 +2727,9 @@ var de_ListObjectParentPathsCommand = /* @__PURE__ */ __name(async (output, cont
4589
2727
  Object.assign(contents, doc);
4590
2728
  return contents;
4591
2729
  }, "de_ListObjectParentPathsCommand");
4592
- var de_ListObjectParentPathsCommandError = /* @__PURE__ */ __name(async (output, context) => {
4593
- const parsedOutput = {
4594
- ...output,
4595
- body: await parseErrorBody(output.body, context)
4596
- };
4597
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4598
- switch (errorCode) {
4599
- case "AccessDeniedException":
4600
- case "com.amazonaws.clouddirectory#AccessDeniedException":
4601
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4602
- case "DirectoryNotEnabledException":
4603
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
4604
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
4605
- case "InternalServiceException":
4606
- case "com.amazonaws.clouddirectory#InternalServiceException":
4607
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
4608
- case "InvalidArnException":
4609
- case "com.amazonaws.clouddirectory#InvalidArnException":
4610
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
4611
- case "InvalidNextTokenException":
4612
- case "com.amazonaws.clouddirectory#InvalidNextTokenException":
4613
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
4614
- case "LimitExceededException":
4615
- case "com.amazonaws.clouddirectory#LimitExceededException":
4616
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4617
- case "ResourceNotFoundException":
4618
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
4619
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4620
- case "RetryableConflictException":
4621
- case "com.amazonaws.clouddirectory#RetryableConflictException":
4622
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
4623
- case "ValidationException":
4624
- case "com.amazonaws.clouddirectory#ValidationException":
4625
- throw await de_ValidationExceptionRes(parsedOutput, context);
4626
- default:
4627
- const parsedBody = parsedOutput.body;
4628
- return throwDefaultError({
4629
- output,
4630
- parsedBody,
4631
- errorCode
4632
- });
4633
- }
4634
- }, "de_ListObjectParentPathsCommandError");
4635
2730
  var de_ListObjectParentsCommand = /* @__PURE__ */ __name(async (output, context) => {
4636
2731
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4637
- return de_ListObjectParentsCommandError(output, context);
2732
+ return de_CommandError(output, context);
4638
2733
  }
4639
2734
  const contents = (0, import_smithy_client.map)({
4640
2735
  $metadata: deserializeMetadata(output)
@@ -4648,55 +2743,9 @@ var de_ListObjectParentsCommand = /* @__PURE__ */ __name(async (output, context)
4648
2743
  Object.assign(contents, doc);
4649
2744
  return contents;
4650
2745
  }, "de_ListObjectParentsCommand");
4651
- var de_ListObjectParentsCommandError = /* @__PURE__ */ __name(async (output, context) => {
4652
- const parsedOutput = {
4653
- ...output,
4654
- body: await parseErrorBody(output.body, context)
4655
- };
4656
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4657
- switch (errorCode) {
4658
- case "AccessDeniedException":
4659
- case "com.amazonaws.clouddirectory#AccessDeniedException":
4660
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4661
- case "CannotListParentOfRootException":
4662
- case "com.amazonaws.clouddirectory#CannotListParentOfRootException":
4663
- throw await de_CannotListParentOfRootExceptionRes(parsedOutput, context);
4664
- case "DirectoryNotEnabledException":
4665
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
4666
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
4667
- case "InternalServiceException":
4668
- case "com.amazonaws.clouddirectory#InternalServiceException":
4669
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
4670
- case "InvalidArnException":
4671
- case "com.amazonaws.clouddirectory#InvalidArnException":
4672
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
4673
- case "InvalidNextTokenException":
4674
- case "com.amazonaws.clouddirectory#InvalidNextTokenException":
4675
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
4676
- case "LimitExceededException":
4677
- case "com.amazonaws.clouddirectory#LimitExceededException":
4678
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4679
- case "ResourceNotFoundException":
4680
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
4681
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4682
- case "RetryableConflictException":
4683
- case "com.amazonaws.clouddirectory#RetryableConflictException":
4684
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
4685
- case "ValidationException":
4686
- case "com.amazonaws.clouddirectory#ValidationException":
4687
- throw await de_ValidationExceptionRes(parsedOutput, context);
4688
- default:
4689
- const parsedBody = parsedOutput.body;
4690
- return throwDefaultError({
4691
- output,
4692
- parsedBody,
4693
- errorCode
4694
- });
4695
- }
4696
- }, "de_ListObjectParentsCommandError");
4697
2746
  var de_ListObjectPoliciesCommand = /* @__PURE__ */ __name(async (output, context) => {
4698
2747
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4699
- return de_ListObjectPoliciesCommandError(output, context);
2748
+ return de_CommandError(output, context);
4700
2749
  }
4701
2750
  const contents = (0, import_smithy_client.map)({
4702
2751
  $metadata: deserializeMetadata(output)
@@ -4709,52 +2758,9 @@ var de_ListObjectPoliciesCommand = /* @__PURE__ */ __name(async (output, context
4709
2758
  Object.assign(contents, doc);
4710
2759
  return contents;
4711
2760
  }, "de_ListObjectPoliciesCommand");
4712
- var de_ListObjectPoliciesCommandError = /* @__PURE__ */ __name(async (output, context) => {
4713
- const parsedOutput = {
4714
- ...output,
4715
- body: await parseErrorBody(output.body, context)
4716
- };
4717
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4718
- switch (errorCode) {
4719
- case "AccessDeniedException":
4720
- case "com.amazonaws.clouddirectory#AccessDeniedException":
4721
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4722
- case "DirectoryNotEnabledException":
4723
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
4724
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
4725
- case "InternalServiceException":
4726
- case "com.amazonaws.clouddirectory#InternalServiceException":
4727
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
4728
- case "InvalidArnException":
4729
- case "com.amazonaws.clouddirectory#InvalidArnException":
4730
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
4731
- case "InvalidNextTokenException":
4732
- case "com.amazonaws.clouddirectory#InvalidNextTokenException":
4733
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
4734
- case "LimitExceededException":
4735
- case "com.amazonaws.clouddirectory#LimitExceededException":
4736
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4737
- case "ResourceNotFoundException":
4738
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
4739
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4740
- case "RetryableConflictException":
4741
- case "com.amazonaws.clouddirectory#RetryableConflictException":
4742
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
4743
- case "ValidationException":
4744
- case "com.amazonaws.clouddirectory#ValidationException":
4745
- throw await de_ValidationExceptionRes(parsedOutput, context);
4746
- default:
4747
- const parsedBody = parsedOutput.body;
4748
- return throwDefaultError({
4749
- output,
4750
- parsedBody,
4751
- errorCode
4752
- });
4753
- }
4754
- }, "de_ListObjectPoliciesCommandError");
4755
2761
  var de_ListOutgoingTypedLinksCommand = /* @__PURE__ */ __name(async (output, context) => {
4756
2762
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4757
- return de_ListOutgoingTypedLinksCommandError(output, context);
2763
+ return de_CommandError(output, context);
4758
2764
  }
4759
2765
  const contents = (0, import_smithy_client.map)({
4760
2766
  $metadata: deserializeMetadata(output)
@@ -4767,55 +2773,9 @@ var de_ListOutgoingTypedLinksCommand = /* @__PURE__ */ __name(async (output, con
4767
2773
  Object.assign(contents, doc);
4768
2774
  return contents;
4769
2775
  }, "de_ListOutgoingTypedLinksCommand");
4770
- var de_ListOutgoingTypedLinksCommandError = /* @__PURE__ */ __name(async (output, context) => {
4771
- const parsedOutput = {
4772
- ...output,
4773
- body: await parseErrorBody(output.body, context)
4774
- };
4775
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4776
- switch (errorCode) {
4777
- case "AccessDeniedException":
4778
- case "com.amazonaws.clouddirectory#AccessDeniedException":
4779
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4780
- case "DirectoryNotEnabledException":
4781
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
4782
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
4783
- case "FacetValidationException":
4784
- case "com.amazonaws.clouddirectory#FacetValidationException":
4785
- throw await de_FacetValidationExceptionRes(parsedOutput, context);
4786
- case "InternalServiceException":
4787
- case "com.amazonaws.clouddirectory#InternalServiceException":
4788
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
4789
- case "InvalidArnException":
4790
- case "com.amazonaws.clouddirectory#InvalidArnException":
4791
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
4792
- case "InvalidNextTokenException":
4793
- case "com.amazonaws.clouddirectory#InvalidNextTokenException":
4794
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
4795
- case "LimitExceededException":
4796
- case "com.amazonaws.clouddirectory#LimitExceededException":
4797
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4798
- case "ResourceNotFoundException":
4799
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
4800
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4801
- case "RetryableConflictException":
4802
- case "com.amazonaws.clouddirectory#RetryableConflictException":
4803
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
4804
- case "ValidationException":
4805
- case "com.amazonaws.clouddirectory#ValidationException":
4806
- throw await de_ValidationExceptionRes(parsedOutput, context);
4807
- default:
4808
- const parsedBody = parsedOutput.body;
4809
- return throwDefaultError({
4810
- output,
4811
- parsedBody,
4812
- errorCode
4813
- });
4814
- }
4815
- }, "de_ListOutgoingTypedLinksCommandError");
4816
2776
  var de_ListPolicyAttachmentsCommand = /* @__PURE__ */ __name(async (output, context) => {
4817
2777
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4818
- return de_ListPolicyAttachmentsCommandError(output, context);
2778
+ return de_CommandError(output, context);
4819
2779
  }
4820
2780
  const contents = (0, import_smithy_client.map)({
4821
2781
  $metadata: deserializeMetadata(output)
@@ -4828,55 +2788,9 @@ var de_ListPolicyAttachmentsCommand = /* @__PURE__ */ __name(async (output, cont
4828
2788
  Object.assign(contents, doc);
4829
2789
  return contents;
4830
2790
  }, "de_ListPolicyAttachmentsCommand");
4831
- var de_ListPolicyAttachmentsCommandError = /* @__PURE__ */ __name(async (output, context) => {
4832
- const parsedOutput = {
4833
- ...output,
4834
- body: await parseErrorBody(output.body, context)
4835
- };
4836
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4837
- switch (errorCode) {
4838
- case "AccessDeniedException":
4839
- case "com.amazonaws.clouddirectory#AccessDeniedException":
4840
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4841
- case "DirectoryNotEnabledException":
4842
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
4843
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
4844
- case "InternalServiceException":
4845
- case "com.amazonaws.clouddirectory#InternalServiceException":
4846
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
4847
- case "InvalidArnException":
4848
- case "com.amazonaws.clouddirectory#InvalidArnException":
4849
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
4850
- case "InvalidNextTokenException":
4851
- case "com.amazonaws.clouddirectory#InvalidNextTokenException":
4852
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
4853
- case "LimitExceededException":
4854
- case "com.amazonaws.clouddirectory#LimitExceededException":
4855
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4856
- case "NotPolicyException":
4857
- case "com.amazonaws.clouddirectory#NotPolicyException":
4858
- throw await de_NotPolicyExceptionRes(parsedOutput, context);
4859
- case "ResourceNotFoundException":
4860
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
4861
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4862
- case "RetryableConflictException":
4863
- case "com.amazonaws.clouddirectory#RetryableConflictException":
4864
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
4865
- case "ValidationException":
4866
- case "com.amazonaws.clouddirectory#ValidationException":
4867
- throw await de_ValidationExceptionRes(parsedOutput, context);
4868
- default:
4869
- const parsedBody = parsedOutput.body;
4870
- return throwDefaultError({
4871
- output,
4872
- parsedBody,
4873
- errorCode
4874
- });
4875
- }
4876
- }, "de_ListPolicyAttachmentsCommandError");
4877
2791
  var de_ListPublishedSchemaArnsCommand = /* @__PURE__ */ __name(async (output, context) => {
4878
2792
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4879
- return de_ListPublishedSchemaArnsCommandError(output, context);
2793
+ return de_CommandError(output, context);
4880
2794
  }
4881
2795
  const contents = (0, import_smithy_client.map)({
4882
2796
  $metadata: deserializeMetadata(output)
@@ -4889,49 +2803,9 @@ var de_ListPublishedSchemaArnsCommand = /* @__PURE__ */ __name(async (output, co
4889
2803
  Object.assign(contents, doc);
4890
2804
  return contents;
4891
2805
  }, "de_ListPublishedSchemaArnsCommand");
4892
- var de_ListPublishedSchemaArnsCommandError = /* @__PURE__ */ __name(async (output, context) => {
4893
- const parsedOutput = {
4894
- ...output,
4895
- body: await parseErrorBody(output.body, context)
4896
- };
4897
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4898
- switch (errorCode) {
4899
- case "AccessDeniedException":
4900
- case "com.amazonaws.clouddirectory#AccessDeniedException":
4901
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4902
- case "InternalServiceException":
4903
- case "com.amazonaws.clouddirectory#InternalServiceException":
4904
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
4905
- case "InvalidArnException":
4906
- case "com.amazonaws.clouddirectory#InvalidArnException":
4907
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
4908
- case "InvalidNextTokenException":
4909
- case "com.amazonaws.clouddirectory#InvalidNextTokenException":
4910
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
4911
- case "LimitExceededException":
4912
- case "com.amazonaws.clouddirectory#LimitExceededException":
4913
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4914
- case "ResourceNotFoundException":
4915
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
4916
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4917
- case "RetryableConflictException":
4918
- case "com.amazonaws.clouddirectory#RetryableConflictException":
4919
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
4920
- case "ValidationException":
4921
- case "com.amazonaws.clouddirectory#ValidationException":
4922
- throw await de_ValidationExceptionRes(parsedOutput, context);
4923
- default:
4924
- const parsedBody = parsedOutput.body;
4925
- return throwDefaultError({
4926
- output,
4927
- parsedBody,
4928
- errorCode
4929
- });
4930
- }
4931
- }, "de_ListPublishedSchemaArnsCommandError");
4932
2806
  var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
4933
2807
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4934
- return de_ListTagsForResourceCommandError(output, context);
2808
+ return de_CommandError(output, context);
4935
2809
  }
4936
2810
  const contents = (0, import_smithy_client.map)({
4937
2811
  $metadata: deserializeMetadata(output)
@@ -4944,49 +2818,9 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
4944
2818
  Object.assign(contents, doc);
4945
2819
  return contents;
4946
2820
  }, "de_ListTagsForResourceCommand");
4947
- var de_ListTagsForResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
4948
- const parsedOutput = {
4949
- ...output,
4950
- body: await parseErrorBody(output.body, context)
4951
- };
4952
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4953
- switch (errorCode) {
4954
- case "AccessDeniedException":
4955
- case "com.amazonaws.clouddirectory#AccessDeniedException":
4956
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4957
- case "InternalServiceException":
4958
- case "com.amazonaws.clouddirectory#InternalServiceException":
4959
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
4960
- case "InvalidArnException":
4961
- case "com.amazonaws.clouddirectory#InvalidArnException":
4962
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
4963
- case "InvalidTaggingRequestException":
4964
- case "com.amazonaws.clouddirectory#InvalidTaggingRequestException":
4965
- throw await de_InvalidTaggingRequestExceptionRes(parsedOutput, context);
4966
- case "LimitExceededException":
4967
- case "com.amazonaws.clouddirectory#LimitExceededException":
4968
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4969
- case "ResourceNotFoundException":
4970
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
4971
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4972
- case "RetryableConflictException":
4973
- case "com.amazonaws.clouddirectory#RetryableConflictException":
4974
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
4975
- case "ValidationException":
4976
- case "com.amazonaws.clouddirectory#ValidationException":
4977
- throw await de_ValidationExceptionRes(parsedOutput, context);
4978
- default:
4979
- const parsedBody = parsedOutput.body;
4980
- return throwDefaultError({
4981
- output,
4982
- parsedBody,
4983
- errorCode
4984
- });
4985
- }
4986
- }, "de_ListTagsForResourceCommandError");
4987
2821
  var de_ListTypedLinkFacetAttributesCommand = /* @__PURE__ */ __name(async (output, context) => {
4988
2822
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4989
- return de_ListTypedLinkFacetAttributesCommandError(output, context);
2823
+ return de_CommandError(output, context);
4990
2824
  }
4991
2825
  const contents = (0, import_smithy_client.map)({
4992
2826
  $metadata: deserializeMetadata(output)
@@ -4999,52 +2833,9 @@ var de_ListTypedLinkFacetAttributesCommand = /* @__PURE__ */ __name(async (outpu
4999
2833
  Object.assign(contents, doc);
5000
2834
  return contents;
5001
2835
  }, "de_ListTypedLinkFacetAttributesCommand");
5002
- var de_ListTypedLinkFacetAttributesCommandError = /* @__PURE__ */ __name(async (output, context) => {
5003
- const parsedOutput = {
5004
- ...output,
5005
- body: await parseErrorBody(output.body, context)
5006
- };
5007
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5008
- switch (errorCode) {
5009
- case "AccessDeniedException":
5010
- case "com.amazonaws.clouddirectory#AccessDeniedException":
5011
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5012
- case "FacetNotFoundException":
5013
- case "com.amazonaws.clouddirectory#FacetNotFoundException":
5014
- throw await de_FacetNotFoundExceptionRes(parsedOutput, context);
5015
- case "InternalServiceException":
5016
- case "com.amazonaws.clouddirectory#InternalServiceException":
5017
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
5018
- case "InvalidArnException":
5019
- case "com.amazonaws.clouddirectory#InvalidArnException":
5020
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
5021
- case "InvalidNextTokenException":
5022
- case "com.amazonaws.clouddirectory#InvalidNextTokenException":
5023
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
5024
- case "LimitExceededException":
5025
- case "com.amazonaws.clouddirectory#LimitExceededException":
5026
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
5027
- case "ResourceNotFoundException":
5028
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
5029
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5030
- case "RetryableConflictException":
5031
- case "com.amazonaws.clouddirectory#RetryableConflictException":
5032
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
5033
- case "ValidationException":
5034
- case "com.amazonaws.clouddirectory#ValidationException":
5035
- throw await de_ValidationExceptionRes(parsedOutput, context);
5036
- default:
5037
- const parsedBody = parsedOutput.body;
5038
- return throwDefaultError({
5039
- output,
5040
- parsedBody,
5041
- errorCode
5042
- });
5043
- }
5044
- }, "de_ListTypedLinkFacetAttributesCommandError");
5045
2836
  var de_ListTypedLinkFacetNamesCommand = /* @__PURE__ */ __name(async (output, context) => {
5046
2837
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5047
- return de_ListTypedLinkFacetNamesCommandError(output, context);
2838
+ return de_CommandError(output, context);
5048
2839
  }
5049
2840
  const contents = (0, import_smithy_client.map)({
5050
2841
  $metadata: deserializeMetadata(output)
@@ -5057,49 +2848,9 @@ var de_ListTypedLinkFacetNamesCommand = /* @__PURE__ */ __name(async (output, co
5057
2848
  Object.assign(contents, doc);
5058
2849
  return contents;
5059
2850
  }, "de_ListTypedLinkFacetNamesCommand");
5060
- var de_ListTypedLinkFacetNamesCommandError = /* @__PURE__ */ __name(async (output, context) => {
5061
- const parsedOutput = {
5062
- ...output,
5063
- body: await parseErrorBody(output.body, context)
5064
- };
5065
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5066
- switch (errorCode) {
5067
- case "AccessDeniedException":
5068
- case "com.amazonaws.clouddirectory#AccessDeniedException":
5069
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5070
- case "InternalServiceException":
5071
- case "com.amazonaws.clouddirectory#InternalServiceException":
5072
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
5073
- case "InvalidArnException":
5074
- case "com.amazonaws.clouddirectory#InvalidArnException":
5075
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
5076
- case "InvalidNextTokenException":
5077
- case "com.amazonaws.clouddirectory#InvalidNextTokenException":
5078
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
5079
- case "LimitExceededException":
5080
- case "com.amazonaws.clouddirectory#LimitExceededException":
5081
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
5082
- case "ResourceNotFoundException":
5083
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
5084
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5085
- case "RetryableConflictException":
5086
- case "com.amazonaws.clouddirectory#RetryableConflictException":
5087
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
5088
- case "ValidationException":
5089
- case "com.amazonaws.clouddirectory#ValidationException":
5090
- throw await de_ValidationExceptionRes(parsedOutput, context);
5091
- default:
5092
- const parsedBody = parsedOutput.body;
5093
- return throwDefaultError({
5094
- output,
5095
- parsedBody,
5096
- errorCode
5097
- });
5098
- }
5099
- }, "de_ListTypedLinkFacetNamesCommandError");
5100
2851
  var de_LookupPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
5101
2852
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5102
- return de_LookupPolicyCommandError(output, context);
2853
+ return de_CommandError(output, context);
5103
2854
  }
5104
2855
  const contents = (0, import_smithy_client.map)({
5105
2856
  $metadata: deserializeMetadata(output)
@@ -5112,52 +2863,9 @@ var de_LookupPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
5112
2863
  Object.assign(contents, doc);
5113
2864
  return contents;
5114
2865
  }, "de_LookupPolicyCommand");
5115
- var de_LookupPolicyCommandError = /* @__PURE__ */ __name(async (output, context) => {
5116
- const parsedOutput = {
5117
- ...output,
5118
- body: await parseErrorBody(output.body, context)
5119
- };
5120
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5121
- switch (errorCode) {
5122
- case "AccessDeniedException":
5123
- case "com.amazonaws.clouddirectory#AccessDeniedException":
5124
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5125
- case "DirectoryNotEnabledException":
5126
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
5127
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
5128
- case "InternalServiceException":
5129
- case "com.amazonaws.clouddirectory#InternalServiceException":
5130
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
5131
- case "InvalidArnException":
5132
- case "com.amazonaws.clouddirectory#InvalidArnException":
5133
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
5134
- case "InvalidNextTokenException":
5135
- case "com.amazonaws.clouddirectory#InvalidNextTokenException":
5136
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
5137
- case "LimitExceededException":
5138
- case "com.amazonaws.clouddirectory#LimitExceededException":
5139
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
5140
- case "ResourceNotFoundException":
5141
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
5142
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5143
- case "RetryableConflictException":
5144
- case "com.amazonaws.clouddirectory#RetryableConflictException":
5145
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
5146
- case "ValidationException":
5147
- case "com.amazonaws.clouddirectory#ValidationException":
5148
- throw await de_ValidationExceptionRes(parsedOutput, context);
5149
- default:
5150
- const parsedBody = parsedOutput.body;
5151
- return throwDefaultError({
5152
- output,
5153
- parsedBody,
5154
- errorCode
5155
- });
5156
- }
5157
- }, "de_LookupPolicyCommandError");
5158
2866
  var de_PublishSchemaCommand = /* @__PURE__ */ __name(async (output, context) => {
5159
2867
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5160
- return de_PublishSchemaCommandError(output, context);
2868
+ return de_CommandError(output, context);
5161
2869
  }
5162
2870
  const contents = (0, import_smithy_client.map)({
5163
2871
  $metadata: deserializeMetadata(output)
@@ -5169,49 +2877,9 @@ var de_PublishSchemaCommand = /* @__PURE__ */ __name(async (output, context) =>
5169
2877
  Object.assign(contents, doc);
5170
2878
  return contents;
5171
2879
  }, "de_PublishSchemaCommand");
5172
- var de_PublishSchemaCommandError = /* @__PURE__ */ __name(async (output, context) => {
5173
- const parsedOutput = {
5174
- ...output,
5175
- body: await parseErrorBody(output.body, context)
5176
- };
5177
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5178
- switch (errorCode) {
5179
- case "AccessDeniedException":
5180
- case "com.amazonaws.clouddirectory#AccessDeniedException":
5181
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5182
- case "InternalServiceException":
5183
- case "com.amazonaws.clouddirectory#InternalServiceException":
5184
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
5185
- case "InvalidArnException":
5186
- case "com.amazonaws.clouddirectory#InvalidArnException":
5187
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
5188
- case "LimitExceededException":
5189
- case "com.amazonaws.clouddirectory#LimitExceededException":
5190
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
5191
- case "ResourceNotFoundException":
5192
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
5193
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5194
- case "RetryableConflictException":
5195
- case "com.amazonaws.clouddirectory#RetryableConflictException":
5196
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
5197
- case "SchemaAlreadyPublishedException":
5198
- case "com.amazonaws.clouddirectory#SchemaAlreadyPublishedException":
5199
- throw await de_SchemaAlreadyPublishedExceptionRes(parsedOutput, context);
5200
- case "ValidationException":
5201
- case "com.amazonaws.clouddirectory#ValidationException":
5202
- throw await de_ValidationExceptionRes(parsedOutput, context);
5203
- default:
5204
- const parsedBody = parsedOutput.body;
5205
- return throwDefaultError({
5206
- output,
5207
- parsedBody,
5208
- errorCode
5209
- });
5210
- }
5211
- }, "de_PublishSchemaCommandError");
5212
2880
  var de_PutSchemaFromJsonCommand = /* @__PURE__ */ __name(async (output, context) => {
5213
2881
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5214
- return de_PutSchemaFromJsonCommandError(output, context);
2882
+ return de_CommandError(output, context);
5215
2883
  }
5216
2884
  const contents = (0, import_smithy_client.map)({
5217
2885
  $metadata: deserializeMetadata(output)
@@ -5223,49 +2891,9 @@ var de_PutSchemaFromJsonCommand = /* @__PURE__ */ __name(async (output, context)
5223
2891
  Object.assign(contents, doc);
5224
2892
  return contents;
5225
2893
  }, "de_PutSchemaFromJsonCommand");
5226
- var de_PutSchemaFromJsonCommandError = /* @__PURE__ */ __name(async (output, context) => {
5227
- const parsedOutput = {
5228
- ...output,
5229
- body: await parseErrorBody(output.body, context)
5230
- };
5231
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5232
- switch (errorCode) {
5233
- case "AccessDeniedException":
5234
- case "com.amazonaws.clouddirectory#AccessDeniedException":
5235
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5236
- case "InternalServiceException":
5237
- case "com.amazonaws.clouddirectory#InternalServiceException":
5238
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
5239
- case "InvalidArnException":
5240
- case "com.amazonaws.clouddirectory#InvalidArnException":
5241
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
5242
- case "InvalidRuleException":
5243
- case "com.amazonaws.clouddirectory#InvalidRuleException":
5244
- throw await de_InvalidRuleExceptionRes(parsedOutput, context);
5245
- case "InvalidSchemaDocException":
5246
- case "com.amazonaws.clouddirectory#InvalidSchemaDocException":
5247
- throw await de_InvalidSchemaDocExceptionRes(parsedOutput, context);
5248
- case "LimitExceededException":
5249
- case "com.amazonaws.clouddirectory#LimitExceededException":
5250
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
5251
- case "RetryableConflictException":
5252
- case "com.amazonaws.clouddirectory#RetryableConflictException":
5253
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
5254
- case "ValidationException":
5255
- case "com.amazonaws.clouddirectory#ValidationException":
5256
- throw await de_ValidationExceptionRes(parsedOutput, context);
5257
- default:
5258
- const parsedBody = parsedOutput.body;
5259
- return throwDefaultError({
5260
- output,
5261
- parsedBody,
5262
- errorCode
5263
- });
5264
- }
5265
- }, "de_PutSchemaFromJsonCommandError");
5266
2894
  var de_RemoveFacetFromObjectCommand = /* @__PURE__ */ __name(async (output, context) => {
5267
2895
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5268
- return de_RemoveFacetFromObjectCommandError(output, context);
2896
+ return de_CommandError(output, context);
5269
2897
  }
5270
2898
  const contents = (0, import_smithy_client.map)({
5271
2899
  $metadata: deserializeMetadata(output)
@@ -5273,324 +2901,63 @@ var de_RemoveFacetFromObjectCommand = /* @__PURE__ */ __name(async (output, cont
5273
2901
  await (0, import_smithy_client.collectBody)(output.body, context);
5274
2902
  return contents;
5275
2903
  }, "de_RemoveFacetFromObjectCommand");
5276
- var de_RemoveFacetFromObjectCommandError = /* @__PURE__ */ __name(async (output, context) => {
5277
- const parsedOutput = {
5278
- ...output,
5279
- body: await parseErrorBody(output.body, context)
5280
- };
5281
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5282
- switch (errorCode) {
5283
- case "AccessDeniedException":
5284
- case "com.amazonaws.clouddirectory#AccessDeniedException":
5285
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5286
- case "DirectoryNotEnabledException":
5287
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
5288
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
5289
- case "FacetValidationException":
5290
- case "com.amazonaws.clouddirectory#FacetValidationException":
5291
- throw await de_FacetValidationExceptionRes(parsedOutput, context);
5292
- case "InternalServiceException":
5293
- case "com.amazonaws.clouddirectory#InternalServiceException":
5294
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
5295
- case "InvalidArnException":
5296
- case "com.amazonaws.clouddirectory#InvalidArnException":
5297
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
5298
- case "LimitExceededException":
5299
- case "com.amazonaws.clouddirectory#LimitExceededException":
5300
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
5301
- case "ResourceNotFoundException":
5302
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
5303
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5304
- case "RetryableConflictException":
5305
- case "com.amazonaws.clouddirectory#RetryableConflictException":
5306
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
5307
- case "ValidationException":
5308
- case "com.amazonaws.clouddirectory#ValidationException":
5309
- throw await de_ValidationExceptionRes(parsedOutput, context);
5310
- default:
5311
- const parsedBody = parsedOutput.body;
5312
- return throwDefaultError({
5313
- output,
5314
- parsedBody,
5315
- errorCode
5316
- });
5317
- }
5318
- }, "de_RemoveFacetFromObjectCommandError");
5319
2904
  var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
5320
2905
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5321
- return de_TagResourceCommandError(output, context);
5322
- }
5323
- const contents = (0, import_smithy_client.map)({
5324
- $metadata: deserializeMetadata(output)
5325
- });
5326
- await (0, import_smithy_client.collectBody)(output.body, context);
5327
- return contents;
5328
- }, "de_TagResourceCommand");
5329
- var de_TagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
5330
- const parsedOutput = {
5331
- ...output,
5332
- body: await parseErrorBody(output.body, context)
5333
- };
5334
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5335
- switch (errorCode) {
5336
- case "AccessDeniedException":
5337
- case "com.amazonaws.clouddirectory#AccessDeniedException":
5338
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5339
- case "InternalServiceException":
5340
- case "com.amazonaws.clouddirectory#InternalServiceException":
5341
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
5342
- case "InvalidArnException":
5343
- case "com.amazonaws.clouddirectory#InvalidArnException":
5344
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
5345
- case "InvalidTaggingRequestException":
5346
- case "com.amazonaws.clouddirectory#InvalidTaggingRequestException":
5347
- throw await de_InvalidTaggingRequestExceptionRes(parsedOutput, context);
5348
- case "LimitExceededException":
5349
- case "com.amazonaws.clouddirectory#LimitExceededException":
5350
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
5351
- case "ResourceNotFoundException":
5352
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
5353
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5354
- case "RetryableConflictException":
5355
- case "com.amazonaws.clouddirectory#RetryableConflictException":
5356
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
5357
- case "ValidationException":
5358
- case "com.amazonaws.clouddirectory#ValidationException":
5359
- throw await de_ValidationExceptionRes(parsedOutput, context);
5360
- default:
5361
- const parsedBody = parsedOutput.body;
5362
- return throwDefaultError({
5363
- output,
5364
- parsedBody,
5365
- errorCode
5366
- });
5367
- }
5368
- }, "de_TagResourceCommandError");
5369
- var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
5370
- if (output.statusCode !== 200 && output.statusCode >= 300) {
5371
- return de_UntagResourceCommandError(output, context);
5372
- }
5373
- const contents = (0, import_smithy_client.map)({
5374
- $metadata: deserializeMetadata(output)
5375
- });
5376
- await (0, import_smithy_client.collectBody)(output.body, context);
5377
- return contents;
5378
- }, "de_UntagResourceCommand");
5379
- var de_UntagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
5380
- const parsedOutput = {
5381
- ...output,
5382
- body: await parseErrorBody(output.body, context)
5383
- };
5384
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5385
- switch (errorCode) {
5386
- case "AccessDeniedException":
5387
- case "com.amazonaws.clouddirectory#AccessDeniedException":
5388
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5389
- case "InternalServiceException":
5390
- case "com.amazonaws.clouddirectory#InternalServiceException":
5391
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
5392
- case "InvalidArnException":
5393
- case "com.amazonaws.clouddirectory#InvalidArnException":
5394
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
5395
- case "InvalidTaggingRequestException":
5396
- case "com.amazonaws.clouddirectory#InvalidTaggingRequestException":
5397
- throw await de_InvalidTaggingRequestExceptionRes(parsedOutput, context);
5398
- case "LimitExceededException":
5399
- case "com.amazonaws.clouddirectory#LimitExceededException":
5400
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
5401
- case "ResourceNotFoundException":
5402
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
5403
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5404
- case "RetryableConflictException":
5405
- case "com.amazonaws.clouddirectory#RetryableConflictException":
5406
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
5407
- case "ValidationException":
5408
- case "com.amazonaws.clouddirectory#ValidationException":
5409
- throw await de_ValidationExceptionRes(parsedOutput, context);
5410
- default:
5411
- const parsedBody = parsedOutput.body;
5412
- return throwDefaultError({
5413
- output,
5414
- parsedBody,
5415
- errorCode
5416
- });
5417
- }
5418
- }, "de_UntagResourceCommandError");
5419
- var de_UpdateFacetCommand = /* @__PURE__ */ __name(async (output, context) => {
5420
- if (output.statusCode !== 200 && output.statusCode >= 300) {
5421
- return de_UpdateFacetCommandError(output, context);
5422
- }
5423
- const contents = (0, import_smithy_client.map)({
5424
- $metadata: deserializeMetadata(output)
5425
- });
5426
- await (0, import_smithy_client.collectBody)(output.body, context);
5427
- return contents;
5428
- }, "de_UpdateFacetCommand");
5429
- var de_UpdateFacetCommandError = /* @__PURE__ */ __name(async (output, context) => {
5430
- const parsedOutput = {
5431
- ...output,
5432
- body: await parseErrorBody(output.body, context)
5433
- };
5434
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5435
- switch (errorCode) {
5436
- case "AccessDeniedException":
5437
- case "com.amazonaws.clouddirectory#AccessDeniedException":
5438
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5439
- case "FacetNotFoundException":
5440
- case "com.amazonaws.clouddirectory#FacetNotFoundException":
5441
- throw await de_FacetNotFoundExceptionRes(parsedOutput, context);
5442
- case "FacetValidationException":
5443
- case "com.amazonaws.clouddirectory#FacetValidationException":
5444
- throw await de_FacetValidationExceptionRes(parsedOutput, context);
5445
- case "InternalServiceException":
5446
- case "com.amazonaws.clouddirectory#InternalServiceException":
5447
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
5448
- case "InvalidArnException":
5449
- case "com.amazonaws.clouddirectory#InvalidArnException":
5450
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
5451
- case "InvalidFacetUpdateException":
5452
- case "com.amazonaws.clouddirectory#InvalidFacetUpdateException":
5453
- throw await de_InvalidFacetUpdateExceptionRes(parsedOutput, context);
5454
- case "InvalidRuleException":
5455
- case "com.amazonaws.clouddirectory#InvalidRuleException":
5456
- throw await de_InvalidRuleExceptionRes(parsedOutput, context);
5457
- case "LimitExceededException":
5458
- case "com.amazonaws.clouddirectory#LimitExceededException":
5459
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
5460
- case "ResourceNotFoundException":
5461
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
5462
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5463
- case "RetryableConflictException":
5464
- case "com.amazonaws.clouddirectory#RetryableConflictException":
5465
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
5466
- case "ValidationException":
5467
- case "com.amazonaws.clouddirectory#ValidationException":
5468
- throw await de_ValidationExceptionRes(parsedOutput, context);
5469
- default:
5470
- const parsedBody = parsedOutput.body;
5471
- return throwDefaultError({
5472
- output,
5473
- parsedBody,
5474
- errorCode
5475
- });
5476
- }
5477
- }, "de_UpdateFacetCommandError");
5478
- var de_UpdateLinkAttributesCommand = /* @__PURE__ */ __name(async (output, context) => {
5479
- if (output.statusCode !== 200 && output.statusCode >= 300) {
5480
- return de_UpdateLinkAttributesCommandError(output, context);
5481
- }
5482
- const contents = (0, import_smithy_client.map)({
5483
- $metadata: deserializeMetadata(output)
5484
- });
5485
- await (0, import_smithy_client.collectBody)(output.body, context);
5486
- return contents;
5487
- }, "de_UpdateLinkAttributesCommand");
5488
- var de_UpdateLinkAttributesCommandError = /* @__PURE__ */ __name(async (output, context) => {
5489
- const parsedOutput = {
5490
- ...output,
5491
- body: await parseErrorBody(output.body, context)
5492
- };
5493
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5494
- switch (errorCode) {
5495
- case "AccessDeniedException":
5496
- case "com.amazonaws.clouddirectory#AccessDeniedException":
5497
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5498
- case "DirectoryNotEnabledException":
5499
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
5500
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
5501
- case "FacetValidationException":
5502
- case "com.amazonaws.clouddirectory#FacetValidationException":
5503
- throw await de_FacetValidationExceptionRes(parsedOutput, context);
5504
- case "InternalServiceException":
5505
- case "com.amazonaws.clouddirectory#InternalServiceException":
5506
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
5507
- case "InvalidArnException":
5508
- case "com.amazonaws.clouddirectory#InvalidArnException":
5509
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
5510
- case "LimitExceededException":
5511
- case "com.amazonaws.clouddirectory#LimitExceededException":
5512
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
5513
- case "ResourceNotFoundException":
5514
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
5515
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5516
- case "RetryableConflictException":
5517
- case "com.amazonaws.clouddirectory#RetryableConflictException":
5518
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
5519
- case "ValidationException":
5520
- case "com.amazonaws.clouddirectory#ValidationException":
5521
- throw await de_ValidationExceptionRes(parsedOutput, context);
5522
- default:
5523
- const parsedBody = parsedOutput.body;
5524
- return throwDefaultError({
5525
- output,
5526
- parsedBody,
5527
- errorCode
5528
- });
5529
- }
5530
- }, "de_UpdateLinkAttributesCommandError");
5531
- var de_UpdateObjectAttributesCommand = /* @__PURE__ */ __name(async (output, context) => {
5532
- if (output.statusCode !== 200 && output.statusCode >= 300) {
5533
- return de_UpdateObjectAttributesCommandError(output, context);
2906
+ return de_CommandError(output, context);
5534
2907
  }
5535
2908
  const contents = (0, import_smithy_client.map)({
5536
2909
  $metadata: deserializeMetadata(output)
5537
- });
5538
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
5539
- const doc = (0, import_smithy_client.take)(data, {
5540
- ObjectIdentifier: import_smithy_client.expectString
5541
- });
5542
- Object.assign(contents, doc);
5543
- return contents;
5544
- }, "de_UpdateObjectAttributesCommand");
5545
- var de_UpdateObjectAttributesCommandError = /* @__PURE__ */ __name(async (output, context) => {
5546
- const parsedOutput = {
5547
- ...output,
5548
- body: await parseErrorBody(output.body, context)
5549
- };
5550
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5551
- switch (errorCode) {
5552
- case "AccessDeniedException":
5553
- case "com.amazonaws.clouddirectory#AccessDeniedException":
5554
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5555
- case "DirectoryNotEnabledException":
5556
- case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
5557
- throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
5558
- case "FacetValidationException":
5559
- case "com.amazonaws.clouddirectory#FacetValidationException":
5560
- throw await de_FacetValidationExceptionRes(parsedOutput, context);
5561
- case "InternalServiceException":
5562
- case "com.amazonaws.clouddirectory#InternalServiceException":
5563
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
5564
- case "InvalidArnException":
5565
- case "com.amazonaws.clouddirectory#InvalidArnException":
5566
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
5567
- case "LimitExceededException":
5568
- case "com.amazonaws.clouddirectory#LimitExceededException":
5569
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
5570
- case "LinkNameAlreadyInUseException":
5571
- case "com.amazonaws.clouddirectory#LinkNameAlreadyInUseException":
5572
- throw await de_LinkNameAlreadyInUseExceptionRes(parsedOutput, context);
5573
- case "ResourceNotFoundException":
5574
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
5575
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5576
- case "RetryableConflictException":
5577
- case "com.amazonaws.clouddirectory#RetryableConflictException":
5578
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
5579
- case "ValidationException":
5580
- case "com.amazonaws.clouddirectory#ValidationException":
5581
- throw await de_ValidationExceptionRes(parsedOutput, context);
5582
- default:
5583
- const parsedBody = parsedOutput.body;
5584
- return throwDefaultError({
5585
- output,
5586
- parsedBody,
5587
- errorCode
5588
- });
2910
+ });
2911
+ await (0, import_smithy_client.collectBody)(output.body, context);
2912
+ return contents;
2913
+ }, "de_TagResourceCommand");
2914
+ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
2915
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2916
+ return de_CommandError(output, context);
2917
+ }
2918
+ const contents = (0, import_smithy_client.map)({
2919
+ $metadata: deserializeMetadata(output)
2920
+ });
2921
+ await (0, import_smithy_client.collectBody)(output.body, context);
2922
+ return contents;
2923
+ }, "de_UntagResourceCommand");
2924
+ var de_UpdateFacetCommand = /* @__PURE__ */ __name(async (output, context) => {
2925
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2926
+ return de_CommandError(output, context);
2927
+ }
2928
+ const contents = (0, import_smithy_client.map)({
2929
+ $metadata: deserializeMetadata(output)
2930
+ });
2931
+ await (0, import_smithy_client.collectBody)(output.body, context);
2932
+ return contents;
2933
+ }, "de_UpdateFacetCommand");
2934
+ var de_UpdateLinkAttributesCommand = /* @__PURE__ */ __name(async (output, context) => {
2935
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2936
+ return de_CommandError(output, context);
2937
+ }
2938
+ const contents = (0, import_smithy_client.map)({
2939
+ $metadata: deserializeMetadata(output)
2940
+ });
2941
+ await (0, import_smithy_client.collectBody)(output.body, context);
2942
+ return contents;
2943
+ }, "de_UpdateLinkAttributesCommand");
2944
+ var de_UpdateObjectAttributesCommand = /* @__PURE__ */ __name(async (output, context) => {
2945
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2946
+ return de_CommandError(output, context);
5589
2947
  }
5590
- }, "de_UpdateObjectAttributesCommandError");
2948
+ const contents = (0, import_smithy_client.map)({
2949
+ $metadata: deserializeMetadata(output)
2950
+ });
2951
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
2952
+ const doc = (0, import_smithy_client.take)(data, {
2953
+ ObjectIdentifier: import_smithy_client.expectString
2954
+ });
2955
+ Object.assign(contents, doc);
2956
+ return contents;
2957
+ }, "de_UpdateObjectAttributesCommand");
5591
2958
  var de_UpdateSchemaCommand = /* @__PURE__ */ __name(async (output, context) => {
5592
2959
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5593
- return de_UpdateSchemaCommandError(output, context);
2960
+ return de_CommandError(output, context);
5594
2961
  }
5595
2962
  const contents = (0, import_smithy_client.map)({
5596
2963
  $metadata: deserializeMetadata(output)
@@ -5602,46 +2969,9 @@ var de_UpdateSchemaCommand = /* @__PURE__ */ __name(async (output, context) => {
5602
2969
  Object.assign(contents, doc);
5603
2970
  return contents;
5604
2971
  }, "de_UpdateSchemaCommand");
5605
- var de_UpdateSchemaCommandError = /* @__PURE__ */ __name(async (output, context) => {
5606
- const parsedOutput = {
5607
- ...output,
5608
- body: await parseErrorBody(output.body, context)
5609
- };
5610
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5611
- switch (errorCode) {
5612
- case "AccessDeniedException":
5613
- case "com.amazonaws.clouddirectory#AccessDeniedException":
5614
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5615
- case "InternalServiceException":
5616
- case "com.amazonaws.clouddirectory#InternalServiceException":
5617
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
5618
- case "InvalidArnException":
5619
- case "com.amazonaws.clouddirectory#InvalidArnException":
5620
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
5621
- case "LimitExceededException":
5622
- case "com.amazonaws.clouddirectory#LimitExceededException":
5623
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
5624
- case "ResourceNotFoundException":
5625
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
5626
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5627
- case "RetryableConflictException":
5628
- case "com.amazonaws.clouddirectory#RetryableConflictException":
5629
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
5630
- case "ValidationException":
5631
- case "com.amazonaws.clouddirectory#ValidationException":
5632
- throw await de_ValidationExceptionRes(parsedOutput, context);
5633
- default:
5634
- const parsedBody = parsedOutput.body;
5635
- return throwDefaultError({
5636
- output,
5637
- parsedBody,
5638
- errorCode
5639
- });
5640
- }
5641
- }, "de_UpdateSchemaCommandError");
5642
2972
  var de_UpdateTypedLinkFacetCommand = /* @__PURE__ */ __name(async (output, context) => {
5643
2973
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5644
- return de_UpdateTypedLinkFacetCommandError(output, context);
2974
+ return de_CommandError(output, context);
5645
2975
  }
5646
2976
  const contents = (0, import_smithy_client.map)({
5647
2977
  $metadata: deserializeMetadata(output)
@@ -5649,58 +2979,9 @@ var de_UpdateTypedLinkFacetCommand = /* @__PURE__ */ __name(async (output, conte
5649
2979
  await (0, import_smithy_client.collectBody)(output.body, context);
5650
2980
  return contents;
5651
2981
  }, "de_UpdateTypedLinkFacetCommand");
5652
- var de_UpdateTypedLinkFacetCommandError = /* @__PURE__ */ __name(async (output, context) => {
5653
- const parsedOutput = {
5654
- ...output,
5655
- body: await parseErrorBody(output.body, context)
5656
- };
5657
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5658
- switch (errorCode) {
5659
- case "AccessDeniedException":
5660
- case "com.amazonaws.clouddirectory#AccessDeniedException":
5661
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5662
- case "FacetNotFoundException":
5663
- case "com.amazonaws.clouddirectory#FacetNotFoundException":
5664
- throw await de_FacetNotFoundExceptionRes(parsedOutput, context);
5665
- case "FacetValidationException":
5666
- case "com.amazonaws.clouddirectory#FacetValidationException":
5667
- throw await de_FacetValidationExceptionRes(parsedOutput, context);
5668
- case "InternalServiceException":
5669
- case "com.amazonaws.clouddirectory#InternalServiceException":
5670
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
5671
- case "InvalidArnException":
5672
- case "com.amazonaws.clouddirectory#InvalidArnException":
5673
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
5674
- case "InvalidFacetUpdateException":
5675
- case "com.amazonaws.clouddirectory#InvalidFacetUpdateException":
5676
- throw await de_InvalidFacetUpdateExceptionRes(parsedOutput, context);
5677
- case "InvalidRuleException":
5678
- case "com.amazonaws.clouddirectory#InvalidRuleException":
5679
- throw await de_InvalidRuleExceptionRes(parsedOutput, context);
5680
- case "LimitExceededException":
5681
- case "com.amazonaws.clouddirectory#LimitExceededException":
5682
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
5683
- case "ResourceNotFoundException":
5684
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
5685
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5686
- case "RetryableConflictException":
5687
- case "com.amazonaws.clouddirectory#RetryableConflictException":
5688
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
5689
- case "ValidationException":
5690
- case "com.amazonaws.clouddirectory#ValidationException":
5691
- throw await de_ValidationExceptionRes(parsedOutput, context);
5692
- default:
5693
- const parsedBody = parsedOutput.body;
5694
- return throwDefaultError({
5695
- output,
5696
- parsedBody,
5697
- errorCode
5698
- });
5699
- }
5700
- }, "de_UpdateTypedLinkFacetCommandError");
5701
2982
  var de_UpgradeAppliedSchemaCommand = /* @__PURE__ */ __name(async (output, context) => {
5702
2983
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5703
- return de_UpgradeAppliedSchemaCommandError(output, context);
2984
+ return de_CommandError(output, context);
5704
2985
  }
5705
2986
  const contents = (0, import_smithy_client.map)({
5706
2987
  $metadata: deserializeMetadata(output)
@@ -5713,52 +2994,9 @@ var de_UpgradeAppliedSchemaCommand = /* @__PURE__ */ __name(async (output, conte
5713
2994
  Object.assign(contents, doc);
5714
2995
  return contents;
5715
2996
  }, "de_UpgradeAppliedSchemaCommand");
5716
- var de_UpgradeAppliedSchemaCommandError = /* @__PURE__ */ __name(async (output, context) => {
5717
- const parsedOutput = {
5718
- ...output,
5719
- body: await parseErrorBody(output.body, context)
5720
- };
5721
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5722
- switch (errorCode) {
5723
- case "AccessDeniedException":
5724
- case "com.amazonaws.clouddirectory#AccessDeniedException":
5725
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5726
- case "IncompatibleSchemaException":
5727
- case "com.amazonaws.clouddirectory#IncompatibleSchemaException":
5728
- throw await de_IncompatibleSchemaExceptionRes(parsedOutput, context);
5729
- case "InternalServiceException":
5730
- case "com.amazonaws.clouddirectory#InternalServiceException":
5731
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
5732
- case "InvalidArnException":
5733
- case "com.amazonaws.clouddirectory#InvalidArnException":
5734
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
5735
- case "InvalidAttachmentException":
5736
- case "com.amazonaws.clouddirectory#InvalidAttachmentException":
5737
- throw await de_InvalidAttachmentExceptionRes(parsedOutput, context);
5738
- case "ResourceNotFoundException":
5739
- case "com.amazonaws.clouddirectory#ResourceNotFoundException":
5740
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5741
- case "RetryableConflictException":
5742
- case "com.amazonaws.clouddirectory#RetryableConflictException":
5743
- throw await de_RetryableConflictExceptionRes(parsedOutput, context);
5744
- case "SchemaAlreadyExistsException":
5745
- case "com.amazonaws.clouddirectory#SchemaAlreadyExistsException":
5746
- throw await de_SchemaAlreadyExistsExceptionRes(parsedOutput, context);
5747
- case "ValidationException":
5748
- case "com.amazonaws.clouddirectory#ValidationException":
5749
- throw await de_ValidationExceptionRes(parsedOutput, context);
5750
- default:
5751
- const parsedBody = parsedOutput.body;
5752
- return throwDefaultError({
5753
- output,
5754
- parsedBody,
5755
- errorCode
5756
- });
5757
- }
5758
- }, "de_UpgradeAppliedSchemaCommandError");
5759
2997
  var de_UpgradePublishedSchemaCommand = /* @__PURE__ */ __name(async (output, context) => {
5760
2998
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5761
- return de_UpgradePublishedSchemaCommandError(output, context);
2999
+ return de_CommandError(output, context);
5762
3000
  }
5763
3001
  const contents = (0, import_smithy_client.map)({
5764
3002
  $metadata: deserializeMetadata(output)
@@ -5770,7 +3008,7 @@ var de_UpgradePublishedSchemaCommand = /* @__PURE__ */ __name(async (output, con
5770
3008
  Object.assign(contents, doc);
5771
3009
  return contents;
5772
3010
  }, "de_UpgradePublishedSchemaCommand");
5773
- var de_UpgradePublishedSchemaCommandError = /* @__PURE__ */ __name(async (output, context) => {
3011
+ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
5774
3012
  const parsedOutput = {
5775
3013
  ...output,
5776
3014
  body: await parseErrorBody(output.body, context)
@@ -5780,18 +3018,18 @@ var de_UpgradePublishedSchemaCommandError = /* @__PURE__ */ __name(async (output
5780
3018
  case "AccessDeniedException":
5781
3019
  case "com.amazonaws.clouddirectory#AccessDeniedException":
5782
3020
  throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5783
- case "IncompatibleSchemaException":
5784
- case "com.amazonaws.clouddirectory#IncompatibleSchemaException":
5785
- throw await de_IncompatibleSchemaExceptionRes(parsedOutput, context);
3021
+ case "DirectoryNotEnabledException":
3022
+ case "com.amazonaws.clouddirectory#DirectoryNotEnabledException":
3023
+ throw await de_DirectoryNotEnabledExceptionRes(parsedOutput, context);
3024
+ case "FacetValidationException":
3025
+ case "com.amazonaws.clouddirectory#FacetValidationException":
3026
+ throw await de_FacetValidationExceptionRes(parsedOutput, context);
5786
3027
  case "InternalServiceException":
5787
3028
  case "com.amazonaws.clouddirectory#InternalServiceException":
5788
3029
  throw await de_InternalServiceExceptionRes(parsedOutput, context);
5789
3030
  case "InvalidArnException":
5790
3031
  case "com.amazonaws.clouddirectory#InvalidArnException":
5791
3032
  throw await de_InvalidArnExceptionRes(parsedOutput, context);
5792
- case "InvalidAttachmentException":
5793
- case "com.amazonaws.clouddirectory#InvalidAttachmentException":
5794
- throw await de_InvalidAttachmentExceptionRes(parsedOutput, context);
5795
3033
  case "LimitExceededException":
5796
3034
  case "com.amazonaws.clouddirectory#LimitExceededException":
5797
3035
  throw await de_LimitExceededExceptionRes(parsedOutput, context);
@@ -5804,6 +3042,84 @@ var de_UpgradePublishedSchemaCommandError = /* @__PURE__ */ __name(async (output
5804
3042
  case "ValidationException":
5805
3043
  case "com.amazonaws.clouddirectory#ValidationException":
5806
3044
  throw await de_ValidationExceptionRes(parsedOutput, context);
3045
+ case "InvalidAttachmentException":
3046
+ case "com.amazonaws.clouddirectory#InvalidAttachmentException":
3047
+ throw await de_InvalidAttachmentExceptionRes(parsedOutput, context);
3048
+ case "SchemaAlreadyExistsException":
3049
+ case "com.amazonaws.clouddirectory#SchemaAlreadyExistsException":
3050
+ throw await de_SchemaAlreadyExistsExceptionRes(parsedOutput, context);
3051
+ case "LinkNameAlreadyInUseException":
3052
+ case "com.amazonaws.clouddirectory#LinkNameAlreadyInUseException":
3053
+ throw await de_LinkNameAlreadyInUseExceptionRes(parsedOutput, context);
3054
+ case "NotPolicyException":
3055
+ case "com.amazonaws.clouddirectory#NotPolicyException":
3056
+ throw await de_NotPolicyExceptionRes(parsedOutput, context);
3057
+ case "IndexedAttributeMissingException":
3058
+ case "com.amazonaws.clouddirectory#IndexedAttributeMissingException":
3059
+ throw await de_IndexedAttributeMissingExceptionRes(parsedOutput, context);
3060
+ case "NotIndexException":
3061
+ case "com.amazonaws.clouddirectory#NotIndexException":
3062
+ throw await de_NotIndexExceptionRes(parsedOutput, context);
3063
+ case "BatchWriteException":
3064
+ case "com.amazonaws.clouddirectory#BatchWriteException":
3065
+ throw await de_BatchWriteExceptionRes(parsedOutput, context);
3066
+ case "DirectoryAlreadyExistsException":
3067
+ case "com.amazonaws.clouddirectory#DirectoryAlreadyExistsException":
3068
+ throw await de_DirectoryAlreadyExistsExceptionRes(parsedOutput, context);
3069
+ case "FacetAlreadyExistsException":
3070
+ case "com.amazonaws.clouddirectory#FacetAlreadyExistsException":
3071
+ throw await de_FacetAlreadyExistsExceptionRes(parsedOutput, context);
3072
+ case "InvalidRuleException":
3073
+ case "com.amazonaws.clouddirectory#InvalidRuleException":
3074
+ throw await de_InvalidRuleExceptionRes(parsedOutput, context);
3075
+ case "UnsupportedIndexTypeException":
3076
+ case "com.amazonaws.clouddirectory#UnsupportedIndexTypeException":
3077
+ throw await de_UnsupportedIndexTypeExceptionRes(parsedOutput, context);
3078
+ case "DirectoryDeletedException":
3079
+ case "com.amazonaws.clouddirectory#DirectoryDeletedException":
3080
+ throw await de_DirectoryDeletedExceptionRes(parsedOutput, context);
3081
+ case "DirectoryNotDisabledException":
3082
+ case "com.amazonaws.clouddirectory#DirectoryNotDisabledException":
3083
+ throw await de_DirectoryNotDisabledExceptionRes(parsedOutput, context);
3084
+ case "FacetInUseException":
3085
+ case "com.amazonaws.clouddirectory#FacetInUseException":
3086
+ throw await de_FacetInUseExceptionRes(parsedOutput, context);
3087
+ case "FacetNotFoundException":
3088
+ case "com.amazonaws.clouddirectory#FacetNotFoundException":
3089
+ throw await de_FacetNotFoundExceptionRes(parsedOutput, context);
3090
+ case "ObjectNotDetachedException":
3091
+ case "com.amazonaws.clouddirectory#ObjectNotDetachedException":
3092
+ throw await de_ObjectNotDetachedExceptionRes(parsedOutput, context);
3093
+ case "StillContainsLinksException":
3094
+ case "com.amazonaws.clouddirectory#StillContainsLinksException":
3095
+ throw await de_StillContainsLinksExceptionRes(parsedOutput, context);
3096
+ case "ObjectAlreadyDetachedException":
3097
+ case "com.amazonaws.clouddirectory#ObjectAlreadyDetachedException":
3098
+ throw await de_ObjectAlreadyDetachedExceptionRes(parsedOutput, context);
3099
+ case "NotNodeException":
3100
+ case "com.amazonaws.clouddirectory#NotNodeException":
3101
+ throw await de_NotNodeExceptionRes(parsedOutput, context);
3102
+ case "InvalidNextTokenException":
3103
+ case "com.amazonaws.clouddirectory#InvalidNextTokenException":
3104
+ throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
3105
+ case "CannotListParentOfRootException":
3106
+ case "com.amazonaws.clouddirectory#CannotListParentOfRootException":
3107
+ throw await de_CannotListParentOfRootExceptionRes(parsedOutput, context);
3108
+ case "InvalidTaggingRequestException":
3109
+ case "com.amazonaws.clouddirectory#InvalidTaggingRequestException":
3110
+ throw await de_InvalidTaggingRequestExceptionRes(parsedOutput, context);
3111
+ case "SchemaAlreadyPublishedException":
3112
+ case "com.amazonaws.clouddirectory#SchemaAlreadyPublishedException":
3113
+ throw await de_SchemaAlreadyPublishedExceptionRes(parsedOutput, context);
3114
+ case "InvalidSchemaDocException":
3115
+ case "com.amazonaws.clouddirectory#InvalidSchemaDocException":
3116
+ throw await de_InvalidSchemaDocExceptionRes(parsedOutput, context);
3117
+ case "InvalidFacetUpdateException":
3118
+ case "com.amazonaws.clouddirectory#InvalidFacetUpdateException":
3119
+ throw await de_InvalidFacetUpdateExceptionRes(parsedOutput, context);
3120
+ case "IncompatibleSchemaException":
3121
+ case "com.amazonaws.clouddirectory#IncompatibleSchemaException":
3122
+ throw await de_IncompatibleSchemaExceptionRes(parsedOutput, context);
5807
3123
  default:
5808
3124
  const parsedBody = parsedOutput.body;
5809
3125
  return throwDefaultError({
@@ -5812,7 +3128,7 @@ var de_UpgradePublishedSchemaCommandError = /* @__PURE__ */ __name(async (output
5812
3128
  errorCode
5813
3129
  });
5814
3130
  }
5815
- }, "de_UpgradePublishedSchemaCommandError");
3131
+ }, "de_CommandError");
5816
3132
  var throwDefaultError = (0, import_smithy_client.withBaseException)(CloudDirectoryServiceException);
5817
3133
  var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
5818
3134
  const contents = (0, import_smithy_client.map)({});