diff --git a/clients/client-cloudwatch/src/commands/DeleteAlarmsCommand.ts b/clients/client-cloudwatch/src/commands/DeleteAlarmsCommand.ts index e6ef97ede4ee..23f978bb40bc 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/Rpcv2cbor"; +import { de_DeleteAlarmsCommand, se_DeleteAlarmsCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DeleteAnomalyDetectorCommand.ts b/clients/client-cloudwatch/src/commands/DeleteAnomalyDetectorCommand.ts index 94708e39a8c7..7d0421a56393 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/Rpcv2cbor"; +import { de_DeleteAnomalyDetectorCommand, se_DeleteAnomalyDetectorCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DeleteDashboardsCommand.ts b/clients/client-cloudwatch/src/commands/DeleteDashboardsCommand.ts index 862fd832cc0a..68af9ee60f3e 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/Rpcv2cbor"; +import { de_DeleteDashboardsCommand, se_DeleteDashboardsCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DeleteInsightRulesCommand.ts b/clients/client-cloudwatch/src/commands/DeleteInsightRulesCommand.ts index 2d79c3cd4197..7accbd62a88f 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/Rpcv2cbor"; +import { de_DeleteInsightRulesCommand, se_DeleteInsightRulesCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DeleteMetricStreamCommand.ts b/clients/client-cloudwatch/src/commands/DeleteMetricStreamCommand.ts index b92cce7a5b42..a0047e1db8aa 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/Rpcv2cbor"; +import { de_DeleteMetricStreamCommand, se_DeleteMetricStreamCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DescribeAlarmHistoryCommand.ts b/clients/client-cloudwatch/src/commands/DescribeAlarmHistoryCommand.ts index 6721cf8425a1..2eba0d5abce9 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/Rpcv2cbor"; +import { de_DescribeAlarmHistoryCommand, se_DescribeAlarmHistoryCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DescribeAlarmsCommand.ts b/clients/client-cloudwatch/src/commands/DescribeAlarmsCommand.ts index 9f8110b41ad2..c494228964f9 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/Rpcv2cbor"; +import { de_DescribeAlarmsCommand, se_DescribeAlarmsCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DescribeAlarmsForMetricCommand.ts b/clients/client-cloudwatch/src/commands/DescribeAlarmsForMetricCommand.ts index 264d9001514a..ad2264539d0d 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/Rpcv2cbor"; +import { de_DescribeAlarmsForMetricCommand, se_DescribeAlarmsForMetricCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DescribeAnomalyDetectorsCommand.ts b/clients/client-cloudwatch/src/commands/DescribeAnomalyDetectorsCommand.ts index 5c0180eb726b..d805d3fc61c4 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/Rpcv2cbor"; +import { de_DescribeAnomalyDetectorsCommand, se_DescribeAnomalyDetectorsCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DescribeInsightRulesCommand.ts b/clients/client-cloudwatch/src/commands/DescribeInsightRulesCommand.ts index 48f1d36e98ae..9f73ef2a0ee3 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/Rpcv2cbor"; +import { de_DescribeInsightRulesCommand, se_DescribeInsightRulesCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DisableAlarmActionsCommand.ts b/clients/client-cloudwatch/src/commands/DisableAlarmActionsCommand.ts index bc3e12c196aa..8f0b2f1014ae 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/Rpcv2cbor"; +import { de_DisableAlarmActionsCommand, se_DisableAlarmActionsCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/DisableInsightRulesCommand.ts b/clients/client-cloudwatch/src/commands/DisableInsightRulesCommand.ts index 90c91fdae37e..ec39adc21763 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/Rpcv2cbor"; +import { de_DisableInsightRulesCommand, se_DisableInsightRulesCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/EnableAlarmActionsCommand.ts b/clients/client-cloudwatch/src/commands/EnableAlarmActionsCommand.ts index 25b1ab6989c7..15aef73c6ac2 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/Rpcv2cbor"; +import { de_EnableAlarmActionsCommand, se_EnableAlarmActionsCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/EnableInsightRulesCommand.ts b/clients/client-cloudwatch/src/commands/EnableInsightRulesCommand.ts index 75dbae2784ea..aa08b92136d0 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/Rpcv2cbor"; +import { de_EnableInsightRulesCommand, se_EnableInsightRulesCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/GetDashboardCommand.ts b/clients/client-cloudwatch/src/commands/GetDashboardCommand.ts index 050c5509a421..37a687988b39 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/Rpcv2cbor"; +import { de_GetDashboardCommand, se_GetDashboardCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/GetInsightRuleReportCommand.ts b/clients/client-cloudwatch/src/commands/GetInsightRuleReportCommand.ts index 60b3f55732ea..0a1f4d123e09 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/Rpcv2cbor"; +import { de_GetInsightRuleReportCommand, se_GetInsightRuleReportCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/GetMetricDataCommand.ts b/clients/client-cloudwatch/src/commands/GetMetricDataCommand.ts index bd199991dfd1..d10c41006bf9 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/Rpcv2cbor"; +import { de_GetMetricDataCommand, se_GetMetricDataCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/GetMetricStatisticsCommand.ts b/clients/client-cloudwatch/src/commands/GetMetricStatisticsCommand.ts index 2b55bc82abc2..4eecf1b1e2a2 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/Rpcv2cbor"; +import { de_GetMetricStatisticsCommand, se_GetMetricStatisticsCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/GetMetricStreamCommand.ts b/clients/client-cloudwatch/src/commands/GetMetricStreamCommand.ts index 898ac5985253..b76645aeb5b6 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/Rpcv2cbor"; +import { de_GetMetricStreamCommand, se_GetMetricStreamCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/GetMetricWidgetImageCommand.ts b/clients/client-cloudwatch/src/commands/GetMetricWidgetImageCommand.ts index 2c01fe26d1fd..52d29f0cc782 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/Rpcv2cbor"; +import { de_GetMetricWidgetImageCommand, se_GetMetricWidgetImageCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/ListDashboardsCommand.ts b/clients/client-cloudwatch/src/commands/ListDashboardsCommand.ts index a297e4e584f2..6a822e8e5b41 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/Rpcv2cbor"; +import { de_ListDashboardsCommand, se_ListDashboardsCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/ListManagedInsightRulesCommand.ts b/clients/client-cloudwatch/src/commands/ListManagedInsightRulesCommand.ts index 2470c4cd6e90..b359fd3447bf 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/Rpcv2cbor"; +import { de_ListManagedInsightRulesCommand, se_ListManagedInsightRulesCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/ListMetricStreamsCommand.ts b/clients/client-cloudwatch/src/commands/ListMetricStreamsCommand.ts index bc78c4e1d20f..1048ccf7c100 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/Rpcv2cbor"; +import { de_ListMetricStreamsCommand, se_ListMetricStreamsCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/ListMetricsCommand.ts b/clients/client-cloudwatch/src/commands/ListMetricsCommand.ts index 2616dd9e36c7..71932bc44bad 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/Rpcv2cbor"; +import { de_ListMetricsCommand, se_ListMetricsCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/ListTagsForResourceCommand.ts b/clients/client-cloudwatch/src/commands/ListTagsForResourceCommand.ts index 385d85933afe..37da2a30fcf8 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/Rpcv2cbor"; +import { de_ListTagsForResourceCommand, se_ListTagsForResourceCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/PutAnomalyDetectorCommand.ts b/clients/client-cloudwatch/src/commands/PutAnomalyDetectorCommand.ts index 025cd5fd5a88..b379c249ee0e 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/Rpcv2cbor"; +import { de_PutAnomalyDetectorCommand, se_PutAnomalyDetectorCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/PutCompositeAlarmCommand.ts b/clients/client-cloudwatch/src/commands/PutCompositeAlarmCommand.ts index 8bf2d142ffa9..043cc74a11bc 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/Rpcv2cbor"; +import { de_PutCompositeAlarmCommand, se_PutCompositeAlarmCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/PutDashboardCommand.ts b/clients/client-cloudwatch/src/commands/PutDashboardCommand.ts index bed73b9a0715..549c227b5487 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/Rpcv2cbor"; +import { de_PutDashboardCommand, se_PutDashboardCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/PutInsightRuleCommand.ts b/clients/client-cloudwatch/src/commands/PutInsightRuleCommand.ts index 2b33fc5e39a8..2cef56805621 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/Rpcv2cbor"; +import { de_PutInsightRuleCommand, se_PutInsightRuleCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/PutManagedInsightRulesCommand.ts b/clients/client-cloudwatch/src/commands/PutManagedInsightRulesCommand.ts index 50985688a73a..56ee513f2aa7 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/Rpcv2cbor"; +import { de_PutManagedInsightRulesCommand, se_PutManagedInsightRulesCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/PutMetricAlarmCommand.ts b/clients/client-cloudwatch/src/commands/PutMetricAlarmCommand.ts index 1128a53e7fb3..c22bc7d4df80 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/Rpcv2cbor"; +import { de_PutMetricAlarmCommand, se_PutMetricAlarmCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/PutMetricDataCommand.ts b/clients/client-cloudwatch/src/commands/PutMetricDataCommand.ts index 2b8b6c30966b..5fec329dc819 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/Rpcv2cbor"; +import { de_PutMetricDataCommand, se_PutMetricDataCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/PutMetricStreamCommand.ts b/clients/client-cloudwatch/src/commands/PutMetricStreamCommand.ts index 58d118cd8851..a374981ffa6f 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/Rpcv2cbor"; +import { de_PutMetricStreamCommand, se_PutMetricStreamCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/SetAlarmStateCommand.ts b/clients/client-cloudwatch/src/commands/SetAlarmStateCommand.ts index 4de07c3dbff7..6fbca160333a 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/Rpcv2cbor"; +import { de_SetAlarmStateCommand, se_SetAlarmStateCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/StartMetricStreamsCommand.ts b/clients/client-cloudwatch/src/commands/StartMetricStreamsCommand.ts index 210dbe548f5e..aacbc492b761 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/Rpcv2cbor"; +import { de_StartMetricStreamsCommand, se_StartMetricStreamsCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/StopMetricStreamsCommand.ts b/clients/client-cloudwatch/src/commands/StopMetricStreamsCommand.ts index 49fab1e3b0de..548198f4440a 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/Rpcv2cbor"; +import { de_StopMetricStreamsCommand, se_StopMetricStreamsCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/TagResourceCommand.ts b/clients/client-cloudwatch/src/commands/TagResourceCommand.ts index cfaa91b456b0..9868da3ad1b2 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/Rpcv2cbor"; +import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/commands/UntagResourceCommand.ts b/clients/client-cloudwatch/src/commands/UntagResourceCommand.ts index 255aada7b84e..493b7ea9e102 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/Rpcv2cbor"; +import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Aws_query"; /** * @public diff --git a/clients/client-cloudwatch/src/protocols/Aws_query.ts b/clients/client-cloudwatch/src/protocols/Aws_query.ts new file mode 100644 index 000000000000..bd82f6c612da --- /dev/null +++ b/clients/client-cloudwatch/src/protocols/Aws_query.ts @@ -0,0 +1,5774 @@ +// 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 index 5f4af2e46f57..c2f15ba83ab6 100644 --- a/clients/client-cloudwatch/src/protocols/Rpcv2cbor.ts +++ b/clients/client-cloudwatch/src/protocols/Rpcv2cbor.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { cbor, + dateToTag as __dateToTag, loadSmithyRpcV2CborErrorCode, parseCborBody as parseBody, parseCborErrorBody as parseErrorBody, @@ -17,7 +18,6 @@ import { expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, - serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client"; @@ -1951,11 +1951,7 @@ const se_AnomalyDetectorExcludedTimeRanges = (input: Range[], context: __SerdeCo * serializeRpcv2cborCounts */ const se_Counts = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return __serializeFloat(entry); - }); + return input.filter((e: any) => e != null); }; // se_DashboardNames omitted. @@ -1977,12 +1973,12 @@ const se_DescribeAlarmHistoryInput = (input: DescribeAlarmHistoryInput, context: return take(input, { AlarmName: [], AlarmTypes: _json, - EndDate: (_) => _.getTime() / 1_000, + EndDate: __dateToTag, HistoryItemType: [], MaxRecords: [], NextToken: [], ScanBy: [], - StartDate: (_) => _.getTime() / 1_000, + StartDate: __dateToTag, }); }; @@ -2019,13 +2015,13 @@ const se_DescribeAlarmHistoryInput = (input: DescribeAlarmHistoryInput, context: */ const se_GetInsightRuleReportInput = (input: GetInsightRuleReportInput, context: __SerdeContext): any => { return take(input, { - EndTime: (_) => _.getTime() / 1_000, + EndTime: __dateToTag, MaxContributorCount: [], Metrics: _json, OrderBy: [], Period: [], RuleName: [], - StartTime: (_) => _.getTime() / 1_000, + StartTime: __dateToTag, }); }; @@ -2034,13 +2030,13 @@ const se_GetInsightRuleReportInput = (input: GetInsightRuleReportInput, context: */ const se_GetMetricDataInput = (input: GetMetricDataInput, context: __SerdeContext): any => { return take(input, { - EndTime: (_) => _.getTime() / 1_000, + EndTime: __dateToTag, LabelOptions: _json, MaxDatapoints: [], MetricDataQueries: _json, NextToken: [], ScanBy: [], - StartTime: (_) => _.getTime() / 1_000, + StartTime: __dateToTag, }); }; @@ -2050,12 +2046,12 @@ const se_GetMetricDataInput = (input: GetMetricDataInput, context: __SerdeContex const se_GetMetricStatisticsInput = (input: GetMetricStatisticsInput, context: __SerdeContext): any => { return take(input, { Dimensions: _json, - EndTime: (_) => _.getTime() / 1_000, + EndTime: __dateToTag, ExtendedStatistics: _json, MetricName: [], Namespace: [], Period: [], - StartTime: (_) => _.getTime() / 1_000, + StartTime: __dateToTag, Statistics: _json, Unit: [], }); @@ -2114,9 +2110,9 @@ const se_MetricDatum = (input: MetricDatum, context: __SerdeContext): any => { MetricName: [], StatisticValues: (_) => se_StatisticSet(_, context), StorageResolution: [], - Timestamp: (_) => _.getTime() / 1_000, + Timestamp: __dateToTag, Unit: [], - Value: __serializeFloat, + Value: [], Values: (_) => se_Values(_, context), }); }; @@ -2190,7 +2186,7 @@ const se_PutMetricAlarmInput = (input: PutMetricAlarmInput, context: __SerdeCont Period: [], Statistic: [], Tags: _json, - Threshold: __serializeFloat, + Threshold: [], ThresholdMetricId: [], TreatMissingData: [], Unit: [], @@ -2214,8 +2210,8 @@ const se_PutMetricDataInput = (input: PutMetricDataInput, context: __SerdeContex */ const se_Range = (input: Range, context: __SerdeContext): any => { return take(input, { - EndTime: (_) => _.getTime() / 1_000, - StartTime: (_) => _.getTime() / 1_000, + EndTime: __dateToTag, + StartTime: __dateToTag, }); }; @@ -2234,10 +2230,10 @@ const se_Range = (input: Range, context: __SerdeContext): any => { */ const se_StatisticSet = (input: StatisticSet, context: __SerdeContext): any => { return take(input, { - Maximum: __serializeFloat, - Minimum: __serializeFloat, - SampleCount: __serializeFloat, - Sum: __serializeFloat, + Maximum: [], + Minimum: [], + SampleCount: [], + Sum: [], }); }; @@ -2257,11 +2253,7 @@ const se_StatisticSet = (input: StatisticSet, context: __SerdeContext): any => { * serializeRpcv2cborValues */ const se_Values = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return __serializeFloat(entry); - }); + return input.filter((e: any) => e != null); }; /** @@ -2588,7 +2580,7 @@ const de_GetMetricStreamOutput = (output: any, context: __SerdeContext): GetMetr */ const de_GetMetricWidgetImageOutput = (output: any, context: __SerdeContext): GetMetricWidgetImageOutput => { return take(output, { - MetricWidgetImage: context.base64Decoder, + MetricWidgetImage: [], }) as any; }; diff --git a/clients/client-dynamodb/src/commands/BatchExecuteStatementCommand.ts b/clients/client-dynamodb/src/commands/BatchExecuteStatementCommand.ts index 3a8957ca6e05..75bb4902fafe 100644 --- a/clients/client-dynamodb/src/commands/BatchExecuteStatementCommand.ts +++ b/clients/client-dynamodb/src/commands/BatchExecuteStatementCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { BatchExecuteStatementInput, BatchExecuteStatementOutput } from "../models/models_0"; -import { de_BatchExecuteStatementCommand, se_BatchExecuteStatementCommand } from "../protocols/Rpcv2cbor"; +import { de_BatchExecuteStatementCommand, se_BatchExecuteStatementCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/BatchGetItemCommand.ts b/clients/client-dynamodb/src/commands/BatchGetItemCommand.ts index 6f6426f371db..cd9cbb1eda66 100644 --- a/clients/client-dynamodb/src/commands/BatchGetItemCommand.ts +++ b/clients/client-dynamodb/src/commands/BatchGetItemCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { BatchGetItemInput, BatchGetItemOutput } from "../models/models_0"; -import { de_BatchGetItemCommand, se_BatchGetItemCommand } from "../protocols/Rpcv2cbor"; +import { de_BatchGetItemCommand, se_BatchGetItemCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/BatchWriteItemCommand.ts b/clients/client-dynamodb/src/commands/BatchWriteItemCommand.ts index 987eda8280c9..f8adc32b195d 100644 --- a/clients/client-dynamodb/src/commands/BatchWriteItemCommand.ts +++ b/clients/client-dynamodb/src/commands/BatchWriteItemCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { BatchWriteItemInput, BatchWriteItemOutput } from "../models/models_0"; -import { de_BatchWriteItemCommand, se_BatchWriteItemCommand } from "../protocols/Rpcv2cbor"; +import { de_BatchWriteItemCommand, se_BatchWriteItemCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/CreateBackupCommand.ts b/clients/client-dynamodb/src/commands/CreateBackupCommand.ts index a6fc6b824ed7..be76aa6ee32c 100644 --- a/clients/client-dynamodb/src/commands/CreateBackupCommand.ts +++ b/clients/client-dynamodb/src/commands/CreateBackupCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { CreateBackupInput, CreateBackupOutput } from "../models/models_0"; -import { de_CreateBackupCommand, se_CreateBackupCommand } from "../protocols/Rpcv2cbor"; +import { de_CreateBackupCommand, se_CreateBackupCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/CreateGlobalTableCommand.ts b/clients/client-dynamodb/src/commands/CreateGlobalTableCommand.ts index 626b53a74ee3..8bff5bd3dc48 100644 --- a/clients/client-dynamodb/src/commands/CreateGlobalTableCommand.ts +++ b/clients/client-dynamodb/src/commands/CreateGlobalTableCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { CreateGlobalTableInput, CreateGlobalTableOutput } from "../models/models_0"; -import { de_CreateGlobalTableCommand, se_CreateGlobalTableCommand } from "../protocols/Rpcv2cbor"; +import { de_CreateGlobalTableCommand, se_CreateGlobalTableCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/CreateTableCommand.ts b/clients/client-dynamodb/src/commands/CreateTableCommand.ts index 5268e5fb4b24..2c6554a5da3b 100644 --- a/clients/client-dynamodb/src/commands/CreateTableCommand.ts +++ b/clients/client-dynamodb/src/commands/CreateTableCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { CreateTableInput, CreateTableOutput } from "../models/models_0"; -import { de_CreateTableCommand, se_CreateTableCommand } from "../protocols/Rpcv2cbor"; +import { de_CreateTableCommand, se_CreateTableCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/DeleteBackupCommand.ts b/clients/client-dynamodb/src/commands/DeleteBackupCommand.ts index b139d140d7ee..fb5dcf2cb43a 100644 --- a/clients/client-dynamodb/src/commands/DeleteBackupCommand.ts +++ b/clients/client-dynamodb/src/commands/DeleteBackupCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DeleteBackupInput, DeleteBackupOutput } from "../models/models_0"; -import { de_DeleteBackupCommand, se_DeleteBackupCommand } from "../protocols/Rpcv2cbor"; +import { de_DeleteBackupCommand, se_DeleteBackupCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/DeleteItemCommand.ts b/clients/client-dynamodb/src/commands/DeleteItemCommand.ts index 7847b49cdef0..e751d94bfaf7 100644 --- a/clients/client-dynamodb/src/commands/DeleteItemCommand.ts +++ b/clients/client-dynamodb/src/commands/DeleteItemCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DeleteItemInput, DeleteItemOutput } from "../models/models_0"; -import { de_DeleteItemCommand, se_DeleteItemCommand } from "../protocols/Rpcv2cbor"; +import { de_DeleteItemCommand, se_DeleteItemCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/DeleteResourcePolicyCommand.ts b/clients/client-dynamodb/src/commands/DeleteResourcePolicyCommand.ts index c4215f6e8618..c11e02cc55b4 100644 --- a/clients/client-dynamodb/src/commands/DeleteResourcePolicyCommand.ts +++ b/clients/client-dynamodb/src/commands/DeleteResourcePolicyCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DeleteResourcePolicyInput, DeleteResourcePolicyOutput } from "../models/models_0"; -import { de_DeleteResourcePolicyCommand, se_DeleteResourcePolicyCommand } from "../protocols/Rpcv2cbor"; +import { de_DeleteResourcePolicyCommand, se_DeleteResourcePolicyCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/DeleteTableCommand.ts b/clients/client-dynamodb/src/commands/DeleteTableCommand.ts index e70f37700919..0bee95f2cb09 100644 --- a/clients/client-dynamodb/src/commands/DeleteTableCommand.ts +++ b/clients/client-dynamodb/src/commands/DeleteTableCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DeleteTableInput, DeleteTableOutput } from "../models/models_0"; -import { de_DeleteTableCommand, se_DeleteTableCommand } from "../protocols/Rpcv2cbor"; +import { de_DeleteTableCommand, se_DeleteTableCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/DescribeBackupCommand.ts b/clients/client-dynamodb/src/commands/DescribeBackupCommand.ts index a0565ca5cf3d..e66de7edffc3 100644 --- a/clients/client-dynamodb/src/commands/DescribeBackupCommand.ts +++ b/clients/client-dynamodb/src/commands/DescribeBackupCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DescribeBackupInput, DescribeBackupOutput } from "../models/models_0"; -import { de_DescribeBackupCommand, se_DescribeBackupCommand } from "../protocols/Rpcv2cbor"; +import { de_DescribeBackupCommand, se_DescribeBackupCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/DescribeContinuousBackupsCommand.ts b/clients/client-dynamodb/src/commands/DescribeContinuousBackupsCommand.ts index 70a53ceb58dc..f1948bf1b0b3 100644 --- a/clients/client-dynamodb/src/commands/DescribeContinuousBackupsCommand.ts +++ b/clients/client-dynamodb/src/commands/DescribeContinuousBackupsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DescribeContinuousBackupsInput, DescribeContinuousBackupsOutput } from "../models/models_0"; -import { de_DescribeContinuousBackupsCommand, se_DescribeContinuousBackupsCommand } from "../protocols/Rpcv2cbor"; +import { de_DescribeContinuousBackupsCommand, se_DescribeContinuousBackupsCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/DescribeContributorInsightsCommand.ts b/clients/client-dynamodb/src/commands/DescribeContributorInsightsCommand.ts index 0f64cb265f01..aad30132aca9 100644 --- a/clients/client-dynamodb/src/commands/DescribeContributorInsightsCommand.ts +++ b/clients/client-dynamodb/src/commands/DescribeContributorInsightsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DescribeContributorInsightsInput, DescribeContributorInsightsOutput } from "../models/models_0"; -import { de_DescribeContributorInsightsCommand, se_DescribeContributorInsightsCommand } from "../protocols/Rpcv2cbor"; +import { de_DescribeContributorInsightsCommand, se_DescribeContributorInsightsCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/DescribeEndpointsCommand.ts b/clients/client-dynamodb/src/commands/DescribeEndpointsCommand.ts index d1a579339635..17f92410207a 100644 --- a/clients/client-dynamodb/src/commands/DescribeEndpointsCommand.ts +++ b/clients/client-dynamodb/src/commands/DescribeEndpointsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DescribeEndpointsRequest, DescribeEndpointsResponse } from "../models/models_0"; -import { de_DescribeEndpointsCommand, se_DescribeEndpointsCommand } from "../protocols/Rpcv2cbor"; +import { de_DescribeEndpointsCommand, se_DescribeEndpointsCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/DescribeExportCommand.ts b/clients/client-dynamodb/src/commands/DescribeExportCommand.ts index e8bcea1f793f..7012bb22df43 100644 --- a/clients/client-dynamodb/src/commands/DescribeExportCommand.ts +++ b/clients/client-dynamodb/src/commands/DescribeExportCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DescribeExportInput, DescribeExportOutput } from "../models/models_0"; -import { de_DescribeExportCommand, se_DescribeExportCommand } from "../protocols/Rpcv2cbor"; +import { de_DescribeExportCommand, se_DescribeExportCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/DescribeGlobalTableCommand.ts b/clients/client-dynamodb/src/commands/DescribeGlobalTableCommand.ts index e5f0aca92000..3b4d722d0afa 100644 --- a/clients/client-dynamodb/src/commands/DescribeGlobalTableCommand.ts +++ b/clients/client-dynamodb/src/commands/DescribeGlobalTableCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DescribeGlobalTableInput, DescribeGlobalTableOutput } from "../models/models_0"; -import { de_DescribeGlobalTableCommand, se_DescribeGlobalTableCommand } from "../protocols/Rpcv2cbor"; +import { de_DescribeGlobalTableCommand, se_DescribeGlobalTableCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/DescribeGlobalTableSettingsCommand.ts b/clients/client-dynamodb/src/commands/DescribeGlobalTableSettingsCommand.ts index 85a94b82ebd3..d7fe9812cec5 100644 --- a/clients/client-dynamodb/src/commands/DescribeGlobalTableSettingsCommand.ts +++ b/clients/client-dynamodb/src/commands/DescribeGlobalTableSettingsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DescribeGlobalTableSettingsInput, DescribeGlobalTableSettingsOutput } from "../models/models_0"; -import { de_DescribeGlobalTableSettingsCommand, se_DescribeGlobalTableSettingsCommand } from "../protocols/Rpcv2cbor"; +import { de_DescribeGlobalTableSettingsCommand, se_DescribeGlobalTableSettingsCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/DescribeImportCommand.ts b/clients/client-dynamodb/src/commands/DescribeImportCommand.ts index fa754b9c7ce4..d00fe29931c8 100644 --- a/clients/client-dynamodb/src/commands/DescribeImportCommand.ts +++ b/clients/client-dynamodb/src/commands/DescribeImportCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DescribeImportInput, DescribeImportOutput } from "../models/models_0"; -import { de_DescribeImportCommand, se_DescribeImportCommand } from "../protocols/Rpcv2cbor"; +import { de_DescribeImportCommand, se_DescribeImportCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/DescribeKinesisStreamingDestinationCommand.ts b/clients/client-dynamodb/src/commands/DescribeKinesisStreamingDestinationCommand.ts index 08c05f58fc06..012f6eab3b42 100644 --- a/clients/client-dynamodb/src/commands/DescribeKinesisStreamingDestinationCommand.ts +++ b/clients/client-dynamodb/src/commands/DescribeKinesisStreamingDestinationCommand.ts @@ -13,7 +13,7 @@ import { import { de_DescribeKinesisStreamingDestinationCommand, se_DescribeKinesisStreamingDestinationCommand, -} from "../protocols/Rpcv2cbor"; +} from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/DescribeLimitsCommand.ts b/clients/client-dynamodb/src/commands/DescribeLimitsCommand.ts index 4aa4ec8e2d35..40801ed10f60 100644 --- a/clients/client-dynamodb/src/commands/DescribeLimitsCommand.ts +++ b/clients/client-dynamodb/src/commands/DescribeLimitsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DescribeLimitsInput, DescribeLimitsOutput } from "../models/models_0"; -import { de_DescribeLimitsCommand, se_DescribeLimitsCommand } from "../protocols/Rpcv2cbor"; +import { de_DescribeLimitsCommand, se_DescribeLimitsCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/DescribeTableCommand.ts b/clients/client-dynamodb/src/commands/DescribeTableCommand.ts index de2d77643bb3..cdc8db89afff 100644 --- a/clients/client-dynamodb/src/commands/DescribeTableCommand.ts +++ b/clients/client-dynamodb/src/commands/DescribeTableCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DescribeTableInput, DescribeTableOutput } from "../models/models_0"; -import { de_DescribeTableCommand, se_DescribeTableCommand } from "../protocols/Rpcv2cbor"; +import { de_DescribeTableCommand, se_DescribeTableCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/DescribeTableReplicaAutoScalingCommand.ts b/clients/client-dynamodb/src/commands/DescribeTableReplicaAutoScalingCommand.ts index e6887b703820..07055a899e67 100644 --- a/clients/client-dynamodb/src/commands/DescribeTableReplicaAutoScalingCommand.ts +++ b/clients/client-dynamodb/src/commands/DescribeTableReplicaAutoScalingCommand.ts @@ -10,7 +10,7 @@ import { DescribeTableReplicaAutoScalingInput, DescribeTableReplicaAutoScalingOu import { de_DescribeTableReplicaAutoScalingCommand, se_DescribeTableReplicaAutoScalingCommand, -} from "../protocols/Rpcv2cbor"; +} from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/DescribeTimeToLiveCommand.ts b/clients/client-dynamodb/src/commands/DescribeTimeToLiveCommand.ts index be102ae21406..64441ccbcbbb 100644 --- a/clients/client-dynamodb/src/commands/DescribeTimeToLiveCommand.ts +++ b/clients/client-dynamodb/src/commands/DescribeTimeToLiveCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { DescribeTimeToLiveInput, DescribeTimeToLiveOutput } from "../models/models_0"; -import { de_DescribeTimeToLiveCommand, se_DescribeTimeToLiveCommand } from "../protocols/Rpcv2cbor"; +import { de_DescribeTimeToLiveCommand, se_DescribeTimeToLiveCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/DisableKinesisStreamingDestinationCommand.ts b/clients/client-dynamodb/src/commands/DisableKinesisStreamingDestinationCommand.ts index 481d09be2f24..0eec61734562 100644 --- a/clients/client-dynamodb/src/commands/DisableKinesisStreamingDestinationCommand.ts +++ b/clients/client-dynamodb/src/commands/DisableKinesisStreamingDestinationCommand.ts @@ -10,7 +10,7 @@ import { KinesisStreamingDestinationInput, KinesisStreamingDestinationOutput } f import { de_DisableKinesisStreamingDestinationCommand, se_DisableKinesisStreamingDestinationCommand, -} from "../protocols/Rpcv2cbor"; +} from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/EnableKinesisStreamingDestinationCommand.ts b/clients/client-dynamodb/src/commands/EnableKinesisStreamingDestinationCommand.ts index a8ced1f53014..0a7ce36b3899 100644 --- a/clients/client-dynamodb/src/commands/EnableKinesisStreamingDestinationCommand.ts +++ b/clients/client-dynamodb/src/commands/EnableKinesisStreamingDestinationCommand.ts @@ -10,7 +10,7 @@ import { KinesisStreamingDestinationInput, KinesisStreamingDestinationOutput } f import { de_EnableKinesisStreamingDestinationCommand, se_EnableKinesisStreamingDestinationCommand, -} from "../protocols/Rpcv2cbor"; +} from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/ExecuteStatementCommand.ts b/clients/client-dynamodb/src/commands/ExecuteStatementCommand.ts index 9b5254a0e219..2d45b4432930 100644 --- a/clients/client-dynamodb/src/commands/ExecuteStatementCommand.ts +++ b/clients/client-dynamodb/src/commands/ExecuteStatementCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { ExecuteStatementInput, ExecuteStatementOutput } from "../models/models_0"; -import { de_ExecuteStatementCommand, se_ExecuteStatementCommand } from "../protocols/Rpcv2cbor"; +import { de_ExecuteStatementCommand, se_ExecuteStatementCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/ExecuteTransactionCommand.ts b/clients/client-dynamodb/src/commands/ExecuteTransactionCommand.ts index 7ead71bbae09..dba29de9c06d 100644 --- a/clients/client-dynamodb/src/commands/ExecuteTransactionCommand.ts +++ b/clients/client-dynamodb/src/commands/ExecuteTransactionCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { ExecuteTransactionInput, ExecuteTransactionOutput } from "../models/models_0"; -import { de_ExecuteTransactionCommand, se_ExecuteTransactionCommand } from "../protocols/Rpcv2cbor"; +import { de_ExecuteTransactionCommand, se_ExecuteTransactionCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/ExportTableToPointInTimeCommand.ts b/clients/client-dynamodb/src/commands/ExportTableToPointInTimeCommand.ts index b3f3f972721a..6b13bb4bc31b 100644 --- a/clients/client-dynamodb/src/commands/ExportTableToPointInTimeCommand.ts +++ b/clients/client-dynamodb/src/commands/ExportTableToPointInTimeCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { ExportTableToPointInTimeInput, ExportTableToPointInTimeOutput } from "../models/models_0"; -import { de_ExportTableToPointInTimeCommand, se_ExportTableToPointInTimeCommand } from "../protocols/Rpcv2cbor"; +import { de_ExportTableToPointInTimeCommand, se_ExportTableToPointInTimeCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/GetItemCommand.ts b/clients/client-dynamodb/src/commands/GetItemCommand.ts index 0af036637002..eae65e76d930 100644 --- a/clients/client-dynamodb/src/commands/GetItemCommand.ts +++ b/clients/client-dynamodb/src/commands/GetItemCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { GetItemInput, GetItemOutput } from "../models/models_0"; -import { de_GetItemCommand, se_GetItemCommand } from "../protocols/Rpcv2cbor"; +import { de_GetItemCommand, se_GetItemCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/GetResourcePolicyCommand.ts b/clients/client-dynamodb/src/commands/GetResourcePolicyCommand.ts index dd293356a4f7..2c15df5c0907 100644 --- a/clients/client-dynamodb/src/commands/GetResourcePolicyCommand.ts +++ b/clients/client-dynamodb/src/commands/GetResourcePolicyCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { GetResourcePolicyInput, GetResourcePolicyOutput } from "../models/models_0"; -import { de_GetResourcePolicyCommand, se_GetResourcePolicyCommand } from "../protocols/Rpcv2cbor"; +import { de_GetResourcePolicyCommand, se_GetResourcePolicyCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/ImportTableCommand.ts b/clients/client-dynamodb/src/commands/ImportTableCommand.ts index 0b51969e28f4..d16dd5194eba 100644 --- a/clients/client-dynamodb/src/commands/ImportTableCommand.ts +++ b/clients/client-dynamodb/src/commands/ImportTableCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { ImportTableInput, ImportTableOutput } from "../models/models_0"; -import { de_ImportTableCommand, se_ImportTableCommand } from "../protocols/Rpcv2cbor"; +import { de_ImportTableCommand, se_ImportTableCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/ListBackupsCommand.ts b/clients/client-dynamodb/src/commands/ListBackupsCommand.ts index f220464aacfe..61089dd51c0d 100644 --- a/clients/client-dynamodb/src/commands/ListBackupsCommand.ts +++ b/clients/client-dynamodb/src/commands/ListBackupsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { ListBackupsInput, ListBackupsOutput } from "../models/models_0"; -import { de_ListBackupsCommand, se_ListBackupsCommand } from "../protocols/Rpcv2cbor"; +import { de_ListBackupsCommand, se_ListBackupsCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/ListContributorInsightsCommand.ts b/clients/client-dynamodb/src/commands/ListContributorInsightsCommand.ts index 773d3920dea6..f38c8b2aa479 100644 --- a/clients/client-dynamodb/src/commands/ListContributorInsightsCommand.ts +++ b/clients/client-dynamodb/src/commands/ListContributorInsightsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { ListContributorInsightsInput, ListContributorInsightsOutput } from "../models/models_0"; -import { de_ListContributorInsightsCommand, se_ListContributorInsightsCommand } from "../protocols/Rpcv2cbor"; +import { de_ListContributorInsightsCommand, se_ListContributorInsightsCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/ListExportsCommand.ts b/clients/client-dynamodb/src/commands/ListExportsCommand.ts index 6b0ebab39dec..2d0216d3fd96 100644 --- a/clients/client-dynamodb/src/commands/ListExportsCommand.ts +++ b/clients/client-dynamodb/src/commands/ListExportsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { ListExportsInput, ListExportsOutput } from "../models/models_0"; -import { de_ListExportsCommand, se_ListExportsCommand } from "../protocols/Rpcv2cbor"; +import { de_ListExportsCommand, se_ListExportsCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/ListGlobalTablesCommand.ts b/clients/client-dynamodb/src/commands/ListGlobalTablesCommand.ts index a1fc7f767167..681e683e5418 100644 --- a/clients/client-dynamodb/src/commands/ListGlobalTablesCommand.ts +++ b/clients/client-dynamodb/src/commands/ListGlobalTablesCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { ListGlobalTablesInput, ListGlobalTablesOutput } from "../models/models_0"; -import { de_ListGlobalTablesCommand, se_ListGlobalTablesCommand } from "../protocols/Rpcv2cbor"; +import { de_ListGlobalTablesCommand, se_ListGlobalTablesCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/ListImportsCommand.ts b/clients/client-dynamodb/src/commands/ListImportsCommand.ts index 017d2cdae017..e0aa7e09a6bf 100644 --- a/clients/client-dynamodb/src/commands/ListImportsCommand.ts +++ b/clients/client-dynamodb/src/commands/ListImportsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { ListImportsInput, ListImportsOutput } from "../models/models_0"; -import { de_ListImportsCommand, se_ListImportsCommand } from "../protocols/Rpcv2cbor"; +import { de_ListImportsCommand, se_ListImportsCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/ListTablesCommand.ts b/clients/client-dynamodb/src/commands/ListTablesCommand.ts index c4db3dca07f8..df5efc6b0a63 100644 --- a/clients/client-dynamodb/src/commands/ListTablesCommand.ts +++ b/clients/client-dynamodb/src/commands/ListTablesCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { ListTablesInput, ListTablesOutput } from "../models/models_0"; -import { de_ListTablesCommand, se_ListTablesCommand } from "../protocols/Rpcv2cbor"; +import { de_ListTablesCommand, se_ListTablesCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/ListTagsOfResourceCommand.ts b/clients/client-dynamodb/src/commands/ListTagsOfResourceCommand.ts index 3e4a1ddd63c8..dc58a9ea6c2e 100644 --- a/clients/client-dynamodb/src/commands/ListTagsOfResourceCommand.ts +++ b/clients/client-dynamodb/src/commands/ListTagsOfResourceCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { ListTagsOfResourceInput, ListTagsOfResourceOutput } from "../models/models_0"; -import { de_ListTagsOfResourceCommand, se_ListTagsOfResourceCommand } from "../protocols/Rpcv2cbor"; +import { de_ListTagsOfResourceCommand, se_ListTagsOfResourceCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/PutItemCommand.ts b/clients/client-dynamodb/src/commands/PutItemCommand.ts index 667abf82a766..24ef2062c91a 100644 --- a/clients/client-dynamodb/src/commands/PutItemCommand.ts +++ b/clients/client-dynamodb/src/commands/PutItemCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { PutItemInput, PutItemOutput } from "../models/models_0"; -import { de_PutItemCommand, se_PutItemCommand } from "../protocols/Rpcv2cbor"; +import { de_PutItemCommand, se_PutItemCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/PutResourcePolicyCommand.ts b/clients/client-dynamodb/src/commands/PutResourcePolicyCommand.ts index d7e973acd8f5..f5ad724fe3d9 100644 --- a/clients/client-dynamodb/src/commands/PutResourcePolicyCommand.ts +++ b/clients/client-dynamodb/src/commands/PutResourcePolicyCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { PutResourcePolicyInput, PutResourcePolicyOutput } from "../models/models_0"; -import { de_PutResourcePolicyCommand, se_PutResourcePolicyCommand } from "../protocols/Rpcv2cbor"; +import { de_PutResourcePolicyCommand, se_PutResourcePolicyCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/QueryCommand.ts b/clients/client-dynamodb/src/commands/QueryCommand.ts index 64286355f7ac..af1d0dc33a82 100644 --- a/clients/client-dynamodb/src/commands/QueryCommand.ts +++ b/clients/client-dynamodb/src/commands/QueryCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { QueryInput, QueryOutput } from "../models/models_0"; -import { de_QueryCommand, se_QueryCommand } from "../protocols/Rpcv2cbor"; +import { de_QueryCommand, se_QueryCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/RestoreTableFromBackupCommand.ts b/clients/client-dynamodb/src/commands/RestoreTableFromBackupCommand.ts index 2c5e2d052554..1bc1153e0ec1 100644 --- a/clients/client-dynamodb/src/commands/RestoreTableFromBackupCommand.ts +++ b/clients/client-dynamodb/src/commands/RestoreTableFromBackupCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { RestoreTableFromBackupInput, RestoreTableFromBackupOutput } from "../models/models_0"; -import { de_RestoreTableFromBackupCommand, se_RestoreTableFromBackupCommand } from "../protocols/Rpcv2cbor"; +import { de_RestoreTableFromBackupCommand, se_RestoreTableFromBackupCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/RestoreTableToPointInTimeCommand.ts b/clients/client-dynamodb/src/commands/RestoreTableToPointInTimeCommand.ts index f79c9081c979..ef9548cb5d4d 100644 --- a/clients/client-dynamodb/src/commands/RestoreTableToPointInTimeCommand.ts +++ b/clients/client-dynamodb/src/commands/RestoreTableToPointInTimeCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { RestoreTableToPointInTimeInput, RestoreTableToPointInTimeOutput } from "../models/models_0"; -import { de_RestoreTableToPointInTimeCommand, se_RestoreTableToPointInTimeCommand } from "../protocols/Rpcv2cbor"; +import { de_RestoreTableToPointInTimeCommand, se_RestoreTableToPointInTimeCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/ScanCommand.ts b/clients/client-dynamodb/src/commands/ScanCommand.ts index d2181ac93df9..3d43202782d1 100644 --- a/clients/client-dynamodb/src/commands/ScanCommand.ts +++ b/clients/client-dynamodb/src/commands/ScanCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { ScanInput, ScanOutput } from "../models/models_0"; -import { de_ScanCommand, se_ScanCommand } from "../protocols/Rpcv2cbor"; +import { de_ScanCommand, se_ScanCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/TagResourceCommand.ts b/clients/client-dynamodb/src/commands/TagResourceCommand.ts index 8bbb81a826f0..692ca48b0978 100644 --- a/clients/client-dynamodb/src/commands/TagResourceCommand.ts +++ b/clients/client-dynamodb/src/commands/TagResourceCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { TagResourceInput } from "../models/models_0"; -import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Rpcv2cbor"; +import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/TransactGetItemsCommand.ts b/clients/client-dynamodb/src/commands/TransactGetItemsCommand.ts index f19bd34155e9..29ab7e9663d7 100644 --- a/clients/client-dynamodb/src/commands/TransactGetItemsCommand.ts +++ b/clients/client-dynamodb/src/commands/TransactGetItemsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { TransactGetItemsInput, TransactGetItemsOutput } from "../models/models_0"; -import { de_TransactGetItemsCommand, se_TransactGetItemsCommand } from "../protocols/Rpcv2cbor"; +import { de_TransactGetItemsCommand, se_TransactGetItemsCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/TransactWriteItemsCommand.ts b/clients/client-dynamodb/src/commands/TransactWriteItemsCommand.ts index a86ebee683e8..d94ad52d43b5 100644 --- a/clients/client-dynamodb/src/commands/TransactWriteItemsCommand.ts +++ b/clients/client-dynamodb/src/commands/TransactWriteItemsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { TransactWriteItemsInput, TransactWriteItemsOutput } from "../models/models_0"; -import { de_TransactWriteItemsCommand, se_TransactWriteItemsCommand } from "../protocols/Rpcv2cbor"; +import { de_TransactWriteItemsCommand, se_TransactWriteItemsCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/UntagResourceCommand.ts b/clients/client-dynamodb/src/commands/UntagResourceCommand.ts index 2f9d38bc858c..7c26482006ac 100644 --- a/clients/client-dynamodb/src/commands/UntagResourceCommand.ts +++ b/clients/client-dynamodb/src/commands/UntagResourceCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { UntagResourceInput } from "../models/models_0"; -import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Rpcv2cbor"; +import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/UpdateContinuousBackupsCommand.ts b/clients/client-dynamodb/src/commands/UpdateContinuousBackupsCommand.ts index ee539eb0f9f0..e60a0526593a 100644 --- a/clients/client-dynamodb/src/commands/UpdateContinuousBackupsCommand.ts +++ b/clients/client-dynamodb/src/commands/UpdateContinuousBackupsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { UpdateContinuousBackupsInput, UpdateContinuousBackupsOutput } from "../models/models_0"; -import { de_UpdateContinuousBackupsCommand, se_UpdateContinuousBackupsCommand } from "../protocols/Rpcv2cbor"; +import { de_UpdateContinuousBackupsCommand, se_UpdateContinuousBackupsCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/UpdateContributorInsightsCommand.ts b/clients/client-dynamodb/src/commands/UpdateContributorInsightsCommand.ts index 2a484e8eea95..539694930d5b 100644 --- a/clients/client-dynamodb/src/commands/UpdateContributorInsightsCommand.ts +++ b/clients/client-dynamodb/src/commands/UpdateContributorInsightsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { UpdateContributorInsightsInput, UpdateContributorInsightsOutput } from "../models/models_0"; -import { de_UpdateContributorInsightsCommand, se_UpdateContributorInsightsCommand } from "../protocols/Rpcv2cbor"; +import { de_UpdateContributorInsightsCommand, se_UpdateContributorInsightsCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/UpdateGlobalTableCommand.ts b/clients/client-dynamodb/src/commands/UpdateGlobalTableCommand.ts index 503e20716dd5..694fd5af345f 100644 --- a/clients/client-dynamodb/src/commands/UpdateGlobalTableCommand.ts +++ b/clients/client-dynamodb/src/commands/UpdateGlobalTableCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { UpdateGlobalTableInput, UpdateGlobalTableOutput } from "../models/models_0"; -import { de_UpdateGlobalTableCommand, se_UpdateGlobalTableCommand } from "../protocols/Rpcv2cbor"; +import { de_UpdateGlobalTableCommand, se_UpdateGlobalTableCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/UpdateGlobalTableSettingsCommand.ts b/clients/client-dynamodb/src/commands/UpdateGlobalTableSettingsCommand.ts index 1fb0194e2b2e..f02e895a0cc2 100644 --- a/clients/client-dynamodb/src/commands/UpdateGlobalTableSettingsCommand.ts +++ b/clients/client-dynamodb/src/commands/UpdateGlobalTableSettingsCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { UpdateGlobalTableSettingsInput, UpdateGlobalTableSettingsOutput } from "../models/models_0"; -import { de_UpdateGlobalTableSettingsCommand, se_UpdateGlobalTableSettingsCommand } from "../protocols/Rpcv2cbor"; +import { de_UpdateGlobalTableSettingsCommand, se_UpdateGlobalTableSettingsCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/UpdateItemCommand.ts b/clients/client-dynamodb/src/commands/UpdateItemCommand.ts index b6750812a625..9fd20f7c10f7 100644 --- a/clients/client-dynamodb/src/commands/UpdateItemCommand.ts +++ b/clients/client-dynamodb/src/commands/UpdateItemCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { UpdateItemInput, UpdateItemOutput } from "../models/models_0"; -import { de_UpdateItemCommand, se_UpdateItemCommand } from "../protocols/Rpcv2cbor"; +import { de_UpdateItemCommand, se_UpdateItemCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/UpdateKinesisStreamingDestinationCommand.ts b/clients/client-dynamodb/src/commands/UpdateKinesisStreamingDestinationCommand.ts index b555d3e021f1..d2e8872f1f55 100644 --- a/clients/client-dynamodb/src/commands/UpdateKinesisStreamingDestinationCommand.ts +++ b/clients/client-dynamodb/src/commands/UpdateKinesisStreamingDestinationCommand.ts @@ -10,7 +10,7 @@ import { UpdateKinesisStreamingDestinationInput, UpdateKinesisStreamingDestinati import { de_UpdateKinesisStreamingDestinationCommand, se_UpdateKinesisStreamingDestinationCommand, -} from "../protocols/Rpcv2cbor"; +} from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/UpdateTableCommand.ts b/clients/client-dynamodb/src/commands/UpdateTableCommand.ts index 1ee1ec712065..7c53fa3dd40d 100644 --- a/clients/client-dynamodb/src/commands/UpdateTableCommand.ts +++ b/clients/client-dynamodb/src/commands/UpdateTableCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { UpdateTableInput, UpdateTableOutput } from "../models/models_0"; -import { de_UpdateTableCommand, se_UpdateTableCommand } from "../protocols/Rpcv2cbor"; +import { de_UpdateTableCommand, se_UpdateTableCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/UpdateTableReplicaAutoScalingCommand.ts b/clients/client-dynamodb/src/commands/UpdateTableReplicaAutoScalingCommand.ts index f2462adcfdb6..8c868cbabc0a 100644 --- a/clients/client-dynamodb/src/commands/UpdateTableReplicaAutoScalingCommand.ts +++ b/clients/client-dynamodb/src/commands/UpdateTableReplicaAutoScalingCommand.ts @@ -10,7 +10,7 @@ import { UpdateTableReplicaAutoScalingInput, UpdateTableReplicaAutoScalingOutput import { de_UpdateTableReplicaAutoScalingCommand, se_UpdateTableReplicaAutoScalingCommand, -} from "../protocols/Rpcv2cbor"; +} from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-dynamodb/src/commands/UpdateTimeToLiveCommand.ts b/clients/client-dynamodb/src/commands/UpdateTimeToLiveCommand.ts index 4ccb23df1f95..811b2f0a9b6c 100644 --- a/clients/client-dynamodb/src/commands/UpdateTimeToLiveCommand.ts +++ b/clients/client-dynamodb/src/commands/UpdateTimeToLiveCommand.ts @@ -7,7 +7,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { UpdateTimeToLiveInput, UpdateTimeToLiveOutput } from "../models/models_0"; -import { de_UpdateTimeToLiveCommand, se_UpdateTimeToLiveCommand } from "../protocols/Rpcv2cbor"; +import { de_UpdateTimeToLiveCommand, se_UpdateTimeToLiveCommand } from "../protocols/Aws_json1_0"; /** * @public diff --git a/clients/client-secrets-manager/src/commands/BatchGetSecretValueCommand.ts b/clients/client-secrets-manager/src/commands/BatchGetSecretValueCommand.ts index 46397f6539ba..6e69ad0998ff 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/Rpcv2cbor"; +import { de_BatchGetSecretValueCommand, se_BatchGetSecretValueCommand } from "../protocols/Aws_json1_1"; 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 d88246aa1b4e..355e6fac529e 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/Rpcv2cbor"; +import { de_CancelRotateSecretCommand, se_CancelRotateSecretCommand } from "../protocols/Aws_json1_1"; 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 a4d035a19873..69783ae67093 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/Rpcv2cbor"; +import { de_CreateSecretCommand, se_CreateSecretCommand } from "../protocols/Aws_json1_1"; 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 a5b98deb13d2..8c8033a4e268 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/Rpcv2cbor"; +import { de_DeleteResourcePolicyCommand, se_DeleteResourcePolicyCommand } from "../protocols/Aws_json1_1"; 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 c4ebdde3880d..d279a236adbe 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/Rpcv2cbor"; +import { de_DeleteSecretCommand, se_DeleteSecretCommand } from "../protocols/Aws_json1_1"; 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 156f42d27046..027244169efa 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/Rpcv2cbor"; +import { de_DescribeSecretCommand, se_DescribeSecretCommand } from "../protocols/Aws_json1_1"; 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 d48d29ac4c06..207ddc951e0b 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/Rpcv2cbor"; +import { de_GetRandomPasswordCommand, se_GetRandomPasswordCommand } from "../protocols/Aws_json1_1"; 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 bbfef2499d97..93d4c1c5fca5 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/Rpcv2cbor"; +import { de_GetResourcePolicyCommand, se_GetResourcePolicyCommand } from "../protocols/Aws_json1_1"; 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 f74583308712..e1b4eb43a045 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/Rpcv2cbor"; +import { de_GetSecretValueCommand, se_GetSecretValueCommand } from "../protocols/Aws_json1_1"; 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 ea06f63e36b6..3df6cb9468bb 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/Rpcv2cbor"; +import { de_ListSecretVersionIdsCommand, se_ListSecretVersionIdsCommand } from "../protocols/Aws_json1_1"; 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 a44f96c23887..5c7eaa27ad26 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/Rpcv2cbor"; +import { de_ListSecretsCommand, se_ListSecretsCommand } from "../protocols/Aws_json1_1"; 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 25fcc50a64e7..3b8440bcc6f0 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/Rpcv2cbor"; +import { de_PutResourcePolicyCommand, se_PutResourcePolicyCommand } from "../protocols/Aws_json1_1"; 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 a5e5ffe6058d..d9059f93e2c2 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/Rpcv2cbor"; +import { de_PutSecretValueCommand, se_PutSecretValueCommand } from "../protocols/Aws_json1_1"; 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 79657071f430..362c46ab9be4 100644 --- a/clients/client-secrets-manager/src/commands/RemoveRegionsFromReplicationCommand.ts +++ b/clients/client-secrets-manager/src/commands/RemoveRegionsFromReplicationCommand.ts @@ -6,7 +6,10 @@ 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/Rpcv2cbor"; +import { + de_RemoveRegionsFromReplicationCommand, + se_RemoveRegionsFromReplicationCommand, +} from "../protocols/Aws_json1_1"; 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 eddcfecae9f1..894abcdd14a9 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/Rpcv2cbor"; +import { de_ReplicateSecretToRegionsCommand, se_ReplicateSecretToRegionsCommand } from "../protocols/Aws_json1_1"; 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 5e20a493021d..89a0e56ad8cf 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/Rpcv2cbor"; +import { de_RestoreSecretCommand, se_RestoreSecretCommand } from "../protocols/Aws_json1_1"; 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 4bab3a4ce12c..7f4c8579a0df 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/Rpcv2cbor"; +import { de_RotateSecretCommand, se_RotateSecretCommand } from "../protocols/Aws_json1_1"; 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 510f09881806..3747a40b23a8 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/Rpcv2cbor"; +import { de_StopReplicationToReplicaCommand, se_StopReplicationToReplicaCommand } from "../protocols/Aws_json1_1"; 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 10b48c2edff1..b0f037e00892 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/Rpcv2cbor"; +import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Aws_json1_1"; 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 4f19807112c9..6b4b5f19c892 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/Rpcv2cbor"; +import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Aws_json1_1"; 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 257d70e20072..7e63a8d2ccd2 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/Rpcv2cbor"; +import { de_UpdateSecretCommand, se_UpdateSecretCommand } from "../protocols/Aws_json1_1"; 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 71e111a4446a..be4964380b9e 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/Rpcv2cbor"; +import { de_UpdateSecretVersionStageCommand, se_UpdateSecretVersionStageCommand } from "../protocols/Aws_json1_1"; 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 efd22e9b7925..8faebe3dfbdf 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/Rpcv2cbor"; +import { de_ValidateResourcePolicyCommand, se_ValidateResourcePolicyCommand } from "../protocols/Aws_json1_1"; 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/Aws_json1_1.ts new file mode 100644 index 000000000000..12b420eeeb8b --- /dev/null +++ b/clients/client-secrets-manager/src/protocols/Aws_json1_1.ts @@ -0,0 +1,1589 @@ +// smithy-typescript generated code +import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { + _json, + collectBody, + decorateServiceException as __decorateServiceException, + expectBoolean as __expectBoolean, + expectNonNull as __expectNonNull, + expectNumber as __expectNumber, + expectString as __expectString, + parseEpochTimestamp as __parseEpochTimestamp, + take, + withBaseException, +} from "@smithy/smithy-client"; +import { + Endpoint as __Endpoint, + HeaderBag as __HeaderBag, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, +} from "@smithy/types"; +import { v4 as generateIdempotencyToken } from "uuid"; + +import { + BatchGetSecretValueCommandInput, + BatchGetSecretValueCommandOutput, +} from "../commands/BatchGetSecretValueCommand"; +import { CancelRotateSecretCommandInput, CancelRotateSecretCommandOutput } from "../commands/CancelRotateSecretCommand"; +import { CreateSecretCommandInput, CreateSecretCommandOutput } from "../commands/CreateSecretCommand"; +import { + DeleteResourcePolicyCommandInput, + DeleteResourcePolicyCommandOutput, +} from "../commands/DeleteResourcePolicyCommand"; +import { DeleteSecretCommandInput, DeleteSecretCommandOutput } from "../commands/DeleteSecretCommand"; +import { DescribeSecretCommandInput, DescribeSecretCommandOutput } from "../commands/DescribeSecretCommand"; +import { GetRandomPasswordCommandInput, GetRandomPasswordCommandOutput } from "../commands/GetRandomPasswordCommand"; +import { GetResourcePolicyCommandInput, GetResourcePolicyCommandOutput } from "../commands/GetResourcePolicyCommand"; +import { GetSecretValueCommandInput, GetSecretValueCommandOutput } from "../commands/GetSecretValueCommand"; +import { ListSecretsCommandInput, ListSecretsCommandOutput } from "../commands/ListSecretsCommand"; +import { + ListSecretVersionIdsCommandInput, + ListSecretVersionIdsCommandOutput, +} from "../commands/ListSecretVersionIdsCommand"; +import { PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput } from "../commands/PutResourcePolicyCommand"; +import { PutSecretValueCommandInput, PutSecretValueCommandOutput } from "../commands/PutSecretValueCommand"; +import { + RemoveRegionsFromReplicationCommandInput, + RemoveRegionsFromReplicationCommandOutput, +} from "../commands/RemoveRegionsFromReplicationCommand"; +import { + ReplicateSecretToRegionsCommandInput, + ReplicateSecretToRegionsCommandOutput, +} from "../commands/ReplicateSecretToRegionsCommand"; +import { RestoreSecretCommandInput, RestoreSecretCommandOutput } from "../commands/RestoreSecretCommand"; +import { RotateSecretCommandInput, RotateSecretCommandOutput } from "../commands/RotateSecretCommand"; +import { + StopReplicationToReplicaCommandInput, + StopReplicationToReplicaCommandOutput, +} from "../commands/StopReplicationToReplicaCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; +import { UpdateSecretCommandInput, UpdateSecretCommandOutput } from "../commands/UpdateSecretCommand"; +import { + UpdateSecretVersionStageCommandInput, + UpdateSecretVersionStageCommandOutput, +} from "../commands/UpdateSecretVersionStageCommand"; +import { + ValidateResourcePolicyCommandInput, + ValidateResourcePolicyCommandOutput, +} from "../commands/ValidateResourcePolicyCommand"; +import { + BatchGetSecretValueRequest, + BatchGetSecretValueResponse, + CancelRotateSecretRequest, + CreateSecretRequest, + CreateSecretResponse, + DecryptionFailure, + DeleteResourcePolicyRequest, + DeleteSecretRequest, + DeleteSecretResponse, + DescribeSecretRequest, + DescribeSecretResponse, + EncryptionFailure, + Filter, + GetRandomPasswordRequest, + GetResourcePolicyRequest, + GetSecretValueRequest, + GetSecretValueResponse, + InternalServiceError, + InvalidNextTokenException, + InvalidParameterException, + InvalidRequestException, + LimitExceededException, + ListSecretsRequest, + ListSecretsResponse, + ListSecretVersionIdsRequest, + ListSecretVersionIdsResponse, + MalformedPolicyDocumentException, + PreconditionNotMetException, + PublicPolicyException, + PutResourcePolicyRequest, + PutSecretValueRequest, + RemoveRegionsFromReplicationRequest, + RemoveRegionsFromReplicationResponse, + ReplicaRegionType, + ReplicateSecretToRegionsRequest, + ReplicateSecretToRegionsResponse, + ReplicationStatusType, + ResourceExistsException, + ResourceNotFoundException, + RestoreSecretRequest, + RotateSecretRequest, + RotationRulesType, + SecretListEntry, + SecretValueEntry, + SecretVersionsListEntry, + StopReplicationToReplicaRequest, + Tag, + TagResourceRequest, + UntagResourceRequest, + UpdateSecretRequest, + UpdateSecretVersionStageRequest, + ValidateResourcePolicyRequest, +} from "../models/models_0"; +import { SecretsManagerServiceException as __BaseException } from "../models/SecretsManagerServiceException"; + +/** + * serializeAws_json1_1BatchGetSecretValueCommand + */ +export const se_BatchGetSecretValueCommand = async ( + input: BatchGetSecretValueCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("BatchGetSecretValue"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1CancelRotateSecretCommand + */ +export const se_CancelRotateSecretCommand = async ( + input: CancelRotateSecretCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("CancelRotateSecret"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1CreateSecretCommand + */ +export const se_CreateSecretCommand = async ( + input: CreateSecretCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("CreateSecret"); + let body: any; + body = JSON.stringify(se_CreateSecretRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1DeleteResourcePolicyCommand + */ +export const se_DeleteResourcePolicyCommand = async ( + input: DeleteResourcePolicyCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DeleteResourcePolicy"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1DeleteSecretCommand + */ +export const se_DeleteSecretCommand = async ( + input: DeleteSecretCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DeleteSecret"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1DescribeSecretCommand + */ +export const se_DescribeSecretCommand = async ( + input: DescribeSecretCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DescribeSecret"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1GetRandomPasswordCommand + */ +export const se_GetRandomPasswordCommand = async ( + input: GetRandomPasswordCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("GetRandomPassword"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1GetResourcePolicyCommand + */ +export const se_GetResourcePolicyCommand = async ( + input: GetResourcePolicyCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("GetResourcePolicy"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1GetSecretValueCommand + */ +export const se_GetSecretValueCommand = async ( + input: GetSecretValueCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("GetSecretValue"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1ListSecretsCommand + */ +export const se_ListSecretsCommand = async ( + input: ListSecretsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListSecrets"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1ListSecretVersionIdsCommand + */ +export const se_ListSecretVersionIdsCommand = async ( + input: ListSecretVersionIdsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListSecretVersionIds"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1PutResourcePolicyCommand + */ +export const se_PutResourcePolicyCommand = async ( + input: PutResourcePolicyCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("PutResourcePolicy"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1PutSecretValueCommand + */ +export const se_PutSecretValueCommand = async ( + input: PutSecretValueCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("PutSecretValue"); + let body: any; + body = JSON.stringify(se_PutSecretValueRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1RemoveRegionsFromReplicationCommand + */ +export const se_RemoveRegionsFromReplicationCommand = async ( + input: RemoveRegionsFromReplicationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("RemoveRegionsFromReplication"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1ReplicateSecretToRegionsCommand + */ +export const se_ReplicateSecretToRegionsCommand = async ( + input: ReplicateSecretToRegionsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ReplicateSecretToRegions"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1RestoreSecretCommand + */ +export const se_RestoreSecretCommand = async ( + input: RestoreSecretCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("RestoreSecret"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1RotateSecretCommand + */ +export const se_RotateSecretCommand = async ( + input: RotateSecretCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("RotateSecret"); + let body: any; + body = JSON.stringify(se_RotateSecretRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1StopReplicationToReplicaCommand + */ +export const se_StopReplicationToReplicaCommand = async ( + input: StopReplicationToReplicaCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("StopReplicationToReplica"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1TagResourceCommand + */ +export const se_TagResourceCommand = async ( + input: TagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("TagResource"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1UntagResourceCommand + */ +export const se_UntagResourceCommand = async ( + input: UntagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("UntagResource"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1UpdateSecretCommand + */ +export const se_UpdateSecretCommand = async ( + input: UpdateSecretCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("UpdateSecret"); + let body: any; + body = JSON.stringify(se_UpdateSecretRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1UpdateSecretVersionStageCommand + */ +export const se_UpdateSecretVersionStageCommand = async ( + input: UpdateSecretVersionStageCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("UpdateSecretVersionStage"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1ValidateResourcePolicyCommand + */ +export const se_ValidateResourcePolicyCommand = async ( + input: ValidateResourcePolicyCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ValidateResourcePolicy"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * deserializeAws_json1_1BatchGetSecretValueCommand + */ +export const de_BatchGetSecretValueCommand = 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_BatchGetSecretValueResponse(data, context); + const response: BatchGetSecretValueCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1CancelRotateSecretCommand + */ +export const de_CancelRotateSecretCommand = 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: CancelRotateSecretCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1CreateSecretCommand + */ +export const de_CreateSecretCommand = 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_CreateSecretResponse(data, context); + const response: CreateSecretCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1DeleteResourcePolicyCommand + */ +export const de_DeleteResourcePolicyCommand = 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: DeleteResourcePolicyCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1DeleteSecretCommand + */ +export const de_DeleteSecretCommand = 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_DeleteSecretResponse(data, context); + const response: DeleteSecretCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1DescribeSecretCommand + */ +export const de_DescribeSecretCommand = 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_DescribeSecretResponse(data, context); + const response: DescribeSecretCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1GetRandomPasswordCommand + */ +export const de_GetRandomPasswordCommand = 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: GetRandomPasswordCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1GetResourcePolicyCommand + */ +export const de_GetResourcePolicyCommand = 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: GetResourcePolicyCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1GetSecretValueCommand + */ +export const de_GetSecretValueCommand = 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_GetSecretValueResponse(data, context); + const response: GetSecretValueCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1ListSecretsCommand + */ +export const de_ListSecretsCommand = 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_ListSecretsResponse(data, context); + const response: ListSecretsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1ListSecretVersionIdsCommand + */ +export const de_ListSecretVersionIdsCommand = 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_ListSecretVersionIdsResponse(data, context); + const response: ListSecretVersionIdsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1PutResourcePolicyCommand + */ +export const de_PutResourcePolicyCommand = 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: PutResourcePolicyCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1PutSecretValueCommand + */ +export const de_PutSecretValueCommand = 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: PutSecretValueCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1RemoveRegionsFromReplicationCommand + */ +export const de_RemoveRegionsFromReplicationCommand = 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_RemoveRegionsFromReplicationResponse(data, context); + const response: RemoveRegionsFromReplicationCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1ReplicateSecretToRegionsCommand + */ +export const de_ReplicateSecretToRegionsCommand = 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_ReplicateSecretToRegionsResponse(data, context); + const response: ReplicateSecretToRegionsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1RestoreSecretCommand + */ +export const de_RestoreSecretCommand = 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: RestoreSecretCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1RotateSecretCommand + */ +export const de_RotateSecretCommand = 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: RotateSecretCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1StopReplicationToReplicaCommand + */ +export const de_StopReplicationToReplicaCommand = 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: StopReplicationToReplicaCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1TagResourceCommand + */ +export const de_TagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await collectBody(output.body, context); + const response: TagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_json1_1UntagResourceCommand + */ +export const de_UntagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await collectBody(output.body, context); + const response: UntagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_json1_1UpdateSecretCommand + */ +export const de_UpdateSecretCommand = 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: UpdateSecretCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1UpdateSecretVersionStageCommand + */ +export const de_UpdateSecretVersionStageCommand = 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: UpdateSecretVersionStageCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1ValidateResourcePolicyCommand + */ +export const de_ValidateResourcePolicyCommand = 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: ValidateResourcePolicyCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserialize_Aws_json1_1CommandError + */ +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); + switch (errorCode) { + case "DecryptionFailure": + case "com.amazonaws.secretsmanager#DecryptionFailure": + throw await de_DecryptionFailureRes(parsedOutput, context); + case "InternalServiceError": + case "com.amazonaws.secretsmanager#InternalServiceError": + throw await de_InternalServiceErrorRes(parsedOutput, context); + case "InvalidNextTokenException": + case "com.amazonaws.secretsmanager#InvalidNextTokenException": + throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); + case "InvalidParameterException": + case "com.amazonaws.secretsmanager#InvalidParameterException": + throw await de_InvalidParameterExceptionRes(parsedOutput, context); + case "InvalidRequestException": + case "com.amazonaws.secretsmanager#InvalidRequestException": + throw await de_InvalidRequestExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.secretsmanager#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "EncryptionFailure": + case "com.amazonaws.secretsmanager#EncryptionFailure": + throw await de_EncryptionFailureRes(parsedOutput, context); + case "LimitExceededException": + case "com.amazonaws.secretsmanager#LimitExceededException": + throw await de_LimitExceededExceptionRes(parsedOutput, context); + case "MalformedPolicyDocumentException": + case "com.amazonaws.secretsmanager#MalformedPolicyDocumentException": + throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context); + case "PreconditionNotMetException": + case "com.amazonaws.secretsmanager#PreconditionNotMetException": + throw await de_PreconditionNotMetExceptionRes(parsedOutput, context); + case "ResourceExistsException": + case "com.amazonaws.secretsmanager#ResourceExistsException": + throw await de_ResourceExistsExceptionRes(parsedOutput, context); + case "PublicPolicyException": + case "com.amazonaws.secretsmanager#PublicPolicyException": + throw await de_PublicPolicyExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }) as never; + } +}; + +/** + * deserializeAws_json1_1DecryptionFailureRes + */ +const de_DecryptionFailureRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new DecryptionFailure({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_1EncryptionFailureRes + */ +const de_EncryptionFailureRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new EncryptionFailure({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_1InternalServiceErrorRes + */ +const de_InternalServiceErrorRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new InternalServiceError({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_1InvalidNextTokenExceptionRes + */ +const de_InvalidNextTokenExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new InvalidNextTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_1InvalidParameterExceptionRes + */ +const de_InvalidParameterExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new InvalidParameterException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_1InvalidRequestExceptionRes + */ +const de_InvalidRequestExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new InvalidRequestException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_1LimitExceededExceptionRes + */ +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); +}; + +/** + * deserializeAws_json1_1MalformedPolicyDocumentExceptionRes + */ +const de_MalformedPolicyDocumentExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new MalformedPolicyDocumentException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_1PreconditionNotMetExceptionRes + */ +const de_PreconditionNotMetExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new PreconditionNotMetException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_1PublicPolicyExceptionRes + */ +const de_PublicPolicyExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new PublicPolicyException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_1ResourceExistsExceptionRes + */ +const de_ResourceExistsExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new ResourceExistsException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_1ResourceNotFoundExceptionRes + */ +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_AddReplicaRegionListType omitted. + +// se_BatchGetSecretValueRequest omitted. + +// se_CancelRotateSecretRequest omitted. + +/** + * serializeAws_json1_1CreateSecretRequest + */ +const se_CreateSecretRequest = (input: CreateSecretRequest, context: __SerdeContext): any => { + return take(input, { + AddReplicaRegions: _json, + ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()], + Description: [], + ForceOverwriteReplicaSecret: [], + KmsKeyId: [], + Name: [], + SecretBinary: context.base64Encoder, + SecretString: [], + Tags: _json, + }); +}; + +// se_DeleteResourcePolicyRequest omitted. + +// se_DeleteSecretRequest omitted. + +// se_DescribeSecretRequest omitted. + +// se_Filter omitted. + +// se_FiltersListType omitted. + +// se_FilterValuesStringList omitted. + +// se_GetRandomPasswordRequest omitted. + +// se_GetResourcePolicyRequest omitted. + +// se_GetSecretValueRequest omitted. + +// se_ListSecretsRequest omitted. + +// se_ListSecretVersionIdsRequest omitted. + +// se_PutResourcePolicyRequest omitted. + +/** + * serializeAws_json1_1PutSecretValueRequest + */ +const se_PutSecretValueRequest = (input: PutSecretValueRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()], + RotationToken: [], + SecretBinary: context.base64Encoder, + SecretId: [], + SecretString: [], + VersionStages: _json, + }); +}; + +// se_RemoveRegionsFromReplicationRequest omitted. + +// se_RemoveReplicaRegionListType omitted. + +// se_ReplicaRegionType omitted. + +// se_ReplicateSecretToRegionsRequest omitted. + +// se_RestoreSecretRequest omitted. + +/** + * serializeAws_json1_1RotateSecretRequest + */ +const se_RotateSecretRequest = (input: RotateSecretRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()], + RotateImmediately: [], + RotationLambdaARN: [], + RotationRules: _json, + SecretId: [], + }); +}; + +// se_RotationRulesType omitted. + +// se_SecretIdListType omitted. + +// se_SecretVersionStagesType omitted. + +// se_StopReplicationToReplicaRequest omitted. + +// se_Tag omitted. + +// se_TagKeyListType omitted. + +// se_TagListType omitted. + +// se_TagResourceRequest omitted. + +// se_UntagResourceRequest omitted. + +/** + * serializeAws_json1_1UpdateSecretRequest + */ +const se_UpdateSecretRequest = (input: UpdateSecretRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()], + Description: [], + KmsKeyId: [], + SecretBinary: context.base64Encoder, + SecretId: [], + SecretString: [], + }); +}; + +// se_UpdateSecretVersionStageRequest omitted. + +// se_ValidateResourcePolicyRequest omitted. + +// de_APIErrorListType omitted. + +// de_APIErrorType omitted. + +/** + * deserializeAws_json1_1BatchGetSecretValueResponse + */ +const de_BatchGetSecretValueResponse = (output: any, context: __SerdeContext): BatchGetSecretValueResponse => { + return take(output, { + Errors: _json, + NextToken: __expectString, + SecretValues: (_: any) => de_SecretValuesType(_, context), + }) as any; +}; + +// de_CancelRotateSecretResponse omitted. + +/** + * deserializeAws_json1_1CreateSecretResponse + */ +const de_CreateSecretResponse = (output: any, context: __SerdeContext): CreateSecretResponse => { + return take(output, { + ARN: __expectString, + Name: __expectString, + ReplicationStatus: (_: any) => de_ReplicationStatusListType(_, context), + VersionId: __expectString, + }) as any; +}; + +// de_DecryptionFailure omitted. + +// de_DeleteResourcePolicyResponse omitted. + +/** + * deserializeAws_json1_1DeleteSecretResponse + */ +const de_DeleteSecretResponse = (output: any, context: __SerdeContext): DeleteSecretResponse => { + return take(output, { + ARN: __expectString, + DeletionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + }) as any; +}; + +/** + * deserializeAws_json1_1DescribeSecretResponse + */ +const de_DescribeSecretResponse = (output: any, context: __SerdeContext): DescribeSecretResponse => { + return take(output, { + ARN: __expectString, + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + KmsKeyId: __expectString, + LastAccessedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastChangedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastRotatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + NextRotationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OwningService: __expectString, + PrimaryRegion: __expectString, + ReplicationStatus: (_: any) => de_ReplicationStatusListType(_, context), + RotationEnabled: __expectBoolean, + RotationLambdaARN: __expectString, + RotationRules: _json, + Tags: _json, + VersionIdsToStages: _json, + }) as any; +}; + +// de_EncryptionFailure omitted. + +// de_GetRandomPasswordResponse omitted. + +// de_GetResourcePolicyResponse omitted. + +/** + * deserializeAws_json1_1GetSecretValueResponse + */ +const de_GetSecretValueResponse = (output: any, context: __SerdeContext): GetSecretValueResponse => { + return take(output, { + ARN: __expectString, + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + SecretBinary: context.base64Decoder, + SecretString: __expectString, + VersionId: __expectString, + VersionStages: _json, + }) as any; +}; + +// de_InternalServiceError omitted. + +// de_InvalidNextTokenException omitted. + +// de_InvalidParameterException omitted. + +// de_InvalidRequestException omitted. + +// de_KmsKeyIdListType omitted. + +// de_LimitExceededException omitted. + +/** + * deserializeAws_json1_1ListSecretsResponse + */ +const de_ListSecretsResponse = (output: any, context: __SerdeContext): ListSecretsResponse => { + return take(output, { + NextToken: __expectString, + SecretList: (_: any) => de_SecretListType(_, context), + }) as any; +}; + +/** + * deserializeAws_json1_1ListSecretVersionIdsResponse + */ +const de_ListSecretVersionIdsResponse = (output: any, context: __SerdeContext): ListSecretVersionIdsResponse => { + return take(output, { + ARN: __expectString, + Name: __expectString, + NextToken: __expectString, + Versions: (_: any) => de_SecretVersionsListType(_, context), + }) as any; +}; + +// de_MalformedPolicyDocumentException omitted. + +// de_PreconditionNotMetException omitted. + +// de_PublicPolicyException omitted. + +// de_PutResourcePolicyResponse omitted. + +// de_PutSecretValueResponse omitted. + +/** + * deserializeAws_json1_1RemoveRegionsFromReplicationResponse + */ +const de_RemoveRegionsFromReplicationResponse = ( + output: any, + context: __SerdeContext +): RemoveRegionsFromReplicationResponse => { + return take(output, { + ARN: __expectString, + ReplicationStatus: (_: any) => de_ReplicationStatusListType(_, context), + }) as any; +}; + +/** + * deserializeAws_json1_1ReplicateSecretToRegionsResponse + */ +const de_ReplicateSecretToRegionsResponse = ( + output: any, + context: __SerdeContext +): ReplicateSecretToRegionsResponse => { + return take(output, { + ARN: __expectString, + ReplicationStatus: (_: any) => de_ReplicationStatusListType(_, context), + }) as any; +}; + +/** + * deserializeAws_json1_1ReplicationStatusListType + */ +const de_ReplicationStatusListType = (output: any, context: __SerdeContext): ReplicationStatusType[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ReplicationStatusType(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_json1_1ReplicationStatusType + */ +const de_ReplicationStatusType = (output: any, context: __SerdeContext): ReplicationStatusType => { + return take(output, { + KmsKeyId: __expectString, + LastAccessedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Region: __expectString, + Status: __expectString, + StatusMessage: __expectString, + }) as any; +}; + +// de_ResourceExistsException omitted. + +// de_ResourceNotFoundException omitted. + +// de_RestoreSecretResponse omitted. + +// de_RotateSecretResponse omitted. + +// de_RotationRulesType omitted. + +/** + * deserializeAws_json1_1SecretListEntry + */ +const de_SecretListEntry = (output: any, context: __SerdeContext): SecretListEntry => { + return take(output, { + ARN: __expectString, + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + KmsKeyId: __expectString, + LastAccessedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastChangedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastRotatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + NextRotationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OwningService: __expectString, + PrimaryRegion: __expectString, + RotationEnabled: __expectBoolean, + RotationLambdaARN: __expectString, + RotationRules: _json, + SecretVersionsToStages: _json, + Tags: _json, + }) as any; +}; + +/** + * deserializeAws_json1_1SecretListType + */ +const de_SecretListType = (output: any, context: __SerdeContext): SecretListEntry[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_SecretListEntry(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_json1_1SecretValueEntry + */ +const de_SecretValueEntry = (output: any, context: __SerdeContext): SecretValueEntry => { + return take(output, { + ARN: __expectString, + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + SecretBinary: context.base64Decoder, + SecretString: __expectString, + VersionId: __expectString, + VersionStages: _json, + }) as any; +}; + +/** + * deserializeAws_json1_1SecretValuesType + */ +const de_SecretValuesType = (output: any, context: __SerdeContext): SecretValueEntry[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_SecretValueEntry(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_json1_1SecretVersionsListEntry + */ +const de_SecretVersionsListEntry = (output: any, context: __SerdeContext): SecretVersionsListEntry => { + return take(output, { + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + KmsKeyIds: _json, + LastAccessedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VersionId: __expectString, + VersionStages: _json, + }) as any; +}; + +/** + * deserializeAws_json1_1SecretVersionsListType + */ +const de_SecretVersionsListType = (output: any, context: __SerdeContext): SecretVersionsListEntry[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_SecretVersionsListEntry(entry, context); + }); + return retVal; +}; + +// de_SecretVersionStagesType omitted. + +// de_SecretVersionsToStagesMapType omitted. + +// de_StopReplicationToReplicaResponse omitted. + +// de_Tag omitted. + +// de_TagListType omitted. + +// de_UpdateSecretResponse omitted. + +// de_UpdateSecretVersionStageResponse omitted. + +// de_ValidateResourcePolicyResponse omitted. + +// de_ValidationErrorsEntry omitted. + +// de_ValidationErrorsType 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"], +}); + +// 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); +}; +function sharedHeaders(operation: string): __HeaderBag { + return { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": `secretsmanager.${operation}`, + }; +} diff --git a/codegen/sdk-codegen/aws-models/cloudwatch.json b/codegen/sdk-codegen/aws-models/cloudwatch.json index d176387fd20d..bec6629e39d3 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" }, - "smithy.protocols#rpcv2Cbor": {}, + "aws.protocols#awsQuery": {}, "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/dynamodb.json b/codegen/sdk-codegen/aws-models/dynamodb.json index e1eeca734bc0..580b7d6197ff 100644 --- a/codegen/sdk-codegen/aws-models/dynamodb.json +++ b/codegen/sdk-codegen/aws-models/dynamodb.json @@ -3839,7 +3839,7 @@ "aws.auth#sigv4": { "name": "dynamodb" }, - "smithy.protocols#rpcv2Cbor": {}, + "aws.protocols#awsJson1_0": {}, "smithy.api#documentation": "Amazon DynamoDB\n

Amazon DynamoDB is a fully managed NoSQL database service that provides fast\n and predictable performance with seamless scalability. DynamoDB lets you\n offload the administrative burdens of operating and scaling a distributed database, so\n that you don't have to worry about hardware provisioning, setup and configuration,\n replication, software patching, or cluster scaling.

\n

With DynamoDB, you can create database tables that can store and retrieve\n any amount of data, and serve any level of request traffic. You can scale up or scale\n down your tables' throughput capacity without downtime or performance degradation, and\n use the Amazon Web Services Management Console to monitor resource utilization and performance\n metrics.

\n

DynamoDB automatically spreads the data and traffic for your tables over\n a sufficient number of servers to handle your throughput and storage requirements, while\n maintaining consistent and fast performance. All of your data is stored on solid state\n disks (SSDs) and automatically replicated across multiple Availability Zones in an\n Amazon Web Services Region, providing built-in high availability and data\n durability.

", "smithy.api#suppress": ["RuleSetAwsBuiltIn.AWS::Auth::AccountId"], "smithy.api#title": "Amazon DynamoDB", diff --git a/codegen/sdk-codegen/aws-models/secrets-manager.json b/codegen/sdk-codegen/aws-models/secrets-manager.json index e3cba9cd8aea..f4cba1801823 100644 --- a/codegen/sdk-codegen/aws-models/secrets-manager.json +++ b/codegen/sdk-codegen/aws-models/secrets-manager.json @@ -3613,7 +3613,7 @@ "aws.auth#sigv4": { "name": "secretsmanager" }, - "smithy.protocols#rpcv2Cbor": {}, + "aws.protocols#awsJson1_1": {}, "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": { diff --git a/package.json b/package.json index 8e2a89fa00f1..04256adf7fa6 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "test:integration": "jest --config jest.config.integ.js --passWithNoTests", "test:integration:legacy": "yarn test:e2e:legacy", "test:integration:legacy:since:release": "yarn test:e2e:legacy:since:release", - "test:protocols": "yarn build:protocols && lerna run test --scope '@aws-sdk/aws-protocoltests-*'", + "test:protocols": "yarn build:protocols && lerna run test --scope '{@aws-sdk/smithy-rpcv2-cbor,@aws-sdk/aws-protocoltests-}*'", "test:server-protocols": "yarn build:server-protocols && lerna run test --scope '@aws-sdk/*-server'", "test:size": "cd scripts/benchmark-size/runner && yarn && ts-node ./cli.ts", "test:unit": "jest --config jest.config.js", diff --git a/private/aws-echo-service/package.json b/private/aws-echo-service/package.json index 70413032c3dc..6114fb5975d8 100644 --- a/private/aws-echo-service/package.json +++ b/private/aws-echo-service/package.json @@ -27,6 +27,7 @@ "@aws-sdk/types": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", +<<<<<<< HEAD "@smithy/config-resolver": "^3.0.5", "@smithy/core": "^2.2.7", "@smithy/fetch-http-handler": "^3.2.2", @@ -48,6 +49,29 @@ "@smithy/util-defaults-mode-browser": "^3.0.10", "@smithy/util-defaults-mode-node": "^3.0.10", "@smithy/util-retry": "^3.0.3", +======= + "@smithy/config-resolver": "^3.0.3", + "@smithy/core": "^2.2.3", + "@smithy/fetch-http-handler": "^3.1.0", + "@smithy/hash-node": "^3.0.2", + "@smithy/invalid-dependency": "^3.0.2", + "@smithy/middleware-content-length": "^3.0.2", + "@smithy/middleware-retry": "^3.0.6", + "@smithy/middleware-serde": "^3.0.2", + "@smithy/middleware-stack": "^3.0.2", + "@smithy/node-config-provider": "^3.1.2", + "@smithy/node-http-handler": "^3.1.0", + "@smithy/protocol-http": "^4.0.2", + "@smithy/smithy-client": "^3.1.4", + "@smithy/types": "^3.2.0", + "@smithy/url-parser": "^3.0.2", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.6", + "@smithy/util-defaults-mode-node": "^3.0.6", + "@smithy/util-retry": "^3.0.2", +>>>>>>> a4f579b8985 (test(cbor): protocol tests using cbor branch) "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2", "uuid": "^9.0.1" diff --git a/private/aws-protocoltests-ec2/package.json b/private/aws-protocoltests-ec2/package.json index 1cef0ab971c9..b663b5b1236a 100644 --- a/private/aws-protocoltests-ec2/package.json +++ b/private/aws-protocoltests-ec2/package.json @@ -31,6 +31,7 @@ "@aws-sdk/types": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", +<<<<<<< HEAD "@smithy/config-resolver": "^3.0.5", "@smithy/core": "^2.2.7", "@smithy/fetch-http-handler": "^3.2.2", @@ -54,6 +55,31 @@ "@smithy/util-defaults-mode-node": "^3.0.10", "@smithy/util-middleware": "^3.0.3", "@smithy/util-retry": "^3.0.3", +======= + "@smithy/config-resolver": "^3.0.3", + "@smithy/core": "^2.2.3", + "@smithy/fetch-http-handler": "^3.1.0", + "@smithy/hash-node": "^3.0.2", + "@smithy/invalid-dependency": "^3.0.2", + "@smithy/middleware-compression": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.2", + "@smithy/middleware-retry": "^3.0.6", + "@smithy/middleware-serde": "^3.0.2", + "@smithy/middleware-stack": "^3.0.2", + "@smithy/node-config-provider": "^3.1.2", + "@smithy/node-http-handler": "^3.1.0", + "@smithy/protocol-http": "^4.0.2", + "@smithy/smithy-client": "^3.1.4", + "@smithy/types": "^3.2.0", + "@smithy/url-parser": "^3.0.2", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.6", + "@smithy/util-defaults-mode-node": "^3.0.6", + "@smithy/util-middleware": "^3.0.2", + "@smithy/util-retry": "^3.0.2", +>>>>>>> a4f579b8985 (test(cbor): protocol tests using cbor branch) "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2", "uuid": "^9.0.1" diff --git a/private/aws-protocoltests-ec2/test/functional/ec2query.spec.ts b/private/aws-protocoltests-ec2/test/functional/ec2query.spec.ts index dac146f09dc7..c1f827c21b0f 100644 --- a/private/aws-protocoltests-ec2/test/functional/ec2query.spec.ts +++ b/private/aws-protocoltests-ec2/test/functional/ec2query.spec.ts @@ -1,7 +1,7 @@ // smithy-typescript generated code import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; import { Encoder as __Encoder } from "@smithy/types"; -import { HeaderBag, HttpHandlerOptions } from "@smithy/types"; +import { Endpoint, HeaderBag, HttpHandlerOptions } from "@smithy/types"; import { Readable } from "stream"; import { DatetimeOffsetsCommand } from "../../src/commands/DatetimeOffsetsCommand"; @@ -48,7 +48,9 @@ class RequestSerializationTestHandler implements HttpHandler { handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { return Promise.reject(new EXPECTED_REQUEST_SERIALIZATION_ERROR(request)); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -61,9 +63,10 @@ class ResponseDeserializationTestHandler implements HttpHandler { isSuccess: boolean; code: number; headers: HeaderBag; - body: String; + body: string | Uint8Array; + isBase64Body: boolean; - constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: String) { + constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: string) { this.isSuccess = isSuccess; this.code = code; if (headers === undefined) { @@ -75,6 +78,7 @@ class ResponseDeserializationTestHandler implements HttpHandler { body = ""; } this.body = body; + this.isBase64Body = String(body).length > 0 && Buffer.from(String(body), "base64").toString("base64") === body; } handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { @@ -82,11 +86,13 @@ class ResponseDeserializationTestHandler implements HttpHandler { response: new HttpResponse({ statusCode: this.code, headers: this.headers, - body: Readable.from([this.body]), + body: this.isBase64Body ? toBytes(this.body as string) : Readable.from([this.body]), }), }); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -127,6 +133,11 @@ const compareParts = (expectedParts: comparableParts, generatedParts: comparable * properties that have defined values. */ const equivalentContents = (expected: any, generated: any): boolean => { + if (typeof (global as any).expect === "function") { + expect(normalizeByteArrayType(generated)).toEqual(normalizeByteArrayType(expected)); + return true; + } + const localExpected = expected; // Short circuit on equality. @@ -134,6 +145,10 @@ const equivalentContents = (expected: any, generated: any): boolean => { return true; } + if (typeof expected !== "object") { + return expected === generated; + } + // If a test fails with an issue in the below 6 lines, it's likely // due to an issue in the nestedness or existence of the property // being compared. @@ -165,6 +180,14 @@ const clientParams = { region: "us-west-2", endpoint: "https://localhost/", credentials: { accessKeyId: "key", secretAccessKey: "secret" }, + endpoint: () => { + const url = new URL("https://www.amazon.com/"); + return Promise.resolve({ + ...url, + path: url.pathname, + ...(url.port ? { port: Number(url.port) } : {}), + }) as Promise; + }, }; /** @@ -175,6 +198,37 @@ const fail = (error?: any): never => { throw new Error(error); }; +/** + * Hexadecimal to byteArray. + */ +const toBytes = (hex: string) => { + return Buffer.from(hex, "base64"); +}; + +function normalizeByteArrayType(data: any) { + // normalize float32 errors + if (typeof data === "number") { + const u = new Uint8Array(4); + const dv = new DataView(u.buffer, u.byteOffset, u.byteLength); + dv.setFloat32(0, data); + return dv.getFloat32(0); + } + if (!data || typeof data !== "object") { + return data; + } + if (data instanceof Uint8Array) { + return Uint8Array.from(data); + } + if (data instanceof String || data instanceof Boolean || data instanceof Number) { + return data.valueOf(); + } + const output = {} as any; + for (const key of Object.getOwnPropertyNames(data)) { + output[key] = normalizeByteArrayType(data[key]); + } + return output; +} + /** * Ensures that clients can correctly parse datetime (timestamps) with offsets */ @@ -213,7 +267,7 @@ it("Ec2QueryDateTimeWithNegativeOffset:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -255,7 +309,7 @@ it("Ec2QueryDateTimeWithPositiveOffset:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -444,7 +498,7 @@ it("Ec2QueryDateTimeWithFractionalSeconds:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -486,7 +540,7 @@ it("Ec2GreetingWithErrors:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -535,7 +589,7 @@ it("Ec2InvalidGreetingError:Error:GreetingWithErrors", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); return; } @@ -584,7 +638,6 @@ it("Ec2ComplexError:Error:GreetingWithErrors", async () => { const paramsToValidate: any = [ { TopLevel: "Top level", - Nested: { Foo: "bar", }, @@ -592,7 +645,7 @@ it("Ec2ComplexError:Error:GreetingWithErrors", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); return; } @@ -669,7 +722,7 @@ it("Ec2IgnoresWrappingXmlName:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -685,9 +738,7 @@ it("Ec2NestedStructures:Request", async () => { const command = new NestedStructuresCommand({ Nested: { StringArg: "foo", - OtherArg: true, - RecursiveArg: { StringArg: "baz", } as any, @@ -828,7 +879,6 @@ it.skip("SDKAppendsGzipAndIgnoresHttpProvidedEncoding_ec2Query:Request", async ( const command = new PutWithContentEncodingCommand({ encoding: "custom", - data: "RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8\nWJO6AcF0DptY9Hk16Bav3z6c5FeBvrGDrxTFVgRUk8SychzjrcqJ4qskwN8rL3zslC0oqobQRnLFOvwJ\nprSzBIwdH2yAuxokXAdVRa1u9NGNRvfWJfKkwbbVz8yV76RUF9KNhAUmwyYDrLnxNj8ROl8B7dv8Gans\n7Bit52wcdiJyjBW1pAodB7zqqVwtBx5RaSpF7kEMXexYXp9N0J1jlXzdeg5Wgg4pO7TJNr2joiPVAiFf\nefwMMCNBkYx2z7cRxVxCJZMXXzxSKMGgdTN24bJ5UgE0TxyV52RC0wGWG49S1x5jGrvmxKCIgYPs0w3Z\n0I3XcdB0WEj4x4xRztB9C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jRvbnfB0SQxxpuqBDJbHNCtW4vM643ZQQBVPP\na7oXSQIq9w2dHp0A7dtkocCZdQp9FKR9XdJAFIbVSHzIF1ZogeZlc0pXuNE0tagvD57xwDRFkAuoQyMu\nYDdZasXrpSmEE5UjHVkyYsISn8QsfXurzDybX468aoRoks654jjmRY5zi1oB8TcMdC2c3sicNaqfeuhd\nH1nPX7l4RpdqWMR7gGx9slXtG8S3KxpOi4qCD7yg3saD66nun4dzksQURoTUdXyrJR5UpHsfIlTF1aJa\nMdXyQtQnrkl00TeghQd00rRFZsCnhi0qrCSKiBfB2EVrd9RPpbgwJGZHuIQecdBmNetc2ylSEClqVBPR\nGOPPIxrnswEZjmnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n", } as any); try { @@ -934,12 +984,10 @@ it("Ec2Lists:Request", async () => { const command = new QueryListsCommand({ ListArg: ["foo", "bar", "baz"], - ComplexListArg: [ { hi: "hello", } as any, - { hi: "hola", } as any, @@ -1126,9 +1174,7 @@ it("Ec2TimestampsInput:Request", async () => { const command = new QueryTimestampsCommand({ normalFormat: new Date(1422172800000), - epochMember: new Date(1422172800000), - epochTarget: new Date(1422172800000), } as any); try { @@ -1202,13 +1248,10 @@ it("Ec2RecursiveShapes:Response", async () => { { nested: { foo: "Foo1", - nested: { bar: "Bar1", - recursiveMember: { foo: "Foo2", - nested: { bar: "Bar2", }, @@ -1219,7 +1262,7 @@ it("Ec2RecursiveShapes:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1234,7 +1277,6 @@ it("Ec2SimpleInputParamsStrings:Request", async () => { const command = new SimpleInputParamsCommand({ Foo: "val1", - Bar: "val2", } as any); try { @@ -1273,7 +1315,6 @@ it("Ec2SimpleInputParamsStringAndBooleanTrue:Request", async () => { const command = new SimpleInputParamsCommand({ Foo: "val1", - Baz: true, } as any); try { @@ -1608,7 +1649,6 @@ it("Ec2QuerySupportsNaNFloatInputs:Request", async () => { const command = new SimpleInputParamsCommand({ FloatValue: NaN, - Boo: NaN, } as any); try { @@ -1647,7 +1687,6 @@ it("Ec2QuerySupportsInfinityFloatInputs:Request", async () => { const command = new SimpleInputParamsCommand({ FloatValue: Infinity, - Boo: Infinity, } as any); try { @@ -1686,7 +1725,6 @@ it("Ec2QuerySupportsNegativeInfinityFloatInputs:Request", async () => { const command = new SimpleInputParamsCommand({ FloatValue: -Infinity, - Boo: -Infinity, } as any); try { @@ -1757,29 +1795,20 @@ it("Ec2SimpleScalarProperties:Response", async () => { const paramsToValidate: any = [ { stringValue: "string", - emptyStringValue: "", - trueBooleanValue: true, - falseBooleanValue: false, - byteValue: 1, - shortValue: 2, - integerValue: 3, - longValue: 4, - floatValue: 5.5, - doubleValue: 6.5, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1817,13 +1846,12 @@ it("Ec2QuerySupportsNaNFloatOutputs:Response", async () => { const paramsToValidate: any = [ { floatValue: NaN, - doubleValue: NaN, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1861,13 +1889,12 @@ it("Ec2QuerySupportsInfinityFloatOutputs:Response", async () => { const paramsToValidate: any = [ { floatValue: Infinity, - doubleValue: Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1905,13 +1932,12 @@ it("Ec2QuerySupportsNegativeInfinityFloatOutputs:Response", async () => { const paramsToValidate: any = [ { floatValue: -Infinity, - doubleValue: -Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1953,7 +1979,7 @@ it("Ec2XmlBlobs:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1995,7 +2021,7 @@ it("Ec2XmlEmptyBlobs:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2037,7 +2063,7 @@ it("Ec2XmlEmptySelfClosedBlobs:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2075,13 +2101,12 @@ it("Ec2XmlEmptyLists:Response", async () => { const paramsToValidate: any = [ { stringList: [], - stringSet: [], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2139,25 +2164,19 @@ it("Ec2XmlEnums:Response", async () => { const paramsToValidate: any = [ { fooEnum1: "Foo", - fooEnum2: "0", - fooEnum3: "1", - fooEnumList: ["Foo", "0"], - fooEnumSet: ["Foo", "0"], - fooEnumMap: { hi: "Foo", - zero: "0", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2215,33 +2234,19 @@ it("Ec2XmlIntEnums:Response", async () => { const paramsToValidate: any = [ { intEnum1: 1, - intEnum2: 2, - intEnum3: 3, - - intEnumList: [ - 1, - - 2, - ], - - intEnumSet: [ - 1, - - 2, - ], - + intEnumList: [1, 2], + intEnumSet: [1, 2], intEnumMap: { a: 1, - b: 2, }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2338,53 +2343,28 @@ it("Ec2XmlLists:Response", async () => { const paramsToValidate: any = [ { stringList: ["foo", "bar"], - stringSet: ["foo", "bar"], - - integerList: [ - 1, - - 2, - ], - + integerList: [1, 2], booleanList: [true, false], - timestampList: [new Date(1398796238 * 1000), new Date(1398796238 * 1000)], - enumList: ["Foo", "0"], - - intEnumList: [ - 1, - - 2, - ], - + intEnumList: [1, 2], nestedStringList: [ ["foo", "bar"], - ["baz", "qux"], ], - renamedListMembers: ["foo", "bar"], - flattenedList: ["hi", "bye"], - flattenedList2: ["yep", "nope"], - flattenedListWithMemberNamespace: ["a", "b"], - flattenedListWithNamespace: ["a", "b"], - structureList: [ { a: "1", - b: "2", }, - { a: "3", - b: "4", }, ], @@ -2392,7 +2372,7 @@ it("Ec2XmlLists:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2437,14 +2417,13 @@ it("Ec2XmlNamespaces:Response", async () => { { nested: { foo: "Foo", - values: ["Bar", "Baz"], }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2486,7 +2465,7 @@ it("Ec2XmlTimestamps:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2528,7 +2507,7 @@ it("Ec2XmlTimestampsWithDateTimeFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2570,7 +2549,7 @@ it("Ec2XmlTimestampsWithDateTimeOnTargetFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2612,7 +2591,7 @@ it("Ec2XmlTimestampsWithEpochSecondsFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2654,7 +2633,7 @@ it("Ec2XmlTimestampsWithEpochSecondsOnTargetFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2696,7 +2675,7 @@ it("Ec2XmlTimestampsWithHttpDateFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2738,7 +2717,7 @@ it("Ec2XmlTimestampsWithHttpDateOnTargetFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); diff --git a/private/aws-protocoltests-json-10/package.json b/private/aws-protocoltests-json-10/package.json index 777f0ea6c5b3..5369d4b4e99b 100644 --- a/private/aws-protocoltests-json-10/package.json +++ b/private/aws-protocoltests-json-10/package.json @@ -31,6 +31,7 @@ "@aws-sdk/types": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", +<<<<<<< HEAD "@smithy/config-resolver": "^3.0.5", "@smithy/core": "^2.2.7", "@smithy/fetch-http-handler": "^3.2.2", @@ -54,6 +55,31 @@ "@smithy/util-defaults-mode-node": "^3.0.10", "@smithy/util-middleware": "^3.0.3", "@smithy/util-retry": "^3.0.3", +======= + "@smithy/config-resolver": "^3.0.3", + "@smithy/core": "^2.2.3", + "@smithy/fetch-http-handler": "^3.1.0", + "@smithy/hash-node": "^3.0.2", + "@smithy/invalid-dependency": "^3.0.2", + "@smithy/middleware-compression": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.2", + "@smithy/middleware-retry": "^3.0.6", + "@smithy/middleware-serde": "^3.0.2", + "@smithy/middleware-stack": "^3.0.2", + "@smithy/node-config-provider": "^3.1.2", + "@smithy/node-http-handler": "^3.1.0", + "@smithy/protocol-http": "^4.0.2", + "@smithy/smithy-client": "^3.1.4", + "@smithy/types": "^3.2.0", + "@smithy/url-parser": "^3.0.2", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.6", + "@smithy/util-defaults-mode-node": "^3.0.6", + "@smithy/util-middleware": "^3.0.2", + "@smithy/util-retry": "^3.0.2", +>>>>>>> a4f579b8985 (test(cbor): protocol tests using cbor branch) "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2", "uuid": "^9.0.1" diff --git a/private/aws-protocoltests-json-10/test/functional/awsjson1_0.spec.ts b/private/aws-protocoltests-json-10/test/functional/awsjson1_0.spec.ts index cc9f8e923453..242f5195a6d9 100644 --- a/private/aws-protocoltests-json-10/test/functional/awsjson1_0.spec.ts +++ b/private/aws-protocoltests-json-10/test/functional/awsjson1_0.spec.ts @@ -1,7 +1,7 @@ // smithy-typescript generated code import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; import { Encoder as __Encoder } from "@smithy/types"; -import { HeaderBag, HttpHandlerOptions } from "@smithy/types"; +import { Endpoint, HeaderBag, HttpHandlerOptions } from "@smithy/types"; import { Readable } from "stream"; import { EmptyInputAndEmptyOutputCommand } from "../../src/commands/EmptyInputAndEmptyOutputCommand"; @@ -36,7 +36,9 @@ class RequestSerializationTestHandler implements HttpHandler { handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { return Promise.reject(new EXPECTED_REQUEST_SERIALIZATION_ERROR(request)); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -49,9 +51,10 @@ class ResponseDeserializationTestHandler implements HttpHandler { isSuccess: boolean; code: number; headers: HeaderBag; - body: String; + body: string | Uint8Array; + isBase64Body: boolean; - constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: String) { + constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: string) { this.isSuccess = isSuccess; this.code = code; if (headers === undefined) { @@ -63,6 +66,7 @@ class ResponseDeserializationTestHandler implements HttpHandler { body = ""; } this.body = body; + this.isBase64Body = String(body).length > 0 && Buffer.from(String(body), "base64").toString("base64") === body; } handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { @@ -70,11 +74,13 @@ class ResponseDeserializationTestHandler implements HttpHandler { response: new HttpResponse({ statusCode: this.code, headers: this.headers, - body: Readable.from([this.body]), + body: this.isBase64Body ? toBytes(this.body as string) : Readable.from([this.body]), }), }); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -115,6 +121,11 @@ const compareParts = (expectedParts: comparableParts, generatedParts: comparable * properties that have defined values. */ const equivalentContents = (expected: any, generated: any): boolean => { + if (typeof (global as any).expect === "function") { + expect(normalizeByteArrayType(generated)).toEqual(normalizeByteArrayType(expected)); + return true; + } + const localExpected = expected; // Short circuit on equality. @@ -122,6 +133,10 @@ const equivalentContents = (expected: any, generated: any): boolean => { return true; } + if (typeof expected !== "object") { + return expected === generated; + } + // If a test fails with an issue in the below 6 lines, it's likely // due to an issue in the nestedness or existence of the property // being compared. @@ -153,6 +168,14 @@ const clientParams = { region: "us-west-2", endpoint: "https://localhost/", credentials: { accessKeyId: "key", secretAccessKey: "secret" }, + endpoint: () => { + const url = new URL("https://www.amazon.com/"); + return Promise.resolve({ + ...url, + path: url.pathname, + ...(url.port ? { port: Number(url.port) } : {}), + }) as Promise; + }, }; /** @@ -163,6 +186,37 @@ const fail = (error?: any): never => { throw new Error(error); }; +/** + * Hexadecimal to byteArray. + */ +const toBytes = (hex: string) => { + return Buffer.from(hex, "base64"); +}; + +function normalizeByteArrayType(data: any) { + // normalize float32 errors + if (typeof data === "number") { + const u = new Uint8Array(4); + const dv = new DataView(u.buffer, u.byteOffset, u.byteLength); + dv.setFloat32(0, data); + return dv.getFloat32(0); + } + if (!data || typeof data !== "object") { + return data; + } + if (data instanceof Uint8Array) { + return Uint8Array.from(data); + } + if (data instanceof String || data instanceof Boolean || data instanceof Number) { + return data.valueOf(); + } + const output = {} as any; + for (const key of Object.getOwnPropertyNames(data)) { + output[key] = normalizeByteArrayType(data[key]); + } + return output; +} + /** * Clients must always send an empty object if input is modeled. */ @@ -342,7 +396,7 @@ it("AwsJson10InvalidGreetingError:Error:GreetingWithErrors", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); return; } @@ -696,7 +750,6 @@ it("AwsJson10ComplexError:Error:GreetingWithErrors", async () => { const paramsToValidate: any = [ { TopLevel: "Top level", - Nested: { Foo: "bar", }, @@ -704,7 +757,7 @@ it("AwsJson10ComplexError:Error:GreetingWithErrors", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); return; } @@ -1144,7 +1197,6 @@ it("AwsJson10SerializeMapUnionValue:Request", async () => { contents: { mapValue: { foo: "bar", - spam: "eggs", } as any, } as any, @@ -1270,7 +1322,7 @@ it("AwsJson10DeserializeStringUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1314,7 +1366,7 @@ it("AwsJson10DeserializeBooleanUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1358,7 +1410,7 @@ it("AwsJson10DeserializeNumberUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1402,7 +1454,7 @@ it("AwsJson10DeserializeBlobUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1446,7 +1498,7 @@ it("AwsJson10DeserializeTimestampUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1490,7 +1542,7 @@ it("AwsJson10DeserializeEnumUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1534,7 +1586,7 @@ it("AwsJson10DeserializeIntEnumUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1578,7 +1630,7 @@ it("AwsJson10DeserializeListUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1621,7 +1673,6 @@ it("AwsJson10DeserializeMapUnionValue:Response", async () => { contents: { mapValue: { foo: "bar", - spam: "eggs", }, }, @@ -1629,7 +1680,7 @@ it("AwsJson10DeserializeMapUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1677,7 +1728,7 @@ it("AwsJson10DeserializeStructureUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1726,7 +1777,7 @@ it("AwsJson10DeserializeIgnoreType:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1783,7 +1834,7 @@ it("AwsJson10DeserializeAllowNulls:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2105,63 +2156,36 @@ it.skip("AwsJson10ClientUsesExplicitlyProvidedMemberValuesOverDefaults:Request", const command = new OperationWithDefaultsCommand({ defaults: { defaultString: "bye", - defaultBoolean: true, - defaultList: ["a"], - defaultDocumentMap: { name: "Jack", }, - defaultDocumentString: "bye", - defaultDocumentBoolean: true, - defaultDocumentList: ["b"], - defaultNullDocument: "notNull", - defaultTimestamp: new Date(1000), - defaultBlob: Uint8Array.from("hi", (c) => c.charCodeAt(0)), - defaultByte: 2, - defaultShort: 2, - defaultInteger: 20, - defaultLong: 200, - defaultFloat: 2.0, - defaultDouble: 2.0, - defaultMap: { name: "Jack", } as any, - defaultEnum: "BAR", - defaultIntEnum: 2, - emptyString: "foo", - falseBoolean: true, - emptyBlob: Uint8Array.from("hi", (c) => c.charCodeAt(0)), - zeroByte: 1, - zeroShort: 1, - zeroInteger: 1, - zeroLong: 1, - zeroFloat: 1.0, - zeroDouble: 1.0, } as any, } as any); @@ -2231,7 +2255,6 @@ it.skip("AwsJson10ClientUsesExplicitlyProvidedValuesInTopLevel:Request", async ( const command = new OperationWithDefaultsCommand({ topLevelDefault: "hi", - otherTopLevelDefault: 0, } as any); try { @@ -2329,63 +2352,37 @@ it.skip("AwsJson10ClientPopulatesDefaultsValuesWhenMissingInResponse:Response", const paramsToValidate: any = [ { defaultString: "hi", - defaultBoolean: true, - defaultList: [], - defaultDocumentMap: {}, - defaultDocumentString: "hi", - defaultDocumentBoolean: true, - defaultDocumentList: [], - defaultTimestamp: new Date(0 * 1000), - defaultBlob: Uint8Array.from("abc", (c) => c.charCodeAt(0)), - defaultByte: 1, - defaultShort: 1, - defaultInteger: 10, - defaultLong: 100, - defaultFloat: 1.0, - defaultDouble: 1.0, - defaultMap: {}, - defaultEnum: "FOO", - defaultIntEnum: 1, - emptyString: "", - falseBoolean: false, - emptyBlob: Uint8Array.from("", (c) => c.charCodeAt(0)), - zeroByte: 0, - zeroShort: 0, - zeroInteger: 0, - zeroLong: 0, - zeroFloat: 0.0, - zeroDouble: 0.0, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2448,69 +2445,42 @@ it.skip("AwsJson10ClientIgnoresDefaultValuesIfMemberValuesArePresentInResponse:R const paramsToValidate: any = [ { defaultString: "bye", - defaultBoolean: false, - defaultList: ["a"], - defaultDocumentMap: { name: "Jack", }, - defaultDocumentString: "bye", - defaultDocumentBoolean: false, - defaultDocumentList: ["b"], - defaultNullDocument: "notNull", - defaultTimestamp: new Date(2 * 1000), - defaultBlob: Uint8Array.from("hi", (c) => c.charCodeAt(0)), - defaultByte: 2, - defaultShort: 2, - defaultInteger: 20, - defaultLong: 200, - defaultFloat: 2.0, - defaultDouble: 2.0, - defaultMap: { name: "Jack", }, - defaultEnum: "BAR", - defaultIntEnum: 2, - emptyString: "foo", - falseBoolean: true, - emptyBlob: Uint8Array.from("hi", (c) => c.charCodeAt(0)), - zeroByte: 1, - zeroShort: 1, - zeroInteger: 1, - zeroLong: 1, - zeroFloat: 1.0, - zeroDouble: 1.0, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2528,37 +2498,27 @@ it.skip("AwsJson10ClientPopulatesNestedDefaultValuesWhenMissing:Request", async dialog: { language: "en", } as any, - dialogList: [ {} as any, - { farewell: {} as any, } as any, - { language: "it", - greeting: "ciao", - farewell: { phrase: "arrivederci", } as any, } as any, ], - dialogMap: { emptyDialog: {} as any, - partialEmptyDialog: { language: "en", - farewell: {} as any, } as any, - nonEmptyDialog: { greeting: "konnichiwa", - farewell: { phrase: "sayonara", } as any, @@ -2696,52 +2656,39 @@ it.skip("AwsJson10ClientPopulatesNestedDefaultsWhenMissingInResponseBody:Respons { dialog: { language: "en", - greeting: "hi", }, - dialogList: [ { greeting: "hi", }, - { greeting: "hi", - farewell: { phrase: "bye", }, }, - { language: "it", - greeting: "ciao", - farewell: { phrase: "arrivederci", }, }, ], - dialogMap: { emptyDialog: { greeting: "hi", }, - partialEmptyDialog: { language: "en", - greeting: "hi", - farewell: { phrase: "bye", }, }, - nonEmptyDialog: { greeting: "konnichiwa", - farewell: { phrase: "sayonara", }, @@ -2751,7 +2698,7 @@ it.skip("AwsJson10ClientPopulatesNestedDefaultsWhenMissingInResponseBody:Respons ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2785,33 +2732,22 @@ it.skip("AwsJson10ClientErrorCorrectsWhenServerFailsToSerializeRequiredValues:Re const paramsToValidate: any = [ { requiredString: "", - requiredBoolean: false, - requiredList: [], - requiredTimestamp: new Date(0 * 1000), - requiredBlob: Uint8Array.from("", (c) => c.charCodeAt(0)), - requiredByte: 0, - requiredShort: 0, - requiredInteger: 0, - requiredLong: 0, - requiredFloat: 0.0, - requiredDouble: 0.0, - requiredMap: {}, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2859,7 +2795,6 @@ it.skip("SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_0:Request", async const command = new PutWithContentEncodingCommand({ encoding: "custom", - data: "RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nM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FYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n", } as any); try { @@ -2891,7 +2826,6 @@ it("AwsJson10SupportsNaNFloatInputs:Request", async () => { const command = new SimpleScalarPropertiesCommand({ floatValue: NaN, - doubleValue: NaN, } as any); try { @@ -2934,7 +2868,6 @@ it("AwsJson10SupportsInfinityFloatInputs:Request", async () => { const command = new SimpleScalarPropertiesCommand({ floatValue: Infinity, - doubleValue: Infinity, } as any); try { @@ -2977,7 +2910,6 @@ it("AwsJson10SupportsNegativeInfinityFloatInputs:Request", async () => { const command = new SimpleScalarPropertiesCommand({ floatValue: -Infinity, - doubleValue: -Infinity, } as any); try { @@ -3042,13 +2974,12 @@ it("AwsJson10SupportsNaNFloatInputs:Response", async () => { const paramsToValidate: any = [ { floatValue: NaN, - doubleValue: NaN, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3085,13 +3016,12 @@ it("AwsJson10SupportsInfinityFloatInputs:Response", async () => { const paramsToValidate: any = [ { floatValue: Infinity, - doubleValue: Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3128,13 +3058,12 @@ it("AwsJson10SupportsNegativeInfinityFloatInputs:Response", async () => { const paramsToValidate: any = [ { floatValue: -Infinity, - doubleValue: -Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); diff --git a/private/aws-protocoltests-json-machinelearning/README.md b/private/aws-protocoltests-json-machinelearning/README.md index 7ca350f4343f..57153e0c9ab1 100644 --- a/private/aws-protocoltests-json-machinelearning/README.md +++ b/private/aws-protocoltests-json-machinelearning/README.md @@ -2425,3 +2425,99 @@ ListObjectsV2 [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/machine-learning/command/ListObjectsV2Command/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/ListObjectsV2CommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/ListObjectsV2CommandOutput/) +
+ +EmptyInputOutput + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/machine-learning/command/EmptyInputOutputCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/EmptyInputOutputCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/EmptyInputOutputCommandOutput/) + +
+
+ +FractionalSeconds + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/machine-learning/command/FractionalSecondsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/FractionalSecondsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/FractionalSecondsCommandOutput/) + +
+
+ +GreetingWithErrors + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/machine-learning/command/GreetingWithErrorsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/GreetingWithErrorsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/GreetingWithErrorsCommandOutput/) + +
+
+ +NoInputOutput + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/machine-learning/command/NoInputOutputCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/NoInputOutputCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/NoInputOutputCommandOutput/) + +
+
+ +OperationWithDefaults + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/machine-learning/command/OperationWithDefaultsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/OperationWithDefaultsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/OperationWithDefaultsCommandOutput/) + +
+
+ +OptionalInputOutput + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/machine-learning/command/OptionalInputOutputCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/OptionalInputOutputCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/OptionalInputOutputCommandOutput/) + +
+
+ +RecursiveShapes + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/machine-learning/command/RecursiveShapesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/RecursiveShapesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/RecursiveShapesCommandOutput/) + +
+
+ +RpcV2CborDenseMaps + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/machine-learning/command/RpcV2CborDenseMapsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/RpcV2CborDenseMapsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/RpcV2CborDenseMapsCommandOutput/) + +
+
+ +RpcV2CborLists + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/machine-learning/command/RpcV2CborListsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/RpcV2CborListsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/RpcV2CborListsCommandOutput/) + +
+
+ +RpcV2CborSparseMaps + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/machine-learning/command/RpcV2CborSparseMapsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/RpcV2CborSparseMapsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/RpcV2CborSparseMapsCommandOutput/) + +
+
+ +SimpleScalarProperties + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/machine-learning/command/SimpleScalarPropertiesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/SimpleScalarPropertiesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/SimpleScalarPropertiesCommandOutput/) + +
+
+ +SparseNullsOperation + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/machine-learning/command/SparseNullsOperationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/SparseNullsOperationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-machine-learning/Interface/SparseNullsOperationCommandOutput/) + +
diff --git a/private/aws-protocoltests-json-machinelearning/package.json b/private/aws-protocoltests-json-machinelearning/package.json index 491a1063d136..87afb2c93da9 100644 --- a/private/aws-protocoltests-json-machinelearning/package.json +++ b/private/aws-protocoltests-json-machinelearning/package.json @@ -32,6 +32,7 @@ "@aws-sdk/types": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", +<<<<<<< HEAD "@smithy/config-resolver": "^3.0.5", "@smithy/core": "^2.2.7", "@smithy/fetch-http-handler": "^3.2.2", @@ -54,6 +55,30 @@ "@smithy/util-defaults-mode-node": "^3.0.10", "@smithy/util-middleware": "^3.0.3", "@smithy/util-retry": "^3.0.3", +======= + "@smithy/config-resolver": "^3.0.3", + "@smithy/core": "^2.2.3", + "@smithy/fetch-http-handler": "^3.1.0", + "@smithy/hash-node": "^3.0.2", + "@smithy/invalid-dependency": "^3.0.2", + "@smithy/middleware-content-length": "^3.0.2", + "@smithy/middleware-retry": "^3.0.6", + "@smithy/middleware-serde": "^3.0.2", + "@smithy/middleware-stack": "^3.0.2", + "@smithy/node-config-provider": "^3.1.2", + "@smithy/node-http-handler": "^3.1.0", + "@smithy/protocol-http": "^4.0.2", + "@smithy/smithy-client": "^3.1.4", + "@smithy/types": "^3.2.0", + "@smithy/url-parser": "^3.0.2", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.6", + "@smithy/util-defaults-mode-node": "^3.0.6", + "@smithy/util-middleware": "^3.0.2", + "@smithy/util-retry": "^3.0.2", +>>>>>>> a4f579b8985 (test(cbor): protocol tests using cbor branch) "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2", "uuid": "^9.0.1" diff --git a/private/aws-protocoltests-json-machinelearning/test/functional/awsjson1_1.spec.ts b/private/aws-protocoltests-json-machinelearning/test/functional/awsjson1_1.spec.ts index c125d7791118..85a81502791f 100644 --- a/private/aws-protocoltests-json-machinelearning/test/functional/awsjson1_1.spec.ts +++ b/private/aws-protocoltests-json-machinelearning/test/functional/awsjson1_1.spec.ts @@ -1,6 +1,6 @@ // smithy-typescript generated code import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; -import { HeaderBag, HttpHandlerOptions } from "@smithy/types"; +import { Endpoint, HeaderBag, HttpHandlerOptions } from "@smithy/types"; import { Readable } from "stream"; import { PredictCommand } from "../../src/commands/PredictCommand"; @@ -23,7 +23,9 @@ class RequestSerializationTestHandler implements HttpHandler { handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { return Promise.reject(new EXPECTED_REQUEST_SERIALIZATION_ERROR(request)); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -36,9 +38,10 @@ class ResponseDeserializationTestHandler implements HttpHandler { isSuccess: boolean; code: number; headers: HeaderBag; - body: String; + body: string | Uint8Array; + isBase64Body: boolean; - constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: String) { + constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: string) { this.isSuccess = isSuccess; this.code = code; if (headers === undefined) { @@ -50,6 +53,7 @@ class ResponseDeserializationTestHandler implements HttpHandler { body = ""; } this.body = body; + this.isBase64Body = String(body).length > 0 && Buffer.from(String(body), "base64").toString("base64") === body; } handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { @@ -57,11 +61,13 @@ class ResponseDeserializationTestHandler implements HttpHandler { response: new HttpResponse({ statusCode: this.code, headers: this.headers, - body: Readable.from([this.body]), + body: this.isBase64Body ? toBytes(this.body as string) : Readable.from([this.body]), }), }); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -102,6 +108,11 @@ const compareParts = (expectedParts: comparableParts, generatedParts: comparable * properties that have defined values. */ const equivalentContents = (expected: any, generated: any): boolean => { + if (typeof (global as any).expect === "function") { + expect(normalizeByteArrayType(generated)).toEqual(normalizeByteArrayType(expected)); + return true; + } + const localExpected = expected; // Short circuit on equality. @@ -109,6 +120,10 @@ const equivalentContents = (expected: any, generated: any): boolean => { return true; } + if (typeof expected !== "object") { + return expected === generated; + } + // If a test fails with an issue in the below 6 lines, it's likely // due to an issue in the nestedness or existence of the property // being compared. @@ -140,6 +155,14 @@ const clientParams = { region: "us-west-2", endpoint: "https://localhost/", credentials: { accessKeyId: "key", secretAccessKey: "secret" }, + endpoint: () => { + const url = new URL("https://www.amazon.com/"); + return Promise.resolve({ + ...url, + path: url.pathname, + ...(url.port ? { port: Number(url.port) } : {}), + }) as Promise; + }, }; /** @@ -150,6 +173,37 @@ const fail = (error?: any): never => { throw new Error(error); }; +/** + * Hexadecimal to byteArray. + */ +const toBytes = (hex: string) => { + return Buffer.from(hex, "base64"); +}; + +function normalizeByteArrayType(data: any) { + // normalize float32 errors + if (typeof data === "number") { + const u = new Uint8Array(4); + const dv = new DataView(u.buffer, u.byteOffset, u.byteLength); + dv.setFloat32(0, data); + return dv.getFloat32(0); + } + if (!data || typeof data !== "object") { + return data; + } + if (data instanceof Uint8Array) { + return Uint8Array.from(data); + } + if (data instanceof String || data instanceof Boolean || data instanceof Number) { + return data.valueOf(); + } + const output = {} as any; + for (const key of Object.getOwnPropertyNames(data)) { + output[key] = normalizeByteArrayType(data[key]); + } + return output; +} + /** * MachineLearning's api makes use of generated endpoints that the * customer is then expected to use for the Predict operation. Having @@ -165,9 +219,7 @@ it("MachinelearningPredictEndpoint:Request", async () => { const command = new PredictCommand({ MLModelId: "foo", - Record: {} as any, - PredictEndpoint: "https://custom.example.com/", } as any); try { diff --git a/private/aws-protocoltests-json/package.json b/private/aws-protocoltests-json/package.json index 0e59316a87f6..aac16942ae07 100644 --- a/private/aws-protocoltests-json/package.json +++ b/private/aws-protocoltests-json/package.json @@ -31,6 +31,7 @@ "@aws-sdk/types": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", +<<<<<<< HEAD "@smithy/config-resolver": "^3.0.5", "@smithy/core": "^2.2.7", "@smithy/fetch-http-handler": "^3.2.2", @@ -54,6 +55,31 @@ "@smithy/util-defaults-mode-node": "^3.0.10", "@smithy/util-middleware": "^3.0.3", "@smithy/util-retry": "^3.0.3", +======= + "@smithy/config-resolver": "^3.0.3", + "@smithy/core": "^2.2.3", + "@smithy/fetch-http-handler": "^3.1.0", + "@smithy/hash-node": "^3.0.2", + "@smithy/invalid-dependency": "^3.0.2", + "@smithy/middleware-compression": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.2", + "@smithy/middleware-retry": "^3.0.6", + "@smithy/middleware-serde": "^3.0.2", + "@smithy/middleware-stack": "^3.0.2", + "@smithy/node-config-provider": "^3.1.2", + "@smithy/node-http-handler": "^3.1.0", + "@smithy/protocol-http": "^4.0.2", + "@smithy/smithy-client": "^3.1.4", + "@smithy/types": "^3.2.0", + "@smithy/url-parser": "^3.0.2", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.6", + "@smithy/util-defaults-mode-node": "^3.0.6", + "@smithy/util-middleware": "^3.0.2", + "@smithy/util-retry": "^3.0.2", +>>>>>>> a4f579b8985 (test(cbor): protocol tests using cbor branch) "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2", "uuid": "^9.0.1" diff --git a/private/aws-protocoltests-json/test/functional/awsjson1_1.spec.ts b/private/aws-protocoltests-json/test/functional/awsjson1_1.spec.ts index 9e076bbfd6a9..e35a35968869 100644 --- a/private/aws-protocoltests-json/test/functional/awsjson1_1.spec.ts +++ b/private/aws-protocoltests-json/test/functional/awsjson1_1.spec.ts @@ -1,7 +1,7 @@ // smithy-typescript generated code import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; import { Encoder as __Encoder } from "@smithy/types"; -import { HeaderBag, HttpHandlerOptions } from "@smithy/types"; +import { Endpoint, HeaderBag, HttpHandlerOptions } from "@smithy/types"; import { Readable } from "stream"; import { DatetimeOffsetsCommand } from "../../src/commands/DatetimeOffsetsCommand"; @@ -39,7 +39,9 @@ class RequestSerializationTestHandler implements HttpHandler { handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { return Promise.reject(new EXPECTED_REQUEST_SERIALIZATION_ERROR(request)); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -52,9 +54,10 @@ class ResponseDeserializationTestHandler implements HttpHandler { isSuccess: boolean; code: number; headers: HeaderBag; - body: String; + body: string | Uint8Array; + isBase64Body: boolean; - constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: String) { + constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: string) { this.isSuccess = isSuccess; this.code = code; if (headers === undefined) { @@ -66,6 +69,7 @@ class ResponseDeserializationTestHandler implements HttpHandler { body = ""; } this.body = body; + this.isBase64Body = String(body).length > 0 && Buffer.from(String(body), "base64").toString("base64") === body; } handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { @@ -73,11 +77,13 @@ class ResponseDeserializationTestHandler implements HttpHandler { response: new HttpResponse({ statusCode: this.code, headers: this.headers, - body: Readable.from([this.body]), + body: this.isBase64Body ? toBytes(this.body as string) : Readable.from([this.body]), }), }); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -118,6 +124,11 @@ const compareParts = (expectedParts: comparableParts, generatedParts: comparable * properties that have defined values. */ const equivalentContents = (expected: any, generated: any): boolean => { + if (typeof (global as any).expect === "function") { + expect(normalizeByteArrayType(generated)).toEqual(normalizeByteArrayType(expected)); + return true; + } + const localExpected = expected; // Short circuit on equality. @@ -125,6 +136,10 @@ const equivalentContents = (expected: any, generated: any): boolean => { return true; } + if (typeof expected !== "object") { + return expected === generated; + } + // If a test fails with an issue in the below 6 lines, it's likely // due to an issue in the nestedness or existence of the property // being compared. @@ -156,6 +171,14 @@ const clientParams = { region: "us-west-2", endpoint: "https://localhost/", credentials: { accessKeyId: "key", secretAccessKey: "secret" }, + endpoint: () => { + const url = new URL("https://www.amazon.com/"); + return Promise.resolve({ + ...url, + path: url.pathname, + ...(url.port ? { port: Number(url.port) } : {}), + }) as Promise; + }, }; /** @@ -166,6 +189,37 @@ const fail = (error?: any): never => { throw new Error(error); }; +/** + * Hexadecimal to byteArray. + */ +const toBytes = (hex: string) => { + return Buffer.from(hex, "base64"); +}; + +function normalizeByteArrayType(data: any) { + // normalize float32 errors + if (typeof data === "number") { + const u = new Uint8Array(4); + const dv = new DataView(u.buffer, u.byteOffset, u.byteLength); + dv.setFloat32(0, data); + return dv.getFloat32(0); + } + if (!data || typeof data !== "object") { + return data; + } + if (data instanceof Uint8Array) { + return Uint8Array.from(data); + } + if (data instanceof String || data instanceof Boolean || data instanceof Number) { + return data.valueOf(); + } + const output = {} as any; + for (const key of Object.getOwnPropertyNames(data)) { + output[key] = normalizeByteArrayType(data[key]); + } + return output; +} + /** * Ensures that clients can correctly parse datetime (timestamps) with offsets */ @@ -203,7 +257,7 @@ it("AwsJson11DateTimeWithNegativeOffset:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -244,7 +298,7 @@ it("AwsJson11DateTimeWithPositiveOffset:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -570,7 +624,7 @@ it("AwsJson11DateTimeWithFractionalSeconds:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -613,7 +667,7 @@ it("AwsJson11InvalidGreetingError:Error:GreetingWithErrors", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); return; } @@ -658,7 +712,6 @@ it("AwsJson11ComplexError:Error:GreetingWithErrors", async () => { const paramsToValidate: any = [ { TopLevel: "Top level", - Nested: { Foo: "bar", }, @@ -666,7 +719,7 @@ it("AwsJson11ComplexError:Error:GreetingWithErrors", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); return; } @@ -1063,18 +1116,12 @@ it("AwsJson11Enums:Request", async () => { const command = new JsonEnumsCommand({ fooEnum1: "Foo", - fooEnum2: "0", - fooEnum3: "1", - fooEnumList: ["Foo", "0"], - fooEnumSet: ["Foo", "0"], - fooEnumMap: { hi: "Foo", - zero: "0", } as any, } as any); @@ -1166,25 +1213,19 @@ it("AwsJson11Enums:Response", async () => { const paramsToValidate: any = [ { fooEnum1: "Foo", - fooEnum2: "0", - fooEnum3: "1", - fooEnumList: ["Foo", "0"], - fooEnumSet: ["Foo", "0"], - fooEnumMap: { hi: "Foo", - zero: "0", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1509,7 +1550,6 @@ it("AwsJson11SerializeMapUnionValue:Request", async () => { contents: { mapValue: { foo: "bar", - spam: "eggs", } as any, } as any, @@ -1635,7 +1675,7 @@ it("AwsJson11DeserializeStringUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1679,7 +1719,7 @@ it("AwsJson11DeserializeBooleanUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1723,7 +1763,7 @@ it("AwsJson11DeserializeNumberUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1767,7 +1807,7 @@ it("AwsJson11DeserializeBlobUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1811,7 +1851,7 @@ it("AwsJson11DeserializeTimestampUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1855,7 +1895,7 @@ it("AwsJson11DeserializeEnumUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1899,7 +1939,7 @@ it("AwsJson11DeserializeListUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1942,7 +1982,6 @@ it("AwsJson11DeserializeMapUnionValue:Response", async () => { contents: { mapValue: { foo: "bar", - spam: "eggs", }, }, @@ -1950,7 +1989,7 @@ it("AwsJson11DeserializeMapUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1998,7 +2037,7 @@ it("AwsJson11DeserializeStructureUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2047,7 +2086,7 @@ it("AwsJson11DeserializeIgnoreType:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2651,11 +2690,9 @@ it("serializes_list_of_map_shapes:Request", async () => { { foo: "bar", } as any, - { abc: "xyz", } as any, - { red: "blue", } as any, @@ -2702,11 +2739,9 @@ it("serializes_list_of_structure_shapes:Request", async () => { { Value: "abc", } as any, - { Value: "mno", } as any, - { Value: "xyz", } as any, @@ -2802,7 +2837,6 @@ it("serializes_map_shapes:Request", async () => { const command = new KitchenSinkOperationCommand({ MapOfStrings: { abc: "xyz", - mno: "hjk", } as any, } as any); @@ -2884,7 +2918,6 @@ it("serializes_map_of_list_shapes:Request", async () => { const command = new KitchenSinkOperationCommand({ MapOfListsOfStrings: { abc: ["abc", "xyz"], - mno: ["xyz", "abc"], } as any, } as any); @@ -2929,7 +2962,6 @@ it("serializes_map_of_structure_shapes:Request", async () => { key1: { Value: "value-1", } as any, - key2: { Value: "value-2", } as any, @@ -3184,24 +3216,18 @@ it("serializes_recursive_structure_shapes:Request", async () => { const command = new KitchenSinkOperationCommand({ String: "top-value", - Boolean: false, - RecursiveStruct: { String: "nested-value", - Boolean: true, - RecursiveList: [ { String: "string-only", } as any, - { RecursiveStruct: { MapOfStrings: { color: "red", - size: "large", } as any, } as any, @@ -3299,7 +3325,7 @@ it("parses_string_shapes:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3337,7 +3363,7 @@ it("parses_integer_shapes:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3375,7 +3401,7 @@ it("parses_long_shapes:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3413,7 +3439,7 @@ it("parses_float_shapes:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3451,7 +3477,7 @@ it("parses_double_shapes:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3489,7 +3515,7 @@ it("parses_boolean_shapes_true:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3527,7 +3553,7 @@ it("parses_boolean_false:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3565,7 +3591,7 @@ it("parses_blob_shapes:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3603,7 +3629,7 @@ it("parses_timestamp_shapes:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3641,7 +3667,7 @@ it("parses_iso8601_timestamps:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3679,7 +3705,7 @@ it("parses_httpdate_timestamps:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3717,7 +3743,7 @@ it("parses_list_shapes:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3754,7 +3780,6 @@ it("parses_list_of_map_shapes:Response", async () => { { size: "large", }, - { color: "red", }, @@ -3763,7 +3788,7 @@ it("parses_list_of_map_shapes:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3798,14 +3823,13 @@ it("parses_list_of_list_shapes:Response", async () => { { ListOfLists: [ ["abc", "mno", "xyz"], - ["hjk", "qrs", "tuv"], ], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3842,7 +3866,6 @@ it("parses_list_of_structure_shapes:Response", async () => { { Value: "value-1", }, - { Value: "value-2", }, @@ -3851,7 +3874,7 @@ it("parses_list_of_structure_shapes:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3901,7 +3924,7 @@ it("parses_list_of_recursive_structure_shapes:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3936,14 +3959,13 @@ it("parses_map_shapes:Response", async () => { { MapOfStrings: { size: "large", - color: "red", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3978,14 +4000,13 @@ it("parses_map_of_list_shapes:Response", async () => { { MapOfListsOfStrings: { sizes: ["large", "small"], - colors: ["red", "green"], }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4021,13 +4042,10 @@ it("parses_map_of_map_shapes:Response", async () => { MapOfMaps: { sizes: { large: "L", - medium: "M", }, - colors: { red: "R", - blue: "B", }, }, @@ -4035,7 +4053,7 @@ it("parses_map_of_map_shapes:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4072,7 +4090,6 @@ it("parses_map_of_structure_shapes:Response", async () => { size: { Value: "small", }, - color: { Value: "red", }, @@ -4081,7 +4098,7 @@ it("parses_map_of_structure_shapes:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4131,7 +4148,7 @@ it("parses_map_of_recursive_structure_shapes:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4389,7 +4406,7 @@ it("PutAndGetInlineDocumentsInput:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4437,7 +4454,6 @@ it.skip("SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_1:Request", async const command = new PutWithContentEncodingCommand({ encoding: "custom", - data: "RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8\nWJO6AcF0DptY9Hk16Bav3z6c5FeBvrGDrxTFVgRUk8SychzjrcqJ4qskwN8rL3zslC0oqobQRnLFOvwJ\nprSzBIwdH2yAuxokXAdVRa1u9NGNRvfWJfKkwbbVz8yV76RUF9KNhAUmwyYDrLnxNj8ROl8B7dv8Gans\n7Bit52wcdiJyjBW1pAodB7zqqVwtBx5RaSpF7kEMXexYXp9N0J1jlXzdeg5Wgg4pO7TJNr2joiPVAiFf\nefwMMCNBkYx2z7cRxVxCJZMXXzxSKMGgdTN24bJ5UgE0TxyV52RC0wGWG49S1x5jGrvmxKCIgYPs0w3Z\n0I3XcdB0WEj4x4xRztB9Cx2Mc4qFYQdzS9kO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DJbHNCtW4vM643ZQQBVPP\na7oXSQIq9w2dHp0A7dtkocCZdQp9FKR9XdJAFIbVSHzIF1ZogeZlc0pXuNE0tagvD57xwDRFkAuoQyMu\nYDdZasXrpSmEE5UjHVkyYsISn8QsfXurzDybX468aoRoks654jjmRY5zi1oB8TcMdC2c3sicNaqfeuhd\nH1nPX7l4RpdqWMR7gGx9slXtG8S3KxpOi4qCD7yg3saD66nun4dzksQURoTUdXyrJR5UpHsfIlTF1aJa\nMdXyQtQnrkl00TeghQd00rRFZsCnhi0qrCSKiBfB2EVrd9RPpbgwJGZHuIQecdBmNetc2ylSEClqVBPR\nGOPPIxrnswEZjmnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n", } as any); try { @@ -4469,7 +4485,6 @@ it("AwsJson11SupportsNaNFloatInputs:Request", async () => { const command = new SimpleScalarPropertiesCommand({ floatValue: NaN, - doubleValue: NaN, } as any); try { @@ -4512,7 +4527,6 @@ it("AwsJson11SupportsInfinityFloatInputs:Request", async () => { const command = new SimpleScalarPropertiesCommand({ floatValue: Infinity, - doubleValue: Infinity, } as any); try { @@ -4555,7 +4569,6 @@ it("AwsJson11SupportsNegativeInfinityFloatInputs:Request", async () => { const command = new SimpleScalarPropertiesCommand({ floatValue: -Infinity, - doubleValue: -Infinity, } as any); try { @@ -4620,13 +4633,12 @@ it("AwsJson11SupportsNaNFloatInputs:Response", async () => { const paramsToValidate: any = [ { floatValue: NaN, - doubleValue: NaN, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4663,13 +4675,12 @@ it("AwsJson11SupportsInfinityFloatInputs:Response", async () => { const paramsToValidate: any = [ { floatValue: Infinity, - doubleValue: Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4706,13 +4717,12 @@ it("AwsJson11SupportsNegativeInfinityFloatInputs:Response", async () => { const paramsToValidate: any = [ { floatValue: -Infinity, - doubleValue: -Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4842,7 +4852,7 @@ it("AwsJson11SparseMapsDeserializeNullValues:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4884,7 +4894,7 @@ it("AwsJson11SparseListsDeserializeNull:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); diff --git a/private/aws-protocoltests-query/package.json b/private/aws-protocoltests-query/package.json index a2a6f07b786f..3b41ec4a55e0 100644 --- a/private/aws-protocoltests-query/package.json +++ b/private/aws-protocoltests-query/package.json @@ -31,6 +31,7 @@ "@aws-sdk/types": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", +<<<<<<< HEAD "@smithy/config-resolver": "^3.0.5", "@smithy/core": "^2.2.7", "@smithy/fetch-http-handler": "^3.2.2", @@ -54,6 +55,31 @@ "@smithy/util-defaults-mode-node": "^3.0.10", "@smithy/util-middleware": "^3.0.3", "@smithy/util-retry": "^3.0.3", +======= + "@smithy/config-resolver": "^3.0.3", + "@smithy/core": "^2.2.3", + "@smithy/fetch-http-handler": "^3.1.0", + "@smithy/hash-node": "^3.0.2", + "@smithy/invalid-dependency": "^3.0.2", + "@smithy/middleware-compression": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.2", + "@smithy/middleware-retry": "^3.0.6", + "@smithy/middleware-serde": "^3.0.2", + "@smithy/middleware-stack": "^3.0.2", + "@smithy/node-config-provider": "^3.1.2", + "@smithy/node-http-handler": "^3.1.0", + "@smithy/protocol-http": "^4.0.2", + "@smithy/smithy-client": "^3.1.4", + "@smithy/types": "^3.2.0", + "@smithy/url-parser": "^3.0.2", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.6", + "@smithy/util-defaults-mode-node": "^3.0.6", + "@smithy/util-middleware": "^3.0.2", + "@smithy/util-retry": "^3.0.2", +>>>>>>> a4f579b8985 (test(cbor): protocol tests using cbor branch) "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2", "uuid": "^9.0.1" diff --git a/private/aws-protocoltests-query/test/functional/awsquery.spec.ts b/private/aws-protocoltests-query/test/functional/awsquery.spec.ts index 9933813c7e08..34e02a331185 100644 --- a/private/aws-protocoltests-query/test/functional/awsquery.spec.ts +++ b/private/aws-protocoltests-query/test/functional/awsquery.spec.ts @@ -1,7 +1,7 @@ // smithy-typescript generated code import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; import { Encoder as __Encoder } from "@smithy/types"; -import { HeaderBag, HttpHandlerOptions } from "@smithy/types"; +import { Endpoint, HeaderBag, HttpHandlerOptions } from "@smithy/types"; import { Readable } from "stream"; import { DatetimeOffsetsCommand } from "../../src/commands/DatetimeOffsetsCommand"; @@ -56,7 +56,9 @@ class RequestSerializationTestHandler implements HttpHandler { handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { return Promise.reject(new EXPECTED_REQUEST_SERIALIZATION_ERROR(request)); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -69,9 +71,10 @@ class ResponseDeserializationTestHandler implements HttpHandler { isSuccess: boolean; code: number; headers: HeaderBag; - body: String; + body: string | Uint8Array; + isBase64Body: boolean; - constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: String) { + constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: string) { this.isSuccess = isSuccess; this.code = code; if (headers === undefined) { @@ -83,6 +86,7 @@ class ResponseDeserializationTestHandler implements HttpHandler { body = ""; } this.body = body; + this.isBase64Body = String(body).length > 0 && Buffer.from(String(body), "base64").toString("base64") === body; } handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { @@ -90,11 +94,13 @@ class ResponseDeserializationTestHandler implements HttpHandler { response: new HttpResponse({ statusCode: this.code, headers: this.headers, - body: Readable.from([this.body]), + body: this.isBase64Body ? toBytes(this.body as string) : Readable.from([this.body]), }), }); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -135,6 +141,11 @@ const compareParts = (expectedParts: comparableParts, generatedParts: comparable * properties that have defined values. */ const equivalentContents = (expected: any, generated: any): boolean => { + if (typeof (global as any).expect === "function") { + expect(normalizeByteArrayType(generated)).toEqual(normalizeByteArrayType(expected)); + return true; + } + const localExpected = expected; // Short circuit on equality. @@ -142,6 +153,10 @@ const equivalentContents = (expected: any, generated: any): boolean => { return true; } + if (typeof expected !== "object") { + return expected === generated; + } + // If a test fails with an issue in the below 6 lines, it's likely // due to an issue in the nestedness or existence of the property // being compared. @@ -173,6 +188,14 @@ const clientParams = { region: "us-west-2", endpoint: "https://localhost/", credentials: { accessKeyId: "key", secretAccessKey: "secret" }, + endpoint: () => { + const url = new URL("https://www.amazon.com/"); + return Promise.resolve({ + ...url, + path: url.pathname, + ...(url.port ? { port: Number(url.port) } : {}), + }) as Promise; + }, }; /** @@ -183,6 +206,37 @@ const fail = (error?: any): never => { throw new Error(error); }; +/** + * Hexadecimal to byteArray. + */ +const toBytes = (hex: string) => { + return Buffer.from(hex, "base64"); +}; + +function normalizeByteArrayType(data: any) { + // normalize float32 errors + if (typeof data === "number") { + const u = new Uint8Array(4); + const dv = new DataView(u.buffer, u.byteOffset, u.byteLength); + dv.setFloat32(0, data); + return dv.getFloat32(0); + } + if (!data || typeof data !== "object") { + return data; + } + if (data instanceof Uint8Array) { + return Uint8Array.from(data); + } + if (data instanceof String || data instanceof Boolean || data instanceof Number) { + return data.valueOf(); + } + const output = {} as any; + for (const key of Object.getOwnPropertyNames(data)) { + output[key] = normalizeByteArrayType(data[key]); + } + return output; +} + /** * Ensures that clients can correctly parse datetime (timestamps) with offsets */ @@ -222,7 +276,7 @@ it("AwsQueryDateTimeWithNegativeOffset:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -265,7 +319,7 @@ it("AwsQueryDateTimeWithPositiveOffset:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -448,14 +502,13 @@ it("QueryQueryFlattenedXmlMap:Response", async () => { { myMap: { foo: "Foo", - baz: "Baz", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -501,14 +554,13 @@ it("QueryQueryFlattenedXmlMapWithXmlName:Response", async () => { { myMap: { a: "A", - b: "B", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -554,14 +606,13 @@ it("QueryQueryFlattenedXmlMapWithXmlNamespace:Response", async () => { { myMap: { a: "A", - b: "B", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -604,7 +655,7 @@ it("AwsQueryDateTimeWithFractionalSeconds:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -647,7 +698,7 @@ it("QueryGreetingWithErrors:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -695,7 +746,7 @@ it("QueryInvalidGreetingError:Error:GreetingWithErrors", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); return; } @@ -746,7 +797,7 @@ it("QueryCustomizedError:Error:GreetingWithErrors", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); return; } @@ -793,7 +844,6 @@ it("QueryComplexError:Error:GreetingWithErrors", async () => { const paramsToValidate: any = [ { TopLevel: "Top level", - Nested: { Foo: "bar", }, @@ -801,7 +851,7 @@ it("QueryComplexError:Error:GreetingWithErrors", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); return; } @@ -879,7 +929,7 @@ it("QueryIgnoresWrappingXmlName:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -895,9 +945,7 @@ it("NestedStructures:Request", async () => { const command = new NestedStructuresCommand({ Nested: { StringArg: "foo", - OtherArg: true, - RecursiveArg: { StringArg: "baz", } as any, @@ -1084,7 +1132,6 @@ it.skip("SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsQuery:Request", async ( const command = new PutWithContentEncodingCommand({ encoding: "custom", - data: "RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473Q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aIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n", } as any); try { @@ -1190,12 +1237,10 @@ it("QueryLists:Request", async () => { const command = new QueryListsCommand({ ListArg: ["foo", "bar", "baz"], - ComplexListArg: [ { hi: "hello", } as any, - { hi: "hola", } as any, @@ -1419,7 +1464,6 @@ it("QuerySimpleQueryMaps:Request", async () => { const command = new QueryMapsCommand({ MapArg: { bar: "Bar", - foo: "Foo", } as any, } as any); @@ -1499,7 +1543,6 @@ it("QueryComplexQueryMaps:Request", async () => { bar: { hi: "Bar", } as any, - foo: { hi: "Foo", } as any, @@ -1577,7 +1620,6 @@ it("QueryQueryMapWithMemberXmlName:Request", async () => { const command = new QueryMapsCommand({ MapWithXmlMemberName: { bar: "Bar", - foo: "Foo", } as any, } as any); @@ -1617,7 +1659,6 @@ it("QueryFlattenedQueryMaps:Request", async () => { const command = new QueryMapsCommand({ FlattenedMap: { bar: "Bar", - foo: "Foo", } as any, } as any); @@ -1657,7 +1698,6 @@ it("QueryFlattenedQueryMapsWithXmlName:Request", async () => { const command = new QueryMapsCommand({ FlattenedMapWithXmlName: { bar: "Bar", - foo: "Foo", } as any, } as any); @@ -1697,7 +1737,6 @@ it("QueryQueryMapOfLists:Request", async () => { const command = new QueryMapsCommand({ MapOfLists: { bar: ["C", "D"], - foo: ["A", "B"], } as any, } as any); @@ -1738,7 +1777,6 @@ it("QueryNestedStructWithMap:Request", async () => { NestedStructWithMap: { MapArg: { bar: "Bar", - foo: "Foo", } as any, } as any, @@ -1778,9 +1816,7 @@ it("QueryTimestampsInput:Request", async () => { const command = new QueryTimestampsCommand({ normalFormat: new Date(1422172800000), - epochMember: new Date(1422172800000), - epochTarget: new Date(1422172800000), } as any); try { @@ -1855,13 +1891,10 @@ it("QueryRecursiveShapes:Response", async () => { { nested: { foo: "Foo1", - nested: { bar: "Bar1", - recursiveMember: { foo: "Foo2", - nested: { bar: "Bar2", }, @@ -1872,7 +1905,7 @@ it("QueryRecursiveShapes:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1887,7 +1920,6 @@ it("QuerySimpleInputParamsStrings:Request", async () => { const command = new SimpleInputParamsCommand({ Foo: "val1", - Bar: "val2", } as any); try { @@ -1926,7 +1958,6 @@ it("QuerySimpleInputParamsStringAndBooleanTrue:Request", async () => { const command = new SimpleInputParamsCommand({ Foo: "val1", - Baz: true, } as any); try { @@ -2187,7 +2218,6 @@ it("AwsQuerySupportsNaNFloatInputs:Request", async () => { const command = new SimpleInputParamsCommand({ FloatValue: NaN, - Boo: NaN, } as any); try { @@ -2226,7 +2256,6 @@ it("AwsQuerySupportsInfinityFloatInputs:Request", async () => { const command = new SimpleInputParamsCommand({ FloatValue: Infinity, - Boo: Infinity, } as any); try { @@ -2265,7 +2294,6 @@ it("AwsQuerySupportsNegativeInfinityFloatInputs:Request", async () => { const command = new SimpleInputParamsCommand({ FloatValue: -Infinity, - Boo: -Infinity, } as any); try { @@ -2337,29 +2365,20 @@ it("QuerySimpleScalarProperties:Response", async () => { const paramsToValidate: any = [ { stringValue: "string", - emptyStringValue: "", - trueBooleanValue: true, - falseBooleanValue: false, - byteValue: 1, - shortValue: 2, - integerValue: 3, - longValue: 4, - floatValue: 5.5, - doubleValue: 6.5, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2399,13 +2418,12 @@ it("AwsQuerySupportsNaNFloatOutputs:Response", async () => { const paramsToValidate: any = [ { floatValue: NaN, - doubleValue: NaN, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2445,13 +2463,12 @@ it("AwsQuerySupportsInfinityFloatOutputs:Response", async () => { const paramsToValidate: any = [ { floatValue: Infinity, - doubleValue: Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2491,13 +2508,12 @@ it("AwsQuerySupportsNegativeInfinityFloatOutputs:Response", async () => { const paramsToValidate: any = [ { floatValue: -Infinity, - doubleValue: -Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2540,7 +2556,7 @@ it("QueryXmlBlobs:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2583,7 +2599,7 @@ it("QueryXmlEmptyBlobs:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2626,7 +2642,7 @@ it("QueryXmlEmptySelfClosedBlobs:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2666,13 +2682,12 @@ it("QueryXmlEmptyLists:Response", async () => { const paramsToValidate: any = [ { stringList: [], - stringSet: [], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2716,7 +2731,7 @@ it("QueryXmlEmptyMaps:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2759,7 +2774,7 @@ it("QueryXmlEmptySelfClosedMaps:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2818,25 +2833,19 @@ it("QueryXmlEnums:Response", async () => { const paramsToValidate: any = [ { fooEnum1: "Foo", - fooEnum2: "0", - fooEnum3: "1", - fooEnumList: ["Foo", "0"], - fooEnumSet: ["Foo", "0"], - fooEnumMap: { hi: "Foo", - zero: "0", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2895,33 +2904,19 @@ it("QueryXmlIntEnums:Response", async () => { const paramsToValidate: any = [ { intEnum1: 1, - intEnum2: 2, - intEnum3: 3, - - intEnumList: [ - 1, - - 2, - ], - - intEnumSet: [ - 1, - - 2, - ], - + intEnumList: [1, 2], + intEnumSet: [1, 2], intEnumMap: { a: 1, - b: 2, }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3019,53 +3014,28 @@ it("QueryXmlLists:Response", async () => { const paramsToValidate: any = [ { stringList: ["foo", "bar"], - stringSet: ["foo", "bar"], - - integerList: [ - 1, - - 2, - ], - + integerList: [1, 2], booleanList: [true, false], - timestampList: [new Date(1398796238 * 1000), new Date(1398796238 * 1000)], - enumList: ["Foo", "0"], - - intEnumList: [ - 1, - - 2, - ], - + intEnumList: [1, 2], nestedStringList: [ ["foo", "bar"], - ["baz", "qux"], ], - renamedListMembers: ["foo", "bar"], - flattenedList: ["hi", "bye"], - flattenedList2: ["yep", "nope"], - flattenedListWithMemberNamespace: ["a", "b"], - flattenedListWithNamespace: ["a", "b"], - structureList: [ { a: "1", - b: "2", }, - { a: "3", - b: "4", }, ], @@ -3073,7 +3043,7 @@ it("QueryXmlLists:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3128,7 +3098,6 @@ it("QueryXmlMaps:Response", async () => { foo: { hi: "there", }, - baz: { hi: "bye", }, @@ -3137,7 +3106,7 @@ it("QueryXmlMaps:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3192,7 +3161,6 @@ it("QueryQueryXmlMapsXmlName:Response", async () => { foo: { hi: "there", }, - baz: { hi: "bye", }, @@ -3201,7 +3169,7 @@ it("QueryQueryXmlMapsXmlName:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3247,14 +3215,13 @@ it("QueryXmlNamespaces:Response", async () => { { nested: { foo: "Foo", - values: ["Bar", "Baz"], }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3297,7 +3264,7 @@ it("QueryXmlTimestamps:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3340,7 +3307,7 @@ it("QueryXmlTimestampsWithDateTimeFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3383,7 +3350,7 @@ it("QueryXmlTimestampsWithDateTimeOnTargetFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3426,7 +3393,7 @@ it("QueryXmlTimestampsWithEpochSecondsFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3469,7 +3436,7 @@ it("QueryXmlTimestampsWithEpochSecondsOnTargetFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3512,7 +3479,7 @@ it("QueryXmlTimestampsWithHttpDateFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3555,7 +3522,7 @@ it("QueryXmlTimestampsWithHttpDateOnTargetFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); diff --git a/private/aws-protocoltests-restjson-apigateway/README.md b/private/aws-protocoltests-restjson-apigateway/README.md index e1b62b0f73f3..0d11acec4be4 100644 --- a/private/aws-protocoltests-restjson-apigateway/README.md +++ b/private/aws-protocoltests-restjson-apigateway/README.md @@ -2425,3 +2425,99 @@ ListObjectsV2 [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/api-gateway/command/ListObjectsV2Command/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/ListObjectsV2CommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/ListObjectsV2CommandOutput/) +
+ +EmptyInputOutput + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/api-gateway/command/EmptyInputOutputCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/EmptyInputOutputCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/EmptyInputOutputCommandOutput/) + +
+
+ +FractionalSeconds + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/api-gateway/command/FractionalSecondsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/FractionalSecondsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/FractionalSecondsCommandOutput/) + +
+
+ +GreetingWithErrors + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/api-gateway/command/GreetingWithErrorsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/GreetingWithErrorsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/GreetingWithErrorsCommandOutput/) + +
+
+ +NoInputOutput + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/api-gateway/command/NoInputOutputCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/NoInputOutputCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/NoInputOutputCommandOutput/) + +
+
+ +OperationWithDefaults + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/api-gateway/command/OperationWithDefaultsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/OperationWithDefaultsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/OperationWithDefaultsCommandOutput/) + +
+
+ +OptionalInputOutput + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/api-gateway/command/OptionalInputOutputCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/OptionalInputOutputCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/OptionalInputOutputCommandOutput/) + +
+
+ +RecursiveShapes + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/api-gateway/command/RecursiveShapesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/RecursiveShapesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/RecursiveShapesCommandOutput/) + +
+
+ +RpcV2CborDenseMaps + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/api-gateway/command/RpcV2CborDenseMapsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/RpcV2CborDenseMapsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/RpcV2CborDenseMapsCommandOutput/) + +
+
+ +RpcV2CborLists + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/api-gateway/command/RpcV2CborListsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/RpcV2CborListsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/RpcV2CborListsCommandOutput/) + +
+
+ +RpcV2CborSparseMaps + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/api-gateway/command/RpcV2CborSparseMapsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/RpcV2CborSparseMapsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/RpcV2CborSparseMapsCommandOutput/) + +
+
+ +SimpleScalarProperties + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/api-gateway/command/SimpleScalarPropertiesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/SimpleScalarPropertiesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/SimpleScalarPropertiesCommandOutput/) + +
+
+ +SparseNullsOperation + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/api-gateway/command/SparseNullsOperationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/SparseNullsOperationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-api-gateway/Interface/SparseNullsOperationCommandOutput/) + +
diff --git a/private/aws-protocoltests-restjson-apigateway/package.json b/private/aws-protocoltests-restjson-apigateway/package.json index c3b63f5326fc..7031392c7ba4 100644 --- a/private/aws-protocoltests-restjson-apigateway/package.json +++ b/private/aws-protocoltests-restjson-apigateway/package.json @@ -32,6 +32,7 @@ "@aws-sdk/types": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", +<<<<<<< HEAD "@smithy/config-resolver": "^3.0.5", "@smithy/core": "^2.2.7", "@smithy/fetch-http-handler": "^3.2.2", @@ -54,6 +55,30 @@ "@smithy/util-defaults-mode-node": "^3.0.10", "@smithy/util-middleware": "^3.0.3", "@smithy/util-retry": "^3.0.3", +======= + "@smithy/config-resolver": "^3.0.3", + "@smithy/core": "^2.2.3", + "@smithy/fetch-http-handler": "^3.1.0", + "@smithy/hash-node": "^3.0.2", + "@smithy/invalid-dependency": "^3.0.2", + "@smithy/middleware-content-length": "^3.0.2", + "@smithy/middleware-retry": "^3.0.6", + "@smithy/middleware-serde": "^3.0.2", + "@smithy/middleware-stack": "^3.0.2", + "@smithy/node-config-provider": "^3.1.2", + "@smithy/node-http-handler": "^3.1.0", + "@smithy/protocol-http": "^4.0.2", + "@smithy/smithy-client": "^3.1.4", + "@smithy/types": "^3.2.0", + "@smithy/url-parser": "^3.0.2", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.6", + "@smithy/util-defaults-mode-node": "^3.0.6", + "@smithy/util-middleware": "^3.0.2", + "@smithy/util-retry": "^3.0.2", +>>>>>>> a4f579b8985 (test(cbor): protocol tests using cbor branch) "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2", "uuid": "^9.0.1" diff --git a/private/aws-protocoltests-restjson-apigateway/test/functional/restjson1.spec.ts b/private/aws-protocoltests-restjson-apigateway/test/functional/restjson1.spec.ts index 7a275d61a6cf..e8885c3e6d69 100644 --- a/private/aws-protocoltests-restjson-apigateway/test/functional/restjson1.spec.ts +++ b/private/aws-protocoltests-restjson-apigateway/test/functional/restjson1.spec.ts @@ -1,6 +1,6 @@ // smithy-typescript generated code import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; -import { HeaderBag, HttpHandlerOptions } from "@smithy/types"; +import { Endpoint, HeaderBag, HttpHandlerOptions } from "@smithy/types"; import { Readable } from "stream"; import { APIGatewayClient } from "../../src/APIGatewayClient"; @@ -23,7 +23,9 @@ class RequestSerializationTestHandler implements HttpHandler { handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { return Promise.reject(new EXPECTED_REQUEST_SERIALIZATION_ERROR(request)); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -36,9 +38,10 @@ class ResponseDeserializationTestHandler implements HttpHandler { isSuccess: boolean; code: number; headers: HeaderBag; - body: String; + body: string | Uint8Array; + isBase64Body: boolean; - constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: String) { + constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: string) { this.isSuccess = isSuccess; this.code = code; if (headers === undefined) { @@ -50,6 +53,7 @@ class ResponseDeserializationTestHandler implements HttpHandler { body = ""; } this.body = body; + this.isBase64Body = String(body).length > 0 && Buffer.from(String(body), "base64").toString("base64") === body; } handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { @@ -57,11 +61,13 @@ class ResponseDeserializationTestHandler implements HttpHandler { response: new HttpResponse({ statusCode: this.code, headers: this.headers, - body: Readable.from([this.body]), + body: this.isBase64Body ? toBytes(this.body as string) : Readable.from([this.body]), }), }); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -102,6 +108,11 @@ const compareParts = (expectedParts: comparableParts, generatedParts: comparable * properties that have defined values. */ const equivalentContents = (expected: any, generated: any): boolean => { + if (typeof (global as any).expect === "function") { + expect(normalizeByteArrayType(generated)).toEqual(normalizeByteArrayType(expected)); + return true; + } + const localExpected = expected; // Short circuit on equality. @@ -109,6 +120,10 @@ const equivalentContents = (expected: any, generated: any): boolean => { return true; } + if (typeof expected !== "object") { + return expected === generated; + } + // If a test fails with an issue in the below 6 lines, it's likely // due to an issue in the nestedness or existence of the property // being compared. @@ -140,6 +155,14 @@ const clientParams = { region: "us-west-2", endpoint: "https://localhost/", credentials: { accessKeyId: "key", secretAccessKey: "secret" }, + endpoint: () => { + const url = new URL("https://www.amazon.com/"); + return Promise.resolve({ + ...url, + path: url.pathname, + ...(url.port ? { port: Number(url.port) } : {}), + }) as Promise; + }, }; /** @@ -150,6 +173,37 @@ const fail = (error?: any): never => { throw new Error(error); }; +/** + * Hexadecimal to byteArray. + */ +const toBytes = (hex: string) => { + return Buffer.from(hex, "base64"); +}; + +function normalizeByteArrayType(data: any) { + // normalize float32 errors + if (typeof data === "number") { + const u = new Uint8Array(4); + const dv = new DataView(u.buffer, u.byteOffset, u.byteLength); + dv.setFloat32(0, data); + return dv.getFloat32(0); + } + if (!data || typeof data !== "object") { + return data; + } + if (data instanceof Uint8Array) { + return Uint8Array.from(data); + } + if (data instanceof String || data instanceof Boolean || data instanceof Number) { + return data.valueOf(); + } + const output = {} as any; + for (const key of Object.getOwnPropertyNames(data)) { + output[key] = normalizeByteArrayType(data[key]); + } + return output; +} + /** * API Gateway requires that this Accept header is set on all requests. */ diff --git a/private/aws-protocoltests-restjson-glacier/README.md b/private/aws-protocoltests-restjson-glacier/README.md index 727eeca5f84f..c9111f17e028 100644 --- a/private/aws-protocoltests-restjson-glacier/README.md +++ b/private/aws-protocoltests-restjson-glacier/README.md @@ -2425,3 +2425,99 @@ ListObjectsV2 [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/glacier/command/ListObjectsV2Command/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/ListObjectsV2CommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/ListObjectsV2CommandOutput/) +
+ +EmptyInputOutput + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/glacier/command/EmptyInputOutputCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/EmptyInputOutputCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/EmptyInputOutputCommandOutput/) + +
+
+ +FractionalSeconds + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/glacier/command/FractionalSecondsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/FractionalSecondsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/FractionalSecondsCommandOutput/) + +
+
+ +GreetingWithErrors + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/glacier/command/GreetingWithErrorsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/GreetingWithErrorsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/GreetingWithErrorsCommandOutput/) + +
+
+ +NoInputOutput + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/glacier/command/NoInputOutputCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/NoInputOutputCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/NoInputOutputCommandOutput/) + +
+
+ +OperationWithDefaults + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/glacier/command/OperationWithDefaultsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/OperationWithDefaultsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/OperationWithDefaultsCommandOutput/) + +
+
+ +OptionalInputOutput + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/glacier/command/OptionalInputOutputCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/OptionalInputOutputCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/OptionalInputOutputCommandOutput/) + +
+
+ +RecursiveShapes + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/glacier/command/RecursiveShapesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/RecursiveShapesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/RecursiveShapesCommandOutput/) + +
+
+ +RpcV2CborDenseMaps + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/glacier/command/RpcV2CborDenseMapsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/RpcV2CborDenseMapsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/RpcV2CborDenseMapsCommandOutput/) + +
+
+ +RpcV2CborLists + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/glacier/command/RpcV2CborListsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/RpcV2CborListsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/RpcV2CborListsCommandOutput/) + +
+
+ +RpcV2CborSparseMaps + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/glacier/command/RpcV2CborSparseMapsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/RpcV2CborSparseMapsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/RpcV2CborSparseMapsCommandOutput/) + +
+
+ +SimpleScalarProperties + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/glacier/command/SimpleScalarPropertiesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/SimpleScalarPropertiesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/SimpleScalarPropertiesCommandOutput/) + +
+
+ +SparseNullsOperation + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/glacier/command/SparseNullsOperationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/SparseNullsOperationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-glacier/Interface/SparseNullsOperationCommandOutput/) + +
diff --git a/private/aws-protocoltests-restjson-glacier/package.json b/private/aws-protocoltests-restjson-glacier/package.json index c2c2e58ec39c..931db890cec2 100644 --- a/private/aws-protocoltests-restjson-glacier/package.json +++ b/private/aws-protocoltests-restjson-glacier/package.json @@ -34,6 +34,7 @@ "@aws-sdk/types": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", +<<<<<<< HEAD "@smithy/config-resolver": "^3.0.5", "@smithy/core": "^2.2.7", "@smithy/fetch-http-handler": "^3.2.2", @@ -56,6 +57,30 @@ "@smithy/util-defaults-mode-node": "^3.0.10", "@smithy/util-middleware": "^3.0.3", "@smithy/util-retry": "^3.0.3", +======= + "@smithy/config-resolver": "^3.0.3", + "@smithy/core": "^2.2.3", + "@smithy/fetch-http-handler": "^3.1.0", + "@smithy/hash-node": "^3.0.2", + "@smithy/invalid-dependency": "^3.0.2", + "@smithy/middleware-content-length": "^3.0.2", + "@smithy/middleware-retry": "^3.0.6", + "@smithy/middleware-serde": "^3.0.2", + "@smithy/middleware-stack": "^3.0.2", + "@smithy/node-config-provider": "^3.1.2", + "@smithy/node-http-handler": "^3.1.0", + "@smithy/protocol-http": "^4.0.2", + "@smithy/smithy-client": "^3.1.4", + "@smithy/types": "^3.2.0", + "@smithy/url-parser": "^3.0.2", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.6", + "@smithy/util-defaults-mode-node": "^3.0.6", + "@smithy/util-middleware": "^3.0.2", + "@smithy/util-retry": "^3.0.2", +>>>>>>> a4f579b8985 (test(cbor): protocol tests using cbor branch) "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2", "uuid": "^9.0.1" diff --git a/private/aws-protocoltests-restjson-glacier/test/functional/restjson1.spec.ts b/private/aws-protocoltests-restjson-glacier/test/functional/restjson1.spec.ts index c949de1f16de..25e5b5bb98b4 100644 --- a/private/aws-protocoltests-restjson-glacier/test/functional/restjson1.spec.ts +++ b/private/aws-protocoltests-restjson-glacier/test/functional/restjson1.spec.ts @@ -1,7 +1,7 @@ // smithy-typescript generated code import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; import { Encoder as __Encoder } from "@smithy/types"; -import { HeaderBag, HttpHandlerOptions } from "@smithy/types"; +import { Endpoint, HeaderBag, HttpHandlerOptions } from "@smithy/types"; import { Readable } from "stream"; import { UploadArchiveCommand } from "../../src/commands/UploadArchiveCommand"; @@ -25,7 +25,9 @@ class RequestSerializationTestHandler implements HttpHandler { handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { return Promise.reject(new EXPECTED_REQUEST_SERIALIZATION_ERROR(request)); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -38,9 +40,10 @@ class ResponseDeserializationTestHandler implements HttpHandler { isSuccess: boolean; code: number; headers: HeaderBag; - body: String; + body: string | Uint8Array; + isBase64Body: boolean; - constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: String) { + constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: string) { this.isSuccess = isSuccess; this.code = code; if (headers === undefined) { @@ -52,6 +55,7 @@ class ResponseDeserializationTestHandler implements HttpHandler { body = ""; } this.body = body; + this.isBase64Body = String(body).length > 0 && Buffer.from(String(body), "base64").toString("base64") === body; } handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { @@ -59,11 +63,13 @@ class ResponseDeserializationTestHandler implements HttpHandler { response: new HttpResponse({ statusCode: this.code, headers: this.headers, - body: Readable.from([this.body]), + body: this.isBase64Body ? toBytes(this.body as string) : Readable.from([this.body]), }), }); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -104,6 +110,11 @@ const compareParts = (expectedParts: comparableParts, generatedParts: comparable * properties that have defined values. */ const equivalentContents = (expected: any, generated: any): boolean => { + if (typeof (global as any).expect === "function") { + expect(normalizeByteArrayType(generated)).toEqual(normalizeByteArrayType(expected)); + return true; + } + const localExpected = expected; // Short circuit on equality. @@ -111,6 +122,10 @@ const equivalentContents = (expected: any, generated: any): boolean => { return true; } + if (typeof expected !== "object") { + return expected === generated; + } + // If a test fails with an issue in the below 6 lines, it's likely // due to an issue in the nestedness or existence of the property // being compared. @@ -142,6 +157,14 @@ const clientParams = { region: "us-west-2", endpoint: "https://localhost/", credentials: { accessKeyId: "key", secretAccessKey: "secret" }, + endpoint: () => { + const url = new URL("https://www.amazon.com/"); + return Promise.resolve({ + ...url, + path: url.pathname, + ...(url.port ? { port: Number(url.port) } : {}), + }) as Promise; + }, }; /** @@ -152,6 +175,37 @@ const fail = (error?: any): never => { throw new Error(error); }; +/** + * Hexadecimal to byteArray. + */ +const toBytes = (hex: string) => { + return Buffer.from(hex, "base64"); +}; + +function normalizeByteArrayType(data: any) { + // normalize float32 errors + if (typeof data === "number") { + const u = new Uint8Array(4); + const dv = new DataView(u.buffer, u.byteOffset, u.byteLength); + dv.setFloat32(0, data); + return dv.getFloat32(0); + } + if (!data || typeof data !== "object") { + return data; + } + if (data instanceof Uint8Array) { + return Uint8Array.from(data); + } + if (data instanceof String || data instanceof Boolean || data instanceof Number) { + return data.valueOf(); + } + const output = {} as any; + for (const key of Object.getOwnPropertyNames(data)) { + output[key] = normalizeByteArrayType(data[key]); + } + return output; +} + /** * Glacier requires that a version header be set on all requests. */ @@ -163,7 +217,6 @@ it("GlacierVersionHeader:Request", async () => { const command = new UploadArchiveCommand({ accountId: "foo", - vaultName: "bar", } as any); try { @@ -197,9 +250,7 @@ it("GlacierChecksums:Request", async () => { const command = new UploadArchiveCommand({ accountId: "foo", - vaultName: "bar", - body: Uint8Array.from("hello world", (c) => c.charCodeAt(0)), } as any); try { @@ -245,7 +296,6 @@ it.skip("GlacierAccountId:Request", async () => { const command = new UploadArchiveCommand({ accountId: "", - vaultName: "bar", } as any); try { @@ -279,11 +329,8 @@ it("GlacierMultipartChecksums:Request", async () => { const command = new UploadMultipartPartCommand({ accountId: "foo", - vaultName: "bar", - uploadId: "baz", - body: Uint8Array.from("hello world", (c) => c.charCodeAt(0)), } as any); try { diff --git a/private/aws-protocoltests-restjson/package.json b/private/aws-protocoltests-restjson/package.json index a09c07575c95..e346081c84de 100644 --- a/private/aws-protocoltests-restjson/package.json +++ b/private/aws-protocoltests-restjson/package.json @@ -31,6 +31,7 @@ "@aws-sdk/types": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", +<<<<<<< HEAD "@smithy/config-resolver": "^3.0.5", "@smithy/core": "^2.2.7", "@smithy/fetch-http-handler": "^3.2.2", @@ -60,6 +61,37 @@ "@smithy/util-middleware": "^3.0.3", "@smithy/util-retry": "^3.0.3", "@smithy/util-stream": "^3.1.0", +======= + "@smithy/config-resolver": "^3.0.3", + "@smithy/core": "^2.2.3", + "@smithy/fetch-http-handler": "^3.1.0", + "@smithy/hash-blob-browser": "^3.1.1", + "@smithy/hash-node": "^3.0.2", + "@smithy/hash-stream-node": "^3.1.1", + "@smithy/invalid-dependency": "^3.0.2", + "@smithy/md5-js": "^3.0.2", + "@smithy/middleware-apply-body-checksum": "^3.0.2", + "@smithy/middleware-compression": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.2", + "@smithy/middleware-retry": "^3.0.6", + "@smithy/middleware-serde": "^3.0.2", + "@smithy/middleware-stack": "^3.0.2", + "@smithy/node-config-provider": "^3.1.2", + "@smithy/node-http-handler": "^3.1.0", + "@smithy/protocol-http": "^4.0.2", + "@smithy/querystring-builder": "^3.0.2", + "@smithy/smithy-client": "^3.1.4", + "@smithy/types": "^3.2.0", + "@smithy/url-parser": "^3.0.2", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.6", + "@smithy/util-defaults-mode-node": "^3.0.6", + "@smithy/util-middleware": "^3.0.2", + "@smithy/util-retry": "^3.0.2", + "@smithy/util-stream": "^3.0.4", +>>>>>>> a4f579b8985 (test(cbor): protocol tests using cbor branch) "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2", "uuid": "^9.0.1" diff --git a/private/aws-protocoltests-restjson/test/functional/restjson1.spec.ts b/private/aws-protocoltests-restjson/test/functional/restjson1.spec.ts index 583946eed9a9..292adbdee018 100644 --- a/private/aws-protocoltests-restjson/test/functional/restjson1.spec.ts +++ b/private/aws-protocoltests-restjson/test/functional/restjson1.spec.ts @@ -2,7 +2,7 @@ import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; import { buildQueryString } from "@smithy/querystring-builder"; import { Encoder as __Encoder } from "@smithy/types"; -import { HeaderBag, HttpHandlerOptions } from "@smithy/types"; +import { Endpoint, HeaderBag, HttpHandlerOptions } from "@smithy/types"; import { Readable } from "stream"; import { AllQueryStringTypesCommand } from "../../src/commands/AllQueryStringTypesCommand"; @@ -89,7 +89,9 @@ class RequestSerializationTestHandler implements HttpHandler { handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { return Promise.reject(new EXPECTED_REQUEST_SERIALIZATION_ERROR(request)); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -102,9 +104,10 @@ class ResponseDeserializationTestHandler implements HttpHandler { isSuccess: boolean; code: number; headers: HeaderBag; - body: String; + body: string | Uint8Array; + isBase64Body: boolean; - constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: String) { + constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: string) { this.isSuccess = isSuccess; this.code = code; if (headers === undefined) { @@ -116,6 +119,7 @@ class ResponseDeserializationTestHandler implements HttpHandler { body = ""; } this.body = body; + this.isBase64Body = String(body).length > 0 && Buffer.from(String(body), "base64").toString("base64") === body; } handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { @@ -123,11 +127,13 @@ class ResponseDeserializationTestHandler implements HttpHandler { response: new HttpResponse({ statusCode: this.code, headers: this.headers, - body: Readable.from([this.body]), + body: this.isBase64Body ? toBytes(this.body as string) : Readable.from([this.body]), }), }); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -168,6 +174,11 @@ const compareParts = (expectedParts: comparableParts, generatedParts: comparable * properties that have defined values. */ const equivalentContents = (expected: any, generated: any): boolean => { + if (typeof (global as any).expect === "function") { + expect(normalizeByteArrayType(generated)).toEqual(normalizeByteArrayType(expected)); + return true; + } + const localExpected = expected; // Short circuit on equality. @@ -175,6 +186,10 @@ const equivalentContents = (expected: any, generated: any): boolean => { return true; } + if (typeof expected !== "object") { + return expected === generated; + } + // If a test fails with an issue in the below 6 lines, it's likely // due to an issue in the nestedness or existence of the property // being compared. @@ -206,6 +221,14 @@ const clientParams = { region: "us-west-2", endpoint: "https://localhost/", credentials: { accessKeyId: "key", secretAccessKey: "secret" }, + endpoint: () => { + const url = new URL("https://www.amazon.com/"); + return Promise.resolve({ + ...url, + path: url.pathname, + ...(url.port ? { port: Number(url.port) } : {}), + }) as Promise; + }, }; /** @@ -216,6 +239,37 @@ const fail = (error?: any): never => { throw new Error(error); }; +/** + * Hexadecimal to byteArray. + */ +const toBytes = (hex: string) => { + return Buffer.from(hex, "base64"); +}; + +function normalizeByteArrayType(data: any) { + // normalize float32 errors + if (typeof data === "number") { + const u = new Uint8Array(4); + const dv = new DataView(u.buffer, u.byteOffset, u.byteLength); + dv.setFloat32(0, data); + return dv.getFloat32(0); + } + if (!data || typeof data !== "object") { + return data; + } + if (data instanceof Uint8Array) { + return Uint8Array.from(data); + } + if (data instanceof String || data instanceof Boolean || data instanceof Number) { + return data.valueOf(); + } + const output = {} as any; + for (const key of Object.getOwnPropertyNames(data)) { + output[key] = normalizeByteArrayType(data[key]); + } + return output; +} + /** * Serializes query string parameters with all supported types */ @@ -227,108 +281,45 @@ it("RestJsonAllQueryStringTypes:Request", async () => { const command = new AllQueryStringTypesCommand({ queryString: "Hello there", - queryStringList: ["a", "b", "c"], - queryStringSet: ["a", "b", "c"], - queryByte: 1, - queryShort: 2, - queryInteger: 3, - - queryIntegerList: [ - 1, - - 2, - - 3, - ], - - queryIntegerSet: [ - 1, - - 2, - - 3, - ], - + queryIntegerList: [1, 2, 3], + queryIntegerSet: [1, 2, 3], queryLong: 4, - queryFloat: 1.1, - queryDouble: 1.1, - - queryDoubleList: [ - 1.1, - - 2.1, - - 3.1, - ], - + queryDoubleList: [1.1, 2.1, 3.1], queryBoolean: true, - queryBooleanList: [true, false, true], - queryTimestamp: new Date(1000), - queryTimestampList: [new Date(1000), new Date(2000), new Date(3000)], - queryEnum: "Foo", - queryEnumList: ["Foo", "Baz", "Bar"], - queryIntegerEnum: 1, - - queryIntegerEnumList: [ - 1, - - 2, - - 3, - ], - + queryIntegerEnumList: [1, 2, 3], queryParamsMapOfStringList: { String: ["Hello there"], - StringList: ["a", "b", "c"], - StringSet: ["a", "b", "c"], - Byte: ["1"], - Short: ["2"], - Integer: ["3"], - IntegerList: ["1", "2", "3"], - IntegerSet: ["1", "2", "3"], - Long: ["4"], - Float: ["1.1"], - Double: ["1.1"], - DoubleList: ["1.1", "2.1", "3.1"], - Boolean: ["true"], - BooleanList: ["true", "false", "true"], - Timestamp: ["1970-01-01T00:00:01Z"], - TimestampList: ["1970-01-01T00:00:01Z", "1970-01-01T00:00:02Z", "1970-01-01T00:00:03Z"], - Enum: ["Foo"], - EnumList: ["Foo", "Baz", "Bar"], - IntegerEnum: ["1"], - IntegerEnumList: ["1", "2", "3"], } as any, } as any); @@ -401,7 +392,6 @@ it("RestJsonQueryStringMap:Request", async () => { const command = new AllQueryStringTypesCommand({ queryParamsMapOfStringList: { QueryParamsStringKeyA: ["Foo"], - QueryParamsStringKeyB: ["Bar"], } as any, } as any); @@ -437,7 +427,6 @@ it("RestJsonQueryStringEscaping:Request", async () => { const command = new AllQueryStringTypesCommand({ queryString: " %:/?#[]@!$&'()*+,;=😹", - queryParamsMapOfStringList: { String: [" %:/?#[]@!$&'()*+,;=😹"], } as any, @@ -473,12 +462,9 @@ it("RestJsonSupportsNaNFloatQueryValues:Request", async () => { const command = new AllQueryStringTypesCommand({ queryFloat: NaN, - queryDouble: NaN, - queryParamsMapOfStringList: { Float: ["NaN"], - Double: ["NaN"], } as any, } as any); @@ -514,12 +500,9 @@ it("RestJsonSupportsInfinityFloatQueryValues:Request", async () => { const command = new AllQueryStringTypesCommand({ queryFloat: Infinity, - queryDouble: Infinity, - queryParamsMapOfStringList: { Float: ["Infinity"], - Double: ["Infinity"], } as any, } as any); @@ -555,12 +538,9 @@ it("RestJsonSupportsNegativeInfinityFloatQueryValues:Request", async () => { const command = new AllQueryStringTypesCommand({ queryFloat: -Infinity, - queryDouble: -Infinity, - queryParamsMapOfStringList: { Float: ["-Infinity"], - Double: ["-Infinity"], } as any, } as any); @@ -596,12 +576,9 @@ it("RestJsonZeroAndFalseQueryValues:Request", async () => { const command = new AllQueryStringTypesCommand({ queryInteger: 0, - queryBoolean: false, - queryParamsMapOfStringList: { Integer: ["0"], - Boolean: ["false"], } as any, } as any); @@ -672,7 +649,6 @@ it("RestJsonConstantAndVariableQueryStringAllValues:Request", async () => { const command = new ConstantAndVariableQueryStringCommand({ baz: "bam", - maybeSet: "yes", } as any); try { @@ -765,7 +741,7 @@ it("RestJsonDateTimeWithNegativeOffset:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -804,7 +780,7 @@ it("RestJsonDateTimeWithPositiveOffset:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -819,7 +795,6 @@ it("DocumentTypeInputWithObject:Request", async () => { const command = new DocumentTypeCommand({ stringValue: "string", - documentValue: { foo: "bar", }, @@ -864,7 +839,6 @@ it("DocumentInputWithString:Request", async () => { const command = new DocumentTypeCommand({ stringValue: "string", - documentValue: "hello", } as any); try { @@ -905,7 +879,6 @@ it("DocumentInputWithNumber:Request", async () => { const command = new DocumentTypeCommand({ stringValue: "string", - documentValue: 10, } as any); try { @@ -946,7 +919,6 @@ it("DocumentInputWithBoolean:Request", async () => { const command = new DocumentTypeCommand({ stringValue: "string", - documentValue: true, } as any); try { @@ -987,18 +959,10 @@ it("DocumentInputWithList:Request", async () => { const command = new DocumentTypeCommand({ stringValue: "string", - documentValue: [ true, - "hi", - - [ - 1, - - 2, - ], - + [1, 2], { foo: { baz: [3, 4], @@ -1083,7 +1047,6 @@ it("DocumentOutput:Response", async () => { const paramsToValidate: any = [ { stringValue: "string", - documentValue: { foo: "bar", }, @@ -1091,7 +1054,7 @@ it("DocumentOutput:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1128,13 +1091,12 @@ it("DocumentOutputString:Response", async () => { const paramsToValidate: any = [ { stringValue: "string", - documentValue: "hello", }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1171,13 +1133,12 @@ it("DocumentOutputNumber:Response", async () => { const paramsToValidate: any = [ { stringValue: "string", - documentValue: 10, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1214,13 +1175,12 @@ it("DocumentOutputBoolean:Response", async () => { const paramsToValidate: any = [ { stringValue: "string", - documentValue: false, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1260,13 +1220,12 @@ it("DocumentOutputArray:Response", async () => { const paramsToValidate: any = [ { stringValue: "string", - documentValue: [true, false], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1285,9 +1244,7 @@ it("DocumentTypeAsMapValueInput:Request", async () => { f: 1, o: 2, }, - bar: ["b", "a", "r"], - baz: "BAZ", } as any, } as any); @@ -1361,16 +1318,14 @@ it("DocumentTypeAsMapValueOutput:Response", async () => { f: 1, o: 2, }, - bar: ["b", "a", "r"], - baz: "BAZ", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1488,7 +1443,7 @@ it("DocumentTypeAsPayloadOutput:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1526,7 +1481,7 @@ it("DocumentTypeAsPayloadOutputString:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1719,7 +1674,7 @@ it("RestJsonDateTimeWithFractionalSeconds:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1761,7 +1716,7 @@ it("RestJsonGreetingWithErrors:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1801,7 +1756,7 @@ it("RestJsonGreetingWithErrorsNoPayload:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2153,9 +2108,7 @@ it("RestJsonComplexErrorWithNoMessage:Error:GreetingWithErrors", async () => { const paramsToValidate: any = [ { Header: "Header", - TopLevel: "Top level", - Nested: { Foo: "bar", }, @@ -2163,7 +2116,7 @@ it("RestJsonComplexErrorWithNoMessage:Error:GreetingWithErrors", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); return; } @@ -2241,7 +2194,7 @@ it("RestJsonInvalidGreetingError:Error:GreetingWithErrors", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); return; } @@ -2381,7 +2334,7 @@ it("RestJsonEnumPayloadResponse:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2396,7 +2349,6 @@ it("RestJsonHttpPayloadTraitsWithBlob:Request", async () => { const command = new HttpPayloadTraitsCommand({ foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), } as any); try { @@ -2488,13 +2440,12 @@ it("RestJsonHttpPayloadTraitsWithBlob:Response", async () => { const paramsToValidate: any = [ { foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2532,7 +2483,7 @@ it("RestJsonHttpPayloadTraitsWithNoBlobBody:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2547,7 +2498,6 @@ it("RestJsonHttpPayloadTraitsWithMediaTypeWithBlob:Request", async () => { const command = new HttpPayloadTraitsWithMediaTypeCommand({ foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), } as any); try { @@ -2608,13 +2558,12 @@ it("RestJsonHttpPayloadTraitsWithMediaTypeWithBlob:Response", async () => { const paramsToValidate: any = [ { foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2630,7 +2579,6 @@ it("RestJsonHttpPayloadWithStructure:Request", async () => { const command = new HttpPayloadWithStructureCommand({ nested: { greeting: "hello", - name: "Phreddy", } as any, } as any); @@ -2696,14 +2644,13 @@ it("RestJsonHttpPayloadWithStructure:Response", async () => { { nested: { greeting: "hello", - name: "Phreddy", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2813,7 +2760,7 @@ it("RestJsonHttpPayloadWithUnion:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2857,10 +2804,8 @@ it("RestJsonHttpPrefixHeadersArePresent:Request", async () => { const command = new HttpPrefixHeadersCommand({ foo: "Foo", - fooMap: { Abc: "Abc value", - Def: "Def value", } as any, } as any); @@ -2899,7 +2844,6 @@ it("RestJsonHttpPrefixHeadersAreNotPresent:Request", async () => { const command = new HttpPrefixHeadersCommand({ foo: "Foo", - fooMap: {} as any, } as any); try { @@ -2949,17 +2893,15 @@ it("RestJsonHttpPrefixHeadersArePresent:Response", async () => { const paramsToValidate: any = [ { foo: "Foo", - fooMap: { abc: "Abc value", - def: "Def value", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2990,14 +2932,13 @@ it("HttpPrefixHeadersResponse:Response", async () => { { prefixHeaders: { "x-foo": "Foo", - hello: "Hello", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3012,7 +2953,6 @@ it("RestJsonSupportsNaNFloatLabels:Request", async () => { const command = new HttpRequestWithFloatLabelsCommand({ float: NaN, - double: NaN, } as any); try { @@ -3043,7 +2983,6 @@ it("RestJsonSupportsInfinityFloatLabels:Request", async () => { const command = new HttpRequestWithFloatLabelsCommand({ float: Infinity, - double: Infinity, } as any); try { @@ -3074,7 +3013,6 @@ it("RestJsonSupportsNegativeInfinityFloatLabels:Request", async () => { const command = new HttpRequestWithFloatLabelsCommand({ float: -Infinity, - double: -Infinity, } as any); try { @@ -3105,7 +3043,6 @@ it("RestJsonHttpRequestWithGreedyLabelInPath:Request", async () => { const command = new HttpRequestWithGreedyLabelInPathCommand({ foo: "hello/escape", - baz: "there/guy", } as any); try { @@ -3136,19 +3073,12 @@ it("RestJsonInputWithHeadersAndAllParams:Request", async () => { const command = new HttpRequestWithLabelsCommand({ string: "string", - short: 1, - integer: 2, - long: 3, - float: 4.1, - double: 5.1, - boolean: true, - timestamp: new Date(1576540098000), } as any); try { @@ -3179,19 +3109,12 @@ it("RestJsonHttpRequestLabelEscaping:Request", async () => { const command = new HttpRequestWithLabelsCommand({ string: " %:/?#[]@!$&'()*+,;=😹", - short: 1, - integer: 2, - long: 3, - float: 4.1, - double: 5.1, - boolean: true, - timestamp: new Date(1576540098000), } as any); try { @@ -3224,17 +3147,11 @@ it("RestJsonHttpRequestWithLabelsAndTimestampFormat:Request", async () => { const command = new HttpRequestWithLabelsAndTimestampFormatCommand({ memberEpochSeconds: new Date(1576540098000), - memberHttpDate: new Date(1576540098000), - memberDateTime: new Date(1576540098000), - defaultFormat: new Date(1576540098000), - targetEpochSeconds: new Date(1576540098000), - targetHttpDate: new Date(1576540098000), - targetDateTime: new Date(1576540098000), } as any); try { @@ -3323,7 +3240,7 @@ it("RestJsonHttpResponseCode:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3356,7 +3273,7 @@ it("RestJsonHttpResponseCodeWithNoPayload:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3425,7 +3342,7 @@ it("RestJsonStringPayloadResponse:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3496,9 +3413,7 @@ it("RestJsonInputAndOutputWithStringHeaders:Request", async () => { const command = new InputAndOutputWithHeadersCommand({ headerString: "Hello", - headerStringList: ["a", "b", "c"], - headerStringSet: ["a", "b", "c"], } as any); try { @@ -3568,24 +3483,12 @@ it("RestJsonInputAndOutputWithNumericHeaders:Request", async () => { const command = new InputAndOutputWithHeadersCommand({ headerByte: 1, - headerShort: 123, - headerInteger: 123, - headerLong: 123, - headerFloat: 1.1, - headerDouble: 1.1, - - headerIntegerList: [ - 1, - - 2, - - 3, - ], + headerIntegerList: [1, 2, 3], } as any); try { await client.send(command); @@ -3630,9 +3533,7 @@ it("RestJsonInputAndOutputWithBooleanHeaders:Request", async () => { const command = new InputAndOutputWithHeadersCommand({ headerTrueBool: true, - headerFalseBool: false, - headerBooleanList: [true, false, true], } as any); try { @@ -3702,7 +3603,6 @@ it("RestJsonInputAndOutputWithEnumHeaders:Request", async () => { const command = new InputAndOutputWithHeadersCommand({ headerEnum: "Foo", - headerEnumList: ["Foo", "Bar", "Baz"], } as any); try { @@ -3738,14 +3638,7 @@ it("RestJsonInputAndOutputWithIntEnumHeaders:Request", async () => { const command = new InputAndOutputWithHeadersCommand({ headerIntegerEnum: 1, - - headerIntegerEnumList: [ - 1, - - 2, - - 3, - ], + headerIntegerEnumList: [1, 2, 3], } as any); try { await client.send(command); @@ -3780,7 +3673,6 @@ it("RestJsonSupportsNaNFloatHeaderInputs:Request", async () => { const command = new InputAndOutputWithHeadersCommand({ headerFloat: NaN, - headerDouble: NaN, } as any); try { @@ -3816,7 +3708,6 @@ it("RestJsonSupportsInfinityFloatHeaderInputs:Request", async () => { const command = new InputAndOutputWithHeadersCommand({ headerFloat: Infinity, - headerDouble: Infinity, } as any); try { @@ -3852,7 +3743,6 @@ it("RestJsonSupportsNegativeInfinityFloatHeaderInputs:Request", async () => { const command = new InputAndOutputWithHeadersCommand({ headerFloat: -Infinity, - headerDouble: -Infinity, } as any); try { @@ -3904,15 +3794,13 @@ it("RestJsonInputAndOutputWithStringHeaders:Response", async () => { const paramsToValidate: any = [ { headerString: "Hello", - headerStringList: ["a", "b", "c"], - headerStringSet: ["a", "b", "c"], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3945,7 +3833,7 @@ it.skip("RestJsonInputAndOutputWithQuotedStringHeaders:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3980,29 +3868,17 @@ it("RestJsonInputAndOutputWithNumericHeaders:Response", async () => { const paramsToValidate: any = [ { headerByte: 1, - headerShort: 123, - headerInteger: 123, - headerLong: 123, - headerFloat: 1.1, - headerDouble: 1.1, - - headerIntegerList: [ - 1, - - 2, - - 3, - ], + headerIntegerList: [1, 2, 3], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4033,15 +3909,13 @@ it("RestJsonInputAndOutputWithBooleanHeaders:Response", async () => { const paramsToValidate: any = [ { headerTrueBool: true, - headerFalseBool: false, - headerBooleanList: [true, false, true], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4074,7 +3948,7 @@ it("RestJsonInputAndOutputWithTimestampHeaders:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4104,13 +3978,12 @@ it("RestJsonInputAndOutputWithEnumHeaders:Response", async () => { const paramsToValidate: any = [ { headerEnum: "Foo", - headerEnumList: ["Foo", "Bar", "Baz"], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4140,19 +4013,12 @@ it("RestJsonInputAndOutputWithIntEnumHeaders:Response", async () => { const paramsToValidate: any = [ { headerIntegerEnum: 1, - - headerIntegerEnumList: [ - 1, - - 2, - - 3, - ], + headerIntegerEnumList: [1, 2, 3], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4182,13 +4048,12 @@ it("RestJsonSupportsNaNFloatHeaderOutputs:Response", async () => { const paramsToValidate: any = [ { headerFloat: NaN, - headerDouble: NaN, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4218,13 +4083,12 @@ it("RestJsonSupportsInfinityFloatHeaderOutputs:Response", async () => { const paramsToValidate: any = [ { headerFloat: Infinity, - headerDouble: Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4254,13 +4118,12 @@ it("RestJsonSupportsNegativeInfinityFloatHeaderOutputs:Response", async () => { const paramsToValidate: any = [ { headerFloat: -Infinity, - headerDouble: -Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4338,7 +4201,7 @@ it("RestJsonJsonBlobs:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4353,18 +4216,12 @@ it("RestJsonJsonEnums:Request", async () => { const command = new JsonEnumsCommand({ fooEnum1: "Foo", - fooEnum2: "0", - fooEnum3: "1", - fooEnumList: ["Foo", "0"], - fooEnumSet: ["Foo", "0"], - fooEnumMap: { hi: "Foo", - zero: "0", } as any, } as any); @@ -4454,25 +4311,19 @@ it("RestJsonJsonEnums:Response", async () => { const paramsToValidate: any = [ { fooEnum1: "Foo", - fooEnum2: "0", - fooEnum3: "1", - fooEnumList: ["Foo", "0"], - fooEnumSet: ["Foo", "0"], - fooEnumMap: { hi: "Foo", - zero: "0", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4487,28 +4338,12 @@ it("RestJsonJsonIntEnums:Request", async () => { const command = new JsonIntEnumsCommand({ integerEnum1: 1, - integerEnum2: 2, - integerEnum3: 3, - - integerEnumList: [ - 1, - - 2, - - 3, - ], - - integerEnumSet: [ - 1, - - 2, - ], - + integerEnumList: [1, 2, 3], + integerEnumSet: [1, 2], integerEnumMap: { abc: 1, - def: 2, } as any, } as any); @@ -4600,35 +4435,19 @@ it("RestJsonJsonIntEnums:Response", async () => { const paramsToValidate: any = [ { integerEnum1: 1, - integerEnum2: 2, - integerEnum3: 3, - - integerEnumList: [ - 1, - - 2, - - 3, - ], - - integerEnumSet: [ - 1, - - 2, - ], - + integerEnumList: [1, 2, 3], + integerEnumSet: [1, 2], integerEnumMap: { abc: 1, - def: 2, }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4643,43 +4462,23 @@ it("RestJsonLists:Request", async () => { const command = new JsonListsCommand({ stringList: ["foo", "bar"], - stringSet: ["foo", "bar"], - - integerList: [ - 1, - - 2, - ], - + integerList: [1, 2], booleanList: [true, false], - timestampList: [new Date(1398796238000), new Date(1398796238000)], - enumList: ["Foo", "0"], - - intEnumList: [ - 1, - - 2, - ], - + intEnumList: [1, 2], nestedStringList: [ ["foo", "bar"], - ["baz", "qux"], ], - structureList: [ { a: "1", - b: "2", } as any, - { a: "3", - b: "4", } as any, ], @@ -4874,43 +4673,23 @@ it("RestJsonLists:Response", async () => { const paramsToValidate: any = [ { stringList: ["foo", "bar"], - stringSet: ["foo", "bar"], - - integerList: [ - 1, - - 2, - ], - + integerList: [1, 2], booleanList: [true, false], - timestampList: [new Date(1398796238 * 1000), new Date(1398796238 * 1000)], - enumList: ["Foo", "0"], - - intEnumList: [ - 1, - - 2, - ], - + intEnumList: [1, 2], nestedStringList: [ ["foo", "bar"], - ["baz", "qux"], ], - structureList: [ { a: "1", - b: "2", }, - { a: "3", - b: "4", }, ], @@ -4918,7 +4697,7 @@ it("RestJsonLists:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4958,7 +4737,7 @@ it("RestJsonListsEmpty:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4976,7 +4755,6 @@ it("RestJsonJsonMaps:Request", async () => { foo: { hi: "there", } as any, - baz: { hi: "bye", } as any, @@ -5028,7 +4806,6 @@ it("RestJsonSerializesZeroValuesInMaps:Request", async () => { denseNumberMap: { x: 0, } as any, - denseBooleanMap: { x: false, } as any, @@ -5076,7 +4853,6 @@ it("RestJsonSerializesDenseSetMap:Request", async () => { const command = new JsonMapsCommand({ denseSetMap: { x: [], - y: ["a", "b"], } as any, } as any); @@ -5151,7 +4927,6 @@ it("RestJsonJsonMaps:Response", async () => { foo: { hi: "there", }, - baz: { hi: "bye", }, @@ -5160,7 +4935,7 @@ it("RestJsonJsonMaps:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5203,7 +4978,6 @@ it("RestJsonDeserializesZeroValuesInMaps:Response", async () => { denseNumberMap: { x: 0, }, - denseBooleanMap: { x: false, }, @@ -5211,7 +4985,7 @@ it("RestJsonDeserializesZeroValuesInMaps:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5251,14 +5025,13 @@ it("RestJsonDeserializesDenseSetMap:Response", async () => { { denseSetMap: { x: [], - y: ["a", "b"], }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5300,14 +5073,13 @@ it("RestJsonDeserializesDenseSetMapAndSkipsNull:Response", async () => { { denseSetMap: { x: [], - y: ["a", "b"], }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5613,7 +5385,7 @@ it("RestJsonJsonTimestamps:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5653,7 +5425,7 @@ it("RestJsonJsonTimestampsWithDateTimeFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5693,7 +5465,7 @@ it("RestJsonJsonTimestampsWithDateTimeOnTargetFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5733,7 +5505,7 @@ it("RestJsonJsonTimestampsWithEpochSecondsFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5773,7 +5545,7 @@ it("RestJsonJsonTimestampsWithEpochSecondsOnTargetFormat:Response", async () => ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5813,7 +5585,7 @@ it("RestJsonJsonTimestampsWithHttpDateFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5853,7 +5625,7 @@ it("RestJsonJsonTimestampsWithHttpDateOnTargetFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6164,7 +5936,6 @@ it("RestJsonSerializeMapUnionValue:Request", async () => { contents: { mapValue: { foo: "bar", - spam: "eggs", } as any, } as any, @@ -6332,7 +6103,7 @@ it("RestJsonDeserializeStringUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6376,7 +6147,7 @@ it("RestJsonDeserializeBooleanUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6420,7 +6191,7 @@ it("RestJsonDeserializeNumberUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6464,7 +6235,7 @@ it("RestJsonDeserializeBlobUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6508,7 +6279,7 @@ it("RestJsonDeserializeTimestampUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6552,7 +6323,7 @@ it("RestJsonDeserializeEnumUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6596,7 +6367,7 @@ it("RestJsonDeserializeListUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6639,7 +6410,6 @@ it("RestJsonDeserializeMapUnionValue:Response", async () => { contents: { mapValue: { foo: "bar", - spam: "eggs", }, }, @@ -6647,7 +6417,7 @@ it("RestJsonDeserializeMapUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6695,7 +6465,7 @@ it("RestJsonDeserializeStructureUnionValue:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6744,7 +6514,7 @@ it("RestJsonDeserializeIgnoreType:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6809,7 +6579,7 @@ it("MediaTypeHeaderOutputBase64:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6960,9 +6730,7 @@ it("RestJsonNullAndEmptyHeaders:Request", async () => { const command = new NullAndEmptyHeadersClientCommand({ a: null, - b: "", - c: [], } as any); try { @@ -7058,17 +6826,11 @@ it("RestJsonOmitsEmptyListQueryValues:Request", async () => { const command = new OmitsSerializingEmptyListsCommand({ queryStringList: [], - queryIntegerList: [], - queryDoubleList: [], - queryBooleanList: [], - queryTimestampList: [], - queryEnumList: [], - queryIntegerEnumList: [], } as any); try { @@ -7933,7 +7695,7 @@ it("RestJsonOutputUnionWithUnitMember:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -8103,7 +7865,7 @@ it("PostUnionWithJsonNameResponse1:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -8147,7 +7909,7 @@ it("PostUnionWithJsonNameResponse2:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -8191,7 +7953,7 @@ it("PostUnionWithJsonNameResponse3:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -8239,7 +8001,6 @@ it.skip("SDKAppendedGzipAfterProvidedEncoding_restJson1:Request", async () => { const command = new PutWithContentEncodingCommand({ encoding: "custom", - data: "RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk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\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n", } as any); try { @@ -8335,7 +8096,6 @@ it("RestJsonQueryParamsStringListMap:Request", async () => { const command = new QueryParamsAsStringListMapCommand({ qux: "named", - foo: { baz: ["bar", "qux"], } as any, @@ -8373,10 +8133,8 @@ it("RestJsonQueryPrecedence:Request", async () => { const command = new QueryPrecedenceCommand({ foo: "named", - baz: { bar: "fromMap", - qux: "alsoFromMap", } as any, } as any); @@ -8413,13 +8171,10 @@ it("RestJsonRecursiveShapes:Request", async () => { const command = new RecursiveShapesCommand({ nested: { foo: "Foo1", - nested: { bar: "Bar1", - recursiveMember: { foo: "Foo2", - nested: { bar: "Bar2", } as any, @@ -8508,13 +8263,10 @@ it("RestJsonRecursiveShapes:Response", async () => { { nested: { foo: "Foo1", - nested: { bar: "Bar1", - recursiveMember: { foo: "Foo2", - nested: { bar: "Bar2", }, @@ -8525,7 +8277,7 @@ it("RestJsonRecursiveShapes:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -8540,23 +8292,14 @@ it("RestJsonSimpleScalarProperties:Request", async () => { const command = new SimpleScalarPropertiesCommand({ foo: "Foo", - stringValue: "string", - trueBooleanValue: true, - falseBooleanValue: false, - byteValue: 1, - shortValue: 2, - integerValue: 3, - longValue: 4, - floatValue: 5.5, - doubleValue: 6.5, } as any); try { @@ -8642,7 +8385,6 @@ it("RestJsonSupportsNaNFloatInputs:Request", async () => { const command = new SimpleScalarPropertiesCommand({ floatValue: NaN, - doubleValue: NaN, } as any); try { @@ -8683,7 +8425,6 @@ it("RestJsonSupportsInfinityFloatInputs:Request", async () => { const command = new SimpleScalarPropertiesCommand({ floatValue: Infinity, - doubleValue: Infinity, } as any); try { @@ -8724,7 +8465,6 @@ it("RestJsonSupportsNegativeInfinityFloatInputs:Request", async () => { const command = new SimpleScalarPropertiesCommand({ floatValue: -Infinity, - doubleValue: -Infinity, } as any); try { @@ -8795,29 +8535,20 @@ it("RestJsonSimpleScalarProperties:Response", async () => { const paramsToValidate: any = [ { foo: "Foo", - stringValue: "string", - trueBooleanValue: true, - falseBooleanValue: false, - byteValue: 1, - shortValue: 2, - integerValue: 3, - longValue: 4, - floatValue: 5.5, - doubleValue: 6.5, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -8885,13 +8616,12 @@ it("RestJsonSupportsNaNFloatInputs:Response", async () => { const paramsToValidate: any = [ { floatValue: NaN, - doubleValue: NaN, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -8928,13 +8658,12 @@ it("RestJsonSupportsInfinityFloatInputs:Response", async () => { const paramsToValidate: any = [ { floatValue: Infinity, - doubleValue: Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -8971,13 +8700,12 @@ it("RestJsonSupportsNegativeInfinityFloatInputs:Response", async () => { const paramsToValidate: any = [ { floatValue: -Infinity, - doubleValue: -Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -9061,7 +8789,7 @@ it("RestJsonSparseListsSerializeNull:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -9079,7 +8807,6 @@ it("RestJsonSparseJsonMaps:Request", async () => { foo: { hi: "there", } as any, - baz: { hi: "bye", } as any, @@ -9131,15 +8858,12 @@ it("RestJsonSerializesSparseNullMapValues:Request", async () => { sparseBooleanMap: { x: null, } as any, - sparseNumberMap: { x: null, } as any, - sparseStringMap: { x: null, } as any, - sparseStructMap: { x: null, } as any, @@ -9194,7 +8918,6 @@ it("RestJsonSerializesZeroValuesInSparseMaps:Request", async () => { sparseNumberMap: { x: 0, } as any, - sparseBooleanMap: { x: false, } as any, @@ -9242,7 +8965,6 @@ it("RestJsonSerializesSparseSetMap:Request", async () => { const command = new SparseJsonMapsCommand({ sparseSetMap: { x: [], - y: ["a", "b"], } as any, } as any); @@ -9287,9 +9009,7 @@ it("RestJsonSerializesSparseSetMapAndRetainsNull:Request", async () => { const command = new SparseJsonMapsCommand({ sparseSetMap: { x: [], - y: ["a", "b"], - z: null, } as any, } as any); @@ -9365,7 +9085,6 @@ it("RestJsonSparseJsonMaps:Response", async () => { foo: { hi: "there", }, - baz: { hi: "bye", }, @@ -9374,7 +9093,7 @@ it("RestJsonSparseJsonMaps:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -9423,15 +9142,12 @@ it("RestJsonDeserializesSparseNullMapValues:Response", async () => { sparseBooleanMap: { x: null, }, - sparseNumberMap: { x: null, }, - sparseStringMap: { x: null, }, - sparseStructMap: { x: null, }, @@ -9439,7 +9155,7 @@ it("RestJsonDeserializesSparseNullMapValues:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -9482,7 +9198,6 @@ it("RestJsonDeserializesZeroValuesInSparseMaps:Response", async () => { sparseNumberMap: { x: 0, }, - sparseBooleanMap: { x: false, }, @@ -9490,7 +9205,7 @@ it("RestJsonDeserializesZeroValuesInSparseMaps:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -9530,14 +9245,13 @@ it("RestJsonDeserializesSparseSetMap:Response", async () => { { sparseSetMap: { x: [], - y: ["a", "b"], }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -9578,16 +9292,14 @@ it("RestJsonDeserializesSparseSetMapAndRetainsNull:Response", async () => { { sparseSetMap: { x: [], - y: ["a", "b"], - z: null, }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -9602,7 +9314,6 @@ it("RestJsonStreamingTraitsWithBlob:Request", async () => { const command = new StreamingTraitsCommand({ foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), } as any); try { @@ -9694,7 +9405,6 @@ it("RestJsonStreamingTraitsWithBlob:Response", async () => { const paramsToValidate: any = [ { foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), }, ][0]; @@ -9702,9 +9412,9 @@ it("RestJsonStreamingTraitsWithBlob:Response", async () => { Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); if (param === "blob") { - expect(equivalentContents(comparableBlob, paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], comparableBlob)).toBe(true); } else { - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); } }); }); @@ -9745,9 +9455,9 @@ it("RestJsonStreamingTraitsWithNoBlobBody:Response", async () => { Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); if (param === "blob") { - expect(equivalentContents(comparableBlob, paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], comparableBlob)).toBe(true); } else { - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); } }); }); @@ -9763,7 +9473,6 @@ it("RestJsonStreamingTraitsRequireLengthWithBlob:Request", async () => { const command = new StreamingTraitsRequireLengthCommand({ foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), } as any); try { @@ -9836,7 +9545,6 @@ it("RestJsonStreamingTraitsWithMediaTypeWithBlob:Request", async () => { const command = new StreamingTraitsWithMediaTypeCommand({ foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), } as any); try { @@ -9896,7 +9604,6 @@ it("RestJsonStreamingTraitsWithMediaTypeWithBlob:Response", async () => { const paramsToValidate: any = [ { foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), }, ][0]; @@ -9904,9 +9611,9 @@ it("RestJsonStreamingTraitsWithMediaTypeWithBlob:Response", async () => { Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); if (param === "blob") { - expect(equivalentContents(comparableBlob, paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], comparableBlob)).toBe(true); } else { - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); } }); }); @@ -10123,7 +9830,6 @@ it("RestJsonTestPayloadBlob:Request", async () => { const command = new TestPayloadBlobCommand({ contentType: "image/jpg", - data: Uint8Array.from("1234", (c) => c.charCodeAt(0)), } as any); try { @@ -10276,17 +9982,11 @@ it("RestJsonTimestampFormatHeaders:Request", async () => { const command = new TimestampFormatHeadersCommand({ memberEpochSeconds: new Date(1576540098000), - memberHttpDate: new Date(1576540098000), - memberDateTime: new Date(1576540098000), - defaultFormat: new Date(1576540098000), - targetEpochSeconds: new Date(1576540098000), - targetHttpDate: new Date(1576540098000), - targetDateTime: new Date(1576540098000), } as any); try { @@ -10352,23 +10052,17 @@ it("RestJsonTimestampFormatHeaders:Response", async () => { const paramsToValidate: any = [ { memberEpochSeconds: new Date(1576540098 * 1000), - memberHttpDate: new Date(1576540098 * 1000), - memberDateTime: new Date(1576540098 * 1000), - defaultFormat: new Date(1576540098 * 1000), - targetEpochSeconds: new Date(1576540098 * 1000), - targetHttpDate: new Date(1576540098 * 1000), - targetDateTime: new Date(1576540098 * 1000), }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); diff --git a/private/aws-protocoltests-restxml/package.json b/private/aws-protocoltests-restxml/package.json index e67647377043..cb69a98278d5 100644 --- a/private/aws-protocoltests-restxml/package.json +++ b/private/aws-protocoltests-restxml/package.json @@ -32,6 +32,7 @@ "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", "@aws-sdk/xml-builder": "*", +<<<<<<< HEAD "@smithy/config-resolver": "^3.0.5", "@smithy/core": "^2.2.7", "@smithy/fetch-http-handler": "^3.2.2", @@ -57,6 +58,33 @@ "@smithy/util-middleware": "^3.0.3", "@smithy/util-retry": "^3.0.3", "@smithy/util-stream": "^3.1.0", +======= + "@smithy/config-resolver": "^3.0.3", + "@smithy/core": "^2.2.3", + "@smithy/fetch-http-handler": "^3.1.0", + "@smithy/hash-node": "^3.0.2", + "@smithy/invalid-dependency": "^3.0.2", + "@smithy/middleware-compression": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.2", + "@smithy/middleware-retry": "^3.0.6", + "@smithy/middleware-serde": "^3.0.2", + "@smithy/middleware-stack": "^3.0.2", + "@smithy/node-config-provider": "^3.1.2", + "@smithy/node-http-handler": "^3.1.0", + "@smithy/protocol-http": "^4.0.2", + "@smithy/querystring-builder": "^3.0.2", + "@smithy/smithy-client": "^3.1.4", + "@smithy/types": "^3.2.0", + "@smithy/url-parser": "^3.0.2", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.6", + "@smithy/util-defaults-mode-node": "^3.0.6", + "@smithy/util-middleware": "^3.0.2", + "@smithy/util-retry": "^3.0.2", + "@smithy/util-stream": "^3.0.4", +>>>>>>> a4f579b8985 (test(cbor): protocol tests using cbor branch) "@smithy/util-utf8": "^3.0.0", "entities": "2.2.0", "fast-xml-parser": "4.2.5", diff --git a/private/aws-protocoltests-restxml/test/functional/restxml.spec.ts b/private/aws-protocoltests-restxml/test/functional/restxml.spec.ts index e366cf6d80e5..3ce32de5ef11 100644 --- a/private/aws-protocoltests-restxml/test/functional/restxml.spec.ts +++ b/private/aws-protocoltests-restxml/test/functional/restxml.spec.ts @@ -2,7 +2,7 @@ import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; import { buildQueryString } from "@smithy/querystring-builder"; import { Encoder as __Encoder } from "@smithy/types"; -import { HeaderBag, HttpHandlerOptions } from "@smithy/types"; +import { Endpoint, HeaderBag, HttpHandlerOptions } from "@smithy/types"; import { decodeHTML } from "entities"; import { XMLParser } from "fast-xml-parser"; import { Readable } from "stream"; @@ -86,7 +86,9 @@ class RequestSerializationTestHandler implements HttpHandler { handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { return Promise.reject(new EXPECTED_REQUEST_SERIALIZATION_ERROR(request)); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -99,9 +101,10 @@ class ResponseDeserializationTestHandler implements HttpHandler { isSuccess: boolean; code: number; headers: HeaderBag; - body: String; + body: string | Uint8Array; + isBase64Body: boolean; - constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: String) { + constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: string) { this.isSuccess = isSuccess; this.code = code; if (headers === undefined) { @@ -113,6 +116,7 @@ class ResponseDeserializationTestHandler implements HttpHandler { body = ""; } this.body = body; + this.isBase64Body = String(body).length > 0 && Buffer.from(String(body), "base64").toString("base64") === body; } handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { @@ -120,11 +124,13 @@ class ResponseDeserializationTestHandler implements HttpHandler { response: new HttpResponse({ statusCode: this.code, headers: this.headers, - body: Readable.from([this.body]), + body: this.isBase64Body ? toBytes(this.body as string) : Readable.from([this.body]), }), }); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -165,6 +171,11 @@ const compareParts = (expectedParts: comparableParts, generatedParts: comparable * properties that have defined values. */ const equivalentContents = (expected: any, generated: any): boolean => { + if (typeof (global as any).expect === "function") { + expect(normalizeByteArrayType(generated)).toEqual(normalizeByteArrayType(expected)); + return true; + } + const localExpected = expected; // Short circuit on equality. @@ -172,6 +183,10 @@ const equivalentContents = (expected: any, generated: any): boolean => { return true; } + if (typeof expected !== "object") { + return expected === generated; + } + // If a test fails with an issue in the below 6 lines, it's likely // due to an issue in the nestedness or existence of the property // being compared. @@ -203,6 +218,14 @@ const clientParams = { region: "us-west-2", endpoint: "https://localhost/", credentials: { accessKeyId: "key", secretAccessKey: "secret" }, + endpoint: () => { + const url = new URL("https://www.amazon.com/"); + return Promise.resolve({ + ...url, + path: url.pathname, + ...(url.port ? { port: Number(url.port) } : {}), + }) as Promise; + }, }; /** @@ -213,6 +236,37 @@ const fail = (error?: any): never => { throw new Error(error); }; +/** + * Hexadecimal to byteArray. + */ +const toBytes = (hex: string) => { + return Buffer.from(hex, "base64"); +}; + +function normalizeByteArrayType(data: any) { + // normalize float32 errors + if (typeof data === "number") { + const u = new Uint8Array(4); + const dv = new DataView(u.buffer, u.byteOffset, u.byteLength); + dv.setFloat32(0, data); + return dv.getFloat32(0); + } + if (!data || typeof data !== "object") { + return data; + } + if (data instanceof Uint8Array) { + return Uint8Array.from(data); + } + if (data instanceof String || data instanceof Boolean || data instanceof Number) { + return data.valueOf(); + } + const output = {} as any; + for (const key of Object.getOwnPropertyNames(data)) { + output[key] = normalizeByteArrayType(data[key]); + } + return output; +} + /** * Serializes query string parameters with all supported types */ @@ -224,66 +278,25 @@ it("AllQueryStringTypes:Request", async () => { const command = new AllQueryStringTypesCommand({ queryString: "Hello there", - queryStringList: ["a", "b", "c"], - queryStringSet: ["a", "b", "c"], - queryByte: 1, - queryShort: 2, - queryInteger: 3, - - queryIntegerList: [ - 1, - - 2, - - 3, - ], - - queryIntegerSet: [ - 1, - - 2, - - 3, - ], - + queryIntegerList: [1, 2, 3], + queryIntegerSet: [1, 2, 3], queryLong: 4, - queryFloat: 1.1, - queryDouble: 1.1, - - queryDoubleList: [ - 1.1, - - 2.1, - - 3.1, - ], - + queryDoubleList: [1.1, 2.1, 3.1], queryBoolean: true, - queryBooleanList: [true, false, true], - queryTimestamp: new Date(1000), - queryTimestampList: [new Date(1000), new Date(2000), new Date(3000)], - queryEnum: "Foo", - queryEnumList: ["Foo", "Baz", "Bar"], - queryIntegerEnum: 1, - - queryIntegerEnumList: [ - 1, - - 2, - ], + queryIntegerEnumList: [1, 2], } as any); try { await client.send(command); @@ -353,7 +366,6 @@ it("RestXmlQueryStringMap:Request", async () => { const command = new AllQueryStringTypesCommand({ queryParamsMapOfStrings: { QueryParamsStringKeyA: "Foo", - QueryParamsStringKeyB: "Bar", } as any, } as any); @@ -421,7 +433,6 @@ it("RestXmlSupportsNaNFloatQueryValues:Request", async () => { const command = new AllQueryStringTypesCommand({ queryFloat: NaN, - queryDouble: NaN, } as any); try { @@ -456,7 +467,6 @@ it("RestXmlSupportsInfinityFloatQueryValues:Request", async () => { const command = new AllQueryStringTypesCommand({ queryFloat: Infinity, - queryDouble: Infinity, } as any); try { @@ -491,7 +501,6 @@ it("RestXmlSupportsNegativeInfinityFloatQueryValues:Request", async () => { const command = new AllQueryStringTypesCommand({ queryFloat: -Infinity, - queryDouble: -Infinity, } as any); try { @@ -526,7 +535,6 @@ it("RestXmlZeroAndFalseQueryValues:Request", async () => { const command = new AllQueryStringTypesCommand({ queryInteger: 0, - queryBoolean: false, } as any); try { @@ -625,7 +633,7 @@ it("BodyWithXmlName:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -675,7 +683,6 @@ it("ConstantAndVariableQueryStringAllValues:Request", async () => { const command = new ConstantAndVariableQueryStringCommand({ baz: "bam", - maybeSet: "yes", } as any); try { @@ -770,7 +777,7 @@ it("RestXmlDateTimeWithNegativeOffset:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -811,7 +818,7 @@ it("RestXmlDateTimeWithPositiveOffset:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -990,7 +997,6 @@ it("FlattenedXmlMap:Request", async () => { const command = new FlattenedXmlMapCommand({ myMap: { foo: "Foo", - baz: "Baz", } as any, } as any); @@ -1067,14 +1073,13 @@ it("FlattenedXmlMap:Response", async () => { { myMap: { foo: "Foo", - baz: "Baz", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1090,7 +1095,6 @@ it("FlattenedXmlMapWithXmlName:Request", async () => { const command = new FlattenedXmlMapWithXmlNameCommand({ myMap: { a: "A", - b: "B", } as any, } as any); @@ -1167,14 +1171,13 @@ it("FlattenedXmlMapWithXmlName:Response", async () => { { myMap: { a: "A", - b: "B", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1218,14 +1221,13 @@ it("RestXmlFlattenedXmlMapWithXmlNamespace:Response", async () => { { myMap: { a: "A", - b: "B", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1266,7 +1268,7 @@ it("RestXmlDateTimeWithFractionalSeconds:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1304,7 +1306,7 @@ it("GreetingWithErrors:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1353,7 +1355,7 @@ it("InvalidGreetingError:Error:GreetingWithErrors", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); return; } @@ -1402,9 +1404,7 @@ it("ComplexError:Error:GreetingWithErrors", async () => { const paramsToValidate: any = [ { Header: "Header", - TopLevel: "Top level", - Nested: { Foo: "bar", }, @@ -1412,7 +1412,7 @@ it("ComplexError:Error:GreetingWithErrors", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); return; } @@ -1483,7 +1483,7 @@ it("RestXmlEnumPayloadResponse:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1498,7 +1498,6 @@ it("HttpPayloadTraitsWithBlob:Request", async () => { const command = new HttpPayloadTraitsCommand({ foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), } as any); try { @@ -1588,13 +1587,12 @@ it("HttpPayloadTraitsWithBlob:Response", async () => { const paramsToValidate: any = [ { foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1632,7 +1630,7 @@ it("HttpPayloadTraitsWithNoBlobBody:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1647,7 +1645,6 @@ it("HttpPayloadTraitsWithMediaTypeWithBlob:Request", async () => { const command = new HttpPayloadTraitsWithMediaTypeCommand({ foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), } as any); try { @@ -1708,13 +1705,12 @@ it("HttpPayloadTraitsWithMediaTypeWithBlob:Response", async () => { const paramsToValidate: any = [ { foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1793,7 +1789,7 @@ it("HttpPayloadWithMemberXmlName:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1809,7 +1805,6 @@ it("HttpPayloadWithStructure:Request", async () => { const command = new HttpPayloadWithStructureCommand({ nested: { greeting: "hello", - name: "Phreddy", } as any, } as any); @@ -1877,14 +1872,13 @@ it("HttpPayloadWithStructure:Response", async () => { { nested: { greeting: "hello", - name: "Phreddy", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1994,7 +1988,7 @@ it("RestXmlHttpPayloadWithUnion:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2102,7 +2096,7 @@ it("HttpPayloadWithXmlName:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2185,7 +2179,7 @@ it("HttpPayloadWithXmlNamespace:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2268,7 +2262,7 @@ it("HttpPayloadWithXmlNamespaceAndPrefix:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2283,10 +2277,8 @@ it("HttpPrefixHeadersArePresent:Request", async () => { const command = new HttpPrefixHeadersCommand({ foo: "Foo", - fooMap: { Abc: "Abc value", - Def: "Def value", } as any, } as any); @@ -2325,7 +2317,6 @@ it("HttpPrefixHeadersAreNotPresent:Request", async () => { const command = new HttpPrefixHeadersCommand({ foo: "Foo", - fooMap: {} as any, } as any); try { @@ -2380,17 +2371,15 @@ it("HttpPrefixHeadersArePresent:Response", async () => { const paramsToValidate: any = [ { foo: "Foo", - fooMap: { abc: "Abc value", - def: "Def value", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2424,13 +2413,12 @@ it("HttpPrefixHeadersAreNotPresent:Response", async () => { const paramsToValidate: any = [ { foo: "Foo", - fooMap: {}, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2445,7 +2433,6 @@ it("RestXmlSupportsNaNFloatLabels:Request", async () => { const command = new HttpRequestWithFloatLabelsCommand({ float: NaN, - double: NaN, } as any); try { @@ -2476,7 +2463,6 @@ it("RestXmlSupportsInfinityFloatLabels:Request", async () => { const command = new HttpRequestWithFloatLabelsCommand({ float: Infinity, - double: Infinity, } as any); try { @@ -2507,7 +2493,6 @@ it("RestXmlSupportsNegativeInfinityFloatLabels:Request", async () => { const command = new HttpRequestWithFloatLabelsCommand({ float: -Infinity, - double: -Infinity, } as any); try { @@ -2538,7 +2523,6 @@ it("HttpRequestWithGreedyLabelInPath:Request", async () => { const command = new HttpRequestWithGreedyLabelInPathCommand({ foo: "hello", - baz: "there/guy", } as any); try { @@ -2569,19 +2553,12 @@ it("InputWithHeadersAndAllParams:Request", async () => { const command = new HttpRequestWithLabelsCommand({ string: "string", - short: 1, - integer: 2, - long: 3, - float: 4.1, - double: 5.1, - boolean: true, - timestamp: new Date(1576540098000), } as any); try { @@ -2612,19 +2589,12 @@ it("HttpRequestLabelEscaping:Request", async () => { const command = new HttpRequestWithLabelsCommand({ string: " %:/?#[]@!$&'()*+,;=😹", - short: 1, - integer: 2, - long: 3, - float: 4.1, - double: 5.1, - boolean: true, - timestamp: new Date(1576540098000), } as any); try { @@ -2657,17 +2627,11 @@ it("HttpRequestWithLabelsAndTimestampFormat:Request", async () => { const command = new HttpRequestWithLabelsAndTimestampFormatCommand({ memberEpochSeconds: new Date(1576540098000), - memberHttpDate: new Date(1576540098000), - memberDateTime: new Date(1576540098000), - defaultFormat: new Date(1576540098000), - targetEpochSeconds: new Date(1576540098000), - targetHttpDate: new Date(1576540098000), - targetDateTime: new Date(1576540098000), } as any); try { @@ -2723,7 +2687,7 @@ it("RestXmlHttpResponseCode:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2791,7 +2755,7 @@ it("RestXmlStringPayloadResponse:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2829,7 +2793,7 @@ it("IgnoreQueryParamsInResponse:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2844,9 +2808,7 @@ it("InputAndOutputWithStringHeaders:Request", async () => { const command = new InputAndOutputWithHeadersCommand({ headerString: "Hello", - headerStringList: ["a", "b", "c"], - headerStringSet: ["a", "b", "c"], } as any); try { @@ -2884,24 +2846,12 @@ it("InputAndOutputWithNumericHeaders:Request", async () => { const command = new InputAndOutputWithHeadersCommand({ headerByte: 1, - headerShort: 123, - headerInteger: 123, - headerLong: 123, - headerFloat: 1.1, - headerDouble: 1.1, - - headerIntegerList: [ - 1, - - 2, - - 3, - ], + headerIntegerList: [1, 2, 3], } as any); try { await client.send(command); @@ -2946,9 +2896,7 @@ it("InputAndOutputWithBooleanHeaders:Request", async () => { const command = new InputAndOutputWithHeadersCommand({ headerTrueBool: true, - headerFalseBool: false, - headerBooleanList: [true, false, true], } as any); try { @@ -3018,7 +2966,6 @@ it("InputAndOutputWithEnumHeaders:Request", async () => { const command = new InputAndOutputWithHeadersCommand({ headerEnum: "Foo", - headerEnumList: ["Foo", "Bar", "Baz"], } as any); try { @@ -3054,7 +3001,6 @@ it("RestXmlSupportsNaNFloatHeaderInputs:Request", async () => { const command = new InputAndOutputWithHeadersCommand({ headerFloat: NaN, - headerDouble: NaN, } as any); try { @@ -3090,7 +3036,6 @@ it("RestXmlSupportsInfinityFloatHeaderInputs:Request", async () => { const command = new InputAndOutputWithHeadersCommand({ headerFloat: Infinity, - headerDouble: Infinity, } as any); try { @@ -3126,7 +3071,6 @@ it("RestXmlSupportsNegativeInfinityFloatHeaderInputs:Request", async () => { const command = new InputAndOutputWithHeadersCommand({ headerFloat: -Infinity, - headerDouble: -Infinity, } as any); try { @@ -3183,15 +3127,13 @@ it("InputAndOutputWithStringHeaders:Response", async () => { const paramsToValidate: any = [ { headerString: "Hello", - headerStringList: ["a", "b", "c"], - headerStringSet: ["a", "b", "c"], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3231,29 +3173,17 @@ it("InputAndOutputWithNumericHeaders:Response", async () => { const paramsToValidate: any = [ { headerByte: 1, - headerShort: 123, - headerInteger: 123, - headerLong: 123, - headerFloat: 1.1, - headerDouble: 1.1, - - headerIntegerList: [ - 1, - - 2, - - 3, - ], + headerIntegerList: [1, 2, 3], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3289,15 +3219,13 @@ it("InputAndOutputWithBooleanHeaders:Response", async () => { const paramsToValidate: any = [ { headerTrueBool: true, - headerFalseBool: false, - headerBooleanList: [true, false, true], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3335,7 +3263,7 @@ it("InputAndOutputWithTimestampHeaders:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3370,13 +3298,12 @@ it("InputAndOutputWithEnumHeaders:Response", async () => { const paramsToValidate: any = [ { headerEnum: "Foo", - headerEnumList: ["Foo", "Bar", "Baz"], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3411,13 +3338,12 @@ it("RestXmlSupportsNaNFloatHeaderOutputs:Response", async () => { const paramsToValidate: any = [ { headerFloat: NaN, - headerDouble: NaN, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3452,13 +3378,12 @@ it("RestXmlSupportsInfinityFloatHeaderOutputs:Response", async () => { const paramsToValidate: any = [ { headerFloat: Infinity, - headerDouble: Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3493,13 +3418,12 @@ it("RestXmlSupportsNegativeInfinityFloatHeaderOutputs:Response", async () => { const paramsToValidate: any = [ { headerFloat: -Infinity, - headerDouble: -Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3656,7 +3580,7 @@ it("NestedXmlMapResponse:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3709,7 +3633,7 @@ it("FlatNestedXmlMapResponse:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3822,9 +3746,7 @@ it("NullAndEmptyHeaders:Request", async () => { const command = new NullAndEmptyHeadersClientCommand({ a: null, - b: "", - c: [], } as any); try { @@ -3953,7 +3875,6 @@ it.skip("SDKAppendedGzipAfterProvidedEncoding_restXml:Request", async () => { const command = new PutWithContentEncodingCommand({ encoding: "custom", - data: "RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8\nWJO6AcF0DptY9Hk16Bav3z6c5FeBvrGDrxTFVgRUk8SychzjrcqJ4qskwN8rL3zslC0oqobQRnLFOvwJ\nprSzBIwdH2yAuxokXAdVRa1u9NGNRvfWJfKkwbbVz8yV76RUF9KNhAUmwyYDrLnxNj8ROl8B7dv8Gans\n7Bit52wcdiJyjBW1pAodB7zqqVwtBx5RaSpF7kEMXexYXp9N0J1jlXzdeg5Wgg4pO7TJNr2joiPVAiFf\nefwMMCNBkYx2z7cRxVxCJZMXXzxSKMGgdTN24bJ5UgE0TxyV52RC0wGWG49S1x5jGrvmxKCIgYPs0w3Z\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:Request", async () => { const command = new QueryParamsAsStringListMapCommand({ qux: "named", - foo: { baz: ["bar", "qux"], } as any, @@ -4087,10 +4007,8 @@ it("RestXmlQueryPrecedence:Request", async () => { const command = new QueryPrecedenceCommand({ foo: "named", - baz: { bar: "fromMap", - qux: "alsoFromMap", } as any, } as any); @@ -4127,13 +4045,10 @@ it("RecursiveShapes:Request", async () => { const command = new RecursiveShapesCommand({ nested: { foo: "Foo1", - nested: { bar: "Bar1", - recursiveMember: { foo: "Foo2", - nested: { bar: "Bar2", } as any, @@ -4224,13 +4139,10 @@ it("RecursiveShapes:Response", async () => { { nested: { foo: "Foo1", - nested: { bar: "Bar1", - recursiveMember: { foo: "Foo2", - nested: { bar: "Bar2", }, @@ -4241,7 +4153,7 @@ it("RecursiveShapes:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4256,23 +4168,14 @@ it("SimpleScalarProperties:Request", async () => { const command = new SimpleScalarPropertiesCommand({ foo: "Foo", - stringValue: "string", - trueBooleanValue: true, - falseBooleanValue: false, - byteValue: 1, - shortValue: 2, - integerValue: 3, - longValue: 4, - floatValue: 5.5, - doubleValue: 6.5, } as any); try { @@ -4323,7 +4226,6 @@ it("SimpleScalarPropertiesWithEscapedCharacter:Request", async () => { const command = new SimpleScalarPropertiesCommand({ foo: "Foo", - stringValue: "", } as any); try { @@ -4366,7 +4268,6 @@ it("SimpleScalarPropertiesWithWhiteSpace:Request", async () => { const command = new SimpleScalarPropertiesCommand({ foo: "Foo", - stringValue: " string with white space ", } as any); try { @@ -4409,7 +4310,6 @@ it("SimpleScalarPropertiesPureWhiteSpace:Request", async () => { const command = new SimpleScalarPropertiesCommand({ foo: "Foo", - stringValue: " ", } as any); try { @@ -4452,7 +4352,6 @@ it("RestXmlSupportsNaNFloatInputs:Request", async () => { const command = new SimpleScalarPropertiesCommand({ floatValue: NaN, - doubleValue: NaN, } as any); try { @@ -4494,7 +4393,6 @@ it("RestXmlSupportsInfinityFloatInputs:Request", async () => { const command = new SimpleScalarPropertiesCommand({ floatValue: Infinity, - doubleValue: Infinity, } as any); try { @@ -4536,7 +4434,6 @@ it("RestXmlSupportsNegativeInfinityFloatInputs:Request", async () => { const command = new SimpleScalarPropertiesCommand({ floatValue: -Infinity, - doubleValue: -Infinity, } as any); try { @@ -4609,29 +4506,20 @@ it("SimpleScalarProperties:Response", async () => { const paramsToValidate: any = [ { foo: "Foo", - stringValue: "string", - trueBooleanValue: true, - falseBooleanValue: false, - byteValue: 1, - shortValue: 2, - integerValue: 3, - longValue: 4, - floatValue: 5.5, - doubleValue: 6.5, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4675,13 +4563,12 @@ it("SimpleScalarPropertiesComplexEscapes:Response", async () => { const paramsToValidate: any = [ { foo: "Foo", - stringValue: "escaped data: <\r\n", }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4719,13 +4606,12 @@ it("SimpleScalarPropertiesWithEscapedCharacter:Response", async () => { const paramsToValidate: any = [ { foo: "Foo", - stringValue: "", }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4766,13 +4652,12 @@ it("SimpleScalarPropertiesWithXMLPreamble:Response", async () => { const paramsToValidate: any = [ { foo: "Foo", - stringValue: "string", }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4811,13 +4696,12 @@ it("SimpleScalarPropertiesWithWhiteSpace:Response", async () => { const paramsToValidate: any = [ { foo: "Foo", - stringValue: " string with white space ", }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4856,13 +4740,12 @@ it("SimpleScalarPropertiesPureWhiteSpace:Response", async () => { const paramsToValidate: any = [ { foo: "Foo", - stringValue: " ", }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4900,13 +4783,12 @@ it("RestXmlSupportsNaNFloatOutputs:Response", async () => { const paramsToValidate: any = [ { floatValue: NaN, - doubleValue: NaN, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4944,13 +4826,12 @@ it("RestXmlSupportsInfinityFloatOutputs:Response", async () => { const paramsToValidate: any = [ { floatValue: Infinity, - doubleValue: Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4988,13 +4869,12 @@ it("RestXmlSupportsNegativeInfinityFloatOutputs:Response", async () => { const paramsToValidate: any = [ { floatValue: -Infinity, - doubleValue: -Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5009,17 +4889,11 @@ it("TimestampFormatHeaders:Request", async () => { const command = new TimestampFormatHeadersCommand({ memberEpochSeconds: new Date(1576540098000), - memberHttpDate: new Date(1576540098000), - memberDateTime: new Date(1576540098000), - defaultFormat: new Date(1576540098000), - targetEpochSeconds: new Date(1576540098000), - targetHttpDate: new Date(1576540098000), - targetDateTime: new Date(1576540098000), } as any); try { @@ -5090,23 +4964,17 @@ it("TimestampFormatHeaders:Response", async () => { const paramsToValidate: any = [ { memberEpochSeconds: new Date(1576540098 * 1000), - memberHttpDate: new Date(1576540098 * 1000), - memberDateTime: new Date(1576540098 * 1000), - defaultFormat: new Date(1576540098 * 1000), - targetEpochSeconds: new Date(1576540098 * 1000), - targetHttpDate: new Date(1576540098 * 1000), - targetDateTime: new Date(1576540098 * 1000), }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5121,7 +4989,6 @@ it("XmlAttributes:Request", async () => { const command = new XmlAttributesCommand({ foo: "hi", - attr: "test", } as any); try { @@ -5162,7 +5029,6 @@ it("XmlAttributesWithEscaping:Request", async () => { const command = new XmlAttributesCommand({ foo: "hi", - attr: "", } as any); try { @@ -5225,13 +5091,12 @@ it("XmlAttributes:Response", async () => { const paramsToValidate: any = [ { foo: "hi", - attr: "test", }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5247,7 +5112,6 @@ it("XmlAttributesOnPayload:Request", async () => { const command = new XmlAttributesOnPayloadCommand({ payload: { foo: "hi", - attr: "test", } as any, } as any); @@ -5312,14 +5176,13 @@ it("XmlAttributesOnPayload:Response", async () => { { payload: { foo: "hi", - attr: "test", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5399,7 +5262,7 @@ it("XmlBlobs:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5440,7 +5303,7 @@ it("XmlEmptyBlobs:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5481,7 +5344,7 @@ it("XmlEmptySelfClosedBlobs:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5496,7 +5359,6 @@ it("XmlEmptyLists:Request", async () => { const command = new XmlEmptyListsCommand({ stringList: [], - stringSet: [], } as any); try { @@ -5561,13 +5423,12 @@ it("XmlEmptyLists:Response", async () => { const paramsToValidate: any = [ { stringList: [], - stringSet: [], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5647,7 +5508,7 @@ it("XmlEmptyMaps:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5688,7 +5549,7 @@ it("XmlEmptySelfClosedMaps:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5768,7 +5629,7 @@ it("XmlEmptyStrings:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5809,7 +5670,7 @@ it("XmlEmptySelfClosedStrings:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5824,18 +5685,12 @@ it("XmlEnums:Request", async () => { const command = new XmlEnumsCommand({ fooEnum1: "Foo", - fooEnum2: "0", - fooEnum3: "1", - fooEnumList: ["Foo", "0"], - fooEnumSet: ["Foo", "0"], - fooEnumMap: { hi: "Foo", - zero: "0", } as any, } as any); @@ -5939,25 +5794,19 @@ it("XmlEnums:Response", async () => { const paramsToValidate: any = [ { fooEnum1: "Foo", - fooEnum2: "0", - fooEnum3: "1", - fooEnumList: ["Foo", "0"], - fooEnumSet: ["Foo", "0"], - fooEnumMap: { hi: "Foo", - zero: "0", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5972,26 +5821,12 @@ it("XmlIntEnums:Request", async () => { const command = new XmlIntEnumsCommand({ intEnum1: 1, - intEnum2: 2, - intEnum3: 3, - - intEnumList: [ - 1, - - 2, - ], - - intEnumSet: [ - 1, - - 2, - ], - + intEnumList: [1, 2], + intEnumSet: [1, 2], intEnumMap: { a: 1, - b: 2, } as any, } as any); @@ -6095,33 +5930,19 @@ it("XmlIntEnums:Response", async () => { const paramsToValidate: any = [ { intEnum1: 1, - intEnum2: 2, - intEnum3: 3, - - intEnumList: [ - 1, - - 2, - ], - - intEnumSet: [ - 1, - - 2, - ], - + intEnumList: [1, 2], + intEnumSet: [1, 2], intEnumMap: { a: 1, - b: 2, }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6136,63 +5957,36 @@ it("XmlLists:Request", async () => { const command = new XmlListsCommand({ stringList: ["foo", "bar"], - stringSet: ["foo", "bar"], - - integerList: [ - 1, - - 2, - ], - + integerList: [1, 2], booleanList: [true, false], - timestampList: [new Date(1398796238000), new Date(1398796238000)], - enumList: ["Foo", "0"], - - intEnumList: [ - 1, - - 2, - ], - + intEnumList: [1, 2], nestedStringList: [ ["foo", "bar"], - ["baz", "qux"], ], - renamedListMembers: ["foo", "bar"], - flattenedList: ["hi", "bye"], - flattenedList2: ["yep", "nope"], - structureList: [ { a: "1", - b: "2", } as any, - { a: "3", - b: "4", } as any, ], - flattenedStructureList: [ { a: "5", - b: "6", } as any, - { a: "7", - b: "8", } as any, ], @@ -6387,67 +6181,38 @@ it("XmlLists:Response", async () => { const paramsToValidate: any = [ { stringList: ["foo", "bar"], - stringSet: ["foo", "bar"], - - integerList: [ - 1, - - 2, - ], - + integerList: [1, 2], booleanList: [true, false], - timestampList: [new Date(1398796238 * 1000), new Date(1398796238 * 1000)], - enumList: ["Foo", "0"], - - intEnumList: [ - 1, - - 2, - ], - + intEnumList: [1, 2], nestedStringList: [ ["foo", "bar"], - ["baz", "qux"], ], - renamedListMembers: ["foo", "bar"], - flattenedList: ["hi", "bye"], - flattenedList2: ["yep", "nope"], - flattenedListWithMemberNamespace: ["a", "b"], - flattenedListWithNamespace: ["a", "b"], - structureList: [ { a: "1", - b: "2", }, - { a: "3", - b: "4", }, ], - flattenedStructureList: [ { a: "5", - b: "6", }, - { a: "7", - b: "8", }, ], @@ -6455,7 +6220,7 @@ it("XmlLists:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6473,7 +6238,6 @@ it("XmlMaps:Request", async () => { foo: { hi: "there", } as any, - baz: { hi: "bye", } as any, @@ -6568,7 +6332,6 @@ it("XmlMaps:Response", async () => { foo: { hi: "there", }, - baz: { hi: "bye", }, @@ -6577,7 +6340,7 @@ it("XmlMaps:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6595,7 +6358,6 @@ it("XmlMapsXmlName:Request", async () => { foo: { hi: "there", } as any, - baz: { hi: "bye", } as any, @@ -6690,7 +6452,6 @@ it("XmlMapsXmlName:Response", async () => { foo: { hi: "there", }, - baz: { hi: "bye", }, @@ -6699,7 +6460,7 @@ it("XmlMapsXmlName:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6715,7 +6476,6 @@ it("RestXmlXmlMapWithXmlNamespace:Request", async () => { const command = new XmlMapWithXmlNamespaceCommand({ myMap: { a: "A", - b: "B", } as any, } as any); @@ -6796,14 +6556,13 @@ it("RestXmlXmlMapWithXmlNamespace:Response", async () => { { myMap: { a: "A", - b: "B", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6819,7 +6578,6 @@ it("XmlNamespaces:Request", async () => { const command = new XmlNamespacesCommand({ nested: { foo: "Foo", - values: ["Bar", "Baz"], } as any, } as any); @@ -6896,14 +6654,13 @@ it("XmlNamespaces:Response", async () => { { nested: { foo: "Foo", - values: ["Bar", "Baz"], }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -7217,7 +6974,7 @@ it("XmlTimestamps:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -7258,7 +7015,7 @@ it("XmlTimestampsWithDateTimeFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -7299,7 +7056,7 @@ it("XmlTimestampsWithDateTimeOnTargetFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -7340,7 +7097,7 @@ it("XmlTimestampsWithEpochSecondsFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -7381,7 +7138,7 @@ it("XmlTimestampsWithEpochSecondsOnTargetFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -7422,7 +7179,7 @@ it("XmlTimestampsWithHttpDateFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -7463,7 +7220,7 @@ it("XmlTimestampsWithHttpDateOnTargetFormat:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -7480,19 +7237,12 @@ it("XmlUnionsWithStructMember:Request", async () => { unionValue: { structValue: { stringValue: "string", - booleanValue: true, - byteValue: 1, - shortValue: 2, - integerValue: 3, - longValue: 4, - floatValue: 5.5, - doubleValue: 6.5, } as any, } as any, @@ -7714,19 +7464,12 @@ it("XmlUnionsWithStructMember:Response", async () => { unionValue: { structValue: { stringValue: "string", - booleanValue: true, - byteValue: 1, - shortValue: 2, - integerValue: 3, - longValue: 4, - floatValue: 5.5, - doubleValue: 6.5, }, }, @@ -7734,7 +7477,7 @@ it("XmlUnionsWithStructMember:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -7779,7 +7522,7 @@ it("XmlUnionsWithStringMember:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -7824,7 +7567,7 @@ it("XmlUnionsWithBooleanMember:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -7873,7 +7616,7 @@ it("XmlUnionsWithUnionMember:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); diff --git a/private/aws-restjson-server/package.json b/private/aws-restjson-server/package.json index ffa99931a43b..2b2528e5e0f1 100644 --- a/private/aws-restjson-server/package.json +++ b/private/aws-restjson-server/package.json @@ -23,6 +23,7 @@ "@aws-sdk/core": "*", "@aws-sdk/types": "*", "@aws-smithy/server-common": "1.0.0-alpha.10", +<<<<<<< HEAD "@smithy/config-resolver": "^3.0.5", "@smithy/fetch-http-handler": "^3.2.2", "@smithy/hash-node": "^3.0.3", @@ -41,6 +42,26 @@ "@smithy/util-body-length-node": "^3.0.0", "@smithy/util-defaults-mode-browser": "^3.0.10", "@smithy/util-defaults-mode-node": "^3.0.10", +======= + "@smithy/config-resolver": "^3.0.3", + "@smithy/fetch-http-handler": "^3.1.0", + "@smithy/hash-node": "^3.0.2", + "@smithy/invalid-dependency": "^3.0.2", + "@smithy/middleware-content-length": "^3.0.2", + "@smithy/middleware-retry": "^3.0.6", + "@smithy/middleware-serde": "^3.0.2", + "@smithy/middleware-stack": "^3.0.2", + "@smithy/node-http-handler": "^3.1.0", + "@smithy/protocol-http": "^4.0.2", + "@smithy/smithy-client": "^3.1.4", + "@smithy/types": "^3.2.0", + "@smithy/url-parser": "^3.0.2", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.6", + "@smithy/util-defaults-mode-node": "^3.0.6", +>>>>>>> a4f579b8985 (test(cbor): protocol tests using cbor branch) "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2" }, diff --git a/private/aws-restjson-server/test/functional/restjson1.spec.ts b/private/aws-restjson-server/test/functional/restjson1.spec.ts index 2b5fa056b311..01a206e0a3fd 100644 --- a/private/aws-restjson-server/test/functional/restjson1.spec.ts +++ b/private/aws-restjson-server/test/functional/restjson1.spec.ts @@ -9,7 +9,7 @@ import { import { streamCollector as __streamCollector } from "@smithy/node-http-handler"; import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; import { Encoder as __Encoder } from "@smithy/types"; -import { HeaderBag, HttpHandlerOptions } from "@smithy/types"; +import { Endpoint, HeaderBag, HttpHandlerOptions } from "@smithy/types"; import { toUtf8 as __utf8Encoder } from "@smithy/util-utf8"; import { Readable } from "stream"; @@ -255,7 +255,9 @@ class RequestSerializationTestHandler implements HttpHandler { handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { return Promise.reject(new EXPECTED_REQUEST_SERIALIZATION_ERROR(request)); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -268,9 +270,10 @@ class ResponseDeserializationTestHandler implements HttpHandler { isSuccess: boolean; code: number; headers: HeaderBag; - body: String; + body: string | Uint8Array; + isBase64Body: boolean; - constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: String) { + constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: string) { this.isSuccess = isSuccess; this.code = code; if (headers === undefined) { @@ -282,6 +285,7 @@ class ResponseDeserializationTestHandler implements HttpHandler { body = ""; } this.body = body; + this.isBase64Body = String(body).length > 0 && Buffer.from(String(body), "base64").toString("base64") === body; } handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { @@ -289,11 +293,13 @@ class ResponseDeserializationTestHandler implements HttpHandler { response: new HttpResponse({ statusCode: this.code, headers: this.headers, - body: Readable.from([this.body]), + body: this.isBase64Body ? toBytes(this.body as string) : Readable.from([this.body]), }), }); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -334,6 +340,11 @@ const compareParts = (expectedParts: comparableParts, generatedParts: comparable * properties that have defined values. */ const equivalentContents = (expected: any, generated: any): boolean => { + if (typeof (global as any).expect === "function") { + expect(normalizeByteArrayType(generated)).toEqual(normalizeByteArrayType(expected)); + return true; + } + const localExpected = expected; // Short circuit on equality. @@ -341,6 +352,10 @@ const equivalentContents = (expected: any, generated: any): boolean => { return true; } + if (typeof expected !== "object") { + return expected === generated; + } + // If a test fails with an issue in the below 6 lines, it's likely // due to an issue in the nestedness or existence of the property // being compared. @@ -372,6 +387,14 @@ const clientParams = { region: "us-west-2", endpoint: "https://localhost/", credentials: { accessKeyId: "key", secretAccessKey: "secret" }, + endpoint: () => { + const url = new URL("https://www.amazon.com/"); + return Promise.resolve({ + ...url, + path: url.pathname, + ...(url.port ? { port: Number(url.port) } : {}), + }) as Promise; + }, }; /** @@ -382,6 +405,37 @@ const fail = (error?: any): never => { throw new Error(error); }; +/** + * Hexadecimal to byteArray. + */ +const toBytes = (hex: string) => { + return Buffer.from(hex, "base64"); +}; + +function normalizeByteArrayType(data: any) { + // normalize float32 errors + if (typeof data === "number") { + const u = new Uint8Array(4); + const dv = new DataView(u.buffer, u.byteOffset, u.byteLength); + dv.setFloat32(0, data); + return dv.getFloat32(0); + } + if (!data || typeof data !== "object") { + return data; + } + if (data instanceof Uint8Array) { + return Uint8Array.from(data); + } + if (data instanceof String || data instanceof Boolean || data instanceof Number) { + return data.valueOf(); + } + const output = {} as any; + for (const key of Object.getOwnPropertyNames(data)) { + output[key] = normalizeByteArrayType(data[key]); + } + return output; +} + /** * Serializes query string parameters with all supported types */ @@ -437,115 +491,52 @@ it("RestJsonAllQueryStringTypes:ServerRequest", async () => { const paramsToValidate: any = [ { queryString: "Hello there", - queryStringList: ["a", "b", "c"], - queryStringSet: ["a", "b", "c"], - queryByte: 1, - queryShort: 2, - queryInteger: 3, - - queryIntegerList: [ - 1, - - 2, - - 3, - ], - - queryIntegerSet: [ - 1, - - 2, - - 3, - ], - + queryIntegerList: [1, 2, 3], + queryIntegerSet: [1, 2, 3], queryLong: 4, - queryFloat: 1.1, - queryDouble: 1.1, - - queryDoubleList: [ - 1.1, - - 2.1, - - 3.1, - ], - + queryDoubleList: [1.1, 2.1, 3.1], queryBoolean: true, - queryBooleanList: [true, false, true], - queryTimestamp: new Date(1 * 1000), - queryTimestampList: [new Date(1 * 1000), new Date(2 * 1000), new Date(3 * 1000)], - queryEnum: "Foo", - queryEnumList: ["Foo", "Baz", "Bar"], - queryIntegerEnum: 1, - - queryIntegerEnumList: [ - 1, - - 2, - - 3, - ], - + queryIntegerEnumList: [1, 2, 3], queryParamsMapOfStringList: { String: ["Hello there"], - StringList: ["a", "b", "c"], - StringSet: ["a", "b", "c"], - Byte: ["1"], - Short: ["2"], - Integer: ["3"], - IntegerList: ["1", "2", "3"], - IntegerSet: ["1", "2", "3"], - Long: ["4"], - Float: ["1.1"], - Double: ["1.1"], - DoubleList: ["1.1", "2.1", "3.1"], - Boolean: ["true"], - BooleanList: ["true", "false", "true"], - Timestamp: ["1970-01-01T00:00:01Z"], - TimestampList: ["1970-01-01T00:00:01Z", "1970-01-01T00:00:02Z", "1970-01-01T00:00:03Z"], - Enum: ["Foo"], - EnumList: ["Foo", "Baz", "Bar"], - IntegerEnum: ["1"], - IntegerEnumList: ["1", "2", "3"], }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -587,14 +578,13 @@ it("RestJsonQueryStringMap:ServerRequest", async () => { { queryParamsMapOfStringList: { QueryParamsStringKeyA: ["Foo"], - QueryParamsStringKeyB: ["Bar"], }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -634,7 +624,6 @@ it("RestJsonQueryStringEscaping:ServerRequest", async () => { const paramsToValidate: any = [ { queryString: " %:/?#[]@!$&'()*+,;=😹", - queryParamsMapOfStringList: { String: [" %:/?#[]@!$&'()*+,;=😹"], }, @@ -642,7 +631,7 @@ it("RestJsonQueryStringEscaping:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -683,19 +672,16 @@ it("RestJsonSupportsNaNFloatQueryValues:ServerRequest", async () => { const paramsToValidate: any = [ { queryFloat: NaN, - queryDouble: NaN, - queryParamsMapOfStringList: { Float: ["NaN"], - Double: ["NaN"], }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -736,19 +722,16 @@ it("RestJsonSupportsInfinityFloatQueryValues:ServerRequest", async () => { const paramsToValidate: any = [ { queryFloat: Infinity, - queryDouble: Infinity, - queryParamsMapOfStringList: { Float: ["Infinity"], - Double: ["Infinity"], }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -789,19 +772,16 @@ it("RestJsonSupportsNegativeInfinityFloatQueryValues:ServerRequest", async () => const paramsToValidate: any = [ { queryFloat: -Infinity, - queryDouble: -Infinity, - queryParamsMapOfStringList: { Float: ["-Infinity"], - Double: ["-Infinity"], }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -842,19 +822,16 @@ it("RestJsonZeroAndFalseQueryValues:ServerRequest", async () => { const paramsToValidate: any = [ { queryInteger: 0, - queryBoolean: false, - queryParamsMapOfStringList: { Integer: ["0"], - Boolean: ["false"], }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -899,7 +876,7 @@ it("RestJsonConstantAndVariableQueryStringMissingOneValue:ServerRequest", async ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -941,13 +918,12 @@ it("RestJsonConstantAndVariableQueryStringAllValues:ServerRequest", async () => const paramsToValidate: any = [ { baz: "bam", - maybeSet: "yes", }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -992,7 +968,7 @@ it("RestJsonConstantQueryString:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1076,7 +1052,6 @@ it("DocumentTypeInputWithObject:ServerRequest", async () => { const paramsToValidate: any = [ { stringValue: "string", - documentValue: { foo: "bar", }, @@ -1084,7 +1059,7 @@ it("DocumentTypeInputWithObject:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1124,13 +1099,12 @@ it("DocumentInputWithString:ServerRequest", async () => { const paramsToValidate: any = [ { stringValue: "string", - documentValue: "hello", }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1170,13 +1144,12 @@ it("DocumentInputWithNumber:ServerRequest", async () => { const paramsToValidate: any = [ { stringValue: "string", - documentValue: 10, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1216,13 +1189,12 @@ it("DocumentInputWithBoolean:ServerRequest", async () => { const paramsToValidate: any = [ { stringValue: "string", - documentValue: true, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1264,18 +1236,10 @@ it("DocumentInputWithList:ServerRequest", async () => { const paramsToValidate: any = [ { stringValue: "string", - documentValue: [ true, - "hi", - - [ - 1, - - 2, - ], - + [1, 2], { foo: { baz: [3, 4], @@ -1286,7 +1250,7 @@ it("DocumentInputWithList:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1298,7 +1262,6 @@ it("DocumentOutput:ServerResponse", async () => { DocumentType(input: any, ctx: {}): Promise { const response = { stringValue: "string", - documentValue: { foo: "bar", }, @@ -1363,7 +1326,6 @@ it("DocumentOutputString:ServerResponse", async () => { DocumentType(input: any, ctx: {}): Promise { const response = { stringValue: "string", - documentValue: "hello", } as any; return Promise.resolve({ ...response, $metadata: {} }); @@ -1424,7 +1386,6 @@ it("DocumentOutputNumber:ServerResponse", async () => { DocumentType(input: any, ctx: {}): Promise { const response = { stringValue: "string", - documentValue: 10, } as any; return Promise.resolve({ ...response, $metadata: {} }); @@ -1485,7 +1446,6 @@ it("DocumentOutputBoolean:ServerResponse", async () => { DocumentType(input: any, ctx: {}): Promise { const response = { stringValue: "string", - documentValue: false, } as any; return Promise.resolve({ ...response, $metadata: {} }); @@ -1546,7 +1506,6 @@ it("DocumentOutputArray:ServerResponse", async () => { DocumentType(input: any, ctx: {}): Promise { const response = { stringValue: "string", - documentValue: [true, false], } as any; return Promise.resolve({ ...response, $metadata: {} }); @@ -1644,16 +1603,14 @@ it("DocumentTypeAsMapValueInput:ServerRequest", async () => { f: 1, o: 2, }, - bar: ["b", "a", "r"], - baz: "BAZ", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1669,9 +1626,7 @@ it("DocumentTypeAsMapValueOutput:ServerResponse", async () => { f: 1, o: 2, }, - bar: ["b", "a", "r"], - baz: "BAZ", } as any, } as any; @@ -1770,7 +1725,7 @@ it("DocumentTypeAsPayloadInput:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1814,7 +1769,7 @@ it("DocumentTypeAsPayloadInputString:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2132,7 +2087,7 @@ it("RestJsonEndpointTraitWithHostLabel:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2204,9 +2159,7 @@ it("RestJsonComplexErrorWithNoMessage:ServerErrorResponse", async () => { GreetingWithErrors(input: any, ctx: {}): Promise { const response = { Header: "Header", - TopLevel: "Top level", - Nested: { Foo: "bar", } as any, @@ -2439,7 +2392,7 @@ it("RestJsonHttpChecksumRequired:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2480,7 +2433,7 @@ it("RestJsonEnumPayloadRequest:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2574,13 +2527,12 @@ it("RestJsonHttpPayloadTraitsWithBlob:ServerRequest", async () => { const paramsToValidate: any = [ { foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2624,7 +2576,7 @@ it("RestJsonHttpPayloadTraitsWithNoBlobBody:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2666,13 +2618,12 @@ it("RestJsonHttpPayloadTraitsWithBlobAcceptsAllContentTypes:ServerRequest", asyn const paramsToValidate: any = [ { foo: "Foo", - blob: Uint8Array.from("This is definitely a jpeg", (c) => c.charCodeAt(0)), }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2761,13 +2712,12 @@ it("RestJsonHttpPayloadTraitsWithBlobAcceptsAllAccepts:ServerRequest", async () const paramsToValidate: any = [ { foo: "Foo", - blob: Uint8Array.from("This is definitely a jpeg", (c) => c.charCodeAt(0)), }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2779,7 +2729,6 @@ it("RestJsonHttpPayloadTraitsWithBlob:ServerResponse", async () => { HttpPayloadTraits(input: any, ctx: {}): Promise { const response = { foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), } as any; return Promise.resolve({ ...response, $metadata: {} }); @@ -2918,13 +2867,12 @@ it("RestJsonHttpPayloadTraitsWithMediaTypeWithBlob:ServerRequest", async () => { const paramsToValidate: any = [ { foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2936,7 +2884,6 @@ it("RestJsonHttpPayloadTraitsWithMediaTypeWithBlob:ServerResponse", async () => HttpPayloadTraitsWithMediaType(input: any, ctx: {}): Promise { const response = { foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), } as any; return Promise.resolve({ ...response, $metadata: {} }); @@ -3025,14 +2972,13 @@ it("RestJsonHttpPayloadWithStructure:ServerRequest", async () => { { nested: { greeting: "hello", - name: "Phreddy", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3045,7 +2991,6 @@ it("RestJsonHttpPayloadWithStructure:ServerResponse", async () => { const response = { nested: { greeting: "hello", - name: "Phreddy", } as any, } as any; @@ -3141,7 +3086,7 @@ it("RestJsonHttpPayloadWithUnion:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3325,17 +3270,15 @@ it("RestJsonHttpPrefixHeadersArePresent:ServerRequest", async () => { const paramsToValidate: any = [ { foo: "Foo", - fooMap: { abc: "Abc value", - def: "Def value", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3347,10 +3290,8 @@ it("RestJsonHttpPrefixHeadersArePresent:ServerResponse", async () => { HttpPrefixHeaders(input: any, ctx: {}): Promise { const response = { foo: "Foo", - fooMap: { Abc: "Abc value", - Def: "Def value", } as any, } as any; @@ -3408,7 +3349,6 @@ it("HttpPrefixHeadersResponse:ServerResponse", async () => { const response = { prefixHeaders: { "X-Foo": "Foo", - Hello: "Hello", } as any, } as any; @@ -3489,13 +3429,12 @@ it("RestJsonSupportsNaNFloatLabels:ServerRequest", async () => { const paramsToValidate: any = [ { float: NaN, - double: NaN, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3533,13 +3472,12 @@ it("RestJsonSupportsInfinityFloatLabels:ServerRequest", async () => { const paramsToValidate: any = [ { float: Infinity, - double: Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3577,13 +3515,12 @@ it("RestJsonSupportsNegativeInfinityFloatLabels:ServerRequest", async () => { const paramsToValidate: any = [ { float: -Infinity, - double: -Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3621,13 +3558,12 @@ it("RestJsonHttpRequestWithGreedyLabelInPath:ServerRequest", async () => { const paramsToValidate: any = [ { foo: "hello/escape", - baz: "there/guy", }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3665,25 +3601,18 @@ it("RestJsonInputWithHeadersAndAllParams:ServerRequest", async () => { const paramsToValidate: any = [ { string: "string", - short: 1, - integer: 2, - long: 3, - float: 4.1, - double: 5.1, - boolean: true, - timestamp: new Date(1576540098 * 1000), }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3721,25 +3650,18 @@ it("RestJsonHttpRequestLabelEscaping:ServerRequest", async () => { const paramsToValidate: any = [ { string: " %:/?#[]@!$&'()*+,;=😹", - short: 1, - integer: 2, - long: 3, - float: 4.1, - double: 5.1, - boolean: true, - timestamp: new Date(1576540098 * 1000), }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3777,23 +3699,17 @@ it("RestJsonHttpRequestWithLabelsAndTimestampFormat:ServerRequest", async () => const paramsToValidate: any = [ { memberEpochSeconds: new Date(1576540098 * 1000), - memberHttpDate: new Date(1576540098 * 1000), - memberDateTime: new Date(1576540098 * 1000), - defaultFormat: new Date(1576540098 * 1000), - targetEpochSeconds: new Date(1576540098 * 1000), - targetHttpDate: new Date(1576540098 * 1000), - targetDateTime: new Date(1576540098 * 1000), }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3835,7 +3751,7 @@ it("RestJsonToleratesRegexCharsInSegments:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3993,7 +3909,7 @@ it("RestJsonStringPayloadRequest:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4258,15 +4174,13 @@ it("RestJsonInputAndOutputWithStringHeaders:ServerRequest", async () => { const paramsToValidate: any = [ { headerString: "Hello", - headerStringList: ["a", "b", "c"], - headerStringSet: ["a", "b", "c"], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4310,7 +4224,7 @@ it.skip("RestJsonInputAndOutputWithQuotedStringHeaders:ServerRequest", async () ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4356,29 +4270,17 @@ it("RestJsonInputAndOutputWithNumericHeaders:ServerRequest", async () => { const paramsToValidate: any = [ { headerByte: 1, - headerShort: 123, - headerInteger: 123, - headerLong: 123, - headerFloat: 1.1, - headerDouble: 1.1, - - headerIntegerList: [ - 1, - - 2, - - 3, - ], + headerIntegerList: [1, 2, 3], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4420,15 +4322,13 @@ it("RestJsonInputAndOutputWithBooleanHeaders:ServerRequest", async () => { const paramsToValidate: any = [ { headerTrueBool: true, - headerFalseBool: false, - headerBooleanList: [true, false, true], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4472,7 +4372,7 @@ it("RestJsonInputAndOutputWithTimestampHeaders:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4513,13 +4413,12 @@ it("RestJsonInputAndOutputWithEnumHeaders:ServerRequest", async () => { const paramsToValidate: any = [ { headerEnum: "Foo", - headerEnumList: ["Foo", "Bar", "Baz"], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4560,19 +4459,12 @@ it("RestJsonInputAndOutputWithIntEnumHeaders:ServerRequest", async () => { const paramsToValidate: any = [ { headerIntegerEnum: 1, - - headerIntegerEnumList: [ - 1, - - 2, - - 3, - ], + headerIntegerEnumList: [1, 2, 3], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4613,13 +4505,12 @@ it("RestJsonSupportsNaNFloatHeaderInputs:ServerRequest", async () => { const paramsToValidate: any = [ { headerFloat: NaN, - headerDouble: NaN, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4660,13 +4551,12 @@ it("RestJsonSupportsInfinityFloatHeaderInputs:ServerRequest", async () => { const paramsToValidate: any = [ { headerFloat: Infinity, - headerDouble: Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4707,13 +4597,12 @@ it("RestJsonSupportsNegativeInfinityFloatHeaderInputs:ServerRequest", async () = const paramsToValidate: any = [ { headerFloat: -Infinity, - headerDouble: -Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -4725,9 +4614,7 @@ it("RestJsonInputAndOutputWithStringHeaders:ServerResponse", async () => { InputAndOutputWithHeaders(input: any, ctx: {}): Promise { const response = { headerString: "Hello", - headerStringList: ["a", "b", "c"], - headerStringSet: ["a", "b", "c"], } as any; return Promise.resolve({ ...response, $metadata: {} }); @@ -4833,24 +4720,12 @@ it("RestJsonInputAndOutputWithNumericHeaders:ServerResponse", async () => { InputAndOutputWithHeaders(input: any, ctx: {}): Promise { const response = { headerByte: 1, - headerShort: 123, - headerInteger: 123, - headerLong: 123, - headerFloat: 1.1, - headerDouble: 1.1, - - headerIntegerList: [ - 1, - - 2, - - 3, - ], + headerIntegerList: [1, 2, 3], } as any; return Promise.resolve({ ...response, $metadata: {} }); } @@ -4913,9 +4788,7 @@ it("RestJsonInputAndOutputWithBooleanHeaders:ServerResponse", async () => { InputAndOutputWithHeaders(input: any, ctx: {}): Promise { const response = { headerTrueBool: true, - headerFalseBool: false, - headerBooleanList: [true, false, true], } as any; return Promise.resolve({ ...response, $metadata: {} }); @@ -5021,7 +4894,6 @@ it("RestJsonInputAndOutputWithEnumHeaders:ServerResponse", async () => { InputAndOutputWithHeaders(input: any, ctx: {}): Promise { const response = { headerEnum: "Foo", - headerEnumList: ["Foo", "Bar", "Baz"], } as any; return Promise.resolve({ ...response, $metadata: {} }); @@ -5075,14 +4947,7 @@ it("RestJsonInputAndOutputWithIntEnumHeaders:ServerResponse", async () => { InputAndOutputWithHeaders(input: any, ctx: {}): Promise { const response = { headerIntegerEnum: 1, - - headerIntegerEnumList: [ - 1, - - 2, - - 3, - ], + headerIntegerEnumList: [1, 2, 3], } as any; return Promise.resolve({ ...response, $metadata: {} }); } @@ -5135,7 +5000,6 @@ it("RestJsonSupportsNaNFloatHeaderOutputs:ServerResponse", async () => { InputAndOutputWithHeaders(input: any, ctx: {}): Promise { const response = { headerFloat: NaN, - headerDouble: NaN, } as any; return Promise.resolve({ ...response, $metadata: {} }); @@ -5189,7 +5053,6 @@ it("RestJsonSupportsInfinityFloatHeaderOutputs:ServerResponse", async () => { InputAndOutputWithHeaders(input: any, ctx: {}): Promise { const response = { headerFloat: Infinity, - headerDouble: Infinity, } as any; return Promise.resolve({ ...response, $metadata: {} }); @@ -5243,7 +5106,6 @@ it("RestJsonSupportsNegativeInfinityFloatHeaderOutputs:ServerResponse", async () InputAndOutputWithHeaders(input: any, ctx: {}): Promise { const response = { headerFloat: -Infinity, - headerDouble: -Infinity, } as any; return Promise.resolve({ ...response, $metadata: {} }); @@ -5329,7 +5191,7 @@ it("RestJsonJsonBlobs:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5429,25 +5291,19 @@ it("RestJsonJsonEnums:ServerRequest", async () => { const paramsToValidate: any = [ { fooEnum1: "Foo", - fooEnum2: "0", - fooEnum3: "1", - fooEnumList: ["Foo", "0"], - fooEnumSet: ["Foo", "0"], - fooEnumMap: { hi: "Foo", - zero: "0", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5459,18 +5315,12 @@ it("RestJsonJsonEnums:ServerResponse", async () => { JsonEnums(input: any, ctx: {}): Promise { const response = { fooEnum1: "Foo", - fooEnum2: "0", - fooEnum3: "1", - fooEnumList: ["Foo", "0"], - fooEnumSet: ["Foo", "0"], - fooEnumMap: { hi: "Foo", - zero: "0", } as any, } as any; @@ -5575,35 +5425,19 @@ it("RestJsonJsonIntEnums:ServerRequest", async () => { const paramsToValidate: any = [ { integerEnum1: 1, - integerEnum2: 2, - integerEnum3: 3, - - integerEnumList: [ - 1, - - 2, - - 3, - ], - - integerEnumSet: [ - 1, - - 2, - ], - + integerEnumList: [1, 2, 3], + integerEnumSet: [1, 2], integerEnumMap: { abc: 1, - def: 2, }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5615,28 +5449,12 @@ it("RestJsonJsonIntEnums:ServerResponse", async () => { JsonIntEnums(input: any, ctx: {}): Promise { const response = { integerEnum1: 1, - integerEnum2: 2, - integerEnum3: 3, - - integerEnumList: [ - 1, - - 2, - - 3, - ], - - integerEnumSet: [ - 1, - - 2, - ], - + integerEnumList: [1, 2, 3], + integerEnumSet: [1, 2], integerEnumMap: { abc: 1, - def: 2, } as any, } as any; @@ -5742,43 +5560,23 @@ it("RestJsonLists:ServerRequest", async () => { const paramsToValidate: any = [ { stringList: ["foo", "bar"], - stringSet: ["foo", "bar"], - - integerList: [ - 1, - - 2, - ], - + integerList: [1, 2], booleanList: [true, false], - timestampList: [new Date(1398796238 * 1000), new Date(1398796238 * 1000)], - enumList: ["Foo", "0"], - - intEnumList: [ - 1, - - 2, - ], - + intEnumList: [1, 2], nestedStringList: [ ["foo", "bar"], - ["baz", "qux"], ], - structureList: [ { a: "1", - b: "2", }, - { a: "3", - b: "4", }, ], @@ -5786,7 +5584,7 @@ it("RestJsonLists:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5830,7 +5628,7 @@ it("RestJsonListsEmpty:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -5842,43 +5640,23 @@ it("RestJsonLists:ServerResponse", async () => { JsonLists(input: any, ctx: {}): Promise { const response = { stringList: ["foo", "bar"], - stringSet: ["foo", "bar"], - - integerList: [ - 1, - - 2, - ], - + integerList: [1, 2], booleanList: [true, false], - timestampList: [new Date(1398796238000), new Date(1398796238000)], - enumList: ["Foo", "0"], - - intEnumList: [ - 1, - - 2, - ], - + intEnumList: [1, 2], nestedStringList: [ ["foo", "bar"], - ["baz", "qux"], ], - structureList: [ { a: "1", - b: "2", } as any, - { a: "3", - b: "4", } as any, ], @@ -6078,7 +5856,6 @@ it("RestJsonJsonMaps:ServerRequest", async () => { foo: { hi: "there", }, - baz: { hi: "bye", }, @@ -6087,7 +5864,7 @@ it("RestJsonJsonMaps:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6131,7 +5908,6 @@ it("RestJsonSerializesZeroValuesInMaps:ServerRequest", async () => { denseNumberMap: { x: 0, }, - denseBooleanMap: { x: false, }, @@ -6139,7 +5915,7 @@ it("RestJsonSerializesZeroValuesInMaps:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6180,14 +5956,13 @@ it("RestJsonSerializesDenseSetMap:ServerRequest", async () => { { denseSetMap: { x: [], - y: ["a", "b"], }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6202,7 +5977,6 @@ it("RestJsonJsonMaps:ServerResponse", async () => { foo: { hi: "there", } as any, - baz: { hi: "bye", } as any, @@ -6274,7 +6048,6 @@ it("RestJsonDeserializesZeroValuesInMaps:ServerResponse", async () => { denseNumberMap: { x: 0, } as any, - denseBooleanMap: { x: false, } as any, @@ -6342,7 +6115,6 @@ it("RestJsonDeserializesDenseSetMap:ServerResponse", async () => { const response = { denseSetMap: { x: [], - y: ["a", "b"], } as any, } as any; @@ -6438,7 +6210,7 @@ it("RestJsonJsonTimestamps:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6482,7 +6254,7 @@ it("RestJsonJsonTimestampsWithDateTimeFormat:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6526,7 +6298,7 @@ it("RestJsonJsonTimestampsWithDateTimeOnTargetFormat:ServerRequest", async () => ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6570,7 +6342,7 @@ it("RestJsonJsonTimestampsWithEpochSecondsFormat:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6614,7 +6386,7 @@ it("RestJsonJsonTimestampsWithEpochSecondsOnTargetFormat:ServerRequest", async ( ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6658,7 +6430,7 @@ it("RestJsonJsonTimestampsWithHttpDateFormat:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -6702,7 +6474,7 @@ it("RestJsonJsonTimestampsWithHttpDateOnTargetFormat:ServerRequest", async () => ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -7154,7 +6926,7 @@ it("RestJsonSerializeStringUnionValue:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -7200,7 +6972,7 @@ it("RestJsonSerializeBooleanUnionValue:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -7246,7 +7018,7 @@ it("RestJsonSerializeNumberUnionValue:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -7292,7 +7064,7 @@ it("RestJsonSerializeBlobUnionValue:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -7338,7 +7110,7 @@ it("RestJsonSerializeTimestampUnionValue:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -7384,7 +7156,7 @@ it("RestJsonSerializeEnumUnionValue:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -7430,7 +7202,7 @@ it("RestJsonSerializeListUnionValue:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -7474,7 +7246,6 @@ it("RestJsonSerializeMapUnionValue:ServerRequest", async () => { contents: { mapValue: { foo: "bar", - spam: "eggs", }, }, @@ -7482,7 +7253,7 @@ it("RestJsonSerializeMapUnionValue:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -7532,7 +7303,7 @@ it("RestJsonSerializeStructureUnionValue:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -7582,7 +7353,7 @@ it("RestJsonSerializeRenamedStructureUnionValue:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -8030,7 +7801,6 @@ it("RestJsonDeserializeMapUnionValue:ServerResponse", async () => { contents: { mapValue: { foo: "bar", - spam: "eggs", } as any, } as any, @@ -27793,7 +27563,7 @@ it("MediaTypeHeaderInputBase64:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -28096,9 +27866,7 @@ it("RestJsonNullAndEmptyHeaders:ServerResponse", async () => { NullAndEmptyHeadersServer(input: any, ctx: {}): Promise { const response = { a: null, - b: "", - c: [], } as any; return Promise.resolve({ ...response, $metadata: {} }); @@ -28183,7 +27951,7 @@ it("RestJsonSerializesEmptyQueryValue:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -28227,7 +27995,7 @@ it("RestJsonServersAcceptStaticQueryParamAsEmptyString:ServerRequest", async () ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -28692,7 +28460,7 @@ it("RestJsonInputUnionWithUnitMember:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -28800,7 +28568,7 @@ it("PostUnionWithJsonNameRequest1:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -28846,7 +28614,7 @@ it("PostUnionWithJsonNameRequest2:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -28892,7 +28660,7 @@ it("PostUnionWithJsonNameRequest3:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -29121,7 +28889,7 @@ it.skip("SDKAppliedContentEncoding_restJson1:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -29163,13 +28931,12 @@ it.skip("SDKAppendedGzipAfterProvidedEncoding_restJson1:ServerRequest", async () const params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dqWMR7gGx9slXtG8S3KxpOi4qCD7yg3saD66nun4dzksQURoTUdXyrJR5UpHsfIlTF1aJa\nMdXyQtQnrkl00TeghQd00rRFZsCnhi0qrCSKiBfB2EVrd9RPpbgwJGZHuIQecdBmNetc2ylSEClqVBPR\nGOPPIxrnswEZjmnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n", }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -29210,17 +28977,15 @@ it("RestJsonServersQueryParamsStringListMap:ServerRequest", async () => { const paramsToValidate: any = [ { qux: "named", - foo: { corge: ["named"], - baz: ["bar", "qux"], }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -29261,17 +29026,15 @@ it("RestJsonServersPutAllQueryParamsInMap:ServerRequest", async () => { const paramsToValidate: any = [ { foo: "named", - baz: { bar: "named", - qux: "fromMap", }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -29314,13 +29077,10 @@ it("RestJsonRecursiveShapes:ServerRequest", async () => { { nested: { foo: "Foo1", - nested: { bar: "Bar1", - recursiveMember: { foo: "Foo2", - nested: { bar: "Bar2", }, @@ -29331,7 +29091,7 @@ it("RestJsonRecursiveShapes:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -29344,13 +29104,10 @@ it("RestJsonRecursiveShapes:ServerResponse", async () => { const response = { nested: { foo: "Foo1", - nested: { bar: "Bar1", - recursiveMember: { foo: "Foo2", - nested: { bar: "Bar2", } as any, @@ -29457,29 +29214,20 @@ it("RestJsonSimpleScalarProperties:ServerRequest", async () => { const paramsToValidate: any = [ { foo: "Foo", - stringValue: "string", - trueBooleanValue: true, - falseBooleanValue: false, - byteValue: 1, - shortValue: 2, - integerValue: 3, - longValue: 4, - floatValue: 5.5, - doubleValue: 6.5, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -29553,13 +29301,12 @@ it("RestJsonSupportsNaNFloatInputs:ServerRequest", async () => { const paramsToValidate: any = [ { floatValue: NaN, - doubleValue: NaN, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -29599,13 +29346,12 @@ it("RestJsonSupportsInfinityFloatInputs:ServerRequest", async () => { const paramsToValidate: any = [ { floatValue: Infinity, - doubleValue: Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -29645,13 +29391,12 @@ it("RestJsonSupportsNegativeInfinityFloatInputs:ServerRequest", async () => { const paramsToValidate: any = [ { floatValue: -Infinity, - doubleValue: -Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -29663,23 +29408,14 @@ it("RestJsonSimpleScalarProperties:ServerResponse", async () => { SimpleScalarProperties(input: any, ctx: {}): Promise { const response = { foo: "Foo", - stringValue: "string", - trueBooleanValue: true, - falseBooleanValue: false, - byteValue: 1, - shortValue: 2, - integerValue: 3, - longValue: 4, - floatValue: 5.5, - doubleValue: 6.5, } as any; return Promise.resolve({ ...response, $metadata: {} }); @@ -29805,7 +29541,6 @@ it("RestJsonSupportsNaNFloatInputs:ServerResponse", async () => { SimpleScalarProperties(input: any, ctx: {}): Promise { const response = { floatValue: NaN, - doubleValue: NaN, } as any; return Promise.resolve({ ...response, $metadata: {} }); @@ -29866,7 +29601,6 @@ it("RestJsonSupportsInfinityFloatInputs:ServerResponse", async () => { SimpleScalarProperties(input: any, ctx: {}): Promise { const response = { floatValue: Infinity, - doubleValue: Infinity, } as any; return Promise.resolve({ ...response, $metadata: {} }); @@ -29927,7 +29661,6 @@ it("RestJsonSupportsNegativeInfinityFloatInputs:ServerResponse", async () => { SimpleScalarProperties(input: any, ctx: {}): Promise { const response = { floatValue: -Infinity, - doubleValue: -Infinity, } as any; return Promise.resolve({ ...response, $metadata: {} }); @@ -30020,7 +29753,7 @@ it("RestJsonSparseListsSerializeNull:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -30126,7 +29859,6 @@ it("RestJsonSparseJsonMaps:ServerRequest", async () => { foo: { hi: "there", }, - baz: { hi: "bye", }, @@ -30135,7 +29867,7 @@ it("RestJsonSparseJsonMaps:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -30179,15 +29911,12 @@ it("RestJsonSerializesSparseNullMapValues:ServerRequest", async () => { sparseBooleanMap: { x: null, }, - sparseNumberMap: { x: null, }, - sparseStringMap: { x: null, }, - sparseStructMap: { x: null, }, @@ -30195,7 +29924,7 @@ it("RestJsonSerializesSparseNullMapValues:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -30239,7 +29968,6 @@ it("RestJsonSerializesZeroValuesInSparseMaps:ServerRequest", async () => { sparseNumberMap: { x: 0, }, - sparseBooleanMap: { x: false, }, @@ -30247,7 +29975,7 @@ it("RestJsonSerializesZeroValuesInSparseMaps:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -30288,14 +30016,13 @@ it("RestJsonSerializesSparseSetMap:ServerRequest", async () => { { sparseSetMap: { x: [], - y: ["a", "b"], }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -30338,16 +30065,14 @@ it("RestJsonSerializesSparseSetMapAndRetainsNull:ServerRequest", async () => { { sparseSetMap: { x: [], - y: ["a", "b"], - z: null, }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -30362,7 +30087,6 @@ it("RestJsonSparseJsonMaps:ServerResponse", async () => { foo: { hi: "there", } as any, - baz: { hi: "bye", } as any, @@ -30434,15 +30158,12 @@ it("RestJsonDeserializesSparseNullMapValues:ServerResponse", async () => { sparseBooleanMap: { x: null, } as any, - sparseNumberMap: { x: null, } as any, - sparseStringMap: { x: null, } as any, - sparseStructMap: { x: null, } as any, @@ -30517,7 +30238,6 @@ it("RestJsonDeserializesZeroValuesInSparseMaps:ServerResponse", async () => { sparseNumberMap: { x: 0, } as any, - sparseBooleanMap: { x: false, } as any, @@ -30585,7 +30305,6 @@ it("RestJsonDeserializesSparseSetMap:ServerResponse", async () => { const response = { sparseSetMap: { x: [], - y: ["a", "b"], } as any, } as any; @@ -30650,9 +30369,7 @@ it("RestJsonDeserializesSparseSetMapAndRetainsNull:ServerResponse", async () => const response = { sparseSetMap: { x: [], - y: ["a", "b"], - z: null, } as any, } as any; @@ -30746,7 +30463,6 @@ it("RestJsonStreamingTraitsWithBlob:ServerRequest", async () => { const paramsToValidate: any = [ { foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), }, ][0]; @@ -30754,9 +30470,9 @@ it("RestJsonStreamingTraitsWithBlob:ServerRequest", async () => { Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); if (param === "blob") { - expect(equivalentContents(comparableBlob, paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], comparableBlob)).toBe(true); } else { - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); } }); }); @@ -30803,9 +30519,9 @@ it("RestJsonStreamingTraitsWithNoBlobBody:ServerRequest", async () => { Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); if (param === "blob") { - expect(equivalentContents(comparableBlob, paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], comparableBlob)).toBe(true); } else { - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); } }); }); @@ -30818,7 +30534,6 @@ it("RestJsonStreamingTraitsWithBlob:ServerResponse", async () => { StreamingTraits(input: any, ctx: {}): Promise { const response = { foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), } as any; return Promise.resolve({ ...response, $metadata: {} }); @@ -30959,7 +30674,6 @@ it("RestJsonStreamingTraitsRequireLengthWithBlob:ServerRequest", async () => { const paramsToValidate: any = [ { foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), }, ][0]; @@ -30967,9 +30681,9 @@ it("RestJsonStreamingTraitsRequireLengthWithBlob:ServerRequest", async () => { Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); if (param === "blob") { - expect(equivalentContents(comparableBlob, paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], comparableBlob)).toBe(true); } else { - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); } }); }); @@ -31016,9 +30730,9 @@ it("RestJsonStreamingTraitsRequireLengthWithNoBlobBody:ServerRequest", async () Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); if (param === "blob") { - expect(equivalentContents(comparableBlob, paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], comparableBlob)).toBe(true); } else { - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); } }); }); @@ -31060,7 +30774,6 @@ it("RestJsonStreamingTraitsWithMediaTypeWithBlob:ServerRequest", async () => { const paramsToValidate: any = [ { foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), }, ][0]; @@ -31068,9 +30781,9 @@ it("RestJsonStreamingTraitsWithMediaTypeWithBlob:ServerRequest", async () => { Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); if (param === "blob") { - expect(equivalentContents(comparableBlob, paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], comparableBlob)).toBe(true); } else { - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); } }); }); @@ -31083,7 +30796,6 @@ it("RestJsonStreamingTraitsWithMediaTypeWithBlob:ServerResponse", async () => { StreamingTraitsWithMediaType(input: any, ctx: {}): Promise { const response = { foo: "Foo", - blob: Uint8Array.from("blobby blob blob", (c) => c.charCodeAt(0)), } as any; return Promise.resolve({ ...response, $metadata: {} }); @@ -31177,7 +30889,7 @@ it("RestJsonTestBodyStructure:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -31319,7 +31031,7 @@ it("RestJsonHttpWithHeaderMemberNoModeledBody:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -31393,13 +31105,12 @@ it("RestJsonTestPayloadBlob:ServerRequest", async () => { const paramsToValidate: any = [ { contentType: "image/jpg", - data: Uint8Array.from("1234", (c) => c.charCodeAt(0)), }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -31479,7 +31190,7 @@ it("RestJsonTestPayloadStructure:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -31524,7 +31235,7 @@ it("RestJsonHttpWithHeadersButNoPayload:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -31570,23 +31281,17 @@ it("RestJsonTimestampFormatHeaders:ServerRequest", async () => { const paramsToValidate: any = [ { memberEpochSeconds: new Date(1576540098 * 1000), - memberHttpDate: new Date(1576540098 * 1000), - memberDateTime: new Date(1576540098 * 1000), - defaultFormat: new Date(1576540098 * 1000), - targetEpochSeconds: new Date(1576540098 * 1000), - targetHttpDate: new Date(1576540098 * 1000), - targetDateTime: new Date(1576540098 * 1000), }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -31598,17 +31303,11 @@ it("RestJsonTimestampFormatHeaders:ServerResponse", async () => { TimestampFormatHeaders(input: any, ctx: {}): Promise { const response = { memberEpochSeconds: new Date(1576540098000), - memberHttpDate: new Date(1576540098000), - memberDateTime: new Date(1576540098000), - defaultFormat: new Date(1576540098000), - targetEpochSeconds: new Date(1576540098000), - targetHttpDate: new Date(1576540098000), - targetDateTime: new Date(1576540098000), } as any; return Promise.resolve({ ...response, $metadata: {} }); diff --git a/private/aws-restjson-validation-server/package.json b/private/aws-restjson-validation-server/package.json index 4f36d71b00ae..72b97eca7971 100644 --- a/private/aws-restjson-validation-server/package.json +++ b/private/aws-restjson-validation-server/package.json @@ -23,6 +23,7 @@ "@aws-sdk/core": "*", "@aws-sdk/types": "*", "@aws-smithy/server-common": "1.0.0-alpha.10", +<<<<<<< HEAD "@smithy/config-resolver": "^3.0.5", "@smithy/fetch-http-handler": "^3.2.2", "@smithy/hash-node": "^3.0.3", @@ -41,6 +42,26 @@ "@smithy/util-body-length-node": "^3.0.0", "@smithy/util-defaults-mode-browser": "^3.0.10", "@smithy/util-defaults-mode-node": "^3.0.10", +======= + "@smithy/config-resolver": "^3.0.3", + "@smithy/fetch-http-handler": "^3.1.0", + "@smithy/hash-node": "^3.0.2", + "@smithy/invalid-dependency": "^3.0.2", + "@smithy/middleware-content-length": "^3.0.2", + "@smithy/middleware-retry": "^3.0.6", + "@smithy/middleware-serde": "^3.0.2", + "@smithy/middleware-stack": "^3.0.2", + "@smithy/node-http-handler": "^3.1.0", + "@smithy/protocol-http": "^4.0.2", + "@smithy/smithy-client": "^3.1.4", + "@smithy/types": "^3.2.0", + "@smithy/url-parser": "^3.0.2", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.6", + "@smithy/util-defaults-mode-node": "^3.0.6", +>>>>>>> a4f579b8985 (test(cbor): protocol tests using cbor branch) "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2" }, diff --git a/private/aws-restjson-validation-server/test/functional/restjson1.spec.ts b/private/aws-restjson-validation-server/test/functional/restjson1.spec.ts index 874512103279..b9a93adbfc32 100644 --- a/private/aws-restjson-validation-server/test/functional/restjson1.spec.ts +++ b/private/aws-restjson-validation-server/test/functional/restjson1.spec.ts @@ -1,6 +1,6 @@ // smithy-typescript generated code import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; -import { HeaderBag, HttpHandlerOptions } from "@smithy/types"; +import { Endpoint, HeaderBag, HttpHandlerOptions } from "@smithy/types"; import { toUtf8 as __utf8Encoder } from "@smithy/util-utf8"; import { Readable } from "stream"; @@ -36,7 +36,9 @@ class RequestSerializationTestHandler implements HttpHandler { handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { return Promise.reject(new EXPECTED_REQUEST_SERIALIZATION_ERROR(request)); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -49,9 +51,10 @@ class ResponseDeserializationTestHandler implements HttpHandler { isSuccess: boolean; code: number; headers: HeaderBag; - body: String; + body: string | Uint8Array; + isBase64Body: boolean; - constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: String) { + constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: string) { this.isSuccess = isSuccess; this.code = code; if (headers === undefined) { @@ -63,6 +66,7 @@ class ResponseDeserializationTestHandler implements HttpHandler { body = ""; } this.body = body; + this.isBase64Body = String(body).length > 0 && Buffer.from(String(body), "base64").toString("base64") === body; } handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { @@ -70,11 +74,13 @@ class ResponseDeserializationTestHandler implements HttpHandler { response: new HttpResponse({ statusCode: this.code, headers: this.headers, - body: Readable.from([this.body]), + body: this.isBase64Body ? toBytes(this.body as string) : Readable.from([this.body]), }), }); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -115,6 +121,11 @@ const compareParts = (expectedParts: comparableParts, generatedParts: comparable * properties that have defined values. */ const equivalentContents = (expected: any, generated: any): boolean => { + if (typeof (global as any).expect === "function") { + expect(normalizeByteArrayType(generated)).toEqual(normalizeByteArrayType(expected)); + return true; + } + const localExpected = expected; // Short circuit on equality. @@ -122,6 +133,10 @@ const equivalentContents = (expected: any, generated: any): boolean => { return true; } + if (typeof expected !== "object") { + return expected === generated; + } + // If a test fails with an issue in the below 6 lines, it's likely // due to an issue in the nestedness or existence of the property // being compared. @@ -153,6 +168,14 @@ const clientParams = { region: "us-west-2", endpoint: "https://localhost/", credentials: { accessKeyId: "key", secretAccessKey: "secret" }, + endpoint: () => { + const url = new URL("https://www.amazon.com/"); + return Promise.resolve({ + ...url, + path: url.pathname, + ...(url.port ? { port: Number(url.port) } : {}), + }) as Promise; + }, }; /** @@ -163,6 +186,37 @@ const fail = (error?: any): never => { throw new Error(error); }; +/** + * Hexadecimal to byteArray. + */ +const toBytes = (hex: string) => { + return Buffer.from(hex, "base64"); +}; + +function normalizeByteArrayType(data: any) { + // normalize float32 errors + if (typeof data === "number") { + const u = new Uint8Array(4); + const dv = new DataView(u.buffer, u.byteOffset, u.byteLength); + dv.setFloat32(0, data); + return dv.getFloat32(0); + } + if (!data || typeof data !== "object") { + return data; + } + if (data instanceof Uint8Array) { + return Uint8Array.from(data); + } + if (data instanceof String || data instanceof Boolean || data instanceof Number) { + return data.valueOf(); + } + const output = {} as any; + for (const key of Object.getOwnPropertyNames(data)) { + output[key] = normalizeByteArrayType(data[key]); + } + return output; +} + /** * When a string member does not contain a valid enum value, * the response should be a 400 ValidationException. Internal-only @@ -4912,7 +4966,7 @@ it("RestJsonRecursiveStructuresValidate:ServerRequest", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); diff --git a/private/smithy-rpcv2-cbor/package.json b/private/smithy-rpcv2-cbor/package.json index 83d4113f3bc4..c35a84ca7d33 100644 --- a/private/smithy-rpcv2-cbor/package.json +++ b/private/smithy-rpcv2-cbor/package.json @@ -10,15 +10,15 @@ "build:types": "tsc -p tsconfig.types.json", "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", - "test": "jest -c ./jest.config.js" + "test": "jest" }, "main": "./dist-cjs/index.js", "types": "./dist-types/index.d.ts", "module": "./dist-es/index.js", "sideEffects": false, "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", "@aws-sdk/middleware-host-header": "*", "@aws-sdk/middleware-logger": "*", "@aws-sdk/middleware-recursion-detection": "*", @@ -26,28 +26,28 @@ "@aws-sdk/types": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^3.0.1", - "@smithy/core": "^2.2.0", - "@smithy/fetch-http-handler": "^3.0.1", - "@smithy/hash-node": "^3.0.0", - "@smithy/invalid-dependency": "^3.0.0", - "@smithy/middleware-content-length": "^3.0.0", - "@smithy/middleware-retry": "^3.0.3", - "@smithy/middleware-serde": "^3.0.0", - "@smithy/middleware-stack": "^3.0.0", - "@smithy/node-config-provider": "^3.1.0", - "@smithy/node-http-handler": "^3.0.0", - "@smithy/protocol-http": "^4.0.0", - "@smithy/smithy-client": "^3.1.1", - "@smithy/types": "^3.0.0", - "@smithy/url-parser": "^3.0.0", + "@smithy/config-resolver": "^3.0.3", + "@smithy/core": "^2.2.3", + "@smithy/fetch-http-handler": "^3.1.0", + "@smithy/hash-node": "^3.0.2", + "@smithy/invalid-dependency": "^3.0.2", + "@smithy/middleware-content-length": "^3.0.2", + "@smithy/middleware-retry": "^3.0.6", + "@smithy/middleware-serde": "^3.0.2", + "@smithy/middleware-stack": "^3.0.2", + "@smithy/node-config-provider": "^3.1.2", + "@smithy/node-http-handler": "^3.1.0", + "@smithy/protocol-http": "^4.0.2", + "@smithy/smithy-client": "^3.1.4", + "@smithy/types": "^3.2.0", + "@smithy/url-parser": "^3.0.2", "@smithy/util-base64": "^3.0.0", "@smithy/util-body-length-browser": "^3.0.0", "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.3", - "@smithy/util-defaults-mode-node": "^3.0.3", - "@smithy/util-middleware": "^3.0.0", - "@smithy/util-retry": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.6", + "@smithy/util-defaults-mode-node": "^3.0.6", + "@smithy/util-middleware": "^3.0.2", + "@smithy/util-retry": "^3.0.2", "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2" }, diff --git a/private/smithy-rpcv2-cbor/src/RpcV2ProtocolClient.ts b/private/smithy-rpcv2-cbor/src/RpcV2ProtocolClient.ts index 05b98dc43c8f..1367dd32f17e 100644 --- a/private/smithy-rpcv2-cbor/src/RpcV2ProtocolClient.ts +++ b/private/smithy-rpcv2-cbor/src/RpcV2ProtocolClient.ts @@ -270,9 +270,7 @@ export class RpcV2ProtocolClient extends __Client< readonly config: RpcV2ProtocolClientResolvedConfig; constructor(...[configuration]: __CheckOptionalClientConfig) { - const _config_0 = __getRuntimeConfig({ - ...configuration, - }); + const _config_0 = __getRuntimeConfig(configuration || {}); const _config_1 = resolveCustomEndpointsConfig(_config_0); const _config_2 = resolveRetryConfig(_config_1); const _config_3 = resolveHostHeaderConfig(_config_2); diff --git a/private/smithy-rpcv2-cbor/src/commands/EmptyInputOutputCommand.ts b/private/smithy-rpcv2-cbor/src/commands/EmptyInputOutputCommand.ts index b35706ceac12..664eb0b5c626 100644 --- a/private/smithy-rpcv2-cbor/src/commands/EmptyInputOutputCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/EmptyInputOutputCommand.ts @@ -10,7 +10,8 @@ import { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputType /** * @public */ -export { __MetadataBearer, $Command }; +export type { __MetadataBearer }; +export { $Command }; /** * @public * diff --git a/private/smithy-rpcv2-cbor/src/commands/FractionalSecondsCommand.ts b/private/smithy-rpcv2-cbor/src/commands/FractionalSecondsCommand.ts index b376e0e9e59d..07215cf5437e 100644 --- a/private/smithy-rpcv2-cbor/src/commands/FractionalSecondsCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/FractionalSecondsCommand.ts @@ -10,7 +10,8 @@ import { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputType /** * @public */ -export { __MetadataBearer, $Command }; +export type { __MetadataBearer }; +export { $Command }; /** * @public * diff --git a/private/smithy-rpcv2-cbor/src/commands/GreetingWithErrorsCommand.ts b/private/smithy-rpcv2-cbor/src/commands/GreetingWithErrorsCommand.ts index 697f31e55118..f1130a5e84a4 100644 --- a/private/smithy-rpcv2-cbor/src/commands/GreetingWithErrorsCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/GreetingWithErrorsCommand.ts @@ -10,7 +10,8 @@ import { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputType /** * @public */ -export { __MetadataBearer, $Command }; +export type { __MetadataBearer }; +export { $Command }; /** * @public * diff --git a/private/smithy-rpcv2-cbor/src/commands/NoInputOutputCommand.ts b/private/smithy-rpcv2-cbor/src/commands/NoInputOutputCommand.ts index 614f3c0f6115..9c3acedc32b1 100644 --- a/private/smithy-rpcv2-cbor/src/commands/NoInputOutputCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/NoInputOutputCommand.ts @@ -9,7 +9,8 @@ import { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputType /** * @public */ -export { __MetadataBearer, $Command }; +export type { __MetadataBearer }; +export { $Command }; /** * @public * diff --git a/private/smithy-rpcv2-cbor/src/commands/OperationWithDefaultsCommand.ts b/private/smithy-rpcv2-cbor/src/commands/OperationWithDefaultsCommand.ts index 79c7df11ff80..496abdf7642d 100644 --- a/private/smithy-rpcv2-cbor/src/commands/OperationWithDefaultsCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/OperationWithDefaultsCommand.ts @@ -10,7 +10,8 @@ import { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputType /** * @public */ -export { __MetadataBearer, $Command }; +export type { __MetadataBearer }; +export { $Command }; /** * @public * diff --git a/private/smithy-rpcv2-cbor/src/commands/OptionalInputOutputCommand.ts b/private/smithy-rpcv2-cbor/src/commands/OptionalInputOutputCommand.ts index b706db5ceb38..5ee3a7e48f5c 100644 --- a/private/smithy-rpcv2-cbor/src/commands/OptionalInputOutputCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/OptionalInputOutputCommand.ts @@ -10,7 +10,8 @@ import { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputType /** * @public */ -export { __MetadataBearer, $Command }; +export type { __MetadataBearer }; +export { $Command }; /** * @public * diff --git a/private/smithy-rpcv2-cbor/src/commands/RecursiveShapesCommand.ts b/private/smithy-rpcv2-cbor/src/commands/RecursiveShapesCommand.ts index 7711c532ed59..01b6f047dbd3 100644 --- a/private/smithy-rpcv2-cbor/src/commands/RecursiveShapesCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/RecursiveShapesCommand.ts @@ -10,7 +10,8 @@ import { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputType /** * @public */ -export { __MetadataBearer, $Command }; +export type { __MetadataBearer }; +export { $Command }; /** * @public * diff --git a/private/smithy-rpcv2-cbor/src/commands/RpcV2CborDenseMapsCommand.ts b/private/smithy-rpcv2-cbor/src/commands/RpcV2CborDenseMapsCommand.ts index bcbebe847354..64cf268335c1 100644 --- a/private/smithy-rpcv2-cbor/src/commands/RpcV2CborDenseMapsCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/RpcV2CborDenseMapsCommand.ts @@ -10,7 +10,8 @@ import { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputType /** * @public */ -export { __MetadataBearer, $Command }; +export type { __MetadataBearer }; +export { $Command }; /** * @public * diff --git a/private/smithy-rpcv2-cbor/src/commands/RpcV2CborListsCommand.ts b/private/smithy-rpcv2-cbor/src/commands/RpcV2CborListsCommand.ts index 2bcd4f0f924c..4a09385e7d91 100644 --- a/private/smithy-rpcv2-cbor/src/commands/RpcV2CborListsCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/RpcV2CborListsCommand.ts @@ -10,7 +10,8 @@ import { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputType /** * @public */ -export { __MetadataBearer, $Command }; +export type { __MetadataBearer }; +export { $Command }; /** * @public * diff --git a/private/smithy-rpcv2-cbor/src/commands/RpcV2CborSparseMapsCommand.ts b/private/smithy-rpcv2-cbor/src/commands/RpcV2CborSparseMapsCommand.ts index e199ad87c902..6423ef03735c 100644 --- a/private/smithy-rpcv2-cbor/src/commands/RpcV2CborSparseMapsCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/RpcV2CborSparseMapsCommand.ts @@ -10,7 +10,8 @@ import { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputType /** * @public */ -export { __MetadataBearer, $Command }; +export type { __MetadataBearer }; +export { $Command }; /** * @public * diff --git a/private/smithy-rpcv2-cbor/src/commands/SimpleScalarPropertiesCommand.ts b/private/smithy-rpcv2-cbor/src/commands/SimpleScalarPropertiesCommand.ts index 58dd7271e90f..0504ec3bd21c 100644 --- a/private/smithy-rpcv2-cbor/src/commands/SimpleScalarPropertiesCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/SimpleScalarPropertiesCommand.ts @@ -10,7 +10,8 @@ import { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputType /** * @public */ -export { __MetadataBearer, $Command }; +export type { __MetadataBearer }; +export { $Command }; /** * @public * diff --git a/private/smithy-rpcv2-cbor/src/commands/SparseNullsOperationCommand.ts b/private/smithy-rpcv2-cbor/src/commands/SparseNullsOperationCommand.ts index 4192f0e2cfbe..5dbc340ce5af 100644 --- a/private/smithy-rpcv2-cbor/src/commands/SparseNullsOperationCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/SparseNullsOperationCommand.ts @@ -10,7 +10,8 @@ import { RpcV2ProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputType /** * @public */ -export { __MetadataBearer, $Command }; +export type { __MetadataBearer }; +export { $Command }; /** * @public * diff --git a/private/smithy-rpcv2-cbor/src/index.ts b/private/smithy-rpcv2-cbor/src/index.ts index 0e99e77c68ff..9603ea77597c 100644 --- a/private/smithy-rpcv2-cbor/src/index.ts +++ b/private/smithy-rpcv2-cbor/src/index.ts @@ -2,8 +2,8 @@ /* eslint-disable */ export * from "./RpcV2ProtocolClient"; export * from "./RpcV2Protocol"; -export { RuntimeExtension } from "./runtimeExtensions"; -export { RpcV2ProtocolExtensionConfiguration } from "./extensionConfiguration"; +export type { RuntimeExtension } from "./runtimeExtensions"; +export type { RpcV2ProtocolExtensionConfiguration } from "./extensionConfiguration"; export * from "./commands"; export * from "./models"; diff --git a/private/smithy-rpcv2-cbor/src/models/RpcV2ProtocolServiceException.ts b/private/smithy-rpcv2-cbor/src/models/RpcV2ProtocolServiceException.ts index d556eaf8dbaa..792f7ba0caf4 100644 --- a/private/smithy-rpcv2-cbor/src/models/RpcV2ProtocolServiceException.ts +++ b/private/smithy-rpcv2-cbor/src/models/RpcV2ProtocolServiceException.ts @@ -4,7 +4,9 @@ import { ServiceExceptionOptions as __ServiceExceptionOptions, } from "@smithy/smithy-client"; -export { __ServiceException, __ServiceExceptionOptions }; +export type { __ServiceExceptionOptions }; + +export { __ServiceException }; /** * @public diff --git a/private/smithy-rpcv2-cbor/src/protocols/Rpcv2cbor.ts b/private/smithy-rpcv2-cbor/src/protocols/Rpcv2cbor.ts index 2d646bc51606..027df71bce30 100644 --- a/private/smithy-rpcv2-cbor/src/protocols/Rpcv2cbor.ts +++ b/private/smithy-rpcv2-cbor/src/protocols/Rpcv2cbor.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { cbor, + dateToTag as __dateToTag, loadSmithyRpcV2CborErrorCode, parseCborBody as parseBody, parseCborErrorBody as parseErrorBody, @@ -20,8 +21,6 @@ import { limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, - parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, - serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client"; @@ -106,7 +105,7 @@ export const se_FractionalSecondsCommand = async ( input: FractionalSecondsCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; + const headers: __HeaderBag = { ...SHARED_HEADERS }; delete headers["content-type"]; return buildHttpRpcRequest( @@ -125,7 +124,7 @@ export const se_GreetingWithErrorsCommand = async ( input: GreetingWithErrorsCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; + const headers: __HeaderBag = { ...SHARED_HEADERS }; delete headers["content-type"]; return buildHttpRpcRequest( @@ -144,7 +143,7 @@ export const se_NoInputOutputCommand = async ( input: NoInputOutputCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; + const headers: __HeaderBag = { ...SHARED_HEADERS }; delete headers["content-type"]; return buildHttpRpcRequest(context, headers, "/service/RpcV2Protocol/operation/NoInputOutput", undefined, undefined); @@ -584,12 +583,12 @@ const de_InvalidGreetingRes = async (parsedOutput: any, context: __SerdeContext) */ const se_Defaults = (input: Defaults, context: __SerdeContext): any => { return take(input, { - defaultBlob: context.base64Encoder, + defaultBlob: [], defaultBoolean: [], defaultByte: [], - defaultDouble: __serializeFloat, + defaultDouble: [], defaultEnum: [], - defaultFloat: __serializeFloat, + defaultFloat: [], defaultIntEnum: [], defaultInteger: [], defaultList: _json, @@ -597,13 +596,13 @@ const se_Defaults = (input: Defaults, context: __SerdeContext): any => { defaultMap: _json, defaultShort: [], defaultString: [], - defaultTimestamp: (_) => _.getTime() / 1_000, - emptyBlob: context.base64Encoder, + defaultTimestamp: __dateToTag, + emptyBlob: [], emptyString: [], falseBoolean: [], zeroByte: [], - zeroDouble: __serializeFloat, - zeroFloat: __serializeFloat, + zeroDouble: [], + zeroFloat: [], zeroInteger: [], zeroLong: [], zeroShort: [], @@ -707,11 +706,11 @@ const se_RpcV2CborSparseMapsInputOutput = (input: RpcV2CborSparseMapsInputOutput */ const se_SimpleScalarStructure = (input: SimpleScalarStructure, context: __SerdeContext): any => { return take(input, { - blobValue: context.base64Encoder, + blobValue: [], byteValue: [], - doubleValue: __serializeFloat, + doubleValue: [], falseBooleanValue: [], - floatValue: __serializeFloat, + floatValue: [], integerValue: [], longValue: [], shortValue: [], @@ -804,11 +803,7 @@ const se_SparseStructMap = (input: Record, context: __Se * serializeRpcv2cborBlobList */ const se_BlobList = (input: Uint8Array[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return context.base64Encoder(entry); - }); + return input.filter((e: any) => e != null); }; // se_BooleanList omitted. @@ -856,7 +851,7 @@ const se_TimestampList = (input: Date[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry.getTime() / 1_000; + return __dateToTag(entry); }); }; @@ -887,7 +882,7 @@ const se_TimestampList = (input: Date[], context: __SerdeContext): any => { */ const de_FractionalSecondsOutput = (output: any, context: __SerdeContext): FractionalSecondsOutput => { return take(output, { - datetime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + datetime: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), }) as any; }; @@ -900,7 +895,7 @@ const de_FractionalSecondsOutput = (output: any, context: __SerdeContext): Fract */ const de_OperationWithDefaultsOutput = (output: any, context: __SerdeContext): OperationWithDefaultsOutput => { return take(output, { - defaultBlob: context.base64Decoder, + defaultBlob: [], defaultBoolean: __expectBoolean, defaultByte: __expectByte, defaultDouble: __limitedParseDouble, @@ -914,7 +909,7 @@ const de_OperationWithDefaultsOutput = (output: any, context: __SerdeContext): O defaultShort: __expectShort, defaultString: __expectString, defaultTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(_)), - emptyBlob: context.base64Decoder, + emptyBlob: [], emptyString: __expectString, falseBoolean: __expectBoolean, zeroByte: __expectByte, @@ -999,7 +994,7 @@ const de_RpcV2CborSparseMapsInputOutput = (output: any, context: __SerdeContext) */ const de_SimpleScalarStructure = (output: any, context: __SerdeContext): SimpleScalarStructure => { return take(output, { - blobValue: context.base64Decoder, + blobValue: [], byteValue: __expectByte, doubleValue: __limitedParseDouble, falseBooleanValue: __expectBoolean, @@ -1092,11 +1087,7 @@ const de_SparseStructMap = (output: any, context: __SerdeContext): Record { - const collection = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return context.base64Decoder(entry); - }); + const collection = (output || []).filter((e: any) => e != null); return collection; }; diff --git a/private/smithy-rpcv2-cbor/test/functional/rpcv2cbor.spec.ts b/private/smithy-rpcv2-cbor/test/functional/rpcv2cbor.spec.ts index cb3564924701..843439bda1c5 100644 --- a/private/smithy-rpcv2-cbor/test/functional/rpcv2cbor.spec.ts +++ b/private/smithy-rpcv2-cbor/test/functional/rpcv2cbor.spec.ts @@ -1,7 +1,7 @@ // smithy-typescript generated code +import { cbor } from "@smithy/core/cbor"; import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; -import { Encoder as __Encoder } from "@smithy/types"; -import { HeaderBag, HttpHandlerOptions } from "@smithy/types"; +import { Endpoint, HeaderBag, HttpHandlerOptions } from "@smithy/types"; import { Readable } from "stream"; import { EmptyInputOutputCommand } from "../../src/commands/EmptyInputOutputCommand"; @@ -35,7 +35,9 @@ class RequestSerializationTestHandler implements HttpHandler { handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { return Promise.reject(new EXPECTED_REQUEST_SERIALIZATION_ERROR(request)); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -48,9 +50,10 @@ class ResponseDeserializationTestHandler implements HttpHandler { isSuccess: boolean; code: number; headers: HeaderBag; - body: String; + body: string | Uint8Array; + isBase64Body: boolean; - constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: String) { + constructor(isSuccess: boolean, code: number, headers?: HeaderBag, body?: string) { this.isSuccess = isSuccess; this.code = code; if (headers === undefined) { @@ -62,6 +65,7 @@ class ResponseDeserializationTestHandler implements HttpHandler { body = ""; } this.body = body; + this.isBase64Body = Buffer.from(String(body), "base64").toString("base64") === body; } handle(request: HttpRequest, options?: HttpHandlerOptions): Promise<{ response: HttpResponse }> { @@ -69,11 +73,13 @@ class ResponseDeserializationTestHandler implements HttpHandler { response: new HttpResponse({ statusCode: this.code, headers: this.headers, - body: Readable.from([this.body]), + body: this.isBase64Body ? toBytes(this.body as string) : Readable.from([this.body]), }), }); } + updateHttpClientConfig(key: never, value: never): void {} + httpHandlerConfigs() { return {}; } @@ -114,6 +120,11 @@ const compareParts = (expectedParts: comparableParts, generatedParts: comparable * properties that have defined values. */ const equivalentContents = (expected: any, generated: any): boolean => { + if (typeof (global as any).expect === "function") { + expect(normalizeByteArrayType(generated)).toEqual(normalizeByteArrayType(expected)); + return true; + } + const localExpected = expected; // Short circuit on equality. @@ -121,6 +132,10 @@ const equivalentContents = (expected: any, generated: any): boolean => { return true; } + if (typeof expected !== "object") { + return expected === generated; + } + // If a test fails with an issue in the below 6 lines, it's likely // due to an issue in the nestedness or existence of the property // being compared. @@ -151,6 +166,14 @@ const equivalentContents = (expected: any, generated: any): boolean => { const clientParams = { region: "us-west-2", credentials: { accessKeyId: "key", secretAccessKey: "secret" }, + endpoint: () => { + const url = new URL("https://www.amazon.com/"); + return Promise.resolve({ + ...url, + path: url.pathname, + ...(url.port ? { port: Number(url.port) } : {}), + }) as Promise; + }, }; /** @@ -161,6 +184,35 @@ const fail = (error?: any): never => { throw new Error(error); }; +/** + * Hexadecimal to byteArray. + */ +const toBytes = (hex: string) => { + return Buffer.from(hex, "base64"); +}; + +function normalizeByteArrayType(data: any) { + // normalize float32 errors + if (typeof data === "number") { + const u = new Uint8Array(4); + const dv = new DataView(u.buffer, u.byteOffset, u.byteLength); + dv.setFloat32(0, data); + return dv.getFloat32(0); + } + if (!data || typeof data !== "object") { + return data; + } + const output = {} as any; + for (const key of Object.getOwnPropertyNames(data)) { + if (data[key] instanceof Uint8Array) { + output[key] = Uint8Array.from(data[key]); + } else { + output[key] = normalizeByteArrayType(data[key]); + } + } + return output; +} + /** * When Input structure is empty we write CBOR equivalent of {} */ @@ -168,7 +220,6 @@ it("empty_input:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new EmptyInputOutputCommand({} as any); @@ -194,9 +245,8 @@ it("empty_input:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v/8=`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -207,8 +257,7 @@ it("empty_input:Request", async () => { it("empty_output:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -238,8 +287,7 @@ it("empty_output:Response", async () => { it("empty_output_no_body:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -269,8 +317,7 @@ it("empty_output_no_body:Response", async () => { it("RpcV2CborDateTimeWithFractionalSeconds:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -299,7 +346,7 @@ it("RpcV2CborDateTimeWithFractionalSeconds:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -309,8 +356,7 @@ it("RpcV2CborDateTimeWithFractionalSeconds:Response", async () => { it("RpcV2CborInvalidGreetingError:Error:GreetingWithErrors", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( false, 400, { @@ -341,7 +387,7 @@ it("RpcV2CborInvalidGreetingError:Error:GreetingWithErrors", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); return; } @@ -354,7 +400,7 @@ it("RpcV2CborInvalidGreetingError:Error:GreetingWithErrors", async () => { it("RpcV2CborComplexError:Error:GreetingWithErrors", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( false, 400, { @@ -381,7 +427,6 @@ it("RpcV2CborComplexError:Error:GreetingWithErrors", async () => { const paramsToValidate: any = [ { TopLevel: "Top level", - Nested: { Foo: "bar", }, @@ -389,7 +434,7 @@ it("RpcV2CborComplexError:Error:GreetingWithErrors", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); return; } @@ -399,8 +444,7 @@ it("RpcV2CborComplexError:Error:GreetingWithErrors", async () => { it("RpcV2CborEmptyComplexError:Error:GreetingWithErrors", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( false, 400, { @@ -436,7 +480,6 @@ it("no_input:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new NoInputOutputCommand({}); @@ -469,8 +512,7 @@ it("no_input:Request", async () => { it("no_output:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -499,8 +541,7 @@ it("no_output:Response", async () => { it("NoOutputClientAllowsEmptyCbor:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -531,8 +572,7 @@ it("NoOutputClientAllowsEmptyCbor:Response", async () => { it("NoOutputClientAllowsEmptyBody:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -563,7 +603,6 @@ it.skip("RpcV2CborClientPopulatesDefaultValuesInInput:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new OperationWithDefaultsCommand({ @@ -589,9 +628,8 @@ it.skip("RpcV2CborClientPopulatesDefaultValuesInInput:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v21kZWZhdWx0U3RyaW5nYmhpbmRlZmF1bHRCb29sZWFu9WtkZWZhdWx0TGlzdIBwZGVmYXVsdFRpbWVzdGFtcMH7AAAAAAAAAABrZGVmYXVsdEJsb2JDYWJja2RlZmF1bHRCeXRlAWxkZWZhdWx0U2hvcnQBbmRlZmF1bHRJbnRlZ2VyCmtkZWZhdWx0TG9uZxhkbGRlZmF1bHRGbG9hdPo/gAAAbWRlZmF1bHREb3VibGX7P/AAAAAAAABqZGVmYXVsdE1hcKBrZGVmYXVsdEVudW1jRk9PbmRlZmF1bHRJbnRFbnVtAWtlbXB0eVN0cmluZ2BsZmFsc2VCb29sZWFu9GllbXB0eUJsb2JAaHplcm9CeXRlAGl6ZXJvU2hvcnQAa3plcm9JbnRlZ2VyAGh6ZXJvTG9uZwBpemVyb0Zsb2F0+gAAAABqemVyb0RvdWJsZfsAAAAAAAAAAP8=`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -603,7 +641,6 @@ it.skip("RpcV2CborClientSkipsTopLevelDefaultValuesInInput:Request", async () => const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new OperationWithDefaultsCommand({} as any); @@ -627,9 +664,8 @@ it.skip("RpcV2CborClientSkipsTopLevelDefaultValuesInInput:Request", async () => expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v/8=`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -641,57 +677,34 @@ it.skip("RpcV2CborClientUsesExplicitlyProvidedMemberValuesOverDefaults:Request", const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new OperationWithDefaultsCommand({ defaults: { defaultString: "bye", - defaultBoolean: true, - defaultList: ["a"], - defaultTimestamp: new Date(1000), - defaultBlob: Uint8Array.from("hi", (c) => c.charCodeAt(0)), - defaultByte: 2, - defaultShort: 2, - defaultInteger: 20, - defaultLong: 200, - defaultFloat: 2.0, - defaultDouble: 2.0, - defaultMap: { name: "Jack", } as any, - defaultEnum: "BAR", - defaultIntEnum: 2, - emptyString: "foo", - falseBoolean: true, - emptyBlob: Uint8Array.from("hi", (c) => c.charCodeAt(0)), - zeroByte: 1, - zeroShort: 1, - zeroInteger: 1, - zeroLong: 1, - zeroFloat: 1.0, - zeroDouble: 1.0, } as any, } as any); @@ -715,9 +728,8 @@ it.skip("RpcV2CborClientUsesExplicitlyProvidedMemberValuesOverDefaults:Request", expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v2hkZWZhdWx0c7dtZGVmYXVsdFN0cmluZ2NieWVuZGVmYXVsdEJvb2xlYW71a2RlZmF1bHRMaXN0gWFhcGRlZmF1bHRUaW1lc3RhbXDB+z/wAAAAAAAAa2RlZmF1bHRCbG9iQmhpa2RlZmF1bHRCeXRlAmxkZWZhdWx0U2hvcnQCbmRlZmF1bHRJbnRlZ2VyFGtkZWZhdWx0TG9uZxjIbGRlZmF1bHRGbG9hdPpAAAAAbWRlZmF1bHREb3VibGX7QAAAAAAAAABqZGVmYXVsdE1hcKFkbmFtZWRKYWNra2RlZmF1bHRFbnVtY0JBUm5kZWZhdWx0SW50RW51bQJrZW1wdHlTdHJpbmdjZm9vbGZhbHNlQm9vbGVhbvVpZW1wdHlCbG9iQmhpaHplcm9CeXRlAWl6ZXJvU2hvcnQBa3plcm9JbnRlZ2VyAWh6ZXJvTG9uZwFpemVyb0Zsb2F0+j+AAABqemVyb0RvdWJsZfs/8AAAAAAAAP8=`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -729,12 +741,10 @@ it.skip("RpcV2CborClientUsesExplicitlyProvidedValuesInTopLevel:Request", async ( const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new OperationWithDefaultsCommand({ topLevelDefault: "hi", - otherTopLevelDefault: 0, } as any); try { @@ -757,9 +767,8 @@ it.skip("RpcV2CborClientUsesExplicitlyProvidedValuesInTopLevel:Request", async ( expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v290b3BMZXZlbERlZmF1bHRiaGl0b3RoZXJUb3BMZXZlbERlZmF1bHQA/w==`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -771,7 +780,6 @@ it.skip("RpcV2CborClientIgnoresNonTopLevelDefaultsOnMembersWithClientOptional:Re const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new OperationWithDefaultsCommand({ @@ -797,9 +805,8 @@ it.skip("RpcV2CborClientIgnoresNonTopLevelDefaultsOnMembersWithClientOptional:Re expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v3ZjbGllbnRPcHRpb25hbERlZmF1bHRzoP8=`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -810,8 +817,7 @@ it.skip("RpcV2CborClientIgnoresNonTopLevelDefaultsOnMembersWithClientOptional:Re it.skip("RpcV2CborClientPopulatesDefaultsValuesWhenMissingInResponse:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -836,55 +842,33 @@ it.skip("RpcV2CborClientPopulatesDefaultsValuesWhenMissingInResponse:Response", const paramsToValidate: any = [ { defaultString: "hi", - defaultBoolean: true, - defaultList: [], - defaultTimestamp: new Date(0 * 1000), - defaultBlob: Uint8Array.from("abc", (c) => c.charCodeAt(0)), - defaultByte: 1, - defaultShort: 1, - defaultInteger: 10, - defaultLong: 100, - defaultFloat: 1.0, - defaultDouble: 1.0, - defaultMap: {}, - defaultEnum: "FOO", - defaultIntEnum: 1, - emptyString: "", - falseBoolean: false, - emptyBlob: Uint8Array.from("", (c) => c.charCodeAt(0)), - zeroByte: 0, - zeroShort: 0, - zeroInteger: 0, - zeroLong: 0, - zeroFloat: 0.0, - zeroDouble: 0.0, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -894,8 +878,7 @@ it.skip("RpcV2CborClientPopulatesDefaultsValuesWhenMissingInResponse:Response", it.skip("RpcV2CborClientIgnoresDefaultValuesIfMemberValuesArePresentInResponse:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -920,57 +903,35 @@ it.skip("RpcV2CborClientIgnoresDefaultValuesIfMemberValuesArePresentInResponse:R const paramsToValidate: any = [ { defaultString: "bye", - defaultBoolean: false, - defaultList: ["a"], - defaultTimestamp: new Date(2 * 1000), - defaultBlob: Uint8Array.from("hi", (c) => c.charCodeAt(0)), - defaultByte: 2, - defaultShort: 2, - defaultInteger: 20, - defaultLong: 200, - defaultFloat: 2.0, - defaultDouble: 2.0, - defaultMap: { name: "Jack", }, - defaultEnum: "BAR", - defaultIntEnum: 2, - emptyString: "foo", - falseBoolean: true, - emptyBlob: Uint8Array.from("hi", (c) => c.charCodeAt(0)), - zeroByte: 1, - zeroShort: 1, - zeroInteger: 1, - zeroLong: 1, - zeroFloat: 1.0, - zeroDouble: 1.0, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -981,7 +942,6 @@ it("optional_input:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new OptionalInputOutputCommand({} as any); @@ -1006,9 +966,8 @@ it("optional_input:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v/8=`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -1019,8 +978,7 @@ it("optional_input:Request", async () => { it("optional_output:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -1051,19 +1009,15 @@ it("RpcV2CborRecursiveShapes:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new RecursiveShapesCommand({ nested: { foo: "Foo1", - nested: { bar: "Bar1", - recursiveMember: { foo: "Foo2", - nested: { bar: "Bar2", } as any, @@ -1091,9 +1045,8 @@ it("RpcV2CborRecursiveShapes:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v2ZuZXN0ZWS/Y2Zvb2RGb28xZm5lc3RlZL9jYmFyZEJhcjFvcmVjdXJzaXZlTWVtYmVyv2Nmb29kRm9vMmZuZXN0ZWS/Y2JhcmRCYXIy//////8=`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -1104,8 +1057,7 @@ it("RpcV2CborRecursiveShapes:Request", async () => { it("RpcV2CborRecursiveShapes:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -1131,13 +1083,10 @@ it("RpcV2CborRecursiveShapes:Response", async () => { { nested: { foo: "Foo1", - nested: { bar: "Bar1", - recursiveMember: { foo: "Foo2", - nested: { bar: "Bar2", }, @@ -1148,7 +1097,7 @@ it("RpcV2CborRecursiveShapes:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1158,8 +1107,7 @@ it("RpcV2CborRecursiveShapes:Response", async () => { it("RpcV2CborRecursiveShapesUsingDefiniteLength:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -1185,13 +1133,10 @@ it("RpcV2CborRecursiveShapesUsingDefiniteLength:Response", async () => { { nested: { foo: "Foo1", - nested: { bar: "Bar1", - recursiveMember: { foo: "Foo2", - nested: { bar: "Bar2", }, @@ -1202,7 +1147,7 @@ it("RpcV2CborRecursiveShapesUsingDefiniteLength:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1213,7 +1158,6 @@ it("RpcV2CborMaps:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new RpcV2CborDenseMapsCommand({ @@ -1221,7 +1165,6 @@ it("RpcV2CborMaps:Request", async () => { foo: { hi: "there", } as any, - baz: { hi: "bye", } as any, @@ -1247,9 +1190,8 @@ it("RpcV2CborMaps:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `oW5kZW5zZVN0cnVjdE1hcKJjZm9voWJoaWV0aGVyZWNiYXqhYmhpY2J5ZQ==`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -1261,14 +1203,12 @@ it("RpcV2CborSerializesZeroValuesInMaps:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new RpcV2CborDenseMapsCommand({ denseNumberMap: { x: 0, } as any, - denseBooleanMap: { x: false, } as any, @@ -1293,9 +1233,8 @@ it("RpcV2CborSerializesZeroValuesInMaps:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `om5kZW5zZU51bWJlck1hcKFheABvZGVuc2VCb29sZWFuTWFwoWF49A==`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -1307,13 +1246,11 @@ it("RpcV2CborSerializesDenseSetMap:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new RpcV2CborDenseMapsCommand({ denseSetMap: { x: [], - y: ["a", "b"], } as any, } as any); @@ -1337,9 +1274,8 @@ it("RpcV2CborSerializesDenseSetMap:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `oWtkZW5zZVNldE1hcKJheIBheYJhYWFi`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -1350,8 +1286,7 @@ it("RpcV2CborSerializesDenseSetMap:Request", async () => { it("RpcV2CborMaps:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -1379,7 +1314,6 @@ it("RpcV2CborMaps:Response", async () => { foo: { hi: "there", }, - baz: { hi: "bye", }, @@ -1388,7 +1322,7 @@ it("RpcV2CborMaps:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1398,8 +1332,7 @@ it("RpcV2CborMaps:Response", async () => { it("RpcV2CborDeserializesZeroValuesInMaps:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -1426,7 +1359,6 @@ it("RpcV2CborDeserializesZeroValuesInMaps:Response", async () => { denseNumberMap: { x: 0, }, - denseBooleanMap: { x: false, }, @@ -1434,7 +1366,7 @@ it("RpcV2CborDeserializesZeroValuesInMaps:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1444,8 +1376,7 @@ it("RpcV2CborDeserializesZeroValuesInMaps:Response", async () => { it("RpcV2CborDeserializesDenseSetMap:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -1471,14 +1402,13 @@ it("RpcV2CborDeserializesDenseSetMap:Response", async () => { { denseSetMap: { x: [], - y: ["a", "b"], }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1486,11 +1416,10 @@ it("RpcV2CborDeserializesDenseSetMap:Response", async () => { * Clients SHOULD tolerate seeing a null value in a dense map, and they SHOULD * drop the null key-value pair. */ -it("RpcV2CborDeserializesDenseSetMapAndSkipsNull:Response", async () => { +it.skip("RpcV2CborDeserializesDenseSetMapAndSkipsNull:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -1516,16 +1445,14 @@ it("RpcV2CborDeserializesDenseSetMapAndSkipsNull:Response", async () => { { denseSetMap: { x: [], - y: ["a", "b"], - z: null, }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1536,52 +1463,30 @@ it("RpcV2CborLists:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new RpcV2CborListsCommand({ stringList: ["foo", "bar"], - stringSet: ["foo", "bar"], - - integerList: [ - 1, - - 2, - ], - + integerList: [1, 2], booleanList: [true, false], - timestampList: [new Date(1398796238000), new Date(1398796238000)], - enumList: ["Foo", "0"], - - intEnumList: [ - 1, - - 2, - ], - + intEnumList: [1, 2], nestedStringList: [ ["foo", "bar"], - ["baz", "qux"], ], - structureList: [ { a: "1", - b: "2", } as any, - { a: "3", - b: "4", } as any, ], - blobList: [Uint8Array.from("foo", (c) => c.charCodeAt(0)), Uint8Array.from("bar", (c) => c.charCodeAt(0))], } as any); try { @@ -1604,9 +1509,8 @@ it("RpcV2CborLists:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v2pzdHJpbmdMaXN0gmNmb29jYmFyaXN0cmluZ1NldIJjZm9vY2JhcmtpbnRlZ2VyTGlzdIIBAmtib29sZWFuTGlzdIL19G10aW1lc3RhbXBMaXN0gsH7QdTX+/OAAADB+0HU1/vzgAAAaGVudW1MaXN0gmNGb29hMGtpbnRFbnVtTGlzdIIBAnBuZXN0ZWRTdHJpbmdMaXN0goJjZm9vY2JhcoJjYmF6Y3F1eG1zdHJ1Y3R1cmVMaXN0gqJhYWExYWJhMqJhYWEzYWJhNGhibG9iTGlzdIJDZm9vQ2Jhcv8=`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -1618,7 +1522,6 @@ it("RpcV2CborListsEmpty:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new RpcV2CborListsCommand({ @@ -1644,9 +1547,8 @@ it("RpcV2CborListsEmpty:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v2pzdHJpbmdMaXN0n///`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -1658,7 +1560,6 @@ it("RpcV2CborListsEmptyUsingDefiniteLength:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new RpcV2CborListsCommand({ @@ -1684,9 +1585,8 @@ it("RpcV2CborListsEmptyUsingDefiniteLength:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `oWpzdHJpbmdMaXN0gA==`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -1697,8 +1597,7 @@ it("RpcV2CborListsEmptyUsingDefiniteLength:Request", async () => { it("RpcV2CborLists:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -1723,53 +1622,32 @@ it("RpcV2CborLists:Response", async () => { const paramsToValidate: any = [ { stringList: ["foo", "bar"], - stringSet: ["foo", "bar"], - - integerList: [ - 1, - - 2, - ], - + integerList: [1, 2], booleanList: [true, false], - timestampList: [new Date(1398796238 * 1000), new Date(1398796238 * 1000)], - enumList: ["Foo", "0"], - - intEnumList: [ - 1, - - 2, - ], - + intEnumList: [1, 2], nestedStringList: [ ["foo", "bar"], - ["baz", "qux"], ], - structureList: [ { a: "1", - b: "2", }, - { a: "3", - b: "4", }, ], - blobList: [Uint8Array.from("foo", (c) => c.charCodeAt(0)), Uint8Array.from("bar", (c) => c.charCodeAt(0))], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1779,8 +1657,7 @@ it("RpcV2CborLists:Response", async () => { it("RpcV2CborListsEmpty:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -1809,7 +1686,7 @@ it("RpcV2CborListsEmpty:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1819,8 +1696,7 @@ it("RpcV2CborListsEmpty:Response", async () => { it("RpcV2CborIndefiniteStringInsideIndefiniteListCanDeserialize:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -1846,16 +1722,14 @@ it("RpcV2CborIndefiniteStringInsideIndefiniteListCanDeserialize:Response", async { stringList: [ "An example indefinite string, which will be chunked, on each comma", - "Another example indefinite string with only one chunk", - "This is a plain string", ], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1865,8 +1739,7 @@ it("RpcV2CborIndefiniteStringInsideIndefiniteListCanDeserialize:Response", async it("RpcV2CborIndefiniteStringInsideDefiniteListCanDeserialize:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -1892,16 +1765,14 @@ it("RpcV2CborIndefiniteStringInsideDefiniteListCanDeserialize:Response", async ( { stringList: [ "An example indefinite string, which will be chunked, on each comma", - "Another example indefinite string with only one chunk", - "This is a plain string", ], }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -1912,7 +1783,6 @@ it("RpcV2CborSparseMaps:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new RpcV2CborSparseMapsCommand({ @@ -1920,7 +1790,6 @@ it("RpcV2CborSparseMaps:Request", async () => { foo: { hi: "there", } as any, - baz: { hi: "bye", } as any, @@ -1946,9 +1815,8 @@ it("RpcV2CborSparseMaps:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v29zcGFyc2VTdHJ1Y3RNYXC/Y2Zvb79iaGlldGhlcmX/Y2Jher9iaGljYnll////`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -1960,22 +1828,18 @@ it("RpcV2CborSerializesNullMapValues:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new RpcV2CborSparseMapsCommand({ sparseBooleanMap: { x: null, } as any, - sparseNumberMap: { x: null, } as any, - sparseStringMap: { x: null, } as any, - sparseStructMap: { x: null, } as any, @@ -2000,9 +1864,8 @@ it("RpcV2CborSerializesNullMapValues:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v3BzcGFyc2VCb29sZWFuTWFwv2F49v9vc3BhcnNlTnVtYmVyTWFwv2F49v9vc3BhcnNlU3RyaW5nTWFwv2F49v9vc3BhcnNlU3RydWN0TWFwv2F49v//`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -2014,13 +1877,11 @@ it("RpcV2CborSerializesSparseSetMap:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new RpcV2CborSparseMapsCommand({ sparseSetMap: { x: [], - y: ["a", "b"], } as any, } as any); @@ -2044,9 +1905,8 @@ it("RpcV2CborSerializesSparseSetMap:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v2xzcGFyc2VTZXRNYXC/YXif/2F5n2FhYWL///8=`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -2058,15 +1918,12 @@ it("RpcV2CborSerializesSparseSetMapAndRetainsNull:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new RpcV2CborSparseMapsCommand({ sparseSetMap: { x: [], - y: ["a", "b"], - z: null, } as any, } as any); @@ -2090,9 +1947,8 @@ it("RpcV2CborSerializesSparseSetMapAndRetainsNull:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v2xzcGFyc2VTZXRNYXC/YXif/2F5n2FhYWL/YXr2//8=`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -2104,14 +1960,12 @@ it("RpcV2CborSerializesZeroValuesInSparseMaps:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new RpcV2CborSparseMapsCommand({ sparseNumberMap: { x: 0, } as any, - sparseBooleanMap: { x: false, } as any, @@ -2136,9 +1990,8 @@ it("RpcV2CborSerializesZeroValuesInSparseMaps:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v29zcGFyc2VOdW1iZXJNYXC/YXgA/3BzcGFyc2VCb29sZWFuTWFwv2F49P//`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -2149,8 +2002,7 @@ it("RpcV2CborSerializesZeroValuesInSparseMaps:Request", async () => { it("RpcV2CborSparseJsonMaps:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -2178,7 +2030,6 @@ it("RpcV2CborSparseJsonMaps:Response", async () => { foo: { hi: "there", }, - baz: { hi: "bye", }, @@ -2187,7 +2038,7 @@ it("RpcV2CborSparseJsonMaps:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2197,8 +2048,7 @@ it("RpcV2CborSparseJsonMaps:Response", async () => { it("RpcV2CborDeserializesNullMapValues:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -2225,15 +2075,12 @@ it("RpcV2CborDeserializesNullMapValues:Response", async () => { sparseBooleanMap: { x: null, }, - sparseNumberMap: { x: null, }, - sparseStringMap: { x: null, }, - sparseStructMap: { x: null, }, @@ -2241,7 +2088,7 @@ it("RpcV2CborDeserializesNullMapValues:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2251,8 +2098,7 @@ it("RpcV2CborDeserializesNullMapValues:Response", async () => { it("RpcV2CborDeserializesSparseSetMap:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -2278,14 +2124,13 @@ it("RpcV2CborDeserializesSparseSetMap:Response", async () => { { sparseSetMap: { x: [], - y: ["a", "b"], }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2295,8 +2140,7 @@ it("RpcV2CborDeserializesSparseSetMap:Response", async () => { it("RpcV2CborDeserializesSparseSetMapAndRetainsNull:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -2322,16 +2166,14 @@ it("RpcV2CborDeserializesSparseSetMapAndRetainsNull:Response", async () => { { sparseSetMap: { x: [], - y: ["a", "b"], - z: null, }, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2341,8 +2183,7 @@ it("RpcV2CborDeserializesSparseSetMapAndRetainsNull:Response", async () => { it("RpcV2CborDeserializesZeroValuesInSparseMaps:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -2369,7 +2210,6 @@ it("RpcV2CborDeserializesZeroValuesInSparseMaps:Response", async () => { sparseNumberMap: { x: 0, }, - sparseBooleanMap: { x: false, }, @@ -2377,7 +2217,7 @@ it("RpcV2CborDeserializesZeroValuesInSparseMaps:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2388,28 +2228,18 @@ it("RpcV2CborSimpleScalarProperties:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new SimpleScalarPropertiesCommand({ byteValue: 5, - doubleValue: 1.889, - falseBooleanValue: false, - floatValue: 7.624, - integerValue: 256, - longValue: 9873, - shortValue: 9898, - stringValue: "simple", - trueBooleanValue: true, - blobValue: Uint8Array.from("foo", (c) => c.charCodeAt(0)), } as any); try { @@ -2432,9 +2262,8 @@ it("RpcV2CborSimpleScalarProperties:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v2lieXRlVmFsdWUFa2RvdWJsZVZhbHVl+z/+OVgQYk3TcWZhbHNlQm9vbGVhblZhbHVl9GpmbG9hdFZhbHVl+kDz989saW50ZWdlclZhbHVlGQEAaWxvbmdWYWx1ZRkmkWpzaG9ydFZhbHVlGSaqa3N0cmluZ1ZhbHVlZnNpbXBsZXB0cnVlQm9vbGVhblZhbHVl9WlibG9iVmFsdWVDZm9v/w==`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -2446,7 +2275,6 @@ it("RpcV2CborClientDoesntSerializeNullStructureValues:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new SimpleScalarPropertiesCommand({ @@ -2472,9 +2300,8 @@ it("RpcV2CborClientDoesntSerializeNullStructureValues:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v/8=`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -2486,12 +2313,10 @@ it("RpcV2CborSupportsNaNFloatInputs:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new SimpleScalarPropertiesCommand({ doubleValue: NaN, - floatValue: NaN, } as any); try { @@ -2514,9 +2339,8 @@ it("RpcV2CborSupportsNaNFloatInputs:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v2tkb3VibGVWYWx1Zft/+AAAAAAAAGpmbG9hdFZhbHVl+n/AAAD/`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -2528,12 +2352,10 @@ it("RpcV2CborSupportsInfinityFloatInputs:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new SimpleScalarPropertiesCommand({ doubleValue: Infinity, - floatValue: Infinity, } as any); try { @@ -2556,9 +2378,8 @@ it("RpcV2CborSupportsInfinityFloatInputs:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v2tkb3VibGVWYWx1Zft/8AAAAAAAAGpmbG9hdFZhbHVl+n+AAAD/`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -2570,12 +2391,10 @@ it("RpcV2CborSupportsNegativeInfinityFloatInputs:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new SimpleScalarPropertiesCommand({ doubleValue: -Infinity, - floatValue: -Infinity, } as any); try { @@ -2598,9 +2417,8 @@ it("RpcV2CborSupportsNegativeInfinityFloatInputs:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v2tkb3VibGVWYWx1Zfv/8AAAAAAAAGpmbG9hdFZhbHVl+v+AAAD/`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -2611,8 +2429,7 @@ it("RpcV2CborSupportsNegativeInfinityFloatInputs:Request", async () => { it("RpcV2CborSimpleScalarProperties:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -2637,27 +2454,19 @@ it("RpcV2CborSimpleScalarProperties:Response", async () => { const paramsToValidate: any = [ { trueBooleanValue: true, - falseBooleanValue: false, - byteValue: 5, - doubleValue: 1.889, - floatValue: 7.624, - integerValue: 256, - shortValue: 9898, - stringValue: "simple", - blobValue: Uint8Array.from("foo", (c) => c.charCodeAt(0)), }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2667,8 +2476,7 @@ it("RpcV2CborSimpleScalarProperties:Response", async () => { it("RpcV2CborSimpleScalarPropertiesUsingDefiniteLength:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -2693,27 +2501,19 @@ it("RpcV2CborSimpleScalarPropertiesUsingDefiniteLength:Response", async () => { const paramsToValidate: any = [ { trueBooleanValue: true, - falseBooleanValue: false, - byteValue: 5, - doubleValue: 1.889, - floatValue: 7.624, - integerValue: 256, - shortValue: 9898, - stringValue: "simple", - blobValue: Uint8Array.from("foo", (c) => c.charCodeAt(0)), }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2723,8 +2523,7 @@ it("RpcV2CborSimpleScalarPropertiesUsingDefiniteLength:Response", async () => { it("RpcV2CborClientDoesntDeserializeNullStructureValues:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -2754,8 +2553,7 @@ it("RpcV2CborClientDoesntDeserializeNullStructureValues:Response", async () => { it("RpcV2CborSupportsNaNFloatOutputs:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -2780,13 +2578,12 @@ it("RpcV2CborSupportsNaNFloatOutputs:Response", async () => { const paramsToValidate: any = [ { doubleValue: NaN, - floatValue: NaN, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2796,8 +2593,7 @@ it("RpcV2CborSupportsNaNFloatOutputs:Response", async () => { it("RpcV2CborSupportsInfinityFloatOutputs:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -2822,13 +2618,12 @@ it("RpcV2CborSupportsInfinityFloatOutputs:Response", async () => { const paramsToValidate: any = [ { doubleValue: Infinity, - floatValue: Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2838,8 +2633,7 @@ it("RpcV2CborSupportsInfinityFloatOutputs:Response", async () => { it("RpcV2CborSupportsNegativeInfinityFloatOutputs:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -2864,13 +2658,12 @@ it("RpcV2CborSupportsNegativeInfinityFloatOutputs:Response", async () => { const paramsToValidate: any = [ { doubleValue: -Infinity, - floatValue: -Infinity, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2880,8 +2673,7 @@ it("RpcV2CborSupportsNegativeInfinityFloatOutputs:Response", async () => { it("RpcV2CborSupportsUpcastingDataOnDeserialize:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -2906,19 +2698,15 @@ it("RpcV2CborSupportsUpcastingDataOnDeserialize:Response", async () => { const paramsToValidate: any = [ { doubleValue: 1.5, - floatValue: 7.625, - integerValue: 56, - longValue: 256, - shortValue: 10, }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2930,8 +2718,7 @@ it("RpcV2CborSupportsUpcastingDataOnDeserialize:Response", async () => { it("RpcV2CborExtraFieldsInTheBodyShouldBeSkippedByClients:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -2956,29 +2743,20 @@ it("RpcV2CborExtraFieldsInTheBodyShouldBeSkippedByClients:Response", async () => const paramsToValidate: any = [ { byteValue: 5, - doubleValue: 1.889, - falseBooleanValue: false, - floatValue: 7.624, - integerValue: 256, - longValue: 9873, - shortValue: 9898, - stringValue: "simple", - trueBooleanValue: true, - blobValue: Uint8Array.from("foo", (c) => c.charCodeAt(0)), }, ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -2989,7 +2767,6 @@ it("RpcV2CborSparseMapsSerializeNullValues:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new SparseNullsOperationCommand({ @@ -3017,9 +2794,8 @@ it("RpcV2CborSparseMapsSerializeNullValues:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v29zcGFyc2VTdHJpbmdNYXC/Y2Zvb/b//w==`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -3031,7 +2807,6 @@ it("RpcV2CborSparseListsSerializeNull:Request", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, requestHandler: new RequestSerializationTestHandler(), - endpoint: "https://www.amazon.com", }); const command = new SparseNullsOperationCommand({ @@ -3057,9 +2832,8 @@ it("RpcV2CborSparseListsSerializeNull:Request", async () => { expect(r.headers["smithy-protocol"]).toBe("rpc-v2-cbor"); expect(r.body).toBeDefined(); - const utf8Encoder = client.config.utf8Encoder; const bodyString = `v3BzcGFyc2VTdHJpbmdMaXN0n/b//w==`; - const unequalParts: any = compareEquivalentUnknownTypeBodies(utf8Encoder, bodyString, r.body); + const unequalParts: any = compareEquivalentCborBodies(bodyString, r.body); expect(unequalParts).toBeUndefined(); } }); @@ -3070,8 +2844,7 @@ it("RpcV2CborSparseListsSerializeNull:Request", async () => { it("RpcV2CborSparseMapsDeserializeNullValues:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -3102,7 +2875,7 @@ it("RpcV2CborSparseMapsDeserializeNullValues:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); @@ -3112,8 +2885,7 @@ it("RpcV2CborSparseMapsDeserializeNullValues:Response", async () => { it("RpcV2CborSparseListsDeserializeNull:Response", async () => { const client = new RpcV2ProtocolClient({ ...clientParams, - endpoint: "https://www.amazon.com", - requestHandler: new RequestSerializationTestHandler( + requestHandler: new ResponseDeserializationTestHandler( true, 200, { @@ -3142,23 +2914,13 @@ it("RpcV2CborSparseListsDeserializeNull:Response", async () => { ][0]; Object.keys(paramsToValidate).forEach((param) => { expect(r[param]).toBeDefined(); - expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true); + expect(equivalentContents(paramsToValidate[param], r[param])).toBe(true); }); }); -/** - * Returns a map of key names that were un-equal to value objects showing the - * discrepancies between the components. - */ -const compareEquivalentUnknownTypeBodies = ( - utf8Encoder: __Encoder, - expectedBody: string, - generatedBody: string | Uint8Array -): Object => { - const expectedParts = { Value: expectedBody }; - const generatedParts = { - Value: generatedBody instanceof Uint8Array ? utf8Encoder(generatedBody) : generatedBody, - }; - - return compareParts(expectedParts, generatedParts); +const compareEquivalentCborBodies = (expectedBody: string, generatedBody: string | Uint8Array): undefined => { + expect( + normalizeByteArrayType(cbor.deserialize(typeof generatedBody === "string" ? toBytes(generatedBody) : generatedBody)) + ).toEqual(normalizeByteArrayType(cbor.deserialize(toBytes(expectedBody)))); + return undefined; }; diff --git a/private/weather-experimental-identity-and-auth/package.json b/private/weather-experimental-identity-and-auth/package.json index 8bdaa680d80a..8e02313583a5 100644 --- a/private/weather-experimental-identity-and-auth/package.json +++ b/private/weather-experimental-identity-and-auth/package.json @@ -26,6 +26,7 @@ "@aws-sdk/types": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", +<<<<<<< HEAD "@smithy/config-resolver": "^3.0.5", "@smithy/core": "^2.2.7", "@smithy/experimental-identity-and-auth": "^0.3.11", @@ -49,6 +50,31 @@ "@smithy/util-defaults-mode-node": "^3.0.10", "@smithy/util-middleware": "^3.0.3", "@smithy/util-retry": "^3.0.3", +======= + "@smithy/config-resolver": "^3.0.3", + "@smithy/core": "^2.2.3", + "@smithy/experimental-identity-and-auth": "^0.3.7", + "@smithy/fetch-http-handler": "^3.1.0", + "@smithy/hash-node": "^3.0.2", + "@smithy/invalid-dependency": "^3.0.2", + "@smithy/middleware-content-length": "^3.0.2", + "@smithy/middleware-retry": "^3.0.6", + "@smithy/middleware-serde": "^3.0.2", + "@smithy/middleware-stack": "^3.0.2", + "@smithy/node-config-provider": "^3.1.2", + "@smithy/node-http-handler": "^3.1.0", + "@smithy/protocol-http": "^4.0.2", + "@smithy/smithy-client": "^3.1.4", + "@smithy/types": "^3.2.0", + "@smithy/url-parser": "^3.0.2", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.6", + "@smithy/util-defaults-mode-node": "^3.0.6", + "@smithy/util-middleware": "^3.0.2", + "@smithy/util-retry": "^3.0.2", +>>>>>>> a4f579b8985 (test(cbor): protocol tests using cbor branch) "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2" }, diff --git a/private/weather/package.json b/private/weather/package.json index 123450431c2d..60fbe22dc63d 100644 --- a/private/weather/package.json +++ b/private/weather/package.json @@ -32,6 +32,7 @@ "@aws-sdk/types": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", +<<<<<<< HEAD "@smithy/config-resolver": "^3.0.5", "@smithy/fetch-http-handler": "^3.2.2", "@smithy/hash-node": "^3.0.3", @@ -53,6 +54,29 @@ "@smithy/util-defaults-mode-node": "^3.0.10", "@smithy/util-middleware": "^3.0.3", "@smithy/util-retry": "^3.0.3", +======= + "@smithy/config-resolver": "^3.0.3", + "@smithy/fetch-http-handler": "^3.1.0", + "@smithy/hash-node": "^3.0.2", + "@smithy/invalid-dependency": "^3.0.2", + "@smithy/middleware-content-length": "^3.0.2", + "@smithy/middleware-retry": "^3.0.6", + "@smithy/middleware-serde": "^3.0.2", + "@smithy/middleware-stack": "^3.0.2", + "@smithy/node-config-provider": "^3.1.2", + "@smithy/node-http-handler": "^3.1.0", + "@smithy/protocol-http": "^4.0.2", + "@smithy/smithy-client": "^3.1.4", + "@smithy/types": "^3.2.0", + "@smithy/url-parser": "^3.0.2", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.6", + "@smithy/util-defaults-mode-node": "^3.0.6", + "@smithy/util-middleware": "^3.0.2", + "@smithy/util-retry": "^3.0.2", +>>>>>>> a4f579b8985 (test(cbor): protocol tests using cbor branch) "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2" },