@aws-sdk/client-backup 3.216.0 → 3.222.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/README.md +7 -7
- package/dist-cjs/Backup.js +90 -0
- package/dist-cjs/commands/CancelLegalHoldCommand.js +46 -0
- package/dist-cjs/commands/CreateLegalHoldCommand.js +46 -0
- package/dist-cjs/commands/DisassociateRecoveryPointFromParentCommand.js +46 -0
- package/dist-cjs/commands/GetLegalHoldCommand.js +46 -0
- package/dist-cjs/commands/ListLegalHoldsCommand.js +46 -0
- package/dist-cjs/commands/ListRecoveryPointsByLegalHoldCommand.js +46 -0
- package/dist-cjs/commands/index.js +6 -0
- package/dist-cjs/endpoint/ruleset.js +1 -1
- package/dist-cjs/models/models_0.js +116 -46
- package/dist-cjs/pagination/ListLegalHoldsPaginator.js +36 -0
- package/dist-cjs/pagination/ListRecoveryPointsByLegalHoldPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +2 -0
- package/dist-cjs/protocols/Aws_restJson1.js +615 -3
- package/dist-es/Backup.js +90 -0
- package/dist-es/commands/CancelLegalHoldCommand.js +42 -0
- package/dist-es/commands/CreateLegalHoldCommand.js +42 -0
- package/dist-es/commands/DisassociateRecoveryPointFromParentCommand.js +42 -0
- package/dist-es/commands/GetLegalHoldCommand.js +42 -0
- package/dist-es/commands/ListLegalHoldsCommand.js +42 -0
- package/dist-es/commands/ListRecoveryPointsByLegalHoldCommand.js +42 -0
- package/dist-es/commands/index.js +6 -0
- package/dist-es/endpoint/ruleset.js +1 -1
- package/dist-es/models/models_0.js +90 -35
- package/dist-es/pagination/ListLegalHoldsPaginator.js +32 -0
- package/dist-es/pagination/ListRecoveryPointsByLegalHoldPaginator.js +32 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +600 -0
- package/dist-types/Backup.d.ts +63 -0
- package/dist-types/BackupClient.d.ts +8 -2
- package/dist-types/commands/CancelLegalHoldCommand.d.ts +38 -0
- package/dist-types/commands/CreateLegalHoldCommand.d.ts +40 -0
- package/dist-types/commands/DeleteRecoveryPointCommand.d.ts +10 -0
- package/dist-types/commands/DisassociateRecoveryPointFromParentCommand.d.ts +38 -0
- package/dist-types/commands/GetLegalHoldCommand.d.ts +38 -0
- package/dist-types/commands/ListLegalHoldsCommand.d.ts +37 -0
- package/dist-types/commands/ListRecoveryPointsByLegalHoldCommand.d.ts +38 -0
- package/dist-types/commands/StopBackupJobCommand.d.ts +4 -0
- package/dist-types/commands/index.d.ts +6 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
- package/dist-types/models/models_0.d.ts +653 -128
- package/dist-types/pagination/ListLegalHoldsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListRecoveryPointsByLegalHoldPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
- package/dist-types/ts3.4/Backup.d.ts +108 -0
- package/dist-types/ts3.4/BackupClient.d.ts +36 -0
- package/dist-types/ts3.4/commands/CancelLegalHoldCommand.d.ts +37 -0
- package/dist-types/ts3.4/commands/CreateLegalHoldCommand.d.ts +37 -0
- package/dist-types/ts3.4/commands/DisassociateRecoveryPointFromParentCommand.d.ts +37 -0
- package/dist-types/ts3.4/commands/GetLegalHoldCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/ListLegalHoldsCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/ListRecoveryPointsByLegalHoldCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/index.d.ts +6 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
- package/dist-types/ts3.4/models/models_0.d.ts +210 -55
- package/dist-types/ts3.4/pagination/ListLegalHoldsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListRecoveryPointsByLegalHoldPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +72 -0
- package/package.json +29 -28
|
@@ -1,13 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.deserializeAws_restJson1UpdateReportPlanCommand = exports.deserializeAws_restJson1UpdateRegionSettingsCommand = exports.deserializeAws_restJson1UpdateRecoveryPointLifecycleCommand = exports.deserializeAws_restJson1UpdateGlobalSettingsCommand = exports.deserializeAws_restJson1UpdateFrameworkCommand = exports.deserializeAws_restJson1UpdateBackupPlanCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StopBackupJobCommand = exports.deserializeAws_restJson1StartRestoreJobCommand = exports.deserializeAws_restJson1StartReportJobCommand = exports.deserializeAws_restJson1StartCopyJobCommand = exports.deserializeAws_restJson1StartBackupJobCommand = exports.deserializeAws_restJson1PutBackupVaultNotificationsCommand = exports.deserializeAws_restJson1PutBackupVaultLockConfigurationCommand = exports.deserializeAws_restJson1PutBackupVaultAccessPolicyCommand = exports.deserializeAws_restJson1ListTagsCommand = exports.deserializeAws_restJson1ListRestoreJobsCommand = exports.deserializeAws_restJson1ListReportPlansCommand = exports.deserializeAws_restJson1ListReportJobsCommand = exports.deserializeAws_restJson1ListRecoveryPointsByResourceCommand = exports.deserializeAws_restJson1ListRecoveryPointsByBackupVaultCommand = exports.deserializeAws_restJson1ListProtectedResourcesCommand = exports.deserializeAws_restJson1ListFrameworksCommand = exports.deserializeAws_restJson1ListCopyJobsCommand = exports.deserializeAws_restJson1ListBackupVaultsCommand = exports.deserializeAws_restJson1ListBackupSelectionsCommand = exports.deserializeAws_restJson1ListBackupPlanVersionsCommand = exports.deserializeAws_restJson1ListBackupPlanTemplatesCommand = exports.deserializeAws_restJson1ListBackupPlansCommand = exports.deserializeAws_restJson1ListBackupJobsCommand = exports.deserializeAws_restJson1GetSupportedResourceTypesCommand = void 0;
|
|
3
|
+
exports.serializeAws_restJson1ListRecoveryPointsByBackupVaultCommand = exports.serializeAws_restJson1ListProtectedResourcesCommand = exports.serializeAws_restJson1ListLegalHoldsCommand = exports.serializeAws_restJson1ListFrameworksCommand = exports.serializeAws_restJson1ListCopyJobsCommand = exports.serializeAws_restJson1ListBackupVaultsCommand = exports.serializeAws_restJson1ListBackupSelectionsCommand = exports.serializeAws_restJson1ListBackupPlanVersionsCommand = exports.serializeAws_restJson1ListBackupPlanTemplatesCommand = exports.serializeAws_restJson1ListBackupPlansCommand = exports.serializeAws_restJson1ListBackupJobsCommand = exports.serializeAws_restJson1GetSupportedResourceTypesCommand = exports.serializeAws_restJson1GetRecoveryPointRestoreMetadataCommand = exports.serializeAws_restJson1GetLegalHoldCommand = exports.serializeAws_restJson1GetBackupVaultNotificationsCommand = exports.serializeAws_restJson1GetBackupVaultAccessPolicyCommand = exports.serializeAws_restJson1GetBackupSelectionCommand = exports.serializeAws_restJson1GetBackupPlanFromTemplateCommand = exports.serializeAws_restJson1GetBackupPlanFromJSONCommand = exports.serializeAws_restJson1GetBackupPlanCommand = exports.serializeAws_restJson1ExportBackupPlanTemplateCommand = exports.serializeAws_restJson1DisassociateRecoveryPointFromParentCommand = exports.serializeAws_restJson1DisassociateRecoveryPointCommand = exports.serializeAws_restJson1DescribeRestoreJobCommand = exports.serializeAws_restJson1DescribeReportPlanCommand = exports.serializeAws_restJson1DescribeReportJobCommand = exports.serializeAws_restJson1DescribeRegionSettingsCommand = exports.serializeAws_restJson1DescribeRecoveryPointCommand = exports.serializeAws_restJson1DescribeProtectedResourceCommand = exports.serializeAws_restJson1DescribeGlobalSettingsCommand = exports.serializeAws_restJson1DescribeFrameworkCommand = exports.serializeAws_restJson1DescribeCopyJobCommand = exports.serializeAws_restJson1DescribeBackupVaultCommand = exports.serializeAws_restJson1DescribeBackupJobCommand = exports.serializeAws_restJson1DeleteReportPlanCommand = exports.serializeAws_restJson1DeleteRecoveryPointCommand = exports.serializeAws_restJson1DeleteFrameworkCommand = exports.serializeAws_restJson1DeleteBackupVaultNotificationsCommand = exports.serializeAws_restJson1DeleteBackupVaultLockConfigurationCommand = exports.serializeAws_restJson1DeleteBackupVaultAccessPolicyCommand = exports.serializeAws_restJson1DeleteBackupVaultCommand = exports.serializeAws_restJson1DeleteBackupSelectionCommand = exports.serializeAws_restJson1DeleteBackupPlanCommand = exports.serializeAws_restJson1CreateReportPlanCommand = exports.serializeAws_restJson1CreateLegalHoldCommand = exports.serializeAws_restJson1CreateFrameworkCommand = exports.serializeAws_restJson1CreateBackupVaultCommand = exports.serializeAws_restJson1CreateBackupSelectionCommand = exports.serializeAws_restJson1CreateBackupPlanCommand = exports.serializeAws_restJson1CancelLegalHoldCommand = void 0;
|
|
4
|
+
exports.deserializeAws_restJson1DisassociateRecoveryPointCommand = exports.deserializeAws_restJson1DescribeRestoreJobCommand = exports.deserializeAws_restJson1DescribeReportPlanCommand = exports.deserializeAws_restJson1DescribeReportJobCommand = exports.deserializeAws_restJson1DescribeRegionSettingsCommand = exports.deserializeAws_restJson1DescribeRecoveryPointCommand = exports.deserializeAws_restJson1DescribeProtectedResourceCommand = exports.deserializeAws_restJson1DescribeGlobalSettingsCommand = exports.deserializeAws_restJson1DescribeFrameworkCommand = exports.deserializeAws_restJson1DescribeCopyJobCommand = exports.deserializeAws_restJson1DescribeBackupVaultCommand = exports.deserializeAws_restJson1DescribeBackupJobCommand = exports.deserializeAws_restJson1DeleteReportPlanCommand = exports.deserializeAws_restJson1DeleteRecoveryPointCommand = exports.deserializeAws_restJson1DeleteFrameworkCommand = exports.deserializeAws_restJson1DeleteBackupVaultNotificationsCommand = exports.deserializeAws_restJson1DeleteBackupVaultLockConfigurationCommand = exports.deserializeAws_restJson1DeleteBackupVaultAccessPolicyCommand = exports.deserializeAws_restJson1DeleteBackupVaultCommand = exports.deserializeAws_restJson1DeleteBackupSelectionCommand = exports.deserializeAws_restJson1DeleteBackupPlanCommand = exports.deserializeAws_restJson1CreateReportPlanCommand = exports.deserializeAws_restJson1CreateLegalHoldCommand = exports.deserializeAws_restJson1CreateFrameworkCommand = exports.deserializeAws_restJson1CreateBackupVaultCommand = exports.deserializeAws_restJson1CreateBackupSelectionCommand = exports.deserializeAws_restJson1CreateBackupPlanCommand = exports.deserializeAws_restJson1CancelLegalHoldCommand = exports.serializeAws_restJson1UpdateReportPlanCommand = exports.serializeAws_restJson1UpdateRegionSettingsCommand = exports.serializeAws_restJson1UpdateRecoveryPointLifecycleCommand = exports.serializeAws_restJson1UpdateGlobalSettingsCommand = exports.serializeAws_restJson1UpdateFrameworkCommand = exports.serializeAws_restJson1UpdateBackupPlanCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StopBackupJobCommand = exports.serializeAws_restJson1StartRestoreJobCommand = exports.serializeAws_restJson1StartReportJobCommand = exports.serializeAws_restJson1StartCopyJobCommand = exports.serializeAws_restJson1StartBackupJobCommand = exports.serializeAws_restJson1PutBackupVaultNotificationsCommand = exports.serializeAws_restJson1PutBackupVaultLockConfigurationCommand = exports.serializeAws_restJson1PutBackupVaultAccessPolicyCommand = exports.serializeAws_restJson1ListTagsCommand = exports.serializeAws_restJson1ListRestoreJobsCommand = exports.serializeAws_restJson1ListReportPlansCommand = exports.serializeAws_restJson1ListReportJobsCommand = exports.serializeAws_restJson1ListRecoveryPointsByResourceCommand = exports.serializeAws_restJson1ListRecoveryPointsByLegalHoldCommand = void 0;
|
|
5
|
+
exports.deserializeAws_restJson1UpdateReportPlanCommand = exports.deserializeAws_restJson1UpdateRegionSettingsCommand = exports.deserializeAws_restJson1UpdateRecoveryPointLifecycleCommand = exports.deserializeAws_restJson1UpdateGlobalSettingsCommand = exports.deserializeAws_restJson1UpdateFrameworkCommand = exports.deserializeAws_restJson1UpdateBackupPlanCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StopBackupJobCommand = exports.deserializeAws_restJson1StartRestoreJobCommand = exports.deserializeAws_restJson1StartReportJobCommand = exports.deserializeAws_restJson1StartCopyJobCommand = exports.deserializeAws_restJson1StartBackupJobCommand = exports.deserializeAws_restJson1PutBackupVaultNotificationsCommand = exports.deserializeAws_restJson1PutBackupVaultLockConfigurationCommand = exports.deserializeAws_restJson1PutBackupVaultAccessPolicyCommand = exports.deserializeAws_restJson1ListTagsCommand = exports.deserializeAws_restJson1ListRestoreJobsCommand = exports.deserializeAws_restJson1ListReportPlansCommand = exports.deserializeAws_restJson1ListReportJobsCommand = exports.deserializeAws_restJson1ListRecoveryPointsByResourceCommand = exports.deserializeAws_restJson1ListRecoveryPointsByLegalHoldCommand = exports.deserializeAws_restJson1ListRecoveryPointsByBackupVaultCommand = exports.deserializeAws_restJson1ListProtectedResourcesCommand = exports.deserializeAws_restJson1ListLegalHoldsCommand = exports.deserializeAws_restJson1ListFrameworksCommand = exports.deserializeAws_restJson1ListCopyJobsCommand = exports.deserializeAws_restJson1ListBackupVaultsCommand = exports.deserializeAws_restJson1ListBackupSelectionsCommand = exports.deserializeAws_restJson1ListBackupPlanVersionsCommand = exports.deserializeAws_restJson1ListBackupPlanTemplatesCommand = exports.deserializeAws_restJson1ListBackupPlansCommand = exports.deserializeAws_restJson1ListBackupJobsCommand = exports.deserializeAws_restJson1GetSupportedResourceTypesCommand = exports.deserializeAws_restJson1GetRecoveryPointRestoreMetadataCommand = exports.deserializeAws_restJson1GetLegalHoldCommand = exports.deserializeAws_restJson1GetBackupVaultNotificationsCommand = exports.deserializeAws_restJson1GetBackupVaultAccessPolicyCommand = exports.deserializeAws_restJson1GetBackupSelectionCommand = exports.deserializeAws_restJson1GetBackupPlanFromTemplateCommand = exports.deserializeAws_restJson1GetBackupPlanFromJSONCommand = exports.deserializeAws_restJson1GetBackupPlanCommand = exports.deserializeAws_restJson1ExportBackupPlanTemplateCommand = exports.deserializeAws_restJson1DisassociateRecoveryPointFromParentCommand = void 0;
|
|
6
6
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
7
7
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
8
8
|
const uuid_1 = require("uuid");
|
|
9
9
|
const BackupServiceException_1 = require("../models/BackupServiceException");
|
|
10
10
|
const models_0_1 = require("../models/models_0");
|
|
11
|
+
const serializeAws_restJson1CancelLegalHoldCommand = async (input, context) => {
|
|
12
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
13
|
+
const headers = {};
|
|
14
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/legal-holds/{LegalHoldId}";
|
|
15
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LegalHoldId", () => input.LegalHoldId, "{LegalHoldId}", false);
|
|
16
|
+
const query = map({
|
|
17
|
+
cancelDescription: [, (0, smithy_client_1.expectNonNull)(input.CancelDescription, `CancelDescription`)],
|
|
18
|
+
retainRecordInDays: [() => input.RetainRecordInDays !== void 0, () => input.RetainRecordInDays.toString()],
|
|
19
|
+
});
|
|
20
|
+
let body;
|
|
21
|
+
return new protocol_http_1.HttpRequest({
|
|
22
|
+
protocol,
|
|
23
|
+
hostname,
|
|
24
|
+
port,
|
|
25
|
+
method: "DELETE",
|
|
26
|
+
headers,
|
|
27
|
+
path: resolvedPath,
|
|
28
|
+
query,
|
|
29
|
+
body,
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
exports.serializeAws_restJson1CancelLegalHoldCommand = serializeAws_restJson1CancelLegalHoldCommand;
|
|
11
33
|
const serializeAws_restJson1CreateBackupPlanCommand = async (input, context) => {
|
|
12
34
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
13
35
|
const headers = {
|
|
@@ -111,6 +133,33 @@ const serializeAws_restJson1CreateFrameworkCommand = async (input, context) => {
|
|
|
111
133
|
});
|
|
112
134
|
};
|
|
113
135
|
exports.serializeAws_restJson1CreateFrameworkCommand = serializeAws_restJson1CreateFrameworkCommand;
|
|
136
|
+
const serializeAws_restJson1CreateLegalHoldCommand = async (input, context) => {
|
|
137
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
138
|
+
const headers = {
|
|
139
|
+
"content-type": "application/json",
|
|
140
|
+
};
|
|
141
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/legal-holds";
|
|
142
|
+
let body;
|
|
143
|
+
body = JSON.stringify({
|
|
144
|
+
...(input.Description != null && { Description: input.Description }),
|
|
145
|
+
...(input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken }),
|
|
146
|
+
...(input.RecoveryPointSelection != null && {
|
|
147
|
+
RecoveryPointSelection: serializeAws_restJson1RecoveryPointSelection(input.RecoveryPointSelection, context),
|
|
148
|
+
}),
|
|
149
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1Tags(input.Tags, context) }),
|
|
150
|
+
...(input.Title != null && { Title: input.Title }),
|
|
151
|
+
});
|
|
152
|
+
return new protocol_http_1.HttpRequest({
|
|
153
|
+
protocol,
|
|
154
|
+
hostname,
|
|
155
|
+
port,
|
|
156
|
+
method: "POST",
|
|
157
|
+
headers,
|
|
158
|
+
path: resolvedPath,
|
|
159
|
+
body,
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
exports.serializeAws_restJson1CreateLegalHoldCommand = serializeAws_restJson1CreateLegalHoldCommand;
|
|
114
163
|
const serializeAws_restJson1CreateReportPlanCommand = async (input, context) => {
|
|
115
164
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
116
165
|
const headers = {
|
|
@@ -515,6 +564,25 @@ const serializeAws_restJson1DisassociateRecoveryPointCommand = async (input, con
|
|
|
515
564
|
});
|
|
516
565
|
};
|
|
517
566
|
exports.serializeAws_restJson1DisassociateRecoveryPointCommand = serializeAws_restJson1DisassociateRecoveryPointCommand;
|
|
567
|
+
const serializeAws_restJson1DisassociateRecoveryPointFromParentCommand = async (input, context) => {
|
|
568
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
569
|
+
const headers = {};
|
|
570
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
571
|
+
"/backup-vaults/{BackupVaultName}/recovery-points/{RecoveryPointArn}/parentAssociation";
|
|
572
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BackupVaultName", () => input.BackupVaultName, "{BackupVaultName}", false);
|
|
573
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RecoveryPointArn", () => input.RecoveryPointArn, "{RecoveryPointArn}", false);
|
|
574
|
+
let body;
|
|
575
|
+
return new protocol_http_1.HttpRequest({
|
|
576
|
+
protocol,
|
|
577
|
+
hostname,
|
|
578
|
+
port,
|
|
579
|
+
method: "DELETE",
|
|
580
|
+
headers,
|
|
581
|
+
path: resolvedPath,
|
|
582
|
+
body,
|
|
583
|
+
});
|
|
584
|
+
};
|
|
585
|
+
exports.serializeAws_restJson1DisassociateRecoveryPointFromParentCommand = serializeAws_restJson1DisassociateRecoveryPointFromParentCommand;
|
|
518
586
|
const serializeAws_restJson1ExportBackupPlanTemplateCommand = async (input, context) => {
|
|
519
587
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
520
588
|
const headers = {};
|
|
@@ -647,6 +715,23 @@ const serializeAws_restJson1GetBackupVaultNotificationsCommand = async (input, c
|
|
|
647
715
|
});
|
|
648
716
|
};
|
|
649
717
|
exports.serializeAws_restJson1GetBackupVaultNotificationsCommand = serializeAws_restJson1GetBackupVaultNotificationsCommand;
|
|
718
|
+
const serializeAws_restJson1GetLegalHoldCommand = async (input, context) => {
|
|
719
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
720
|
+
const headers = {};
|
|
721
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/legal-holds/{LegalHoldId}";
|
|
722
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LegalHoldId", () => input.LegalHoldId, "{LegalHoldId}", false);
|
|
723
|
+
let body;
|
|
724
|
+
return new protocol_http_1.HttpRequest({
|
|
725
|
+
protocol,
|
|
726
|
+
hostname,
|
|
727
|
+
port,
|
|
728
|
+
method: "GET",
|
|
729
|
+
headers,
|
|
730
|
+
path: resolvedPath,
|
|
731
|
+
body,
|
|
732
|
+
});
|
|
733
|
+
};
|
|
734
|
+
exports.serializeAws_restJson1GetLegalHoldCommand = serializeAws_restJson1GetLegalHoldCommand;
|
|
650
735
|
const serializeAws_restJson1GetRecoveryPointRestoreMetadataCommand = async (input, context) => {
|
|
651
736
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
652
737
|
const headers = {};
|
|
@@ -713,6 +798,7 @@ const serializeAws_restJson1ListBackupJobsCommand = async (input, context) => {
|
|
|
713
798
|
() => input.ByCompleteBefore !== void 0,
|
|
714
799
|
() => (input.ByCompleteBefore.toISOString().split(".")[0] + "Z").toString(),
|
|
715
800
|
],
|
|
801
|
+
parentJobId: [, input.ByParentJobId],
|
|
716
802
|
});
|
|
717
803
|
let body;
|
|
718
804
|
return new protocol_http_1.HttpRequest({
|
|
@@ -863,6 +949,7 @@ const serializeAws_restJson1ListCopyJobsCommand = async (input, context) => {
|
|
|
863
949
|
() => input.ByCompleteAfter !== void 0,
|
|
864
950
|
() => (input.ByCompleteAfter.toISOString().split(".")[0] + "Z").toString(),
|
|
865
951
|
],
|
|
952
|
+
parentJobId: [, input.ByParentJobId],
|
|
866
953
|
});
|
|
867
954
|
let body;
|
|
868
955
|
return new protocol_http_1.HttpRequest({
|
|
@@ -898,6 +985,27 @@ const serializeAws_restJson1ListFrameworksCommand = async (input, context) => {
|
|
|
898
985
|
});
|
|
899
986
|
};
|
|
900
987
|
exports.serializeAws_restJson1ListFrameworksCommand = serializeAws_restJson1ListFrameworksCommand;
|
|
988
|
+
const serializeAws_restJson1ListLegalHoldsCommand = async (input, context) => {
|
|
989
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
990
|
+
const headers = {};
|
|
991
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/legal-holds";
|
|
992
|
+
const query = map({
|
|
993
|
+
nextToken: [, input.NextToken],
|
|
994
|
+
maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
995
|
+
});
|
|
996
|
+
let body;
|
|
997
|
+
return new protocol_http_1.HttpRequest({
|
|
998
|
+
protocol,
|
|
999
|
+
hostname,
|
|
1000
|
+
port,
|
|
1001
|
+
method: "GET",
|
|
1002
|
+
headers,
|
|
1003
|
+
path: resolvedPath,
|
|
1004
|
+
query,
|
|
1005
|
+
body,
|
|
1006
|
+
});
|
|
1007
|
+
};
|
|
1008
|
+
exports.serializeAws_restJson1ListLegalHoldsCommand = serializeAws_restJson1ListLegalHoldsCommand;
|
|
901
1009
|
const serializeAws_restJson1ListProtectedResourcesCommand = async (input, context) => {
|
|
902
1010
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
903
1011
|
const headers = {};
|
|
@@ -939,6 +1047,7 @@ const serializeAws_restJson1ListRecoveryPointsByBackupVaultCommand = async (inpu
|
|
|
939
1047
|
() => input.ByCreatedAfter !== void 0,
|
|
940
1048
|
() => (input.ByCreatedAfter.toISOString().split(".")[0] + "Z").toString(),
|
|
941
1049
|
],
|
|
1050
|
+
parentRecoveryPointArn: [, input.ByParentRecoveryPointArn],
|
|
942
1051
|
});
|
|
943
1052
|
let body;
|
|
944
1053
|
return new protocol_http_1.HttpRequest({
|
|
@@ -953,6 +1062,29 @@ const serializeAws_restJson1ListRecoveryPointsByBackupVaultCommand = async (inpu
|
|
|
953
1062
|
});
|
|
954
1063
|
};
|
|
955
1064
|
exports.serializeAws_restJson1ListRecoveryPointsByBackupVaultCommand = serializeAws_restJson1ListRecoveryPointsByBackupVaultCommand;
|
|
1065
|
+
const serializeAws_restJson1ListRecoveryPointsByLegalHoldCommand = async (input, context) => {
|
|
1066
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1067
|
+
const headers = {};
|
|
1068
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1069
|
+
"/legal-holds/{LegalHoldId}/recovery-points";
|
|
1070
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LegalHoldId", () => input.LegalHoldId, "{LegalHoldId}", false);
|
|
1071
|
+
const query = map({
|
|
1072
|
+
nextToken: [, input.NextToken],
|
|
1073
|
+
maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
1074
|
+
});
|
|
1075
|
+
let body;
|
|
1076
|
+
return new protocol_http_1.HttpRequest({
|
|
1077
|
+
protocol,
|
|
1078
|
+
hostname,
|
|
1079
|
+
port,
|
|
1080
|
+
method: "GET",
|
|
1081
|
+
headers,
|
|
1082
|
+
path: resolvedPath,
|
|
1083
|
+
query,
|
|
1084
|
+
body,
|
|
1085
|
+
});
|
|
1086
|
+
};
|
|
1087
|
+
exports.serializeAws_restJson1ListRecoveryPointsByLegalHoldCommand = serializeAws_restJson1ListRecoveryPointsByLegalHoldCommand;
|
|
956
1088
|
const serializeAws_restJson1ListRecoveryPointsByResourceCommand = async (input, context) => {
|
|
957
1089
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
958
1090
|
const headers = {};
|
|
@@ -1479,6 +1611,49 @@ const serializeAws_restJson1UpdateReportPlanCommand = async (input, context) =>
|
|
|
1479
1611
|
});
|
|
1480
1612
|
};
|
|
1481
1613
|
exports.serializeAws_restJson1UpdateReportPlanCommand = serializeAws_restJson1UpdateReportPlanCommand;
|
|
1614
|
+
const deserializeAws_restJson1CancelLegalHoldCommand = async (output, context) => {
|
|
1615
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1616
|
+
return deserializeAws_restJson1CancelLegalHoldCommandError(output, context);
|
|
1617
|
+
}
|
|
1618
|
+
const contents = map({
|
|
1619
|
+
$metadata: deserializeMetadata(output),
|
|
1620
|
+
});
|
|
1621
|
+
await collectBody(output.body, context);
|
|
1622
|
+
return contents;
|
|
1623
|
+
};
|
|
1624
|
+
exports.deserializeAws_restJson1CancelLegalHoldCommand = deserializeAws_restJson1CancelLegalHoldCommand;
|
|
1625
|
+
const deserializeAws_restJson1CancelLegalHoldCommandError = async (output, context) => {
|
|
1626
|
+
const parsedOutput = {
|
|
1627
|
+
...output,
|
|
1628
|
+
body: await parseErrorBody(output.body, context),
|
|
1629
|
+
};
|
|
1630
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1631
|
+
switch (errorCode) {
|
|
1632
|
+
case "InvalidParameterValueException":
|
|
1633
|
+
case "com.amazonaws.backup#InvalidParameterValueException":
|
|
1634
|
+
throw await deserializeAws_restJson1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
1635
|
+
case "InvalidResourceStateException":
|
|
1636
|
+
case "com.amazonaws.backup#InvalidResourceStateException":
|
|
1637
|
+
throw await deserializeAws_restJson1InvalidResourceStateExceptionResponse(parsedOutput, context);
|
|
1638
|
+
case "MissingParameterValueException":
|
|
1639
|
+
case "com.amazonaws.backup#MissingParameterValueException":
|
|
1640
|
+
throw await deserializeAws_restJson1MissingParameterValueExceptionResponse(parsedOutput, context);
|
|
1641
|
+
case "ResourceNotFoundException":
|
|
1642
|
+
case "com.amazonaws.backup#ResourceNotFoundException":
|
|
1643
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1644
|
+
case "ServiceUnavailableException":
|
|
1645
|
+
case "com.amazonaws.backup#ServiceUnavailableException":
|
|
1646
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1647
|
+
default:
|
|
1648
|
+
const parsedBody = parsedOutput.body;
|
|
1649
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1650
|
+
output,
|
|
1651
|
+
parsedBody,
|
|
1652
|
+
exceptionCtor: BackupServiceException_1.BackupServiceException,
|
|
1653
|
+
errorCode,
|
|
1654
|
+
});
|
|
1655
|
+
}
|
|
1656
|
+
};
|
|
1482
1657
|
const deserializeAws_restJson1CreateBackupPlanCommand = async (output, context) => {
|
|
1483
1658
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1484
1659
|
return deserializeAws_restJson1CreateBackupPlanCommandError(output, context);
|
|
@@ -1690,6 +1865,67 @@ const deserializeAws_restJson1CreateFrameworkCommandError = async (output, conte
|
|
|
1690
1865
|
});
|
|
1691
1866
|
}
|
|
1692
1867
|
};
|
|
1868
|
+
const deserializeAws_restJson1CreateLegalHoldCommand = async (output, context) => {
|
|
1869
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1870
|
+
return deserializeAws_restJson1CreateLegalHoldCommandError(output, context);
|
|
1871
|
+
}
|
|
1872
|
+
const contents = map({
|
|
1873
|
+
$metadata: deserializeMetadata(output),
|
|
1874
|
+
});
|
|
1875
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1876
|
+
if (data.CreationDate != null) {
|
|
1877
|
+
contents.CreationDate = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationDate)));
|
|
1878
|
+
}
|
|
1879
|
+
if (data.Description != null) {
|
|
1880
|
+
contents.Description = (0, smithy_client_1.expectString)(data.Description);
|
|
1881
|
+
}
|
|
1882
|
+
if (data.LegalHoldArn != null) {
|
|
1883
|
+
contents.LegalHoldArn = (0, smithy_client_1.expectString)(data.LegalHoldArn);
|
|
1884
|
+
}
|
|
1885
|
+
if (data.LegalHoldId != null) {
|
|
1886
|
+
contents.LegalHoldId = (0, smithy_client_1.expectString)(data.LegalHoldId);
|
|
1887
|
+
}
|
|
1888
|
+
if (data.RecoveryPointSelection != null) {
|
|
1889
|
+
contents.RecoveryPointSelection = deserializeAws_restJson1RecoveryPointSelection(data.RecoveryPointSelection, context);
|
|
1890
|
+
}
|
|
1891
|
+
if (data.Status != null) {
|
|
1892
|
+
contents.Status = (0, smithy_client_1.expectString)(data.Status);
|
|
1893
|
+
}
|
|
1894
|
+
if (data.Title != null) {
|
|
1895
|
+
contents.Title = (0, smithy_client_1.expectString)(data.Title);
|
|
1896
|
+
}
|
|
1897
|
+
return contents;
|
|
1898
|
+
};
|
|
1899
|
+
exports.deserializeAws_restJson1CreateLegalHoldCommand = deserializeAws_restJson1CreateLegalHoldCommand;
|
|
1900
|
+
const deserializeAws_restJson1CreateLegalHoldCommandError = async (output, context) => {
|
|
1901
|
+
const parsedOutput = {
|
|
1902
|
+
...output,
|
|
1903
|
+
body: await parseErrorBody(output.body, context),
|
|
1904
|
+
};
|
|
1905
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1906
|
+
switch (errorCode) {
|
|
1907
|
+
case "InvalidParameterValueException":
|
|
1908
|
+
case "com.amazonaws.backup#InvalidParameterValueException":
|
|
1909
|
+
throw await deserializeAws_restJson1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
1910
|
+
case "LimitExceededException":
|
|
1911
|
+
case "com.amazonaws.backup#LimitExceededException":
|
|
1912
|
+
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
1913
|
+
case "MissingParameterValueException":
|
|
1914
|
+
case "com.amazonaws.backup#MissingParameterValueException":
|
|
1915
|
+
throw await deserializeAws_restJson1MissingParameterValueExceptionResponse(parsedOutput, context);
|
|
1916
|
+
case "ServiceUnavailableException":
|
|
1917
|
+
case "com.amazonaws.backup#ServiceUnavailableException":
|
|
1918
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1919
|
+
default:
|
|
1920
|
+
const parsedBody = parsedOutput.body;
|
|
1921
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1922
|
+
output,
|
|
1923
|
+
parsedBody,
|
|
1924
|
+
exceptionCtor: BackupServiceException_1.BackupServiceException,
|
|
1925
|
+
errorCode,
|
|
1926
|
+
});
|
|
1927
|
+
}
|
|
1928
|
+
};
|
|
1693
1929
|
const deserializeAws_restJson1CreateReportPlanCommand = async (output, context) => {
|
|
1694
1930
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1695
1931
|
return deserializeAws_restJson1CreateReportPlanCommandError(output, context);
|
|
@@ -2167,6 +2403,9 @@ const deserializeAws_restJson1DescribeBackupJobCommand = async (output, context)
|
|
|
2167
2403
|
if (data.BytesTransferred != null) {
|
|
2168
2404
|
contents.BytesTransferred = (0, smithy_client_1.expectLong)(data.BytesTransferred);
|
|
2169
2405
|
}
|
|
2406
|
+
if (data.ChildJobsInState != null) {
|
|
2407
|
+
contents.ChildJobsInState = deserializeAws_restJson1BackupJobChildJobsInState(data.ChildJobsInState, context);
|
|
2408
|
+
}
|
|
2170
2409
|
if (data.CompletionDate != null) {
|
|
2171
2410
|
contents.CompletionDate = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CompletionDate)));
|
|
2172
2411
|
}
|
|
@@ -2182,6 +2421,15 @@ const deserializeAws_restJson1DescribeBackupJobCommand = async (output, context)
|
|
|
2182
2421
|
if (data.IamRoleArn != null) {
|
|
2183
2422
|
contents.IamRoleArn = (0, smithy_client_1.expectString)(data.IamRoleArn);
|
|
2184
2423
|
}
|
|
2424
|
+
if (data.IsParent != null) {
|
|
2425
|
+
contents.IsParent = (0, smithy_client_1.expectBoolean)(data.IsParent);
|
|
2426
|
+
}
|
|
2427
|
+
if (data.NumberOfChildJobs != null) {
|
|
2428
|
+
contents.NumberOfChildJobs = (0, smithy_client_1.expectLong)(data.NumberOfChildJobs);
|
|
2429
|
+
}
|
|
2430
|
+
if (data.ParentJobId != null) {
|
|
2431
|
+
contents.ParentJobId = (0, smithy_client_1.expectString)(data.ParentJobId);
|
|
2432
|
+
}
|
|
2185
2433
|
if (data.PercentDone != null) {
|
|
2186
2434
|
contents.PercentDone = (0, smithy_client_1.expectString)(data.PercentDone);
|
|
2187
2435
|
}
|
|
@@ -2527,6 +2775,9 @@ const deserializeAws_restJson1DescribeRecoveryPointCommand = async (output, cont
|
|
|
2527
2775
|
if (data.CompletionDate != null) {
|
|
2528
2776
|
contents.CompletionDate = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CompletionDate)));
|
|
2529
2777
|
}
|
|
2778
|
+
if (data.CompositeMemberIdentifier != null) {
|
|
2779
|
+
contents.CompositeMemberIdentifier = (0, smithy_client_1.expectString)(data.CompositeMemberIdentifier);
|
|
2780
|
+
}
|
|
2530
2781
|
if (data.CreatedBy != null) {
|
|
2531
2782
|
contents.CreatedBy = deserializeAws_restJson1RecoveryPointCreator(data.CreatedBy, context);
|
|
2532
2783
|
}
|
|
@@ -2542,12 +2793,18 @@ const deserializeAws_restJson1DescribeRecoveryPointCommand = async (output, cont
|
|
|
2542
2793
|
if (data.IsEncrypted != null) {
|
|
2543
2794
|
contents.IsEncrypted = (0, smithy_client_1.expectBoolean)(data.IsEncrypted);
|
|
2544
2795
|
}
|
|
2796
|
+
if (data.IsParent != null) {
|
|
2797
|
+
contents.IsParent = (0, smithy_client_1.expectBoolean)(data.IsParent);
|
|
2798
|
+
}
|
|
2545
2799
|
if (data.LastRestoreTime != null) {
|
|
2546
2800
|
contents.LastRestoreTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastRestoreTime)));
|
|
2547
2801
|
}
|
|
2548
2802
|
if (data.Lifecycle != null) {
|
|
2549
2803
|
contents.Lifecycle = deserializeAws_restJson1Lifecycle(data.Lifecycle, context);
|
|
2550
2804
|
}
|
|
2805
|
+
if (data.ParentRecoveryPointArn != null) {
|
|
2806
|
+
contents.ParentRecoveryPointArn = (0, smithy_client_1.expectString)(data.ParentRecoveryPointArn);
|
|
2807
|
+
}
|
|
2551
2808
|
if (data.RecoveryPointArn != null) {
|
|
2552
2809
|
contents.RecoveryPointArn = (0, smithy_client_1.expectString)(data.RecoveryPointArn);
|
|
2553
2810
|
}
|
|
@@ -2849,6 +3106,49 @@ const deserializeAws_restJson1DisassociateRecoveryPointCommandError = async (out
|
|
|
2849
3106
|
});
|
|
2850
3107
|
}
|
|
2851
3108
|
};
|
|
3109
|
+
const deserializeAws_restJson1DisassociateRecoveryPointFromParentCommand = async (output, context) => {
|
|
3110
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
3111
|
+
return deserializeAws_restJson1DisassociateRecoveryPointFromParentCommandError(output, context);
|
|
3112
|
+
}
|
|
3113
|
+
const contents = map({
|
|
3114
|
+
$metadata: deserializeMetadata(output),
|
|
3115
|
+
});
|
|
3116
|
+
await collectBody(output.body, context);
|
|
3117
|
+
return contents;
|
|
3118
|
+
};
|
|
3119
|
+
exports.deserializeAws_restJson1DisassociateRecoveryPointFromParentCommand = deserializeAws_restJson1DisassociateRecoveryPointFromParentCommand;
|
|
3120
|
+
const deserializeAws_restJson1DisassociateRecoveryPointFromParentCommandError = async (output, context) => {
|
|
3121
|
+
const parsedOutput = {
|
|
3122
|
+
...output,
|
|
3123
|
+
body: await parseErrorBody(output.body, context),
|
|
3124
|
+
};
|
|
3125
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3126
|
+
switch (errorCode) {
|
|
3127
|
+
case "InvalidParameterValueException":
|
|
3128
|
+
case "com.amazonaws.backup#InvalidParameterValueException":
|
|
3129
|
+
throw await deserializeAws_restJson1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
3130
|
+
case "InvalidRequestException":
|
|
3131
|
+
case "com.amazonaws.backup#InvalidRequestException":
|
|
3132
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
3133
|
+
case "MissingParameterValueException":
|
|
3134
|
+
case "com.amazonaws.backup#MissingParameterValueException":
|
|
3135
|
+
throw await deserializeAws_restJson1MissingParameterValueExceptionResponse(parsedOutput, context);
|
|
3136
|
+
case "ResourceNotFoundException":
|
|
3137
|
+
case "com.amazonaws.backup#ResourceNotFoundException":
|
|
3138
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
3139
|
+
case "ServiceUnavailableException":
|
|
3140
|
+
case "com.amazonaws.backup#ServiceUnavailableException":
|
|
3141
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3142
|
+
default:
|
|
3143
|
+
const parsedBody = parsedOutput.body;
|
|
3144
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
3145
|
+
output,
|
|
3146
|
+
parsedBody,
|
|
3147
|
+
exceptionCtor: BackupServiceException_1.BackupServiceException,
|
|
3148
|
+
errorCode,
|
|
3149
|
+
});
|
|
3150
|
+
}
|
|
3151
|
+
};
|
|
2852
3152
|
const deserializeAws_restJson1ExportBackupPlanTemplateCommand = async (output, context) => {
|
|
2853
3153
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2854
3154
|
return deserializeAws_restJson1ExportBackupPlanTemplateCommandError(output, context);
|
|
@@ -3204,6 +3504,76 @@ const deserializeAws_restJson1GetBackupVaultNotificationsCommandError = async (o
|
|
|
3204
3504
|
});
|
|
3205
3505
|
}
|
|
3206
3506
|
};
|
|
3507
|
+
const deserializeAws_restJson1GetLegalHoldCommand = async (output, context) => {
|
|
3508
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3509
|
+
return deserializeAws_restJson1GetLegalHoldCommandError(output, context);
|
|
3510
|
+
}
|
|
3511
|
+
const contents = map({
|
|
3512
|
+
$metadata: deserializeMetadata(output),
|
|
3513
|
+
});
|
|
3514
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3515
|
+
if (data.CancelDescription != null) {
|
|
3516
|
+
contents.CancelDescription = (0, smithy_client_1.expectString)(data.CancelDescription);
|
|
3517
|
+
}
|
|
3518
|
+
if (data.CancellationDate != null) {
|
|
3519
|
+
contents.CancellationDate = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CancellationDate)));
|
|
3520
|
+
}
|
|
3521
|
+
if (data.CreationDate != null) {
|
|
3522
|
+
contents.CreationDate = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationDate)));
|
|
3523
|
+
}
|
|
3524
|
+
if (data.Description != null) {
|
|
3525
|
+
contents.Description = (0, smithy_client_1.expectString)(data.Description);
|
|
3526
|
+
}
|
|
3527
|
+
if (data.LegalHoldArn != null) {
|
|
3528
|
+
contents.LegalHoldArn = (0, smithy_client_1.expectString)(data.LegalHoldArn);
|
|
3529
|
+
}
|
|
3530
|
+
if (data.LegalHoldId != null) {
|
|
3531
|
+
contents.LegalHoldId = (0, smithy_client_1.expectString)(data.LegalHoldId);
|
|
3532
|
+
}
|
|
3533
|
+
if (data.RecoveryPointSelection != null) {
|
|
3534
|
+
contents.RecoveryPointSelection = deserializeAws_restJson1RecoveryPointSelection(data.RecoveryPointSelection, context);
|
|
3535
|
+
}
|
|
3536
|
+
if (data.RetainRecordUntil != null) {
|
|
3537
|
+
contents.RetainRecordUntil = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.RetainRecordUntil)));
|
|
3538
|
+
}
|
|
3539
|
+
if (data.Status != null) {
|
|
3540
|
+
contents.Status = (0, smithy_client_1.expectString)(data.Status);
|
|
3541
|
+
}
|
|
3542
|
+
if (data.Title != null) {
|
|
3543
|
+
contents.Title = (0, smithy_client_1.expectString)(data.Title);
|
|
3544
|
+
}
|
|
3545
|
+
return contents;
|
|
3546
|
+
};
|
|
3547
|
+
exports.deserializeAws_restJson1GetLegalHoldCommand = deserializeAws_restJson1GetLegalHoldCommand;
|
|
3548
|
+
const deserializeAws_restJson1GetLegalHoldCommandError = async (output, context) => {
|
|
3549
|
+
const parsedOutput = {
|
|
3550
|
+
...output,
|
|
3551
|
+
body: await parseErrorBody(output.body, context),
|
|
3552
|
+
};
|
|
3553
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3554
|
+
switch (errorCode) {
|
|
3555
|
+
case "InvalidParameterValueException":
|
|
3556
|
+
case "com.amazonaws.backup#InvalidParameterValueException":
|
|
3557
|
+
throw await deserializeAws_restJson1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
3558
|
+
case "MissingParameterValueException":
|
|
3559
|
+
case "com.amazonaws.backup#MissingParameterValueException":
|
|
3560
|
+
throw await deserializeAws_restJson1MissingParameterValueExceptionResponse(parsedOutput, context);
|
|
3561
|
+
case "ResourceNotFoundException":
|
|
3562
|
+
case "com.amazonaws.backup#ResourceNotFoundException":
|
|
3563
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
3564
|
+
case "ServiceUnavailableException":
|
|
3565
|
+
case "com.amazonaws.backup#ServiceUnavailableException":
|
|
3566
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3567
|
+
default:
|
|
3568
|
+
const parsedBody = parsedOutput.body;
|
|
3569
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
3570
|
+
output,
|
|
3571
|
+
parsedBody,
|
|
3572
|
+
exceptionCtor: BackupServiceException_1.BackupServiceException,
|
|
3573
|
+
errorCode,
|
|
3574
|
+
});
|
|
3575
|
+
}
|
|
3576
|
+
};
|
|
3207
3577
|
const deserializeAws_restJson1GetRecoveryPointRestoreMetadataCommand = async (output, context) => {
|
|
3208
3578
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3209
3579
|
return deserializeAws_restJson1GetRecoveryPointRestoreMetadataCommandError(output, context);
|
|
@@ -3637,6 +4007,46 @@ const deserializeAws_restJson1ListFrameworksCommandError = async (output, contex
|
|
|
3637
4007
|
});
|
|
3638
4008
|
}
|
|
3639
4009
|
};
|
|
4010
|
+
const deserializeAws_restJson1ListLegalHoldsCommand = async (output, context) => {
|
|
4011
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4012
|
+
return deserializeAws_restJson1ListLegalHoldsCommandError(output, context);
|
|
4013
|
+
}
|
|
4014
|
+
const contents = map({
|
|
4015
|
+
$metadata: deserializeMetadata(output),
|
|
4016
|
+
});
|
|
4017
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
4018
|
+
if (data.LegalHolds != null) {
|
|
4019
|
+
contents.LegalHolds = deserializeAws_restJson1LegalHoldsList(data.LegalHolds, context);
|
|
4020
|
+
}
|
|
4021
|
+
if (data.NextToken != null) {
|
|
4022
|
+
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
4023
|
+
}
|
|
4024
|
+
return contents;
|
|
4025
|
+
};
|
|
4026
|
+
exports.deserializeAws_restJson1ListLegalHoldsCommand = deserializeAws_restJson1ListLegalHoldsCommand;
|
|
4027
|
+
const deserializeAws_restJson1ListLegalHoldsCommandError = async (output, context) => {
|
|
4028
|
+
const parsedOutput = {
|
|
4029
|
+
...output,
|
|
4030
|
+
body: await parseErrorBody(output.body, context),
|
|
4031
|
+
};
|
|
4032
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4033
|
+
switch (errorCode) {
|
|
4034
|
+
case "InvalidParameterValueException":
|
|
4035
|
+
case "com.amazonaws.backup#InvalidParameterValueException":
|
|
4036
|
+
throw await deserializeAws_restJson1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
4037
|
+
case "ServiceUnavailableException":
|
|
4038
|
+
case "com.amazonaws.backup#ServiceUnavailableException":
|
|
4039
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
4040
|
+
default:
|
|
4041
|
+
const parsedBody = parsedOutput.body;
|
|
4042
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
4043
|
+
output,
|
|
4044
|
+
parsedBody,
|
|
4045
|
+
exceptionCtor: BackupServiceException_1.BackupServiceException,
|
|
4046
|
+
errorCode,
|
|
4047
|
+
});
|
|
4048
|
+
}
|
|
4049
|
+
};
|
|
3640
4050
|
const deserializeAws_restJson1ListProtectedResourcesCommand = async (output, context) => {
|
|
3641
4051
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3642
4052
|
return deserializeAws_restJson1ListProtectedResourcesCommandError(output, context);
|
|
@@ -3723,6 +4133,49 @@ const deserializeAws_restJson1ListRecoveryPointsByBackupVaultCommandError = asyn
|
|
|
3723
4133
|
});
|
|
3724
4134
|
}
|
|
3725
4135
|
};
|
|
4136
|
+
const deserializeAws_restJson1ListRecoveryPointsByLegalHoldCommand = async (output, context) => {
|
|
4137
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4138
|
+
return deserializeAws_restJson1ListRecoveryPointsByLegalHoldCommandError(output, context);
|
|
4139
|
+
}
|
|
4140
|
+
const contents = map({
|
|
4141
|
+
$metadata: deserializeMetadata(output),
|
|
4142
|
+
});
|
|
4143
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
4144
|
+
if (data.NextToken != null) {
|
|
4145
|
+
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
4146
|
+
}
|
|
4147
|
+
if (data.RecoveryPoints != null) {
|
|
4148
|
+
contents.RecoveryPoints = deserializeAws_restJson1RecoveryPointsList(data.RecoveryPoints, context);
|
|
4149
|
+
}
|
|
4150
|
+
return contents;
|
|
4151
|
+
};
|
|
4152
|
+
exports.deserializeAws_restJson1ListRecoveryPointsByLegalHoldCommand = deserializeAws_restJson1ListRecoveryPointsByLegalHoldCommand;
|
|
4153
|
+
const deserializeAws_restJson1ListRecoveryPointsByLegalHoldCommandError = async (output, context) => {
|
|
4154
|
+
const parsedOutput = {
|
|
4155
|
+
...output,
|
|
4156
|
+
body: await parseErrorBody(output.body, context),
|
|
4157
|
+
};
|
|
4158
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4159
|
+
switch (errorCode) {
|
|
4160
|
+
case "InvalidParameterValueException":
|
|
4161
|
+
case "com.amazonaws.backup#InvalidParameterValueException":
|
|
4162
|
+
throw await deserializeAws_restJson1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
4163
|
+
case "MissingParameterValueException":
|
|
4164
|
+
case "com.amazonaws.backup#MissingParameterValueException":
|
|
4165
|
+
throw await deserializeAws_restJson1MissingParameterValueExceptionResponse(parsedOutput, context);
|
|
4166
|
+
case "ServiceUnavailableException":
|
|
4167
|
+
case "com.amazonaws.backup#ServiceUnavailableException":
|
|
4168
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
4169
|
+
default:
|
|
4170
|
+
const parsedBody = parsedOutput.body;
|
|
4171
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
4172
|
+
output,
|
|
4173
|
+
parsedBody,
|
|
4174
|
+
exceptionCtor: BackupServiceException_1.BackupServiceException,
|
|
4175
|
+
errorCode,
|
|
4176
|
+
});
|
|
4177
|
+
}
|
|
4178
|
+
};
|
|
3726
4179
|
const deserializeAws_restJson1ListRecoveryPointsByResourceCommand = async (output, context) => {
|
|
3727
4180
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3728
4181
|
return deserializeAws_restJson1ListRecoveryPointsByResourceCommandError(output, context);
|
|
@@ -3796,6 +4249,9 @@ const deserializeAws_restJson1ListReportJobsCommandError = async (output, contex
|
|
|
3796
4249
|
case "InvalidParameterValueException":
|
|
3797
4250
|
case "com.amazonaws.backup#InvalidParameterValueException":
|
|
3798
4251
|
throw await deserializeAws_restJson1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
4252
|
+
case "ResourceNotFoundException":
|
|
4253
|
+
case "com.amazonaws.backup#ResourceNotFoundException":
|
|
4254
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
3799
4255
|
case "ServiceUnavailableException":
|
|
3800
4256
|
case "com.amazonaws.backup#ServiceUnavailableException":
|
|
3801
4257
|
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
@@ -4078,6 +4534,9 @@ const deserializeAws_restJson1StartBackupJobCommand = async (output, context) =>
|
|
|
4078
4534
|
if (data.CreationDate != null) {
|
|
4079
4535
|
contents.CreationDate = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationDate)));
|
|
4080
4536
|
}
|
|
4537
|
+
if (data.IsParent != null) {
|
|
4538
|
+
contents.IsParent = (0, smithy_client_1.expectBoolean)(data.IsParent);
|
|
4539
|
+
}
|
|
4081
4540
|
if (data.RecoveryPointArn != null) {
|
|
4082
4541
|
contents.RecoveryPointArn = (0, smithy_client_1.expectString)(data.RecoveryPointArn);
|
|
4083
4542
|
}
|
|
@@ -4133,6 +4592,9 @@ const deserializeAws_restJson1StartCopyJobCommand = async (output, context) => {
|
|
|
4133
4592
|
if (data.CreationDate != null) {
|
|
4134
4593
|
contents.CreationDate = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationDate)));
|
|
4135
4594
|
}
|
|
4595
|
+
if (data.IsParent != null) {
|
|
4596
|
+
contents.IsParent = (0, smithy_client_1.expectBoolean)(data.IsParent);
|
|
4597
|
+
}
|
|
4136
4598
|
return contents;
|
|
4137
4599
|
};
|
|
4138
4600
|
exports.deserializeAws_restJson1StartCopyJobCommand = deserializeAws_restJson1StartCopyJobCommand;
|
|
@@ -5051,6 +5513,12 @@ const serializeAws_restJson1CopyActions = (input, context) => {
|
|
|
5051
5513
|
return serializeAws_restJson1CopyAction(entry, context);
|
|
5052
5514
|
});
|
|
5053
5515
|
};
|
|
5516
|
+
const serializeAws_restJson1DateRange = (input, context) => {
|
|
5517
|
+
return {
|
|
5518
|
+
...(input.FromDate != null && { FromDate: Math.round(input.FromDate.getTime() / 1000) }),
|
|
5519
|
+
...(input.ToDate != null && { ToDate: Math.round(input.ToDate.getTime() / 1000) }),
|
|
5520
|
+
};
|
|
5521
|
+
};
|
|
5054
5522
|
const serializeAws_restJson1FormatList = (input, context) => {
|
|
5055
5523
|
return input
|
|
5056
5524
|
.filter((e) => e != null)
|
|
@@ -5107,6 +5575,15 @@ const serializeAws_restJson1Metadata = (input, context) => {
|
|
|
5107
5575
|
return acc;
|
|
5108
5576
|
}, {});
|
|
5109
5577
|
};
|
|
5578
|
+
const serializeAws_restJson1RecoveryPointSelection = (input, context) => {
|
|
5579
|
+
return {
|
|
5580
|
+
...(input.DateRange != null && { DateRange: serializeAws_restJson1DateRange(input.DateRange, context) }),
|
|
5581
|
+
...(input.ResourceIdentifiers != null && {
|
|
5582
|
+
ResourceIdentifiers: serializeAws_restJson1ResourceIdentifiers(input.ResourceIdentifiers, context),
|
|
5583
|
+
}),
|
|
5584
|
+
...(input.VaultNames != null && { VaultNames: serializeAws_restJson1VaultNames(input.VaultNames, context) }),
|
|
5585
|
+
};
|
|
5586
|
+
};
|
|
5110
5587
|
const serializeAws_restJson1ReportDeliveryChannel = (input, context) => {
|
|
5111
5588
|
return {
|
|
5112
5589
|
...(input.Formats != null && { Formats: serializeAws_restJson1FormatList(input.Formats, context) }),
|
|
@@ -5116,10 +5593,15 @@ const serializeAws_restJson1ReportDeliveryChannel = (input, context) => {
|
|
|
5116
5593
|
};
|
|
5117
5594
|
const serializeAws_restJson1ReportSetting = (input, context) => {
|
|
5118
5595
|
return {
|
|
5596
|
+
...(input.Accounts != null && { Accounts: serializeAws_restJson1stringList(input.Accounts, context) }),
|
|
5119
5597
|
...(input.FrameworkArns != null && {
|
|
5120
5598
|
FrameworkArns: serializeAws_restJson1stringList(input.FrameworkArns, context),
|
|
5121
5599
|
}),
|
|
5122
5600
|
...(input.NumberOfFrameworks != null && { NumberOfFrameworks: input.NumberOfFrameworks }),
|
|
5601
|
+
...(input.OrganizationUnits != null && {
|
|
5602
|
+
OrganizationUnits: serializeAws_restJson1stringList(input.OrganizationUnits, context),
|
|
5603
|
+
}),
|
|
5604
|
+
...(input.Regions != null && { Regions: serializeAws_restJson1stringList(input.Regions, context) }),
|
|
5123
5605
|
...(input.ReportTemplate != null && { ReportTemplate: input.ReportTemplate }),
|
|
5124
5606
|
};
|
|
5125
5607
|
};
|
|
@@ -5130,6 +5612,13 @@ const serializeAws_restJson1ResourceArns = (input, context) => {
|
|
|
5130
5612
|
return entry;
|
|
5131
5613
|
});
|
|
5132
5614
|
};
|
|
5615
|
+
const serializeAws_restJson1ResourceIdentifiers = (input, context) => {
|
|
5616
|
+
return input
|
|
5617
|
+
.filter((e) => e != null)
|
|
5618
|
+
.map((entry) => {
|
|
5619
|
+
return entry;
|
|
5620
|
+
});
|
|
5621
|
+
};
|
|
5133
5622
|
const serializeAws_restJson1ResourceTypeList = (input, context) => {
|
|
5134
5623
|
return input
|
|
5135
5624
|
.filter((e) => e != null)
|
|
@@ -5187,6 +5676,13 @@ const serializeAws_restJson1Tags = (input, context) => {
|
|
|
5187
5676
|
return acc;
|
|
5188
5677
|
}, {});
|
|
5189
5678
|
};
|
|
5679
|
+
const serializeAws_restJson1VaultNames = (input, context) => {
|
|
5680
|
+
return input
|
|
5681
|
+
.filter((e) => e != null)
|
|
5682
|
+
.map((entry) => {
|
|
5683
|
+
return entry;
|
|
5684
|
+
});
|
|
5685
|
+
};
|
|
5190
5686
|
const deserializeAws_restJson1AdvancedBackupSetting = (output, context) => {
|
|
5191
5687
|
return {
|
|
5192
5688
|
BackupOptions: output.BackupOptions != null ? deserializeAws_restJson1BackupOptions(output.BackupOptions, context) : undefined,
|
|
@@ -5225,6 +5721,8 @@ const deserializeAws_restJson1BackupJob = (output, context) => {
|
|
|
5225
5721
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ExpectedCompletionDate)))
|
|
5226
5722
|
: undefined,
|
|
5227
5723
|
IamRoleArn: (0, smithy_client_1.expectString)(output.IamRoleArn),
|
|
5724
|
+
IsParent: (0, smithy_client_1.expectBoolean)(output.IsParent),
|
|
5725
|
+
ParentJobId: (0, smithy_client_1.expectString)(output.ParentJobId),
|
|
5228
5726
|
PercentDone: (0, smithy_client_1.expectString)(output.PercentDone),
|
|
5229
5727
|
RecoveryPointArn: (0, smithy_client_1.expectString)(output.RecoveryPointArn),
|
|
5230
5728
|
ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
|
|
@@ -5234,6 +5732,15 @@ const deserializeAws_restJson1BackupJob = (output, context) => {
|
|
|
5234
5732
|
StatusMessage: (0, smithy_client_1.expectString)(output.StatusMessage),
|
|
5235
5733
|
};
|
|
5236
5734
|
};
|
|
5735
|
+
const deserializeAws_restJson1BackupJobChildJobsInState = (output, context) => {
|
|
5736
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
5737
|
+
if (value === null) {
|
|
5738
|
+
return acc;
|
|
5739
|
+
}
|
|
5740
|
+
acc[key] = (0, smithy_client_1.expectLong)(value);
|
|
5741
|
+
return acc;
|
|
5742
|
+
}, {});
|
|
5743
|
+
};
|
|
5237
5744
|
const deserializeAws_restJson1BackupJobsList = (output, context) => {
|
|
5238
5745
|
const retVal = (output || [])
|
|
5239
5746
|
.filter((e) => e != null)
|
|
@@ -5525,9 +6032,13 @@ const deserializeAws_restJson1CopyJob = (output, context) => {
|
|
|
5525
6032
|
return {
|
|
5526
6033
|
AccountId: (0, smithy_client_1.expectString)(output.AccountId),
|
|
5527
6034
|
BackupSizeInBytes: (0, smithy_client_1.expectLong)(output.BackupSizeInBytes),
|
|
6035
|
+
ChildJobsInState: output.ChildJobsInState != null
|
|
6036
|
+
? deserializeAws_restJson1CopyJobChildJobsInState(output.ChildJobsInState, context)
|
|
6037
|
+
: undefined,
|
|
5528
6038
|
CompletionDate: output.CompletionDate != null
|
|
5529
6039
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CompletionDate)))
|
|
5530
6040
|
: undefined,
|
|
6041
|
+
CompositeMemberIdentifier: (0, smithy_client_1.expectString)(output.CompositeMemberIdentifier),
|
|
5531
6042
|
CopyJobId: (0, smithy_client_1.expectString)(output.CopyJobId),
|
|
5532
6043
|
CreatedBy: output.CreatedBy != null ? deserializeAws_restJson1RecoveryPointCreator(output.CreatedBy, context) : undefined,
|
|
5533
6044
|
CreationDate: output.CreationDate != null
|
|
@@ -5536,6 +6047,9 @@ const deserializeAws_restJson1CopyJob = (output, context) => {
|
|
|
5536
6047
|
DestinationBackupVaultArn: (0, smithy_client_1.expectString)(output.DestinationBackupVaultArn),
|
|
5537
6048
|
DestinationRecoveryPointArn: (0, smithy_client_1.expectString)(output.DestinationRecoveryPointArn),
|
|
5538
6049
|
IamRoleArn: (0, smithy_client_1.expectString)(output.IamRoleArn),
|
|
6050
|
+
IsParent: (0, smithy_client_1.expectBoolean)(output.IsParent),
|
|
6051
|
+
NumberOfChildJobs: (0, smithy_client_1.expectLong)(output.NumberOfChildJobs),
|
|
6052
|
+
ParentJobId: (0, smithy_client_1.expectString)(output.ParentJobId),
|
|
5539
6053
|
ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
|
|
5540
6054
|
ResourceType: (0, smithy_client_1.expectString)(output.ResourceType),
|
|
5541
6055
|
SourceBackupVaultArn: (0, smithy_client_1.expectString)(output.SourceBackupVaultArn),
|
|
@@ -5544,6 +6058,15 @@ const deserializeAws_restJson1CopyJob = (output, context) => {
|
|
|
5544
6058
|
StatusMessage: (0, smithy_client_1.expectString)(output.StatusMessage),
|
|
5545
6059
|
};
|
|
5546
6060
|
};
|
|
6061
|
+
const deserializeAws_restJson1CopyJobChildJobsInState = (output, context) => {
|
|
6062
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
6063
|
+
if (value === null) {
|
|
6064
|
+
return acc;
|
|
6065
|
+
}
|
|
6066
|
+
acc[key] = (0, smithy_client_1.expectLong)(value);
|
|
6067
|
+
return acc;
|
|
6068
|
+
}, {});
|
|
6069
|
+
};
|
|
5547
6070
|
const deserializeAws_restJson1CopyJobsList = (output, context) => {
|
|
5548
6071
|
const retVal = (output || [])
|
|
5549
6072
|
.filter((e) => e != null)
|
|
@@ -5555,6 +6078,12 @@ const deserializeAws_restJson1CopyJobsList = (output, context) => {
|
|
|
5555
6078
|
});
|
|
5556
6079
|
return retVal;
|
|
5557
6080
|
};
|
|
6081
|
+
const deserializeAws_restJson1DateRange = (output, context) => {
|
|
6082
|
+
return {
|
|
6083
|
+
FromDate: output.FromDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.FromDate))) : undefined,
|
|
6084
|
+
ToDate: output.ToDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ToDate))) : undefined,
|
|
6085
|
+
};
|
|
6086
|
+
};
|
|
5558
6087
|
const deserializeAws_restJson1FormatList = (output, context) => {
|
|
5559
6088
|
const retVal = (output || [])
|
|
5560
6089
|
.filter((e) => e != null)
|
|
@@ -5618,6 +6147,32 @@ const deserializeAws_restJson1GlobalSettings = (output, context) => {
|
|
|
5618
6147
|
return acc;
|
|
5619
6148
|
}, {});
|
|
5620
6149
|
};
|
|
6150
|
+
const deserializeAws_restJson1LegalHold = (output, context) => {
|
|
6151
|
+
return {
|
|
6152
|
+
CancellationDate: output.CancellationDate != null
|
|
6153
|
+
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CancellationDate)))
|
|
6154
|
+
: undefined,
|
|
6155
|
+
CreationDate: output.CreationDate != null
|
|
6156
|
+
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationDate)))
|
|
6157
|
+
: undefined,
|
|
6158
|
+
Description: (0, smithy_client_1.expectString)(output.Description),
|
|
6159
|
+
LegalHoldArn: (0, smithy_client_1.expectString)(output.LegalHoldArn),
|
|
6160
|
+
LegalHoldId: (0, smithy_client_1.expectString)(output.LegalHoldId),
|
|
6161
|
+
Status: (0, smithy_client_1.expectString)(output.Status),
|
|
6162
|
+
Title: (0, smithy_client_1.expectString)(output.Title),
|
|
6163
|
+
};
|
|
6164
|
+
};
|
|
6165
|
+
const deserializeAws_restJson1LegalHoldsList = (output, context) => {
|
|
6166
|
+
const retVal = (output || [])
|
|
6167
|
+
.filter((e) => e != null)
|
|
6168
|
+
.map((entry) => {
|
|
6169
|
+
if (entry === null) {
|
|
6170
|
+
return null;
|
|
6171
|
+
}
|
|
6172
|
+
return deserializeAws_restJson1LegalHold(entry, context);
|
|
6173
|
+
});
|
|
6174
|
+
return retVal;
|
|
6175
|
+
};
|
|
5621
6176
|
const deserializeAws_restJson1Lifecycle = (output, context) => {
|
|
5622
6177
|
return {
|
|
5623
6178
|
DeleteAfterDays: (0, smithy_client_1.expectLong)(output.DeleteAfterDays),
|
|
@@ -5675,6 +6230,7 @@ const deserializeAws_restJson1RecoveryPointByBackupVault = (output, context) =>
|
|
|
5675
6230
|
CompletionDate: output.CompletionDate != null
|
|
5676
6231
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CompletionDate)))
|
|
5677
6232
|
: undefined,
|
|
6233
|
+
CompositeMemberIdentifier: (0, smithy_client_1.expectString)(output.CompositeMemberIdentifier),
|
|
5678
6234
|
CreatedBy: output.CreatedBy != null ? deserializeAws_restJson1RecoveryPointCreator(output.CreatedBy, context) : undefined,
|
|
5679
6235
|
CreationDate: output.CreationDate != null
|
|
5680
6236
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationDate)))
|
|
@@ -5682,10 +6238,12 @@ const deserializeAws_restJson1RecoveryPointByBackupVault = (output, context) =>
|
|
|
5682
6238
|
EncryptionKeyArn: (0, smithy_client_1.expectString)(output.EncryptionKeyArn),
|
|
5683
6239
|
IamRoleArn: (0, smithy_client_1.expectString)(output.IamRoleArn),
|
|
5684
6240
|
IsEncrypted: (0, smithy_client_1.expectBoolean)(output.IsEncrypted),
|
|
6241
|
+
IsParent: (0, smithy_client_1.expectBoolean)(output.IsParent),
|
|
5685
6242
|
LastRestoreTime: output.LastRestoreTime != null
|
|
5686
6243
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastRestoreTime)))
|
|
5687
6244
|
: undefined,
|
|
5688
6245
|
Lifecycle: output.Lifecycle != null ? deserializeAws_restJson1Lifecycle(output.Lifecycle, context) : undefined,
|
|
6246
|
+
ParentRecoveryPointArn: (0, smithy_client_1.expectString)(output.ParentRecoveryPointArn),
|
|
5689
6247
|
RecoveryPointArn: (0, smithy_client_1.expectString)(output.RecoveryPointArn),
|
|
5690
6248
|
ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
|
|
5691
6249
|
ResourceType: (0, smithy_client_1.expectString)(output.ResourceType),
|
|
@@ -5713,6 +6271,8 @@ const deserializeAws_restJson1RecoveryPointByResource = (output, context) => {
|
|
|
5713
6271
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationDate)))
|
|
5714
6272
|
: undefined,
|
|
5715
6273
|
EncryptionKeyArn: (0, smithy_client_1.expectString)(output.EncryptionKeyArn),
|
|
6274
|
+
IsParent: (0, smithy_client_1.expectBoolean)(output.IsParent),
|
|
6275
|
+
ParentRecoveryPointArn: (0, smithy_client_1.expectString)(output.ParentRecoveryPointArn),
|
|
5716
6276
|
RecoveryPointArn: (0, smithy_client_1.expectString)(output.RecoveryPointArn),
|
|
5717
6277
|
Status: (0, smithy_client_1.expectString)(output.Status),
|
|
5718
6278
|
StatusMessage: (0, smithy_client_1.expectString)(output.StatusMessage),
|
|
@@ -5737,6 +6297,31 @@ const deserializeAws_restJson1RecoveryPointCreator = (output, context) => {
|
|
|
5737
6297
|
BackupRuleId: (0, smithy_client_1.expectString)(output.BackupRuleId),
|
|
5738
6298
|
};
|
|
5739
6299
|
};
|
|
6300
|
+
const deserializeAws_restJson1RecoveryPointMember = (output, context) => {
|
|
6301
|
+
return {
|
|
6302
|
+
RecoveryPointArn: (0, smithy_client_1.expectString)(output.RecoveryPointArn),
|
|
6303
|
+
};
|
|
6304
|
+
};
|
|
6305
|
+
const deserializeAws_restJson1RecoveryPointSelection = (output, context) => {
|
|
6306
|
+
return {
|
|
6307
|
+
DateRange: output.DateRange != null ? deserializeAws_restJson1DateRange(output.DateRange, context) : undefined,
|
|
6308
|
+
ResourceIdentifiers: output.ResourceIdentifiers != null
|
|
6309
|
+
? deserializeAws_restJson1ResourceIdentifiers(output.ResourceIdentifiers, context)
|
|
6310
|
+
: undefined,
|
|
6311
|
+
VaultNames: output.VaultNames != null ? deserializeAws_restJson1VaultNames(output.VaultNames, context) : undefined,
|
|
6312
|
+
};
|
|
6313
|
+
};
|
|
6314
|
+
const deserializeAws_restJson1RecoveryPointsList = (output, context) => {
|
|
6315
|
+
const retVal = (output || [])
|
|
6316
|
+
.filter((e) => e != null)
|
|
6317
|
+
.map((entry) => {
|
|
6318
|
+
if (entry === null) {
|
|
6319
|
+
return null;
|
|
6320
|
+
}
|
|
6321
|
+
return deserializeAws_restJson1RecoveryPointMember(entry, context);
|
|
6322
|
+
});
|
|
6323
|
+
return retVal;
|
|
6324
|
+
};
|
|
5740
6325
|
const deserializeAws_restJson1ReportDeliveryChannel = (output, context) => {
|
|
5741
6326
|
return {
|
|
5742
6327
|
Formats: output.Formats != null ? deserializeAws_restJson1FormatList(output.Formats, context) : undefined,
|
|
@@ -5813,8 +6398,13 @@ const deserializeAws_restJson1ReportPlanList = (output, context) => {
|
|
|
5813
6398
|
};
|
|
5814
6399
|
const deserializeAws_restJson1ReportSetting = (output, context) => {
|
|
5815
6400
|
return {
|
|
6401
|
+
Accounts: output.Accounts != null ? deserializeAws_restJson1stringList(output.Accounts, context) : undefined,
|
|
5816
6402
|
FrameworkArns: output.FrameworkArns != null ? deserializeAws_restJson1stringList(output.FrameworkArns, context) : undefined,
|
|
5817
6403
|
NumberOfFrameworks: (0, smithy_client_1.expectInt32)(output.NumberOfFrameworks),
|
|
6404
|
+
OrganizationUnits: output.OrganizationUnits != null
|
|
6405
|
+
? deserializeAws_restJson1stringList(output.OrganizationUnits, context)
|
|
6406
|
+
: undefined,
|
|
6407
|
+
Regions: output.Regions != null ? deserializeAws_restJson1stringList(output.Regions, context) : undefined,
|
|
5818
6408
|
ReportTemplate: (0, smithy_client_1.expectString)(output.ReportTemplate),
|
|
5819
6409
|
};
|
|
5820
6410
|
};
|
|
@@ -5829,6 +6419,17 @@ const deserializeAws_restJson1ResourceArns = (output, context) => {
|
|
|
5829
6419
|
});
|
|
5830
6420
|
return retVal;
|
|
5831
6421
|
};
|
|
6422
|
+
const deserializeAws_restJson1ResourceIdentifiers = (output, context) => {
|
|
6423
|
+
const retVal = (output || [])
|
|
6424
|
+
.filter((e) => e != null)
|
|
6425
|
+
.map((entry) => {
|
|
6426
|
+
if (entry === null) {
|
|
6427
|
+
return null;
|
|
6428
|
+
}
|
|
6429
|
+
return (0, smithy_client_1.expectString)(entry);
|
|
6430
|
+
});
|
|
6431
|
+
return retVal;
|
|
6432
|
+
};
|
|
5832
6433
|
const deserializeAws_restJson1ResourceTypeList = (output, context) => {
|
|
5833
6434
|
const retVal = (output || [])
|
|
5834
6435
|
.filter((e) => e != null)
|
|
@@ -5930,6 +6531,17 @@ const deserializeAws_restJson1Tags = (output, context) => {
|
|
|
5930
6531
|
return acc;
|
|
5931
6532
|
}, {});
|
|
5932
6533
|
};
|
|
6534
|
+
const deserializeAws_restJson1VaultNames = (output, context) => {
|
|
6535
|
+
const retVal = (output || [])
|
|
6536
|
+
.filter((e) => e != null)
|
|
6537
|
+
.map((entry) => {
|
|
6538
|
+
if (entry === null) {
|
|
6539
|
+
return null;
|
|
6540
|
+
}
|
|
6541
|
+
return (0, smithy_client_1.expectString)(entry);
|
|
6542
|
+
});
|
|
6543
|
+
return retVal;
|
|
6544
|
+
};
|
|
5933
6545
|
const deserializeMetadata = (output) => ({
|
|
5934
6546
|
httpStatusCode: output.statusCode,
|
|
5935
6547
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|