diff --git a/clients/client-cloudwatch/src/commands/DeleteAlarmsCommand.ts b/clients/client-cloudwatch/src/commands/DeleteAlarmsCommand.ts index 862e8c55e627..1eb00338611b 100644 --- a/clients/client-cloudwatch/src/commands/DeleteAlarmsCommand.ts +++ b/clients/client-cloudwatch/src/commands/DeleteAlarmsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DeleteAlarmsInput } from "../models/models_0"; -import { de_DeleteAlarmsCommand, se_DeleteAlarmsCommand } from "../protocols/Aws_query"; +import { de_DeleteAlarmsCommand, se_DeleteAlarmsCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DeleteAnomalyDetectorCommand.ts b/clients/client-cloudwatch/src/commands/DeleteAnomalyDetectorCommand.ts index 1a5b509530b2..98ab48c51601 100644 --- a/clients/client-cloudwatch/src/commands/DeleteAnomalyDetectorCommand.ts +++ b/clients/client-cloudwatch/src/commands/DeleteAnomalyDetectorCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DeleteAnomalyDetectorInput, DeleteAnomalyDetectorOutput } from "../models/models_0"; -import { de_DeleteAnomalyDetectorCommand, se_DeleteAnomalyDetectorCommand } from "../protocols/Aws_query"; +import { de_DeleteAnomalyDetectorCommand, se_DeleteAnomalyDetectorCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DeleteDashboardsCommand.ts b/clients/client-cloudwatch/src/commands/DeleteDashboardsCommand.ts index 6b23a3f1fc9e..ed19acc3dc1b 100644 --- a/clients/client-cloudwatch/src/commands/DeleteDashboardsCommand.ts +++ b/clients/client-cloudwatch/src/commands/DeleteDashboardsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DeleteDashboardsInput, DeleteDashboardsOutput } from "../models/models_0"; -import { de_DeleteDashboardsCommand, se_DeleteDashboardsCommand } from "../protocols/Aws_query"; +import { de_DeleteDashboardsCommand, se_DeleteDashboardsCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DeleteInsightRulesCommand.ts b/clients/client-cloudwatch/src/commands/DeleteInsightRulesCommand.ts index 456fc7ac12ba..711473150345 100644 --- a/clients/client-cloudwatch/src/commands/DeleteInsightRulesCommand.ts +++ b/clients/client-cloudwatch/src/commands/DeleteInsightRulesCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DeleteInsightRulesInput, DeleteInsightRulesOutput } from "../models/models_0"; -import { de_DeleteInsightRulesCommand, se_DeleteInsightRulesCommand } from "../protocols/Aws_query"; +import { de_DeleteInsightRulesCommand, se_DeleteInsightRulesCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DeleteMetricStreamCommand.ts b/clients/client-cloudwatch/src/commands/DeleteMetricStreamCommand.ts index 6f4bd7d8bb7d..12d9a82f8118 100644 --- a/clients/client-cloudwatch/src/commands/DeleteMetricStreamCommand.ts +++ b/clients/client-cloudwatch/src/commands/DeleteMetricStreamCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DeleteMetricStreamInput, DeleteMetricStreamOutput } from "../models/models_0"; -import { de_DeleteMetricStreamCommand, se_DeleteMetricStreamCommand } from "../protocols/Aws_query"; +import { de_DeleteMetricStreamCommand, se_DeleteMetricStreamCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DescribeAlarmHistoryCommand.ts b/clients/client-cloudwatch/src/commands/DescribeAlarmHistoryCommand.ts index cbf07a865aab..1172d6977a0d 100644 --- a/clients/client-cloudwatch/src/commands/DescribeAlarmHistoryCommand.ts +++ b/clients/client-cloudwatch/src/commands/DescribeAlarmHistoryCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DescribeAlarmHistoryInput, DescribeAlarmHistoryOutput } from "../models/models_0"; -import { de_DescribeAlarmHistoryCommand, se_DescribeAlarmHistoryCommand } from "../protocols/Aws_query"; +import { de_DescribeAlarmHistoryCommand, se_DescribeAlarmHistoryCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DescribeAlarmsCommand.ts b/clients/client-cloudwatch/src/commands/DescribeAlarmsCommand.ts index d690646de866..3ced7dfe374d 100644 --- a/clients/client-cloudwatch/src/commands/DescribeAlarmsCommand.ts +++ b/clients/client-cloudwatch/src/commands/DescribeAlarmsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DescribeAlarmsInput, DescribeAlarmsOutput } from "../models/models_0"; -import { de_DescribeAlarmsCommand, se_DescribeAlarmsCommand } from "../protocols/Aws_query"; +import { de_DescribeAlarmsCommand, se_DescribeAlarmsCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DescribeAlarmsForMetricCommand.ts b/clients/client-cloudwatch/src/commands/DescribeAlarmsForMetricCommand.ts index a2b643540c8b..29fc8dc09949 100644 --- a/clients/client-cloudwatch/src/commands/DescribeAlarmsForMetricCommand.ts +++ b/clients/client-cloudwatch/src/commands/DescribeAlarmsForMetricCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DescribeAlarmsForMetricInput, DescribeAlarmsForMetricOutput } from "../models/models_0"; -import { de_DescribeAlarmsForMetricCommand, se_DescribeAlarmsForMetricCommand } from "../protocols/Aws_query"; +import { de_DescribeAlarmsForMetricCommand, se_DescribeAlarmsForMetricCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DescribeAnomalyDetectorsCommand.ts b/clients/client-cloudwatch/src/commands/DescribeAnomalyDetectorsCommand.ts index 6110ff063bb0..4df7a73936ca 100644 --- a/clients/client-cloudwatch/src/commands/DescribeAnomalyDetectorsCommand.ts +++ b/clients/client-cloudwatch/src/commands/DescribeAnomalyDetectorsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DescribeAnomalyDetectorsInput, DescribeAnomalyDetectorsOutput } from "../models/models_0"; -import { de_DescribeAnomalyDetectorsCommand, se_DescribeAnomalyDetectorsCommand } from "../protocols/Aws_query"; +import { de_DescribeAnomalyDetectorsCommand, se_DescribeAnomalyDetectorsCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DescribeInsightRulesCommand.ts b/clients/client-cloudwatch/src/commands/DescribeInsightRulesCommand.ts index a52f130a1e0a..c56c2efa1c07 100644 --- a/clients/client-cloudwatch/src/commands/DescribeInsightRulesCommand.ts +++ b/clients/client-cloudwatch/src/commands/DescribeInsightRulesCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DescribeInsightRulesInput, DescribeInsightRulesOutput } from "../models/models_0"; -import { de_DescribeInsightRulesCommand, se_DescribeInsightRulesCommand } from "../protocols/Aws_query"; +import { de_DescribeInsightRulesCommand, se_DescribeInsightRulesCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DisableAlarmActionsCommand.ts b/clients/client-cloudwatch/src/commands/DisableAlarmActionsCommand.ts index aeb4161d6f71..4a1eafd2cdda 100644 --- a/clients/client-cloudwatch/src/commands/DisableAlarmActionsCommand.ts +++ b/clients/client-cloudwatch/src/commands/DisableAlarmActionsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DisableAlarmActionsInput } from "../models/models_0"; -import { de_DisableAlarmActionsCommand, se_DisableAlarmActionsCommand } from "../protocols/Aws_query"; +import { de_DisableAlarmActionsCommand, se_DisableAlarmActionsCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DisableInsightRulesCommand.ts b/clients/client-cloudwatch/src/commands/DisableInsightRulesCommand.ts index d67f71e250ef..66f275fe80e2 100644 --- a/clients/client-cloudwatch/src/commands/DisableInsightRulesCommand.ts +++ b/clients/client-cloudwatch/src/commands/DisableInsightRulesCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DisableInsightRulesInput, DisableInsightRulesOutput } from "../models/models_0"; -import { de_DisableInsightRulesCommand, se_DisableInsightRulesCommand } from "../protocols/Aws_query"; +import { de_DisableInsightRulesCommand, se_DisableInsightRulesCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/EnableAlarmActionsCommand.ts b/clients/client-cloudwatch/src/commands/EnableAlarmActionsCommand.ts index 264047631790..d6a0cb103149 100644 --- a/clients/client-cloudwatch/src/commands/EnableAlarmActionsCommand.ts +++ b/clients/client-cloudwatch/src/commands/EnableAlarmActionsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { EnableAlarmActionsInput } from "../models/models_0"; -import { de_EnableAlarmActionsCommand, se_EnableAlarmActionsCommand } from "../protocols/Aws_query"; +import { de_EnableAlarmActionsCommand, se_EnableAlarmActionsCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/EnableInsightRulesCommand.ts b/clients/client-cloudwatch/src/commands/EnableInsightRulesCommand.ts index 836010dc289e..0a3a9fbd25d1 100644 --- a/clients/client-cloudwatch/src/commands/EnableInsightRulesCommand.ts +++ b/clients/client-cloudwatch/src/commands/EnableInsightRulesCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { EnableInsightRulesInput, EnableInsightRulesOutput } from "../models/models_0"; -import { de_EnableInsightRulesCommand, se_EnableInsightRulesCommand } from "../protocols/Aws_query"; +import { de_EnableInsightRulesCommand, se_EnableInsightRulesCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/GetDashboardCommand.ts b/clients/client-cloudwatch/src/commands/GetDashboardCommand.ts index 6e34516ce1d9..d7db8c6110ab 100644 --- a/clients/client-cloudwatch/src/commands/GetDashboardCommand.ts +++ b/clients/client-cloudwatch/src/commands/GetDashboardCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { GetDashboardInput, GetDashboardOutput } from "../models/models_0"; -import { de_GetDashboardCommand, se_GetDashboardCommand } from "../protocols/Aws_query"; +import { de_GetDashboardCommand, se_GetDashboardCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/GetInsightRuleReportCommand.ts b/clients/client-cloudwatch/src/commands/GetInsightRuleReportCommand.ts index 11356cd125e3..cb447af99f8c 100644 --- a/clients/client-cloudwatch/src/commands/GetInsightRuleReportCommand.ts +++ b/clients/client-cloudwatch/src/commands/GetInsightRuleReportCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { GetInsightRuleReportInput, GetInsightRuleReportOutput } from "../models/models_0"; -import { de_GetInsightRuleReportCommand, se_GetInsightRuleReportCommand } from "../protocols/Aws_query"; +import { de_GetInsightRuleReportCommand, se_GetInsightRuleReportCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/GetMetricDataCommand.ts b/clients/client-cloudwatch/src/commands/GetMetricDataCommand.ts index 692aab5ed38a..3d32f7a4740b 100644 --- a/clients/client-cloudwatch/src/commands/GetMetricDataCommand.ts +++ b/clients/client-cloudwatch/src/commands/GetMetricDataCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { GetMetricDataInput, GetMetricDataOutput } from "../models/models_0"; -import { de_GetMetricDataCommand, se_GetMetricDataCommand } from "../protocols/Aws_query"; +import { de_GetMetricDataCommand, se_GetMetricDataCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/GetMetricStatisticsCommand.ts b/clients/client-cloudwatch/src/commands/GetMetricStatisticsCommand.ts index 5cdbf1c5eb89..cb804f5c6b79 100644 --- a/clients/client-cloudwatch/src/commands/GetMetricStatisticsCommand.ts +++ b/clients/client-cloudwatch/src/commands/GetMetricStatisticsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { GetMetricStatisticsInput, GetMetricStatisticsOutput } from "../models/models_0"; -import { de_GetMetricStatisticsCommand, se_GetMetricStatisticsCommand } from "../protocols/Aws_query"; +import { de_GetMetricStatisticsCommand, se_GetMetricStatisticsCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/GetMetricStreamCommand.ts b/clients/client-cloudwatch/src/commands/GetMetricStreamCommand.ts index 7db728cc3aee..bcff0a853bfb 100644 --- a/clients/client-cloudwatch/src/commands/GetMetricStreamCommand.ts +++ b/clients/client-cloudwatch/src/commands/GetMetricStreamCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { GetMetricStreamInput, GetMetricStreamOutput } from "../models/models_0"; -import { de_GetMetricStreamCommand, se_GetMetricStreamCommand } from "../protocols/Aws_query"; +import { de_GetMetricStreamCommand, se_GetMetricStreamCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/GetMetricWidgetImageCommand.ts b/clients/client-cloudwatch/src/commands/GetMetricWidgetImageCommand.ts index 090430c92c18..e5717123e6d7 100644 --- a/clients/client-cloudwatch/src/commands/GetMetricWidgetImageCommand.ts +++ b/clients/client-cloudwatch/src/commands/GetMetricWidgetImageCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { GetMetricWidgetImageInput, GetMetricWidgetImageOutput } from "../models/models_0"; -import { de_GetMetricWidgetImageCommand, se_GetMetricWidgetImageCommand } from "../protocols/Aws_query"; +import { de_GetMetricWidgetImageCommand, se_GetMetricWidgetImageCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/ListDashboardsCommand.ts b/clients/client-cloudwatch/src/commands/ListDashboardsCommand.ts index adc7b50bf176..e9dd841006bc 100644 --- a/clients/client-cloudwatch/src/commands/ListDashboardsCommand.ts +++ b/clients/client-cloudwatch/src/commands/ListDashboardsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { ListDashboardsInput, ListDashboardsOutput } from "../models/models_0"; -import { de_ListDashboardsCommand, se_ListDashboardsCommand } from "../protocols/Aws_query"; +import { de_ListDashboardsCommand, se_ListDashboardsCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/ListManagedInsightRulesCommand.ts b/clients/client-cloudwatch/src/commands/ListManagedInsightRulesCommand.ts index f9388d75c45a..3a8afad422b0 100644 --- a/clients/client-cloudwatch/src/commands/ListManagedInsightRulesCommand.ts +++ b/clients/client-cloudwatch/src/commands/ListManagedInsightRulesCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { ListManagedInsightRulesInput, ListManagedInsightRulesOutput } from "../models/models_0"; -import { de_ListManagedInsightRulesCommand, se_ListManagedInsightRulesCommand } from "../protocols/Aws_query"; +import { de_ListManagedInsightRulesCommand, se_ListManagedInsightRulesCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/ListMetricStreamsCommand.ts b/clients/client-cloudwatch/src/commands/ListMetricStreamsCommand.ts index a158d316ced7..7a531ba17c2c 100644 --- a/clients/client-cloudwatch/src/commands/ListMetricStreamsCommand.ts +++ b/clients/client-cloudwatch/src/commands/ListMetricStreamsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { ListMetricStreamsInput, ListMetricStreamsOutput } from "../models/models_0"; -import { de_ListMetricStreamsCommand, se_ListMetricStreamsCommand } from "../protocols/Aws_query"; +import { de_ListMetricStreamsCommand, se_ListMetricStreamsCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/ListMetricsCommand.ts b/clients/client-cloudwatch/src/commands/ListMetricsCommand.ts index a9a521cb3b42..a60329cba89a 100644 --- a/clients/client-cloudwatch/src/commands/ListMetricsCommand.ts +++ b/clients/client-cloudwatch/src/commands/ListMetricsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { ListMetricsInput, ListMetricsOutput } from "../models/models_0"; -import { de_ListMetricsCommand, se_ListMetricsCommand } from "../protocols/Aws_query"; +import { de_ListMetricsCommand, se_ListMetricsCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/ListTagsForResourceCommand.ts b/clients/client-cloudwatch/src/commands/ListTagsForResourceCommand.ts index 43b6f2f157cb..92b1d69d52f4 100644 --- a/clients/client-cloudwatch/src/commands/ListTagsForResourceCommand.ts +++ b/clients/client-cloudwatch/src/commands/ListTagsForResourceCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { ListTagsForResourceInput, ListTagsForResourceOutput } from "../models/models_0"; -import { de_ListTagsForResourceCommand, se_ListTagsForResourceCommand } from "../protocols/Aws_query"; +import { de_ListTagsForResourceCommand, se_ListTagsForResourceCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/PutAnomalyDetectorCommand.ts b/clients/client-cloudwatch/src/commands/PutAnomalyDetectorCommand.ts index 140f877b60ba..030d88b90370 100644 --- a/clients/client-cloudwatch/src/commands/PutAnomalyDetectorCommand.ts +++ b/clients/client-cloudwatch/src/commands/PutAnomalyDetectorCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { PutAnomalyDetectorInput, PutAnomalyDetectorOutput } from "../models/models_0"; -import { de_PutAnomalyDetectorCommand, se_PutAnomalyDetectorCommand } from "../protocols/Aws_query"; +import { de_PutAnomalyDetectorCommand, se_PutAnomalyDetectorCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/PutCompositeAlarmCommand.ts b/clients/client-cloudwatch/src/commands/PutCompositeAlarmCommand.ts index d732ceb62f0e..b71218e2a16a 100644 --- a/clients/client-cloudwatch/src/commands/PutCompositeAlarmCommand.ts +++ b/clients/client-cloudwatch/src/commands/PutCompositeAlarmCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { PutCompositeAlarmInput } from "../models/models_0"; -import { de_PutCompositeAlarmCommand, se_PutCompositeAlarmCommand } from "../protocols/Aws_query"; +import { de_PutCompositeAlarmCommand, se_PutCompositeAlarmCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/PutDashboardCommand.ts b/clients/client-cloudwatch/src/commands/PutDashboardCommand.ts index 73ca0d31e114..5afe47045c76 100644 --- a/clients/client-cloudwatch/src/commands/PutDashboardCommand.ts +++ b/clients/client-cloudwatch/src/commands/PutDashboardCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { PutDashboardInput, PutDashboardOutput } from "../models/models_0"; -import { de_PutDashboardCommand, se_PutDashboardCommand } from "../protocols/Aws_query"; +import { de_PutDashboardCommand, se_PutDashboardCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/PutInsightRuleCommand.ts b/clients/client-cloudwatch/src/commands/PutInsightRuleCommand.ts index 75b9059d3d46..42078a9289db 100644 --- a/clients/client-cloudwatch/src/commands/PutInsightRuleCommand.ts +++ b/clients/client-cloudwatch/src/commands/PutInsightRuleCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { PutInsightRuleInput, PutInsightRuleOutput } from "../models/models_0"; -import { de_PutInsightRuleCommand, se_PutInsightRuleCommand } from "../protocols/Aws_query"; +import { de_PutInsightRuleCommand, se_PutInsightRuleCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/PutManagedInsightRulesCommand.ts b/clients/client-cloudwatch/src/commands/PutManagedInsightRulesCommand.ts index 8d0e4602d416..098465ef99ae 100644 --- a/clients/client-cloudwatch/src/commands/PutManagedInsightRulesCommand.ts +++ b/clients/client-cloudwatch/src/commands/PutManagedInsightRulesCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { PutManagedInsightRulesInput, PutManagedInsightRulesOutput } from "../models/models_0"; -import { de_PutManagedInsightRulesCommand, se_PutManagedInsightRulesCommand } from "../protocols/Aws_query"; +import { de_PutManagedInsightRulesCommand, se_PutManagedInsightRulesCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/PutMetricAlarmCommand.ts b/clients/client-cloudwatch/src/commands/PutMetricAlarmCommand.ts index 60a8ea22a718..f7321af49c0a 100644 --- a/clients/client-cloudwatch/src/commands/PutMetricAlarmCommand.ts +++ b/clients/client-cloudwatch/src/commands/PutMetricAlarmCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { PutMetricAlarmInput } from "../models/models_0"; -import { de_PutMetricAlarmCommand, se_PutMetricAlarmCommand } from "../protocols/Aws_query"; +import { de_PutMetricAlarmCommand, se_PutMetricAlarmCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/PutMetricDataCommand.ts b/clients/client-cloudwatch/src/commands/PutMetricDataCommand.ts index aa64f261b97f..09af0757bf2b 100644 --- a/clients/client-cloudwatch/src/commands/PutMetricDataCommand.ts +++ b/clients/client-cloudwatch/src/commands/PutMetricDataCommand.ts @@ -8,7 +8,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { PutMetricDataInput } from "../models/models_0"; -import { de_PutMetricDataCommand, se_PutMetricDataCommand } from "../protocols/Aws_query"; +import { de_PutMetricDataCommand, se_PutMetricDataCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/PutMetricStreamCommand.ts b/clients/client-cloudwatch/src/commands/PutMetricStreamCommand.ts index e05a368f04b4..fe5ea4bcfceb 100644 --- a/clients/client-cloudwatch/src/commands/PutMetricStreamCommand.ts +++ b/clients/client-cloudwatch/src/commands/PutMetricStreamCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { PutMetricStreamInput, PutMetricStreamOutput } from "../models/models_0"; -import { de_PutMetricStreamCommand, se_PutMetricStreamCommand } from "../protocols/Aws_query"; +import { de_PutMetricStreamCommand, se_PutMetricStreamCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/SetAlarmStateCommand.ts b/clients/client-cloudwatch/src/commands/SetAlarmStateCommand.ts index 7f2b3a73e867..3fd8146294de 100644 --- a/clients/client-cloudwatch/src/commands/SetAlarmStateCommand.ts +++ b/clients/client-cloudwatch/src/commands/SetAlarmStateCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { SetAlarmStateInput } from "../models/models_0"; -import { de_SetAlarmStateCommand, se_SetAlarmStateCommand } from "../protocols/Aws_query"; +import { de_SetAlarmStateCommand, se_SetAlarmStateCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/StartMetricStreamsCommand.ts b/clients/client-cloudwatch/src/commands/StartMetricStreamsCommand.ts index 84226d3b15ed..e8af60922648 100644 --- a/clients/client-cloudwatch/src/commands/StartMetricStreamsCommand.ts +++ b/clients/client-cloudwatch/src/commands/StartMetricStreamsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { StartMetricStreamsInput, StartMetricStreamsOutput } from "../models/models_0"; -import { de_StartMetricStreamsCommand, se_StartMetricStreamsCommand } from "../protocols/Aws_query"; +import { de_StartMetricStreamsCommand, se_StartMetricStreamsCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/StopMetricStreamsCommand.ts b/clients/client-cloudwatch/src/commands/StopMetricStreamsCommand.ts index 898a8503d818..f5493daec0c6 100644 --- a/clients/client-cloudwatch/src/commands/StopMetricStreamsCommand.ts +++ b/clients/client-cloudwatch/src/commands/StopMetricStreamsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { StopMetricStreamsInput, StopMetricStreamsOutput } from "../models/models_0"; -import { de_StopMetricStreamsCommand, se_StopMetricStreamsCommand } from "../protocols/Aws_query"; +import { de_StopMetricStreamsCommand, se_StopMetricStreamsCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/TagResourceCommand.ts b/clients/client-cloudwatch/src/commands/TagResourceCommand.ts index 7e41b0b138f0..a21ac6eab377 100644 --- a/clients/client-cloudwatch/src/commands/TagResourceCommand.ts +++ b/clients/client-cloudwatch/src/commands/TagResourceCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { TagResourceInput, TagResourceOutput } from "../models/models_0"; -import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Aws_query"; +import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/UntagResourceCommand.ts b/clients/client-cloudwatch/src/commands/UntagResourceCommand.ts index e431121d17cd..40a1d3ae230c 100644 --- a/clients/client-cloudwatch/src/commands/UntagResourceCommand.ts +++ b/clients/client-cloudwatch/src/commands/UntagResourceCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { UntagResourceInput, UntagResourceOutput } from "../models/models_0"; -import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Aws_query"; +import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Rpcv2cbor"; /** * @public diff --git a/clients/client-cloudwatch/src/protocols/Aws_query.ts b/clients/client-cloudwatch/src/protocols/Aws_query.ts deleted file mode 100644 index bd82f6c612da..000000000000 --- a/clients/client-cloudwatch/src/protocols/Aws_query.ts +++ /dev/null @@ -1,5774 +0,0 @@ -// smithy-typescript generated code -import { parseXmlBody as parseBody, parseXmlErrorBody as parseErrorBody } from "@aws-sdk/core"; -import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; -import { - collectBody, - decorateServiceException as __decorateServiceException, - expectNonNull as __expectNonNull, - expectString as __expectString, - extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem, - parseBoolean as __parseBoolean, - parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, - serializeDateTime as __serializeDateTime, - serializeFloat as __serializeFloat, - strictParseFloat as __strictParseFloat, - strictParseInt32 as __strictParseInt32, - strictParseLong as __strictParseLong, - withBaseException, -} from "@smithy/smithy-client"; -import { - Endpoint as __Endpoint, - HeaderBag as __HeaderBag, - ResponseMetadata as __ResponseMetadata, - SerdeContext as __SerdeContext, -} from "@smithy/types"; - -import { DeleteAlarmsCommandInput, DeleteAlarmsCommandOutput } from "../commands/DeleteAlarmsCommand"; -import { - DeleteAnomalyDetectorCommandInput, - DeleteAnomalyDetectorCommandOutput, -} from "../commands/DeleteAnomalyDetectorCommand"; -import { DeleteDashboardsCommandInput, DeleteDashboardsCommandOutput } from "../commands/DeleteDashboardsCommand"; -import { DeleteInsightRulesCommandInput, DeleteInsightRulesCommandOutput } from "../commands/DeleteInsightRulesCommand"; -import { DeleteMetricStreamCommandInput, DeleteMetricStreamCommandOutput } from "../commands/DeleteMetricStreamCommand"; -import { - DescribeAlarmHistoryCommandInput, - DescribeAlarmHistoryCommandOutput, -} from "../commands/DescribeAlarmHistoryCommand"; -import { DescribeAlarmsCommandInput, DescribeAlarmsCommandOutput } from "../commands/DescribeAlarmsCommand"; -import { - DescribeAlarmsForMetricCommandInput, - DescribeAlarmsForMetricCommandOutput, -} from "../commands/DescribeAlarmsForMetricCommand"; -import { - DescribeAnomalyDetectorsCommandInput, - DescribeAnomalyDetectorsCommandOutput, -} from "../commands/DescribeAnomalyDetectorsCommand"; -import { - DescribeInsightRulesCommandInput, - DescribeInsightRulesCommandOutput, -} from "../commands/DescribeInsightRulesCommand"; -import { - DisableAlarmActionsCommandInput, - DisableAlarmActionsCommandOutput, -} from "../commands/DisableAlarmActionsCommand"; -import { - DisableInsightRulesCommandInput, - DisableInsightRulesCommandOutput, -} from "../commands/DisableInsightRulesCommand"; -import { EnableAlarmActionsCommandInput, EnableAlarmActionsCommandOutput } from "../commands/EnableAlarmActionsCommand"; -import { EnableInsightRulesCommandInput, EnableInsightRulesCommandOutput } from "../commands/EnableInsightRulesCommand"; -import { GetDashboardCommandInput, GetDashboardCommandOutput } from "../commands/GetDashboardCommand"; -import { - GetInsightRuleReportCommandInput, - GetInsightRuleReportCommandOutput, -} from "../commands/GetInsightRuleReportCommand"; -import { GetMetricDataCommandInput, GetMetricDataCommandOutput } from "../commands/GetMetricDataCommand"; -import { - GetMetricStatisticsCommandInput, - GetMetricStatisticsCommandOutput, -} from "../commands/GetMetricStatisticsCommand"; -import { GetMetricStreamCommandInput, GetMetricStreamCommandOutput } from "../commands/GetMetricStreamCommand"; -import { - GetMetricWidgetImageCommandInput, - GetMetricWidgetImageCommandOutput, -} from "../commands/GetMetricWidgetImageCommand"; -import { ListDashboardsCommandInput, ListDashboardsCommandOutput } from "../commands/ListDashboardsCommand"; -import { - ListManagedInsightRulesCommandInput, - ListManagedInsightRulesCommandOutput, -} from "../commands/ListManagedInsightRulesCommand"; -import { ListMetricsCommandInput, ListMetricsCommandOutput } from "../commands/ListMetricsCommand"; -import { ListMetricStreamsCommandInput, ListMetricStreamsCommandOutput } from "../commands/ListMetricStreamsCommand"; -import { - ListTagsForResourceCommandInput, - ListTagsForResourceCommandOutput, -} from "../commands/ListTagsForResourceCommand"; -import { PutAnomalyDetectorCommandInput, PutAnomalyDetectorCommandOutput } from "../commands/PutAnomalyDetectorCommand"; -import { PutCompositeAlarmCommandInput, PutCompositeAlarmCommandOutput } from "../commands/PutCompositeAlarmCommand"; -import { PutDashboardCommandInput, PutDashboardCommandOutput } from "../commands/PutDashboardCommand"; -import { PutInsightRuleCommandInput, PutInsightRuleCommandOutput } from "../commands/PutInsightRuleCommand"; -import { - PutManagedInsightRulesCommandInput, - PutManagedInsightRulesCommandOutput, -} from "../commands/PutManagedInsightRulesCommand"; -import { PutMetricAlarmCommandInput, PutMetricAlarmCommandOutput } from "../commands/PutMetricAlarmCommand"; -import { PutMetricDataCommandInput, PutMetricDataCommandOutput } from "../commands/PutMetricDataCommand"; -import { PutMetricStreamCommandInput, PutMetricStreamCommandOutput } from "../commands/PutMetricStreamCommand"; -import { SetAlarmStateCommandInput, SetAlarmStateCommandOutput } from "../commands/SetAlarmStateCommand"; -import { StartMetricStreamsCommandInput, StartMetricStreamsCommandOutput } from "../commands/StartMetricStreamsCommand"; -import { StopMetricStreamsCommandInput, StopMetricStreamsCommandOutput } from "../commands/StopMetricStreamsCommand"; -import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; -import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; -import { CloudWatchServiceException as __BaseException } from "../models/CloudWatchServiceException"; -import { - AlarmHistoryItem, - AlarmType, - AnomalyDetector, - AnomalyDetectorConfiguration, - AnomalyDetectorType, - CompositeAlarm, - ConcurrentModificationException, - DashboardEntry, - DashboardInvalidInputError, - DashboardValidationMessage, - Datapoint, - DeleteAlarmsInput, - DeleteAnomalyDetectorInput, - DeleteAnomalyDetectorOutput, - DeleteDashboardsInput, - DeleteDashboardsOutput, - DeleteInsightRulesInput, - DeleteInsightRulesOutput, - DeleteMetricStreamInput, - DeleteMetricStreamOutput, - DescribeAlarmHistoryInput, - DescribeAlarmHistoryOutput, - DescribeAlarmsForMetricInput, - DescribeAlarmsForMetricOutput, - DescribeAlarmsInput, - DescribeAlarmsOutput, - DescribeAnomalyDetectorsInput, - DescribeAnomalyDetectorsOutput, - DescribeInsightRulesInput, - DescribeInsightRulesOutput, - Dimension, - DimensionFilter, - DisableAlarmActionsInput, - DisableInsightRulesInput, - DisableInsightRulesOutput, - EnableAlarmActionsInput, - EnableInsightRulesInput, - EnableInsightRulesOutput, - GetDashboardInput, - GetDashboardOutput, - GetInsightRuleReportInput, - GetInsightRuleReportOutput, - GetMetricDataInput, - GetMetricDataOutput, - GetMetricStatisticsInput, - GetMetricStatisticsOutput, - GetMetricStreamInput, - GetMetricStreamOutput, - GetMetricWidgetImageInput, - GetMetricWidgetImageOutput, - InsightRule, - InsightRuleContributor, - InsightRuleContributorDatapoint, - InsightRuleMetricDatapoint, - InternalServiceFault, - InvalidFormatFault, - InvalidNextToken, - InvalidParameterCombinationException, - InvalidParameterValueException, - LabelOptions, - LimitExceededException, - LimitExceededFault, - ListDashboardsInput, - ListDashboardsOutput, - ListManagedInsightRulesInput, - ListManagedInsightRulesOutput, - ListMetricsInput, - ListMetricsOutput, - ListMetricStreamsInput, - ListMetricStreamsOutput, - ListTagsForResourceInput, - ListTagsForResourceOutput, - ManagedRule, - ManagedRuleDescription, - ManagedRuleState, - MessageData, - Metric, - MetricAlarm, - MetricCharacteristics, - MetricDataQuery, - MetricDataResult, - MetricDatum, - MetricMathAnomalyDetector, - MetricStat, - MetricStreamEntry, - MetricStreamFilter, - MetricStreamStatisticsConfiguration, - MetricStreamStatisticsMetric, - MissingRequiredParameterException, - PartialFailure, - PutAnomalyDetectorInput, - PutAnomalyDetectorOutput, - PutCompositeAlarmInput, - PutDashboardInput, - PutDashboardOutput, - PutInsightRuleInput, - PutInsightRuleOutput, - PutManagedInsightRulesInput, - PutManagedInsightRulesOutput, - PutMetricAlarmInput, - PutMetricDataInput, - PutMetricStreamInput, - PutMetricStreamOutput, - Range, - ResourceNotFound, - ResourceNotFoundException, - SetAlarmStateInput, - SingleMetricAnomalyDetector, - StartMetricStreamsInput, - StartMetricStreamsOutput, - Statistic, - StatisticSet, - StopMetricStreamsInput, - StopMetricStreamsOutput, - Tag, - TagResourceInput, - TagResourceOutput, - UntagResourceInput, - UntagResourceOutput, -} from "../models/models_0"; - -/** - * serializeAws_queryDeleteAlarmsCommand - */ -export const se_DeleteAlarmsCommand = async ( - input: DeleteAlarmsCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_DeleteAlarmsInput(input, context), - [_A]: _DA, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryDeleteAnomalyDetectorCommand - */ -export const se_DeleteAnomalyDetectorCommand = async ( - input: DeleteAnomalyDetectorCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_DeleteAnomalyDetectorInput(input, context), - [_A]: _DAD, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryDeleteDashboardsCommand - */ -export const se_DeleteDashboardsCommand = async ( - input: DeleteDashboardsCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_DeleteDashboardsInput(input, context), - [_A]: _DD, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryDeleteInsightRulesCommand - */ -export const se_DeleteInsightRulesCommand = async ( - input: DeleteInsightRulesCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_DeleteInsightRulesInput(input, context), - [_A]: _DIR, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryDeleteMetricStreamCommand - */ -export const se_DeleteMetricStreamCommand = async ( - input: DeleteMetricStreamCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_DeleteMetricStreamInput(input, context), - [_A]: _DMS, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryDescribeAlarmHistoryCommand - */ -export const se_DescribeAlarmHistoryCommand = async ( - input: DescribeAlarmHistoryCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_DescribeAlarmHistoryInput(input, context), - [_A]: _DAH, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryDescribeAlarmsCommand - */ -export const se_DescribeAlarmsCommand = async ( - input: DescribeAlarmsCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_DescribeAlarmsInput(input, context), - [_A]: _DAe, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryDescribeAlarmsForMetricCommand - */ -export const se_DescribeAlarmsForMetricCommand = async ( - input: DescribeAlarmsForMetricCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_DescribeAlarmsForMetricInput(input, context), - [_A]: _DAFM, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryDescribeAnomalyDetectorsCommand - */ -export const se_DescribeAnomalyDetectorsCommand = async ( - input: DescribeAnomalyDetectorsCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_DescribeAnomalyDetectorsInput(input, context), - [_A]: _DADe, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryDescribeInsightRulesCommand - */ -export const se_DescribeInsightRulesCommand = async ( - input: DescribeInsightRulesCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_DescribeInsightRulesInput(input, context), - [_A]: _DIRe, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryDisableAlarmActionsCommand - */ -export const se_DisableAlarmActionsCommand = async ( - input: DisableAlarmActionsCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_DisableAlarmActionsInput(input, context), - [_A]: _DAA, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryDisableInsightRulesCommand - */ -export const se_DisableInsightRulesCommand = async ( - input: DisableInsightRulesCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_DisableInsightRulesInput(input, context), - [_A]: _DIRi, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryEnableAlarmActionsCommand - */ -export const se_EnableAlarmActionsCommand = async ( - input: EnableAlarmActionsCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_EnableAlarmActionsInput(input, context), - [_A]: _EAA, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryEnableInsightRulesCommand - */ -export const se_EnableInsightRulesCommand = async ( - input: EnableInsightRulesCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_EnableInsightRulesInput(input, context), - [_A]: _EIR, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryGetDashboardCommand - */ -export const se_GetDashboardCommand = async ( - input: GetDashboardCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_GetDashboardInput(input, context), - [_A]: _GD, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryGetInsightRuleReportCommand - */ -export const se_GetInsightRuleReportCommand = async ( - input: GetInsightRuleReportCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_GetInsightRuleReportInput(input, context), - [_A]: _GIRR, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryGetMetricDataCommand - */ -export const se_GetMetricDataCommand = async ( - input: GetMetricDataCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_GetMetricDataInput(input, context), - [_A]: _GMD, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryGetMetricStatisticsCommand - */ -export const se_GetMetricStatisticsCommand = async ( - input: GetMetricStatisticsCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_GetMetricStatisticsInput(input, context), - [_A]: _GMS, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryGetMetricStreamCommand - */ -export const se_GetMetricStreamCommand = async ( - input: GetMetricStreamCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_GetMetricStreamInput(input, context), - [_A]: _GMSe, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryGetMetricWidgetImageCommand - */ -export const se_GetMetricWidgetImageCommand = async ( - input: GetMetricWidgetImageCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_GetMetricWidgetImageInput(input, context), - [_A]: _GMWI, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryListDashboardsCommand - */ -export const se_ListDashboardsCommand = async ( - input: ListDashboardsCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_ListDashboardsInput(input, context), - [_A]: _LD, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryListManagedInsightRulesCommand - */ -export const se_ListManagedInsightRulesCommand = async ( - input: ListManagedInsightRulesCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_ListManagedInsightRulesInput(input, context), - [_A]: _LMIR, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryListMetricsCommand - */ -export const se_ListMetricsCommand = async ( - input: ListMetricsCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_ListMetricsInput(input, context), - [_A]: _LM, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryListMetricStreamsCommand - */ -export const se_ListMetricStreamsCommand = async ( - input: ListMetricStreamsCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_ListMetricStreamsInput(input, context), - [_A]: _LMS, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryListTagsForResourceCommand - */ -export const se_ListTagsForResourceCommand = async ( - input: ListTagsForResourceCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_ListTagsForResourceInput(input, context), - [_A]: _LTFR, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryPutAnomalyDetectorCommand - */ -export const se_PutAnomalyDetectorCommand = async ( - input: PutAnomalyDetectorCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_PutAnomalyDetectorInput(input, context), - [_A]: _PAD, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryPutCompositeAlarmCommand - */ -export const se_PutCompositeAlarmCommand = async ( - input: PutCompositeAlarmCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_PutCompositeAlarmInput(input, context), - [_A]: _PCA, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryPutDashboardCommand - */ -export const se_PutDashboardCommand = async ( - input: PutDashboardCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_PutDashboardInput(input, context), - [_A]: _PD, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryPutInsightRuleCommand - */ -export const se_PutInsightRuleCommand = async ( - input: PutInsightRuleCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_PutInsightRuleInput(input, context), - [_A]: _PIR, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryPutManagedInsightRulesCommand - */ -export const se_PutManagedInsightRulesCommand = async ( - input: PutManagedInsightRulesCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_PutManagedInsightRulesInput(input, context), - [_A]: _PMIR, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryPutMetricAlarmCommand - */ -export const se_PutMetricAlarmCommand = async ( - input: PutMetricAlarmCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_PutMetricAlarmInput(input, context), - [_A]: _PMA, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryPutMetricDataCommand - */ -export const se_PutMetricDataCommand = async ( - input: PutMetricDataCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_PutMetricDataInput(input, context), - [_A]: _PMD, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryPutMetricStreamCommand - */ -export const se_PutMetricStreamCommand = async ( - input: PutMetricStreamCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_PutMetricStreamInput(input, context), - [_A]: _PMS, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_querySetAlarmStateCommand - */ -export const se_SetAlarmStateCommand = async ( - input: SetAlarmStateCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_SetAlarmStateInput(input, context), - [_A]: _SAS, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryStartMetricStreamsCommand - */ -export const se_StartMetricStreamsCommand = async ( - input: StartMetricStreamsCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_StartMetricStreamsInput(input, context), - [_A]: _SMS, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryStopMetricStreamsCommand - */ -export const se_StopMetricStreamsCommand = async ( - input: StopMetricStreamsCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_StopMetricStreamsInput(input, context), - [_A]: _SMSt, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryTagResourceCommand - */ -export const se_TagResourceCommand = async ( - input: TagResourceCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_TagResourceInput(input, context), - [_A]: _TR, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryUntagResourceCommand - */ -export const se_UntagResourceCommand = async ( - input: UntagResourceCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_UntagResourceInput(input, context), - [_A]: _UR, - [_V]: _, - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * deserializeAws_queryDeleteAlarmsCommand - */ -export const de_DeleteAlarmsCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await collectBody(output.body, context); - const response: DeleteAlarmsCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_queryDeleteAnomalyDetectorCommand - */ -export const de_DeleteAnomalyDetectorCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_DeleteAnomalyDetectorOutput(data.DeleteAnomalyDetectorResult, context); - const response: DeleteAnomalyDetectorCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryDeleteDashboardsCommand - */ -export const de_DeleteDashboardsCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_DeleteDashboardsOutput(data.DeleteDashboardsResult, context); - const response: DeleteDashboardsCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryDeleteInsightRulesCommand - */ -export const de_DeleteInsightRulesCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_DeleteInsightRulesOutput(data.DeleteInsightRulesResult, context); - const response: DeleteInsightRulesCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryDeleteMetricStreamCommand - */ -export const de_DeleteMetricStreamCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_DeleteMetricStreamOutput(data.DeleteMetricStreamResult, context); - const response: DeleteMetricStreamCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryDescribeAlarmHistoryCommand - */ -export const de_DescribeAlarmHistoryCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_DescribeAlarmHistoryOutput(data.DescribeAlarmHistoryResult, context); - const response: DescribeAlarmHistoryCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryDescribeAlarmsCommand - */ -export const de_DescribeAlarmsCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_DescribeAlarmsOutput(data.DescribeAlarmsResult, context); - const response: DescribeAlarmsCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryDescribeAlarmsForMetricCommand - */ -export const de_DescribeAlarmsForMetricCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_DescribeAlarmsForMetricOutput(data.DescribeAlarmsForMetricResult, context); - const response: DescribeAlarmsForMetricCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryDescribeAnomalyDetectorsCommand - */ -export const de_DescribeAnomalyDetectorsCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_DescribeAnomalyDetectorsOutput(data.DescribeAnomalyDetectorsResult, context); - const response: DescribeAnomalyDetectorsCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryDescribeInsightRulesCommand - */ -export const de_DescribeInsightRulesCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_DescribeInsightRulesOutput(data.DescribeInsightRulesResult, context); - const response: DescribeInsightRulesCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryDisableAlarmActionsCommand - */ -export const de_DisableAlarmActionsCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await collectBody(output.body, context); - const response: DisableAlarmActionsCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_queryDisableInsightRulesCommand - */ -export const de_DisableInsightRulesCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_DisableInsightRulesOutput(data.DisableInsightRulesResult, context); - const response: DisableInsightRulesCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryEnableAlarmActionsCommand - */ -export const de_EnableAlarmActionsCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await collectBody(output.body, context); - const response: EnableAlarmActionsCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_queryEnableInsightRulesCommand - */ -export const de_EnableInsightRulesCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_EnableInsightRulesOutput(data.EnableInsightRulesResult, context); - const response: EnableInsightRulesCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryGetDashboardCommand - */ -export const de_GetDashboardCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_GetDashboardOutput(data.GetDashboardResult, context); - const response: GetDashboardCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryGetInsightRuleReportCommand - */ -export const de_GetInsightRuleReportCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_GetInsightRuleReportOutput(data.GetInsightRuleReportResult, context); - const response: GetInsightRuleReportCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryGetMetricDataCommand - */ -export const de_GetMetricDataCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_GetMetricDataOutput(data.GetMetricDataResult, context); - const response: GetMetricDataCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryGetMetricStatisticsCommand - */ -export const de_GetMetricStatisticsCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_GetMetricStatisticsOutput(data.GetMetricStatisticsResult, context); - const response: GetMetricStatisticsCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryGetMetricStreamCommand - */ -export const de_GetMetricStreamCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_GetMetricStreamOutput(data.GetMetricStreamResult, context); - const response: GetMetricStreamCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryGetMetricWidgetImageCommand - */ -export const de_GetMetricWidgetImageCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_GetMetricWidgetImageOutput(data.GetMetricWidgetImageResult, context); - const response: GetMetricWidgetImageCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryListDashboardsCommand - */ -export const de_ListDashboardsCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_ListDashboardsOutput(data.ListDashboardsResult, context); - const response: ListDashboardsCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryListManagedInsightRulesCommand - */ -export const de_ListManagedInsightRulesCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_ListManagedInsightRulesOutput(data.ListManagedInsightRulesResult, context); - const response: ListManagedInsightRulesCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryListMetricsCommand - */ -export const de_ListMetricsCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_ListMetricsOutput(data.ListMetricsResult, context); - const response: ListMetricsCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryListMetricStreamsCommand - */ -export const de_ListMetricStreamsCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_ListMetricStreamsOutput(data.ListMetricStreamsResult, context); - const response: ListMetricStreamsCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryListTagsForResourceCommand - */ -export const de_ListTagsForResourceCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_ListTagsForResourceOutput(data.ListTagsForResourceResult, context); - const response: ListTagsForResourceCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryPutAnomalyDetectorCommand - */ -export const de_PutAnomalyDetectorCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_PutAnomalyDetectorOutput(data.PutAnomalyDetectorResult, context); - const response: PutAnomalyDetectorCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryPutCompositeAlarmCommand - */ -export const de_PutCompositeAlarmCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await collectBody(output.body, context); - const response: PutCompositeAlarmCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_queryPutDashboardCommand - */ -export const de_PutDashboardCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_PutDashboardOutput(data.PutDashboardResult, context); - const response: PutDashboardCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryPutInsightRuleCommand - */ -export const de_PutInsightRuleCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_PutInsightRuleOutput(data.PutInsightRuleResult, context); - const response: PutInsightRuleCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryPutManagedInsightRulesCommand - */ -export const de_PutManagedInsightRulesCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_PutManagedInsightRulesOutput(data.PutManagedInsightRulesResult, context); - const response: PutManagedInsightRulesCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryPutMetricAlarmCommand - */ -export const de_PutMetricAlarmCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await collectBody(output.body, context); - const response: PutMetricAlarmCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_queryPutMetricDataCommand - */ -export const de_PutMetricDataCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await collectBody(output.body, context); - const response: PutMetricDataCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_queryPutMetricStreamCommand - */ -export const de_PutMetricStreamCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_PutMetricStreamOutput(data.PutMetricStreamResult, context); - const response: PutMetricStreamCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_querySetAlarmStateCommand - */ -export const de_SetAlarmStateCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await collectBody(output.body, context); - const response: SetAlarmStateCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_queryStartMetricStreamsCommand - */ -export const de_StartMetricStreamsCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_StartMetricStreamsOutput(data.StartMetricStreamsResult, context); - const response: StartMetricStreamsCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryStopMetricStreamsCommand - */ -export const de_StopMetricStreamsCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_StopMetricStreamsOutput(data.StopMetricStreamsResult, context); - const response: StopMetricStreamsCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryTagResourceCommand - */ -export const de_TagResourceCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_TagResourceOutput(data.TagResourceResult, context); - const response: TagResourceCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryUntagResourceCommand - */ -export const de_UntagResourceCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_UntagResourceOutput(data.UntagResourceResult, context); - const response: UntagResourceCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserialize_Aws_queryCommandError - */ -const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "ResourceNotFound": - case "com.amazonaws.cloudwatch#ResourceNotFound": - throw await de_ResourceNotFoundRes(parsedOutput, context); - case "InternalServiceError": - case "com.amazonaws.cloudwatch#InternalServiceFault": - throw await de_InternalServiceFaultRes(parsedOutput, context); - case "InvalidParameterCombination": - case "com.amazonaws.cloudwatch#InvalidParameterCombinationException": - throw await de_InvalidParameterCombinationExceptionRes(parsedOutput, context); - case "InvalidParameterValue": - case "com.amazonaws.cloudwatch#InvalidParameterValueException": - throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); - case "MissingParameter": - case "com.amazonaws.cloudwatch#MissingRequiredParameterException": - throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.cloudwatch#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); - case "InvalidNextToken": - case "com.amazonaws.cloudwatch#InvalidNextToken": - throw await de_InvalidNextTokenRes(parsedOutput, context); - case "LimitExceededException": - case "com.amazonaws.cloudwatch#LimitExceededException": - throw await de_LimitExceededExceptionRes(parsedOutput, context); - case "LimitExceeded": - case "com.amazonaws.cloudwatch#LimitExceededFault": - throw await de_LimitExceededFaultRes(parsedOutput, context); - case "InvalidParameterInput": - case "com.amazonaws.cloudwatch#DashboardInvalidInputError": - throw await de_DashboardInvalidInputErrorRes(parsedOutput, context); - case "ConcurrentModificationException": - case "com.amazonaws.cloudwatch#ConcurrentModificationException": - throw await de_ConcurrentModificationExceptionRes(parsedOutput, context); - case "InvalidFormat": - case "com.amazonaws.cloudwatch#InvalidFormatFault": - throw await de_InvalidFormatFaultRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }) as never; - } -}; - -/** - * deserializeAws_queryConcurrentModificationExceptionRes - */ -const de_ConcurrentModificationExceptionRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_ConcurrentModificationException(body.Error, context); - const exception = new ConcurrentModificationException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryDashboardInvalidInputErrorRes - */ -const de_DashboardInvalidInputErrorRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_DashboardInvalidInputError(body.Error, context); - const exception = new DashboardInvalidInputError({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryInternalServiceFaultRes - */ -const de_InternalServiceFaultRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_InternalServiceFault(body.Error, context); - const exception = new InternalServiceFault({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryInvalidFormatFaultRes - */ -const de_InvalidFormatFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_InvalidFormatFault(body.Error, context); - const exception = new InvalidFormatFault({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryInvalidNextTokenRes - */ -const de_InvalidNextTokenRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_InvalidNextToken(body.Error, context); - const exception = new InvalidNextToken({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryInvalidParameterCombinationExceptionRes - */ -const de_InvalidParameterCombinationExceptionRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterCombinationException(body.Error, context); - const exception = new InvalidParameterCombinationException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryInvalidParameterValueExceptionRes - */ -const de_InvalidParameterValueExceptionRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterValueException(body.Error, context); - const exception = new InvalidParameterValueException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryLimitExceededExceptionRes - */ -const de_LimitExceededExceptionRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body.Error, context); - const exception = new LimitExceededException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryLimitExceededFaultRes - */ -const de_LimitExceededFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_LimitExceededFault(body.Error, context); - const exception = new LimitExceededFault({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryMissingRequiredParameterExceptionRes - */ -const de_MissingRequiredParameterExceptionRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_MissingRequiredParameterException(body.Error, context); - const exception = new MissingRequiredParameterException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryResourceNotFoundRes - */ -const de_ResourceNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFound(body.Error, context); - const exception = new ResourceNotFound({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryResourceNotFoundExceptionRes - */ -const de_ResourceNotFoundExceptionRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body.Error, context); - const exception = new ResourceNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * serializeAws_queryAlarmNames - */ -const se_AlarmNames = (input: string[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}; - -/** - * serializeAws_queryAlarmTypes - */ -const se_AlarmTypes = (input: AlarmType[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}; - -/** - * serializeAws_queryAnomalyDetectorConfiguration - */ -const se_AnomalyDetectorConfiguration = (input: AnomalyDetectorConfiguration, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_ETR] != null) { - const memberEntries = se_AnomalyDetectorExcludedTimeRanges(input[_ETR], context); - if (input[_ETR]?.length === 0) { - entries.ExcludedTimeRanges = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ExcludedTimeRanges.${key}`; - entries[loc] = value; - }); - } - if (input[_MT] != null) { - entries[_MT] = input[_MT]; - } - return entries; -}; - -/** - * serializeAws_queryAnomalyDetectorExcludedTimeRanges - */ -const se_AnomalyDetectorExcludedTimeRanges = (input: Range[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_Range(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}; - -/** - * serializeAws_queryAnomalyDetectorTypes - */ -const se_AnomalyDetectorTypes = (input: AnomalyDetectorType[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}; - -/** - * serializeAws_queryCounts - */ -const se_Counts = (input: number[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = __serializeFloat(entry); - counter++; - } - return entries; -}; - -/** - * serializeAws_queryDashboardNames - */ -const se_DashboardNames = (input: string[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}; - -/** - * serializeAws_queryDeleteAlarmsInput - */ -const se_DeleteAlarmsInput = (input: DeleteAlarmsInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_AN] != null) { - const memberEntries = se_AlarmNames(input[_AN], context); - if (input[_AN]?.length === 0) { - entries.AlarmNames = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `AlarmNames.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryDeleteAnomalyDetectorInput - */ -const se_DeleteAnomalyDetectorInput = (input: DeleteAnomalyDetectorInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_N] != null) { - entries[_N] = input[_N]; - } - if (input[_MN] != null) { - entries[_MN] = input[_MN]; - } - if (input[_D] != null) { - const memberEntries = se_Dimensions(input[_D], context); - if (input[_D]?.length === 0) { - entries.Dimensions = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Dimensions.${key}`; - entries[loc] = value; - }); - } - if (input[_S] != null) { - entries[_S] = input[_S]; - } - if (input[_SMAD] != null) { - const memberEntries = se_SingleMetricAnomalyDetector(input[_SMAD], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `SingleMetricAnomalyDetector.${key}`; - entries[loc] = value; - }); - } - if (input[_MMAD] != null) { - const memberEntries = se_MetricMathAnomalyDetector(input[_MMAD], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `MetricMathAnomalyDetector.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryDeleteDashboardsInput - */ -const se_DeleteDashboardsInput = (input: DeleteDashboardsInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_DN] != null) { - const memberEntries = se_DashboardNames(input[_DN], context); - if (input[_DN]?.length === 0) { - entries.DashboardNames = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `DashboardNames.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryDeleteInsightRulesInput - */ -const se_DeleteInsightRulesInput = (input: DeleteInsightRulesInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_RN] != null) { - const memberEntries = se_InsightRuleNames(input[_RN], context); - if (input[_RN]?.length === 0) { - entries.RuleNames = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `RuleNames.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryDeleteMetricStreamInput - */ -const se_DeleteMetricStreamInput = (input: DeleteMetricStreamInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_Na] != null) { - entries[_Na] = input[_Na]; - } - return entries; -}; - -/** - * serializeAws_queryDescribeAlarmHistoryInput - */ -const se_DescribeAlarmHistoryInput = (input: DescribeAlarmHistoryInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_ANl] != null) { - entries[_ANl] = input[_ANl]; - } - if (input[_AT] != null) { - const memberEntries = se_AlarmTypes(input[_AT], context); - if (input[_AT]?.length === 0) { - entries.AlarmTypes = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `AlarmTypes.${key}`; - entries[loc] = value; - }); - } - if (input[_HIT] != null) { - entries[_HIT] = input[_HIT]; - } - if (input[_SD] != null) { - entries[_SD] = __serializeDateTime(input[_SD]); - } - if (input[_ED] != null) { - entries[_ED] = __serializeDateTime(input[_ED]); - } - if (input[_MR] != null) { - entries[_MR] = input[_MR]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_SB] != null) { - entries[_SB] = input[_SB]; - } - return entries; -}; - -/** - * serializeAws_queryDescribeAlarmsForMetricInput - */ -const se_DescribeAlarmsForMetricInput = (input: DescribeAlarmsForMetricInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_MN] != null) { - entries[_MN] = input[_MN]; - } - if (input[_N] != null) { - entries[_N] = input[_N]; - } - if (input[_St] != null) { - entries[_St] = input[_St]; - } - if (input[_ES] != null) { - entries[_ES] = input[_ES]; - } - if (input[_D] != null) { - const memberEntries = se_Dimensions(input[_D], context); - if (input[_D]?.length === 0) { - entries.Dimensions = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Dimensions.${key}`; - entries[loc] = value; - }); - } - if (input[_P] != null) { - entries[_P] = input[_P]; - } - if (input[_U] != null) { - entries[_U] = input[_U]; - } - return entries; -}; - -/** - * serializeAws_queryDescribeAlarmsInput - */ -const se_DescribeAlarmsInput = (input: DescribeAlarmsInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_AN] != null) { - const memberEntries = se_AlarmNames(input[_AN], context); - if (input[_AN]?.length === 0) { - entries.AlarmNames = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `AlarmNames.${key}`; - entries[loc] = value; - }); - } - if (input[_ANP] != null) { - entries[_ANP] = input[_ANP]; - } - if (input[_AT] != null) { - const memberEntries = se_AlarmTypes(input[_AT], context); - if (input[_AT]?.length === 0) { - entries.AlarmTypes = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `AlarmTypes.${key}`; - entries[loc] = value; - }); - } - if (input[_COAN] != null) { - entries[_COAN] = input[_COAN]; - } - if (input[_POAN] != null) { - entries[_POAN] = input[_POAN]; - } - if (input[_SV] != null) { - entries[_SV] = input[_SV]; - } - if (input[_AP] != null) { - entries[_AP] = input[_AP]; - } - if (input[_MR] != null) { - entries[_MR] = input[_MR]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - return entries; -}; - -/** - * serializeAws_queryDescribeAnomalyDetectorsInput - */ -const se_DescribeAnomalyDetectorsInput = (input: DescribeAnomalyDetectorsInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_MRa] != null) { - entries[_MRa] = input[_MRa]; - } - if (input[_N] != null) { - entries[_N] = input[_N]; - } - if (input[_MN] != null) { - entries[_MN] = input[_MN]; - } - if (input[_D] != null) { - const memberEntries = se_Dimensions(input[_D], context); - if (input[_D]?.length === 0) { - entries.Dimensions = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Dimensions.${key}`; - entries[loc] = value; - }); - } - if (input[_ADT] != null) { - const memberEntries = se_AnomalyDetectorTypes(input[_ADT], context); - if (input[_ADT]?.length === 0) { - entries.AnomalyDetectorTypes = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `AnomalyDetectorTypes.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryDescribeInsightRulesInput - */ -const se_DescribeInsightRulesInput = (input: DescribeInsightRulesInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_MRa] != null) { - entries[_MRa] = input[_MRa]; - } - return entries; -}; - -/** - * serializeAws_queryDimension - */ -const se_Dimension = (input: Dimension, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_Na] != null) { - entries[_Na] = input[_Na]; - } - if (input[_Va] != null) { - entries[_Va] = input[_Va]; - } - return entries; -}; - -/** - * serializeAws_queryDimensionFilter - */ -const se_DimensionFilter = (input: DimensionFilter, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_Na] != null) { - entries[_Na] = input[_Na]; - } - if (input[_Va] != null) { - entries[_Va] = input[_Va]; - } - return entries; -}; - -/** - * serializeAws_queryDimensionFilters - */ -const se_DimensionFilters = (input: DimensionFilter[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_DimensionFilter(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}; - -/** - * serializeAws_queryDimensions - */ -const se_Dimensions = (input: Dimension[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_Dimension(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}; - -/** - * serializeAws_queryDisableAlarmActionsInput - */ -const se_DisableAlarmActionsInput = (input: DisableAlarmActionsInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_AN] != null) { - const memberEntries = se_AlarmNames(input[_AN], context); - if (input[_AN]?.length === 0) { - entries.AlarmNames = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `AlarmNames.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryDisableInsightRulesInput - */ -const se_DisableInsightRulesInput = (input: DisableInsightRulesInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_RN] != null) { - const memberEntries = se_InsightRuleNames(input[_RN], context); - if (input[_RN]?.length === 0) { - entries.RuleNames = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `RuleNames.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryEnableAlarmActionsInput - */ -const se_EnableAlarmActionsInput = (input: EnableAlarmActionsInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_AN] != null) { - const memberEntries = se_AlarmNames(input[_AN], context); - if (input[_AN]?.length === 0) { - entries.AlarmNames = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `AlarmNames.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryEnableInsightRulesInput - */ -const se_EnableInsightRulesInput = (input: EnableInsightRulesInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_RN] != null) { - const memberEntries = se_InsightRuleNames(input[_RN], context); - if (input[_RN]?.length === 0) { - entries.RuleNames = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `RuleNames.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryExtendedStatistics - */ -const se_ExtendedStatistics = (input: string[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}; - -/** - * serializeAws_queryGetDashboardInput - */ -const se_GetDashboardInput = (input: GetDashboardInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_DNa] != null) { - entries[_DNa] = input[_DNa]; - } - return entries; -}; - -/** - * serializeAws_queryGetInsightRuleReportInput - */ -const se_GetInsightRuleReportInput = (input: GetInsightRuleReportInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_RNu] != null) { - entries[_RNu] = input[_RNu]; - } - if (input[_ST] != null) { - entries[_ST] = __serializeDateTime(input[_ST]); - } - if (input[_ET] != null) { - entries[_ET] = __serializeDateTime(input[_ET]); - } - if (input[_P] != null) { - entries[_P] = input[_P]; - } - if (input[_MCC] != null) { - entries[_MCC] = input[_MCC]; - } - if (input[_M] != null) { - const memberEntries = se_InsightRuleMetricList(input[_M], context); - if (input[_M]?.length === 0) { - entries.Metrics = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Metrics.${key}`; - entries[loc] = value; - }); - } - if (input[_OB] != null) { - entries[_OB] = input[_OB]; - } - return entries; -}; - -/** - * serializeAws_queryGetMetricDataInput - */ -const se_GetMetricDataInput = (input: GetMetricDataInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_MDQ] != null) { - const memberEntries = se_MetricDataQueries(input[_MDQ], context); - if (input[_MDQ]?.length === 0) { - entries.MetricDataQueries = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `MetricDataQueries.${key}`; - entries[loc] = value; - }); - } - if (input[_ST] != null) { - entries[_ST] = __serializeDateTime(input[_ST]); - } - if (input[_ET] != null) { - entries[_ET] = __serializeDateTime(input[_ET]); - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_SB] != null) { - entries[_SB] = input[_SB]; - } - if (input[_MD] != null) { - entries[_MD] = input[_MD]; - } - if (input[_LO] != null) { - const memberEntries = se_LabelOptions(input[_LO], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `LabelOptions.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryGetMetricStatisticsInput - */ -const se_GetMetricStatisticsInput = (input: GetMetricStatisticsInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_N] != null) { - entries[_N] = input[_N]; - } - if (input[_MN] != null) { - entries[_MN] = input[_MN]; - } - if (input[_D] != null) { - const memberEntries = se_Dimensions(input[_D], context); - if (input[_D]?.length === 0) { - entries.Dimensions = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Dimensions.${key}`; - entries[loc] = value; - }); - } - if (input[_ST] != null) { - entries[_ST] = __serializeDateTime(input[_ST]); - } - if (input[_ET] != null) { - entries[_ET] = __serializeDateTime(input[_ET]); - } - if (input[_P] != null) { - entries[_P] = input[_P]; - } - if (input[_Sta] != null) { - const memberEntries = se_Statistics(input[_Sta], context); - if (input[_Sta]?.length === 0) { - entries.Statistics = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Statistics.${key}`; - entries[loc] = value; - }); - } - if (input[_ESx] != null) { - const memberEntries = se_ExtendedStatistics(input[_ESx], context); - if (input[_ESx]?.length === 0) { - entries.ExtendedStatistics = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ExtendedStatistics.${key}`; - entries[loc] = value; - }); - } - if (input[_U] != null) { - entries[_U] = input[_U]; - } - return entries; -}; - -/** - * serializeAws_queryGetMetricStreamInput - */ -const se_GetMetricStreamInput = (input: GetMetricStreamInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_Na] != null) { - entries[_Na] = input[_Na]; - } - return entries; -}; - -/** - * serializeAws_queryGetMetricWidgetImageInput - */ -const se_GetMetricWidgetImageInput = (input: GetMetricWidgetImageInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_MW] != null) { - entries[_MW] = input[_MW]; - } - if (input[_OF] != null) { - entries[_OF] = input[_OF]; - } - return entries; -}; - -/** - * serializeAws_queryInsightRuleMetricList - */ -const se_InsightRuleMetricList = (input: string[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}; - -/** - * serializeAws_queryInsightRuleNames - */ -const se_InsightRuleNames = (input: string[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}; - -/** - * serializeAws_queryLabelOptions - */ -const se_LabelOptions = (input: LabelOptions, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_T] != null) { - entries[_T] = input[_T]; - } - return entries; -}; - -/** - * serializeAws_queryListDashboardsInput - */ -const se_ListDashboardsInput = (input: ListDashboardsInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_DNP] != null) { - entries[_DNP] = input[_DNP]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - return entries; -}; - -/** - * serializeAws_queryListManagedInsightRulesInput - */ -const se_ListManagedInsightRulesInput = (input: ListManagedInsightRulesInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_RARN] != null) { - entries[_RARN] = input[_RARN]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_MRa] != null) { - entries[_MRa] = input[_MRa]; - } - return entries; -}; - -/** - * serializeAws_queryListMetricsInput - */ -const se_ListMetricsInput = (input: ListMetricsInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_N] != null) { - entries[_N] = input[_N]; - } - if (input[_MN] != null) { - entries[_MN] = input[_MN]; - } - if (input[_D] != null) { - const memberEntries = se_DimensionFilters(input[_D], context); - if (input[_D]?.length === 0) { - entries.Dimensions = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Dimensions.${key}`; - entries[loc] = value; - }); - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_RA] != null) { - entries[_RA] = input[_RA]; - } - if (input[_ILA] != null) { - entries[_ILA] = input[_ILA]; - } - if (input[_OA] != null) { - entries[_OA] = input[_OA]; - } - return entries; -}; - -/** - * serializeAws_queryListMetricStreamsInput - */ -const se_ListMetricStreamsInput = (input: ListMetricStreamsInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_MRa] != null) { - entries[_MRa] = input[_MRa]; - } - return entries; -}; - -/** - * serializeAws_queryListTagsForResourceInput - */ -const se_ListTagsForResourceInput = (input: ListTagsForResourceInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_RARN] != null) { - entries[_RARN] = input[_RARN]; - } - return entries; -}; - -/** - * serializeAws_queryManagedRule - */ -const se_ManagedRule = (input: ManagedRule, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_TN] != null) { - entries[_TN] = input[_TN]; - } - if (input[_RARN] != null) { - entries[_RARN] = input[_RARN]; - } - if (input[_Ta] != null) { - const memberEntries = se_TagList(input[_Ta], context); - if (input[_Ta]?.length === 0) { - entries.Tags = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Tags.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryManagedRules - */ -const se_ManagedRules = (input: ManagedRule[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_ManagedRule(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}; - -/** - * serializeAws_queryMetric - */ -const se_Metric = (input: Metric, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_N] != null) { - entries[_N] = input[_N]; - } - if (input[_MN] != null) { - entries[_MN] = input[_MN]; - } - if (input[_D] != null) { - const memberEntries = se_Dimensions(input[_D], context); - if (input[_D]?.length === 0) { - entries.Dimensions = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Dimensions.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryMetricCharacteristics - */ -const se_MetricCharacteristics = (input: MetricCharacteristics, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_PS] != null) { - entries[_PS] = input[_PS]; - } - return entries; -}; - -/** - * serializeAws_queryMetricData - */ -const se_MetricData = (input: MetricDatum[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_MetricDatum(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}; - -/** - * serializeAws_queryMetricDataQueries - */ -const se_MetricDataQueries = (input: MetricDataQuery[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_MetricDataQuery(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}; - -/** - * serializeAws_queryMetricDataQuery - */ -const se_MetricDataQuery = (input: MetricDataQuery, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_I] != null) { - entries[_I] = input[_I]; - } - if (input[_MS] != null) { - const memberEntries = se_MetricStat(input[_MS], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `MetricStat.${key}`; - entries[loc] = value; - }); - } - if (input[_E] != null) { - entries[_E] = input[_E]; - } - if (input[_L] != null) { - entries[_L] = input[_L]; - } - if (input[_RD] != null) { - entries[_RD] = input[_RD]; - } - if (input[_P] != null) { - entries[_P] = input[_P]; - } - if (input[_AI] != null) { - entries[_AI] = input[_AI]; - } - return entries; -}; - -/** - * serializeAws_queryMetricDatum - */ -const se_MetricDatum = (input: MetricDatum, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_MN] != null) { - entries[_MN] = input[_MN]; - } - if (input[_D] != null) { - const memberEntries = se_Dimensions(input[_D], context); - if (input[_D]?.length === 0) { - entries.Dimensions = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Dimensions.${key}`; - entries[loc] = value; - }); - } - if (input[_Ti] != null) { - entries[_Ti] = __serializeDateTime(input[_Ti]); - } - if (input[_Va] != null) { - entries[_Va] = __serializeFloat(input[_Va]); - } - if (input[_SVt] != null) { - const memberEntries = se_StatisticSet(input[_SVt], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `StatisticValues.${key}`; - entries[loc] = value; - }); - } - if (input[_Val] != null) { - const memberEntries = se_Values(input[_Val], context); - if (input[_Val]?.length === 0) { - entries.Values = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Values.${key}`; - entries[loc] = value; - }); - } - if (input[_C] != null) { - const memberEntries = se_Counts(input[_C], context); - if (input[_C]?.length === 0) { - entries.Counts = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Counts.${key}`; - entries[loc] = value; - }); - } - if (input[_U] != null) { - entries[_U] = input[_U]; - } - if (input[_SR] != null) { - entries[_SR] = input[_SR]; - } - return entries; -}; - -/** - * serializeAws_queryMetricMathAnomalyDetector - */ -const se_MetricMathAnomalyDetector = (input: MetricMathAnomalyDetector, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_MDQ] != null) { - const memberEntries = se_MetricDataQueries(input[_MDQ], context); - if (input[_MDQ]?.length === 0) { - entries.MetricDataQueries = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `MetricDataQueries.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryMetricStat - */ -const se_MetricStat = (input: MetricStat, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_Me] != null) { - const memberEntries = se_Metric(input[_Me], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Metric.${key}`; - entries[loc] = value; - }); - } - if (input[_P] != null) { - entries[_P] = input[_P]; - } - if (input[_S] != null) { - entries[_S] = input[_S]; - } - if (input[_U] != null) { - entries[_U] = input[_U]; - } - return entries; -}; - -/** - * serializeAws_queryMetricStreamFilter - */ -const se_MetricStreamFilter = (input: MetricStreamFilter, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_N] != null) { - entries[_N] = input[_N]; - } - if (input[_MNe] != null) { - const memberEntries = se_MetricStreamFilterMetricNames(input[_MNe], context); - if (input[_MNe]?.length === 0) { - entries.MetricNames = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `MetricNames.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryMetricStreamFilterMetricNames - */ -const se_MetricStreamFilterMetricNames = (input: string[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}; - -/** - * serializeAws_queryMetricStreamFilters - */ -const se_MetricStreamFilters = (input: MetricStreamFilter[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_MetricStreamFilter(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}; - -/** - * serializeAws_queryMetricStreamNames - */ -const se_MetricStreamNames = (input: string[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}; - -/** - * serializeAws_queryMetricStreamStatisticsAdditionalStatistics - */ -const se_MetricStreamStatisticsAdditionalStatistics = (input: string[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}; - -/** - * serializeAws_queryMetricStreamStatisticsConfiguration - */ -const se_MetricStreamStatisticsConfiguration = ( - input: MetricStreamStatisticsConfiguration, - context: __SerdeContext -): any => { - const entries: any = {}; - if (input[_IM] != null) { - const memberEntries = se_MetricStreamStatisticsIncludeMetrics(input[_IM], context); - if (input[_IM]?.length === 0) { - entries.IncludeMetrics = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `IncludeMetrics.${key}`; - entries[loc] = value; - }); - } - if (input[_AS] != null) { - const memberEntries = se_MetricStreamStatisticsAdditionalStatistics(input[_AS], context); - if (input[_AS]?.length === 0) { - entries.AdditionalStatistics = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `AdditionalStatistics.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryMetricStreamStatisticsConfigurations - */ -const se_MetricStreamStatisticsConfigurations = ( - input: MetricStreamStatisticsConfiguration[], - context: __SerdeContext -): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_MetricStreamStatisticsConfiguration(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}; - -/** - * serializeAws_queryMetricStreamStatisticsIncludeMetrics - */ -const se_MetricStreamStatisticsIncludeMetrics = ( - input: MetricStreamStatisticsMetric[], - context: __SerdeContext -): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_MetricStreamStatisticsMetric(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}; - -/** - * serializeAws_queryMetricStreamStatisticsMetric - */ -const se_MetricStreamStatisticsMetric = (input: MetricStreamStatisticsMetric, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_N] != null) { - entries[_N] = input[_N]; - } - if (input[_MN] != null) { - entries[_MN] = input[_MN]; - } - return entries; -}; - -/** - * serializeAws_queryPutAnomalyDetectorInput - */ -const se_PutAnomalyDetectorInput = (input: PutAnomalyDetectorInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_N] != null) { - entries[_N] = input[_N]; - } - if (input[_MN] != null) { - entries[_MN] = input[_MN]; - } - if (input[_D] != null) { - const memberEntries = se_Dimensions(input[_D], context); - if (input[_D]?.length === 0) { - entries.Dimensions = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Dimensions.${key}`; - entries[loc] = value; - }); - } - if (input[_S] != null) { - entries[_S] = input[_S]; - } - if (input[_Co] != null) { - const memberEntries = se_AnomalyDetectorConfiguration(input[_Co], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Configuration.${key}`; - entries[loc] = value; - }); - } - if (input[_MC] != null) { - const memberEntries = se_MetricCharacteristics(input[_MC], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `MetricCharacteristics.${key}`; - entries[loc] = value; - }); - } - if (input[_SMAD] != null) { - const memberEntries = se_SingleMetricAnomalyDetector(input[_SMAD], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `SingleMetricAnomalyDetector.${key}`; - entries[loc] = value; - }); - } - if (input[_MMAD] != null) { - const memberEntries = se_MetricMathAnomalyDetector(input[_MMAD], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `MetricMathAnomalyDetector.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryPutCompositeAlarmInput - */ -const se_PutCompositeAlarmInput = (input: PutCompositeAlarmInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_AE] != null) { - entries[_AE] = input[_AE]; - } - if (input[_AA] != null) { - const memberEntries = se_ResourceList(input[_AA], context); - if (input[_AA]?.length === 0) { - entries.AlarmActions = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `AlarmActions.${key}`; - entries[loc] = value; - }); - } - if (input[_AD] != null) { - entries[_AD] = input[_AD]; - } - if (input[_ANl] != null) { - entries[_ANl] = input[_ANl]; - } - if (input[_AR] != null) { - entries[_AR] = input[_AR]; - } - if (input[_IDA] != null) { - const memberEntries = se_ResourceList(input[_IDA], context); - if (input[_IDA]?.length === 0) { - entries.InsufficientDataActions = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `InsufficientDataActions.${key}`; - entries[loc] = value; - }); - } - if (input[_OKA] != null) { - const memberEntries = se_ResourceList(input[_OKA], context); - if (input[_OKA]?.length === 0) { - entries.OKActions = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `OKActions.${key}`; - entries[loc] = value; - }); - } - if (input[_Ta] != null) { - const memberEntries = se_TagList(input[_Ta], context); - if (input[_Ta]?.length === 0) { - entries.Tags = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Tags.${key}`; - entries[loc] = value; - }); - } - if (input[_ASc] != null) { - entries[_ASc] = input[_ASc]; - } - if (input[_ASWP] != null) { - entries[_ASWP] = input[_ASWP]; - } - if (input[_ASEP] != null) { - entries[_ASEP] = input[_ASEP]; - } - return entries; -}; - -/** - * serializeAws_queryPutDashboardInput - */ -const se_PutDashboardInput = (input: PutDashboardInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_DNa] != null) { - entries[_DNa] = input[_DNa]; - } - if (input[_DB] != null) { - entries[_DB] = input[_DB]; - } - return entries; -}; - -/** - * serializeAws_queryPutInsightRuleInput - */ -const se_PutInsightRuleInput = (input: PutInsightRuleInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_RNu] != null) { - entries[_RNu] = input[_RNu]; - } - if (input[_RS] != null) { - entries[_RS] = input[_RS]; - } - if (input[_RDu] != null) { - entries[_RDu] = input[_RDu]; - } - if (input[_Ta] != null) { - const memberEntries = se_TagList(input[_Ta], context); - if (input[_Ta]?.length === 0) { - entries.Tags = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Tags.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryPutManagedInsightRulesInput - */ -const se_PutManagedInsightRulesInput = (input: PutManagedInsightRulesInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_MRan] != null) { - const memberEntries = se_ManagedRules(input[_MRan], context); - if (input[_MRan]?.length === 0) { - entries.ManagedRules = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ManagedRules.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryPutMetricAlarmInput - */ -const se_PutMetricAlarmInput = (input: PutMetricAlarmInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_ANl] != null) { - entries[_ANl] = input[_ANl]; - } - if (input[_AD] != null) { - entries[_AD] = input[_AD]; - } - if (input[_AE] != null) { - entries[_AE] = input[_AE]; - } - if (input[_OKA] != null) { - const memberEntries = se_ResourceList(input[_OKA], context); - if (input[_OKA]?.length === 0) { - entries.OKActions = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `OKActions.${key}`; - entries[loc] = value; - }); - } - if (input[_AA] != null) { - const memberEntries = se_ResourceList(input[_AA], context); - if (input[_AA]?.length === 0) { - entries.AlarmActions = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `AlarmActions.${key}`; - entries[loc] = value; - }); - } - if (input[_IDA] != null) { - const memberEntries = se_ResourceList(input[_IDA], context); - if (input[_IDA]?.length === 0) { - entries.InsufficientDataActions = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `InsufficientDataActions.${key}`; - entries[loc] = value; - }); - } - if (input[_MN] != null) { - entries[_MN] = input[_MN]; - } - if (input[_N] != null) { - entries[_N] = input[_N]; - } - if (input[_St] != null) { - entries[_St] = input[_St]; - } - if (input[_ES] != null) { - entries[_ES] = input[_ES]; - } - if (input[_D] != null) { - const memberEntries = se_Dimensions(input[_D], context); - if (input[_D]?.length === 0) { - entries.Dimensions = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Dimensions.${key}`; - entries[loc] = value; - }); - } - if (input[_P] != null) { - entries[_P] = input[_P]; - } - if (input[_U] != null) { - entries[_U] = input[_U]; - } - if (input[_EP] != null) { - entries[_EP] = input[_EP]; - } - if (input[_DTA] != null) { - entries[_DTA] = input[_DTA]; - } - if (input[_Th] != null) { - entries[_Th] = __serializeFloat(input[_Th]); - } - if (input[_CO] != null) { - entries[_CO] = input[_CO]; - } - if (input[_TMD] != null) { - entries[_TMD] = input[_TMD]; - } - if (input[_ELSCP] != null) { - entries[_ELSCP] = input[_ELSCP]; - } - if (input[_M] != null) { - const memberEntries = se_MetricDataQueries(input[_M], context); - if (input[_M]?.length === 0) { - entries.Metrics = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Metrics.${key}`; - entries[loc] = value; - }); - } - if (input[_Ta] != null) { - const memberEntries = se_TagList(input[_Ta], context); - if (input[_Ta]?.length === 0) { - entries.Tags = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Tags.${key}`; - entries[loc] = value; - }); - } - if (input[_TMI] != null) { - entries[_TMI] = input[_TMI]; - } - return entries; -}; - -/** - * serializeAws_queryPutMetricDataInput - */ -const se_PutMetricDataInput = (input: PutMetricDataInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_N] != null) { - entries[_N] = input[_N]; - } - if (input[_MDe] != null) { - const memberEntries = se_MetricData(input[_MDe], context); - if (input[_MDe]?.length === 0) { - entries.MetricData = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `MetricData.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryPutMetricStreamInput - */ -const se_PutMetricStreamInput = (input: PutMetricStreamInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_Na] != null) { - entries[_Na] = input[_Na]; - } - if (input[_IF] != null) { - const memberEntries = se_MetricStreamFilters(input[_IF], context); - if (input[_IF]?.length === 0) { - entries.IncludeFilters = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `IncludeFilters.${key}`; - entries[loc] = value; - }); - } - if (input[_EF] != null) { - const memberEntries = se_MetricStreamFilters(input[_EF], context); - if (input[_EF]?.length === 0) { - entries.ExcludeFilters = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ExcludeFilters.${key}`; - entries[loc] = value; - }); - } - if (input[_FA] != null) { - entries[_FA] = input[_FA]; - } - if (input[_RAo] != null) { - entries[_RAo] = input[_RAo]; - } - if (input[_OF] != null) { - entries[_OF] = input[_OF]; - } - if (input[_Ta] != null) { - const memberEntries = se_TagList(input[_Ta], context); - if (input[_Ta]?.length === 0) { - entries.Tags = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Tags.${key}`; - entries[loc] = value; - }); - } - if (input[_SC] != null) { - const memberEntries = se_MetricStreamStatisticsConfigurations(input[_SC], context); - if (input[_SC]?.length === 0) { - entries.StatisticsConfigurations = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `StatisticsConfigurations.${key}`; - entries[loc] = value; - }); - } - if (input[_ILAM] != null) { - entries[_ILAM] = input[_ILAM]; - } - return entries; -}; - -/** - * serializeAws_queryRange - */ -const se_Range = (input: Range, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_ST] != null) { - entries[_ST] = __serializeDateTime(input[_ST]); - } - if (input[_ET] != null) { - entries[_ET] = __serializeDateTime(input[_ET]); - } - return entries; -}; - -/** - * serializeAws_queryResourceList - */ -const se_ResourceList = (input: string[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}; - -/** - * serializeAws_querySetAlarmStateInput - */ -const se_SetAlarmStateInput = (input: SetAlarmStateInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_ANl] != null) { - entries[_ANl] = input[_ANl]; - } - if (input[_SV] != null) { - entries[_SV] = input[_SV]; - } - if (input[_SRt] != null) { - entries[_SRt] = input[_SRt]; - } - if (input[_SRD] != null) { - entries[_SRD] = input[_SRD]; - } - return entries; -}; - -/** - * serializeAws_querySingleMetricAnomalyDetector - */ -const se_SingleMetricAnomalyDetector = (input: SingleMetricAnomalyDetector, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_AI] != null) { - entries[_AI] = input[_AI]; - } - if (input[_N] != null) { - entries[_N] = input[_N]; - } - if (input[_MN] != null) { - entries[_MN] = input[_MN]; - } - if (input[_D] != null) { - const memberEntries = se_Dimensions(input[_D], context); - if (input[_D]?.length === 0) { - entries.Dimensions = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Dimensions.${key}`; - entries[loc] = value; - }); - } - if (input[_S] != null) { - entries[_S] = input[_S]; - } - return entries; -}; - -/** - * serializeAws_queryStartMetricStreamsInput - */ -const se_StartMetricStreamsInput = (input: StartMetricStreamsInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_Nam] != null) { - const memberEntries = se_MetricStreamNames(input[_Nam], context); - if (input[_Nam]?.length === 0) { - entries.Names = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Names.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryStatistics - */ -const se_Statistics = (input: Statistic[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}; - -/** - * serializeAws_queryStatisticSet - */ -const se_StatisticSet = (input: StatisticSet, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_SCa] != null) { - entries[_SCa] = __serializeFloat(input[_SCa]); - } - if (input[_Su] != null) { - entries[_Su] = __serializeFloat(input[_Su]); - } - if (input[_Mi] != null) { - entries[_Mi] = __serializeFloat(input[_Mi]); - } - if (input[_Ma] != null) { - entries[_Ma] = __serializeFloat(input[_Ma]); - } - return entries; -}; - -/** - * serializeAws_queryStopMetricStreamsInput - */ -const se_StopMetricStreamsInput = (input: StopMetricStreamsInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_Nam] != null) { - const memberEntries = se_MetricStreamNames(input[_Nam], context); - if (input[_Nam]?.length === 0) { - entries.Names = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Names.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryTag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_K] != null) { - entries[_K] = input[_K]; - } - if (input[_Va] != null) { - entries[_Va] = input[_Va]; - } - return entries; -}; - -/** - * serializeAws_queryTagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}; - -/** - * serializeAws_queryTagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_Tag(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}; - -/** - * serializeAws_queryTagResourceInput - */ -const se_TagResourceInput = (input: TagResourceInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_RARN] != null) { - entries[_RARN] = input[_RARN]; - } - if (input[_Ta] != null) { - const memberEntries = se_TagList(input[_Ta], context); - if (input[_Ta]?.length === 0) { - entries.Tags = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Tags.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryUntagResourceInput - */ -const se_UntagResourceInput = (input: UntagResourceInput, context: __SerdeContext): any => { - const entries: any = {}; - if (input[_RARN] != null) { - entries[_RARN] = input[_RARN]; - } - if (input[_TK] != null) { - const memberEntries = se_TagKeyList(input[_TK], context); - if (input[_TK]?.length === 0) { - entries.TagKeys = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `TagKeys.${key}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryValues - */ -const se_Values = (input: number[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = __serializeFloat(entry); - counter++; - } - return entries; -}; - -/** - * deserializeAws_queryAlarmHistoryItem - */ -const de_AlarmHistoryItem = (output: any, context: __SerdeContext): AlarmHistoryItem => { - const contents: any = {}; - if (output[_ANl] != null) { - contents[_ANl] = __expectString(output[_ANl]); - } - if (output[_ATl] != null) { - contents[_ATl] = __expectString(output[_ATl]); - } - if (output[_Ti] != null) { - contents[_Ti] = __expectNonNull(__parseRfc3339DateTimeWithOffset(output[_Ti])); - } - if (output[_HIT] != null) { - contents[_HIT] = __expectString(output[_HIT]); - } - if (output[_HS] != null) { - contents[_HS] = __expectString(output[_HS]); - } - if (output[_HD] != null) { - contents[_HD] = __expectString(output[_HD]); - } - return contents; -}; - -/** - * deserializeAws_queryAlarmHistoryItems - */ -const de_AlarmHistoryItems = (output: any, context: __SerdeContext): AlarmHistoryItem[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_AlarmHistoryItem(entry, context); - }); -}; - -/** - * deserializeAws_queryAnomalyDetector - */ -const de_AnomalyDetector = (output: any, context: __SerdeContext): AnomalyDetector => { - const contents: any = {}; - if (output[_N] != null) { - contents[_N] = __expectString(output[_N]); - } - if (output[_MN] != null) { - contents[_MN] = __expectString(output[_MN]); - } - if (output.Dimensions === "") { - contents[_D] = []; - } else if (output[_D] != null && output[_D][_m] != null) { - contents[_D] = de_Dimensions(__getArrayIfSingleItem(output[_D][_m]), context); - } - if (output[_S] != null) { - contents[_S] = __expectString(output[_S]); - } - if (output[_Co] != null) { - contents[_Co] = de_AnomalyDetectorConfiguration(output[_Co], context); - } - if (output[_SV] != null) { - contents[_SV] = __expectString(output[_SV]); - } - if (output[_MC] != null) { - contents[_MC] = de_MetricCharacteristics(output[_MC], context); - } - if (output[_SMAD] != null) { - contents[_SMAD] = de_SingleMetricAnomalyDetector(output[_SMAD], context); - } - if (output[_MMAD] != null) { - contents[_MMAD] = de_MetricMathAnomalyDetector(output[_MMAD], context); - } - return contents; -}; - -/** - * deserializeAws_queryAnomalyDetectorConfiguration - */ -const de_AnomalyDetectorConfiguration = (output: any, context: __SerdeContext): AnomalyDetectorConfiguration => { - const contents: any = {}; - if (output.ExcludedTimeRanges === "") { - contents[_ETR] = []; - } else if (output[_ETR] != null && output[_ETR][_m] != null) { - contents[_ETR] = de_AnomalyDetectorExcludedTimeRanges(__getArrayIfSingleItem(output[_ETR][_m]), context); - } - if (output[_MT] != null) { - contents[_MT] = __expectString(output[_MT]); - } - return contents; -}; - -/** - * deserializeAws_queryAnomalyDetectorExcludedTimeRanges - */ -const de_AnomalyDetectorExcludedTimeRanges = (output: any, context: __SerdeContext): Range[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_Range(entry, context); - }); -}; - -/** - * deserializeAws_queryAnomalyDetectors - */ -const de_AnomalyDetectors = (output: any, context: __SerdeContext): AnomalyDetector[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_AnomalyDetector(entry, context); - }); -}; - -/** - * deserializeAws_queryBatchFailures - */ -const de_BatchFailures = (output: any, context: __SerdeContext): PartialFailure[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_PartialFailure(entry, context); - }); -}; - -/** - * deserializeAws_queryCompositeAlarm - */ -const de_CompositeAlarm = (output: any, context: __SerdeContext): CompositeAlarm => { - const contents: any = {}; - if (output[_AE] != null) { - contents[_AE] = __parseBoolean(output[_AE]); - } - if (output.AlarmActions === "") { - contents[_AA] = []; - } else if (output[_AA] != null && output[_AA][_m] != null) { - contents[_AA] = de_ResourceList(__getArrayIfSingleItem(output[_AA][_m]), context); - } - if (output[_AAl] != null) { - contents[_AAl] = __expectString(output[_AAl]); - } - if (output[_ACUT] != null) { - contents[_ACUT] = __expectNonNull(__parseRfc3339DateTimeWithOffset(output[_ACUT])); - } - if (output[_AD] != null) { - contents[_AD] = __expectString(output[_AD]); - } - if (output[_ANl] != null) { - contents[_ANl] = __expectString(output[_ANl]); - } - if (output[_AR] != null) { - contents[_AR] = __expectString(output[_AR]); - } - if (output.InsufficientDataActions === "") { - contents[_IDA] = []; - } else if (output[_IDA] != null && output[_IDA][_m] != null) { - contents[_IDA] = de_ResourceList(__getArrayIfSingleItem(output[_IDA][_m]), context); - } - if (output.OKActions === "") { - contents[_OKA] = []; - } else if (output[_OKA] != null && output[_OKA][_m] != null) { - contents[_OKA] = de_ResourceList(__getArrayIfSingleItem(output[_OKA][_m]), context); - } - if (output[_SRt] != null) { - contents[_SRt] = __expectString(output[_SRt]); - } - if (output[_SRD] != null) { - contents[_SRD] = __expectString(output[_SRD]); - } - if (output[_SUT] != null) { - contents[_SUT] = __expectNonNull(__parseRfc3339DateTimeWithOffset(output[_SUT])); - } - if (output[_SV] != null) { - contents[_SV] = __expectString(output[_SV]); - } - if (output[_STT] != null) { - contents[_STT] = __expectNonNull(__parseRfc3339DateTimeWithOffset(output[_STT])); - } - if (output[_ASB] != null) { - contents[_ASB] = __expectString(output[_ASB]); - } - if (output[_ASR] != null) { - contents[_ASR] = __expectString(output[_ASR]); - } - if (output[_ASc] != null) { - contents[_ASc] = __expectString(output[_ASc]); - } - if (output[_ASWP] != null) { - contents[_ASWP] = __strictParseInt32(output[_ASWP]) as number; - } - if (output[_ASEP] != null) { - contents[_ASEP] = __strictParseInt32(output[_ASEP]) as number; - } - return contents; -}; - -/** - * deserializeAws_queryCompositeAlarms - */ -const de_CompositeAlarms = (output: any, context: __SerdeContext): CompositeAlarm[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_CompositeAlarm(entry, context); - }); -}; - -/** - * deserializeAws_queryConcurrentModificationException - */ -const de_ConcurrentModificationException = (output: any, context: __SerdeContext): ConcurrentModificationException => { - const contents: any = {}; - if (output[_Mes] != null) { - contents[_Mes] = __expectString(output[_Mes]); - } - return contents; -}; - -/** - * deserializeAws_queryDashboardEntries - */ -const de_DashboardEntries = (output: any, context: __SerdeContext): DashboardEntry[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_DashboardEntry(entry, context); - }); -}; - -/** - * deserializeAws_queryDashboardEntry - */ -const de_DashboardEntry = (output: any, context: __SerdeContext): DashboardEntry => { - const contents: any = {}; - if (output[_DNa] != null) { - contents[_DNa] = __expectString(output[_DNa]); - } - if (output[_DAa] != null) { - contents[_DAa] = __expectString(output[_DAa]); - } - if (output[_LMa] != null) { - contents[_LMa] = __expectNonNull(__parseRfc3339DateTimeWithOffset(output[_LMa])); - } - if (output[_Si] != null) { - contents[_Si] = __strictParseLong(output[_Si]) as number; - } - return contents; -}; - -/** - * deserializeAws_queryDashboardInvalidInputError - */ -const de_DashboardInvalidInputError = (output: any, context: __SerdeContext): DashboardInvalidInputError => { - const contents: any = {}; - if (output[_me] != null) { - contents[_me] = __expectString(output[_me]); - } - if (output.dashboardValidationMessages === "") { - contents[_dVM] = []; - } else if (output[_dVM] != null && output[_dVM][_m] != null) { - contents[_dVM] = de_DashboardValidationMessages(__getArrayIfSingleItem(output[_dVM][_m]), context); - } - return contents; -}; - -/** - * deserializeAws_queryDashboardValidationMessage - */ -const de_DashboardValidationMessage = (output: any, context: __SerdeContext): DashboardValidationMessage => { - const contents: any = {}; - if (output[_DP] != null) { - contents[_DP] = __expectString(output[_DP]); - } - if (output[_Mes] != null) { - contents[_Mes] = __expectString(output[_Mes]); - } - return contents; -}; - -/** - * deserializeAws_queryDashboardValidationMessages - */ -const de_DashboardValidationMessages = (output: any, context: __SerdeContext): DashboardValidationMessage[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_DashboardValidationMessage(entry, context); - }); -}; - -/** - * deserializeAws_queryDatapoint - */ -const de_Datapoint = (output: any, context: __SerdeContext): Datapoint => { - const contents: any = {}; - if (output[_Ti] != null) { - contents[_Ti] = __expectNonNull(__parseRfc3339DateTimeWithOffset(output[_Ti])); - } - if (output[_SCa] != null) { - contents[_SCa] = __strictParseFloat(output[_SCa]) as number; - } - if (output[_Av] != null) { - contents[_Av] = __strictParseFloat(output[_Av]) as number; - } - if (output[_Su] != null) { - contents[_Su] = __strictParseFloat(output[_Su]) as number; - } - if (output[_Mi] != null) { - contents[_Mi] = __strictParseFloat(output[_Mi]) as number; - } - if (output[_Ma] != null) { - contents[_Ma] = __strictParseFloat(output[_Ma]) as number; - } - if (output[_U] != null) { - contents[_U] = __expectString(output[_U]); - } - if (output.ExtendedStatistics === "") { - contents[_ESx] = {}; - } else if (output[_ESx] != null && output[_ESx][_e] != null) { - contents[_ESx] = de_DatapointValueMap(__getArrayIfSingleItem(output[_ESx][_e]), context); - } - return contents; -}; - -/** - * deserializeAws_queryDatapoints - */ -const de_Datapoints = (output: any, context: __SerdeContext): Datapoint[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_Datapoint(entry, context); - }); -}; - -/** - * deserializeAws_queryDatapointValueMap - */ -const de_DatapointValueMap = (output: any, context: __SerdeContext): Record => { - return output.reduce((acc: any, pair: any) => { - if (pair["value"] === null) { - return acc; - } - acc[pair["key"]] = __strictParseFloat(pair["value"]) as number; - return acc; - }, {}); -}; - -/** - * deserializeAws_queryDatapointValues - */ -const de_DatapointValues = (output: any, context: __SerdeContext): number[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return __strictParseFloat(entry) as number; - }); -}; - -/** - * deserializeAws_queryDeleteAnomalyDetectorOutput - */ -const de_DeleteAnomalyDetectorOutput = (output: any, context: __SerdeContext): DeleteAnomalyDetectorOutput => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryDeleteDashboardsOutput - */ -const de_DeleteDashboardsOutput = (output: any, context: __SerdeContext): DeleteDashboardsOutput => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryDeleteInsightRulesOutput - */ -const de_DeleteInsightRulesOutput = (output: any, context: __SerdeContext): DeleteInsightRulesOutput => { - const contents: any = {}; - if (output.Failures === "") { - contents[_F] = []; - } else if (output[_F] != null && output[_F][_m] != null) { - contents[_F] = de_BatchFailures(__getArrayIfSingleItem(output[_F][_m]), context); - } - return contents; -}; - -/** - * deserializeAws_queryDeleteMetricStreamOutput - */ -const de_DeleteMetricStreamOutput = (output: any, context: __SerdeContext): DeleteMetricStreamOutput => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryDescribeAlarmHistoryOutput - */ -const de_DescribeAlarmHistoryOutput = (output: any, context: __SerdeContext): DescribeAlarmHistoryOutput => { - const contents: any = {}; - if (output.AlarmHistoryItems === "") { - contents[_AHI] = []; - } else if (output[_AHI] != null && output[_AHI][_m] != null) { - contents[_AHI] = de_AlarmHistoryItems(__getArrayIfSingleItem(output[_AHI][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = __expectString(output[_NT]); - } - return contents; -}; - -/** - * deserializeAws_queryDescribeAlarmsForMetricOutput - */ -const de_DescribeAlarmsForMetricOutput = (output: any, context: __SerdeContext): DescribeAlarmsForMetricOutput => { - const contents: any = {}; - if (output.MetricAlarms === "") { - contents[_MA] = []; - } else if (output[_MA] != null && output[_MA][_m] != null) { - contents[_MA] = de_MetricAlarms(__getArrayIfSingleItem(output[_MA][_m]), context); - } - return contents; -}; - -/** - * deserializeAws_queryDescribeAlarmsOutput - */ -const de_DescribeAlarmsOutput = (output: any, context: __SerdeContext): DescribeAlarmsOutput => { - const contents: any = {}; - if (output.CompositeAlarms === "") { - contents[_CA] = []; - } else if (output[_CA] != null && output[_CA][_m] != null) { - contents[_CA] = de_CompositeAlarms(__getArrayIfSingleItem(output[_CA][_m]), context); - } - if (output.MetricAlarms === "") { - contents[_MA] = []; - } else if (output[_MA] != null && output[_MA][_m] != null) { - contents[_MA] = de_MetricAlarms(__getArrayIfSingleItem(output[_MA][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = __expectString(output[_NT]); - } - return contents; -}; - -/** - * deserializeAws_queryDescribeAnomalyDetectorsOutput - */ -const de_DescribeAnomalyDetectorsOutput = (output: any, context: __SerdeContext): DescribeAnomalyDetectorsOutput => { - const contents: any = {}; - if (output.AnomalyDetectors === "") { - contents[_ADn] = []; - } else if (output[_ADn] != null && output[_ADn][_m] != null) { - contents[_ADn] = de_AnomalyDetectors(__getArrayIfSingleItem(output[_ADn][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = __expectString(output[_NT]); - } - return contents; -}; - -/** - * deserializeAws_queryDescribeInsightRulesOutput - */ -const de_DescribeInsightRulesOutput = (output: any, context: __SerdeContext): DescribeInsightRulesOutput => { - const contents: any = {}; - if (output[_NT] != null) { - contents[_NT] = __expectString(output[_NT]); - } - if (output.InsightRules === "") { - contents[_IR] = []; - } else if (output[_IR] != null && output[_IR][_m] != null) { - contents[_IR] = de_InsightRules(__getArrayIfSingleItem(output[_IR][_m]), context); - } - return contents; -}; - -/** - * deserializeAws_queryDimension - */ -const de_Dimension = (output: any, context: __SerdeContext): Dimension => { - const contents: any = {}; - if (output[_Na] != null) { - contents[_Na] = __expectString(output[_Na]); - } - if (output[_Va] != null) { - contents[_Va] = __expectString(output[_Va]); - } - return contents; -}; - -/** - * deserializeAws_queryDimensions - */ -const de_Dimensions = (output: any, context: __SerdeContext): Dimension[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_Dimension(entry, context); - }); -}; - -/** - * deserializeAws_queryDisableInsightRulesOutput - */ -const de_DisableInsightRulesOutput = (output: any, context: __SerdeContext): DisableInsightRulesOutput => { - const contents: any = {}; - if (output.Failures === "") { - contents[_F] = []; - } else if (output[_F] != null && output[_F][_m] != null) { - contents[_F] = de_BatchFailures(__getArrayIfSingleItem(output[_F][_m]), context); - } - return contents; -}; - -/** - * deserializeAws_queryEnableInsightRulesOutput - */ -const de_EnableInsightRulesOutput = (output: any, context: __SerdeContext): EnableInsightRulesOutput => { - const contents: any = {}; - if (output.Failures === "") { - contents[_F] = []; - } else if (output[_F] != null && output[_F][_m] != null) { - contents[_F] = de_BatchFailures(__getArrayIfSingleItem(output[_F][_m]), context); - } - return contents; -}; - -/** - * deserializeAws_queryGetDashboardOutput - */ -const de_GetDashboardOutput = (output: any, context: __SerdeContext): GetDashboardOutput => { - const contents: any = {}; - if (output[_DAa] != null) { - contents[_DAa] = __expectString(output[_DAa]); - } - if (output[_DB] != null) { - contents[_DB] = __expectString(output[_DB]); - } - if (output[_DNa] != null) { - contents[_DNa] = __expectString(output[_DNa]); - } - return contents; -}; - -/** - * deserializeAws_queryGetInsightRuleReportOutput - */ -const de_GetInsightRuleReportOutput = (output: any, context: __SerdeContext): GetInsightRuleReportOutput => { - const contents: any = {}; - if (output.KeyLabels === "") { - contents[_KL] = []; - } else if (output[_KL] != null && output[_KL][_m] != null) { - contents[_KL] = de_InsightRuleContributorKeyLabels(__getArrayIfSingleItem(output[_KL][_m]), context); - } - if (output[_ASg] != null) { - contents[_ASg] = __expectString(output[_ASg]); - } - if (output[_AV] != null) { - contents[_AV] = __strictParseFloat(output[_AV]) as number; - } - if (output[_AUC] != null) { - contents[_AUC] = __strictParseLong(output[_AUC]) as number; - } - if (output.Contributors === "") { - contents[_Con] = []; - } else if (output[_Con] != null && output[_Con][_m] != null) { - contents[_Con] = de_InsightRuleContributors(__getArrayIfSingleItem(output[_Con][_m]), context); - } - if (output.MetricDatapoints === "") { - contents[_MDet] = []; - } else if (output[_MDet] != null && output[_MDet][_m] != null) { - contents[_MDet] = de_InsightRuleMetricDatapoints(__getArrayIfSingleItem(output[_MDet][_m]), context); - } - return contents; -}; - -/** - * deserializeAws_queryGetMetricDataOutput - */ -const de_GetMetricDataOutput = (output: any, context: __SerdeContext): GetMetricDataOutput => { - const contents: any = {}; - if (output.MetricDataResults === "") { - contents[_MDR] = []; - } else if (output[_MDR] != null && output[_MDR][_m] != null) { - contents[_MDR] = de_MetricDataResults(__getArrayIfSingleItem(output[_MDR][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = __expectString(output[_NT]); - } - if (output.Messages === "") { - contents[_Mess] = []; - } else if (output[_Mess] != null && output[_Mess][_m] != null) { - contents[_Mess] = de_MetricDataResultMessages(__getArrayIfSingleItem(output[_Mess][_m]), context); - } - return contents; -}; - -/** - * deserializeAws_queryGetMetricStatisticsOutput - */ -const de_GetMetricStatisticsOutput = (output: any, context: __SerdeContext): GetMetricStatisticsOutput => { - const contents: any = {}; - if (output[_L] != null) { - contents[_L] = __expectString(output[_L]); - } - if (output.Datapoints === "") { - contents[_Da] = []; - } else if (output[_Da] != null && output[_Da][_m] != null) { - contents[_Da] = de_Datapoints(__getArrayIfSingleItem(output[_Da][_m]), context); - } - return contents; -}; - -/** - * deserializeAws_queryGetMetricStreamOutput - */ -const de_GetMetricStreamOutput = (output: any, context: __SerdeContext): GetMetricStreamOutput => { - const contents: any = {}; - if (output[_Ar] != null) { - contents[_Ar] = __expectString(output[_Ar]); - } - if (output[_Na] != null) { - contents[_Na] = __expectString(output[_Na]); - } - if (output.IncludeFilters === "") { - contents[_IF] = []; - } else if (output[_IF] != null && output[_IF][_m] != null) { - contents[_IF] = de_MetricStreamFilters(__getArrayIfSingleItem(output[_IF][_m]), context); - } - if (output.ExcludeFilters === "") { - contents[_EF] = []; - } else if (output[_EF] != null && output[_EF][_m] != null) { - contents[_EF] = de_MetricStreamFilters(__getArrayIfSingleItem(output[_EF][_m]), context); - } - if (output[_FA] != null) { - contents[_FA] = __expectString(output[_FA]); - } - if (output[_RAo] != null) { - contents[_RAo] = __expectString(output[_RAo]); - } - if (output[_Stat] != null) { - contents[_Stat] = __expectString(output[_Stat]); - } - if (output[_CD] != null) { - contents[_CD] = __expectNonNull(__parseRfc3339DateTimeWithOffset(output[_CD])); - } - if (output[_LUD] != null) { - contents[_LUD] = __expectNonNull(__parseRfc3339DateTimeWithOffset(output[_LUD])); - } - if (output[_OF] != null) { - contents[_OF] = __expectString(output[_OF]); - } - if (output.StatisticsConfigurations === "") { - contents[_SC] = []; - } else if (output[_SC] != null && output[_SC][_m] != null) { - contents[_SC] = de_MetricStreamStatisticsConfigurations(__getArrayIfSingleItem(output[_SC][_m]), context); - } - if (output[_ILAM] != null) { - contents[_ILAM] = __parseBoolean(output[_ILAM]); - } - return contents; -}; - -/** - * deserializeAws_queryGetMetricWidgetImageOutput - */ -const de_GetMetricWidgetImageOutput = (output: any, context: __SerdeContext): GetMetricWidgetImageOutput => { - const contents: any = {}; - if (output[_MWI] != null) { - contents[_MWI] = context.base64Decoder(output[_MWI]); - } - return contents; -}; - -/** - * deserializeAws_queryInsightRule - */ -const de_InsightRule = (output: any, context: __SerdeContext): InsightRule => { - const contents: any = {}; - if (output[_Na] != null) { - contents[_Na] = __expectString(output[_Na]); - } - if (output[_Stat] != null) { - contents[_Stat] = __expectString(output[_Stat]); - } - if (output[_Sc] != null) { - contents[_Sc] = __expectString(output[_Sc]); - } - if (output[_De] != null) { - contents[_De] = __expectString(output[_De]); - } - if (output[_MRana] != null) { - contents[_MRana] = __parseBoolean(output[_MRana]); - } - return contents; -}; - -/** - * deserializeAws_queryInsightRuleContributor - */ -const de_InsightRuleContributor = (output: any, context: __SerdeContext): InsightRuleContributor => { - const contents: any = {}; - if (output.Keys === "") { - contents[_Ke] = []; - } else if (output[_Ke] != null && output[_Ke][_m] != null) { - contents[_Ke] = de_InsightRuleContributorKeys(__getArrayIfSingleItem(output[_Ke][_m]), context); - } - if (output[_AAV] != null) { - contents[_AAV] = __strictParseFloat(output[_AAV]) as number; - } - if (output.Datapoints === "") { - contents[_Da] = []; - } else if (output[_Da] != null && output[_Da][_m] != null) { - contents[_Da] = de_InsightRuleContributorDatapoints(__getArrayIfSingleItem(output[_Da][_m]), context); - } - return contents; -}; - -/** - * deserializeAws_queryInsightRuleContributorDatapoint - */ -const de_InsightRuleContributorDatapoint = (output: any, context: __SerdeContext): InsightRuleContributorDatapoint => { - const contents: any = {}; - if (output[_Ti] != null) { - contents[_Ti] = __expectNonNull(__parseRfc3339DateTimeWithOffset(output[_Ti])); - } - if (output[_AVp] != null) { - contents[_AVp] = __strictParseFloat(output[_AVp]) as number; - } - return contents; -}; - -/** - * deserializeAws_queryInsightRuleContributorDatapoints - */ -const de_InsightRuleContributorDatapoints = ( - output: any, - context: __SerdeContext -): InsightRuleContributorDatapoint[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_InsightRuleContributorDatapoint(entry, context); - }); -}; - -/** - * deserializeAws_queryInsightRuleContributorKeyLabels - */ -const de_InsightRuleContributorKeyLabels = (output: any, context: __SerdeContext): string[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return __expectString(entry) as any; - }); -}; - -/** - * deserializeAws_queryInsightRuleContributorKeys - */ -const de_InsightRuleContributorKeys = (output: any, context: __SerdeContext): string[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return __expectString(entry) as any; - }); -}; - -/** - * deserializeAws_queryInsightRuleContributors - */ -const de_InsightRuleContributors = (output: any, context: __SerdeContext): InsightRuleContributor[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_InsightRuleContributor(entry, context); - }); -}; - -/** - * deserializeAws_queryInsightRuleMetricDatapoint - */ -const de_InsightRuleMetricDatapoint = (output: any, context: __SerdeContext): InsightRuleMetricDatapoint => { - const contents: any = {}; - if (output[_Ti] != null) { - contents[_Ti] = __expectNonNull(__parseRfc3339DateTimeWithOffset(output[_Ti])); - } - if (output[_UC] != null) { - contents[_UC] = __strictParseFloat(output[_UC]) as number; - } - if (output[_MCV] != null) { - contents[_MCV] = __strictParseFloat(output[_MCV]) as number; - } - if (output[_SCa] != null) { - contents[_SCa] = __strictParseFloat(output[_SCa]) as number; - } - if (output[_Av] != null) { - contents[_Av] = __strictParseFloat(output[_Av]) as number; - } - if (output[_Su] != null) { - contents[_Su] = __strictParseFloat(output[_Su]) as number; - } - if (output[_Mi] != null) { - contents[_Mi] = __strictParseFloat(output[_Mi]) as number; - } - if (output[_Ma] != null) { - contents[_Ma] = __strictParseFloat(output[_Ma]) as number; - } - return contents; -}; - -/** - * deserializeAws_queryInsightRuleMetricDatapoints - */ -const de_InsightRuleMetricDatapoints = (output: any, context: __SerdeContext): InsightRuleMetricDatapoint[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_InsightRuleMetricDatapoint(entry, context); - }); -}; - -/** - * deserializeAws_queryInsightRules - */ -const de_InsightRules = (output: any, context: __SerdeContext): InsightRule[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_InsightRule(entry, context); - }); -}; - -/** - * deserializeAws_queryInternalServiceFault - */ -const de_InternalServiceFault = (output: any, context: __SerdeContext): InternalServiceFault => { - const contents: any = {}; - if (output[_Mes] != null) { - contents[_Mes] = __expectString(output[_Mes]); - } - return contents; -}; - -/** - * deserializeAws_queryInvalidFormatFault - */ -const de_InvalidFormatFault = (output: any, context: __SerdeContext): InvalidFormatFault => { - const contents: any = {}; - if (output[_me] != null) { - contents[_me] = __expectString(output[_me]); - } - return contents; -}; - -/** - * deserializeAws_queryInvalidNextToken - */ -const de_InvalidNextToken = (output: any, context: __SerdeContext): InvalidNextToken => { - const contents: any = {}; - if (output[_me] != null) { - contents[_me] = __expectString(output[_me]); - } - return contents; -}; - -/** - * deserializeAws_queryInvalidParameterCombinationException - */ -const de_InvalidParameterCombinationException = ( - output: any, - context: __SerdeContext -): InvalidParameterCombinationException => { - const contents: any = {}; - if (output[_me] != null) { - contents[_me] = __expectString(output[_me]); - } - return contents; -}; - -/** - * deserializeAws_queryInvalidParameterValueException - */ -const de_InvalidParameterValueException = (output: any, context: __SerdeContext): InvalidParameterValueException => { - const contents: any = {}; - if (output[_me] != null) { - contents[_me] = __expectString(output[_me]); - } - return contents; -}; - -/** - * deserializeAws_queryLimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - const contents: any = {}; - if (output[_Mes] != null) { - contents[_Mes] = __expectString(output[_Mes]); - } - return contents; -}; - -/** - * deserializeAws_queryLimitExceededFault - */ -const de_LimitExceededFault = (output: any, context: __SerdeContext): LimitExceededFault => { - const contents: any = {}; - if (output[_me] != null) { - contents[_me] = __expectString(output[_me]); - } - return contents; -}; - -/** - * deserializeAws_queryListDashboardsOutput - */ -const de_ListDashboardsOutput = (output: any, context: __SerdeContext): ListDashboardsOutput => { - const contents: any = {}; - if (output.DashboardEntries === "") { - contents[_DE] = []; - } else if (output[_DE] != null && output[_DE][_m] != null) { - contents[_DE] = de_DashboardEntries(__getArrayIfSingleItem(output[_DE][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = __expectString(output[_NT]); - } - return contents; -}; - -/** - * deserializeAws_queryListManagedInsightRulesOutput - */ -const de_ListManagedInsightRulesOutput = (output: any, context: __SerdeContext): ListManagedInsightRulesOutput => { - const contents: any = {}; - if (output.ManagedRules === "") { - contents[_MRan] = []; - } else if (output[_MRan] != null && output[_MRan][_m] != null) { - contents[_MRan] = de_ManagedRuleDescriptions(__getArrayIfSingleItem(output[_MRan][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = __expectString(output[_NT]); - } - return contents; -}; - -/** - * deserializeAws_queryListMetricsOutput - */ -const de_ListMetricsOutput = (output: any, context: __SerdeContext): ListMetricsOutput => { - const contents: any = {}; - if (output.Metrics === "") { - contents[_M] = []; - } else if (output[_M] != null && output[_M][_m] != null) { - contents[_M] = de_Metrics(__getArrayIfSingleItem(output[_M][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = __expectString(output[_NT]); - } - if (output.OwningAccounts === "") { - contents[_OAw] = []; - } else if (output[_OAw] != null && output[_OAw][_m] != null) { - contents[_OAw] = de_OwningAccounts(__getArrayIfSingleItem(output[_OAw][_m]), context); - } - return contents; -}; - -/** - * deserializeAws_queryListMetricStreamsOutput - */ -const de_ListMetricStreamsOutput = (output: any, context: __SerdeContext): ListMetricStreamsOutput => { - const contents: any = {}; - if (output[_NT] != null) { - contents[_NT] = __expectString(output[_NT]); - } - if (output.Entries === "") { - contents[_En] = []; - } else if (output[_En] != null && output[_En][_m] != null) { - contents[_En] = de_MetricStreamEntries(__getArrayIfSingleItem(output[_En][_m]), context); - } - return contents; -}; - -/** - * deserializeAws_queryListTagsForResourceOutput - */ -const de_ListTagsForResourceOutput = (output: any, context: __SerdeContext): ListTagsForResourceOutput => { - const contents: any = {}; - if (output.Tags === "") { - contents[_Ta] = []; - } else if (output[_Ta] != null && output[_Ta][_m] != null) { - contents[_Ta] = de_TagList(__getArrayIfSingleItem(output[_Ta][_m]), context); - } - return contents; -}; - -/** - * deserializeAws_queryManagedRuleDescription - */ -const de_ManagedRuleDescription = (output: any, context: __SerdeContext): ManagedRuleDescription => { - const contents: any = {}; - if (output[_TN] != null) { - contents[_TN] = __expectString(output[_TN]); - } - if (output[_RARN] != null) { - contents[_RARN] = __expectString(output[_RARN]); - } - if (output[_RS] != null) { - contents[_RS] = de_ManagedRuleState(output[_RS], context); - } - return contents; -}; - -/** - * deserializeAws_queryManagedRuleDescriptions - */ -const de_ManagedRuleDescriptions = (output: any, context: __SerdeContext): ManagedRuleDescription[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_ManagedRuleDescription(entry, context); - }); -}; - -/** - * deserializeAws_queryManagedRuleState - */ -const de_ManagedRuleState = (output: any, context: __SerdeContext): ManagedRuleState => { - const contents: any = {}; - if (output[_RNu] != null) { - contents[_RNu] = __expectString(output[_RNu]); - } - if (output[_Stat] != null) { - contents[_Stat] = __expectString(output[_Stat]); - } - return contents; -}; - -/** - * deserializeAws_queryMessageData - */ -const de_MessageData = (output: any, context: __SerdeContext): MessageData => { - const contents: any = {}; - if (output[_Cod] != null) { - contents[_Cod] = __expectString(output[_Cod]); - } - if (output[_Va] != null) { - contents[_Va] = __expectString(output[_Va]); - } - return contents; -}; - -/** - * deserializeAws_queryMetric - */ -const de_Metric = (output: any, context: __SerdeContext): Metric => { - const contents: any = {}; - if (output[_N] != null) { - contents[_N] = __expectString(output[_N]); - } - if (output[_MN] != null) { - contents[_MN] = __expectString(output[_MN]); - } - if (output.Dimensions === "") { - contents[_D] = []; - } else if (output[_D] != null && output[_D][_m] != null) { - contents[_D] = de_Dimensions(__getArrayIfSingleItem(output[_D][_m]), context); - } - return contents; -}; - -/** - * deserializeAws_queryMetricAlarm - */ -const de_MetricAlarm = (output: any, context: __SerdeContext): MetricAlarm => { - const contents: any = {}; - if (output[_ANl] != null) { - contents[_ANl] = __expectString(output[_ANl]); - } - if (output[_AAl] != null) { - contents[_AAl] = __expectString(output[_AAl]); - } - if (output[_AD] != null) { - contents[_AD] = __expectString(output[_AD]); - } - if (output[_ACUT] != null) { - contents[_ACUT] = __expectNonNull(__parseRfc3339DateTimeWithOffset(output[_ACUT])); - } - if (output[_AE] != null) { - contents[_AE] = __parseBoolean(output[_AE]); - } - if (output.OKActions === "") { - contents[_OKA] = []; - } else if (output[_OKA] != null && output[_OKA][_m] != null) { - contents[_OKA] = de_ResourceList(__getArrayIfSingleItem(output[_OKA][_m]), context); - } - if (output.AlarmActions === "") { - contents[_AA] = []; - } else if (output[_AA] != null && output[_AA][_m] != null) { - contents[_AA] = de_ResourceList(__getArrayIfSingleItem(output[_AA][_m]), context); - } - if (output.InsufficientDataActions === "") { - contents[_IDA] = []; - } else if (output[_IDA] != null && output[_IDA][_m] != null) { - contents[_IDA] = de_ResourceList(__getArrayIfSingleItem(output[_IDA][_m]), context); - } - if (output[_SV] != null) { - contents[_SV] = __expectString(output[_SV]); - } - if (output[_SRt] != null) { - contents[_SRt] = __expectString(output[_SRt]); - } - if (output[_SRD] != null) { - contents[_SRD] = __expectString(output[_SRD]); - } - if (output[_SUT] != null) { - contents[_SUT] = __expectNonNull(__parseRfc3339DateTimeWithOffset(output[_SUT])); - } - if (output[_MN] != null) { - contents[_MN] = __expectString(output[_MN]); - } - if (output[_N] != null) { - contents[_N] = __expectString(output[_N]); - } - if (output[_St] != null) { - contents[_St] = __expectString(output[_St]); - } - if (output[_ES] != null) { - contents[_ES] = __expectString(output[_ES]); - } - if (output.Dimensions === "") { - contents[_D] = []; - } else if (output[_D] != null && output[_D][_m] != null) { - contents[_D] = de_Dimensions(__getArrayIfSingleItem(output[_D][_m]), context); - } - if (output[_P] != null) { - contents[_P] = __strictParseInt32(output[_P]) as number; - } - if (output[_U] != null) { - contents[_U] = __expectString(output[_U]); - } - if (output[_EP] != null) { - contents[_EP] = __strictParseInt32(output[_EP]) as number; - } - if (output[_DTA] != null) { - contents[_DTA] = __strictParseInt32(output[_DTA]) as number; - } - if (output[_Th] != null) { - contents[_Th] = __strictParseFloat(output[_Th]) as number; - } - if (output[_CO] != null) { - contents[_CO] = __expectString(output[_CO]); - } - if (output[_TMD] != null) { - contents[_TMD] = __expectString(output[_TMD]); - } - if (output[_ELSCP] != null) { - contents[_ELSCP] = __expectString(output[_ELSCP]); - } - if (output.Metrics === "") { - contents[_M] = []; - } else if (output[_M] != null && output[_M][_m] != null) { - contents[_M] = de_MetricDataQueries(__getArrayIfSingleItem(output[_M][_m]), context); - } - if (output[_TMI] != null) { - contents[_TMI] = __expectString(output[_TMI]); - } - if (output[_ESv] != null) { - contents[_ESv] = __expectString(output[_ESv]); - } - if (output[_STT] != null) { - contents[_STT] = __expectNonNull(__parseRfc3339DateTimeWithOffset(output[_STT])); - } - return contents; -}; - -/** - * deserializeAws_queryMetricAlarms - */ -const de_MetricAlarms = (output: any, context: __SerdeContext): MetricAlarm[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_MetricAlarm(entry, context); - }); -}; - -/** - * deserializeAws_queryMetricCharacteristics - */ -const de_MetricCharacteristics = (output: any, context: __SerdeContext): MetricCharacteristics => { - const contents: any = {}; - if (output[_PS] != null) { - contents[_PS] = __parseBoolean(output[_PS]); - } - return contents; -}; - -/** - * deserializeAws_queryMetricDataQueries - */ -const de_MetricDataQueries = (output: any, context: __SerdeContext): MetricDataQuery[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_MetricDataQuery(entry, context); - }); -}; - -/** - * deserializeAws_queryMetricDataQuery - */ -const de_MetricDataQuery = (output: any, context: __SerdeContext): MetricDataQuery => { - const contents: any = {}; - if (output[_I] != null) { - contents[_I] = __expectString(output[_I]); - } - if (output[_MS] != null) { - contents[_MS] = de_MetricStat(output[_MS], context); - } - if (output[_E] != null) { - contents[_E] = __expectString(output[_E]); - } - if (output[_L] != null) { - contents[_L] = __expectString(output[_L]); - } - if (output[_RD] != null) { - contents[_RD] = __parseBoolean(output[_RD]); - } - if (output[_P] != null) { - contents[_P] = __strictParseInt32(output[_P]) as number; - } - if (output[_AI] != null) { - contents[_AI] = __expectString(output[_AI]); - } - return contents; -}; - -/** - * deserializeAws_queryMetricDataResult - */ -const de_MetricDataResult = (output: any, context: __SerdeContext): MetricDataResult => { - const contents: any = {}; - if (output[_I] != null) { - contents[_I] = __expectString(output[_I]); - } - if (output[_L] != null) { - contents[_L] = __expectString(output[_L]); - } - if (output.Timestamps === "") { - contents[_Tim] = []; - } else if (output[_Tim] != null && output[_Tim][_m] != null) { - contents[_Tim] = de_Timestamps(__getArrayIfSingleItem(output[_Tim][_m]), context); - } - if (output.Values === "") { - contents[_Val] = []; - } else if (output[_Val] != null && output[_Val][_m] != null) { - contents[_Val] = de_DatapointValues(__getArrayIfSingleItem(output[_Val][_m]), context); - } - if (output[_SCt] != null) { - contents[_SCt] = __expectString(output[_SCt]); - } - if (output.Messages === "") { - contents[_Mess] = []; - } else if (output[_Mess] != null && output[_Mess][_m] != null) { - contents[_Mess] = de_MetricDataResultMessages(__getArrayIfSingleItem(output[_Mess][_m]), context); - } - return contents; -}; - -/** - * deserializeAws_queryMetricDataResultMessages - */ -const de_MetricDataResultMessages = (output: any, context: __SerdeContext): MessageData[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_MessageData(entry, context); - }); -}; - -/** - * deserializeAws_queryMetricDataResults - */ -const de_MetricDataResults = (output: any, context: __SerdeContext): MetricDataResult[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_MetricDataResult(entry, context); - }); -}; - -/** - * deserializeAws_queryMetricMathAnomalyDetector - */ -const de_MetricMathAnomalyDetector = (output: any, context: __SerdeContext): MetricMathAnomalyDetector => { - const contents: any = {}; - if (output.MetricDataQueries === "") { - contents[_MDQ] = []; - } else if (output[_MDQ] != null && output[_MDQ][_m] != null) { - contents[_MDQ] = de_MetricDataQueries(__getArrayIfSingleItem(output[_MDQ][_m]), context); - } - return contents; -}; - -/** - * deserializeAws_queryMetrics - */ -const de_Metrics = (output: any, context: __SerdeContext): Metric[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_Metric(entry, context); - }); -}; - -/** - * deserializeAws_queryMetricStat - */ -const de_MetricStat = (output: any, context: __SerdeContext): MetricStat => { - const contents: any = {}; - if (output[_Me] != null) { - contents[_Me] = de_Metric(output[_Me], context); - } - if (output[_P] != null) { - contents[_P] = __strictParseInt32(output[_P]) as number; - } - if (output[_S] != null) { - contents[_S] = __expectString(output[_S]); - } - if (output[_U] != null) { - contents[_U] = __expectString(output[_U]); - } - return contents; -}; - -/** - * deserializeAws_queryMetricStreamEntries - */ -const de_MetricStreamEntries = (output: any, context: __SerdeContext): MetricStreamEntry[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_MetricStreamEntry(entry, context); - }); -}; - -/** - * deserializeAws_queryMetricStreamEntry - */ -const de_MetricStreamEntry = (output: any, context: __SerdeContext): MetricStreamEntry => { - const contents: any = {}; - if (output[_Ar] != null) { - contents[_Ar] = __expectString(output[_Ar]); - } - if (output[_CD] != null) { - contents[_CD] = __expectNonNull(__parseRfc3339DateTimeWithOffset(output[_CD])); - } - if (output[_LUD] != null) { - contents[_LUD] = __expectNonNull(__parseRfc3339DateTimeWithOffset(output[_LUD])); - } - if (output[_Na] != null) { - contents[_Na] = __expectString(output[_Na]); - } - if (output[_FA] != null) { - contents[_FA] = __expectString(output[_FA]); - } - if (output[_Stat] != null) { - contents[_Stat] = __expectString(output[_Stat]); - } - if (output[_OF] != null) { - contents[_OF] = __expectString(output[_OF]); - } - return contents; -}; - -/** - * deserializeAws_queryMetricStreamFilter - */ -const de_MetricStreamFilter = (output: any, context: __SerdeContext): MetricStreamFilter => { - const contents: any = {}; - if (output[_N] != null) { - contents[_N] = __expectString(output[_N]); - } - if (output.MetricNames === "") { - contents[_MNe] = []; - } else if (output[_MNe] != null && output[_MNe][_m] != null) { - contents[_MNe] = de_MetricStreamFilterMetricNames(__getArrayIfSingleItem(output[_MNe][_m]), context); - } - return contents; -}; - -/** - * deserializeAws_queryMetricStreamFilterMetricNames - */ -const de_MetricStreamFilterMetricNames = (output: any, context: __SerdeContext): string[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return __expectString(entry) as any; - }); -}; - -/** - * deserializeAws_queryMetricStreamFilters - */ -const de_MetricStreamFilters = (output: any, context: __SerdeContext): MetricStreamFilter[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_MetricStreamFilter(entry, context); - }); -}; - -/** - * deserializeAws_queryMetricStreamStatisticsAdditionalStatistics - */ -const de_MetricStreamStatisticsAdditionalStatistics = (output: any, context: __SerdeContext): string[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return __expectString(entry) as any; - }); -}; - -/** - * deserializeAws_queryMetricStreamStatisticsConfiguration - */ -const de_MetricStreamStatisticsConfiguration = ( - output: any, - context: __SerdeContext -): MetricStreamStatisticsConfiguration => { - const contents: any = {}; - if (output.IncludeMetrics === "") { - contents[_IM] = []; - } else if (output[_IM] != null && output[_IM][_m] != null) { - contents[_IM] = de_MetricStreamStatisticsIncludeMetrics(__getArrayIfSingleItem(output[_IM][_m]), context); - } - if (output.AdditionalStatistics === "") { - contents[_AS] = []; - } else if (output[_AS] != null && output[_AS][_m] != null) { - contents[_AS] = de_MetricStreamStatisticsAdditionalStatistics(__getArrayIfSingleItem(output[_AS][_m]), context); - } - return contents; -}; - -/** - * deserializeAws_queryMetricStreamStatisticsConfigurations - */ -const de_MetricStreamStatisticsConfigurations = ( - output: any, - context: __SerdeContext -): MetricStreamStatisticsConfiguration[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_MetricStreamStatisticsConfiguration(entry, context); - }); -}; - -/** - * deserializeAws_queryMetricStreamStatisticsIncludeMetrics - */ -const de_MetricStreamStatisticsIncludeMetrics = ( - output: any, - context: __SerdeContext -): MetricStreamStatisticsMetric[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_MetricStreamStatisticsMetric(entry, context); - }); -}; - -/** - * deserializeAws_queryMetricStreamStatisticsMetric - */ -const de_MetricStreamStatisticsMetric = (output: any, context: __SerdeContext): MetricStreamStatisticsMetric => { - const contents: any = {}; - if (output[_N] != null) { - contents[_N] = __expectString(output[_N]); - } - if (output[_MN] != null) { - contents[_MN] = __expectString(output[_MN]); - } - return contents; -}; - -/** - * deserializeAws_queryMissingRequiredParameterException - */ -const de_MissingRequiredParameterException = ( - output: any, - context: __SerdeContext -): MissingRequiredParameterException => { - const contents: any = {}; - if (output[_me] != null) { - contents[_me] = __expectString(output[_me]); - } - return contents; -}; - -/** - * deserializeAws_queryOwningAccounts - */ -const de_OwningAccounts = (output: any, context: __SerdeContext): string[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return __expectString(entry) as any; - }); -}; - -/** - * deserializeAws_queryPartialFailure - */ -const de_PartialFailure = (output: any, context: __SerdeContext): PartialFailure => { - const contents: any = {}; - if (output[_FR] != null) { - contents[_FR] = __expectString(output[_FR]); - } - if (output[_ETx] != null) { - contents[_ETx] = __expectString(output[_ETx]); - } - if (output[_FC] != null) { - contents[_FC] = __expectString(output[_FC]); - } - if (output[_FD] != null) { - contents[_FD] = __expectString(output[_FD]); - } - return contents; -}; - -/** - * deserializeAws_queryPutAnomalyDetectorOutput - */ -const de_PutAnomalyDetectorOutput = (output: any, context: __SerdeContext): PutAnomalyDetectorOutput => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryPutDashboardOutput - */ -const de_PutDashboardOutput = (output: any, context: __SerdeContext): PutDashboardOutput => { - const contents: any = {}; - if (output.DashboardValidationMessages === "") { - contents[_DVM] = []; - } else if (output[_DVM] != null && output[_DVM][_m] != null) { - contents[_DVM] = de_DashboardValidationMessages(__getArrayIfSingleItem(output[_DVM][_m]), context); - } - return contents; -}; - -/** - * deserializeAws_queryPutInsightRuleOutput - */ -const de_PutInsightRuleOutput = (output: any, context: __SerdeContext): PutInsightRuleOutput => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryPutManagedInsightRulesOutput - */ -const de_PutManagedInsightRulesOutput = (output: any, context: __SerdeContext): PutManagedInsightRulesOutput => { - const contents: any = {}; - if (output.Failures === "") { - contents[_F] = []; - } else if (output[_F] != null && output[_F][_m] != null) { - contents[_F] = de_BatchFailures(__getArrayIfSingleItem(output[_F][_m]), context); - } - return contents; -}; - -/** - * deserializeAws_queryPutMetricStreamOutput - */ -const de_PutMetricStreamOutput = (output: any, context: __SerdeContext): PutMetricStreamOutput => { - const contents: any = {}; - if (output[_Ar] != null) { - contents[_Ar] = __expectString(output[_Ar]); - } - return contents; -}; - -/** - * deserializeAws_queryRange - */ -const de_Range = (output: any, context: __SerdeContext): Range => { - const contents: any = {}; - if (output[_ST] != null) { - contents[_ST] = __expectNonNull(__parseRfc3339DateTimeWithOffset(output[_ST])); - } - if (output[_ET] != null) { - contents[_ET] = __expectNonNull(__parseRfc3339DateTimeWithOffset(output[_ET])); - } - return contents; -}; - -/** - * deserializeAws_queryResourceList - */ -const de_ResourceList = (output: any, context: __SerdeContext): string[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return __expectString(entry) as any; - }); -}; - -/** - * deserializeAws_queryResourceNotFound - */ -const de_ResourceNotFound = (output: any, context: __SerdeContext): ResourceNotFound => { - const contents: any = {}; - if (output[_me] != null) { - contents[_me] = __expectString(output[_me]); - } - return contents; -}; - -/** - * deserializeAws_queryResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - const contents: any = {}; - if (output[_RT] != null) { - contents[_RT] = __expectString(output[_RT]); - } - if (output[_RI] != null) { - contents[_RI] = __expectString(output[_RI]); - } - if (output[_Mes] != null) { - contents[_Mes] = __expectString(output[_Mes]); - } - return contents; -}; - -/** - * deserializeAws_querySingleMetricAnomalyDetector - */ -const de_SingleMetricAnomalyDetector = (output: any, context: __SerdeContext): SingleMetricAnomalyDetector => { - const contents: any = {}; - if (output[_AI] != null) { - contents[_AI] = __expectString(output[_AI]); - } - if (output[_N] != null) { - contents[_N] = __expectString(output[_N]); - } - if (output[_MN] != null) { - contents[_MN] = __expectString(output[_MN]); - } - if (output.Dimensions === "") { - contents[_D] = []; - } else if (output[_D] != null && output[_D][_m] != null) { - contents[_D] = de_Dimensions(__getArrayIfSingleItem(output[_D][_m]), context); - } - if (output[_S] != null) { - contents[_S] = __expectString(output[_S]); - } - return contents; -}; - -/** - * deserializeAws_queryStartMetricStreamsOutput - */ -const de_StartMetricStreamsOutput = (output: any, context: __SerdeContext): StartMetricStreamsOutput => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryStopMetricStreamsOutput - */ -const de_StopMetricStreamsOutput = (output: any, context: __SerdeContext): StopMetricStreamsOutput => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryTag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - const contents: any = {}; - if (output[_K] != null) { - contents[_K] = __expectString(output[_K]); - } - if (output[_Va] != null) { - contents[_Va] = __expectString(output[_Va]); - } - return contents; -}; - -/** - * deserializeAws_queryTagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_Tag(entry, context); - }); -}; - -/** - * deserializeAws_queryTagResourceOutput - */ -const de_TagResourceOutput = (output: any, context: __SerdeContext): TagResourceOutput => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryTimestamps - */ -const de_Timestamps = (output: any, context: __SerdeContext): Date[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return __expectNonNull(__parseRfc3339DateTimeWithOffset(entry)); - }); -}; - -/** - * deserializeAws_queryUntagResourceOutput - */ -const de_UntagResourceOutput = (output: any, context: __SerdeContext): UntagResourceOutput => { - const contents: any = {}; - return contents; -}; - -const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ - httpStatusCode: output.statusCode, - requestId: - output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"], -}); - -// Encode Uint8Array data into string with utf-8. -const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => - collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); - -const throwDefaultError = withBaseException(__BaseException); -const buildHttpRpcRequest = async ( - context: __SerdeContext, - headers: __HeaderBag, - path: string, - resolvedHostname: string | undefined, - body: any -): Promise<__HttpRequest> => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const contents: any = { - protocol, - hostname, - port, - method: "POST", - path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, - headers, - }; - if (resolvedHostname !== undefined) { - contents.hostname = resolvedHostname; - } - if (body !== undefined) { - contents.body = body; - } - return new __HttpRequest(contents); -}; -const SHARED_HEADERS: __HeaderBag = { - "content-type": "application/x-www-form-urlencoded", -}; - -const _ = "2010-08-01"; -const _A = "Action"; -const _AA = "AlarmActions"; -const _AAV = "ApproximateAggregateValue"; -const _AAl = "AlarmArn"; -const _ACUT = "AlarmConfigurationUpdatedTimestamp"; -const _AD = "AlarmDescription"; -const _ADT = "AnomalyDetectorTypes"; -const _ADn = "AnomalyDetectors"; -const _AE = "ActionsEnabled"; -const _AHI = "AlarmHistoryItems"; -const _AI = "AccountId"; -const _AN = "AlarmNames"; -const _ANP = "AlarmNamePrefix"; -const _ANl = "AlarmName"; -const _AP = "ActionPrefix"; -const _AR = "AlarmRule"; -const _AS = "AdditionalStatistics"; -const _ASB = "ActionsSuppressedBy"; -const _ASEP = "ActionsSuppressorExtensionPeriod"; -const _ASR = "ActionsSuppressedReason"; -const _ASWP = "ActionsSuppressorWaitPeriod"; -const _ASc = "ActionsSuppressor"; -const _ASg = "AggregationStatistic"; -const _AT = "AlarmTypes"; -const _ATl = "AlarmType"; -const _AUC = "ApproximateUniqueCount"; -const _AV = "AggregateValue"; -const _AVp = "ApproximateValue"; -const _Ar = "Arn"; -const _Av = "Average"; -const _C = "Counts"; -const _CA = "CompositeAlarms"; -const _CD = "CreationDate"; -const _CO = "ComparisonOperator"; -const _COAN = "ChildrenOfAlarmName"; -const _Co = "Configuration"; -const _Cod = "Code"; -const _Con = "Contributors"; -const _D = "Dimensions"; -const _DA = "DeleteAlarms"; -const _DAA = "DisableAlarmActions"; -const _DAD = "DeleteAnomalyDetector"; -const _DADe = "DescribeAnomalyDetectors"; -const _DAFM = "DescribeAlarmsForMetric"; -const _DAH = "DescribeAlarmHistory"; -const _DAa = "DashboardArn"; -const _DAe = "DescribeAlarms"; -const _DB = "DashboardBody"; -const _DD = "DeleteDashboards"; -const _DE = "DashboardEntries"; -const _DIR = "DeleteInsightRules"; -const _DIRe = "DescribeInsightRules"; -const _DIRi = "DisableInsightRules"; -const _DMS = "DeleteMetricStream"; -const _DN = "DashboardNames"; -const _DNP = "DashboardNamePrefix"; -const _DNa = "DashboardName"; -const _DP = "DataPath"; -const _DTA = "DatapointsToAlarm"; -const _DVM = "DashboardValidationMessages"; -const _Da = "Datapoints"; -const _De = "Definition"; -const _E = "Expression"; -const _EAA = "EnableAlarmActions"; -const _ED = "EndDate"; -const _EF = "ExcludeFilters"; -const _EIR = "EnableInsightRules"; -const _ELSCP = "EvaluateLowSampleCountPercentile"; -const _EP = "EvaluationPeriods"; -const _ES = "ExtendedStatistic"; -const _ESv = "EvaluationState"; -const _ESx = "ExtendedStatistics"; -const _ET = "EndTime"; -const _ETR = "ExcludedTimeRanges"; -const _ETx = "ExceptionType"; -const _En = "Entries"; -const _F = "Failures"; -const _FA = "FirehoseArn"; -const _FC = "FailureCode"; -const _FD = "FailureDescription"; -const _FR = "FailureResource"; -const _GD = "GetDashboard"; -const _GIRR = "GetInsightRuleReport"; -const _GMD = "GetMetricData"; -const _GMS = "GetMetricStatistics"; -const _GMSe = "GetMetricStream"; -const _GMWI = "GetMetricWidgetImage"; -const _HD = "HistoryData"; -const _HIT = "HistoryItemType"; -const _HS = "HistorySummary"; -const _I = "Id"; -const _IDA = "InsufficientDataActions"; -const _IF = "IncludeFilters"; -const _ILA = "IncludeLinkedAccounts"; -const _ILAM = "IncludeLinkedAccountsMetrics"; -const _IM = "IncludeMetrics"; -const _IR = "InsightRules"; -const _K = "Key"; -const _KL = "KeyLabels"; -const _Ke = "Keys"; -const _L = "Label"; -const _LD = "ListDashboards"; -const _LM = "ListMetrics"; -const _LMIR = "ListManagedInsightRules"; -const _LMS = "ListMetricStreams"; -const _LMa = "LastModified"; -const _LO = "LabelOptions"; -const _LTFR = "ListTagsForResource"; -const _LUD = "LastUpdateDate"; -const _M = "Metrics"; -const _MA = "MetricAlarms"; -const _MC = "MetricCharacteristics"; -const _MCC = "MaxContributorCount"; -const _MCV = "MaxContributorValue"; -const _MD = "MaxDatapoints"; -const _MDQ = "MetricDataQueries"; -const _MDR = "MetricDataResults"; -const _MDe = "MetricData"; -const _MDet = "MetricDatapoints"; -const _MMAD = "MetricMathAnomalyDetector"; -const _MN = "MetricName"; -const _MNe = "MetricNames"; -const _MR = "MaxRecords"; -const _MRa = "MaxResults"; -const _MRan = "ManagedRules"; -const _MRana = "ManagedRule"; -const _MS = "MetricStat"; -const _MT = "MetricTimezone"; -const _MW = "MetricWidget"; -const _MWI = "MetricWidgetImage"; -const _Ma = "Maximum"; -const _Me = "Metric"; -const _Mes = "Message"; -const _Mess = "Messages"; -const _Mi = "Minimum"; -const _N = "Namespace"; -const _NT = "NextToken"; -const _Na = "Name"; -const _Nam = "Names"; -const _OA = "OwningAccount"; -const _OAw = "OwningAccounts"; -const _OB = "OrderBy"; -const _OF = "OutputFormat"; -const _OKA = "OKActions"; -const _P = "Period"; -const _PAD = "PutAnomalyDetector"; -const _PCA = "PutCompositeAlarm"; -const _PD = "PutDashboard"; -const _PIR = "PutInsightRule"; -const _PMA = "PutMetricAlarm"; -const _PMD = "PutMetricData"; -const _PMIR = "PutManagedInsightRules"; -const _PMS = "PutMetricStream"; -const _POAN = "ParentsOfAlarmName"; -const _PS = "PeriodicSpikes"; -const _RA = "RecentlyActive"; -const _RARN = "ResourceARN"; -const _RAo = "RoleArn"; -const _RD = "ReturnData"; -const _RDu = "RuleDefinition"; -const _RI = "ResourceId"; -const _RN = "RuleNames"; -const _RNu = "RuleName"; -const _RS = "RuleState"; -const _RT = "ResourceType"; -const _S = "Stat"; -const _SAS = "SetAlarmState"; -const _SB = "ScanBy"; -const _SC = "StatisticsConfigurations"; -const _SCa = "SampleCount"; -const _SCt = "StatusCode"; -const _SD = "StartDate"; -const _SMAD = "SingleMetricAnomalyDetector"; -const _SMS = "StartMetricStreams"; -const _SMSt = "StopMetricStreams"; -const _SR = "StorageResolution"; -const _SRD = "StateReasonData"; -const _SRt = "StateReason"; -const _ST = "StartTime"; -const _STT = "StateTransitionedTimestamp"; -const _SUT = "StateUpdatedTimestamp"; -const _SV = "StateValue"; -const _SVt = "StatisticValues"; -const _Sc = "Schema"; -const _Si = "Size"; -const _St = "Statistic"; -const _Sta = "Statistics"; -const _Stat = "State"; -const _Su = "Sum"; -const _T = "Timezone"; -const _TK = "TagKeys"; -const _TMD = "TreatMissingData"; -const _TMI = "ThresholdMetricId"; -const _TN = "TemplateName"; -const _TR = "TagResource"; -const _Ta = "Tags"; -const _Th = "Threshold"; -const _Ti = "Timestamp"; -const _Tim = "Timestamps"; -const _U = "Unit"; -const _UC = "UniqueContributors"; -const _UR = "UntagResource"; -const _V = "Version"; -const _Va = "Value"; -const _Val = "Values"; -const _dVM = "dashboardValidationMessages"; -const _e = "entry"; -const _m = "member"; -const _me = "message"; - -const buildFormUrlencodedString = (formEntries: Record): string => - Object.entries(formEntries) - .map(([key, value]) => __extendedEncodeURIComponent(key) + "=" + __extendedEncodeURIComponent(value)) - .join("&"); - -const loadQueryErrorCode = (output: __HttpResponse, data: any): string | undefined => { - if (data.Error?.Code !== undefined) { - return data.Error.Code; - } - if (output.statusCode == 404) { - return "NotFound"; - } -}; diff --git a/clients/client-cloudwatch/src/protocols/Rpcv2cbor.ts b/clients/client-cloudwatch/src/protocols/Rpcv2cbor.ts new file mode 100644 index 000000000000..5f4af2e46f57 --- /dev/null +++ b/clients/client-cloudwatch/src/protocols/Rpcv2cbor.ts @@ -0,0 +1,2958 @@ +// smithy-typescript generated code +import { + cbor, + loadSmithyRpcV2CborErrorCode, + parseCborBody as parseBody, + parseCborErrorBody as parseErrorBody, +} from "@smithy/core/cbor"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { + _json, + collectBody, + decorateServiceException as __decorateServiceException, + expectBoolean as __expectBoolean, + expectInt32 as __expectInt32, + expectLong as __expectLong, + expectNonNull as __expectNonNull, + expectString as __expectString, + limitedParseDouble as __limitedParseDouble, + parseEpochTimestamp as __parseEpochTimestamp, + serializeFloat as __serializeFloat, + take, + withBaseException, +} from "@smithy/smithy-client"; +import { + Endpoint as __Endpoint, + HeaderBag as __HeaderBag, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, +} from "@smithy/types"; +import { calculateBodyLength } from "@smithy/util-body-length-browser"; + +import { DeleteAlarmsCommandInput, DeleteAlarmsCommandOutput } from "../commands/DeleteAlarmsCommand"; +import { + DeleteAnomalyDetectorCommandInput, + DeleteAnomalyDetectorCommandOutput, +} from "../commands/DeleteAnomalyDetectorCommand"; +import { DeleteDashboardsCommandInput, DeleteDashboardsCommandOutput } from "../commands/DeleteDashboardsCommand"; +import { DeleteInsightRulesCommandInput, DeleteInsightRulesCommandOutput } from "../commands/DeleteInsightRulesCommand"; +import { DeleteMetricStreamCommandInput, DeleteMetricStreamCommandOutput } from "../commands/DeleteMetricStreamCommand"; +import { + DescribeAlarmHistoryCommandInput, + DescribeAlarmHistoryCommandOutput, +} from "../commands/DescribeAlarmHistoryCommand"; +import { DescribeAlarmsCommandInput, DescribeAlarmsCommandOutput } from "../commands/DescribeAlarmsCommand"; +import { + DescribeAlarmsForMetricCommandInput, + DescribeAlarmsForMetricCommandOutput, +} from "../commands/DescribeAlarmsForMetricCommand"; +import { + DescribeAnomalyDetectorsCommandInput, + DescribeAnomalyDetectorsCommandOutput, +} from "../commands/DescribeAnomalyDetectorsCommand"; +import { + DescribeInsightRulesCommandInput, + DescribeInsightRulesCommandOutput, +} from "../commands/DescribeInsightRulesCommand"; +import { + DisableAlarmActionsCommandInput, + DisableAlarmActionsCommandOutput, +} from "../commands/DisableAlarmActionsCommand"; +import { + DisableInsightRulesCommandInput, + DisableInsightRulesCommandOutput, +} from "../commands/DisableInsightRulesCommand"; +import { EnableAlarmActionsCommandInput, EnableAlarmActionsCommandOutput } from "../commands/EnableAlarmActionsCommand"; +import { EnableInsightRulesCommandInput, EnableInsightRulesCommandOutput } from "../commands/EnableInsightRulesCommand"; +import { GetDashboardCommandInput, GetDashboardCommandOutput } from "../commands/GetDashboardCommand"; +import { + GetInsightRuleReportCommandInput, + GetInsightRuleReportCommandOutput, +} from "../commands/GetInsightRuleReportCommand"; +import { GetMetricDataCommandInput, GetMetricDataCommandOutput } from "../commands/GetMetricDataCommand"; +import { + GetMetricStatisticsCommandInput, + GetMetricStatisticsCommandOutput, +} from "../commands/GetMetricStatisticsCommand"; +import { GetMetricStreamCommandInput, GetMetricStreamCommandOutput } from "../commands/GetMetricStreamCommand"; +import { + GetMetricWidgetImageCommandInput, + GetMetricWidgetImageCommandOutput, +} from "../commands/GetMetricWidgetImageCommand"; +import { ListDashboardsCommandInput, ListDashboardsCommandOutput } from "../commands/ListDashboardsCommand"; +import { + ListManagedInsightRulesCommandInput, + ListManagedInsightRulesCommandOutput, +} from "../commands/ListManagedInsightRulesCommand"; +import { ListMetricsCommandInput, ListMetricsCommandOutput } from "../commands/ListMetricsCommand"; +import { ListMetricStreamsCommandInput, ListMetricStreamsCommandOutput } from "../commands/ListMetricStreamsCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "../commands/ListTagsForResourceCommand"; +import { PutAnomalyDetectorCommandInput, PutAnomalyDetectorCommandOutput } from "../commands/PutAnomalyDetectorCommand"; +import { PutCompositeAlarmCommandInput, PutCompositeAlarmCommandOutput } from "../commands/PutCompositeAlarmCommand"; +import { PutDashboardCommandInput, PutDashboardCommandOutput } from "../commands/PutDashboardCommand"; +import { PutInsightRuleCommandInput, PutInsightRuleCommandOutput } from "../commands/PutInsightRuleCommand"; +import { + PutManagedInsightRulesCommandInput, + PutManagedInsightRulesCommandOutput, +} from "../commands/PutManagedInsightRulesCommand"; +import { PutMetricAlarmCommandInput, PutMetricAlarmCommandOutput } from "../commands/PutMetricAlarmCommand"; +import { PutMetricDataCommandInput, PutMetricDataCommandOutput } from "../commands/PutMetricDataCommand"; +import { PutMetricStreamCommandInput, PutMetricStreamCommandOutput } from "../commands/PutMetricStreamCommand"; +import { SetAlarmStateCommandInput, SetAlarmStateCommandOutput } from "../commands/SetAlarmStateCommand"; +import { StartMetricStreamsCommandInput, StartMetricStreamsCommandOutput } from "../commands/StartMetricStreamsCommand"; +import { StopMetricStreamsCommandInput, StopMetricStreamsCommandOutput } from "../commands/StopMetricStreamsCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; +import { CloudWatchServiceException as __BaseException } from "../models/CloudWatchServiceException"; +import { + AlarmHistoryItem, + AlarmType, + AnomalyDetector, + AnomalyDetectorConfiguration, + AnomalyDetectorType, + CompositeAlarm, + ConcurrentModificationException, + DashboardEntry, + DashboardInvalidInputError, + DashboardNotFoundError, + Datapoint, + DeleteAlarmsInput, + DeleteAnomalyDetectorInput, + DeleteDashboardsInput, + DeleteInsightRulesInput, + DeleteMetricStreamInput, + DescribeAlarmHistoryInput, + DescribeAlarmHistoryOutput, + DescribeAlarmsForMetricInput, + DescribeAlarmsForMetricOutput, + DescribeAlarmsInput, + DescribeAlarmsOutput, + DescribeAnomalyDetectorsInput, + DescribeAnomalyDetectorsOutput, + DescribeInsightRulesInput, + Dimension, + DimensionFilter, + DisableAlarmActionsInput, + DisableInsightRulesInput, + EnableAlarmActionsInput, + EnableInsightRulesInput, + GetDashboardInput, + GetInsightRuleReportInput, + GetInsightRuleReportOutput, + GetMetricDataInput, + GetMetricDataOutput, + GetMetricStatisticsInput, + GetMetricStatisticsOutput, + GetMetricStreamInput, + GetMetricStreamOutput, + GetMetricWidgetImageInput, + GetMetricWidgetImageOutput, + InsightRuleContributor, + InsightRuleContributorDatapoint, + InsightRuleMetricDatapoint, + InternalServiceFault, + InvalidFormatFault, + InvalidNextToken, + InvalidParameterCombinationException, + InvalidParameterValueException, + LabelOptions, + LimitExceededException, + LimitExceededFault, + ListDashboardsInput, + ListDashboardsOutput, + ListManagedInsightRulesInput, + ListMetricsInput, + ListMetricStreamsInput, + ListMetricStreamsOutput, + ListTagsForResourceInput, + ManagedRule, + Metric, + MetricAlarm, + MetricCharacteristics, + MetricDataQuery, + MetricDataResult, + MetricDatum, + MetricMathAnomalyDetector, + MetricStat, + MetricStreamEntry, + MetricStreamFilter, + MetricStreamStatisticsConfiguration, + MetricStreamStatisticsMetric, + MissingRequiredParameterException, + PutAnomalyDetectorInput, + PutCompositeAlarmInput, + PutDashboardInput, + PutInsightRuleInput, + PutManagedInsightRulesInput, + PutMetricAlarmInput, + PutMetricDataInput, + PutMetricStreamInput, + Range, + ResourceNotFound, + ResourceNotFoundException, + SetAlarmStateInput, + SingleMetricAnomalyDetector, + StartMetricStreamsInput, + Statistic, + StatisticSet, + StopMetricStreamsInput, + Tag, + TagResourceInput, + UntagResourceInput, +} from "../models/models_0"; + +/** + * serializeRpcv2cborDeleteAlarmsCommand + */ +export const se_DeleteAlarmsCommand = async ( + input: DeleteAlarmsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/DeleteAlarms", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborDeleteAnomalyDetectorCommand + */ +export const se_DeleteAnomalyDetectorCommand = async ( + input: DeleteAnomalyDetectorCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/DeleteAnomalyDetector", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborDeleteDashboardsCommand + */ +export const se_DeleteDashboardsCommand = async ( + input: DeleteDashboardsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/DeleteDashboards", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborDeleteInsightRulesCommand + */ +export const se_DeleteInsightRulesCommand = async ( + input: DeleteInsightRulesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/DeleteInsightRules", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborDeleteMetricStreamCommand + */ +export const se_DeleteMetricStreamCommand = async ( + input: DeleteMetricStreamCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/DeleteMetricStream", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborDescribeAlarmHistoryCommand + */ +export const se_DescribeAlarmHistoryCommand = async ( + input: DescribeAlarmHistoryCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(se_DescribeAlarmHistoryInput(input, context)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/DescribeAlarmHistory", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborDescribeAlarmsCommand + */ +export const se_DescribeAlarmsCommand = async ( + input: DescribeAlarmsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/DescribeAlarms", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborDescribeAlarmsForMetricCommand + */ +export const se_DescribeAlarmsForMetricCommand = async ( + input: DescribeAlarmsForMetricCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/DescribeAlarmsForMetric", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborDescribeAnomalyDetectorsCommand + */ +export const se_DescribeAnomalyDetectorsCommand = async ( + input: DescribeAnomalyDetectorsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/DescribeAnomalyDetectors", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborDescribeInsightRulesCommand + */ +export const se_DescribeInsightRulesCommand = async ( + input: DescribeInsightRulesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/DescribeInsightRules", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborDisableAlarmActionsCommand + */ +export const se_DisableAlarmActionsCommand = async ( + input: DisableAlarmActionsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/DisableAlarmActions", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborDisableInsightRulesCommand + */ +export const se_DisableInsightRulesCommand = async ( + input: DisableInsightRulesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/DisableInsightRules", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborEnableAlarmActionsCommand + */ +export const se_EnableAlarmActionsCommand = async ( + input: EnableAlarmActionsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/EnableAlarmActions", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborEnableInsightRulesCommand + */ +export const se_EnableInsightRulesCommand = async ( + input: EnableInsightRulesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/EnableInsightRules", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborGetDashboardCommand + */ +export const se_GetDashboardCommand = async ( + input: GetDashboardCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/GetDashboard", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborGetInsightRuleReportCommand + */ +export const se_GetInsightRuleReportCommand = async ( + input: GetInsightRuleReportCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(se_GetInsightRuleReportInput(input, context)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/GetInsightRuleReport", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborGetMetricDataCommand + */ +export const se_GetMetricDataCommand = async ( + input: GetMetricDataCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(se_GetMetricDataInput(input, context)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/GetMetricData", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborGetMetricStatisticsCommand + */ +export const se_GetMetricStatisticsCommand = async ( + input: GetMetricStatisticsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(se_GetMetricStatisticsInput(input, context)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/GetMetricStatistics", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborGetMetricStreamCommand + */ +export const se_GetMetricStreamCommand = async ( + input: GetMetricStreamCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/GetMetricStream", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborGetMetricWidgetImageCommand + */ +export const se_GetMetricWidgetImageCommand = async ( + input: GetMetricWidgetImageCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/GetMetricWidgetImage", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborListDashboardsCommand + */ +export const se_ListDashboardsCommand = async ( + input: ListDashboardsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/ListDashboards", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborListManagedInsightRulesCommand + */ +export const se_ListManagedInsightRulesCommand = async ( + input: ListManagedInsightRulesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/ListManagedInsightRules", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborListMetricsCommand + */ +export const se_ListMetricsCommand = async ( + input: ListMetricsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/ListMetrics", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborListMetricStreamsCommand + */ +export const se_ListMetricStreamsCommand = async ( + input: ListMetricStreamsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/ListMetricStreams", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborListTagsForResourceCommand + */ +export const se_ListTagsForResourceCommand = async ( + input: ListTagsForResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/ListTagsForResource", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborPutAnomalyDetectorCommand + */ +export const se_PutAnomalyDetectorCommand = async ( + input: PutAnomalyDetectorCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(se_PutAnomalyDetectorInput(input, context)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/PutAnomalyDetector", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborPutCompositeAlarmCommand + */ +export const se_PutCompositeAlarmCommand = async ( + input: PutCompositeAlarmCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/PutCompositeAlarm", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborPutDashboardCommand + */ +export const se_PutDashboardCommand = async ( + input: PutDashboardCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/PutDashboard", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborPutInsightRuleCommand + */ +export const se_PutInsightRuleCommand = async ( + input: PutInsightRuleCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/PutInsightRule", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborPutManagedInsightRulesCommand + */ +export const se_PutManagedInsightRulesCommand = async ( + input: PutManagedInsightRulesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/PutManagedInsightRules", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborPutMetricAlarmCommand + */ +export const se_PutMetricAlarmCommand = async ( + input: PutMetricAlarmCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(se_PutMetricAlarmInput(input, context)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/PutMetricAlarm", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborPutMetricDataCommand + */ +export const se_PutMetricDataCommand = async ( + input: PutMetricDataCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(se_PutMetricDataInput(input, context)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/PutMetricData", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborPutMetricStreamCommand + */ +export const se_PutMetricStreamCommand = async ( + input: PutMetricStreamCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/PutMetricStream", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborSetAlarmStateCommand + */ +export const se_SetAlarmStateCommand = async ( + input: SetAlarmStateCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/SetAlarmState", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborStartMetricStreamsCommand + */ +export const se_StartMetricStreamsCommand = async ( + input: StartMetricStreamsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/StartMetricStreams", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborStopMetricStreamsCommand + */ +export const se_StopMetricStreamsCommand = async ( + input: StopMetricStreamsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/StopMetricStreams", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborTagResourceCommand + */ +export const se_TagResourceCommand = async ( + input: TagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/TagResource", + undefined, + body + ); +}; + +/** + * serializeRpcv2cborUntagResourceCommand + */ +export const se_UntagResourceCommand = async ( + input: UntagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/GraniteServiceVersion20100801/operation/UntagResource", + undefined, + body + ); +}; + +/** + * deserializeRpcv2cborDeleteAlarmsCommand + */ +export const de_DeleteAlarmsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await collectBody(output.body, context); + const response: DeleteAlarmsCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeRpcv2cborDeleteAnomalyDetectorCommand + */ +export const de_DeleteAnomalyDetectorCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: DeleteAnomalyDetectorCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborDeleteDashboardsCommand + */ +export const de_DeleteDashboardsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: DeleteDashboardsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborDeleteInsightRulesCommand + */ +export const de_DeleteInsightRulesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: DeleteInsightRulesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborDeleteMetricStreamCommand + */ +export const de_DeleteMetricStreamCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: DeleteMetricStreamCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborDescribeAlarmHistoryCommand + */ +export const de_DescribeAlarmHistoryCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_DescribeAlarmHistoryOutput(data, context); + const response: DescribeAlarmHistoryCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborDescribeAlarmsCommand + */ +export const de_DescribeAlarmsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_DescribeAlarmsOutput(data, context); + const response: DescribeAlarmsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborDescribeAlarmsForMetricCommand + */ +export const de_DescribeAlarmsForMetricCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_DescribeAlarmsForMetricOutput(data, context); + const response: DescribeAlarmsForMetricCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborDescribeAnomalyDetectorsCommand + */ +export const de_DescribeAnomalyDetectorsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_DescribeAnomalyDetectorsOutput(data, context); + const response: DescribeAnomalyDetectorsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborDescribeInsightRulesCommand + */ +export const de_DescribeInsightRulesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: DescribeInsightRulesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborDisableAlarmActionsCommand + */ +export const de_DisableAlarmActionsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await collectBody(output.body, context); + const response: DisableAlarmActionsCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeRpcv2cborDisableInsightRulesCommand + */ +export const de_DisableInsightRulesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: DisableInsightRulesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborEnableAlarmActionsCommand + */ +export const de_EnableAlarmActionsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await collectBody(output.body, context); + const response: EnableAlarmActionsCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeRpcv2cborEnableInsightRulesCommand + */ +export const de_EnableInsightRulesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: EnableInsightRulesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborGetDashboardCommand + */ +export const de_GetDashboardCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: GetDashboardCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborGetInsightRuleReportCommand + */ +export const de_GetInsightRuleReportCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetInsightRuleReportOutput(data, context); + const response: GetInsightRuleReportCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborGetMetricDataCommand + */ +export const de_GetMetricDataCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetMetricDataOutput(data, context); + const response: GetMetricDataCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborGetMetricStatisticsCommand + */ +export const de_GetMetricStatisticsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetMetricStatisticsOutput(data, context); + const response: GetMetricStatisticsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborGetMetricStreamCommand + */ +export const de_GetMetricStreamCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetMetricStreamOutput(data, context); + const response: GetMetricStreamCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborGetMetricWidgetImageCommand + */ +export const de_GetMetricWidgetImageCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetMetricWidgetImageOutput(data, context); + const response: GetMetricWidgetImageCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborListDashboardsCommand + */ +export const de_ListDashboardsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_ListDashboardsOutput(data, context); + const response: ListDashboardsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborListManagedInsightRulesCommand + */ +export const de_ListManagedInsightRulesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: ListManagedInsightRulesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborListMetricsCommand + */ +export const de_ListMetricsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: ListMetricsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborListMetricStreamsCommand + */ +export const de_ListMetricStreamsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_ListMetricStreamsOutput(data, context); + const response: ListMetricStreamsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborListTagsForResourceCommand + */ +export const de_ListTagsForResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: ListTagsForResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborPutAnomalyDetectorCommand + */ +export const de_PutAnomalyDetectorCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: PutAnomalyDetectorCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborPutCompositeAlarmCommand + */ +export const de_PutCompositeAlarmCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await collectBody(output.body, context); + const response: PutCompositeAlarmCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeRpcv2cborPutDashboardCommand + */ +export const de_PutDashboardCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: PutDashboardCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborPutInsightRuleCommand + */ +export const de_PutInsightRuleCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: PutInsightRuleCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborPutManagedInsightRulesCommand + */ +export const de_PutManagedInsightRulesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: PutManagedInsightRulesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborPutMetricAlarmCommand + */ +export const de_PutMetricAlarmCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await collectBody(output.body, context); + const response: PutMetricAlarmCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeRpcv2cborPutMetricDataCommand + */ +export const de_PutMetricDataCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await collectBody(output.body, context); + const response: PutMetricDataCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeRpcv2cborPutMetricStreamCommand + */ +export const de_PutMetricStreamCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: PutMetricStreamCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborSetAlarmStateCommand + */ +export const de_SetAlarmStateCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await collectBody(output.body, context); + const response: SetAlarmStateCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeRpcv2cborStartMetricStreamsCommand + */ +export const de_StartMetricStreamsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: StartMetricStreamsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborStopMetricStreamsCommand + */ +export const de_StopMetricStreamsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: StopMetricStreamsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborTagResourceCommand + */ +export const de_TagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: TagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeRpcv2cborUntagResourceCommand + */ +export const de_UntagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: UntagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserialize_Rpcv2cborCommandError + */ +const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadSmithyRpcV2CborErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ResourceNotFound": + case "com.amazonaws.cloudwatch#ResourceNotFound": + throw await de_ResourceNotFoundRes(parsedOutput, context); + case "InternalServiceFault": + case "com.amazonaws.cloudwatch#InternalServiceFault": + throw await de_InternalServiceFaultRes(parsedOutput, context); + case "InvalidParameterCombinationException": + case "com.amazonaws.cloudwatch#InvalidParameterCombinationException": + throw await de_InvalidParameterCombinationExceptionRes(parsedOutput, context); + case "InvalidParameterValueException": + case "com.amazonaws.cloudwatch#InvalidParameterValueException": + throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); + case "MissingRequiredParameterException": + case "com.amazonaws.cloudwatch#MissingRequiredParameterException": + throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.cloudwatch#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "DashboardNotFoundError": + case "com.amazonaws.cloudwatch#DashboardNotFoundError": + throw await de_DashboardNotFoundErrorRes(parsedOutput, context); + case "InvalidNextToken": + case "com.amazonaws.cloudwatch#InvalidNextToken": + throw await de_InvalidNextTokenRes(parsedOutput, context); + case "LimitExceededException": + case "com.amazonaws.cloudwatch#LimitExceededException": + throw await de_LimitExceededExceptionRes(parsedOutput, context); + case "LimitExceededFault": + case "com.amazonaws.cloudwatch#LimitExceededFault": + throw await de_LimitExceededFaultRes(parsedOutput, context); + case "DashboardInvalidInputError": + case "com.amazonaws.cloudwatch#DashboardInvalidInputError": + throw await de_DashboardInvalidInputErrorRes(parsedOutput, context); + case "ConcurrentModificationException": + case "com.amazonaws.cloudwatch#ConcurrentModificationException": + throw await de_ConcurrentModificationExceptionRes(parsedOutput, context); + case "InvalidFormatFault": + case "com.amazonaws.cloudwatch#InvalidFormatFault": + throw await de_InvalidFormatFaultRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }) as never; + } +}; + +/** + * deserializeRpcv2cborConcurrentModificationExceptionRes + */ +const de_ConcurrentModificationExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new ConcurrentModificationException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeRpcv2cborDashboardInvalidInputErrorRes + */ +const de_DashboardInvalidInputErrorRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new DashboardInvalidInputError({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeRpcv2cborDashboardNotFoundErrorRes + */ +const de_DashboardNotFoundErrorRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new DashboardNotFoundError({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeRpcv2cborInternalServiceFaultRes + */ +const de_InternalServiceFaultRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new InternalServiceFault({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeRpcv2cborInvalidFormatFaultRes + */ +const de_InvalidFormatFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new InvalidFormatFault({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeRpcv2cborInvalidNextTokenRes + */ +const de_InvalidNextTokenRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new InvalidNextToken({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeRpcv2cborInvalidParameterCombinationExceptionRes + */ +const de_InvalidParameterCombinationExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new InvalidParameterCombinationException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeRpcv2cborInvalidParameterValueExceptionRes + */ +const de_InvalidParameterValueExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new InvalidParameterValueException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeRpcv2cborLimitExceededExceptionRes + */ +const de_LimitExceededExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new LimitExceededException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeRpcv2cborLimitExceededFaultRes + */ +const de_LimitExceededFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new LimitExceededFault({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeRpcv2cborMissingRequiredParameterExceptionRes + */ +const de_MissingRequiredParameterExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new MissingRequiredParameterException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeRpcv2cborResourceNotFoundRes + */ +const de_ResourceNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new ResourceNotFound({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeRpcv2cborResourceNotFoundExceptionRes + */ +const de_ResourceNotFoundExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +// se_AlarmNames omitted. + +// se_AlarmTypes omitted. + +/** + * serializeRpcv2cborAnomalyDetectorConfiguration + */ +const se_AnomalyDetectorConfiguration = (input: AnomalyDetectorConfiguration, context: __SerdeContext): any => { + return take(input, { + ExcludedTimeRanges: (_) => se_AnomalyDetectorExcludedTimeRanges(_, context), + MetricTimezone: [], + }); +}; + +/** + * serializeRpcv2cborAnomalyDetectorExcludedTimeRanges + */ +const se_AnomalyDetectorExcludedTimeRanges = (input: Range[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_Range(entry, context); + }); +}; + +// se_AnomalyDetectorTypes omitted. + +/** + * serializeRpcv2cborCounts + */ +const se_Counts = (input: number[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return __serializeFloat(entry); + }); +}; + +// se_DashboardNames omitted. + +// se_DeleteAlarmsInput omitted. + +// se_DeleteAnomalyDetectorInput omitted. + +// se_DeleteDashboardsInput omitted. + +// se_DeleteInsightRulesInput omitted. + +// se_DeleteMetricStreamInput omitted. + +/** + * serializeRpcv2cborDescribeAlarmHistoryInput + */ +const se_DescribeAlarmHistoryInput = (input: DescribeAlarmHistoryInput, context: __SerdeContext): any => { + return take(input, { + AlarmName: [], + AlarmTypes: _json, + EndDate: (_) => _.getTime() / 1_000, + HistoryItemType: [], + MaxRecords: [], + NextToken: [], + ScanBy: [], + StartDate: (_) => _.getTime() / 1_000, + }); +}; + +// se_DescribeAlarmsForMetricInput omitted. + +// se_DescribeAlarmsInput omitted. + +// se_DescribeAnomalyDetectorsInput omitted. + +// se_DescribeInsightRulesInput omitted. + +// se_Dimension omitted. + +// se_DimensionFilter omitted. + +// se_DimensionFilters omitted. + +// se_Dimensions omitted. + +// se_DisableAlarmActionsInput omitted. + +// se_DisableInsightRulesInput omitted. + +// se_EnableAlarmActionsInput omitted. + +// se_EnableInsightRulesInput omitted. + +// se_ExtendedStatistics omitted. + +// se_GetDashboardInput omitted. + +/** + * serializeRpcv2cborGetInsightRuleReportInput + */ +const se_GetInsightRuleReportInput = (input: GetInsightRuleReportInput, context: __SerdeContext): any => { + return take(input, { + EndTime: (_) => _.getTime() / 1_000, + MaxContributorCount: [], + Metrics: _json, + OrderBy: [], + Period: [], + RuleName: [], + StartTime: (_) => _.getTime() / 1_000, + }); +}; + +/** + * serializeRpcv2cborGetMetricDataInput + */ +const se_GetMetricDataInput = (input: GetMetricDataInput, context: __SerdeContext): any => { + return take(input, { + EndTime: (_) => _.getTime() / 1_000, + LabelOptions: _json, + MaxDatapoints: [], + MetricDataQueries: _json, + NextToken: [], + ScanBy: [], + StartTime: (_) => _.getTime() / 1_000, + }); +}; + +/** + * serializeRpcv2cborGetMetricStatisticsInput + */ +const se_GetMetricStatisticsInput = (input: GetMetricStatisticsInput, context: __SerdeContext): any => { + return take(input, { + Dimensions: _json, + EndTime: (_) => _.getTime() / 1_000, + ExtendedStatistics: _json, + MetricName: [], + Namespace: [], + Period: [], + StartTime: (_) => _.getTime() / 1_000, + Statistics: _json, + Unit: [], + }); +}; + +// se_GetMetricStreamInput omitted. + +// se_GetMetricWidgetImageInput omitted. + +// se_InsightRuleMetricList omitted. + +// se_InsightRuleNames omitted. + +// se_LabelOptions omitted. + +// se_ListDashboardsInput omitted. + +// se_ListManagedInsightRulesInput omitted. + +// se_ListMetricsInput omitted. + +// se_ListMetricStreamsInput omitted. + +// se_ListTagsForResourceInput omitted. + +// se_ManagedRule omitted. + +// se_ManagedRules omitted. + +// se_Metric omitted. + +// se_MetricCharacteristics omitted. + +/** + * serializeRpcv2cborMetricData + */ +const se_MetricData = (input: MetricDatum[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_MetricDatum(entry, context); + }); +}; + +// se_MetricDataQueries omitted. + +// se_MetricDataQuery omitted. + +/** + * serializeRpcv2cborMetricDatum + */ +const se_MetricDatum = (input: MetricDatum, context: __SerdeContext): any => { + return take(input, { + Counts: (_) => se_Counts(_, context), + Dimensions: _json, + MetricName: [], + StatisticValues: (_) => se_StatisticSet(_, context), + StorageResolution: [], + Timestamp: (_) => _.getTime() / 1_000, + Unit: [], + Value: __serializeFloat, + Values: (_) => se_Values(_, context), + }); +}; + +// se_MetricMathAnomalyDetector omitted. + +// se_MetricStat omitted. + +// se_MetricStreamFilter omitted. + +// se_MetricStreamFilterMetricNames omitted. + +// se_MetricStreamFilters omitted. + +// se_MetricStreamNames omitted. + +// se_MetricStreamStatisticsAdditionalStatistics omitted. + +// se_MetricStreamStatisticsConfiguration omitted. + +// se_MetricStreamStatisticsConfigurations omitted. + +// se_MetricStreamStatisticsIncludeMetrics omitted. + +// se_MetricStreamStatisticsMetric omitted. + +/** + * serializeRpcv2cborPutAnomalyDetectorInput + */ +const se_PutAnomalyDetectorInput = (input: PutAnomalyDetectorInput, context: __SerdeContext): any => { + return take(input, { + Configuration: (_) => se_AnomalyDetectorConfiguration(_, context), + Dimensions: _json, + MetricCharacteristics: _json, + MetricMathAnomalyDetector: _json, + MetricName: [], + Namespace: [], + SingleMetricAnomalyDetector: _json, + Stat: [], + }); +}; + +// se_PutCompositeAlarmInput omitted. + +// se_PutDashboardInput omitted. + +// se_PutInsightRuleInput omitted. + +// se_PutManagedInsightRulesInput omitted. + +/** + * serializeRpcv2cborPutMetricAlarmInput + */ +const se_PutMetricAlarmInput = (input: PutMetricAlarmInput, context: __SerdeContext): any => { + return take(input, { + ActionsEnabled: [], + AlarmActions: _json, + AlarmDescription: [], + AlarmName: [], + ComparisonOperator: [], + DatapointsToAlarm: [], + Dimensions: _json, + EvaluateLowSampleCountPercentile: [], + EvaluationPeriods: [], + ExtendedStatistic: [], + InsufficientDataActions: _json, + MetricName: [], + Metrics: _json, + Namespace: [], + OKActions: _json, + Period: [], + Statistic: [], + Tags: _json, + Threshold: __serializeFloat, + ThresholdMetricId: [], + TreatMissingData: [], + Unit: [], + }); +}; + +/** + * serializeRpcv2cborPutMetricDataInput + */ +const se_PutMetricDataInput = (input: PutMetricDataInput, context: __SerdeContext): any => { + return take(input, { + MetricData: (_) => se_MetricData(_, context), + Namespace: [], + }); +}; + +// se_PutMetricStreamInput omitted. + +/** + * serializeRpcv2cborRange + */ +const se_Range = (input: Range, context: __SerdeContext): any => { + return take(input, { + EndTime: (_) => _.getTime() / 1_000, + StartTime: (_) => _.getTime() / 1_000, + }); +}; + +// se_ResourceList omitted. + +// se_SetAlarmStateInput omitted. + +// se_SingleMetricAnomalyDetector omitted. + +// se_StartMetricStreamsInput omitted. + +// se_Statistics omitted. + +/** + * serializeRpcv2cborStatisticSet + */ +const se_StatisticSet = (input: StatisticSet, context: __SerdeContext): any => { + return take(input, { + Maximum: __serializeFloat, + Minimum: __serializeFloat, + SampleCount: __serializeFloat, + Sum: __serializeFloat, + }); +}; + +// se_StopMetricStreamsInput omitted. + +// se_Tag omitted. + +// se_TagKeyList omitted. + +// se_TagList omitted. + +// se_TagResourceInput omitted. + +// se_UntagResourceInput omitted. + +/** + * serializeRpcv2cborValues + */ +const se_Values = (input: number[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return __serializeFloat(entry); + }); +}; + +/** + * deserializeRpcv2cborAlarmHistoryItem + */ +const de_AlarmHistoryItem = (output: any, context: __SerdeContext): AlarmHistoryItem => { + return take(output, { + AlarmName: __expectString, + AlarmType: __expectString, + HistoryData: __expectString, + HistoryItemType: __expectString, + HistorySummary: __expectString, + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + }) as any; +}; + +/** + * deserializeRpcv2cborAlarmHistoryItems + */ +const de_AlarmHistoryItems = (output: any, context: __SerdeContext): AlarmHistoryItem[] => { + const collection = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_AlarmHistoryItem(entry, context); + }); + return collection; +}; + +/** + * deserializeRpcv2cborAnomalyDetector + */ +const de_AnomalyDetector = (output: any, context: __SerdeContext): AnomalyDetector => { + return take(output, { + Configuration: (_: any) => de_AnomalyDetectorConfiguration(_, context), + Dimensions: _json, + MetricCharacteristics: _json, + MetricMathAnomalyDetector: _json, + MetricName: __expectString, + Namespace: __expectString, + SingleMetricAnomalyDetector: _json, + Stat: __expectString, + StateValue: __expectString, + }) as any; +}; + +/** + * deserializeRpcv2cborAnomalyDetectorConfiguration + */ +const de_AnomalyDetectorConfiguration = (output: any, context: __SerdeContext): AnomalyDetectorConfiguration => { + return take(output, { + ExcludedTimeRanges: (_: any) => de_AnomalyDetectorExcludedTimeRanges(_, context), + MetricTimezone: __expectString, + }) as any; +}; + +/** + * deserializeRpcv2cborAnomalyDetectorExcludedTimeRanges + */ +const de_AnomalyDetectorExcludedTimeRanges = (output: any, context: __SerdeContext): Range[] => { + const collection = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Range(entry, context); + }); + return collection; +}; + +/** + * deserializeRpcv2cborAnomalyDetectors + */ +const de_AnomalyDetectors = (output: any, context: __SerdeContext): AnomalyDetector[] => { + const collection = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_AnomalyDetector(entry, context); + }); + return collection; +}; + +// de_BatchFailures omitted. + +/** + * deserializeRpcv2cborCompositeAlarm + */ +const de_CompositeAlarm = (output: any, context: __SerdeContext): CompositeAlarm => { + return take(output, { + ActionsEnabled: __expectBoolean, + ActionsSuppressedBy: __expectString, + ActionsSuppressedReason: __expectString, + ActionsSuppressor: __expectString, + ActionsSuppressorExtensionPeriod: __expectInt32, + ActionsSuppressorWaitPeriod: __expectInt32, + AlarmActions: _json, + AlarmArn: __expectString, + AlarmConfigurationUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + AlarmDescription: __expectString, + AlarmName: __expectString, + AlarmRule: __expectString, + InsufficientDataActions: _json, + OKActions: _json, + StateReason: __expectString, + StateReasonData: __expectString, + StateTransitionedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + StateUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + StateValue: __expectString, + }) as any; +}; + +/** + * deserializeRpcv2cborCompositeAlarms + */ +const de_CompositeAlarms = (output: any, context: __SerdeContext): CompositeAlarm[] => { + const collection = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_CompositeAlarm(entry, context); + }); + return collection; +}; + +// de_ConcurrentModificationException omitted. + +/** + * deserializeRpcv2cborDashboardEntries + */ +const de_DashboardEntries = (output: any, context: __SerdeContext): DashboardEntry[] => { + const collection = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_DashboardEntry(entry, context); + }); + return collection; +}; + +/** + * deserializeRpcv2cborDashboardEntry + */ +const de_DashboardEntry = (output: any, context: __SerdeContext): DashboardEntry => { + return take(output, { + DashboardArn: __expectString, + DashboardName: __expectString, + LastModified: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + Size: __expectLong, + }) as any; +}; + +// de_DashboardInvalidInputError omitted. + +// de_DashboardNotFoundError omitted. + +// de_DashboardValidationMessage omitted. + +// de_DashboardValidationMessages omitted. + +/** + * deserializeRpcv2cborDatapoint + */ +const de_Datapoint = (output: any, context: __SerdeContext): Datapoint => { + return take(output, { + Average: __limitedParseDouble, + ExtendedStatistics: (_: any) => de_DatapointValueMap(_, context), + Maximum: __limitedParseDouble, + Minimum: __limitedParseDouble, + SampleCount: __limitedParseDouble, + Sum: __limitedParseDouble, + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + Unit: __expectString, + }) as any; +}; + +/** + * deserializeRpcv2cborDatapoints + */ +const de_Datapoints = (output: any, context: __SerdeContext): Datapoint[] => { + const collection = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Datapoint(entry, context); + }); + return collection; +}; + +/** + * deserializeRpcv2cborDatapointValueMap + */ +const de_DatapointValueMap = (output: any, context: __SerdeContext): Record => { + return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { + if (value !== null) { + acc[key as string] = __limitedParseDouble(value) as any; + } + return acc; + }, {} as Record); +}; + +/** + * deserializeRpcv2cborDatapointValues + */ +const de_DatapointValues = (output: any, context: __SerdeContext): number[] => { + const collection = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return __limitedParseDouble(entry) as any; + }); + return collection; +}; + +// de_DeleteAnomalyDetectorOutput omitted. + +// de_DeleteDashboardsOutput omitted. + +// de_DeleteInsightRulesOutput omitted. + +// de_DeleteMetricStreamOutput omitted. + +/** + * deserializeRpcv2cborDescribeAlarmHistoryOutput + */ +const de_DescribeAlarmHistoryOutput = (output: any, context: __SerdeContext): DescribeAlarmHistoryOutput => { + return take(output, { + AlarmHistoryItems: (_: any) => de_AlarmHistoryItems(_, context), + NextToken: __expectString, + }) as any; +}; + +/** + * deserializeRpcv2cborDescribeAlarmsForMetricOutput + */ +const de_DescribeAlarmsForMetricOutput = (output: any, context: __SerdeContext): DescribeAlarmsForMetricOutput => { + return take(output, { + MetricAlarms: (_: any) => de_MetricAlarms(_, context), + }) as any; +}; + +/** + * deserializeRpcv2cborDescribeAlarmsOutput + */ +const de_DescribeAlarmsOutput = (output: any, context: __SerdeContext): DescribeAlarmsOutput => { + return take(output, { + CompositeAlarms: (_: any) => de_CompositeAlarms(_, context), + MetricAlarms: (_: any) => de_MetricAlarms(_, context), + NextToken: __expectString, + }) as any; +}; + +/** + * deserializeRpcv2cborDescribeAnomalyDetectorsOutput + */ +const de_DescribeAnomalyDetectorsOutput = (output: any, context: __SerdeContext): DescribeAnomalyDetectorsOutput => { + return take(output, { + AnomalyDetectors: (_: any) => de_AnomalyDetectors(_, context), + NextToken: __expectString, + }) as any; +}; + +// de_DescribeInsightRulesOutput omitted. + +// de_Dimension omitted. + +// de_Dimensions omitted. + +// de_DisableInsightRulesOutput omitted. + +// de_EnableInsightRulesOutput omitted. + +// de_GetDashboardOutput omitted. + +/** + * deserializeRpcv2cborGetInsightRuleReportOutput + */ +const de_GetInsightRuleReportOutput = (output: any, context: __SerdeContext): GetInsightRuleReportOutput => { + return take(output, { + AggregateValue: __limitedParseDouble, + AggregationStatistic: __expectString, + ApproximateUniqueCount: __expectLong, + Contributors: (_: any) => de_InsightRuleContributors(_, context), + KeyLabels: _json, + MetricDatapoints: (_: any) => de_InsightRuleMetricDatapoints(_, context), + }) as any; +}; + +/** + * deserializeRpcv2cborGetMetricDataOutput + */ +const de_GetMetricDataOutput = (output: any, context: __SerdeContext): GetMetricDataOutput => { + return take(output, { + Messages: _json, + MetricDataResults: (_: any) => de_MetricDataResults(_, context), + NextToken: __expectString, + }) as any; +}; + +/** + * deserializeRpcv2cborGetMetricStatisticsOutput + */ +const de_GetMetricStatisticsOutput = (output: any, context: __SerdeContext): GetMetricStatisticsOutput => { + return take(output, { + Datapoints: (_: any) => de_Datapoints(_, context), + Label: __expectString, + }) as any; +}; + +/** + * deserializeRpcv2cborGetMetricStreamOutput + */ +const de_GetMetricStreamOutput = (output: any, context: __SerdeContext): GetMetricStreamOutput => { + return take(output, { + Arn: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + ExcludeFilters: _json, + FirehoseArn: __expectString, + IncludeFilters: _json, + IncludeLinkedAccountsMetrics: __expectBoolean, + LastUpdateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + Name: __expectString, + OutputFormat: __expectString, + RoleArn: __expectString, + State: __expectString, + StatisticsConfigurations: _json, + }) as any; +}; + +/** + * deserializeRpcv2cborGetMetricWidgetImageOutput + */ +const de_GetMetricWidgetImageOutput = (output: any, context: __SerdeContext): GetMetricWidgetImageOutput => { + return take(output, { + MetricWidgetImage: context.base64Decoder, + }) as any; +}; + +// de_InsightRule omitted. + +/** + * deserializeRpcv2cborInsightRuleContributor + */ +const de_InsightRuleContributor = (output: any, context: __SerdeContext): InsightRuleContributor => { + return take(output, { + ApproximateAggregateValue: __limitedParseDouble, + Datapoints: (_: any) => de_InsightRuleContributorDatapoints(_, context), + Keys: _json, + }) as any; +}; + +/** + * deserializeRpcv2cborInsightRuleContributorDatapoint + */ +const de_InsightRuleContributorDatapoint = (output: any, context: __SerdeContext): InsightRuleContributorDatapoint => { + return take(output, { + ApproximateValue: __limitedParseDouble, + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + }) as any; +}; + +/** + * deserializeRpcv2cborInsightRuleContributorDatapoints + */ +const de_InsightRuleContributorDatapoints = ( + output: any, + context: __SerdeContext +): InsightRuleContributorDatapoint[] => { + const collection = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_InsightRuleContributorDatapoint(entry, context); + }); + return collection; +}; + +// de_InsightRuleContributorKeyLabels omitted. + +// de_InsightRuleContributorKeys omitted. + +/** + * deserializeRpcv2cborInsightRuleContributors + */ +const de_InsightRuleContributors = (output: any, context: __SerdeContext): InsightRuleContributor[] => { + const collection = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_InsightRuleContributor(entry, context); + }); + return collection; +}; + +/** + * deserializeRpcv2cborInsightRuleMetricDatapoint + */ +const de_InsightRuleMetricDatapoint = (output: any, context: __SerdeContext): InsightRuleMetricDatapoint => { + return take(output, { + Average: __limitedParseDouble, + MaxContributorValue: __limitedParseDouble, + Maximum: __limitedParseDouble, + Minimum: __limitedParseDouble, + SampleCount: __limitedParseDouble, + Sum: __limitedParseDouble, + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + UniqueContributors: __limitedParseDouble, + }) as any; +}; + +/** + * deserializeRpcv2cborInsightRuleMetricDatapoints + */ +const de_InsightRuleMetricDatapoints = (output: any, context: __SerdeContext): InsightRuleMetricDatapoint[] => { + const collection = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_InsightRuleMetricDatapoint(entry, context); + }); + return collection; +}; + +// de_InsightRules omitted. + +// de_InternalServiceFault omitted. + +// de_InvalidFormatFault omitted. + +// de_InvalidNextToken omitted. + +// de_InvalidParameterCombinationException omitted. + +// de_InvalidParameterValueException omitted. + +// de_LimitExceededException omitted. + +// de_LimitExceededFault omitted. + +/** + * deserializeRpcv2cborListDashboardsOutput + */ +const de_ListDashboardsOutput = (output: any, context: __SerdeContext): ListDashboardsOutput => { + return take(output, { + DashboardEntries: (_: any) => de_DashboardEntries(_, context), + NextToken: __expectString, + }) as any; +}; + +// de_ListManagedInsightRulesOutput omitted. + +// de_ListMetricsOutput omitted. + +/** + * deserializeRpcv2cborListMetricStreamsOutput + */ +const de_ListMetricStreamsOutput = (output: any, context: __SerdeContext): ListMetricStreamsOutput => { + return take(output, { + Entries: (_: any) => de_MetricStreamEntries(_, context), + NextToken: __expectString, + }) as any; +}; + +// de_ListTagsForResourceOutput omitted. + +// de_ManagedRuleDescription omitted. + +// de_ManagedRuleDescriptions omitted. + +// de_ManagedRuleState omitted. + +// de_MessageData omitted. + +// de_Metric omitted. + +/** + * deserializeRpcv2cborMetricAlarm + */ +const de_MetricAlarm = (output: any, context: __SerdeContext): MetricAlarm => { + return take(output, { + ActionsEnabled: __expectBoolean, + AlarmActions: _json, + AlarmArn: __expectString, + AlarmConfigurationUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + AlarmDescription: __expectString, + AlarmName: __expectString, + ComparisonOperator: __expectString, + DatapointsToAlarm: __expectInt32, + Dimensions: _json, + EvaluateLowSampleCountPercentile: __expectString, + EvaluationPeriods: __expectInt32, + EvaluationState: __expectString, + ExtendedStatistic: __expectString, + InsufficientDataActions: _json, + MetricName: __expectString, + Metrics: _json, + Namespace: __expectString, + OKActions: _json, + Period: __expectInt32, + StateReason: __expectString, + StateReasonData: __expectString, + StateTransitionedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + StateUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + StateValue: __expectString, + Statistic: __expectString, + Threshold: __limitedParseDouble, + ThresholdMetricId: __expectString, + TreatMissingData: __expectString, + Unit: __expectString, + }) as any; +}; + +/** + * deserializeRpcv2cborMetricAlarms + */ +const de_MetricAlarms = (output: any, context: __SerdeContext): MetricAlarm[] => { + const collection = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_MetricAlarm(entry, context); + }); + return collection; +}; + +// de_MetricCharacteristics omitted. + +// de_MetricDataQueries omitted. + +// de_MetricDataQuery omitted. + +/** + * deserializeRpcv2cborMetricDataResult + */ +const de_MetricDataResult = (output: any, context: __SerdeContext): MetricDataResult => { + return take(output, { + Id: __expectString, + Label: __expectString, + Messages: _json, + StatusCode: __expectString, + Timestamps: (_: any) => de_Timestamps(_, context), + Values: (_: any) => de_DatapointValues(_, context), + }) as any; +}; + +// de_MetricDataResultMessages omitted. + +/** + * deserializeRpcv2cborMetricDataResults + */ +const de_MetricDataResults = (output: any, context: __SerdeContext): MetricDataResult[] => { + const collection = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_MetricDataResult(entry, context); + }); + return collection; +}; + +// de_MetricMathAnomalyDetector omitted. + +// de_Metrics omitted. + +// de_MetricStat omitted. + +/** + * deserializeRpcv2cborMetricStreamEntries + */ +const de_MetricStreamEntries = (output: any, context: __SerdeContext): MetricStreamEntry[] => { + const collection = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_MetricStreamEntry(entry, context); + }); + return collection; +}; + +/** + * deserializeRpcv2cborMetricStreamEntry + */ +const de_MetricStreamEntry = (output: any, context: __SerdeContext): MetricStreamEntry => { + return take(output, { + Arn: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + FirehoseArn: __expectString, + LastUpdateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + Name: __expectString, + OutputFormat: __expectString, + State: __expectString, + }) as any; +}; + +// de_MetricStreamFilter omitted. + +// de_MetricStreamFilterMetricNames omitted. + +// de_MetricStreamFilters omitted. + +// de_MetricStreamStatisticsAdditionalStatistics omitted. + +// de_MetricStreamStatisticsConfiguration omitted. + +// de_MetricStreamStatisticsConfigurations omitted. + +// de_MetricStreamStatisticsIncludeMetrics omitted. + +// de_MetricStreamStatisticsMetric omitted. + +// de_MissingRequiredParameterException omitted. + +// de_OwningAccounts omitted. + +// de_PartialFailure omitted. + +// de_PutAnomalyDetectorOutput omitted. + +// de_PutDashboardOutput omitted. + +// de_PutInsightRuleOutput omitted. + +// de_PutManagedInsightRulesOutput omitted. + +// de_PutMetricStreamOutput omitted. + +/** + * deserializeRpcv2cborRange + */ +const de_Range = (output: any, context: __SerdeContext): Range => { + return take(output, { + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + }) as any; +}; + +// de_ResourceList omitted. + +// de_ResourceNotFound omitted. + +// de_ResourceNotFoundException omitted. + +// de_SingleMetricAnomalyDetector omitted. + +// de_StartMetricStreamsOutput omitted. + +// de_StopMetricStreamsOutput omitted. + +// de_Tag omitted. + +// de_TagList omitted. + +// de_TagResourceOutput omitted. + +/** + * deserializeRpcv2cborTimestamps + */ +const de_Timestamps = (output: any, context: __SerdeContext): Date[] => { + const collection = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return __expectNonNull(__parseEpochTimestamp(entry)); + }); + return collection; +}; + +// de_UntagResourceOutput omitted. + +const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ + httpStatusCode: output.statusCode, + requestId: + output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); + +const throwDefaultError = withBaseException(__BaseException); +const buildHttpRpcRequest = async ( + context: __SerdeContext, + headers: __HeaderBag, + path: string, + resolvedHostname: string | undefined, + body: any +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const contents: any = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, + headers, + }; + if (resolvedHostname !== undefined) { + contents.hostname = resolvedHostname; + } + if (body !== undefined) { + contents.body = body; + try { + contents.headers["content-length"] = String(calculateBodyLength(body)); + } catch (e) {} + } + return new __HttpRequest(contents); +}; +const SHARED_HEADERS: __HeaderBag = { + "content-type": "application/cbor", + "smithy-protocol": "rpc-v2-cbor", +}; diff --git a/clients/client-secrets-manager/src/commands/BatchGetSecretValueCommand.ts b/clients/client-secrets-manager/src/commands/BatchGetSecretValueCommand.ts index eec5054368c1..36f575f88814 100644 --- a/clients/client-secrets-manager/src/commands/BatchGetSecretValueCommand.ts +++ b/clients/client-secrets-manager/src/commands/BatchGetSecretValueCommand.ts @@ -10,7 +10,7 @@ import { BatchGetSecretValueResponse, BatchGetSecretValueResponseFilterSensitiveLog, } from "../models/models_0"; -import { de_BatchGetSecretValueCommand, se_BatchGetSecretValueCommand } from "../protocols/Aws_json1_1"; +import { de_BatchGetSecretValueCommand, se_BatchGetSecretValueCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/CancelRotateSecretCommand.ts b/clients/client-secrets-manager/src/commands/CancelRotateSecretCommand.ts index 8ead7e3eddf3..12d348d4cdec 100644 --- a/clients/client-secrets-manager/src/commands/CancelRotateSecretCommand.ts +++ b/clients/client-secrets-manager/src/commands/CancelRotateSecretCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; import { CancelRotateSecretRequest, CancelRotateSecretResponse } from "../models/models_0"; -import { de_CancelRotateSecretCommand, se_CancelRotateSecretCommand } from "../protocols/Aws_json1_1"; +import { de_CancelRotateSecretCommand, se_CancelRotateSecretCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/CreateSecretCommand.ts b/clients/client-secrets-manager/src/commands/CreateSecretCommand.ts index 2150b23ce90a..fbd2523d0ef8 100644 --- a/clients/client-secrets-manager/src/commands/CreateSecretCommand.ts +++ b/clients/client-secrets-manager/src/commands/CreateSecretCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; import { CreateSecretRequest, CreateSecretRequestFilterSensitiveLog, CreateSecretResponse } from "../models/models_0"; -import { de_CreateSecretCommand, se_CreateSecretCommand } from "../protocols/Aws_json1_1"; +import { de_CreateSecretCommand, se_CreateSecretCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/DeleteResourcePolicyCommand.ts b/clients/client-secrets-manager/src/commands/DeleteResourcePolicyCommand.ts index 36d0a675c935..86de959bf276 100644 --- a/clients/client-secrets-manager/src/commands/DeleteResourcePolicyCommand.ts +++ b/clients/client-secrets-manager/src/commands/DeleteResourcePolicyCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; import { DeleteResourcePolicyRequest, DeleteResourcePolicyResponse } from "../models/models_0"; -import { de_DeleteResourcePolicyCommand, se_DeleteResourcePolicyCommand } from "../protocols/Aws_json1_1"; +import { de_DeleteResourcePolicyCommand, se_DeleteResourcePolicyCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/DeleteSecretCommand.ts b/clients/client-secrets-manager/src/commands/DeleteSecretCommand.ts index 7cdcc292829f..5178e3f79ec6 100644 --- a/clients/client-secrets-manager/src/commands/DeleteSecretCommand.ts +++ b/clients/client-secrets-manager/src/commands/DeleteSecretCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; import { DeleteSecretRequest, DeleteSecretResponse } from "../models/models_0"; -import { de_DeleteSecretCommand, se_DeleteSecretCommand } from "../protocols/Aws_json1_1"; +import { de_DeleteSecretCommand, se_DeleteSecretCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/DescribeSecretCommand.ts b/clients/client-secrets-manager/src/commands/DescribeSecretCommand.ts index 82d353d6e5e4..896f02c4c584 100644 --- a/clients/client-secrets-manager/src/commands/DescribeSecretCommand.ts +++ b/clients/client-secrets-manager/src/commands/DescribeSecretCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; import { DescribeSecretRequest, DescribeSecretResponse } from "../models/models_0"; -import { de_DescribeSecretCommand, se_DescribeSecretCommand } from "../protocols/Aws_json1_1"; +import { de_DescribeSecretCommand, se_DescribeSecretCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/GetRandomPasswordCommand.ts b/clients/client-secrets-manager/src/commands/GetRandomPasswordCommand.ts index 94f7c61af447..0d43b931409f 100644 --- a/clients/client-secrets-manager/src/commands/GetRandomPasswordCommand.ts +++ b/clients/client-secrets-manager/src/commands/GetRandomPasswordCommand.ts @@ -10,7 +10,7 @@ import { GetRandomPasswordResponse, GetRandomPasswordResponseFilterSensitiveLog, } from "../models/models_0"; -import { de_GetRandomPasswordCommand, se_GetRandomPasswordCommand } from "../protocols/Aws_json1_1"; +import { de_GetRandomPasswordCommand, se_GetRandomPasswordCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/GetResourcePolicyCommand.ts b/clients/client-secrets-manager/src/commands/GetResourcePolicyCommand.ts index e336a446d688..e2f51930a32e 100644 --- a/clients/client-secrets-manager/src/commands/GetResourcePolicyCommand.ts +++ b/clients/client-secrets-manager/src/commands/GetResourcePolicyCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; import { GetResourcePolicyRequest, GetResourcePolicyResponse } from "../models/models_0"; -import { de_GetResourcePolicyCommand, se_GetResourcePolicyCommand } from "../protocols/Aws_json1_1"; +import { de_GetResourcePolicyCommand, se_GetResourcePolicyCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/GetSecretValueCommand.ts b/clients/client-secrets-manager/src/commands/GetSecretValueCommand.ts index 0b88f2e171b7..5f21c41886db 100644 --- a/clients/client-secrets-manager/src/commands/GetSecretValueCommand.ts +++ b/clients/client-secrets-manager/src/commands/GetSecretValueCommand.ts @@ -10,7 +10,7 @@ import { GetSecretValueResponse, GetSecretValueResponseFilterSensitiveLog, } from "../models/models_0"; -import { de_GetSecretValueCommand, se_GetSecretValueCommand } from "../protocols/Aws_json1_1"; +import { de_GetSecretValueCommand, se_GetSecretValueCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/ListSecretVersionIdsCommand.ts b/clients/client-secrets-manager/src/commands/ListSecretVersionIdsCommand.ts index 2006f6f8f1b3..a158f39f16e3 100644 --- a/clients/client-secrets-manager/src/commands/ListSecretVersionIdsCommand.ts +++ b/clients/client-secrets-manager/src/commands/ListSecretVersionIdsCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; import { ListSecretVersionIdsRequest, ListSecretVersionIdsResponse } from "../models/models_0"; -import { de_ListSecretVersionIdsCommand, se_ListSecretVersionIdsCommand } from "../protocols/Aws_json1_1"; +import { de_ListSecretVersionIdsCommand, se_ListSecretVersionIdsCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/ListSecretsCommand.ts b/clients/client-secrets-manager/src/commands/ListSecretsCommand.ts index af037c132c29..b9109a18ad35 100644 --- a/clients/client-secrets-manager/src/commands/ListSecretsCommand.ts +++ b/clients/client-secrets-manager/src/commands/ListSecretsCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; import { ListSecretsRequest, ListSecretsResponse } from "../models/models_0"; -import { de_ListSecretsCommand, se_ListSecretsCommand } from "../protocols/Aws_json1_1"; +import { de_ListSecretsCommand, se_ListSecretsCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/PutResourcePolicyCommand.ts b/clients/client-secrets-manager/src/commands/PutResourcePolicyCommand.ts index 4e0e9f54c371..ccb2d42031db 100644 --- a/clients/client-secrets-manager/src/commands/PutResourcePolicyCommand.ts +++ b/clients/client-secrets-manager/src/commands/PutResourcePolicyCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; import { PutResourcePolicyRequest, PutResourcePolicyResponse } from "../models/models_0"; -import { de_PutResourcePolicyCommand, se_PutResourcePolicyCommand } from "../protocols/Aws_json1_1"; +import { de_PutResourcePolicyCommand, se_PutResourcePolicyCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/PutSecretValueCommand.ts b/clients/client-secrets-manager/src/commands/PutSecretValueCommand.ts index dbc572214add..0dd5ee0c577c 100644 --- a/clients/client-secrets-manager/src/commands/PutSecretValueCommand.ts +++ b/clients/client-secrets-manager/src/commands/PutSecretValueCommand.ts @@ -10,7 +10,7 @@ import { PutSecretValueRequestFilterSensitiveLog, PutSecretValueResponse, } from "../models/models_0"; -import { de_PutSecretValueCommand, se_PutSecretValueCommand } from "../protocols/Aws_json1_1"; +import { de_PutSecretValueCommand, se_PutSecretValueCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/RemoveRegionsFromReplicationCommand.ts b/clients/client-secrets-manager/src/commands/RemoveRegionsFromReplicationCommand.ts index 676d30da9b38..3f18066ec7ba 100644 --- a/clients/client-secrets-manager/src/commands/RemoveRegionsFromReplicationCommand.ts +++ b/clients/client-secrets-manager/src/commands/RemoveRegionsFromReplicationCommand.ts @@ -6,10 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; import { RemoveRegionsFromReplicationRequest, RemoveRegionsFromReplicationResponse } from "../models/models_0"; -import { - de_RemoveRegionsFromReplicationCommand, - se_RemoveRegionsFromReplicationCommand, -} from "../protocols/Aws_json1_1"; +import { de_RemoveRegionsFromReplicationCommand, se_RemoveRegionsFromReplicationCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/ReplicateSecretToRegionsCommand.ts b/clients/client-secrets-manager/src/commands/ReplicateSecretToRegionsCommand.ts index b79587612234..c98edc8adffa 100644 --- a/clients/client-secrets-manager/src/commands/ReplicateSecretToRegionsCommand.ts +++ b/clients/client-secrets-manager/src/commands/ReplicateSecretToRegionsCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; import { ReplicateSecretToRegionsRequest, ReplicateSecretToRegionsResponse } from "../models/models_0"; -import { de_ReplicateSecretToRegionsCommand, se_ReplicateSecretToRegionsCommand } from "../protocols/Aws_json1_1"; +import { de_ReplicateSecretToRegionsCommand, se_ReplicateSecretToRegionsCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/RestoreSecretCommand.ts b/clients/client-secrets-manager/src/commands/RestoreSecretCommand.ts index 987a45fe378e..fbb9e2e08ff1 100644 --- a/clients/client-secrets-manager/src/commands/RestoreSecretCommand.ts +++ b/clients/client-secrets-manager/src/commands/RestoreSecretCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; import { RestoreSecretRequest, RestoreSecretResponse } from "../models/models_0"; -import { de_RestoreSecretCommand, se_RestoreSecretCommand } from "../protocols/Aws_json1_1"; +import { de_RestoreSecretCommand, se_RestoreSecretCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/RotateSecretCommand.ts b/clients/client-secrets-manager/src/commands/RotateSecretCommand.ts index 33ed62f57999..7e5eddac558a 100644 --- a/clients/client-secrets-manager/src/commands/RotateSecretCommand.ts +++ b/clients/client-secrets-manager/src/commands/RotateSecretCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; import { RotateSecretRequest, RotateSecretResponse } from "../models/models_0"; -import { de_RotateSecretCommand, se_RotateSecretCommand } from "../protocols/Aws_json1_1"; +import { de_RotateSecretCommand, se_RotateSecretCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/StopReplicationToReplicaCommand.ts b/clients/client-secrets-manager/src/commands/StopReplicationToReplicaCommand.ts index efc67e1df9f8..61cbdf20d8c5 100644 --- a/clients/client-secrets-manager/src/commands/StopReplicationToReplicaCommand.ts +++ b/clients/client-secrets-manager/src/commands/StopReplicationToReplicaCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; import { StopReplicationToReplicaRequest, StopReplicationToReplicaResponse } from "../models/models_0"; -import { de_StopReplicationToReplicaCommand, se_StopReplicationToReplicaCommand } from "../protocols/Aws_json1_1"; +import { de_StopReplicationToReplicaCommand, se_StopReplicationToReplicaCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/TagResourceCommand.ts b/clients/client-secrets-manager/src/commands/TagResourceCommand.ts index 7a0f4d6f2ff0..ed8efce15da9 100644 --- a/clients/client-secrets-manager/src/commands/TagResourceCommand.ts +++ b/clients/client-secrets-manager/src/commands/TagResourceCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; import { TagResourceRequest } from "../models/models_0"; -import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Aws_json1_1"; +import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/UntagResourceCommand.ts b/clients/client-secrets-manager/src/commands/UntagResourceCommand.ts index 3513f5f9b10a..0737366d09bd 100644 --- a/clients/client-secrets-manager/src/commands/UntagResourceCommand.ts +++ b/clients/client-secrets-manager/src/commands/UntagResourceCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; import { UntagResourceRequest } from "../models/models_0"; -import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Aws_json1_1"; +import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/UpdateSecretCommand.ts b/clients/client-secrets-manager/src/commands/UpdateSecretCommand.ts index 3fac1a9e0a53..639d6829ee82 100644 --- a/clients/client-secrets-manager/src/commands/UpdateSecretCommand.ts +++ b/clients/client-secrets-manager/src/commands/UpdateSecretCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; import { UpdateSecretRequest, UpdateSecretRequestFilterSensitiveLog, UpdateSecretResponse } from "../models/models_0"; -import { de_UpdateSecretCommand, se_UpdateSecretCommand } from "../protocols/Aws_json1_1"; +import { de_UpdateSecretCommand, se_UpdateSecretCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/UpdateSecretVersionStageCommand.ts b/clients/client-secrets-manager/src/commands/UpdateSecretVersionStageCommand.ts index 9cf48fb95cde..62fedf8a8022 100644 --- a/clients/client-secrets-manager/src/commands/UpdateSecretVersionStageCommand.ts +++ b/clients/client-secrets-manager/src/commands/UpdateSecretVersionStageCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; import { UpdateSecretVersionStageRequest, UpdateSecretVersionStageResponse } from "../models/models_0"; -import { de_UpdateSecretVersionStageCommand, se_UpdateSecretVersionStageCommand } from "../protocols/Aws_json1_1"; +import { de_UpdateSecretVersionStageCommand, se_UpdateSecretVersionStageCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/commands/ValidateResourcePolicyCommand.ts b/clients/client-secrets-manager/src/commands/ValidateResourcePolicyCommand.ts index 9d11128d8b92..d834a36cdb1c 100644 --- a/clients/client-secrets-manager/src/commands/ValidateResourcePolicyCommand.ts +++ b/clients/client-secrets-manager/src/commands/ValidateResourcePolicyCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; import { ValidateResourcePolicyRequest, ValidateResourcePolicyResponse } from "../models/models_0"; -import { de_ValidateResourcePolicyCommand, se_ValidateResourcePolicyCommand } from "../protocols/Aws_json1_1"; +import { de_ValidateResourcePolicyCommand, se_ValidateResourcePolicyCommand } from "../protocols/Rpcv2cbor"; import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient"; /** diff --git a/clients/client-secrets-manager/src/protocols/Aws_json1_1.ts b/clients/client-secrets-manager/src/protocols/Rpcv2cbor.ts similarity index 80% rename from clients/client-secrets-manager/src/protocols/Aws_json1_1.ts rename to clients/client-secrets-manager/src/protocols/Rpcv2cbor.ts index c9125858f828..4c42a8e219e7 100644 --- a/clients/client-secrets-manager/src/protocols/Aws_json1_1.ts +++ b/clients/client-secrets-manager/src/protocols/Rpcv2cbor.ts @@ -1,5 +1,10 @@ // smithy-typescript generated code -import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core"; +import { + cbor, + loadSmithyRpcV2CborErrorCode, + parseCborBody as parseBody, + parseCborErrorBody as parseErrorBody, +} from "@smithy/core/cbor"; import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; import { _json, @@ -7,7 +12,6 @@ import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, - expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, @@ -19,6 +23,7 @@ import { ResponseMetadata as __ResponseMetadata, SerdeContext as __SerdeContext, } from "@smithy/types"; +import { calculateBodyLength } from "@smithy/util-body-length-browser"; import { v4 as generateIdempotencyToken } from "uuid"; import { @@ -125,306 +130,354 @@ import { import { SecretsManagerServiceException as __BaseException } from "../models/SecretsManagerServiceException"; /** - * serializeAws_json1_1BatchGetSecretValueCommand + * serializeRpcv2cborBatchGetSecretValueCommand */ export const se_BatchGetSecretValueCommand = async ( input: BatchGetSecretValueCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("BatchGetSecretValue"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(_json(input)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/secretsmanager/operation/BatchGetSecretValue", + undefined, + body + ); }; /** - * serializeAws_json1_1CancelRotateSecretCommand + * serializeRpcv2cborCancelRotateSecretCommand */ export const se_CancelRotateSecretCommand = async ( input: CancelRotateSecretCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("CancelRotateSecret"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(_json(input)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest(context, headers, "/service/secretsmanager/operation/CancelRotateSecret", undefined, body); }; /** - * serializeAws_json1_1CreateSecretCommand + * serializeRpcv2cborCreateSecretCommand */ export const se_CreateSecretCommand = async ( input: CreateSecretCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("CreateSecret"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(se_CreateSecretRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(se_CreateSecretRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/service/secretsmanager/operation/CreateSecret", undefined, body); }; /** - * serializeAws_json1_1DeleteResourcePolicyCommand + * serializeRpcv2cborDeleteResourcePolicyCommand */ export const se_DeleteResourcePolicyCommand = async ( input: DeleteResourcePolicyCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("DeleteResourcePolicy"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(_json(input)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/secretsmanager/operation/DeleteResourcePolicy", + undefined, + body + ); }; /** - * serializeAws_json1_1DeleteSecretCommand + * serializeRpcv2cborDeleteSecretCommand */ export const se_DeleteSecretCommand = async ( input: DeleteSecretCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("DeleteSecret"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(_json(input)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest(context, headers, "/service/secretsmanager/operation/DeleteSecret", undefined, body); }; /** - * serializeAws_json1_1DescribeSecretCommand + * serializeRpcv2cborDescribeSecretCommand */ export const se_DescribeSecretCommand = async ( input: DescribeSecretCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("DescribeSecret"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(_json(input)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest(context, headers, "/service/secretsmanager/operation/DescribeSecret", undefined, body); }; /** - * serializeAws_json1_1GetRandomPasswordCommand + * serializeRpcv2cborGetRandomPasswordCommand */ export const se_GetRandomPasswordCommand = async ( input: GetRandomPasswordCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("GetRandomPassword"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(_json(input)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest(context, headers, "/service/secretsmanager/operation/GetRandomPassword", undefined, body); }; /** - * serializeAws_json1_1GetResourcePolicyCommand + * serializeRpcv2cborGetResourcePolicyCommand */ export const se_GetResourcePolicyCommand = async ( input: GetResourcePolicyCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("GetResourcePolicy"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(_json(input)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest(context, headers, "/service/secretsmanager/operation/GetResourcePolicy", undefined, body); }; /** - * serializeAws_json1_1GetSecretValueCommand + * serializeRpcv2cborGetSecretValueCommand */ export const se_GetSecretValueCommand = async ( input: GetSecretValueCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("GetSecretValue"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(_json(input)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest(context, headers, "/service/secretsmanager/operation/GetSecretValue", undefined, body); }; /** - * serializeAws_json1_1ListSecretsCommand + * serializeRpcv2cborListSecretsCommand */ export const se_ListSecretsCommand = async ( input: ListSecretsCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("ListSecrets"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(_json(input)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest(context, headers, "/service/secretsmanager/operation/ListSecrets", undefined, body); }; /** - * serializeAws_json1_1ListSecretVersionIdsCommand + * serializeRpcv2cborListSecretVersionIdsCommand */ export const se_ListSecretVersionIdsCommand = async ( input: ListSecretVersionIdsCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("ListSecretVersionIds"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(_json(input)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/secretsmanager/operation/ListSecretVersionIds", + undefined, + body + ); }; /** - * serializeAws_json1_1PutResourcePolicyCommand + * serializeRpcv2cborPutResourcePolicyCommand */ export const se_PutResourcePolicyCommand = async ( input: PutResourcePolicyCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("PutResourcePolicy"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(_json(input)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest(context, headers, "/service/secretsmanager/operation/PutResourcePolicy", undefined, body); }; /** - * serializeAws_json1_1PutSecretValueCommand + * serializeRpcv2cborPutSecretValueCommand */ export const se_PutSecretValueCommand = async ( input: PutSecretValueCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("PutSecretValue"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(se_PutSecretValueRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(se_PutSecretValueRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/service/secretsmanager/operation/PutSecretValue", undefined, body); }; /** - * serializeAws_json1_1RemoveRegionsFromReplicationCommand + * serializeRpcv2cborRemoveRegionsFromReplicationCommand */ export const se_RemoveRegionsFromReplicationCommand = async ( input: RemoveRegionsFromReplicationCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("RemoveRegionsFromReplication"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(_json(input)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/secretsmanager/operation/RemoveRegionsFromReplication", + undefined, + body + ); }; /** - * serializeAws_json1_1ReplicateSecretToRegionsCommand + * serializeRpcv2cborReplicateSecretToRegionsCommand */ export const se_ReplicateSecretToRegionsCommand = async ( input: ReplicateSecretToRegionsCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("ReplicateSecretToRegions"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(_json(input)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/secretsmanager/operation/ReplicateSecretToRegions", + undefined, + body + ); }; /** - * serializeAws_json1_1RestoreSecretCommand + * serializeRpcv2cborRestoreSecretCommand */ export const se_RestoreSecretCommand = async ( input: RestoreSecretCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("RestoreSecret"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(_json(input)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest(context, headers, "/service/secretsmanager/operation/RestoreSecret", undefined, body); }; /** - * serializeAws_json1_1RotateSecretCommand + * serializeRpcv2cborRotateSecretCommand */ export const se_RotateSecretCommand = async ( input: RotateSecretCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("RotateSecret"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(se_RotateSecretRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(se_RotateSecretRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/service/secretsmanager/operation/RotateSecret", undefined, body); }; /** - * serializeAws_json1_1StopReplicationToReplicaCommand + * serializeRpcv2cborStopReplicationToReplicaCommand */ export const se_StopReplicationToReplicaCommand = async ( input: StopReplicationToReplicaCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("StopReplicationToReplica"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(_json(input)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/secretsmanager/operation/StopReplicationToReplica", + undefined, + body + ); }; /** - * serializeAws_json1_1TagResourceCommand + * serializeRpcv2cborTagResourceCommand */ export const se_TagResourceCommand = async ( input: TagResourceCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("TagResource"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(_json(input)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest(context, headers, "/service/secretsmanager/operation/TagResource", undefined, body); }; /** - * serializeAws_json1_1UntagResourceCommand + * serializeRpcv2cborUntagResourceCommand */ export const se_UntagResourceCommand = async ( input: UntagResourceCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("UntagResource"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(_json(input)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest(context, headers, "/service/secretsmanager/operation/UntagResource", undefined, body); }; /** - * serializeAws_json1_1UpdateSecretCommand + * serializeRpcv2cborUpdateSecretCommand */ export const se_UpdateSecretCommand = async ( input: UpdateSecretCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("UpdateSecret"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(se_UpdateSecretRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(se_UpdateSecretRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/service/secretsmanager/operation/UpdateSecret", undefined, body); }; /** - * serializeAws_json1_1UpdateSecretVersionStageCommand + * serializeRpcv2cborUpdateSecretVersionStageCommand */ export const se_UpdateSecretVersionStageCommand = async ( input: UpdateSecretVersionStageCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("UpdateSecretVersionStage"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(_json(input)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/secretsmanager/operation/UpdateSecretVersionStage", + undefined, + body + ); }; /** - * serializeAws_json1_1ValidateResourcePolicyCommand + * serializeRpcv2cborValidateResourcePolicyCommand */ export const se_ValidateResourcePolicyCommand = async ( input: ValidateResourcePolicyCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("ValidateResourcePolicy"); + const headers: __HeaderBag = SHARED_HEADERS; let body: any; - body = JSON.stringify(_json(input)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); + body = cbor.serialize(_json(input)); + return buildHttpRpcRequest( + context, + headers, + "/service/secretsmanager/operation/ValidateResourcePolicy", + undefined, + body + ); }; /** - * deserializeAws_json1_1BatchGetSecretValueCommand + * deserializeRpcv2cborBatchGetSecretValueCommand */ export const de_BatchGetSecretValueCommand = async ( output: __HttpResponse, @@ -444,7 +497,7 @@ export const de_BatchGetSecretValueCommand = async ( }; /** - * deserializeAws_json1_1CancelRotateSecretCommand + * deserializeRpcv2cborCancelRotateSecretCommand */ export const de_CancelRotateSecretCommand = async ( output: __HttpResponse, @@ -464,7 +517,7 @@ export const de_CancelRotateSecretCommand = async ( }; /** - * deserializeAws_json1_1CreateSecretCommand + * deserializeRpcv2cborCreateSecretCommand */ export const de_CreateSecretCommand = async ( output: __HttpResponse, @@ -484,7 +537,7 @@ export const de_CreateSecretCommand = async ( }; /** - * deserializeAws_json1_1DeleteResourcePolicyCommand + * deserializeRpcv2cborDeleteResourcePolicyCommand */ export const de_DeleteResourcePolicyCommand = async ( output: __HttpResponse, @@ -504,7 +557,7 @@ export const de_DeleteResourcePolicyCommand = async ( }; /** - * deserializeAws_json1_1DeleteSecretCommand + * deserializeRpcv2cborDeleteSecretCommand */ export const de_DeleteSecretCommand = async ( output: __HttpResponse, @@ -524,7 +577,7 @@ export const de_DeleteSecretCommand = async ( }; /** - * deserializeAws_json1_1DescribeSecretCommand + * deserializeRpcv2cborDescribeSecretCommand */ export const de_DescribeSecretCommand = async ( output: __HttpResponse, @@ -544,7 +597,7 @@ export const de_DescribeSecretCommand = async ( }; /** - * deserializeAws_json1_1GetRandomPasswordCommand + * deserializeRpcv2cborGetRandomPasswordCommand */ export const de_GetRandomPasswordCommand = async ( output: __HttpResponse, @@ -564,7 +617,7 @@ export const de_GetRandomPasswordCommand = async ( }; /** - * deserializeAws_json1_1GetResourcePolicyCommand + * deserializeRpcv2cborGetResourcePolicyCommand */ export const de_GetResourcePolicyCommand = async ( output: __HttpResponse, @@ -584,7 +637,7 @@ export const de_GetResourcePolicyCommand = async ( }; /** - * deserializeAws_json1_1GetSecretValueCommand + * deserializeRpcv2cborGetSecretValueCommand */ export const de_GetSecretValueCommand = async ( output: __HttpResponse, @@ -604,7 +657,7 @@ export const de_GetSecretValueCommand = async ( }; /** - * deserializeAws_json1_1ListSecretsCommand + * deserializeRpcv2cborListSecretsCommand */ export const de_ListSecretsCommand = async ( output: __HttpResponse, @@ -624,7 +677,7 @@ export const de_ListSecretsCommand = async ( }; /** - * deserializeAws_json1_1ListSecretVersionIdsCommand + * deserializeRpcv2cborListSecretVersionIdsCommand */ export const de_ListSecretVersionIdsCommand = async ( output: __HttpResponse, @@ -644,7 +697,7 @@ export const de_ListSecretVersionIdsCommand = async ( }; /** - * deserializeAws_json1_1PutResourcePolicyCommand + * deserializeRpcv2cborPutResourcePolicyCommand */ export const de_PutResourcePolicyCommand = async ( output: __HttpResponse, @@ -664,7 +717,7 @@ export const de_PutResourcePolicyCommand = async ( }; /** - * deserializeAws_json1_1PutSecretValueCommand + * deserializeRpcv2cborPutSecretValueCommand */ export const de_PutSecretValueCommand = async ( output: __HttpResponse, @@ -684,7 +737,7 @@ export const de_PutSecretValueCommand = async ( }; /** - * deserializeAws_json1_1RemoveRegionsFromReplicationCommand + * deserializeRpcv2cborRemoveRegionsFromReplicationCommand */ export const de_RemoveRegionsFromReplicationCommand = async ( output: __HttpResponse, @@ -704,7 +757,7 @@ export const de_RemoveRegionsFromReplicationCommand = async ( }; /** - * deserializeAws_json1_1ReplicateSecretToRegionsCommand + * deserializeRpcv2cborReplicateSecretToRegionsCommand */ export const de_ReplicateSecretToRegionsCommand = async ( output: __HttpResponse, @@ -724,7 +777,7 @@ export const de_ReplicateSecretToRegionsCommand = async ( }; /** - * deserializeAws_json1_1RestoreSecretCommand + * deserializeRpcv2cborRestoreSecretCommand */ export const de_RestoreSecretCommand = async ( output: __HttpResponse, @@ -744,7 +797,7 @@ export const de_RestoreSecretCommand = async ( }; /** - * deserializeAws_json1_1RotateSecretCommand + * deserializeRpcv2cborRotateSecretCommand */ export const de_RotateSecretCommand = async ( output: __HttpResponse, @@ -764,7 +817,7 @@ export const de_RotateSecretCommand = async ( }; /** - * deserializeAws_json1_1StopReplicationToReplicaCommand + * deserializeRpcv2cborStopReplicationToReplicaCommand */ export const de_StopReplicationToReplicaCommand = async ( output: __HttpResponse, @@ -784,7 +837,7 @@ export const de_StopReplicationToReplicaCommand = async ( }; /** - * deserializeAws_json1_1TagResourceCommand + * deserializeRpcv2cborTagResourceCommand */ export const de_TagResourceCommand = async ( output: __HttpResponse, @@ -801,7 +854,7 @@ export const de_TagResourceCommand = async ( }; /** - * deserializeAws_json1_1UntagResourceCommand + * deserializeRpcv2cborUntagResourceCommand */ export const de_UntagResourceCommand = async ( output: __HttpResponse, @@ -818,7 +871,7 @@ export const de_UntagResourceCommand = async ( }; /** - * deserializeAws_json1_1UpdateSecretCommand + * deserializeRpcv2cborUpdateSecretCommand */ export const de_UpdateSecretCommand = async ( output: __HttpResponse, @@ -838,7 +891,7 @@ export const de_UpdateSecretCommand = async ( }; /** - * deserializeAws_json1_1UpdateSecretVersionStageCommand + * deserializeRpcv2cborUpdateSecretVersionStageCommand */ export const de_UpdateSecretVersionStageCommand = async ( output: __HttpResponse, @@ -858,7 +911,7 @@ export const de_UpdateSecretVersionStageCommand = async ( }; /** - * deserializeAws_json1_1ValidateResourcePolicyCommand + * deserializeRpcv2cborValidateResourcePolicyCommand */ export const de_ValidateResourcePolicyCommand = async ( output: __HttpResponse, @@ -878,14 +931,14 @@ export const de_ValidateResourcePolicyCommand = async ( }; /** - * deserialize_Aws_json1_1CommandError + * deserialize_Rpcv2cborCommandError */ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + const errorCode = loadSmithyRpcV2CborErrorCode(output, parsedOutput.body); switch (errorCode) { case "DecryptionFailure": case "com.amazonaws.secretsmanager#DecryptionFailure": @@ -934,7 +987,7 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): }; /** - * deserializeAws_json1_1DecryptionFailureRes + * deserializeRpcv2cborDecryptionFailureRes */ const de_DecryptionFailureRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; @@ -947,7 +1000,7 @@ const de_DecryptionFailureRes = async (parsedOutput: any, context: __SerdeContex }; /** - * deserializeAws_json1_1EncryptionFailureRes + * deserializeRpcv2cborEncryptionFailureRes */ const de_EncryptionFailureRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; @@ -960,7 +1013,7 @@ const de_EncryptionFailureRes = async (parsedOutput: any, context: __SerdeContex }; /** - * deserializeAws_json1_1InternalServiceErrorRes + * deserializeRpcv2cborInternalServiceErrorRes */ const de_InternalServiceErrorRes = async ( parsedOutput: any, @@ -976,7 +1029,7 @@ const de_InternalServiceErrorRes = async ( }; /** - * deserializeAws_json1_1InvalidNextTokenExceptionRes + * deserializeRpcv2cborInvalidNextTokenExceptionRes */ const de_InvalidNextTokenExceptionRes = async ( parsedOutput: any, @@ -992,7 +1045,7 @@ const de_InvalidNextTokenExceptionRes = async ( }; /** - * deserializeAws_json1_1InvalidParameterExceptionRes + * deserializeRpcv2cborInvalidParameterExceptionRes */ const de_InvalidParameterExceptionRes = async ( parsedOutput: any, @@ -1008,7 +1061,7 @@ const de_InvalidParameterExceptionRes = async ( }; /** - * deserializeAws_json1_1InvalidRequestExceptionRes + * deserializeRpcv2cborInvalidRequestExceptionRes */ const de_InvalidRequestExceptionRes = async ( parsedOutput: any, @@ -1024,7 +1077,7 @@ const de_InvalidRequestExceptionRes = async ( }; /** - * deserializeAws_json1_1LimitExceededExceptionRes + * deserializeRpcv2cborLimitExceededExceptionRes */ const de_LimitExceededExceptionRes = async ( parsedOutput: any, @@ -1040,7 +1093,7 @@ const de_LimitExceededExceptionRes = async ( }; /** - * deserializeAws_json1_1MalformedPolicyDocumentExceptionRes + * deserializeRpcv2cborMalformedPolicyDocumentExceptionRes */ const de_MalformedPolicyDocumentExceptionRes = async ( parsedOutput: any, @@ -1056,7 +1109,7 @@ const de_MalformedPolicyDocumentExceptionRes = async ( }; /** - * deserializeAws_json1_1PreconditionNotMetExceptionRes + * deserializeRpcv2cborPreconditionNotMetExceptionRes */ const de_PreconditionNotMetExceptionRes = async ( parsedOutput: any, @@ -1072,7 +1125,7 @@ const de_PreconditionNotMetExceptionRes = async ( }; /** - * deserializeAws_json1_1PublicPolicyExceptionRes + * deserializeRpcv2cborPublicPolicyExceptionRes */ const de_PublicPolicyExceptionRes = async ( parsedOutput: any, @@ -1088,7 +1141,7 @@ const de_PublicPolicyExceptionRes = async ( }; /** - * deserializeAws_json1_1ResourceExistsExceptionRes + * deserializeRpcv2cborResourceExistsExceptionRes */ const de_ResourceExistsExceptionRes = async ( parsedOutput: any, @@ -1104,7 +1157,7 @@ const de_ResourceExistsExceptionRes = async ( }; /** - * deserializeAws_json1_1ResourceNotFoundExceptionRes + * deserializeRpcv2cborResourceNotFoundExceptionRes */ const de_ResourceNotFoundExceptionRes = async ( parsedOutput: any, @@ -1126,7 +1179,7 @@ const de_ResourceNotFoundExceptionRes = async ( // se_CancelRotateSecretRequest omitted. /** - * serializeAws_json1_1CreateSecretRequest + * serializeRpcv2cborCreateSecretRequest */ const se_CreateSecretRequest = (input: CreateSecretRequest, context: __SerdeContext): any => { return take(input, { @@ -1167,7 +1220,7 @@ const se_CreateSecretRequest = (input: CreateSecretRequest, context: __SerdeCont // se_PutResourcePolicyRequest omitted. /** - * serializeAws_json1_1PutSecretValueRequest + * serializeRpcv2cborPutSecretValueRequest */ const se_PutSecretValueRequest = (input: PutSecretValueRequest, context: __SerdeContext): any => { return take(input, { @@ -1190,7 +1243,7 @@ const se_PutSecretValueRequest = (input: PutSecretValueRequest, context: __Serde // se_RestoreSecretRequest omitted. /** - * serializeAws_json1_1RotateSecretRequest + * serializeRpcv2cborRotateSecretRequest */ const se_RotateSecretRequest = (input: RotateSecretRequest, context: __SerdeContext): any => { return take(input, { @@ -1221,7 +1274,7 @@ const se_RotateSecretRequest = (input: RotateSecretRequest, context: __SerdeCont // se_UntagResourceRequest omitted. /** - * serializeAws_json1_1UpdateSecretRequest + * serializeRpcv2cborUpdateSecretRequest */ const se_UpdateSecretRequest = (input: UpdateSecretRequest, context: __SerdeContext): any => { return take(input, { @@ -1243,7 +1296,7 @@ const se_UpdateSecretRequest = (input: UpdateSecretRequest, context: __SerdeCont // de_APIErrorType omitted. /** - * deserializeAws_json1_1BatchGetSecretValueResponse + * deserializeRpcv2cborBatchGetSecretValueResponse */ const de_BatchGetSecretValueResponse = (output: any, context: __SerdeContext): BatchGetSecretValueResponse => { return take(output, { @@ -1256,7 +1309,7 @@ const de_BatchGetSecretValueResponse = (output: any, context: __SerdeContext): B // de_CancelRotateSecretResponse omitted. /** - * deserializeAws_json1_1CreateSecretResponse + * deserializeRpcv2cborCreateSecretResponse */ const de_CreateSecretResponse = (output: any, context: __SerdeContext): CreateSecretResponse => { return take(output, { @@ -1272,31 +1325,31 @@ const de_CreateSecretResponse = (output: any, context: __SerdeContext): CreateSe // de_DeleteResourcePolicyResponse omitted. /** - * deserializeAws_json1_1DeleteSecretResponse + * deserializeRpcv2cborDeleteSecretResponse */ const de_DeleteSecretResponse = (output: any, context: __SerdeContext): DeleteSecretResponse => { return take(output, { ARN: __expectString, - DeletionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), Name: __expectString, }) as any; }; /** - * deserializeAws_json1_1DescribeSecretResponse + * deserializeRpcv2cborDescribeSecretResponse */ const de_DescribeSecretResponse = (output: any, context: __SerdeContext): DescribeSecretResponse => { return take(output, { ARN: __expectString, - CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), - DeletedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + DeletedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), Description: __expectString, KmsKeyId: __expectString, - LastAccessedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), - LastChangedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), - LastRotatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastAccessedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + LastChangedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + LastRotatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), Name: __expectString, - NextRotationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NextRotationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), OwningService: __expectString, PrimaryRegion: __expectString, ReplicationStatus: (_: any) => de_ReplicationStatusListType(_, context), @@ -1315,12 +1368,12 @@ const de_DescribeSecretResponse = (output: any, context: __SerdeContext): Descri // de_GetResourcePolicyResponse omitted. /** - * deserializeAws_json1_1GetSecretValueResponse + * deserializeRpcv2cborGetSecretValueResponse */ const de_GetSecretValueResponse = (output: any, context: __SerdeContext): GetSecretValueResponse => { return take(output, { ARN: __expectString, - CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), Name: __expectString, SecretBinary: context.base64Decoder, SecretString: __expectString, @@ -1342,7 +1395,7 @@ const de_GetSecretValueResponse = (output: any, context: __SerdeContext): GetSec // de_LimitExceededException omitted. /** - * deserializeAws_json1_1ListSecretsResponse + * deserializeRpcv2cborListSecretsResponse */ const de_ListSecretsResponse = (output: any, context: __SerdeContext): ListSecretsResponse => { return take(output, { @@ -1352,7 +1405,7 @@ const de_ListSecretsResponse = (output: any, context: __SerdeContext): ListSecre }; /** - * deserializeAws_json1_1ListSecretVersionIdsResponse + * deserializeRpcv2cborListSecretVersionIdsResponse */ const de_ListSecretVersionIdsResponse = (output: any, context: __SerdeContext): ListSecretVersionIdsResponse => { return take(output, { @@ -1374,7 +1427,7 @@ const de_ListSecretVersionIdsResponse = (output: any, context: __SerdeContext): // de_PutSecretValueResponse omitted. /** - * deserializeAws_json1_1RemoveRegionsFromReplicationResponse + * deserializeRpcv2cborRemoveRegionsFromReplicationResponse */ const de_RemoveRegionsFromReplicationResponse = ( output: any, @@ -1387,7 +1440,7 @@ const de_RemoveRegionsFromReplicationResponse = ( }; /** - * deserializeAws_json1_1ReplicateSecretToRegionsResponse + * deserializeRpcv2cborReplicateSecretToRegionsResponse */ const de_ReplicateSecretToRegionsResponse = ( output: any, @@ -1400,24 +1453,24 @@ const de_ReplicateSecretToRegionsResponse = ( }; /** - * deserializeAws_json1_1ReplicationStatusListType + * deserializeRpcv2cborReplicationStatusListType */ const de_ReplicationStatusListType = (output: any, context: __SerdeContext): ReplicationStatusType[] => { - const retVal = (output || []) + const collection = (output || []) .filter((e: any) => e != null) .map((entry: any) => { return de_ReplicationStatusType(entry, context); }); - return retVal; + return collection; }; /** - * deserializeAws_json1_1ReplicationStatusType + * deserializeRpcv2cborReplicationStatusType */ const de_ReplicationStatusType = (output: any, context: __SerdeContext): ReplicationStatusType => { return take(output, { KmsKeyId: __expectString, - LastAccessedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastAccessedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), Region: __expectString, Status: __expectString, StatusMessage: __expectString, @@ -1435,20 +1488,20 @@ const de_ReplicationStatusType = (output: any, context: __SerdeContext): Replica // de_RotationRulesType omitted. /** - * deserializeAws_json1_1SecretListEntry + * deserializeRpcv2cborSecretListEntry */ const de_SecretListEntry = (output: any, context: __SerdeContext): SecretListEntry => { return take(output, { ARN: __expectString, - CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), - DeletedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + DeletedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), Description: __expectString, KmsKeyId: __expectString, - LastAccessedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), - LastChangedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), - LastRotatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastAccessedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + LastChangedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), + LastRotatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), Name: __expectString, - NextRotationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NextRotationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), OwningService: __expectString, PrimaryRegion: __expectString, RotationEnabled: __expectBoolean, @@ -1460,24 +1513,24 @@ const de_SecretListEntry = (output: any, context: __SerdeContext): SecretListEnt }; /** - * deserializeAws_json1_1SecretListType + * deserializeRpcv2cborSecretListType */ const de_SecretListType = (output: any, context: __SerdeContext): SecretListEntry[] => { - const retVal = (output || []) + const collection = (output || []) .filter((e: any) => e != null) .map((entry: any) => { return de_SecretListEntry(entry, context); }); - return retVal; + return collection; }; /** - * deserializeAws_json1_1SecretValueEntry + * deserializeRpcv2cborSecretValueEntry */ const de_SecretValueEntry = (output: any, context: __SerdeContext): SecretValueEntry => { return take(output, { ARN: __expectString, - CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), Name: __expectString, SecretBinary: context.base64Decoder, SecretString: __expectString, @@ -1487,40 +1540,40 @@ const de_SecretValueEntry = (output: any, context: __SerdeContext): SecretValueE }; /** - * deserializeAws_json1_1SecretValuesType + * deserializeRpcv2cborSecretValuesType */ const de_SecretValuesType = (output: any, context: __SerdeContext): SecretValueEntry[] => { - const retVal = (output || []) + const collection = (output || []) .filter((e: any) => e != null) .map((entry: any) => { return de_SecretValueEntry(entry, context); }); - return retVal; + return collection; }; /** - * deserializeAws_json1_1SecretVersionsListEntry + * deserializeRpcv2cborSecretVersionsListEntry */ const de_SecretVersionsListEntry = (output: any, context: __SerdeContext): SecretVersionsListEntry => { return take(output, { - CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), KmsKeyIds: _json, - LastAccessedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastAccessedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), VersionId: __expectString, VersionStages: _json, }) as any; }; /** - * deserializeAws_json1_1SecretVersionsListType + * deserializeRpcv2cborSecretVersionsListType */ const de_SecretVersionsListType = (output: any, context: __SerdeContext): SecretVersionsListEntry[] => { - const retVal = (output || []) + const collection = (output || []) .filter((e: any) => e != null) .map((entry: any) => { return de_SecretVersionsListEntry(entry, context); }); - return retVal; + return collection; }; // de_SecretVersionStagesType omitted. @@ -1551,10 +1604,6 @@ const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ cfId: output.headers["x-amz-cf-id"], }); -// Encode Uint8Array data into string with utf-8. -const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => - collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); - const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, @@ -1577,12 +1626,13 @@ const buildHttpRpcRequest = async ( } if (body !== undefined) { contents.body = body; + try { + contents.headers["content-length"] = String(calculateBodyLength(body)); + } catch (e) {} } return new __HttpRequest(contents); }; -function sharedHeaders(operation: string): __HeaderBag { - return { - "content-type": "application/x-amz-json-1.1", - "x-amz-target": `secretsmanager.${operation}`, - }; -} +const SHARED_HEADERS: __HeaderBag = { + "content-type": "application/cbor", + "smithy-protocol": "rpc-v2-cbor", +}; diff --git a/codegen/sdk-codegen/aws-models/cloudwatch.json b/codegen/sdk-codegen/aws-models/cloudwatch.json index bec6629e39d3..d176387fd20d 100644 --- a/codegen/sdk-codegen/aws-models/cloudwatch.json +++ b/codegen/sdk-codegen/aws-models/cloudwatch.json @@ -2601,7 +2601,7 @@ "aws.auth#sigv4": { "name": "monitoring" }, - "aws.protocols#awsQuery": {}, + "smithy.protocols#rpcv2Cbor": {}, "smithy.api#documentation": "

Amazon CloudWatch monitors your Amazon Web Services (Amazon Web Services) resources and the\n\t\t\tapplications you run on Amazon Web Services in real time. You can use CloudWatch to collect and track\n\t\t\tmetrics, which are the variables you want to measure for your resources and\n\t\t\tapplications.

\n

CloudWatch alarms send notifications or automatically change the resources you are monitoring based on rules\n\t\t\tthat you define. For example, you can monitor the CPU usage and disk reads and writes of your Amazon EC2\n\t\t\tinstances. Then, use this data to determine whether you should launch\n\t\t\tadditional instances to handle increased load. You can also use this data to stop\n\t\t\tunder-used instances to save\n\t\t\tmoney.

\n

In addition to monitoring the built-in metrics that come with Amazon Web Services, you can monitor\n\t\t\tyour own custom metrics. With CloudWatch, you gain system-wide visibility into resource\n\t\t\tutilization, application performance, and operational health.

", "smithy.api#title": "Amazon CloudWatch", "smithy.api#xmlNamespace": { diff --git a/codegen/sdk-codegen/aws-models/secrets-manager.json b/codegen/sdk-codegen/aws-models/secrets-manager.json index f8b1e682d3e8..53a168f9c3b3 100644 --- a/codegen/sdk-codegen/aws-models/secrets-manager.json +++ b/codegen/sdk-codegen/aws-models/secrets-manager.json @@ -3596,7 +3596,7 @@ "aws.auth#sigv4": { "name": "secretsmanager" }, - "aws.protocols#awsJson1_1": {}, + "smithy.protocols#rpcv2Cbor": {}, "smithy.api#documentation": "Amazon Web Services Secrets Manager\n

Amazon Web Services Secrets Manager provides a service to enable you to store, manage, and retrieve, secrets.

\n

This guide provides descriptions of the Secrets Manager API. For more information about using this\n service, see the Amazon Web Services Secrets Manager User Guide.

\n

\n API Version\n

\n

This version of the Secrets Manager API Reference documents the Secrets Manager API version 2017-10-17.

\n

For a list of endpoints, see Amazon Web Services Secrets Manager \n endpoints.

\n

\n Support and Feedback for Amazon Web Services Secrets Manager\n

\n

We welcome your feedback. Send your comments to awssecretsmanager-feedback@amazon.com, or post your feedback and questions in the Amazon Web Services Secrets Manager Discussion Forum. For more\n information about the Amazon Web Services Discussion Forums, see Forums\n Help.

\n

\n Logging API Requests\n

\n

Amazon Web Services Secrets Manager supports Amazon Web Services CloudTrail, a service that records Amazon Web Services API calls for your Amazon Web Services\n account and delivers log files to an Amazon S3 bucket. By using information that's collected\n by Amazon Web Services CloudTrail, you can determine the requests successfully made to Secrets Manager, who made the\n request, when it was made, and so on. For more about Amazon Web Services Secrets Manager and support for Amazon Web Services\n CloudTrail, see Logging\n Amazon Web Services Secrets Manager Events with Amazon Web Services CloudTrail in the Amazon Web Services Secrets Manager User Guide.\n To learn more about CloudTrail, including enabling it and find your log files, see the Amazon Web Services CloudTrail User Guide.

", "smithy.api#title": "AWS Secrets Manager", "smithy.rules#endpointRuleSet": {