diff --git a/clients/client-auto-scaling/protocols/Aws_query.ts b/clients/client-auto-scaling/protocols/Aws_query.ts index 9a33512167bc..bf3ee3bc5bb0 100644 --- a/clients/client-auto-scaling/protocols/Aws_query.ts +++ b/clients/client-auto-scaling/protocols/Aws_query.ts @@ -347,7 +347,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -7181,10 +7182,7 @@ const deserializeAws_queryActivitiesType = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -7207,59 +7205,34 @@ const deserializeAws_queryActivity = ( StatusMessage: undefined }; if (output["ActivityId"] !== undefined) { - contents.ActivityId = - output["ActivityId"]["#text"] !== undefined - ? output["ActivityId"]["#text"] - : output["ActivityId"]; + contents.ActivityId = output["ActivityId"]; } if (output["AutoScalingGroupName"] !== undefined) { - contents.AutoScalingGroupName = - output["AutoScalingGroupName"]["#text"] !== undefined - ? output["AutoScalingGroupName"]["#text"] - : output["AutoScalingGroupName"]; + contents.AutoScalingGroupName = output["AutoScalingGroupName"]; } if (output["Cause"] !== undefined) { - contents.Cause = - output["Cause"]["#text"] !== undefined - ? output["Cause"]["#text"] - : output["Cause"]; + contents.Cause = output["Cause"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["Details"] !== undefined) { - contents.Details = - output["Details"]["#text"] !== undefined - ? output["Details"]["#text"] - : output["Details"]; + contents.Details = output["Details"]; } if (output["EndTime"] !== undefined) { contents.EndTime = new Date(output["EndTime"]); } if (output["Progress"] !== undefined) { - contents.Progress = parseInt( - output["Progress"]["#text"] !== undefined - ? output["Progress"]["#text"] - : output["Progress"] - ); + contents.Progress = parseInt(output["Progress"]); } if (output["StartTime"] !== undefined) { contents.StartTime = new Date(output["StartTime"]); } if (output["StatusCode"] !== undefined) { - contents.StatusCode = - output["StatusCode"]["#text"] !== undefined - ? output["StatusCode"]["#text"] - : output["StatusCode"]; + contents.StatusCode = output["StatusCode"]; } if (output["StatusMessage"] !== undefined) { - contents.StatusMessage = - output["StatusMessage"]["#text"] !== undefined - ? output["StatusMessage"]["#text"] - : output["StatusMessage"]; + contents.StatusMessage = output["StatusMessage"]; } return contents; }; @@ -7290,10 +7263,7 @@ const deserializeAws_queryAdjustmentType = ( AdjustmentType: undefined }; if (output["AdjustmentType"] !== undefined) { - contents.AdjustmentType = - output["AdjustmentType"]["#text"] !== undefined - ? output["AdjustmentType"]["#text"] - : output["AdjustmentType"]; + contents.AdjustmentType = output["AdjustmentType"]; } return contents; }; @@ -7317,16 +7287,10 @@ const deserializeAws_queryAlarm = ( AlarmName: undefined }; if (output["AlarmARN"] !== undefined) { - contents.AlarmARN = - output["AlarmARN"]["#text"] !== undefined - ? output["AlarmARN"]["#text"] - : output["AlarmARN"]; + contents.AlarmARN = output["AlarmARN"]; } if (output["AlarmName"] !== undefined) { - contents.AlarmName = - output["AlarmName"]["#text"] !== undefined - ? output["AlarmName"]["#text"] - : output["AlarmName"]; + contents.AlarmName = output["AlarmName"]; } return contents; }; @@ -7349,10 +7313,7 @@ const deserializeAws_queryAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7411,16 +7372,10 @@ const deserializeAws_queryAutoScalingGroup = ( VPCZoneIdentifier: undefined }; if (output["AutoScalingGroupARN"] !== undefined) { - contents.AutoScalingGroupARN = - output["AutoScalingGroupARN"]["#text"] !== undefined - ? output["AutoScalingGroupARN"]["#text"] - : output["AutoScalingGroupARN"]; + contents.AutoScalingGroupARN = output["AutoScalingGroupARN"]; } if (output["AutoScalingGroupName"] !== undefined) { - contents.AutoScalingGroupName = - output["AutoScalingGroupName"]["#text"] !== undefined - ? output["AutoScalingGroupName"]["#text"] - : output["AutoScalingGroupName"]; + contents.AutoScalingGroupName = output["AutoScalingGroupName"]; } if (output.AvailabilityZones === "") { contents.AvailabilityZones = []; @@ -7438,18 +7393,10 @@ const deserializeAws_queryAutoScalingGroup = ( contents.CreatedTime = new Date(output["CreatedTime"]); } if (output["DefaultCooldown"] !== undefined) { - contents.DefaultCooldown = parseInt( - output["DefaultCooldown"]["#text"] !== undefined - ? output["DefaultCooldown"]["#text"] - : output["DefaultCooldown"] - ); + contents.DefaultCooldown = parseInt(output["DefaultCooldown"]); } if (output["DesiredCapacity"] !== undefined) { - contents.DesiredCapacity = parseInt( - output["DesiredCapacity"]["#text"] !== undefined - ? output["DesiredCapacity"]["#text"] - : output["DesiredCapacity"] - ); + contents.DesiredCapacity = parseInt(output["DesiredCapacity"]); } if (output.EnabledMetrics === "") { contents.EnabledMetrics = []; @@ -7465,16 +7412,11 @@ const deserializeAws_queryAutoScalingGroup = ( } if (output["HealthCheckGracePeriod"] !== undefined) { contents.HealthCheckGracePeriod = parseInt( - output["HealthCheckGracePeriod"]["#text"] !== undefined - ? output["HealthCheckGracePeriod"]["#text"] - : output["HealthCheckGracePeriod"] + output["HealthCheckGracePeriod"] ); } if (output["HealthCheckType"] !== undefined) { - contents.HealthCheckType = - output["HealthCheckType"]["#text"] !== undefined - ? output["HealthCheckType"]["#text"] - : output["HealthCheckType"]; + contents.HealthCheckType = output["HealthCheckType"]; } if (output.Instances === "") { contents.Instances = []; @@ -7489,10 +7431,7 @@ const deserializeAws_queryAutoScalingGroup = ( ); } if (output["LaunchConfigurationName"] !== undefined) { - contents.LaunchConfigurationName = - output["LaunchConfigurationName"]["#text"] !== undefined - ? output["LaunchConfigurationName"]["#text"] - : output["LaunchConfigurationName"]; + contents.LaunchConfigurationName = output["LaunchConfigurationName"]; } if (output["LaunchTemplate"] !== undefined) { contents.LaunchTemplate = deserializeAws_queryLaunchTemplateSpecification( @@ -7513,25 +7452,13 @@ const deserializeAws_queryAutoScalingGroup = ( ); } if (output["MaxInstanceLifetime"] !== undefined) { - contents.MaxInstanceLifetime = parseInt( - output["MaxInstanceLifetime"]["#text"] !== undefined - ? output["MaxInstanceLifetime"]["#text"] - : output["MaxInstanceLifetime"] - ); + contents.MaxInstanceLifetime = parseInt(output["MaxInstanceLifetime"]); } if (output["MaxSize"] !== undefined) { - contents.MaxSize = parseInt( - output["MaxSize"]["#text"] !== undefined - ? output["MaxSize"]["#text"] - : output["MaxSize"] - ); + contents.MaxSize = parseInt(output["MaxSize"]); } if (output["MinSize"] !== undefined) { - contents.MinSize = parseInt( - output["MinSize"]["#text"] !== undefined - ? output["MinSize"]["#text"] - : output["MinSize"] - ); + contents.MinSize = parseInt(output["MinSize"]); } if (output["MixedInstancesPolicy"] !== undefined) { contents.MixedInstancesPolicy = deserializeAws_queryMixedInstancesPolicy( @@ -7541,27 +7468,16 @@ const deserializeAws_queryAutoScalingGroup = ( } if (output["NewInstancesProtectedFromScaleIn"] !== undefined) { contents.NewInstancesProtectedFromScaleIn = - (output["NewInstancesProtectedFromScaleIn"]["#text"] !== undefined - ? output["NewInstancesProtectedFromScaleIn"]["#text"] - : output["NewInstancesProtectedFromScaleIn"]) == "true"; + output["NewInstancesProtectedFromScaleIn"] == "true"; } if (output["PlacementGroup"] !== undefined) { - contents.PlacementGroup = - output["PlacementGroup"]["#text"] !== undefined - ? output["PlacementGroup"]["#text"] - : output["PlacementGroup"]; + contents.PlacementGroup = output["PlacementGroup"]; } if (output["ServiceLinkedRoleARN"] !== undefined) { - contents.ServiceLinkedRoleARN = - output["ServiceLinkedRoleARN"]["#text"] !== undefined - ? output["ServiceLinkedRoleARN"]["#text"] - : output["ServiceLinkedRoleARN"]; + contents.ServiceLinkedRoleARN = output["ServiceLinkedRoleARN"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output.SuspendedProcesses === "") { contents.SuspendedProcesses = []; @@ -7609,10 +7525,7 @@ const deserializeAws_queryAutoScalingGroup = ( ); } if (output["VPCZoneIdentifier"] !== undefined) { - contents.VPCZoneIdentifier = - output["VPCZoneIdentifier"]["#text"] !== undefined - ? output["VPCZoneIdentifier"]["#text"] - : output["VPCZoneIdentifier"]; + contents.VPCZoneIdentifier = output["VPCZoneIdentifier"]; } return contents; }; @@ -7648,10 +7561,7 @@ const deserializeAws_queryAutoScalingGroupsType = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -7674,40 +7584,22 @@ const deserializeAws_queryAutoScalingInstanceDetails = ( WeightedCapacity: undefined }; if (output["AutoScalingGroupName"] !== undefined) { - contents.AutoScalingGroupName = - output["AutoScalingGroupName"]["#text"] !== undefined - ? output["AutoScalingGroupName"]["#text"] - : output["AutoScalingGroupName"]; + contents.AutoScalingGroupName = output["AutoScalingGroupName"]; } if (output["AvailabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["AvailabilityZone"]["#text"] !== undefined - ? output["AvailabilityZone"]["#text"] - : output["AvailabilityZone"]; + contents.AvailabilityZone = output["AvailabilityZone"]; } if (output["HealthStatus"] !== undefined) { - contents.HealthStatus = - output["HealthStatus"]["#text"] !== undefined - ? output["HealthStatus"]["#text"] - : output["HealthStatus"]; + contents.HealthStatus = output["HealthStatus"]; } if (output["InstanceId"] !== undefined) { - contents.InstanceId = - output["InstanceId"]["#text"] !== undefined - ? output["InstanceId"]["#text"] - : output["InstanceId"]; + contents.InstanceId = output["InstanceId"]; } if (output["InstanceType"] !== undefined) { - contents.InstanceType = - output["InstanceType"]["#text"] !== undefined - ? output["InstanceType"]["#text"] - : output["InstanceType"]; + contents.InstanceType = output["InstanceType"]; } if (output["LaunchConfigurationName"] !== undefined) { - contents.LaunchConfigurationName = - output["LaunchConfigurationName"]["#text"] !== undefined - ? output["LaunchConfigurationName"]["#text"] - : output["LaunchConfigurationName"]; + contents.LaunchConfigurationName = output["LaunchConfigurationName"]; } if (output["LaunchTemplate"] !== undefined) { contents.LaunchTemplate = deserializeAws_queryLaunchTemplateSpecification( @@ -7716,22 +7608,13 @@ const deserializeAws_queryAutoScalingInstanceDetails = ( ); } if (output["LifecycleState"] !== undefined) { - contents.LifecycleState = - output["LifecycleState"]["#text"] !== undefined - ? output["LifecycleState"]["#text"] - : output["LifecycleState"]; + contents.LifecycleState = output["LifecycleState"]; } if (output["ProtectedFromScaleIn"] !== undefined) { - contents.ProtectedFromScaleIn = - (output["ProtectedFromScaleIn"]["#text"] !== undefined - ? output["ProtectedFromScaleIn"]["#text"] - : output["ProtectedFromScaleIn"]) == "true"; + contents.ProtectedFromScaleIn = output["ProtectedFromScaleIn"] == "true"; } if (output["WeightedCapacity"] !== undefined) { - contents.WeightedCapacity = - output["WeightedCapacity"]["#text"] !== undefined - ? output["WeightedCapacity"]["#text"] - : output["WeightedCapacity"]; + contents.WeightedCapacity = output["WeightedCapacity"]; } return contents; }; @@ -7767,10 +7650,7 @@ const deserializeAws_queryAutoScalingInstancesType = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -7779,18 +7659,14 @@ const deserializeAws_queryAutoScalingNotificationTypes = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryAvailabilityZones = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryBatchDeleteScheduledActionAnswer = ( @@ -7853,25 +7729,16 @@ const deserializeAws_queryBlockDeviceMapping = ( VirtualName: undefined }; if (output["DeviceName"] !== undefined) { - contents.DeviceName = - output["DeviceName"]["#text"] !== undefined - ? output["DeviceName"]["#text"] - : output["DeviceName"]; + contents.DeviceName = output["DeviceName"]; } if (output["Ebs"] !== undefined) { contents.Ebs = deserializeAws_queryEbs(output["Ebs"], context); } if (output["NoDevice"] !== undefined) { - contents.NoDevice = - (output["NoDevice"]["#text"] !== undefined - ? output["NoDevice"]["#text"] - : output["NoDevice"]) == "true"; + contents.NoDevice = output["NoDevice"] == "true"; } if (output["VirtualName"] !== undefined) { - contents.VirtualName = - output["VirtualName"]["#text"] !== undefined - ? output["VirtualName"]["#text"] - : output["VirtualName"]; + contents.VirtualName = output["VirtualName"]; } return contents; }; @@ -7889,9 +7756,7 @@ const deserializeAws_queryClassicLinkVPCSecurityGroups = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryCompleteLifecycleActionAnswer = ( @@ -7929,28 +7794,16 @@ const deserializeAws_queryCustomizedMetricSpecification = ( ); } if (output["MetricName"] !== undefined) { - contents.MetricName = - output["MetricName"]["#text"] !== undefined - ? output["MetricName"]["#text"] - : output["MetricName"]; + contents.MetricName = output["MetricName"]; } if (output["Namespace"] !== undefined) { - contents.Namespace = - output["Namespace"]["#text"] !== undefined - ? output["Namespace"]["#text"] - : output["Namespace"]; + contents.Namespace = output["Namespace"]; } if (output["Statistic"] !== undefined) { - contents.Statistic = - output["Statistic"]["#text"] !== undefined - ? output["Statistic"]["#text"] - : output["Statistic"]; + contents.Statistic = output["Statistic"]; } if (output["Unit"] !== undefined) { - contents.Unit = - output["Unit"]["#text"] !== undefined - ? output["Unit"]["#text"] - : output["Unit"]; + contents.Unit = output["Unit"]; } return contents; }; @@ -7978,30 +7831,22 @@ const deserializeAws_queryDescribeAccountLimitsAnswer = ( }; if (output["MaxNumberOfAutoScalingGroups"] !== undefined) { contents.MaxNumberOfAutoScalingGroups = parseInt( - output["MaxNumberOfAutoScalingGroups"]["#text"] !== undefined - ? output["MaxNumberOfAutoScalingGroups"]["#text"] - : output["MaxNumberOfAutoScalingGroups"] + output["MaxNumberOfAutoScalingGroups"] ); } if (output["MaxNumberOfLaunchConfigurations"] !== undefined) { contents.MaxNumberOfLaunchConfigurations = parseInt( - output["MaxNumberOfLaunchConfigurations"]["#text"] !== undefined - ? output["MaxNumberOfLaunchConfigurations"]["#text"] - : output["MaxNumberOfLaunchConfigurations"] + output["MaxNumberOfLaunchConfigurations"] ); } if (output["NumberOfAutoScalingGroups"] !== undefined) { contents.NumberOfAutoScalingGroups = parseInt( - output["NumberOfAutoScalingGroups"]["#text"] !== undefined - ? output["NumberOfAutoScalingGroups"]["#text"] - : output["NumberOfAutoScalingGroups"] + output["NumberOfAutoScalingGroups"] ); } if (output["NumberOfLaunchConfigurations"] !== undefined) { contents.NumberOfLaunchConfigurations = parseInt( - output["NumberOfLaunchConfigurations"]["#text"] !== undefined - ? output["NumberOfLaunchConfigurations"]["#text"] - : output["NumberOfLaunchConfigurations"] + output["NumberOfLaunchConfigurations"] ); } return contents; @@ -8121,10 +7966,7 @@ const deserializeAws_queryDescribeLoadBalancerTargetGroupsResponse = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -8151,10 +7993,7 @@ const deserializeAws_queryDescribeLoadBalancersResponse = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -8205,10 +8044,7 @@ const deserializeAws_queryDescribeNotificationConfigurationsAnswer = ( NotificationConfigurations: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.NotificationConfigurations === "") { contents.NotificationConfigurations = []; @@ -8302,42 +8138,22 @@ const deserializeAws_queryEbs = (output: any, context: __SerdeContext): Ebs => { VolumeType: undefined }; if (output["DeleteOnTermination"] !== undefined) { - contents.DeleteOnTermination = - (output["DeleteOnTermination"]["#text"] !== undefined - ? output["DeleteOnTermination"]["#text"] - : output["DeleteOnTermination"]) == "true"; + contents.DeleteOnTermination = output["DeleteOnTermination"] == "true"; } if (output["Encrypted"] !== undefined) { - contents.Encrypted = - (output["Encrypted"]["#text"] !== undefined - ? output["Encrypted"]["#text"] - : output["Encrypted"]) == "true"; + contents.Encrypted = output["Encrypted"] == "true"; } if (output["Iops"] !== undefined) { - contents.Iops = parseInt( - output["Iops"]["#text"] !== undefined - ? output["Iops"]["#text"] - : output["Iops"] - ); + contents.Iops = parseInt(output["Iops"]); } if (output["SnapshotId"] !== undefined) { - contents.SnapshotId = - output["SnapshotId"]["#text"] !== undefined - ? output["SnapshotId"]["#text"] - : output["SnapshotId"]; + contents.SnapshotId = output["SnapshotId"]; } if (output["VolumeSize"] !== undefined) { - contents.VolumeSize = parseInt( - output["VolumeSize"]["#text"] !== undefined - ? output["VolumeSize"]["#text"] - : output["VolumeSize"] - ); + contents.VolumeSize = parseInt(output["VolumeSize"]); } if (output["VolumeType"] !== undefined) { - contents.VolumeType = - output["VolumeType"]["#text"] !== undefined - ? output["VolumeType"]["#text"] - : output["VolumeType"]; + contents.VolumeType = output["VolumeType"]; } return contents; }; @@ -8352,16 +8168,10 @@ const deserializeAws_queryEnabledMetric = ( Metric: undefined }; if (output["Granularity"] !== undefined) { - contents.Granularity = - output["Granularity"]["#text"] !== undefined - ? output["Granularity"]["#text"] - : output["Granularity"]; + contents.Granularity = output["Granularity"]; } if (output["Metric"] !== undefined) { - contents.Metric = - output["Metric"]["#text"] !== undefined - ? output["Metric"]["#text"] - : output["Metric"]; + contents.Metric = output["Metric"]; } return contents; }; @@ -8432,22 +8242,13 @@ const deserializeAws_queryFailedScheduledUpdateGroupActionRequest = ( ScheduledActionName: undefined }; if (output["ErrorCode"] !== undefined) { - contents.ErrorCode = - output["ErrorCode"]["#text"] !== undefined - ? output["ErrorCode"]["#text"] - : output["ErrorCode"]; + contents.ErrorCode = output["ErrorCode"]; } if (output["ErrorMessage"] !== undefined) { - contents.ErrorMessage = - output["ErrorMessage"]["#text"] !== undefined - ? output["ErrorMessage"]["#text"] - : output["ErrorMessage"]; + contents.ErrorMessage = output["ErrorMessage"]; } if (output["ScheduledActionName"] !== undefined) { - contents.ScheduledActionName = - output["ScheduledActionName"]["#text"] !== undefined - ? output["ScheduledActionName"]["#text"] - : output["ScheduledActionName"]; + contents.ScheduledActionName = output["ScheduledActionName"]; } return contents; }; @@ -8478,34 +8279,19 @@ const deserializeAws_queryInstance = ( WeightedCapacity: undefined }; if (output["AvailabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["AvailabilityZone"]["#text"] !== undefined - ? output["AvailabilityZone"]["#text"] - : output["AvailabilityZone"]; + contents.AvailabilityZone = output["AvailabilityZone"]; } if (output["HealthStatus"] !== undefined) { - contents.HealthStatus = - output["HealthStatus"]["#text"] !== undefined - ? output["HealthStatus"]["#text"] - : output["HealthStatus"]; + contents.HealthStatus = output["HealthStatus"]; } if (output["InstanceId"] !== undefined) { - contents.InstanceId = - output["InstanceId"]["#text"] !== undefined - ? output["InstanceId"]["#text"] - : output["InstanceId"]; + contents.InstanceId = output["InstanceId"]; } if (output["InstanceType"] !== undefined) { - contents.InstanceType = - output["InstanceType"]["#text"] !== undefined - ? output["InstanceType"]["#text"] - : output["InstanceType"]; + contents.InstanceType = output["InstanceType"]; } if (output["LaunchConfigurationName"] !== undefined) { - contents.LaunchConfigurationName = - output["LaunchConfigurationName"]["#text"] !== undefined - ? output["LaunchConfigurationName"]["#text"] - : output["LaunchConfigurationName"]; + contents.LaunchConfigurationName = output["LaunchConfigurationName"]; } if (output["LaunchTemplate"] !== undefined) { contents.LaunchTemplate = deserializeAws_queryLaunchTemplateSpecification( @@ -8514,22 +8300,13 @@ const deserializeAws_queryInstance = ( ); } if (output["LifecycleState"] !== undefined) { - contents.LifecycleState = - output["LifecycleState"]["#text"] !== undefined - ? output["LifecycleState"]["#text"] - : output["LifecycleState"]; + contents.LifecycleState = output["LifecycleState"]; } if (output["ProtectedFromScaleIn"] !== undefined) { - contents.ProtectedFromScaleIn = - (output["ProtectedFromScaleIn"]["#text"] !== undefined - ? output["ProtectedFromScaleIn"]["#text"] - : output["ProtectedFromScaleIn"]) == "true"; + contents.ProtectedFromScaleIn = output["ProtectedFromScaleIn"] == "true"; } if (output["WeightedCapacity"] !== undefined) { - contents.WeightedCapacity = - output["WeightedCapacity"]["#text"] !== undefined - ? output["WeightedCapacity"]["#text"] - : output["WeightedCapacity"]; + contents.WeightedCapacity = output["WeightedCapacity"]; } return contents; }; @@ -8543,10 +8320,7 @@ const deserializeAws_queryInstanceMonitoring = ( Enabled: undefined }; if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } return contents; }; @@ -8574,43 +8348,24 @@ const deserializeAws_queryInstancesDistribution = ( SpotMaxPrice: undefined }; if (output["OnDemandAllocationStrategy"] !== undefined) { - contents.OnDemandAllocationStrategy = - output["OnDemandAllocationStrategy"]["#text"] !== undefined - ? output["OnDemandAllocationStrategy"]["#text"] - : output["OnDemandAllocationStrategy"]; + contents.OnDemandAllocationStrategy = output["OnDemandAllocationStrategy"]; } if (output["OnDemandBaseCapacity"] !== undefined) { - contents.OnDemandBaseCapacity = parseInt( - output["OnDemandBaseCapacity"]["#text"] !== undefined - ? output["OnDemandBaseCapacity"]["#text"] - : output["OnDemandBaseCapacity"] - ); + contents.OnDemandBaseCapacity = parseInt(output["OnDemandBaseCapacity"]); } if (output["OnDemandPercentageAboveBaseCapacity"] !== undefined) { contents.OnDemandPercentageAboveBaseCapacity = parseInt( - output["OnDemandPercentageAboveBaseCapacity"]["#text"] !== undefined - ? output["OnDemandPercentageAboveBaseCapacity"]["#text"] - : output["OnDemandPercentageAboveBaseCapacity"] + output["OnDemandPercentageAboveBaseCapacity"] ); } if (output["SpotAllocationStrategy"] !== undefined) { - contents.SpotAllocationStrategy = - output["SpotAllocationStrategy"]["#text"] !== undefined - ? output["SpotAllocationStrategy"]["#text"] - : output["SpotAllocationStrategy"]; + contents.SpotAllocationStrategy = output["SpotAllocationStrategy"]; } if (output["SpotInstancePools"] !== undefined) { - contents.SpotInstancePools = parseInt( - output["SpotInstancePools"]["#text"] !== undefined - ? output["SpotInstancePools"]["#text"] - : output["SpotInstancePools"] - ); + contents.SpotInstancePools = parseInt(output["SpotInstancePools"]); } if (output["SpotMaxPrice"] !== undefined) { - contents.SpotMaxPrice = - output["SpotMaxPrice"]["#text"] !== undefined - ? output["SpotMaxPrice"]["#text"] - : output["SpotMaxPrice"]; + contents.SpotMaxPrice = output["SpotMaxPrice"]; } return contents; }; @@ -8624,10 +8379,7 @@ const deserializeAws_queryInvalidNextToken = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -8660,9 +8412,7 @@ const deserializeAws_queryLaunchConfiguration = ( }; if (output["AssociatePublicIpAddress"] !== undefined) { contents.AssociatePublicIpAddress = - (output["AssociatePublicIpAddress"]["#text"] !== undefined - ? output["AssociatePublicIpAddress"]["#text"] - : output["AssociatePublicIpAddress"]) == "true"; + output["AssociatePublicIpAddress"] == "true"; } if (output.BlockDeviceMappings === "") { contents.BlockDeviceMappings = []; @@ -8677,10 +8427,7 @@ const deserializeAws_queryLaunchConfiguration = ( ); } if (output["ClassicLinkVPCId"] !== undefined) { - contents.ClassicLinkVPCId = - output["ClassicLinkVPCId"]["#text"] !== undefined - ? output["ClassicLinkVPCId"]["#text"] - : output["ClassicLinkVPCId"]; + contents.ClassicLinkVPCId = output["ClassicLinkVPCId"]; } if (output.ClassicLinkVPCSecurityGroups === "") { contents.ClassicLinkVPCSecurityGroups = []; @@ -8698,22 +8445,13 @@ const deserializeAws_queryLaunchConfiguration = ( contents.CreatedTime = new Date(output["CreatedTime"]); } if (output["EbsOptimized"] !== undefined) { - contents.EbsOptimized = - (output["EbsOptimized"]["#text"] !== undefined - ? output["EbsOptimized"]["#text"] - : output["EbsOptimized"]) == "true"; + contents.EbsOptimized = output["EbsOptimized"] == "true"; } if (output["IamInstanceProfile"] !== undefined) { - contents.IamInstanceProfile = - output["IamInstanceProfile"]["#text"] !== undefined - ? output["IamInstanceProfile"]["#text"] - : output["IamInstanceProfile"]; + contents.IamInstanceProfile = output["IamInstanceProfile"]; } if (output["ImageId"] !== undefined) { - contents.ImageId = - output["ImageId"]["#text"] !== undefined - ? output["ImageId"]["#text"] - : output["ImageId"]; + contents.ImageId = output["ImageId"]; } if (output["InstanceMonitoring"] !== undefined) { contents.InstanceMonitoring = deserializeAws_queryInstanceMonitoring( @@ -8722,46 +8460,25 @@ const deserializeAws_queryLaunchConfiguration = ( ); } if (output["InstanceType"] !== undefined) { - contents.InstanceType = - output["InstanceType"]["#text"] !== undefined - ? output["InstanceType"]["#text"] - : output["InstanceType"]; + contents.InstanceType = output["InstanceType"]; } if (output["KernelId"] !== undefined) { - contents.KernelId = - output["KernelId"]["#text"] !== undefined - ? output["KernelId"]["#text"] - : output["KernelId"]; + contents.KernelId = output["KernelId"]; } if (output["KeyName"] !== undefined) { - contents.KeyName = - output["KeyName"]["#text"] !== undefined - ? output["KeyName"]["#text"] - : output["KeyName"]; + contents.KeyName = output["KeyName"]; } if (output["LaunchConfigurationARN"] !== undefined) { - contents.LaunchConfigurationARN = - output["LaunchConfigurationARN"]["#text"] !== undefined - ? output["LaunchConfigurationARN"]["#text"] - : output["LaunchConfigurationARN"]; + contents.LaunchConfigurationARN = output["LaunchConfigurationARN"]; } if (output["LaunchConfigurationName"] !== undefined) { - contents.LaunchConfigurationName = - output["LaunchConfigurationName"]["#text"] !== undefined - ? output["LaunchConfigurationName"]["#text"] - : output["LaunchConfigurationName"]; + contents.LaunchConfigurationName = output["LaunchConfigurationName"]; } if (output["PlacementTenancy"] !== undefined) { - contents.PlacementTenancy = - output["PlacementTenancy"]["#text"] !== undefined - ? output["PlacementTenancy"]["#text"] - : output["PlacementTenancy"]; + contents.PlacementTenancy = output["PlacementTenancy"]; } if (output["RamdiskId"] !== undefined) { - contents.RamdiskId = - output["RamdiskId"]["#text"] !== undefined - ? output["RamdiskId"]["#text"] - : output["RamdiskId"]; + contents.RamdiskId = output["RamdiskId"]; } if (output.SecurityGroups === "") { contents.SecurityGroups = []; @@ -8776,16 +8493,10 @@ const deserializeAws_queryLaunchConfiguration = ( ); } if (output["SpotPrice"] !== undefined) { - contents.SpotPrice = - output["SpotPrice"]["#text"] !== undefined - ? output["SpotPrice"]["#text"] - : output["SpotPrice"]; + contents.SpotPrice = output["SpotPrice"]; } if (output["UserData"] !== undefined) { - contents.UserData = - output["UserData"]["#text"] !== undefined - ? output["UserData"]["#text"] - : output["UserData"]; + contents.UserData = output["UserData"]; } return contents; }; @@ -8821,10 +8532,7 @@ const deserializeAws_queryLaunchConfigurationsType = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -8869,16 +8577,10 @@ const deserializeAws_queryLaunchTemplateOverrides = ( WeightedCapacity: undefined }; if (output["InstanceType"] !== undefined) { - contents.InstanceType = - output["InstanceType"]["#text"] !== undefined - ? output["InstanceType"]["#text"] - : output["InstanceType"]; + contents.InstanceType = output["InstanceType"]; } if (output["WeightedCapacity"] !== undefined) { - contents.WeightedCapacity = - output["WeightedCapacity"]["#text"] !== undefined - ? output["WeightedCapacity"]["#text"] - : output["WeightedCapacity"]; + contents.WeightedCapacity = output["WeightedCapacity"]; } return contents; }; @@ -8894,22 +8596,13 @@ const deserializeAws_queryLaunchTemplateSpecification = ( Version: undefined }; if (output["LaunchTemplateId"] !== undefined) { - contents.LaunchTemplateId = - output["LaunchTemplateId"]["#text"] !== undefined - ? output["LaunchTemplateId"]["#text"] - : output["LaunchTemplateId"]; + contents.LaunchTemplateId = output["LaunchTemplateId"]; } if (output["LaunchTemplateName"] !== undefined) { - contents.LaunchTemplateName = - output["LaunchTemplateName"]["#text"] !== undefined - ? output["LaunchTemplateName"]["#text"] - : output["LaunchTemplateName"]; + contents.LaunchTemplateName = output["LaunchTemplateName"]; } if (output["Version"] !== undefined) { - contents.Version = - output["Version"]["#text"] !== undefined - ? output["Version"]["#text"] - : output["Version"]; + contents.Version = output["Version"]; } return contents; }; @@ -8931,60 +8624,31 @@ const deserializeAws_queryLifecycleHook = ( RoleARN: undefined }; if (output["AutoScalingGroupName"] !== undefined) { - contents.AutoScalingGroupName = - output["AutoScalingGroupName"]["#text"] !== undefined - ? output["AutoScalingGroupName"]["#text"] - : output["AutoScalingGroupName"]; + contents.AutoScalingGroupName = output["AutoScalingGroupName"]; } if (output["DefaultResult"] !== undefined) { - contents.DefaultResult = - output["DefaultResult"]["#text"] !== undefined - ? output["DefaultResult"]["#text"] - : output["DefaultResult"]; + contents.DefaultResult = output["DefaultResult"]; } if (output["GlobalTimeout"] !== undefined) { - contents.GlobalTimeout = parseInt( - output["GlobalTimeout"]["#text"] !== undefined - ? output["GlobalTimeout"]["#text"] - : output["GlobalTimeout"] - ); + contents.GlobalTimeout = parseInt(output["GlobalTimeout"]); } if (output["HeartbeatTimeout"] !== undefined) { - contents.HeartbeatTimeout = parseInt( - output["HeartbeatTimeout"]["#text"] !== undefined - ? output["HeartbeatTimeout"]["#text"] - : output["HeartbeatTimeout"] - ); + contents.HeartbeatTimeout = parseInt(output["HeartbeatTimeout"]); } if (output["LifecycleHookName"] !== undefined) { - contents.LifecycleHookName = - output["LifecycleHookName"]["#text"] !== undefined - ? output["LifecycleHookName"]["#text"] - : output["LifecycleHookName"]; + contents.LifecycleHookName = output["LifecycleHookName"]; } if (output["LifecycleTransition"] !== undefined) { - contents.LifecycleTransition = - output["LifecycleTransition"]["#text"] !== undefined - ? output["LifecycleTransition"]["#text"] - : output["LifecycleTransition"]; + contents.LifecycleTransition = output["LifecycleTransition"]; } if (output["NotificationMetadata"] !== undefined) { - contents.NotificationMetadata = - output["NotificationMetadata"]["#text"] !== undefined - ? output["NotificationMetadata"]["#text"] - : output["NotificationMetadata"]; + contents.NotificationMetadata = output["NotificationMetadata"]; } if (output["NotificationTargetARN"] !== undefined) { - contents.NotificationTargetARN = - output["NotificationTargetARN"]["#text"] !== undefined - ? output["NotificationTargetARN"]["#text"] - : output["NotificationTargetARN"]; + contents.NotificationTargetARN = output["NotificationTargetARN"]; } if (output["RoleARN"] !== undefined) { - contents.RoleARN = - output["RoleARN"]["#text"] !== undefined - ? output["RoleARN"]["#text"] - : output["RoleARN"]; + contents.RoleARN = output["RoleARN"]; } return contents; }; @@ -9007,10 +8671,7 @@ const deserializeAws_queryLimitExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9019,9 +8680,7 @@ const deserializeAws_queryLoadBalancerNames = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryLoadBalancerState = ( @@ -9034,16 +8693,10 @@ const deserializeAws_queryLoadBalancerState = ( State: undefined }; if (output["LoadBalancerName"] !== undefined) { - contents.LoadBalancerName = - output["LoadBalancerName"]["#text"] !== undefined - ? output["LoadBalancerName"]["#text"] - : output["LoadBalancerName"]; + contents.LoadBalancerName = output["LoadBalancerName"]; } if (output["State"] !== undefined) { - contents.State = - output["State"]["#text"] !== undefined - ? output["State"]["#text"] - : output["State"]; + contents.State = output["State"]; } return contents; }; @@ -9067,16 +8720,10 @@ const deserializeAws_queryLoadBalancerTargetGroupState = ( State: undefined }; if (output["LoadBalancerTargetGroupARN"] !== undefined) { - contents.LoadBalancerTargetGroupARN = - output["LoadBalancerTargetGroupARN"]["#text"] !== undefined - ? output["LoadBalancerTargetGroupARN"]["#text"] - : output["LoadBalancerTargetGroupARN"]; + contents.LoadBalancerTargetGroupARN = output["LoadBalancerTargetGroupARN"]; } if (output["State"] !== undefined) { - contents.State = - output["State"]["#text"] !== undefined - ? output["State"]["#text"] - : output["State"]; + contents.State = output["State"]; } return contents; }; @@ -9099,10 +8746,7 @@ const deserializeAws_queryMetricCollectionType = ( Metric: undefined }; if (output["Metric"] !== undefined) { - contents.Metric = - output["Metric"]["#text"] !== undefined - ? output["Metric"]["#text"] - : output["Metric"]; + contents.Metric = output["Metric"]; } return contents; }; @@ -9126,16 +8770,10 @@ const deserializeAws_queryMetricDimension = ( Value: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -9158,10 +8796,7 @@ const deserializeAws_queryMetricGranularityType = ( Granularity: undefined }; if (output["Granularity"] !== undefined) { - contents.Granularity = - output["Granularity"]["#text"] !== undefined - ? output["Granularity"]["#text"] - : output["Granularity"]; + contents.Granularity = output["Granularity"]; } return contents; }; @@ -9210,22 +8845,13 @@ const deserializeAws_queryNotificationConfiguration = ( TopicARN: undefined }; if (output["AutoScalingGroupName"] !== undefined) { - contents.AutoScalingGroupName = - output["AutoScalingGroupName"]["#text"] !== undefined - ? output["AutoScalingGroupName"]["#text"] - : output["AutoScalingGroupName"]; + contents.AutoScalingGroupName = output["AutoScalingGroupName"]; } if (output["NotificationType"] !== undefined) { - contents.NotificationType = - output["NotificationType"]["#text"] !== undefined - ? output["NotificationType"]["#text"] - : output["NotificationType"]; + contents.NotificationType = output["NotificationType"]; } if (output["TopicARN"] !== undefined) { - contents.TopicARN = - output["TopicARN"]["#text"] !== undefined - ? output["TopicARN"]["#text"] - : output["TopicARN"]; + contents.TopicARN = output["TopicARN"]; } return contents; }; @@ -9258,10 +8884,7 @@ const deserializeAws_queryPoliciesType = ( ScalingPolicies: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.ScalingPolicies === "") { contents.ScalingPolicies = []; @@ -9300,10 +8923,7 @@ const deserializeAws_queryPolicyARNType = ( ); } if (output["PolicyARN"] !== undefined) { - contents.PolicyARN = - output["PolicyARN"]["#text"] !== undefined - ? output["PolicyARN"]["#text"] - : output["PolicyARN"]; + contents.PolicyARN = output["PolicyARN"]; } return contents; }; @@ -9318,16 +8938,10 @@ const deserializeAws_queryPredefinedMetricSpecification = ( ResourceLabel: undefined }; if (output["PredefinedMetricType"] !== undefined) { - contents.PredefinedMetricType = - output["PredefinedMetricType"]["#text"] !== undefined - ? output["PredefinedMetricType"]["#text"] - : output["PredefinedMetricType"]; + contents.PredefinedMetricType = output["PredefinedMetricType"]; } if (output["ResourceLabel"] !== undefined) { - contents.ResourceLabel = - output["ResourceLabel"]["#text"] !== undefined - ? output["ResourceLabel"]["#text"] - : output["ResourceLabel"]; + contents.ResourceLabel = output["ResourceLabel"]; } return contents; }; @@ -9341,10 +8955,7 @@ const deserializeAws_queryProcessType = ( ProcessName: undefined }; if (output["ProcessName"] !== undefined) { - contents.ProcessName = - output["ProcessName"]["#text"] !== undefined - ? output["ProcessName"]["#text"] - : output["ProcessName"]; + contents.ProcessName = output["ProcessName"]; } return contents; }; @@ -9410,10 +9021,7 @@ const deserializeAws_queryResourceContentionFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9427,10 +9035,7 @@ const deserializeAws_queryResourceInUseFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9444,10 +9049,7 @@ const deserializeAws_queryScalingActivityInProgressFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9483,10 +9085,7 @@ const deserializeAws_queryScalingPolicy = ( TargetTrackingConfiguration: undefined }; if (output["AdjustmentType"] !== undefined) { - contents.AdjustmentType = - output["AdjustmentType"]["#text"] !== undefined - ? output["AdjustmentType"]["#text"] - : output["AdjustmentType"]; + contents.AdjustmentType = output["AdjustmentType"]; } if (output.Alarms === "") { contents.Alarms = []; @@ -9501,69 +9100,38 @@ const deserializeAws_queryScalingPolicy = ( ); } if (output["AutoScalingGroupName"] !== undefined) { - contents.AutoScalingGroupName = - output["AutoScalingGroupName"]["#text"] !== undefined - ? output["AutoScalingGroupName"]["#text"] - : output["AutoScalingGroupName"]; + contents.AutoScalingGroupName = output["AutoScalingGroupName"]; } if (output["Cooldown"] !== undefined) { - contents.Cooldown = parseInt( - output["Cooldown"]["#text"] !== undefined - ? output["Cooldown"]["#text"] - : output["Cooldown"] - ); + contents.Cooldown = parseInt(output["Cooldown"]); } if (output["EstimatedInstanceWarmup"] !== undefined) { contents.EstimatedInstanceWarmup = parseInt( - output["EstimatedInstanceWarmup"]["#text"] !== undefined - ? output["EstimatedInstanceWarmup"]["#text"] - : output["EstimatedInstanceWarmup"] + output["EstimatedInstanceWarmup"] ); } if (output["MetricAggregationType"] !== undefined) { - contents.MetricAggregationType = - output["MetricAggregationType"]["#text"] !== undefined - ? output["MetricAggregationType"]["#text"] - : output["MetricAggregationType"]; + contents.MetricAggregationType = output["MetricAggregationType"]; } if (output["MinAdjustmentMagnitude"] !== undefined) { contents.MinAdjustmentMagnitude = parseInt( - output["MinAdjustmentMagnitude"]["#text"] !== undefined - ? output["MinAdjustmentMagnitude"]["#text"] - : output["MinAdjustmentMagnitude"] + output["MinAdjustmentMagnitude"] ); } if (output["MinAdjustmentStep"] !== undefined) { - contents.MinAdjustmentStep = parseInt( - output["MinAdjustmentStep"]["#text"] !== undefined - ? output["MinAdjustmentStep"]["#text"] - : output["MinAdjustmentStep"] - ); + contents.MinAdjustmentStep = parseInt(output["MinAdjustmentStep"]); } if (output["PolicyARN"] !== undefined) { - contents.PolicyARN = - output["PolicyARN"]["#text"] !== undefined - ? output["PolicyARN"]["#text"] - : output["PolicyARN"]; + contents.PolicyARN = output["PolicyARN"]; } if (output["PolicyName"] !== undefined) { - contents.PolicyName = - output["PolicyName"]["#text"] !== undefined - ? output["PolicyName"]["#text"] - : output["PolicyName"]; + contents.PolicyName = output["PolicyName"]; } if (output["PolicyType"] !== undefined) { - contents.PolicyType = - output["PolicyType"]["#text"] !== undefined - ? output["PolicyType"]["#text"] - : output["PolicyType"]; + contents.PolicyType = output["PolicyType"]; } if (output["ScalingAdjustment"] !== undefined) { - contents.ScalingAdjustment = parseInt( - output["ScalingAdjustment"]["#text"] !== undefined - ? output["ScalingAdjustment"]["#text"] - : output["ScalingAdjustment"] - ); + contents.ScalingAdjustment = parseInt(output["ScalingAdjustment"]); } if (output.StepAdjustments === "") { contents.StepAdjustments = []; @@ -9596,10 +9164,7 @@ const deserializeAws_queryScheduledActionsType = ( ScheduledUpdateGroupActions: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.ScheduledUpdateGroupActions === "") { contents.ScheduledUpdateGroupActions = []; @@ -9634,52 +9199,28 @@ const deserializeAws_queryScheduledUpdateGroupAction = ( Time: undefined }; if (output["AutoScalingGroupName"] !== undefined) { - contents.AutoScalingGroupName = - output["AutoScalingGroupName"]["#text"] !== undefined - ? output["AutoScalingGroupName"]["#text"] - : output["AutoScalingGroupName"]; + contents.AutoScalingGroupName = output["AutoScalingGroupName"]; } if (output["DesiredCapacity"] !== undefined) { - contents.DesiredCapacity = parseInt( - output["DesiredCapacity"]["#text"] !== undefined - ? output["DesiredCapacity"]["#text"] - : output["DesiredCapacity"] - ); + contents.DesiredCapacity = parseInt(output["DesiredCapacity"]); } if (output["EndTime"] !== undefined) { contents.EndTime = new Date(output["EndTime"]); } if (output["MaxSize"] !== undefined) { - contents.MaxSize = parseInt( - output["MaxSize"]["#text"] !== undefined - ? output["MaxSize"]["#text"] - : output["MaxSize"] - ); + contents.MaxSize = parseInt(output["MaxSize"]); } if (output["MinSize"] !== undefined) { - contents.MinSize = parseInt( - output["MinSize"]["#text"] !== undefined - ? output["MinSize"]["#text"] - : output["MinSize"] - ); + contents.MinSize = parseInt(output["MinSize"]); } if (output["Recurrence"] !== undefined) { - contents.Recurrence = - output["Recurrence"]["#text"] !== undefined - ? output["Recurrence"]["#text"] - : output["Recurrence"]; + contents.Recurrence = output["Recurrence"]; } if (output["ScheduledActionARN"] !== undefined) { - contents.ScheduledActionARN = - output["ScheduledActionARN"]["#text"] !== undefined - ? output["ScheduledActionARN"]["#text"] - : output["ScheduledActionARN"]; + contents.ScheduledActionARN = output["ScheduledActionARN"]; } if (output["ScheduledActionName"] !== undefined) { - contents.ScheduledActionName = - output["ScheduledActionName"]["#text"] !== undefined - ? output["ScheduledActionName"]["#text"] - : output["ScheduledActionName"]; + contents.ScheduledActionName = output["ScheduledActionName"]; } if (output["StartTime"] !== undefined) { contents.StartTime = new Date(output["StartTime"]); @@ -9703,9 +9244,7 @@ const deserializeAws_querySecurityGroups = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryServiceLinkedRoleFailure = ( @@ -9717,10 +9256,7 @@ const deserializeAws_queryServiceLinkedRoleFailure = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9747,24 +9283,16 @@ const deserializeAws_queryStepAdjustment = ( }; if (output["MetricIntervalLowerBound"] !== undefined) { contents.MetricIntervalLowerBound = parseFloat( - output["MetricIntervalLowerBound"]["#text"] !== undefined - ? output["MetricIntervalLowerBound"]["#text"] - : output["MetricIntervalLowerBound"] + output["MetricIntervalLowerBound"] ); } if (output["MetricIntervalUpperBound"] !== undefined) { contents.MetricIntervalUpperBound = parseFloat( - output["MetricIntervalUpperBound"]["#text"] !== undefined - ? output["MetricIntervalUpperBound"]["#text"] - : output["MetricIntervalUpperBound"] + output["MetricIntervalUpperBound"] ); } if (output["ScalingAdjustment"] !== undefined) { - contents.ScalingAdjustment = parseInt( - output["ScalingAdjustment"]["#text"] !== undefined - ? output["ScalingAdjustment"]["#text"] - : output["ScalingAdjustment"] - ); + contents.ScalingAdjustment = parseInt(output["ScalingAdjustment"]); } return contents; }; @@ -9788,16 +9316,10 @@ const deserializeAws_querySuspendedProcess = ( SuspensionReason: undefined }; if (output["ProcessName"] !== undefined) { - contents.ProcessName = - output["ProcessName"]["#text"] !== undefined - ? output["ProcessName"]["#text"] - : output["ProcessName"]; + contents.ProcessName = output["ProcessName"]; } if (output["SuspensionReason"] !== undefined) { - contents.SuspensionReason = - output["SuspensionReason"]["#text"] !== undefined - ? output["SuspensionReason"]["#text"] - : output["SuspensionReason"]; + contents.SuspensionReason = output["SuspensionReason"]; } return contents; }; @@ -9824,34 +9346,19 @@ const deserializeAws_queryTagDescription = ( Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["PropagateAtLaunch"] !== undefined) { - contents.PropagateAtLaunch = - (output["PropagateAtLaunch"]["#text"] !== undefined - ? output["PropagateAtLaunch"]["#text"] - : output["PropagateAtLaunch"]) == "true"; + contents.PropagateAtLaunch = output["PropagateAtLaunch"] == "true"; } if (output["ResourceId"] !== undefined) { - contents.ResourceId = - output["ResourceId"]["#text"] !== undefined - ? output["ResourceId"]["#text"] - : output["ResourceId"]; + contents.ResourceId = output["ResourceId"]; } if (output["ResourceType"] !== undefined) { - contents.ResourceType = - output["ResourceType"]["#text"] !== undefined - ? output["ResourceType"]["#text"] - : output["ResourceType"]; + contents.ResourceType = output["ResourceType"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -9875,10 +9382,7 @@ const deserializeAws_queryTagsType = ( Tags: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.Tags === "") { contents.Tags = []; @@ -9896,9 +9400,7 @@ const deserializeAws_queryTargetGroupARNs = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryTargetTrackingConfiguration = ( @@ -9919,10 +9421,7 @@ const deserializeAws_queryTargetTrackingConfiguration = ( ); } if (output["DisableScaleIn"] !== undefined) { - contents.DisableScaleIn = - (output["DisableScaleIn"]["#text"] !== undefined - ? output["DisableScaleIn"]["#text"] - : output["DisableScaleIn"]) == "true"; + contents.DisableScaleIn = output["DisableScaleIn"] == "true"; } if (output["PredefinedMetricSpecification"] !== undefined) { contents.PredefinedMetricSpecification = deserializeAws_queryPredefinedMetricSpecification( @@ -9931,11 +9430,7 @@ const deserializeAws_queryTargetTrackingConfiguration = ( ); } if (output["TargetValue"] !== undefined) { - contents.TargetValue = parseFloat( - output["TargetValue"]["#text"] !== undefined - ? output["TargetValue"]["#text"] - : output["TargetValue"] - ); + contents.TargetValue = parseFloat(output["TargetValue"]); } return contents; }; @@ -9944,9 +9439,7 @@ const deserializeAws_queryTerminationPolicies = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ @@ -10024,7 +9517,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/clients/client-cloudformation/protocols/Aws_query.ts b/clients/client-cloudformation/protocols/Aws_query.ts index 4b29bbafcf70..0504d67dee89 100644 --- a/clients/client-cloudformation/protocols/Aws_query.ts +++ b/clients/client-cloudformation/protocols/Aws_query.ts @@ -401,7 +401,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -7143,17 +7144,10 @@ const deserializeAws_queryAccountLimit = ( Value: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["Value"] !== undefined) { - contents.Value = parseInt( - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"] - ); + contents.Value = parseInt(output["Value"]); } return contents; }; @@ -7171,9 +7165,7 @@ const deserializeAws_queryAllowedValues = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryAlreadyExistsException = ( @@ -7185,10 +7177,7 @@ const deserializeAws_queryAlreadyExistsException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -7202,10 +7191,7 @@ const deserializeAws_queryCFNRegistryException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -7214,9 +7200,7 @@ const deserializeAws_queryCapabilities = ( output: any, context: __SerdeContext ): (Capability | string)[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryChange = ( @@ -7235,10 +7219,7 @@ const deserializeAws_queryChange = ( ); } if (output["Type"] !== undefined) { - contents.Type = - output["Type"]["#text"] !== undefined - ? output["Type"]["#text"] - : output["Type"]; + contents.Type = output["Type"]; } return contents; }; @@ -7252,10 +7233,7 @@ const deserializeAws_queryChangeSetNotFoundException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -7286,55 +7264,31 @@ const deserializeAws_queryChangeSetSummary = ( StatusReason: undefined }; if (output["ChangeSetId"] !== undefined) { - contents.ChangeSetId = - output["ChangeSetId"]["#text"] !== undefined - ? output["ChangeSetId"]["#text"] - : output["ChangeSetId"]; + contents.ChangeSetId = output["ChangeSetId"]; } if (output["ChangeSetName"] !== undefined) { - contents.ChangeSetName = - output["ChangeSetName"]["#text"] !== undefined - ? output["ChangeSetName"]["#text"] - : output["ChangeSetName"]; + contents.ChangeSetName = output["ChangeSetName"]; } if (output["CreationTime"] !== undefined) { contents.CreationTime = new Date(output["CreationTime"]); } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["ExecutionStatus"] !== undefined) { - contents.ExecutionStatus = - output["ExecutionStatus"]["#text"] !== undefined - ? output["ExecutionStatus"]["#text"] - : output["ExecutionStatus"]; + contents.ExecutionStatus = output["ExecutionStatus"]; } if (output["StackId"] !== undefined) { - contents.StackId = - output["StackId"]["#text"] !== undefined - ? output["StackId"]["#text"] - : output["StackId"]; + contents.StackId = output["StackId"]; } if (output["StackName"] !== undefined) { - contents.StackName = - output["StackName"]["#text"] !== undefined - ? output["StackName"]["#text"] - : output["StackName"]; + contents.StackName = output["StackName"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["StatusReason"] !== undefined) { - contents.StatusReason = - output["StatusReason"]["#text"] !== undefined - ? output["StatusReason"]["#text"] - : output["StatusReason"]; + contents.StatusReason = output["StatusReason"]; } return contents; }; @@ -7368,16 +7322,10 @@ const deserializeAws_queryCreateChangeSetOutput = ( StackId: undefined }; if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["StackId"] !== undefined) { - contents.StackId = - output["StackId"]["#text"] !== undefined - ? output["StackId"]["#text"] - : output["StackId"]; + contents.StackId = output["StackId"]; } return contents; }; @@ -7391,10 +7339,7 @@ const deserializeAws_queryCreateStackOutput = ( StackId: undefined }; if (output["StackId"] !== undefined) { - contents.StackId = - output["StackId"]["#text"] !== undefined - ? output["StackId"]["#text"] - : output["StackId"]; + contents.StackId = output["StackId"]; } return contents; }; @@ -7441,10 +7386,7 @@ const deserializeAws_queryDescribeAccountLimitsOutput = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -7485,16 +7427,10 @@ const deserializeAws_queryDescribeChangeSetOutput = ( ); } if (output["ChangeSetId"] !== undefined) { - contents.ChangeSetId = - output["ChangeSetId"]["#text"] !== undefined - ? output["ChangeSetId"]["#text"] - : output["ChangeSetId"]; + contents.ChangeSetId = output["ChangeSetId"]; } if (output["ChangeSetName"] !== undefined) { - contents.ChangeSetName = - output["ChangeSetName"]["#text"] !== undefined - ? output["ChangeSetName"]["#text"] - : output["ChangeSetName"]; + contents.ChangeSetName = output["ChangeSetName"]; } if (output.Changes === "") { contents.Changes = []; @@ -7512,22 +7448,13 @@ const deserializeAws_queryDescribeChangeSetOutput = ( contents.CreationTime = new Date(output["CreationTime"]); } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["ExecutionStatus"] !== undefined) { - contents.ExecutionStatus = - output["ExecutionStatus"]["#text"] !== undefined - ? output["ExecutionStatus"]["#text"] - : output["ExecutionStatus"]; + contents.ExecutionStatus = output["ExecutionStatus"]; } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.NotificationARNs === "") { contents.NotificationARNs = []; @@ -7560,28 +7487,16 @@ const deserializeAws_queryDescribeChangeSetOutput = ( ); } if (output["StackId"] !== undefined) { - contents.StackId = - output["StackId"]["#text"] !== undefined - ? output["StackId"]["#text"] - : output["StackId"]; + contents.StackId = output["StackId"]; } if (output["StackName"] !== undefined) { - contents.StackName = - output["StackName"]["#text"] !== undefined - ? output["StackName"]["#text"] - : output["StackName"]; + contents.StackName = output["StackName"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["StatusReason"] !== undefined) { - contents.StatusReason = - output["StatusReason"]["#text"] !== undefined - ? output["StatusReason"]["#text"] - : output["StatusReason"]; + contents.StatusReason = output["StatusReason"]; } if (output.Tags === "") { contents.Tags = []; @@ -7610,41 +7525,24 @@ const deserializeAws_queryDescribeStackDriftDetectionStatusOutput = ( Timestamp: undefined }; if (output["DetectionStatus"] !== undefined) { - contents.DetectionStatus = - output["DetectionStatus"]["#text"] !== undefined - ? output["DetectionStatus"]["#text"] - : output["DetectionStatus"]; + contents.DetectionStatus = output["DetectionStatus"]; } if (output["DetectionStatusReason"] !== undefined) { - contents.DetectionStatusReason = - output["DetectionStatusReason"]["#text"] !== undefined - ? output["DetectionStatusReason"]["#text"] - : output["DetectionStatusReason"]; + contents.DetectionStatusReason = output["DetectionStatusReason"]; } if (output["DriftedStackResourceCount"] !== undefined) { contents.DriftedStackResourceCount = parseInt( - output["DriftedStackResourceCount"]["#text"] !== undefined - ? output["DriftedStackResourceCount"]["#text"] - : output["DriftedStackResourceCount"] + output["DriftedStackResourceCount"] ); } if (output["StackDriftDetectionId"] !== undefined) { - contents.StackDriftDetectionId = - output["StackDriftDetectionId"]["#text"] !== undefined - ? output["StackDriftDetectionId"]["#text"] - : output["StackDriftDetectionId"]; + contents.StackDriftDetectionId = output["StackDriftDetectionId"]; } if (output["StackDriftStatus"] !== undefined) { - contents.StackDriftStatus = - output["StackDriftStatus"]["#text"] !== undefined - ? output["StackDriftStatus"]["#text"] - : output["StackDriftStatus"]; + contents.StackDriftStatus = output["StackDriftStatus"]; } if (output["StackId"] !== undefined) { - contents.StackId = - output["StackId"]["#text"] !== undefined - ? output["StackId"]["#text"] - : output["StackId"]; + contents.StackId = output["StackId"]; } if (output["Timestamp"] !== undefined) { contents.Timestamp = new Date(output["Timestamp"]); @@ -7662,10 +7560,7 @@ const deserializeAws_queryDescribeStackEventsOutput = ( StackEvents: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.StackEvents === "") { contents.StackEvents = []; @@ -7692,10 +7587,7 @@ const deserializeAws_queryDescribeStackResourceDriftsOutput = ( StackResourceDrifts: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.StackResourceDrifts === "") { contents.StackResourceDrifts = []; @@ -7762,10 +7654,7 @@ const deserializeAws_queryDescribeStacksOutput = ( Stacks: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.Stacks === "") { contents.Stacks = []; @@ -7805,40 +7694,22 @@ const deserializeAws_queryDescribeTypeOutput = ( Visibility: undefined }; if (output["Arn"] !== undefined) { - contents.Arn = - output["Arn"]["#text"] !== undefined - ? output["Arn"]["#text"] - : output["Arn"]; + contents.Arn = output["Arn"]; } if (output["DefaultVersionId"] !== undefined) { - contents.DefaultVersionId = - output["DefaultVersionId"]["#text"] !== undefined - ? output["DefaultVersionId"]["#text"] - : output["DefaultVersionId"]; + contents.DefaultVersionId = output["DefaultVersionId"]; } if (output["DeprecatedStatus"] !== undefined) { - contents.DeprecatedStatus = - output["DeprecatedStatus"]["#text"] !== undefined - ? output["DeprecatedStatus"]["#text"] - : output["DeprecatedStatus"]; + contents.DeprecatedStatus = output["DeprecatedStatus"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["DocumentationUrl"] !== undefined) { - contents.DocumentationUrl = - output["DocumentationUrl"]["#text"] !== undefined - ? output["DocumentationUrl"]["#text"] - : output["DocumentationUrl"]; + contents.DocumentationUrl = output["DocumentationUrl"]; } if (output["ExecutionRoleArn"] !== undefined) { - contents.ExecutionRoleArn = - output["ExecutionRoleArn"]["#text"] !== undefined - ? output["ExecutionRoleArn"]["#text"] - : output["ExecutionRoleArn"]; + contents.ExecutionRoleArn = output["ExecutionRoleArn"]; } if (output["LastUpdated"] !== undefined) { contents.LastUpdated = new Date(output["LastUpdated"]); @@ -7850,43 +7721,25 @@ const deserializeAws_queryDescribeTypeOutput = ( ); } if (output["ProvisioningType"] !== undefined) { - contents.ProvisioningType = - output["ProvisioningType"]["#text"] !== undefined - ? output["ProvisioningType"]["#text"] - : output["ProvisioningType"]; + contents.ProvisioningType = output["ProvisioningType"]; } if (output["Schema"] !== undefined) { - contents.Schema = - output["Schema"]["#text"] !== undefined - ? output["Schema"]["#text"] - : output["Schema"]; + contents.Schema = output["Schema"]; } if (output["SourceUrl"] !== undefined) { - contents.SourceUrl = - output["SourceUrl"]["#text"] !== undefined - ? output["SourceUrl"]["#text"] - : output["SourceUrl"]; + contents.SourceUrl = output["SourceUrl"]; } if (output["TimeCreated"] !== undefined) { contents.TimeCreated = new Date(output["TimeCreated"]); } if (output["Type"] !== undefined) { - contents.Type = - output["Type"]["#text"] !== undefined - ? output["Type"]["#text"] - : output["Type"]; + contents.Type = output["Type"]; } if (output["TypeName"] !== undefined) { - contents.TypeName = - output["TypeName"]["#text"] !== undefined - ? output["TypeName"]["#text"] - : output["TypeName"]; + contents.TypeName = output["TypeName"]; } if (output["Visibility"] !== undefined) { - contents.Visibility = - output["Visibility"]["#text"] !== undefined - ? output["Visibility"]["#text"] - : output["Visibility"]; + contents.Visibility = output["Visibility"]; } return contents; }; @@ -7903,28 +7756,16 @@ const deserializeAws_queryDescribeTypeRegistrationOutput = ( TypeVersionArn: undefined }; if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["ProgressStatus"] !== undefined) { - contents.ProgressStatus = - output["ProgressStatus"]["#text"] !== undefined - ? output["ProgressStatus"]["#text"] - : output["ProgressStatus"]; + contents.ProgressStatus = output["ProgressStatus"]; } if (output["TypeArn"] !== undefined) { - contents.TypeArn = - output["TypeArn"]["#text"] !== undefined - ? output["TypeArn"]["#text"] - : output["TypeArn"]; + contents.TypeArn = output["TypeArn"]; } if (output["TypeVersionArn"] !== undefined) { - contents.TypeVersionArn = - output["TypeVersionArn"]["#text"] !== undefined - ? output["TypeVersionArn"]["#text"] - : output["TypeVersionArn"]; + contents.TypeVersionArn = output["TypeVersionArn"]; } return contents; }; @@ -7938,10 +7779,7 @@ const deserializeAws_queryDetectStackDriftOutput = ( StackDriftDetectionId: undefined }; if (output["StackDriftDetectionId"] !== undefined) { - contents.StackDriftDetectionId = - output["StackDriftDetectionId"]["#text"] !== undefined - ? output["StackDriftDetectionId"]["#text"] - : output["StackDriftDetectionId"]; + contents.StackDriftDetectionId = output["StackDriftDetectionId"]; } return contents; }; @@ -7972,10 +7810,7 @@ const deserializeAws_queryEstimateTemplateCostOutput = ( Url: undefined }; if (output["Url"] !== undefined) { - contents.Url = - output["Url"]["#text"] !== undefined - ? output["Url"]["#text"] - : output["Url"]; + contents.Url = output["Url"]; } return contents; }; @@ -8001,22 +7836,13 @@ const deserializeAws_queryExport = ( Value: undefined }; if (output["ExportingStackId"] !== undefined) { - contents.ExportingStackId = - output["ExportingStackId"]["#text"] !== undefined - ? output["ExportingStackId"]["#text"] - : output["ExportingStackId"]; + contents.ExportingStackId = output["ExportingStackId"]; } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -8039,10 +7865,7 @@ const deserializeAws_queryGetStackPolicyOutput = ( StackPolicyBody: undefined }; if (output["StackPolicyBody"] !== undefined) { - contents.StackPolicyBody = - output["StackPolicyBody"]["#text"] !== undefined - ? output["StackPolicyBody"]["#text"] - : output["StackPolicyBody"]; + contents.StackPolicyBody = output["StackPolicyBody"]; } return contents; }; @@ -8069,10 +7892,7 @@ const deserializeAws_queryGetTemplateOutput = ( ); } if (output["TemplateBody"] !== undefined) { - contents.TemplateBody = - output["TemplateBody"]["#text"] !== undefined - ? output["TemplateBody"]["#text"] - : output["TemplateBody"]; + contents.TemplateBody = output["TemplateBody"]; } return contents; }; @@ -8106,10 +7926,7 @@ const deserializeAws_queryGetTemplateSummaryOutput = ( ); } if (output["CapabilitiesReason"] !== undefined) { - contents.CapabilitiesReason = - output["CapabilitiesReason"]["#text"] !== undefined - ? output["CapabilitiesReason"]["#text"] - : output["CapabilitiesReason"]; + contents.CapabilitiesReason = output["CapabilitiesReason"]; } if (output.DeclaredTransforms === "") { contents.DeclaredTransforms = []; @@ -8124,16 +7941,10 @@ const deserializeAws_queryGetTemplateSummaryOutput = ( ); } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["Metadata"] !== undefined) { - contents.Metadata = - output["Metadata"]["#text"] !== undefined - ? output["Metadata"]["#text"] - : output["Metadata"]; + contents.Metadata = output["Metadata"]; } if (output.Parameters === "") { contents.Parameters = []; @@ -8172,10 +7983,7 @@ const deserializeAws_queryGetTemplateSummaryOutput = ( ); } if (output["Version"] !== undefined) { - contents.Version = - output["Version"]["#text"] !== undefined - ? output["Version"]["#text"] - : output["Version"]; + contents.Version = output["Version"]; } return contents; }; @@ -8184,9 +7992,7 @@ const deserializeAws_queryImports = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryInsufficientCapabilitiesException = ( @@ -8198,10 +8004,7 @@ const deserializeAws_queryInsufficientCapabilitiesException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -8215,10 +8018,7 @@ const deserializeAws_queryInvalidChangeSetStatusException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -8232,10 +8032,7 @@ const deserializeAws_queryInvalidStateTransitionException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -8249,10 +8046,7 @@ const deserializeAws_queryLimitExceededException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -8267,10 +8061,7 @@ const deserializeAws_queryListChangeSetsOutput = ( Summaries: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.Summaries === "") { contents.Summaries = []; @@ -8309,10 +8100,7 @@ const deserializeAws_queryListExportsOutput = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -8339,10 +8127,7 @@ const deserializeAws_queryListImportsOutput = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -8357,10 +8142,7 @@ const deserializeAws_queryListStackResourcesOutput = ( StackResourceSummaries: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.StackResourceSummaries === "") { contents.StackResourceSummaries = []; @@ -8387,10 +8169,7 @@ const deserializeAws_queryListStacksOutput = ( StackSummaries: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.StackSummaries === "") { contents.StackSummaries = []; @@ -8417,10 +8196,7 @@ const deserializeAws_queryListTypeRegistrationsOutput = ( RegistrationTokenList: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.RegistrationTokenList === "") { contents.RegistrationTokenList = []; @@ -8447,10 +8223,7 @@ const deserializeAws_queryListTypeVersionsOutput = ( TypeVersionSummaries: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.TypeVersionSummaries === "") { contents.TypeVersionSummaries = []; @@ -8477,10 +8250,7 @@ const deserializeAws_queryListTypesOutput = ( TypeSummaries: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.TypeSummaries === "") { contents.TypeSummaries = []; @@ -8507,16 +8277,10 @@ const deserializeAws_queryLoggingConfig = ( LogRoleArn: undefined }; if (output["LogGroupName"] !== undefined) { - contents.LogGroupName = - output["LogGroupName"]["#text"] !== undefined - ? output["LogGroupName"]["#text"] - : output["LogGroupName"]; + contents.LogGroupName = output["LogGroupName"]; } if (output["LogRoleArn"] !== undefined) { - contents.LogRoleArn = - output["LogRoleArn"]["#text"] !== undefined - ? output["LogRoleArn"]["#text"] - : output["LogRoleArn"]; + contents.LogRoleArn = output["LogRoleArn"]; } return contents; }; @@ -8525,18 +8289,14 @@ const deserializeAws_queryLogicalResourceIds = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryNotificationARNs = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryOperationStatusCheckFailedException = ( @@ -8548,10 +8308,7 @@ const deserializeAws_queryOperationStatusCheckFailedException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -8568,28 +8325,16 @@ const deserializeAws_queryOutput = ( OutputValue: undefined }; if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["ExportName"] !== undefined) { - contents.ExportName = - output["ExportName"]["#text"] !== undefined - ? output["ExportName"]["#text"] - : output["ExportName"]; + contents.ExportName = output["ExportName"]; } if (output["OutputKey"] !== undefined) { - contents.OutputKey = - output["OutputKey"]["#text"] !== undefined - ? output["OutputKey"]["#text"] - : output["OutputKey"]; + contents.OutputKey = output["OutputKey"]; } if (output["OutputValue"] !== undefined) { - contents.OutputValue = - output["OutputValue"]["#text"] !== undefined - ? output["OutputValue"]["#text"] - : output["OutputValue"]; + contents.OutputValue = output["OutputValue"]; } return contents; }; @@ -8615,28 +8360,16 @@ const deserializeAws_queryParameter = ( UsePreviousValue: undefined }; if (output["ParameterKey"] !== undefined) { - contents.ParameterKey = - output["ParameterKey"]["#text"] !== undefined - ? output["ParameterKey"]["#text"] - : output["ParameterKey"]; + contents.ParameterKey = output["ParameterKey"]; } if (output["ParameterValue"] !== undefined) { - contents.ParameterValue = - output["ParameterValue"]["#text"] !== undefined - ? output["ParameterValue"]["#text"] - : output["ParameterValue"]; + contents.ParameterValue = output["ParameterValue"]; } if (output["ResolvedValue"] !== undefined) { - contents.ResolvedValue = - output["ResolvedValue"]["#text"] !== undefined - ? output["ResolvedValue"]["#text"] - : output["ResolvedValue"]; + contents.ResolvedValue = output["ResolvedValue"]; } if (output["UsePreviousValue"] !== undefined) { - contents.UsePreviousValue = - (output["UsePreviousValue"]["#text"] !== undefined - ? output["UsePreviousValue"]["#text"] - : output["UsePreviousValue"]) == "true"; + contents.UsePreviousValue = output["UsePreviousValue"] == "true"; } return contents; }; @@ -8678,22 +8411,13 @@ const deserializeAws_queryParameterDeclaration = ( ParameterType: undefined }; if (output["DefaultValue"] !== undefined) { - contents.DefaultValue = - output["DefaultValue"]["#text"] !== undefined - ? output["DefaultValue"]["#text"] - : output["DefaultValue"]; + contents.DefaultValue = output["DefaultValue"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["NoEcho"] !== undefined) { - contents.NoEcho = - (output["NoEcho"]["#text"] !== undefined - ? output["NoEcho"]["#text"] - : output["NoEcho"]) == "true"; + contents.NoEcho = output["NoEcho"] == "true"; } if (output["ParameterConstraints"] !== undefined) { contents.ParameterConstraints = deserializeAws_queryParameterConstraints( @@ -8702,16 +8426,10 @@ const deserializeAws_queryParameterDeclaration = ( ); } if (output["ParameterKey"] !== undefined) { - contents.ParameterKey = - output["ParameterKey"]["#text"] !== undefined - ? output["ParameterKey"]["#text"] - : output["ParameterKey"]; + contents.ParameterKey = output["ParameterKey"]; } if (output["ParameterType"] !== undefined) { - contents.ParameterType = - output["ParameterType"]["#text"] !== undefined - ? output["ParameterType"]["#text"] - : output["ParameterType"]; + contents.ParameterType = output["ParameterType"]; } return contents; }; @@ -8753,16 +8471,10 @@ const deserializeAws_queryPhysicalResourceIdContextKeyValuePair = ( Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -8779,28 +8491,16 @@ const deserializeAws_queryPropertyDifference = ( PropertyPath: undefined }; if (output["ActualValue"] !== undefined) { - contents.ActualValue = - output["ActualValue"]["#text"] !== undefined - ? output["ActualValue"]["#text"] - : output["ActualValue"]; + contents.ActualValue = output["ActualValue"]; } if (output["DifferenceType"] !== undefined) { - contents.DifferenceType = - output["DifferenceType"]["#text"] !== undefined - ? output["DifferenceType"]["#text"] - : output["DifferenceType"]; + contents.DifferenceType = output["DifferenceType"]; } if (output["ExpectedValue"] !== undefined) { - contents.ExpectedValue = - output["ExpectedValue"]["#text"] !== undefined - ? output["ExpectedValue"]["#text"] - : output["ExpectedValue"]; + contents.ExpectedValue = output["ExpectedValue"]; } if (output["PropertyPath"] !== undefined) { - contents.PropertyPath = - output["PropertyPath"]["#text"] !== undefined - ? output["PropertyPath"]["#text"] - : output["PropertyPath"]; + contents.PropertyPath = output["PropertyPath"]; } return contents; }; @@ -8833,10 +8533,7 @@ const deserializeAws_queryRegisterTypeOutput = ( RegistrationToken: undefined }; if (output["RegistrationToken"] !== undefined) { - contents.RegistrationToken = - output["RegistrationToken"]["#text"] !== undefined - ? output["RegistrationToken"]["#text"] - : output["RegistrationToken"]; + contents.RegistrationToken = output["RegistrationToken"]; } return contents; }; @@ -8845,9 +8542,7 @@ const deserializeAws_queryRegistrationTokenList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryResourceChange = ( @@ -8865,10 +8560,7 @@ const deserializeAws_queryResourceChange = ( Scope: undefined }; if (output["Action"] !== undefined) { - contents.Action = - output["Action"]["#text"] !== undefined - ? output["Action"]["#text"] - : output["Action"]; + contents.Action = output["Action"]; } if (output.Details === "") { contents.Details = []; @@ -8883,28 +8575,16 @@ const deserializeAws_queryResourceChange = ( ); } if (output["LogicalResourceId"] !== undefined) { - contents.LogicalResourceId = - output["LogicalResourceId"]["#text"] !== undefined - ? output["LogicalResourceId"]["#text"] - : output["LogicalResourceId"]; + contents.LogicalResourceId = output["LogicalResourceId"]; } if (output["PhysicalResourceId"] !== undefined) { - contents.PhysicalResourceId = - output["PhysicalResourceId"]["#text"] !== undefined - ? output["PhysicalResourceId"]["#text"] - : output["PhysicalResourceId"]; + contents.PhysicalResourceId = output["PhysicalResourceId"]; } if (output["Replacement"] !== undefined) { - contents.Replacement = - output["Replacement"]["#text"] !== undefined - ? output["Replacement"]["#text"] - : output["Replacement"]; + contents.Replacement = output["Replacement"]; } if (output["ResourceType"] !== undefined) { - contents.ResourceType = - output["ResourceType"]["#text"] !== undefined - ? output["ResourceType"]["#text"] - : output["ResourceType"]; + contents.ResourceType = output["ResourceType"]; } if (output.Scope === "") { contents.Scope = []; @@ -8933,22 +8613,13 @@ const deserializeAws_queryResourceChangeDetail = ( Target: undefined }; if (output["CausingEntity"] !== undefined) { - contents.CausingEntity = - output["CausingEntity"]["#text"] !== undefined - ? output["CausingEntity"]["#text"] - : output["CausingEntity"]; + contents.CausingEntity = output["CausingEntity"]; } if (output["ChangeSource"] !== undefined) { - contents.ChangeSource = - output["ChangeSource"]["#text"] !== undefined - ? output["ChangeSource"]["#text"] - : output["ChangeSource"]; + contents.ChangeSource = output["ChangeSource"]; } if (output["Evaluation"] !== undefined) { - contents.Evaluation = - output["Evaluation"]["#text"] !== undefined - ? output["Evaluation"]["#text"] - : output["Evaluation"]; + contents.Evaluation = output["Evaluation"]; } if (output["Target"] !== undefined) { contents.Target = deserializeAws_queryResourceTargetDefinition( @@ -9012,10 +8683,7 @@ const deserializeAws_queryResourceIdentifierSummary = ( ); } if (output["ResourceType"] !== undefined) { - contents.ResourceType = - output["ResourceType"]["#text"] !== undefined - ? output["ResourceType"]["#text"] - : output["ResourceType"]; + contents.ResourceType = output["ResourceType"]; } return contents; }; @@ -9024,9 +8692,7 @@ const deserializeAws_queryResourceIdentifiers = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryResourceTargetDefinition = ( @@ -9040,22 +8706,13 @@ const deserializeAws_queryResourceTargetDefinition = ( RequiresRecreation: undefined }; if (output["Attribute"] !== undefined) { - contents.Attribute = - output["Attribute"]["#text"] !== undefined - ? output["Attribute"]["#text"] - : output["Attribute"]; + contents.Attribute = output["Attribute"]; } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["RequiresRecreation"] !== undefined) { - contents.RequiresRecreation = - output["RequiresRecreation"]["#text"] !== undefined - ? output["RequiresRecreation"]["#text"] - : output["RequiresRecreation"]; + contents.RequiresRecreation = output["RequiresRecreation"]; } return contents; }; @@ -9064,9 +8721,7 @@ const deserializeAws_queryResourceTypes = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryRollbackConfiguration = ( @@ -9080,9 +8735,7 @@ const deserializeAws_queryRollbackConfiguration = ( }; if (output["MonitoringTimeInMinutes"] !== undefined) { contents.MonitoringTimeInMinutes = parseInt( - output["MonitoringTimeInMinutes"]["#text"] !== undefined - ? output["MonitoringTimeInMinutes"]["#text"] - : output["MonitoringTimeInMinutes"] + output["MonitoringTimeInMinutes"] ); } if (output.RollbackTriggers === "") { @@ -9110,16 +8763,10 @@ const deserializeAws_queryRollbackTrigger = ( Type: undefined }; if (output["Arn"] !== undefined) { - contents.Arn = - output["Arn"]["#text"] !== undefined - ? output["Arn"]["#text"] - : output["Arn"]; + contents.Arn = output["Arn"]; } if (output["Type"] !== undefined) { - contents.Type = - output["Type"]["#text"] !== undefined - ? output["Type"]["#text"] - : output["Type"]; + contents.Type = output["Type"]; } return contents; }; @@ -9137,9 +8784,7 @@ const deserializeAws_queryScope = ( output: any, context: __SerdeContext ): (ResourceAttribute | string)[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_querySetTypeDefaultVersionOutput = ( @@ -9194,10 +8839,7 @@ const deserializeAws_queryStack = ( ); } if (output["ChangeSetId"] !== undefined) { - contents.ChangeSetId = - output["ChangeSetId"]["#text"] !== undefined - ? output["ChangeSetId"]["#text"] - : output["ChangeSetId"]; + contents.ChangeSetId = output["ChangeSetId"]; } if (output["CreationTime"] !== undefined) { contents.CreationTime = new Date(output["CreationTime"]); @@ -9206,16 +8848,10 @@ const deserializeAws_queryStack = ( contents.DeletionTime = new Date(output["DeletionTime"]); } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["DisableRollback"] !== undefined) { - contents.DisableRollback = - (output["DisableRollback"]["#text"] !== undefined - ? output["DisableRollback"]["#text"] - : output["DisableRollback"]) == "true"; + contents.DisableRollback = output["DisableRollback"] == "true"; } if (output["DriftInformation"] !== undefined) { contents.DriftInformation = deserializeAws_queryStackDriftInformation( @@ -9225,9 +8861,7 @@ const deserializeAws_queryStack = ( } if (output["EnableTerminationProtection"] !== undefined) { contents.EnableTerminationProtection = - (output["EnableTerminationProtection"]["#text"] !== undefined - ? output["EnableTerminationProtection"]["#text"] - : output["EnableTerminationProtection"]) == "true"; + output["EnableTerminationProtection"] == "true"; } if (output["LastUpdatedTime"] !== undefined) { contents.LastUpdatedTime = new Date(output["LastUpdatedTime"]); @@ -9269,16 +8903,10 @@ const deserializeAws_queryStack = ( ); } if (output["ParentId"] !== undefined) { - contents.ParentId = - output["ParentId"]["#text"] !== undefined - ? output["ParentId"]["#text"] - : output["ParentId"]; + contents.ParentId = output["ParentId"]; } if (output["RoleARN"] !== undefined) { - contents.RoleARN = - output["RoleARN"]["#text"] !== undefined - ? output["RoleARN"]["#text"] - : output["RoleARN"]; + contents.RoleARN = output["RoleARN"]; } if (output["RollbackConfiguration"] !== undefined) { contents.RollbackConfiguration = deserializeAws_queryRollbackConfiguration( @@ -9287,34 +8915,19 @@ const deserializeAws_queryStack = ( ); } if (output["RootId"] !== undefined) { - contents.RootId = - output["RootId"]["#text"] !== undefined - ? output["RootId"]["#text"] - : output["RootId"]; + contents.RootId = output["RootId"]; } if (output["StackId"] !== undefined) { - contents.StackId = - output["StackId"]["#text"] !== undefined - ? output["StackId"]["#text"] - : output["StackId"]; + contents.StackId = output["StackId"]; } if (output["StackName"] !== undefined) { - contents.StackName = - output["StackName"]["#text"] !== undefined - ? output["StackName"]["#text"] - : output["StackName"]; + contents.StackName = output["StackName"]; } if (output["StackStatus"] !== undefined) { - contents.StackStatus = - output["StackStatus"]["#text"] !== undefined - ? output["StackStatus"]["#text"] - : output["StackStatus"]; + contents.StackStatus = output["StackStatus"]; } if (output["StackStatusReason"] !== undefined) { - contents.StackStatusReason = - output["StackStatusReason"]["#text"] !== undefined - ? output["StackStatusReason"]["#text"] - : output["StackStatusReason"]; + contents.StackStatusReason = output["StackStatusReason"]; } if (output.Tags === "") { contents.Tags = []; @@ -9326,11 +8939,7 @@ const deserializeAws_queryStack = ( ); } if (output["TimeoutInMinutes"] !== undefined) { - contents.TimeoutInMinutes = parseInt( - output["TimeoutInMinutes"]["#text"] !== undefined - ? output["TimeoutInMinutes"]["#text"] - : output["TimeoutInMinutes"] - ); + contents.TimeoutInMinutes = parseInt(output["TimeoutInMinutes"]); } return contents; }; @@ -9348,10 +8957,7 @@ const deserializeAws_queryStackDriftInformation = ( contents.LastCheckTimestamp = new Date(output["LastCheckTimestamp"]); } if (output["StackDriftStatus"] !== undefined) { - contents.StackDriftStatus = - output["StackDriftStatus"]["#text"] !== undefined - ? output["StackDriftStatus"]["#text"] - : output["StackDriftStatus"]; + contents.StackDriftStatus = output["StackDriftStatus"]; } return contents; }; @@ -9369,10 +8975,7 @@ const deserializeAws_queryStackDriftInformationSummary = ( contents.LastCheckTimestamp = new Date(output["LastCheckTimestamp"]); } if (output["StackDriftStatus"] !== undefined) { - contents.StackDriftStatus = - output["StackDriftStatus"]["#text"] !== undefined - ? output["StackDriftStatus"]["#text"] - : output["StackDriftStatus"]; + contents.StackDriftStatus = output["StackDriftStatus"]; } return contents; }; @@ -9396,64 +8999,34 @@ const deserializeAws_queryStackEvent = ( Timestamp: undefined }; if (output["ClientRequestToken"] !== undefined) { - contents.ClientRequestToken = - output["ClientRequestToken"]["#text"] !== undefined - ? output["ClientRequestToken"]["#text"] - : output["ClientRequestToken"]; + contents.ClientRequestToken = output["ClientRequestToken"]; } if (output["EventId"] !== undefined) { - contents.EventId = - output["EventId"]["#text"] !== undefined - ? output["EventId"]["#text"] - : output["EventId"]; + contents.EventId = output["EventId"]; } if (output["LogicalResourceId"] !== undefined) { - contents.LogicalResourceId = - output["LogicalResourceId"]["#text"] !== undefined - ? output["LogicalResourceId"]["#text"] - : output["LogicalResourceId"]; + contents.LogicalResourceId = output["LogicalResourceId"]; } if (output["PhysicalResourceId"] !== undefined) { - contents.PhysicalResourceId = - output["PhysicalResourceId"]["#text"] !== undefined - ? output["PhysicalResourceId"]["#text"] - : output["PhysicalResourceId"]; + contents.PhysicalResourceId = output["PhysicalResourceId"]; } if (output["ResourceProperties"] !== undefined) { - contents.ResourceProperties = - output["ResourceProperties"]["#text"] !== undefined - ? output["ResourceProperties"]["#text"] - : output["ResourceProperties"]; + contents.ResourceProperties = output["ResourceProperties"]; } if (output["ResourceStatus"] !== undefined) { - contents.ResourceStatus = - output["ResourceStatus"]["#text"] !== undefined - ? output["ResourceStatus"]["#text"] - : output["ResourceStatus"]; + contents.ResourceStatus = output["ResourceStatus"]; } if (output["ResourceStatusReason"] !== undefined) { - contents.ResourceStatusReason = - output["ResourceStatusReason"]["#text"] !== undefined - ? output["ResourceStatusReason"]["#text"] - : output["ResourceStatusReason"]; + contents.ResourceStatusReason = output["ResourceStatusReason"]; } if (output["ResourceType"] !== undefined) { - contents.ResourceType = - output["ResourceType"]["#text"] !== undefined - ? output["ResourceType"]["#text"] - : output["ResourceType"]; + contents.ResourceType = output["ResourceType"]; } if (output["StackId"] !== undefined) { - contents.StackId = - output["StackId"]["#text"] !== undefined - ? output["StackId"]["#text"] - : output["StackId"]; + contents.StackId = output["StackId"]; } if (output["StackName"] !== undefined) { - contents.StackName = - output["StackName"]["#text"] !== undefined - ? output["StackName"]["#text"] - : output["StackName"]; + contents.StackName = output["StackName"]; } if (output["Timestamp"] !== undefined) { contents.Timestamp = new Date(output["Timestamp"]); @@ -9488,10 +9061,7 @@ const deserializeAws_queryStackResource = ( Timestamp: undefined }; if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["DriftInformation"] !== undefined) { contents.DriftInformation = deserializeAws_queryStackResourceDriftInformation( @@ -9500,46 +9070,25 @@ const deserializeAws_queryStackResource = ( ); } if (output["LogicalResourceId"] !== undefined) { - contents.LogicalResourceId = - output["LogicalResourceId"]["#text"] !== undefined - ? output["LogicalResourceId"]["#text"] - : output["LogicalResourceId"]; + contents.LogicalResourceId = output["LogicalResourceId"]; } if (output["PhysicalResourceId"] !== undefined) { - contents.PhysicalResourceId = - output["PhysicalResourceId"]["#text"] !== undefined - ? output["PhysicalResourceId"]["#text"] - : output["PhysicalResourceId"]; + contents.PhysicalResourceId = output["PhysicalResourceId"]; } if (output["ResourceStatus"] !== undefined) { - contents.ResourceStatus = - output["ResourceStatus"]["#text"] !== undefined - ? output["ResourceStatus"]["#text"] - : output["ResourceStatus"]; + contents.ResourceStatus = output["ResourceStatus"]; } if (output["ResourceStatusReason"] !== undefined) { - contents.ResourceStatusReason = - output["ResourceStatusReason"]["#text"] !== undefined - ? output["ResourceStatusReason"]["#text"] - : output["ResourceStatusReason"]; + contents.ResourceStatusReason = output["ResourceStatusReason"]; } if (output["ResourceType"] !== undefined) { - contents.ResourceType = - output["ResourceType"]["#text"] !== undefined - ? output["ResourceType"]["#text"] - : output["ResourceType"]; + contents.ResourceType = output["ResourceType"]; } if (output["StackId"] !== undefined) { - contents.StackId = - output["StackId"]["#text"] !== undefined - ? output["StackId"]["#text"] - : output["StackId"]; + contents.StackId = output["StackId"]; } if (output["StackName"] !== undefined) { - contents.StackName = - output["StackName"]["#text"] !== undefined - ? output["StackName"]["#text"] - : output["StackName"]; + contents.StackName = output["StackName"]; } if (output["Timestamp"] !== undefined) { contents.Timestamp = new Date(output["Timestamp"]); @@ -9566,10 +9115,7 @@ const deserializeAws_queryStackResourceDetail = ( StackName: undefined }; if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["DriftInformation"] !== undefined) { contents.DriftInformation = deserializeAws_queryStackResourceDriftInformation( @@ -9581,52 +9127,28 @@ const deserializeAws_queryStackResourceDetail = ( contents.LastUpdatedTimestamp = new Date(output["LastUpdatedTimestamp"]); } if (output["LogicalResourceId"] !== undefined) { - contents.LogicalResourceId = - output["LogicalResourceId"]["#text"] !== undefined - ? output["LogicalResourceId"]["#text"] - : output["LogicalResourceId"]; + contents.LogicalResourceId = output["LogicalResourceId"]; } if (output["Metadata"] !== undefined) { - contents.Metadata = - output["Metadata"]["#text"] !== undefined - ? output["Metadata"]["#text"] - : output["Metadata"]; + contents.Metadata = output["Metadata"]; } if (output["PhysicalResourceId"] !== undefined) { - contents.PhysicalResourceId = - output["PhysicalResourceId"]["#text"] !== undefined - ? output["PhysicalResourceId"]["#text"] - : output["PhysicalResourceId"]; + contents.PhysicalResourceId = output["PhysicalResourceId"]; } if (output["ResourceStatus"] !== undefined) { - contents.ResourceStatus = - output["ResourceStatus"]["#text"] !== undefined - ? output["ResourceStatus"]["#text"] - : output["ResourceStatus"]; + contents.ResourceStatus = output["ResourceStatus"]; } if (output["ResourceStatusReason"] !== undefined) { - contents.ResourceStatusReason = - output["ResourceStatusReason"]["#text"] !== undefined - ? output["ResourceStatusReason"]["#text"] - : output["ResourceStatusReason"]; + contents.ResourceStatusReason = output["ResourceStatusReason"]; } if (output["ResourceType"] !== undefined) { - contents.ResourceType = - output["ResourceType"]["#text"] !== undefined - ? output["ResourceType"]["#text"] - : output["ResourceType"]; + contents.ResourceType = output["ResourceType"]; } if (output["StackId"] !== undefined) { - contents.StackId = - output["StackId"]["#text"] !== undefined - ? output["StackId"]["#text"] - : output["StackId"]; + contents.StackId = output["StackId"]; } if (output["StackName"] !== undefined) { - contents.StackName = - output["StackName"]["#text"] !== undefined - ? output["StackName"]["#text"] - : output["StackName"]; + contents.StackName = output["StackName"]; } return contents; }; @@ -9649,28 +9171,16 @@ const deserializeAws_queryStackResourceDrift = ( Timestamp: undefined }; if (output["ActualProperties"] !== undefined) { - contents.ActualProperties = - output["ActualProperties"]["#text"] !== undefined - ? output["ActualProperties"]["#text"] - : output["ActualProperties"]; + contents.ActualProperties = output["ActualProperties"]; } if (output["ExpectedProperties"] !== undefined) { - contents.ExpectedProperties = - output["ExpectedProperties"]["#text"] !== undefined - ? output["ExpectedProperties"]["#text"] - : output["ExpectedProperties"]; + contents.ExpectedProperties = output["ExpectedProperties"]; } if (output["LogicalResourceId"] !== undefined) { - contents.LogicalResourceId = - output["LogicalResourceId"]["#text"] !== undefined - ? output["LogicalResourceId"]["#text"] - : output["LogicalResourceId"]; + contents.LogicalResourceId = output["LogicalResourceId"]; } if (output["PhysicalResourceId"] !== undefined) { - contents.PhysicalResourceId = - output["PhysicalResourceId"]["#text"] !== undefined - ? output["PhysicalResourceId"]["#text"] - : output["PhysicalResourceId"]; + contents.PhysicalResourceId = output["PhysicalResourceId"]; } if (output.PhysicalResourceIdContext === "") { contents.PhysicalResourceIdContext = []; @@ -9697,22 +9207,13 @@ const deserializeAws_queryStackResourceDrift = ( ); } if (output["ResourceType"] !== undefined) { - contents.ResourceType = - output["ResourceType"]["#text"] !== undefined - ? output["ResourceType"]["#text"] - : output["ResourceType"]; + contents.ResourceType = output["ResourceType"]; } if (output["StackId"] !== undefined) { - contents.StackId = - output["StackId"]["#text"] !== undefined - ? output["StackId"]["#text"] - : output["StackId"]; + contents.StackId = output["StackId"]; } if (output["StackResourceDriftStatus"] !== undefined) { - contents.StackResourceDriftStatus = - output["StackResourceDriftStatus"]["#text"] !== undefined - ? output["StackResourceDriftStatus"]["#text"] - : output["StackResourceDriftStatus"]; + contents.StackResourceDriftStatus = output["StackResourceDriftStatus"]; } if (output["Timestamp"] !== undefined) { contents.Timestamp = new Date(output["Timestamp"]); @@ -9733,10 +9234,7 @@ const deserializeAws_queryStackResourceDriftInformation = ( contents.LastCheckTimestamp = new Date(output["LastCheckTimestamp"]); } if (output["StackResourceDriftStatus"] !== undefined) { - contents.StackResourceDriftStatus = - output["StackResourceDriftStatus"]["#text"] !== undefined - ? output["StackResourceDriftStatus"]["#text"] - : output["StackResourceDriftStatus"]; + contents.StackResourceDriftStatus = output["StackResourceDriftStatus"]; } return contents; }; @@ -9754,10 +9252,7 @@ const deserializeAws_queryStackResourceDriftInformationSummary = ( contents.LastCheckTimestamp = new Date(output["LastCheckTimestamp"]); } if (output["StackResourceDriftStatus"] !== undefined) { - contents.StackResourceDriftStatus = - output["StackResourceDriftStatus"]["#text"] !== undefined - ? output["StackResourceDriftStatus"]["#text"] - : output["StackResourceDriftStatus"]; + contents.StackResourceDriftStatus = output["StackResourceDriftStatus"]; } return contents; }; @@ -9804,34 +9299,19 @@ const deserializeAws_queryStackResourceSummary = ( contents.LastUpdatedTimestamp = new Date(output["LastUpdatedTimestamp"]); } if (output["LogicalResourceId"] !== undefined) { - contents.LogicalResourceId = - output["LogicalResourceId"]["#text"] !== undefined - ? output["LogicalResourceId"]["#text"] - : output["LogicalResourceId"]; + contents.LogicalResourceId = output["LogicalResourceId"]; } if (output["PhysicalResourceId"] !== undefined) { - contents.PhysicalResourceId = - output["PhysicalResourceId"]["#text"] !== undefined - ? output["PhysicalResourceId"]["#text"] - : output["PhysicalResourceId"]; + contents.PhysicalResourceId = output["PhysicalResourceId"]; } if (output["ResourceStatus"] !== undefined) { - contents.ResourceStatus = - output["ResourceStatus"]["#text"] !== undefined - ? output["ResourceStatus"]["#text"] - : output["ResourceStatus"]; + contents.ResourceStatus = output["ResourceStatus"]; } if (output["ResourceStatusReason"] !== undefined) { - contents.ResourceStatusReason = - output["ResourceStatusReason"]["#text"] !== undefined - ? output["ResourceStatusReason"]["#text"] - : output["ResourceStatusReason"]; + contents.ResourceStatusReason = output["ResourceStatusReason"]; } if (output["ResourceType"] !== undefined) { - contents.ResourceType = - output["ResourceType"]["#text"] !== undefined - ? output["ResourceType"]["#text"] - : output["ResourceType"]; + contents.ResourceType = output["ResourceType"]; } return contents; }; @@ -9854,10 +9334,7 @@ const deserializeAws_queryStackSetNotFoundException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -9905,46 +9382,25 @@ const deserializeAws_queryStackSummary = ( contents.LastUpdatedTime = new Date(output["LastUpdatedTime"]); } if (output["ParentId"] !== undefined) { - contents.ParentId = - output["ParentId"]["#text"] !== undefined - ? output["ParentId"]["#text"] - : output["ParentId"]; + contents.ParentId = output["ParentId"]; } if (output["RootId"] !== undefined) { - contents.RootId = - output["RootId"]["#text"] !== undefined - ? output["RootId"]["#text"] - : output["RootId"]; + contents.RootId = output["RootId"]; } if (output["StackId"] !== undefined) { - contents.StackId = - output["StackId"]["#text"] !== undefined - ? output["StackId"]["#text"] - : output["StackId"]; + contents.StackId = output["StackId"]; } if (output["StackName"] !== undefined) { - contents.StackName = - output["StackName"]["#text"] !== undefined - ? output["StackName"]["#text"] - : output["StackName"]; + contents.StackName = output["StackName"]; } if (output["StackStatus"] !== undefined) { - contents.StackStatus = - output["StackStatus"]["#text"] !== undefined - ? output["StackStatus"]["#text"] - : output["StackStatus"]; + contents.StackStatus = output["StackStatus"]; } if (output["StackStatusReason"] !== undefined) { - contents.StackStatusReason = - output["StackStatusReason"]["#text"] !== undefined - ? output["StackStatusReason"]["#text"] - : output["StackStatusReason"]; + contents.StackStatusReason = output["StackStatusReason"]; } if (output["TemplateDescription"] !== undefined) { - contents.TemplateDescription = - output["TemplateDescription"]["#text"] !== undefined - ? output["TemplateDescription"]["#text"] - : output["TemplateDescription"]; + contents.TemplateDescription = output["TemplateDescription"]; } return contents; }; @@ -9962,9 +9418,7 @@ const deserializeAws_queryStageList = ( output: any, context: __SerdeContext ): (TemplateStage | string)[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryTag = (output: any, context: __SerdeContext): Tag => { @@ -9974,16 +9428,10 @@ const deserializeAws_queryTag = (output: any, context: __SerdeContext): Tag => { Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -10009,28 +9457,16 @@ const deserializeAws_queryTemplateParameter = ( ParameterKey: undefined }; if (output["DefaultValue"] !== undefined) { - contents.DefaultValue = - output["DefaultValue"]["#text"] !== undefined - ? output["DefaultValue"]["#text"] - : output["DefaultValue"]; + contents.DefaultValue = output["DefaultValue"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["NoEcho"] !== undefined) { - contents.NoEcho = - (output["NoEcho"]["#text"] !== undefined - ? output["NoEcho"]["#text"] - : output["NoEcho"]) == "true"; + contents.NoEcho = output["NoEcho"] == "true"; } if (output["ParameterKey"] !== undefined) { - contents.ParameterKey = - output["ParameterKey"]["#text"] !== undefined - ? output["ParameterKey"]["#text"] - : output["ParameterKey"]; + contents.ParameterKey = output["ParameterKey"]; } return contents; }; @@ -10053,10 +9489,7 @@ const deserializeAws_queryTokenAlreadyExistsException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -10065,9 +9498,7 @@ const deserializeAws_queryTransformsList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryTypeNotFoundException = ( @@ -10079,10 +9510,7 @@ const deserializeAws_queryTypeNotFoundException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -10110,37 +9538,22 @@ const deserializeAws_queryTypeSummary = ( TypeName: undefined }; if (output["DefaultVersionId"] !== undefined) { - contents.DefaultVersionId = - output["DefaultVersionId"]["#text"] !== undefined - ? output["DefaultVersionId"]["#text"] - : output["DefaultVersionId"]; + contents.DefaultVersionId = output["DefaultVersionId"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["LastUpdated"] !== undefined) { contents.LastUpdated = new Date(output["LastUpdated"]); } if (output["Type"] !== undefined) { - contents.Type = - output["Type"]["#text"] !== undefined - ? output["Type"]["#text"] - : output["Type"]; + contents.Type = output["Type"]; } if (output["TypeArn"] !== undefined) { - contents.TypeArn = - output["TypeArn"]["#text"] !== undefined - ? output["TypeArn"]["#text"] - : output["TypeArn"]; + contents.TypeArn = output["TypeArn"]; } if (output["TypeName"] !== undefined) { - contents.TypeName = - output["TypeName"]["#text"] !== undefined - ? output["TypeName"]["#text"] - : output["TypeName"]; + contents.TypeName = output["TypeName"]; } return contents; }; @@ -10168,37 +9581,22 @@ const deserializeAws_queryTypeVersionSummary = ( VersionId: undefined }; if (output["Arn"] !== undefined) { - contents.Arn = - output["Arn"]["#text"] !== undefined - ? output["Arn"]["#text"] - : output["Arn"]; + contents.Arn = output["Arn"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["TimeCreated"] !== undefined) { contents.TimeCreated = new Date(output["TimeCreated"]); } if (output["Type"] !== undefined) { - contents.Type = - output["Type"]["#text"] !== undefined - ? output["Type"]["#text"] - : output["Type"]; + contents.Type = output["Type"]; } if (output["TypeName"] !== undefined) { - contents.TypeName = - output["TypeName"]["#text"] !== undefined - ? output["TypeName"]["#text"] - : output["TypeName"]; + contents.TypeName = output["TypeName"]; } if (output["VersionId"] !== undefined) { - contents.VersionId = - output["VersionId"]["#text"] !== undefined - ? output["VersionId"]["#text"] - : output["VersionId"]; + contents.VersionId = output["VersionId"]; } return contents; }; @@ -10212,10 +9610,7 @@ const deserializeAws_queryUpdateStackOutput = ( StackId: undefined }; if (output["StackId"] !== undefined) { - contents.StackId = - output["StackId"]["#text"] !== undefined - ? output["StackId"]["#text"] - : output["StackId"]; + contents.StackId = output["StackId"]; } return contents; }; @@ -10229,10 +9624,7 @@ const deserializeAws_queryUpdateTerminationProtectionOutput = ( StackId: undefined }; if (output["StackId"] !== undefined) { - contents.StackId = - output["StackId"]["#text"] !== undefined - ? output["StackId"]["#text"] - : output["StackId"]; + contents.StackId = output["StackId"]; } return contents; }; @@ -10262,10 +9654,7 @@ const deserializeAws_queryValidateTemplateOutput = ( ); } if (output["CapabilitiesReason"] !== undefined) { - contents.CapabilitiesReason = - output["CapabilitiesReason"]["#text"] !== undefined - ? output["CapabilitiesReason"]["#text"] - : output["CapabilitiesReason"]; + contents.CapabilitiesReason = output["CapabilitiesReason"]; } if (output.DeclaredTransforms === "") { contents.DeclaredTransforms = []; @@ -10280,10 +9669,7 @@ const deserializeAws_queryValidateTemplateOutput = ( ); } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output.Parameters === "") { contents.Parameters = []; @@ -10310,16 +9696,10 @@ const deserializeAws_queryAccountGateResult = ( StatusReason: undefined }; if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["StatusReason"] !== undefined) { - contents.StatusReason = - output["StatusReason"]["#text"] !== undefined - ? output["StatusReason"]["#text"] - : output["StatusReason"]; + contents.StatusReason = output["StatusReason"]; } return contents; }; @@ -10333,10 +9713,7 @@ const deserializeAws_queryCreateStackInstancesOutput = ( OperationId: undefined }; if (output["OperationId"] !== undefined) { - contents.OperationId = - output["OperationId"]["#text"] !== undefined - ? output["OperationId"]["#text"] - : output["OperationId"]; + contents.OperationId = output["OperationId"]; } return contents; }; @@ -10350,10 +9727,7 @@ const deserializeAws_queryCreateStackSetOutput = ( StackSetId: undefined }; if (output["StackSetId"] !== undefined) { - contents.StackSetId = - output["StackSetId"]["#text"] !== undefined - ? output["StackSetId"]["#text"] - : output["StackSetId"]; + contents.StackSetId = output["StackSetId"]; } return contents; }; @@ -10367,10 +9741,7 @@ const deserializeAws_queryCreatedButModifiedException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -10384,10 +9755,7 @@ const deserializeAws_queryDeleteStackInstancesOutput = ( OperationId: undefined }; if (output["OperationId"] !== undefined) { - contents.OperationId = - output["OperationId"]["#text"] !== undefined - ? output["OperationId"]["#text"] - : output["OperationId"]; + contents.OperationId = output["OperationId"]; } return contents; }; @@ -10462,10 +9830,7 @@ const deserializeAws_queryDetectStackSetDriftOutput = ( OperationId: undefined }; if (output["OperationId"] !== undefined) { - contents.OperationId = - output["OperationId"]["#text"] !== undefined - ? output["OperationId"]["#text"] - : output["OperationId"]; + contents.OperationId = output["OperationId"]; } return contents; }; @@ -10479,10 +9844,7 @@ const deserializeAws_queryInvalidOperationException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -10497,10 +9859,7 @@ const deserializeAws_queryListStackInstancesOutput = ( Summaries: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.Summaries === "") { contents.Summaries = []; @@ -10527,10 +9886,7 @@ const deserializeAws_queryListStackSetOperationResultsOutput = ( Summaries: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.Summaries === "") { contents.Summaries = []; @@ -10557,10 +9913,7 @@ const deserializeAws_queryListStackSetOperationsOutput = ( Summaries: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.Summaries === "") { contents.Summaries = []; @@ -10587,10 +9940,7 @@ const deserializeAws_queryListStackSetsOutput = ( Summaries: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.Summaries === "") { contents.Summaries = []; @@ -10616,10 +9966,7 @@ const deserializeAws_queryNameAlreadyExistsException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -10633,10 +9980,7 @@ const deserializeAws_queryOperationIdAlreadyExistsException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -10650,10 +9994,7 @@ const deserializeAws_queryOperationInProgressException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -10667,10 +10008,7 @@ const deserializeAws_queryOperationNotFoundException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -10679,9 +10017,7 @@ const deserializeAws_queryRegionList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryStackInstance = ( @@ -10701,16 +10037,10 @@ const deserializeAws_queryStackInstance = ( StatusReason: undefined }; if (output["Account"] !== undefined) { - contents.Account = - output["Account"]["#text"] !== undefined - ? output["Account"]["#text"] - : output["Account"]; + contents.Account = output["Account"]; } if (output["DriftStatus"] !== undefined) { - contents.DriftStatus = - output["DriftStatus"]["#text"] !== undefined - ? output["DriftStatus"]["#text"] - : output["DriftStatus"]; + contents.DriftStatus = output["DriftStatus"]; } if (output["LastDriftCheckTimestamp"] !== undefined) { contents.LastDriftCheckTimestamp = new Date( @@ -10730,34 +10060,19 @@ const deserializeAws_queryStackInstance = ( ); } if (output["Region"] !== undefined) { - contents.Region = - output["Region"]["#text"] !== undefined - ? output["Region"]["#text"] - : output["Region"]; + contents.Region = output["Region"]; } if (output["StackId"] !== undefined) { - contents.StackId = - output["StackId"]["#text"] !== undefined - ? output["StackId"]["#text"] - : output["StackId"]; + contents.StackId = output["StackId"]; } if (output["StackSetId"] !== undefined) { - contents.StackSetId = - output["StackSetId"]["#text"] !== undefined - ? output["StackSetId"]["#text"] - : output["StackSetId"]; + contents.StackSetId = output["StackSetId"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["StatusReason"] !== undefined) { - contents.StatusReason = - output["StatusReason"]["#text"] !== undefined - ? output["StatusReason"]["#text"] - : output["StatusReason"]; + contents.StatusReason = output["StatusReason"]; } return contents; }; @@ -10771,10 +10086,7 @@ const deserializeAws_queryStackInstanceNotFoundException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -10804,16 +10116,10 @@ const deserializeAws_queryStackInstanceSummary = ( StatusReason: undefined }; if (output["Account"] !== undefined) { - contents.Account = - output["Account"]["#text"] !== undefined - ? output["Account"]["#text"] - : output["Account"]; + contents.Account = output["Account"]; } if (output["DriftStatus"] !== undefined) { - contents.DriftStatus = - output["DriftStatus"]["#text"] !== undefined - ? output["DriftStatus"]["#text"] - : output["DriftStatus"]; + contents.DriftStatus = output["DriftStatus"]; } if (output["LastDriftCheckTimestamp"] !== undefined) { contents.LastDriftCheckTimestamp = new Date( @@ -10821,34 +10127,19 @@ const deserializeAws_queryStackInstanceSummary = ( ); } if (output["Region"] !== undefined) { - contents.Region = - output["Region"]["#text"] !== undefined - ? output["Region"]["#text"] - : output["Region"]; + contents.Region = output["Region"]; } if (output["StackId"] !== undefined) { - contents.StackId = - output["StackId"]["#text"] !== undefined - ? output["StackId"]["#text"] - : output["StackId"]; + contents.StackId = output["StackId"]; } if (output["StackSetId"] !== undefined) { - contents.StackSetId = - output["StackSetId"]["#text"] !== undefined - ? output["StackSetId"]["#text"] - : output["StackSetId"]; + contents.StackSetId = output["StackSetId"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["StatusReason"] !== undefined) { - contents.StatusReason = - output["StatusReason"]["#text"] !== undefined - ? output["StatusReason"]["#text"] - : output["StatusReason"]; + contents.StatusReason = output["StatusReason"]; } return contents; }; @@ -10873,10 +10164,7 @@ const deserializeAws_queryStackSet = ( TemplateBody: undefined }; if (output["AdministrationRoleARN"] !== undefined) { - contents.AdministrationRoleARN = - output["AdministrationRoleARN"]["#text"] !== undefined - ? output["AdministrationRoleARN"]["#text"] - : output["AdministrationRoleARN"]; + contents.AdministrationRoleARN = output["AdministrationRoleARN"]; } if (output.Capabilities === "") { contents.Capabilities = []; @@ -10891,16 +10179,10 @@ const deserializeAws_queryStackSet = ( ); } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["ExecutionRoleName"] !== undefined) { - contents.ExecutionRoleName = - output["ExecutionRoleName"]["#text"] !== undefined - ? output["ExecutionRoleName"]["#text"] - : output["ExecutionRoleName"]; + contents.ExecutionRoleName = output["ExecutionRoleName"]; } if (output.Parameters === "") { contents.Parameters = []; @@ -10915,10 +10197,7 @@ const deserializeAws_queryStackSet = ( ); } if (output["StackSetARN"] !== undefined) { - contents.StackSetARN = - output["StackSetARN"]["#text"] !== undefined - ? output["StackSetARN"]["#text"] - : output["StackSetARN"]; + contents.StackSetARN = output["StackSetARN"]; } if (output["StackSetDriftDetectionDetails"] !== undefined) { contents.StackSetDriftDetectionDetails = deserializeAws_queryStackSetDriftDetectionDetails( @@ -10927,22 +10206,13 @@ const deserializeAws_queryStackSet = ( ); } if (output["StackSetId"] !== undefined) { - contents.StackSetId = - output["StackSetId"]["#text"] !== undefined - ? output["StackSetId"]["#text"] - : output["StackSetId"]; + contents.StackSetId = output["StackSetId"]; } if (output["StackSetName"] !== undefined) { - contents.StackSetName = - output["StackSetName"]["#text"] !== undefined - ? output["StackSetName"]["#text"] - : output["StackSetName"]; + contents.StackSetName = output["StackSetName"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output.Tags === "") { contents.Tags = []; @@ -10954,10 +10224,7 @@ const deserializeAws_queryStackSet = ( ); } if (output["TemplateBody"] !== undefined) { - contents.TemplateBody = - output["TemplateBody"]["#text"] !== undefined - ? output["TemplateBody"]["#text"] - : output["TemplateBody"]; + contents.TemplateBody = output["TemplateBody"]; } return contents; }; @@ -10978,43 +10245,29 @@ const deserializeAws_queryStackSetDriftDetectionDetails = ( TotalStackInstancesCount: undefined }; if (output["DriftDetectionStatus"] !== undefined) { - contents.DriftDetectionStatus = - output["DriftDetectionStatus"]["#text"] !== undefined - ? output["DriftDetectionStatus"]["#text"] - : output["DriftDetectionStatus"]; + contents.DriftDetectionStatus = output["DriftDetectionStatus"]; } if (output["DriftStatus"] !== undefined) { - contents.DriftStatus = - output["DriftStatus"]["#text"] !== undefined - ? output["DriftStatus"]["#text"] - : output["DriftStatus"]; + contents.DriftStatus = output["DriftStatus"]; } if (output["DriftedStackInstancesCount"] !== undefined) { contents.DriftedStackInstancesCount = parseInt( - output["DriftedStackInstancesCount"]["#text"] !== undefined - ? output["DriftedStackInstancesCount"]["#text"] - : output["DriftedStackInstancesCount"] + output["DriftedStackInstancesCount"] ); } if (output["FailedStackInstancesCount"] !== undefined) { contents.FailedStackInstancesCount = parseInt( - output["FailedStackInstancesCount"]["#text"] !== undefined - ? output["FailedStackInstancesCount"]["#text"] - : output["FailedStackInstancesCount"] + output["FailedStackInstancesCount"] ); } if (output["InProgressStackInstancesCount"] !== undefined) { contents.InProgressStackInstancesCount = parseInt( - output["InProgressStackInstancesCount"]["#text"] !== undefined - ? output["InProgressStackInstancesCount"]["#text"] - : output["InProgressStackInstancesCount"] + output["InProgressStackInstancesCount"] ); } if (output["InSyncStackInstancesCount"] !== undefined) { contents.InSyncStackInstancesCount = parseInt( - output["InSyncStackInstancesCount"]["#text"] !== undefined - ? output["InSyncStackInstancesCount"]["#text"] - : output["InSyncStackInstancesCount"] + output["InSyncStackInstancesCount"] ); } if (output["LastDriftCheckTimestamp"] !== undefined) { @@ -11024,9 +10277,7 @@ const deserializeAws_queryStackSetDriftDetectionDetails = ( } if (output["TotalStackInstancesCount"] !== undefined) { contents.TotalStackInstancesCount = parseInt( - output["TotalStackInstancesCount"]["#text"] !== undefined - ? output["TotalStackInstancesCount"]["#text"] - : output["TotalStackInstancesCount"] + output["TotalStackInstancesCount"] ); } return contents; @@ -11041,10 +10292,7 @@ const deserializeAws_queryStackSetNotEmptyException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -11068,16 +10316,10 @@ const deserializeAws_queryStackSetOperation = ( Status: undefined }; if (output["Action"] !== undefined) { - contents.Action = - output["Action"]["#text"] !== undefined - ? output["Action"]["#text"] - : output["Action"]; + contents.Action = output["Action"]; } if (output["AdministrationRoleARN"] !== undefined) { - contents.AdministrationRoleARN = - output["AdministrationRoleARN"]["#text"] !== undefined - ? output["AdministrationRoleARN"]["#text"] - : output["AdministrationRoleARN"]; + contents.AdministrationRoleARN = output["AdministrationRoleARN"]; } if (output["CreationTimestamp"] !== undefined) { contents.CreationTimestamp = new Date(output["CreationTimestamp"]); @@ -11086,16 +10328,10 @@ const deserializeAws_queryStackSetOperation = ( contents.EndTimestamp = new Date(output["EndTimestamp"]); } if (output["ExecutionRoleName"] !== undefined) { - contents.ExecutionRoleName = - output["ExecutionRoleName"]["#text"] !== undefined - ? output["ExecutionRoleName"]["#text"] - : output["ExecutionRoleName"]; + contents.ExecutionRoleName = output["ExecutionRoleName"]; } if (output["OperationId"] !== undefined) { - contents.OperationId = - output["OperationId"]["#text"] !== undefined - ? output["OperationId"]["#text"] - : output["OperationId"]; + contents.OperationId = output["OperationId"]; } if (output["OperationPreferences"] !== undefined) { contents.OperationPreferences = deserializeAws_queryStackSetOperationPreferences( @@ -11104,10 +10340,7 @@ const deserializeAws_queryStackSetOperation = ( ); } if (output["RetainStacks"] !== undefined) { - contents.RetainStacks = - (output["RetainStacks"]["#text"] !== undefined - ? output["RetainStacks"]["#text"] - : output["RetainStacks"]) == "true"; + contents.RetainStacks = output["RetainStacks"] == "true"; } if (output["StackSetDriftDetectionDetails"] !== undefined) { contents.StackSetDriftDetectionDetails = deserializeAws_queryStackSetDriftDetectionDetails( @@ -11116,16 +10349,10 @@ const deserializeAws_queryStackSetOperation = ( ); } if (output["StackSetId"] !== undefined) { - contents.StackSetId = - output["StackSetId"]["#text"] !== undefined - ? output["StackSetId"]["#text"] - : output["StackSetId"]; + contents.StackSetId = output["StackSetId"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -11143,31 +10370,19 @@ const deserializeAws_queryStackSetOperationPreferences = ( RegionOrder: undefined }; if (output["FailureToleranceCount"] !== undefined) { - contents.FailureToleranceCount = parseInt( - output["FailureToleranceCount"]["#text"] !== undefined - ? output["FailureToleranceCount"]["#text"] - : output["FailureToleranceCount"] - ); + contents.FailureToleranceCount = parseInt(output["FailureToleranceCount"]); } if (output["FailureTolerancePercentage"] !== undefined) { contents.FailureTolerancePercentage = parseInt( - output["FailureTolerancePercentage"]["#text"] !== undefined - ? output["FailureTolerancePercentage"]["#text"] - : output["FailureTolerancePercentage"] + output["FailureTolerancePercentage"] ); } if (output["MaxConcurrentCount"] !== undefined) { - contents.MaxConcurrentCount = parseInt( - output["MaxConcurrentCount"]["#text"] !== undefined - ? output["MaxConcurrentCount"]["#text"] - : output["MaxConcurrentCount"] - ); + contents.MaxConcurrentCount = parseInt(output["MaxConcurrentCount"]); } if (output["MaxConcurrentPercentage"] !== undefined) { contents.MaxConcurrentPercentage = parseInt( - output["MaxConcurrentPercentage"]["#text"] !== undefined - ? output["MaxConcurrentPercentage"]["#text"] - : output["MaxConcurrentPercentage"] + output["MaxConcurrentPercentage"] ); } if (output.RegionOrder === "") { @@ -11207,10 +10422,7 @@ const deserializeAws_queryStackSetOperationResultSummary = ( StatusReason: undefined }; if (output["Account"] !== undefined) { - contents.Account = - output["Account"]["#text"] !== undefined - ? output["Account"]["#text"] - : output["Account"]; + contents.Account = output["Account"]; } if (output["AccountGateResult"] !== undefined) { contents.AccountGateResult = deserializeAws_queryAccountGateResult( @@ -11219,22 +10431,13 @@ const deserializeAws_queryStackSetOperationResultSummary = ( ); } if (output["Region"] !== undefined) { - contents.Region = - output["Region"]["#text"] !== undefined - ? output["Region"]["#text"] - : output["Region"]; + contents.Region = output["Region"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["StatusReason"] !== undefined) { - contents.StatusReason = - output["StatusReason"]["#text"] !== undefined - ? output["StatusReason"]["#text"] - : output["StatusReason"]; + contents.StatusReason = output["StatusReason"]; } return contents; }; @@ -11261,10 +10464,7 @@ const deserializeAws_queryStackSetOperationSummary = ( Status: undefined }; if (output["Action"] !== undefined) { - contents.Action = - output["Action"]["#text"] !== undefined - ? output["Action"]["#text"] - : output["Action"]; + contents.Action = output["Action"]; } if (output["CreationTimestamp"] !== undefined) { contents.CreationTimestamp = new Date(output["CreationTimestamp"]); @@ -11273,16 +10473,10 @@ const deserializeAws_queryStackSetOperationSummary = ( contents.EndTimestamp = new Date(output["EndTimestamp"]); } if (output["OperationId"] !== undefined) { - contents.OperationId = - output["OperationId"]["#text"] !== undefined - ? output["OperationId"]["#text"] - : output["OperationId"]; + contents.OperationId = output["OperationId"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -11310,16 +10504,10 @@ const deserializeAws_queryStackSetSummary = ( Status: undefined }; if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["DriftStatus"] !== undefined) { - contents.DriftStatus = - output["DriftStatus"]["#text"] !== undefined - ? output["DriftStatus"]["#text"] - : output["DriftStatus"]; + contents.DriftStatus = output["DriftStatus"]; } if (output["LastDriftCheckTimestamp"] !== undefined) { contents.LastDriftCheckTimestamp = new Date( @@ -11327,22 +10515,13 @@ const deserializeAws_queryStackSetSummary = ( ); } if (output["StackSetId"] !== undefined) { - contents.StackSetId = - output["StackSetId"]["#text"] !== undefined - ? output["StackSetId"]["#text"] - : output["StackSetId"]; + contents.StackSetId = output["StackSetId"]; } if (output["StackSetName"] !== undefined) { - contents.StackSetName = - output["StackSetName"]["#text"] !== undefined - ? output["StackSetName"]["#text"] - : output["StackSetName"]; + contents.StackSetName = output["StackSetName"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -11356,10 +10535,7 @@ const deserializeAws_queryStaleRequestException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -11383,10 +10559,7 @@ const deserializeAws_queryUpdateStackInstancesOutput = ( OperationId: undefined }; if (output["OperationId"] !== undefined) { - contents.OperationId = - output["OperationId"]["#text"] !== undefined - ? output["OperationId"]["#text"] - : output["OperationId"]; + contents.OperationId = output["OperationId"]; } return contents; }; @@ -11400,10 +10573,7 @@ const deserializeAws_queryUpdateStackSetOutput = ( OperationId: undefined }; if (output["OperationId"] !== undefined) { - contents.OperationId = - output["OperationId"]["#text"] !== undefined - ? output["OperationId"]["#text"] - : output["OperationId"]; + contents.OperationId = output["OperationId"]; } return contents; }; @@ -11483,7 +10653,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/clients/client-cloudfront/protocols/Aws_restXml.ts b/clients/client-cloudfront/protocols/Aws_restXml.ts index ee8389fa4df8..16378174ebe6 100644 --- a/clients/client-cloudfront/protocols/Aws_restXml.ts +++ b/clients/client-cloudfront/protocols/Aws_restXml.ts @@ -352,7 +352,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -7908,10 +7909,7 @@ const deserializeAws_restXmlAccessDeniedResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -7928,10 +7926,7 @@ const deserializeAws_restXmlBatchTooLargeResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -7948,10 +7943,7 @@ const deserializeAws_restXmlCNAMEAlreadyExistsResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -7968,10 +7960,7 @@ const deserializeAws_restXmlCannotChangeImmutablePublicKeyFieldsResponse = async }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -7988,10 +7977,7 @@ const deserializeAws_restXmlCloudFrontOriginAccessIdentityAlreadyExistsResponse }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8008,10 +7994,7 @@ const deserializeAws_restXmlCloudFrontOriginAccessIdentityInUseResponse = async }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8028,10 +8011,7 @@ const deserializeAws_restXmlDistributionAlreadyExistsResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8048,10 +8028,7 @@ const deserializeAws_restXmlDistributionNotDisabledResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8068,10 +8045,7 @@ const deserializeAws_restXmlFieldLevelEncryptionConfigAlreadyExistsResponse = as }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8088,10 +8062,7 @@ const deserializeAws_restXmlFieldLevelEncryptionConfigInUseResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8108,10 +8079,7 @@ const deserializeAws_restXmlFieldLevelEncryptionProfileAlreadyExistsResponse = a }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8128,10 +8096,7 @@ const deserializeAws_restXmlFieldLevelEncryptionProfileInUseResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8148,10 +8113,7 @@ const deserializeAws_restXmlFieldLevelEncryptionProfileSizeExceededResponse = as }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8168,10 +8130,7 @@ const deserializeAws_restXmlIllegalFieldLevelEncryptionConfigAssociationWithCach }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8188,10 +8147,7 @@ const deserializeAws_restXmlIllegalUpdateResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8208,10 +8164,7 @@ const deserializeAws_restXmlInconsistentQuantitiesResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8228,10 +8181,7 @@ const deserializeAws_restXmlInvalidArgumentResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8248,10 +8198,7 @@ const deserializeAws_restXmlInvalidDefaultRootObjectResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8268,10 +8215,7 @@ const deserializeAws_restXmlInvalidErrorCodeResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8288,10 +8232,7 @@ const deserializeAws_restXmlInvalidForwardCookiesResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8308,10 +8249,7 @@ const deserializeAws_restXmlInvalidGeoRestrictionParameterResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8328,10 +8266,7 @@ const deserializeAws_restXmlInvalidHeadersForS3OriginResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8348,10 +8283,7 @@ const deserializeAws_restXmlInvalidIfMatchVersionResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8368,10 +8300,7 @@ const deserializeAws_restXmlInvalidLambdaFunctionAssociationResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8388,10 +8317,7 @@ const deserializeAws_restXmlInvalidLocationCodeResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8408,10 +8334,7 @@ const deserializeAws_restXmlInvalidMinimumProtocolVersionResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8428,10 +8351,7 @@ const deserializeAws_restXmlInvalidOriginResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8448,10 +8368,7 @@ const deserializeAws_restXmlInvalidOriginAccessIdentityResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8468,10 +8385,7 @@ const deserializeAws_restXmlInvalidOriginKeepaliveTimeoutResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8488,10 +8402,7 @@ const deserializeAws_restXmlInvalidOriginReadTimeoutResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8508,10 +8419,7 @@ const deserializeAws_restXmlInvalidProtocolSettingsResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8528,10 +8436,7 @@ const deserializeAws_restXmlInvalidQueryStringParametersResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8548,10 +8453,7 @@ const deserializeAws_restXmlInvalidRelativePathResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8568,10 +8470,7 @@ const deserializeAws_restXmlInvalidRequiredProtocolResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8588,10 +8487,7 @@ const deserializeAws_restXmlInvalidResponseCodeResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8608,10 +8504,7 @@ const deserializeAws_restXmlInvalidTTLOrderResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8628,10 +8521,7 @@ const deserializeAws_restXmlInvalidTaggingResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8648,10 +8538,7 @@ const deserializeAws_restXmlInvalidViewerCertificateResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8668,10 +8555,7 @@ const deserializeAws_restXmlInvalidWebACLIdResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8688,10 +8572,7 @@ const deserializeAws_restXmlMissingBodyResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8708,10 +8589,7 @@ const deserializeAws_restXmlNoSuchCloudFrontOriginAccessIdentityResponse = async }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8728,10 +8606,7 @@ const deserializeAws_restXmlNoSuchDistributionResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8748,10 +8623,7 @@ const deserializeAws_restXmlNoSuchFieldLevelEncryptionConfigResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8768,10 +8640,7 @@ const deserializeAws_restXmlNoSuchFieldLevelEncryptionProfileResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8788,10 +8657,7 @@ const deserializeAws_restXmlNoSuchInvalidationResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8808,10 +8674,7 @@ const deserializeAws_restXmlNoSuchOriginResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8828,10 +8691,7 @@ const deserializeAws_restXmlNoSuchPublicKeyResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8848,10 +8708,7 @@ const deserializeAws_restXmlNoSuchResourceResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8868,10 +8725,7 @@ const deserializeAws_restXmlNoSuchStreamingDistributionResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8888,10 +8742,7 @@ const deserializeAws_restXmlPreconditionFailedResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8908,10 +8759,7 @@ const deserializeAws_restXmlPublicKeyAlreadyExistsResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8928,10 +8776,7 @@ const deserializeAws_restXmlPublicKeyInUseResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8948,10 +8793,7 @@ const deserializeAws_restXmlQueryArgProfileEmptyResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8968,10 +8810,7 @@ const deserializeAws_restXmlStreamingDistributionAlreadyExistsResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -8988,10 +8827,7 @@ const deserializeAws_restXmlStreamingDistributionNotDisabledResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9008,10 +8844,7 @@ const deserializeAws_restXmlTooManyCacheBehaviorsResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9028,10 +8861,7 @@ const deserializeAws_restXmlTooManyCertificatesResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9048,10 +8878,7 @@ const deserializeAws_restXmlTooManyCloudFrontOriginAccessIdentitiesResponse = as }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9068,10 +8895,7 @@ const deserializeAws_restXmlTooManyCookieNamesInWhiteListResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9088,10 +8912,7 @@ const deserializeAws_restXmlTooManyDistributionCNAMEsResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9108,10 +8929,7 @@ const deserializeAws_restXmlTooManyDistributionsResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9128,10 +8946,7 @@ const deserializeAws_restXmlTooManyDistributionsAssociatedToFieldLevelEncryption }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9148,10 +8963,7 @@ const deserializeAws_restXmlTooManyDistributionsWithLambdaAssociationsResponse = }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9168,10 +8980,7 @@ const deserializeAws_restXmlTooManyFieldLevelEncryptionConfigsResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9188,10 +8997,7 @@ const deserializeAws_restXmlTooManyFieldLevelEncryptionContentTypeProfilesRespon }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9208,10 +9014,7 @@ const deserializeAws_restXmlTooManyFieldLevelEncryptionEncryptionEntitiesRespons }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9228,10 +9031,7 @@ const deserializeAws_restXmlTooManyFieldLevelEncryptionFieldPatternsResponse = a }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9248,10 +9048,7 @@ const deserializeAws_restXmlTooManyFieldLevelEncryptionProfilesResponse = async }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9268,10 +9065,7 @@ const deserializeAws_restXmlTooManyFieldLevelEncryptionQueryArgProfilesResponse }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9288,10 +9082,7 @@ const deserializeAws_restXmlTooManyHeadersInForwardedValuesResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9308,10 +9099,7 @@ const deserializeAws_restXmlTooManyInvalidationsInProgressResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9328,10 +9116,7 @@ const deserializeAws_restXmlTooManyLambdaFunctionAssociationsResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9348,10 +9133,7 @@ const deserializeAws_restXmlTooManyOriginCustomHeadersResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9368,10 +9150,7 @@ const deserializeAws_restXmlTooManyOriginGroupsPerDistributionResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9388,10 +9167,7 @@ const deserializeAws_restXmlTooManyOriginsResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9408,10 +9184,7 @@ const deserializeAws_restXmlTooManyPublicKeysResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9428,10 +9201,7 @@ const deserializeAws_restXmlTooManyQueryStringParametersResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9448,10 +9218,7 @@ const deserializeAws_restXmlTooManyStreamingDistributionCNAMEsResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9468,10 +9235,7 @@ const deserializeAws_restXmlTooManyStreamingDistributionsResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9488,10 +9252,7 @@ const deserializeAws_restXmlTooManyTrustedSignersResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -9508,10 +9269,7 @@ const deserializeAws_restXmlTrustedSignerDoesNotExistResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -11467,10 +11225,7 @@ const deserializeAws_restXmlActiveTrustedSigners = ( Quantity: undefined }; if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } if (output.Items === "") { contents.Items = []; @@ -11485,11 +11240,7 @@ const deserializeAws_restXmlActiveTrustedSigners = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -11504,16 +11255,10 @@ const deserializeAws_restXmlAliasICPRecordal = ( ICPRecordalStatus: undefined }; if (output["CNAME"] !== undefined) { - contents.CNAME = - output["CNAME"]["#text"] !== undefined - ? output["CNAME"]["#text"] - : output["CNAME"]; + contents.CNAME = output["CNAME"]; } if (output["ICPRecordalStatus"] !== undefined) { - contents.ICPRecordalStatus = - output["ICPRecordalStatus"]["#text"] !== undefined - ? output["ICPRecordalStatus"]["#text"] - : output["ICPRecordalStatus"]; + contents.ICPRecordalStatus = output["ICPRecordalStatus"]; } return contents; }; @@ -11531,9 +11276,7 @@ const deserializeAws_restXmlAliasList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlAliases = ( @@ -11555,11 +11298,7 @@ const deserializeAws_restXmlAliases = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -11593,11 +11332,7 @@ const deserializeAws_restXmlAllowedMethods = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -11606,9 +11341,7 @@ const deserializeAws_restXmlAwsAccountNumberList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlCacheBehavior = ( @@ -11638,23 +11371,13 @@ const deserializeAws_restXmlCacheBehavior = ( ); } if (output["Compress"] !== undefined) { - contents.Compress = - (output["Compress"]["#text"] !== undefined - ? output["Compress"]["#text"] - : output["Compress"]) == "true"; + contents.Compress = output["Compress"] == "true"; } if (output["DefaultTTL"] !== undefined) { - contents.DefaultTTL = parseInt( - output["DefaultTTL"]["#text"] !== undefined - ? output["DefaultTTL"]["#text"] - : output["DefaultTTL"] - ); + contents.DefaultTTL = parseInt(output["DefaultTTL"]); } if (output["FieldLevelEncryptionId"] !== undefined) { - contents.FieldLevelEncryptionId = - output["FieldLevelEncryptionId"]["#text"] !== undefined - ? output["FieldLevelEncryptionId"]["#text"] - : output["FieldLevelEncryptionId"]; + contents.FieldLevelEncryptionId = output["FieldLevelEncryptionId"]; } if (output["ForwardedValues"] !== undefined) { contents.ForwardedValues = deserializeAws_restXmlForwardedValues( @@ -11669,36 +11392,19 @@ const deserializeAws_restXmlCacheBehavior = ( ); } if (output["MaxTTL"] !== undefined) { - contents.MaxTTL = parseInt( - output["MaxTTL"]["#text"] !== undefined - ? output["MaxTTL"]["#text"] - : output["MaxTTL"] - ); + contents.MaxTTL = parseInt(output["MaxTTL"]); } if (output["MinTTL"] !== undefined) { - contents.MinTTL = parseInt( - output["MinTTL"]["#text"] !== undefined - ? output["MinTTL"]["#text"] - : output["MinTTL"] - ); + contents.MinTTL = parseInt(output["MinTTL"]); } if (output["PathPattern"] !== undefined) { - contents.PathPattern = - output["PathPattern"]["#text"] !== undefined - ? output["PathPattern"]["#text"] - : output["PathPattern"]; + contents.PathPattern = output["PathPattern"]; } if (output["SmoothStreaming"] !== undefined) { - contents.SmoothStreaming = - (output["SmoothStreaming"]["#text"] !== undefined - ? output["SmoothStreaming"]["#text"] - : output["SmoothStreaming"]) == "true"; + contents.SmoothStreaming = output["SmoothStreaming"] == "true"; } if (output["TargetOriginId"] !== undefined) { - contents.TargetOriginId = - output["TargetOriginId"]["#text"] !== undefined - ? output["TargetOriginId"]["#text"] - : output["TargetOriginId"]; + contents.TargetOriginId = output["TargetOriginId"]; } if (output["TrustedSigners"] !== undefined) { contents.TrustedSigners = deserializeAws_restXmlTrustedSigners( @@ -11707,10 +11413,7 @@ const deserializeAws_restXmlCacheBehavior = ( ); } if (output["ViewerProtocolPolicy"] !== undefined) { - contents.ViewerProtocolPolicy = - output["ViewerProtocolPolicy"]["#text"] !== undefined - ? output["ViewerProtocolPolicy"]["#text"] - : output["ViewerProtocolPolicy"]; + contents.ViewerProtocolPolicy = output["ViewerProtocolPolicy"]; } return contents; }; @@ -11746,11 +11449,7 @@ const deserializeAws_restXmlCacheBehaviors = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -11777,11 +11476,7 @@ const deserializeAws_restXmlCachedMethods = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -11803,16 +11498,10 @@ const deserializeAws_restXmlCloudFrontOriginAccessIdentity = ( ); } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["S3CanonicalUserId"] !== undefined) { - contents.S3CanonicalUserId = - output["S3CanonicalUserId"]["#text"] !== undefined - ? output["S3CanonicalUserId"]["#text"] - : output["S3CanonicalUserId"]; + contents.S3CanonicalUserId = output["S3CanonicalUserId"]; } return contents; }; @@ -11827,16 +11516,10 @@ const deserializeAws_restXmlCloudFrontOriginAccessIdentityConfig = ( Comment: undefined }; if (output["CallerReference"] !== undefined) { - contents.CallerReference = - output["CallerReference"]["#text"] !== undefined - ? output["CallerReference"]["#text"] - : output["CallerReference"]; + contents.CallerReference = output["CallerReference"]; } if (output["Comment"] !== undefined) { - contents.Comment = - output["Comment"]["#text"] !== undefined - ? output["Comment"]["#text"] - : output["Comment"]; + contents.Comment = output["Comment"]; } return contents; }; @@ -11855,10 +11538,7 @@ const deserializeAws_restXmlCloudFrontOriginAccessIdentityList = ( Quantity: undefined }; if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output.Items === "") { contents.Items = []; @@ -11875,30 +11555,16 @@ const deserializeAws_restXmlCloudFrontOriginAccessIdentityList = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output["MaxItems"] !== undefined) { - contents.MaxItems = parseInt( - output["MaxItems"]["#text"] !== undefined - ? output["MaxItems"]["#text"] - : output["MaxItems"] - ); + contents.MaxItems = parseInt(output["MaxItems"]); } if (output["NextMarker"] !== undefined) { - contents.NextMarker = - output["NextMarker"]["#text"] !== undefined - ? output["NextMarker"]["#text"] - : output["NextMarker"]; + contents.NextMarker = output["NextMarker"]; } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -11914,22 +11580,13 @@ const deserializeAws_restXmlCloudFrontOriginAccessIdentitySummary = ( S3CanonicalUserId: undefined }; if (output["Comment"] !== undefined) { - contents.Comment = - output["Comment"]["#text"] !== undefined - ? output["Comment"]["#text"] - : output["Comment"]; + contents.Comment = output["Comment"]; } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["S3CanonicalUserId"] !== undefined) { - contents.S3CanonicalUserId = - output["S3CanonicalUserId"]["#text"] !== undefined - ? output["S3CanonicalUserId"]["#text"] - : output["S3CanonicalUserId"]; + contents.S3CanonicalUserId = output["S3CanonicalUserId"]; } return contents; }; @@ -11954,22 +11611,13 @@ const deserializeAws_restXmlContentTypeProfile = ( ProfileId: undefined }; if (output["ContentType"] !== undefined) { - contents.ContentType = - output["ContentType"]["#text"] !== undefined - ? output["ContentType"]["#text"] - : output["ContentType"]; + contents.ContentType = output["ContentType"]; } if (output["Format"] !== undefined) { - contents.Format = - output["Format"]["#text"] !== undefined - ? output["Format"]["#text"] - : output["Format"]; + contents.Format = output["Format"]; } if (output["ProfileId"] !== undefined) { - contents.ProfileId = - output["ProfileId"]["#text"] !== undefined - ? output["ProfileId"]["#text"] - : output["ProfileId"]; + contents.ProfileId = output["ProfileId"]; } return contents; }; @@ -11991,9 +11639,7 @@ const deserializeAws_restXmlContentTypeProfileConfig = ( } if (output["ForwardWhenContentTypeIsUnknown"] !== undefined) { contents.ForwardWhenContentTypeIsUnknown = - (output["ForwardWhenContentTypeIsUnknown"]["#text"] !== undefined - ? output["ForwardWhenContentTypeIsUnknown"]["#text"] - : output["ForwardWhenContentTypeIsUnknown"]) == "true"; + output["ForwardWhenContentTypeIsUnknown"] == "true"; } return contents; }; @@ -12029,11 +11675,7 @@ const deserializeAws_restXmlContentTypeProfiles = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -12042,9 +11684,7 @@ const deserializeAws_restXmlCookieNameList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlCookieNames = ( @@ -12066,11 +11706,7 @@ const deserializeAws_restXmlCookieNames = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -12085,10 +11721,7 @@ const deserializeAws_restXmlCookiePreference = ( WhitelistedNames: undefined }; if (output["Forward"] !== undefined) { - contents.Forward = - output["Forward"]["#text"] !== undefined - ? output["Forward"]["#text"] - : output["Forward"]; + contents.Forward = output["Forward"]; } if (output["WhitelistedNames"] !== undefined) { contents.WhitelistedNames = deserializeAws_restXmlCookieNames( @@ -12111,30 +11744,16 @@ const deserializeAws_restXmlCustomErrorResponse = ( ResponsePagePath: undefined }; if (output["ErrorCachingMinTTL"] !== undefined) { - contents.ErrorCachingMinTTL = parseInt( - output["ErrorCachingMinTTL"]["#text"] !== undefined - ? output["ErrorCachingMinTTL"]["#text"] - : output["ErrorCachingMinTTL"] - ); + contents.ErrorCachingMinTTL = parseInt(output["ErrorCachingMinTTL"]); } if (output["ErrorCode"] !== undefined) { - contents.ErrorCode = parseInt( - output["ErrorCode"]["#text"] !== undefined - ? output["ErrorCode"]["#text"] - : output["ErrorCode"] - ); + contents.ErrorCode = parseInt(output["ErrorCode"]); } if (output["ResponseCode"] !== undefined) { - contents.ResponseCode = - output["ResponseCode"]["#text"] !== undefined - ? output["ResponseCode"]["#text"] - : output["ResponseCode"]; + contents.ResponseCode = output["ResponseCode"]; } if (output["ResponsePagePath"] !== undefined) { - contents.ResponsePagePath = - output["ResponsePagePath"]["#text"] !== undefined - ? output["ResponsePagePath"]["#text"] - : output["ResponsePagePath"]; + contents.ResponsePagePath = output["ResponsePagePath"]; } return contents; }; @@ -12170,11 +11789,7 @@ const deserializeAws_restXmlCustomErrorResponses = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -12201,11 +11816,7 @@ const deserializeAws_restXmlCustomHeaders = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -12224,38 +11835,21 @@ const deserializeAws_restXmlCustomOriginConfig = ( OriginSslProtocols: undefined }; if (output["HTTPPort"] !== undefined) { - contents.HTTPPort = parseInt( - output["HTTPPort"]["#text"] !== undefined - ? output["HTTPPort"]["#text"] - : output["HTTPPort"] - ); + contents.HTTPPort = parseInt(output["HTTPPort"]); } if (output["HTTPSPort"] !== undefined) { - contents.HTTPSPort = parseInt( - output["HTTPSPort"]["#text"] !== undefined - ? output["HTTPSPort"]["#text"] - : output["HTTPSPort"] - ); + contents.HTTPSPort = parseInt(output["HTTPSPort"]); } if (output["OriginKeepaliveTimeout"] !== undefined) { contents.OriginKeepaliveTimeout = parseInt( - output["OriginKeepaliveTimeout"]["#text"] !== undefined - ? output["OriginKeepaliveTimeout"]["#text"] - : output["OriginKeepaliveTimeout"] + output["OriginKeepaliveTimeout"] ); } if (output["OriginProtocolPolicy"] !== undefined) { - contents.OriginProtocolPolicy = - output["OriginProtocolPolicy"]["#text"] !== undefined - ? output["OriginProtocolPolicy"]["#text"] - : output["OriginProtocolPolicy"]; + contents.OriginProtocolPolicy = output["OriginProtocolPolicy"]; } if (output["OriginReadTimeout"] !== undefined) { - contents.OriginReadTimeout = parseInt( - output["OriginReadTimeout"]["#text"] !== undefined - ? output["OriginReadTimeout"]["#text"] - : output["OriginReadTimeout"] - ); + contents.OriginReadTimeout = parseInt(output["OriginReadTimeout"]); } if (output["OriginSslProtocols"] !== undefined) { contents.OriginSslProtocols = deserializeAws_restXmlOriginSslProtocols( @@ -12292,23 +11886,13 @@ const deserializeAws_restXmlDefaultCacheBehavior = ( ); } if (output["Compress"] !== undefined) { - contents.Compress = - (output["Compress"]["#text"] !== undefined - ? output["Compress"]["#text"] - : output["Compress"]) == "true"; + contents.Compress = output["Compress"] == "true"; } if (output["DefaultTTL"] !== undefined) { - contents.DefaultTTL = parseInt( - output["DefaultTTL"]["#text"] !== undefined - ? output["DefaultTTL"]["#text"] - : output["DefaultTTL"] - ); + contents.DefaultTTL = parseInt(output["DefaultTTL"]); } if (output["FieldLevelEncryptionId"] !== undefined) { - contents.FieldLevelEncryptionId = - output["FieldLevelEncryptionId"]["#text"] !== undefined - ? output["FieldLevelEncryptionId"]["#text"] - : output["FieldLevelEncryptionId"]; + contents.FieldLevelEncryptionId = output["FieldLevelEncryptionId"]; } if (output["ForwardedValues"] !== undefined) { contents.ForwardedValues = deserializeAws_restXmlForwardedValues( @@ -12323,30 +11907,16 @@ const deserializeAws_restXmlDefaultCacheBehavior = ( ); } if (output["MaxTTL"] !== undefined) { - contents.MaxTTL = parseInt( - output["MaxTTL"]["#text"] !== undefined - ? output["MaxTTL"]["#text"] - : output["MaxTTL"] - ); + contents.MaxTTL = parseInt(output["MaxTTL"]); } if (output["MinTTL"] !== undefined) { - contents.MinTTL = parseInt( - output["MinTTL"]["#text"] !== undefined - ? output["MinTTL"]["#text"] - : output["MinTTL"] - ); + contents.MinTTL = parseInt(output["MinTTL"]); } if (output["SmoothStreaming"] !== undefined) { - contents.SmoothStreaming = - (output["SmoothStreaming"]["#text"] !== undefined - ? output["SmoothStreaming"]["#text"] - : output["SmoothStreaming"]) == "true"; + contents.SmoothStreaming = output["SmoothStreaming"] == "true"; } if (output["TargetOriginId"] !== undefined) { - contents.TargetOriginId = - output["TargetOriginId"]["#text"] !== undefined - ? output["TargetOriginId"]["#text"] - : output["TargetOriginId"]; + contents.TargetOriginId = output["TargetOriginId"]; } if (output["TrustedSigners"] !== undefined) { contents.TrustedSigners = deserializeAws_restXmlTrustedSigners( @@ -12355,10 +11925,7 @@ const deserializeAws_restXmlDefaultCacheBehavior = ( ); } if (output["ViewerProtocolPolicy"] !== undefined) { - contents.ViewerProtocolPolicy = - output["ViewerProtocolPolicy"]["#text"] !== undefined - ? output["ViewerProtocolPolicy"]["#text"] - : output["ViewerProtocolPolicy"]; + contents.ViewerProtocolPolicy = output["ViewerProtocolPolicy"]; } return contents; }; @@ -12380,10 +11947,7 @@ const deserializeAws_restXmlDistribution = ( Status: undefined }; if (output["ARN"] !== undefined) { - contents.ARN = - output["ARN"]["#text"] !== undefined - ? output["ARN"]["#text"] - : output["ARN"]; + contents.ARN = output["ARN"]; } if (output["ActiveTrustedSigners"] !== undefined) { contents.ActiveTrustedSigners = deserializeAws_restXmlActiveTrustedSigners( @@ -12410,32 +11974,21 @@ const deserializeAws_restXmlDistribution = ( ); } if (output["DomainName"] !== undefined) { - contents.DomainName = - output["DomainName"]["#text"] !== undefined - ? output["DomainName"]["#text"] - : output["DomainName"]; + contents.DomainName = output["DomainName"]; } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["InProgressInvalidationBatches"] !== undefined) { contents.InProgressInvalidationBatches = parseInt( - output["InProgressInvalidationBatches"]["#text"] !== undefined - ? output["InProgressInvalidationBatches"]["#text"] - : output["InProgressInvalidationBatches"] + output["InProgressInvalidationBatches"] ); } if (output["LastModifiedTime"] !== undefined) { contents.LastModifiedTime = new Date(output["LastModifiedTime"]); } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -12477,16 +12030,10 @@ const deserializeAws_restXmlDistributionConfig = ( ); } if (output["CallerReference"] !== undefined) { - contents.CallerReference = - output["CallerReference"]["#text"] !== undefined - ? output["CallerReference"]["#text"] - : output["CallerReference"]; + contents.CallerReference = output["CallerReference"]; } if (output["Comment"] !== undefined) { - contents.Comment = - output["Comment"]["#text"] !== undefined - ? output["Comment"]["#text"] - : output["Comment"]; + contents.Comment = output["Comment"]; } if (output["CustomErrorResponses"] !== undefined) { contents.CustomErrorResponses = deserializeAws_restXmlCustomErrorResponses( @@ -12501,28 +12048,16 @@ const deserializeAws_restXmlDistributionConfig = ( ); } if (output["DefaultRootObject"] !== undefined) { - contents.DefaultRootObject = - output["DefaultRootObject"]["#text"] !== undefined - ? output["DefaultRootObject"]["#text"] - : output["DefaultRootObject"]; + contents.DefaultRootObject = output["DefaultRootObject"]; } if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } if (output["HttpVersion"] !== undefined) { - contents.HttpVersion = - output["HttpVersion"]["#text"] !== undefined - ? output["HttpVersion"]["#text"] - : output["HttpVersion"]; + contents.HttpVersion = output["HttpVersion"]; } if (output["IsIPV6Enabled"] !== undefined) { - contents.IsIPV6Enabled = - (output["IsIPV6Enabled"]["#text"] !== undefined - ? output["IsIPV6Enabled"]["#text"] - : output["IsIPV6Enabled"]) == "true"; + contents.IsIPV6Enabled = output["IsIPV6Enabled"] == "true"; } if (output["Logging"] !== undefined) { contents.Logging = deserializeAws_restXmlLoggingConfig( @@ -12543,10 +12078,7 @@ const deserializeAws_restXmlDistributionConfig = ( ); } if (output["PriceClass"] !== undefined) { - contents.PriceClass = - output["PriceClass"]["#text"] !== undefined - ? output["PriceClass"]["#text"] - : output["PriceClass"]; + contents.PriceClass = output["PriceClass"]; } if (output["Restrictions"] !== undefined) { contents.Restrictions = deserializeAws_restXmlRestrictions( @@ -12561,10 +12093,7 @@ const deserializeAws_restXmlDistributionConfig = ( ); } if (output["WebACLId"] !== undefined) { - contents.WebACLId = - output["WebACLId"]["#text"] !== undefined - ? output["WebACLId"]["#text"] - : output["WebACLId"]; + contents.WebACLId = output["WebACLId"]; } return contents; }; @@ -12583,10 +12112,7 @@ const deserializeAws_restXmlDistributionList = ( Quantity: undefined }; if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output.Items === "") { contents.Items = []; @@ -12601,30 +12127,16 @@ const deserializeAws_restXmlDistributionList = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output["MaxItems"] !== undefined) { - contents.MaxItems = parseInt( - output["MaxItems"]["#text"] !== undefined - ? output["MaxItems"]["#text"] - : output["MaxItems"] - ); + contents.MaxItems = parseInt(output["MaxItems"]); } if (output["NextMarker"] !== undefined) { - contents.NextMarker = - output["NextMarker"]["#text"] !== undefined - ? output["NextMarker"]["#text"] - : output["NextMarker"]; + contents.NextMarker = output["NextMarker"]; } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -12657,10 +12169,7 @@ const deserializeAws_restXmlDistributionSummary = ( WebACLId: undefined }; if (output["ARN"] !== undefined) { - contents.ARN = - output["ARN"]["#text"] !== undefined - ? output["ARN"]["#text"] - : output["ARN"]; + contents.ARN = output["ARN"]; } if (output.AliasICPRecordals === "") { contents.AliasICPRecordals = []; @@ -12687,10 +12196,7 @@ const deserializeAws_restXmlDistributionSummary = ( ); } if (output["Comment"] !== undefined) { - contents.Comment = - output["Comment"]["#text"] !== undefined - ? output["Comment"]["#text"] - : output["Comment"]; + contents.Comment = output["Comment"]; } if (output["CustomErrorResponses"] !== undefined) { contents.CustomErrorResponses = deserializeAws_restXmlCustomErrorResponses( @@ -12705,34 +12211,19 @@ const deserializeAws_restXmlDistributionSummary = ( ); } if (output["DomainName"] !== undefined) { - contents.DomainName = - output["DomainName"]["#text"] !== undefined - ? output["DomainName"]["#text"] - : output["DomainName"]; + contents.DomainName = output["DomainName"]; } if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } if (output["HttpVersion"] !== undefined) { - contents.HttpVersion = - output["HttpVersion"]["#text"] !== undefined - ? output["HttpVersion"]["#text"] - : output["HttpVersion"]; + contents.HttpVersion = output["HttpVersion"]; } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["IsIPV6Enabled"] !== undefined) { - contents.IsIPV6Enabled = - (output["IsIPV6Enabled"]["#text"] !== undefined - ? output["IsIPV6Enabled"]["#text"] - : output["IsIPV6Enabled"]) == "true"; + contents.IsIPV6Enabled = output["IsIPV6Enabled"] == "true"; } if (output["LastModifiedTime"] !== undefined) { contents.LastModifiedTime = new Date(output["LastModifiedTime"]); @@ -12750,10 +12241,7 @@ const deserializeAws_restXmlDistributionSummary = ( ); } if (output["PriceClass"] !== undefined) { - contents.PriceClass = - output["PriceClass"]["#text"] !== undefined - ? output["PriceClass"]["#text"] - : output["PriceClass"]; + contents.PriceClass = output["PriceClass"]; } if (output["Restrictions"] !== undefined) { contents.Restrictions = deserializeAws_restXmlRestrictions( @@ -12762,10 +12250,7 @@ const deserializeAws_restXmlDistributionSummary = ( ); } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["ViewerCertificate"] !== undefined) { contents.ViewerCertificate = deserializeAws_restXmlViewerCertificate( @@ -12774,10 +12259,7 @@ const deserializeAws_restXmlDistributionSummary = ( ); } if (output["WebACLId"] !== undefined) { - contents.WebACLId = - output["WebACLId"]["#text"] !== undefined - ? output["WebACLId"]["#text"] - : output["WebACLId"]; + contents.WebACLId = output["WebACLId"]; } return contents; }; @@ -12813,11 +12295,7 @@ const deserializeAws_restXmlEncryptionEntities = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -12839,16 +12317,10 @@ const deserializeAws_restXmlEncryptionEntity = ( ); } if (output["ProviderId"] !== undefined) { - contents.ProviderId = - output["ProviderId"]["#text"] !== undefined - ? output["ProviderId"]["#text"] - : output["ProviderId"]; + contents.ProviderId = output["ProviderId"]; } if (output["PublicKeyId"] !== undefined) { - contents.PublicKeyId = - output["PublicKeyId"]["#text"] !== undefined - ? output["PublicKeyId"]["#text"] - : output["PublicKeyId"]; + contents.PublicKeyId = output["PublicKeyId"]; } return contents; }; @@ -12879,10 +12351,7 @@ const deserializeAws_restXmlFieldLevelEncryption = ( ); } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["LastModifiedTime"] !== undefined) { contents.LastModifiedTime = new Date(output["LastModifiedTime"]); @@ -12902,16 +12371,10 @@ const deserializeAws_restXmlFieldLevelEncryptionConfig = ( QueryArgProfileConfig: undefined }; if (output["CallerReference"] !== undefined) { - contents.CallerReference = - output["CallerReference"]["#text"] !== undefined - ? output["CallerReference"]["#text"] - : output["CallerReference"]; + contents.CallerReference = output["CallerReference"]; } if (output["Comment"] !== undefined) { - contents.Comment = - output["Comment"]["#text"] !== undefined - ? output["Comment"]["#text"] - : output["Comment"]; + contents.Comment = output["Comment"]; } if (output["ContentTypeProfileConfig"] !== undefined) { contents.ContentTypeProfileConfig = deserializeAws_restXmlContentTypeProfileConfig( @@ -12952,24 +12415,13 @@ const deserializeAws_restXmlFieldLevelEncryptionList = ( ); } if (output["MaxItems"] !== undefined) { - contents.MaxItems = parseInt( - output["MaxItems"]["#text"] !== undefined - ? output["MaxItems"]["#text"] - : output["MaxItems"] - ); + contents.MaxItems = parseInt(output["MaxItems"]); } if (output["NextMarker"] !== undefined) { - contents.NextMarker = - output["NextMarker"]["#text"] !== undefined - ? output["NextMarker"]["#text"] - : output["NextMarker"]; + contents.NextMarker = output["NextMarker"]; } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -12991,10 +12443,7 @@ const deserializeAws_restXmlFieldLevelEncryptionProfile = ( ); } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["LastModifiedTime"] !== undefined) { contents.LastModifiedTime = new Date(output["LastModifiedTime"]); @@ -13014,16 +12463,10 @@ const deserializeAws_restXmlFieldLevelEncryptionProfileConfig = ( Name: undefined }; if (output["CallerReference"] !== undefined) { - contents.CallerReference = - output["CallerReference"]["#text"] !== undefined - ? output["CallerReference"]["#text"] - : output["CallerReference"]; + contents.CallerReference = output["CallerReference"]; } if (output["Comment"] !== undefined) { - contents.Comment = - output["Comment"]["#text"] !== undefined - ? output["Comment"]["#text"] - : output["Comment"]; + contents.Comment = output["Comment"]; } if (output["EncryptionEntities"] !== undefined) { contents.EncryptionEntities = deserializeAws_restXmlEncryptionEntities( @@ -13032,10 +12475,7 @@ const deserializeAws_restXmlFieldLevelEncryptionProfileConfig = ( ); } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } return contents; }; @@ -13066,24 +12506,13 @@ const deserializeAws_restXmlFieldLevelEncryptionProfileList = ( ); } if (output["MaxItems"] !== undefined) { - contents.MaxItems = parseInt( - output["MaxItems"]["#text"] !== undefined - ? output["MaxItems"]["#text"] - : output["MaxItems"] - ); + contents.MaxItems = parseInt(output["MaxItems"]); } if (output["NextMarker"] !== undefined) { - contents.NextMarker = - output["NextMarker"]["#text"] !== undefined - ? output["NextMarker"]["#text"] - : output["NextMarker"]; + contents.NextMarker = output["NextMarker"]; } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -13101,10 +12530,7 @@ const deserializeAws_restXmlFieldLevelEncryptionProfileSummary = ( Name: undefined }; if (output["Comment"] !== undefined) { - contents.Comment = - output["Comment"]["#text"] !== undefined - ? output["Comment"]["#text"] - : output["Comment"]; + contents.Comment = output["Comment"]; } if (output["EncryptionEntities"] !== undefined) { contents.EncryptionEntities = deserializeAws_restXmlEncryptionEntities( @@ -13113,19 +12539,13 @@ const deserializeAws_restXmlFieldLevelEncryptionProfileSummary = ( ); } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["LastModifiedTime"] !== undefined) { contents.LastModifiedTime = new Date(output["LastModifiedTime"]); } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } return contents; }; @@ -13152,10 +12572,7 @@ const deserializeAws_restXmlFieldLevelEncryptionSummary = ( QueryArgProfileConfig: undefined }; if (output["Comment"] !== undefined) { - contents.Comment = - output["Comment"]["#text"] !== undefined - ? output["Comment"]["#text"] - : output["Comment"]; + contents.Comment = output["Comment"]; } if (output["ContentTypeProfileConfig"] !== undefined) { contents.ContentTypeProfileConfig = deserializeAws_restXmlContentTypeProfileConfig( @@ -13164,10 +12581,7 @@ const deserializeAws_restXmlFieldLevelEncryptionSummary = ( ); } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["LastModifiedTime"] !== undefined) { contents.LastModifiedTime = new Date(output["LastModifiedTime"]); @@ -13194,9 +12608,7 @@ const deserializeAws_restXmlFieldPatternList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlFieldPatterns = ( @@ -13221,11 +12633,7 @@ const deserializeAws_restXmlFieldPatterns = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -13254,10 +12662,7 @@ const deserializeAws_restXmlForwardedValues = ( ); } if (output["QueryString"] !== undefined) { - contents.QueryString = - (output["QueryString"]["#text"] !== undefined - ? output["QueryString"]["#text"] - : output["QueryString"]) == "true"; + contents.QueryString = output["QueryString"] == "true"; } if (output["QueryStringCacheKeys"] !== undefined) { contents.QueryStringCacheKeys = deserializeAws_restXmlQueryStringCacheKeys( @@ -13291,17 +12696,10 @@ const deserializeAws_restXmlGeoRestriction = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } if (output["RestrictionType"] !== undefined) { - contents.RestrictionType = - output["RestrictionType"]["#text"] !== undefined - ? output["RestrictionType"]["#text"] - : output["RestrictionType"]; + contents.RestrictionType = output["RestrictionType"]; } return contents; }; @@ -13310,9 +12708,7 @@ const deserializeAws_restXmlHeaderList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlHeaders = ( @@ -13334,11 +12730,7 @@ const deserializeAws_restXmlHeaders = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -13358,10 +12750,7 @@ const deserializeAws_restXmlInvalidation = ( contents.CreateTime = new Date(output["CreateTime"]); } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["InvalidationBatch"] !== undefined) { contents.InvalidationBatch = deserializeAws_restXmlInvalidationBatch( @@ -13370,10 +12759,7 @@ const deserializeAws_restXmlInvalidation = ( ); } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -13388,10 +12774,7 @@ const deserializeAws_restXmlInvalidationBatch = ( Paths: undefined }; if (output["CallerReference"] !== undefined) { - contents.CallerReference = - output["CallerReference"]["#text"] !== undefined - ? output["CallerReference"]["#text"] - : output["CallerReference"]; + contents.CallerReference = output["CallerReference"]; } if (output["Paths"] !== undefined) { contents.Paths = deserializeAws_restXmlPaths(output["Paths"], context); @@ -13413,10 +12796,7 @@ const deserializeAws_restXmlInvalidationList = ( Quantity: undefined }; if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output.Items === "") { contents.Items = []; @@ -13431,30 +12811,16 @@ const deserializeAws_restXmlInvalidationList = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output["MaxItems"] !== undefined) { - contents.MaxItems = parseInt( - output["MaxItems"]["#text"] !== undefined - ? output["MaxItems"]["#text"] - : output["MaxItems"] - ); + contents.MaxItems = parseInt(output["MaxItems"]); } if (output["NextMarker"] !== undefined) { - contents.NextMarker = - output["NextMarker"]["#text"] !== undefined - ? output["NextMarker"]["#text"] - : output["NextMarker"]; + contents.NextMarker = output["NextMarker"]; } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -13473,16 +12839,10 @@ const deserializeAws_restXmlInvalidationSummary = ( contents.CreateTime = new Date(output["CreateTime"]); } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -13500,9 +12860,7 @@ const deserializeAws_restXmlKeyPairIdList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlKeyPairIds = ( @@ -13527,11 +12885,7 @@ const deserializeAws_restXmlKeyPairIds = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -13547,22 +12901,13 @@ const deserializeAws_restXmlLambdaFunctionAssociation = ( LambdaFunctionARN: undefined }; if (output["EventType"] !== undefined) { - contents.EventType = - output["EventType"]["#text"] !== undefined - ? output["EventType"]["#text"] - : output["EventType"]; + contents.EventType = output["EventType"]; } if (output["IncludeBody"] !== undefined) { - contents.IncludeBody = - (output["IncludeBody"]["#text"] !== undefined - ? output["IncludeBody"]["#text"] - : output["IncludeBody"]) == "true"; + contents.IncludeBody = output["IncludeBody"] == "true"; } if (output["LambdaFunctionARN"] !== undefined) { - contents.LambdaFunctionARN = - output["LambdaFunctionARN"]["#text"] !== undefined - ? output["LambdaFunctionARN"]["#text"] - : output["LambdaFunctionARN"]; + contents.LambdaFunctionARN = output["LambdaFunctionARN"]; } return contents; }; @@ -13598,11 +12943,7 @@ const deserializeAws_restXmlLambdaFunctionAssociations = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -13611,9 +12952,7 @@ const deserializeAws_restXmlLocationList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlLoggingConfig = ( @@ -13628,28 +12967,16 @@ const deserializeAws_restXmlLoggingConfig = ( Prefix: undefined }; if (output["Bucket"] !== undefined) { - contents.Bucket = - output["Bucket"]["#text"] !== undefined - ? output["Bucket"]["#text"] - : output["Bucket"]; + contents.Bucket = output["Bucket"]; } if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } if (output["IncludeCookies"] !== undefined) { - contents.IncludeCookies = - (output["IncludeCookies"]["#text"] !== undefined - ? output["IncludeCookies"]["#text"] - : output["IncludeCookies"]) == "true"; + contents.IncludeCookies = output["IncludeCookies"] == "true"; } if (output["Prefix"] !== undefined) { - contents.Prefix = - output["Prefix"]["#text"] !== undefined - ? output["Prefix"]["#text"] - : output["Prefix"]; + contents.Prefix = output["Prefix"]; } return contents; }; @@ -13658,9 +12985,7 @@ const deserializeAws_restXmlMethodsList = ( output: any, context: __SerdeContext ): (Method | string)[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlOrigin = ( @@ -13689,22 +13014,13 @@ const deserializeAws_restXmlOrigin = ( ); } if (output["DomainName"] !== undefined) { - contents.DomainName = - output["DomainName"]["#text"] !== undefined - ? output["DomainName"]["#text"] - : output["DomainName"]; + contents.DomainName = output["DomainName"]; } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["OriginPath"] !== undefined) { - contents.OriginPath = - output["OriginPath"]["#text"] !== undefined - ? output["OriginPath"]["#text"] - : output["OriginPath"]; + contents.OriginPath = output["OriginPath"]; } if (output["S3OriginConfig"] !== undefined) { contents.S3OriginConfig = deserializeAws_restXmlS3OriginConfig( @@ -13725,16 +13041,10 @@ const deserializeAws_restXmlOriginCustomHeader = ( HeaderValue: undefined }; if (output["HeaderName"] !== undefined) { - contents.HeaderName = - output["HeaderName"]["#text"] !== undefined - ? output["HeaderName"]["#text"] - : output["HeaderName"]; + contents.HeaderName = output["HeaderName"]; } if (output["HeaderValue"] !== undefined) { - contents.HeaderValue = - output["HeaderValue"]["#text"] !== undefined - ? output["HeaderValue"]["#text"] - : output["HeaderValue"]; + contents.HeaderValue = output["HeaderValue"]; } return contents; }; @@ -13765,10 +13075,7 @@ const deserializeAws_restXmlOriginGroup = ( ); } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["Members"] !== undefined) { contents.Members = deserializeAws_restXmlOriginGroupMembers( @@ -13814,10 +13121,7 @@ const deserializeAws_restXmlOriginGroupMember = ( OriginId: undefined }; if (output["OriginId"] !== undefined) { - contents.OriginId = - output["OriginId"]["#text"] !== undefined - ? output["OriginId"]["#text"] - : output["OriginId"]; + contents.OriginId = output["OriginId"]; } return contents; }; @@ -13853,11 +13157,7 @@ const deserializeAws_restXmlOriginGroupMembers = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -13884,11 +13184,7 @@ const deserializeAws_restXmlOriginGroups = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -13924,11 +13220,7 @@ const deserializeAws_restXmlOriginSslProtocols = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -13955,11 +13247,7 @@ const deserializeAws_restXmlOrigins = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -13968,9 +13256,7 @@ const deserializeAws_restXmlPathList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlPaths = ( @@ -13992,11 +13278,7 @@ const deserializeAws_restXmlPaths = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -14015,10 +13297,7 @@ const deserializeAws_restXmlPublicKey = ( contents.CreatedTime = new Date(output["CreatedTime"]); } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["PublicKeyConfig"] !== undefined) { contents.PublicKeyConfig = deserializeAws_restXmlPublicKeyConfig( @@ -14041,28 +13320,16 @@ const deserializeAws_restXmlPublicKeyConfig = ( Name: undefined }; if (output["CallerReference"] !== undefined) { - contents.CallerReference = - output["CallerReference"]["#text"] !== undefined - ? output["CallerReference"]["#text"] - : output["CallerReference"]; + contents.CallerReference = output["CallerReference"]; } if (output["Comment"] !== undefined) { - contents.Comment = - output["Comment"]["#text"] !== undefined - ? output["Comment"]["#text"] - : output["Comment"]; + contents.Comment = output["Comment"]; } if (output["EncodedKey"] !== undefined) { - contents.EncodedKey = - output["EncodedKey"]["#text"] !== undefined - ? output["EncodedKey"]["#text"] - : output["EncodedKey"]; + contents.EncodedKey = output["EncodedKey"]; } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } return contents; }; @@ -14091,24 +13358,13 @@ const deserializeAws_restXmlPublicKeyList = ( ); } if (output["MaxItems"] !== undefined) { - contents.MaxItems = parseInt( - output["MaxItems"]["#text"] !== undefined - ? output["MaxItems"]["#text"] - : output["MaxItems"] - ); + contents.MaxItems = parseInt(output["MaxItems"]); } if (output["NextMarker"] !== undefined) { - contents.NextMarker = - output["NextMarker"]["#text"] !== undefined - ? output["NextMarker"]["#text"] - : output["NextMarker"]; + contents.NextMarker = output["NextMarker"]; } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -14126,31 +13382,19 @@ const deserializeAws_restXmlPublicKeySummary = ( Name: undefined }; if (output["Comment"] !== undefined) { - contents.Comment = - output["Comment"]["#text"] !== undefined - ? output["Comment"]["#text"] - : output["Comment"]; + contents.Comment = output["Comment"]; } if (output["CreatedTime"] !== undefined) { contents.CreatedTime = new Date(output["CreatedTime"]); } if (output["EncodedKey"] !== undefined) { - contents.EncodedKey = - output["EncodedKey"]["#text"] !== undefined - ? output["EncodedKey"]["#text"] - : output["EncodedKey"]; + contents.EncodedKey = output["EncodedKey"]; } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } return contents; }; @@ -14174,16 +13418,10 @@ const deserializeAws_restXmlQueryArgProfile = ( QueryArg: undefined }; if (output["ProfileId"] !== undefined) { - contents.ProfileId = - output["ProfileId"]["#text"] !== undefined - ? output["ProfileId"]["#text"] - : output["ProfileId"]; + contents.ProfileId = output["ProfileId"]; } if (output["QueryArg"] !== undefined) { - contents.QueryArg = - output["QueryArg"]["#text"] !== undefined - ? output["QueryArg"]["#text"] - : output["QueryArg"]; + contents.QueryArg = output["QueryArg"]; } return contents; }; @@ -14199,9 +13437,7 @@ const deserializeAws_restXmlQueryArgProfileConfig = ( }; if (output["ForwardWhenQueryArgProfileIsUnknown"] !== undefined) { contents.ForwardWhenQueryArgProfileIsUnknown = - (output["ForwardWhenQueryArgProfileIsUnknown"]["#text"] !== undefined - ? output["ForwardWhenQueryArgProfileIsUnknown"]["#text"] - : output["ForwardWhenQueryArgProfileIsUnknown"]) == "true"; + output["ForwardWhenQueryArgProfileIsUnknown"] == "true"; } if (output["QueryArgProfiles"] !== undefined) { contents.QueryArgProfiles = deserializeAws_restXmlQueryArgProfiles( @@ -14243,11 +13479,7 @@ const deserializeAws_restXmlQueryArgProfiles = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -14271,11 +13503,7 @@ const deserializeAws_restXmlQueryStringCacheKeys = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -14284,9 +13512,7 @@ const deserializeAws_restXmlQueryStringCacheKeysList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlRestrictions = ( @@ -14316,16 +13542,10 @@ const deserializeAws_restXmlS3Origin = ( OriginAccessIdentity: undefined }; if (output["DomainName"] !== undefined) { - contents.DomainName = - output["DomainName"]["#text"] !== undefined - ? output["DomainName"]["#text"] - : output["DomainName"]; + contents.DomainName = output["DomainName"]; } if (output["OriginAccessIdentity"] !== undefined) { - contents.OriginAccessIdentity = - output["OriginAccessIdentity"]["#text"] !== undefined - ? output["OriginAccessIdentity"]["#text"] - : output["OriginAccessIdentity"]; + contents.OriginAccessIdentity = output["OriginAccessIdentity"]; } return contents; }; @@ -14339,10 +13559,7 @@ const deserializeAws_restXmlS3OriginConfig = ( OriginAccessIdentity: undefined }; if (output["OriginAccessIdentity"] !== undefined) { - contents.OriginAccessIdentity = - output["OriginAccessIdentity"]["#text"] !== undefined - ? output["OriginAccessIdentity"]["#text"] - : output["OriginAccessIdentity"]; + contents.OriginAccessIdentity = output["OriginAccessIdentity"]; } return contents; }; @@ -14357,10 +13574,7 @@ const deserializeAws_restXmlSigner = ( KeyPairIds: undefined }; if (output["AwsAccountNumber"] !== undefined) { - contents.AwsAccountNumber = - output["AwsAccountNumber"]["#text"] !== undefined - ? output["AwsAccountNumber"]["#text"] - : output["AwsAccountNumber"]; + contents.AwsAccountNumber = output["AwsAccountNumber"]; } if (output["KeyPairIds"] !== undefined) { contents.KeyPairIds = deserializeAws_restXmlKeyPairIds( @@ -14384,18 +13598,14 @@ const deserializeAws_restXmlSslProtocolsList = ( output: any, context: __SerdeContext ): (SslProtocol | string)[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlStatusCodeList = ( output: any, context: __SerdeContext ): number[] => { - return (output || []).map((entry: any) => - parseInt(entry["#text"] !== undefined ? entry["#text"] : entry) - ); + return (output || []).map((entry: any) => parseInt(entry)); }; const deserializeAws_restXmlStatusCodes = ( @@ -14420,11 +13630,7 @@ const deserializeAws_restXmlStatusCodes = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -14444,10 +13650,7 @@ const deserializeAws_restXmlStreamingDistribution = ( StreamingDistributionConfig: undefined }; if (output["ARN"] !== undefined) { - contents.ARN = - output["ARN"]["#text"] !== undefined - ? output["ARN"]["#text"] - : output["ARN"]; + contents.ARN = output["ARN"]; } if (output["ActiveTrustedSigners"] !== undefined) { contents.ActiveTrustedSigners = deserializeAws_restXmlActiveTrustedSigners( @@ -14456,25 +13659,16 @@ const deserializeAws_restXmlStreamingDistribution = ( ); } if (output["DomainName"] !== undefined) { - contents.DomainName = - output["DomainName"]["#text"] !== undefined - ? output["DomainName"]["#text"] - : output["DomainName"]; + contents.DomainName = output["DomainName"]; } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["LastModifiedTime"] !== undefined) { contents.LastModifiedTime = new Date(output["LastModifiedTime"]); } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["StreamingDistributionConfig"] !== undefined) { contents.StreamingDistributionConfig = deserializeAws_restXmlStreamingDistributionConfig( @@ -14507,22 +13701,13 @@ const deserializeAws_restXmlStreamingDistributionConfig = ( ); } if (output["CallerReference"] !== undefined) { - contents.CallerReference = - output["CallerReference"]["#text"] !== undefined - ? output["CallerReference"]["#text"] - : output["CallerReference"]; + contents.CallerReference = output["CallerReference"]; } if (output["Comment"] !== undefined) { - contents.Comment = - output["Comment"]["#text"] !== undefined - ? output["Comment"]["#text"] - : output["Comment"]; + contents.Comment = output["Comment"]; } if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } if (output["Logging"] !== undefined) { contents.Logging = deserializeAws_restXmlStreamingLoggingConfig( @@ -14531,10 +13716,7 @@ const deserializeAws_restXmlStreamingDistributionConfig = ( ); } if (output["PriceClass"] !== undefined) { - contents.PriceClass = - output["PriceClass"]["#text"] !== undefined - ? output["PriceClass"]["#text"] - : output["PriceClass"]; + contents.PriceClass = output["PriceClass"]; } if (output["S3Origin"] !== undefined) { contents.S3Origin = deserializeAws_restXmlS3Origin( @@ -14565,10 +13747,7 @@ const deserializeAws_restXmlStreamingDistributionList = ( Quantity: undefined }; if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output.Items === "") { contents.Items = []; @@ -14583,30 +13762,16 @@ const deserializeAws_restXmlStreamingDistributionList = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output["MaxItems"] !== undefined) { - contents.MaxItems = parseInt( - output["MaxItems"]["#text"] !== undefined - ? output["MaxItems"]["#text"] - : output["MaxItems"] - ); + contents.MaxItems = parseInt(output["MaxItems"]); } if (output["NextMarker"] !== undefined) { - contents.NextMarker = - output["NextMarker"]["#text"] !== undefined - ? output["NextMarker"]["#text"] - : output["NextMarker"]; + contents.NextMarker = output["NextMarker"]; } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -14630,10 +13795,7 @@ const deserializeAws_restXmlStreamingDistributionSummary = ( TrustedSigners: undefined }; if (output["ARN"] !== undefined) { - contents.ARN = - output["ARN"]["#text"] !== undefined - ? output["ARN"]["#text"] - : output["ARN"]; + contents.ARN = output["ARN"]; } if (output["Aliases"] !== undefined) { contents.Aliases = deserializeAws_restXmlAliases( @@ -14642,37 +13804,22 @@ const deserializeAws_restXmlStreamingDistributionSummary = ( ); } if (output["Comment"] !== undefined) { - contents.Comment = - output["Comment"]["#text"] !== undefined - ? output["Comment"]["#text"] - : output["Comment"]; + contents.Comment = output["Comment"]; } if (output["DomainName"] !== undefined) { - contents.DomainName = - output["DomainName"]["#text"] !== undefined - ? output["DomainName"]["#text"] - : output["DomainName"]; + contents.DomainName = output["DomainName"]; } if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["LastModifiedTime"] !== undefined) { contents.LastModifiedTime = new Date(output["LastModifiedTime"]); } if (output["PriceClass"] !== undefined) { - contents.PriceClass = - output["PriceClass"]["#text"] !== undefined - ? output["PriceClass"]["#text"] - : output["PriceClass"]; + contents.PriceClass = output["PriceClass"]; } if (output["S3Origin"] !== undefined) { contents.S3Origin = deserializeAws_restXmlS3Origin( @@ -14681,10 +13828,7 @@ const deserializeAws_restXmlStreamingDistributionSummary = ( ); } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["TrustedSigners"] !== undefined) { contents.TrustedSigners = deserializeAws_restXmlTrustedSigners( @@ -14715,22 +13859,13 @@ const deserializeAws_restXmlStreamingLoggingConfig = ( Prefix: undefined }; if (output["Bucket"] !== undefined) { - contents.Bucket = - output["Bucket"]["#text"] !== undefined - ? output["Bucket"]["#text"] - : output["Bucket"]; + contents.Bucket = output["Bucket"]; } if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } if (output["Prefix"] !== undefined) { - contents.Prefix = - output["Prefix"]["#text"] !== undefined - ? output["Prefix"]["#text"] - : output["Prefix"]; + contents.Prefix = output["Prefix"]; } return contents; }; @@ -14745,16 +13880,10 @@ const deserializeAws_restXmlTag = ( Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -14799,10 +13928,7 @@ const deserializeAws_restXmlTrustedSigners = ( Quantity: undefined }; if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } if (output.Items === "") { contents.Items = []; @@ -14817,11 +13943,7 @@ const deserializeAws_restXmlTrustedSigners = ( ); } if (output["Quantity"] !== undefined) { - contents.Quantity = parseInt( - output["Quantity"]["#text"] !== undefined - ? output["Quantity"]["#text"] - : output["Quantity"] - ); + contents.Quantity = parseInt(output["Quantity"]); } return contents; }; @@ -14841,46 +13963,26 @@ const deserializeAws_restXmlViewerCertificate = ( SSLSupportMethod: undefined }; if (output["ACMCertificateArn"] !== undefined) { - contents.ACMCertificateArn = - output["ACMCertificateArn"]["#text"] !== undefined - ? output["ACMCertificateArn"]["#text"] - : output["ACMCertificateArn"]; + contents.ACMCertificateArn = output["ACMCertificateArn"]; } if (output["Certificate"] !== undefined) { - contents.Certificate = - output["Certificate"]["#text"] !== undefined - ? output["Certificate"]["#text"] - : output["Certificate"]; + contents.Certificate = output["Certificate"]; } if (output["CertificateSource"] !== undefined) { - contents.CertificateSource = - output["CertificateSource"]["#text"] !== undefined - ? output["CertificateSource"]["#text"] - : output["CertificateSource"]; + contents.CertificateSource = output["CertificateSource"]; } if (output["CloudFrontDefaultCertificate"] !== undefined) { contents.CloudFrontDefaultCertificate = - (output["CloudFrontDefaultCertificate"]["#text"] !== undefined - ? output["CloudFrontDefaultCertificate"]["#text"] - : output["CloudFrontDefaultCertificate"]) == "true"; + output["CloudFrontDefaultCertificate"] == "true"; } if (output["IAMCertificateId"] !== undefined) { - contents.IAMCertificateId = - output["IAMCertificateId"]["#text"] !== undefined - ? output["IAMCertificateId"]["#text"] - : output["IAMCertificateId"]; + contents.IAMCertificateId = output["IAMCertificateId"]; } if (output["MinimumProtocolVersion"] !== undefined) { - contents.MinimumProtocolVersion = - output["MinimumProtocolVersion"]["#text"] !== undefined - ? output["MinimumProtocolVersion"]["#text"] - : output["MinimumProtocolVersion"]; + contents.MinimumProtocolVersion = output["MinimumProtocolVersion"]; } if (output["SSLSupportMethod"] !== undefined) { - contents.SSLSupportMethod = - output["SSLSupportMethod"]["#text"] !== undefined - ? output["SSLSupportMethod"]["#text"] - : output["SSLSupportMethod"]; + contents.SSLSupportMethod = output["SSLSupportMethod"]; } return contents; }; @@ -14942,7 +14044,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/clients/client-cloudsearch/protocols/Aws_query.ts b/clients/client-cloudsearch/protocols/Aws_query.ts index 209f6de484dd..b68f2cc8812d 100644 --- a/clients/client-cloudsearch/protocols/Aws_query.ts +++ b/clients/client-cloudsearch/protocols/Aws_query.ts @@ -200,7 +200,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -4262,10 +4263,7 @@ const deserializeAws_queryAccessPoliciesStatus = ( Status: undefined }; if (output["Options"] !== undefined) { - contents.Options = - output["Options"]["#text"] !== undefined - ? output["Options"]["#text"] - : output["Options"]; + contents.Options = output["Options"]; } if (output["Status"] !== undefined) { contents.Status = deserializeAws_queryOptionStatus( @@ -4289,34 +4287,20 @@ const deserializeAws_queryAnalysisOptions = ( Synonyms: undefined }; if (output["AlgorithmicStemming"] !== undefined) { - contents.AlgorithmicStemming = - output["AlgorithmicStemming"]["#text"] !== undefined - ? output["AlgorithmicStemming"]["#text"] - : output["AlgorithmicStemming"]; + contents.AlgorithmicStemming = output["AlgorithmicStemming"]; } if (output["JapaneseTokenizationDictionary"] !== undefined) { contents.JapaneseTokenizationDictionary = - output["JapaneseTokenizationDictionary"]["#text"] !== undefined - ? output["JapaneseTokenizationDictionary"]["#text"] - : output["JapaneseTokenizationDictionary"]; + output["JapaneseTokenizationDictionary"]; } if (output["StemmingDictionary"] !== undefined) { - contents.StemmingDictionary = - output["StemmingDictionary"]["#text"] !== undefined - ? output["StemmingDictionary"]["#text"] - : output["StemmingDictionary"]; + contents.StemmingDictionary = output["StemmingDictionary"]; } if (output["Stopwords"] !== undefined) { - contents.Stopwords = - output["Stopwords"]["#text"] !== undefined - ? output["Stopwords"]["#text"] - : output["Stopwords"]; + contents.Stopwords = output["Stopwords"]; } if (output["Synonyms"] !== undefined) { - contents.Synonyms = - output["Synonyms"]["#text"] !== undefined - ? output["Synonyms"]["#text"] - : output["Synonyms"]; + contents.Synonyms = output["Synonyms"]; } return contents; }; @@ -4338,16 +4322,10 @@ const deserializeAws_queryAnalysisScheme = ( ); } if (output["AnalysisSchemeLanguage"] !== undefined) { - contents.AnalysisSchemeLanguage = - output["AnalysisSchemeLanguage"]["#text"] !== undefined - ? output["AnalysisSchemeLanguage"]["#text"] - : output["AnalysisSchemeLanguage"]; + contents.AnalysisSchemeLanguage = output["AnalysisSchemeLanguage"]; } if (output["AnalysisSchemeName"] !== undefined) { - contents.AnalysisSchemeName = - output["AnalysisSchemeName"]["#text"] !== undefined - ? output["AnalysisSchemeName"]["#text"] - : output["AnalysisSchemeName"]; + contents.AnalysisSchemeName = output["AnalysisSchemeName"]; } return contents; }; @@ -4395,10 +4373,7 @@ const deserializeAws_queryAvailabilityOptionsStatus = ( Status: undefined }; if (output["Options"] !== undefined) { - contents.Options = - (output["Options"]["#text"] !== undefined - ? output["Options"]["#text"] - : output["Options"]) == "true"; + contents.Options = output["Options"] == "true"; } if (output["Status"] !== undefined) { contents.Status = deserializeAws_queryOptionStatus( @@ -4419,16 +4394,10 @@ const deserializeAws_queryBaseException = ( Message: undefined }; if (output["Code"] !== undefined) { - contents.Code = - output["Code"]["#text"] !== undefined - ? output["Code"]["#text"] - : output["Code"]; + contents.Code = output["Code"]; } if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -4486,34 +4455,19 @@ const deserializeAws_queryDateArrayOptions = ( SourceFields: undefined }; if (output["DefaultValue"] !== undefined) { - contents.DefaultValue = - output["DefaultValue"]["#text"] !== undefined - ? output["DefaultValue"]["#text"] - : output["DefaultValue"]; + contents.DefaultValue = output["DefaultValue"]; } if (output["FacetEnabled"] !== undefined) { - contents.FacetEnabled = - (output["FacetEnabled"]["#text"] !== undefined - ? output["FacetEnabled"]["#text"] - : output["FacetEnabled"]) == "true"; + contents.FacetEnabled = output["FacetEnabled"] == "true"; } if (output["ReturnEnabled"] !== undefined) { - contents.ReturnEnabled = - (output["ReturnEnabled"]["#text"] !== undefined - ? output["ReturnEnabled"]["#text"] - : output["ReturnEnabled"]) == "true"; + contents.ReturnEnabled = output["ReturnEnabled"] == "true"; } if (output["SearchEnabled"] !== undefined) { - contents.SearchEnabled = - (output["SearchEnabled"]["#text"] !== undefined - ? output["SearchEnabled"]["#text"] - : output["SearchEnabled"]) == "true"; + contents.SearchEnabled = output["SearchEnabled"] == "true"; } if (output["SourceFields"] !== undefined) { - contents.SourceFields = - output["SourceFields"]["#text"] !== undefined - ? output["SourceFields"]["#text"] - : output["SourceFields"]; + contents.SourceFields = output["SourceFields"]; } return contents; }; @@ -4532,40 +4486,22 @@ const deserializeAws_queryDateOptions = ( SourceField: undefined }; if (output["DefaultValue"] !== undefined) { - contents.DefaultValue = - output["DefaultValue"]["#text"] !== undefined - ? output["DefaultValue"]["#text"] - : output["DefaultValue"]; + contents.DefaultValue = output["DefaultValue"]; } if (output["FacetEnabled"] !== undefined) { - contents.FacetEnabled = - (output["FacetEnabled"]["#text"] !== undefined - ? output["FacetEnabled"]["#text"] - : output["FacetEnabled"]) == "true"; + contents.FacetEnabled = output["FacetEnabled"] == "true"; } if (output["ReturnEnabled"] !== undefined) { - contents.ReturnEnabled = - (output["ReturnEnabled"]["#text"] !== undefined - ? output["ReturnEnabled"]["#text"] - : output["ReturnEnabled"]) == "true"; + contents.ReturnEnabled = output["ReturnEnabled"] == "true"; } if (output["SearchEnabled"] !== undefined) { - contents.SearchEnabled = - (output["SearchEnabled"]["#text"] !== undefined - ? output["SearchEnabled"]["#text"] - : output["SearchEnabled"]) == "true"; + contents.SearchEnabled = output["SearchEnabled"] == "true"; } if (output["SortEnabled"] !== undefined) { - contents.SortEnabled = - (output["SortEnabled"]["#text"] !== undefined - ? output["SortEnabled"]["#text"] - : output["SortEnabled"]) == "true"; + contents.SortEnabled = output["SortEnabled"] == "true"; } if (output["SourceField"] !== undefined) { - contents.SourceField = - output["SourceField"]["#text"] !== undefined - ? output["SourceField"]["#text"] - : output["SourceField"]; + contents.SourceField = output["SourceField"]; } return contents; }; @@ -4916,16 +4852,10 @@ const deserializeAws_queryDisabledOperationException = ( Message: undefined }; if (output["Code"] !== undefined) { - contents.Code = - output["Code"]["#text"] !== undefined - ? output["Code"]["#text"] - : output["Code"]; + contents.Code = output["Code"]; } if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -4941,22 +4871,13 @@ const deserializeAws_queryDocumentSuggesterOptions = ( SourceField: undefined }; if (output["FuzzyMatching"] !== undefined) { - contents.FuzzyMatching = - output["FuzzyMatching"]["#text"] !== undefined - ? output["FuzzyMatching"]["#text"] - : output["FuzzyMatching"]; + contents.FuzzyMatching = output["FuzzyMatching"]; } if (output["SortExpression"] !== undefined) { - contents.SortExpression = - output["SortExpression"]["#text"] !== undefined - ? output["SortExpression"]["#text"] - : output["SortExpression"]; + contents.SortExpression = output["SortExpression"]; } if (output["SourceField"] !== undefined) { - contents.SourceField = - output["SourceField"]["#text"] !== undefined - ? output["SourceField"]["#text"] - : output["SourceField"]; + contents.SourceField = output["SourceField"]; } return contents; }; @@ -4971,16 +4892,10 @@ const deserializeAws_queryDomainEndpointOptions = ( TLSSecurityPolicy: undefined }; if (output["EnforceHTTPS"] !== undefined) { - contents.EnforceHTTPS = - (output["EnforceHTTPS"]["#text"] !== undefined - ? output["EnforceHTTPS"]["#text"] - : output["EnforceHTTPS"]) == "true"; + contents.EnforceHTTPS = output["EnforceHTTPS"] == "true"; } if (output["TLSSecurityPolicy"] !== undefined) { - contents.TLSSecurityPolicy = - output["TLSSecurityPolicy"]["#text"] !== undefined - ? output["TLSSecurityPolicy"]["#text"] - : output["TLSSecurityPolicy"]; + contents.TLSSecurityPolicy = output["TLSSecurityPolicy"]; } return contents; }; @@ -5014,10 +4929,7 @@ const deserializeAws_queryDomainNameMap = ( context: __SerdeContext ): { [key: string]: string } => { return output.reduce((acc: any, pair: any) => { - acc[pair["key"]] = - pair["value"]["#text"] !== undefined - ? pair["value"]["#text"] - : pair["value"]; + acc[pair["key"]] = pair["value"]; return acc; }, {}); }; @@ -5043,22 +4955,13 @@ const deserializeAws_queryDomainStatus = ( SearchService: undefined }; if (output["ARN"] !== undefined) { - contents.ARN = - output["ARN"]["#text"] !== undefined - ? output["ARN"]["#text"] - : output["ARN"]; + contents.ARN = output["ARN"]; } if (output["Created"] !== undefined) { - contents.Created = - (output["Created"]["#text"] !== undefined - ? output["Created"]["#text"] - : output["Created"]) == "true"; + contents.Created = output["Created"] == "true"; } if (output["Deleted"] !== undefined) { - contents.Deleted = - (output["Deleted"]["#text"] !== undefined - ? output["Deleted"]["#text"] - : output["Deleted"]) == "true"; + contents.Deleted = output["Deleted"] == "true"; } if (output["DocService"] !== undefined) { contents.DocService = deserializeAws_queryServiceEndpoint( @@ -5067,51 +4970,29 @@ const deserializeAws_queryDomainStatus = ( ); } if (output["DomainId"] !== undefined) { - contents.DomainId = - output["DomainId"]["#text"] !== undefined - ? output["DomainId"]["#text"] - : output["DomainId"]; + contents.DomainId = output["DomainId"]; } if (output["DomainName"] !== undefined) { - contents.DomainName = - output["DomainName"]["#text"] !== undefined - ? output["DomainName"]["#text"] - : output["DomainName"]; + contents.DomainName = output["DomainName"]; } if (output["Limits"] !== undefined) { contents.Limits = deserializeAws_queryLimits(output["Limits"], context); } if (output["Processing"] !== undefined) { - contents.Processing = - (output["Processing"]["#text"] !== undefined - ? output["Processing"]["#text"] - : output["Processing"]) == "true"; + contents.Processing = output["Processing"] == "true"; } if (output["RequiresIndexDocuments"] !== undefined) { contents.RequiresIndexDocuments = - (output["RequiresIndexDocuments"]["#text"] !== undefined - ? output["RequiresIndexDocuments"]["#text"] - : output["RequiresIndexDocuments"]) == "true"; + output["RequiresIndexDocuments"] == "true"; } if (output["SearchInstanceCount"] !== undefined) { - contents.SearchInstanceCount = parseInt( - output["SearchInstanceCount"]["#text"] !== undefined - ? output["SearchInstanceCount"]["#text"] - : output["SearchInstanceCount"] - ); + contents.SearchInstanceCount = parseInt(output["SearchInstanceCount"]); } if (output["SearchInstanceType"] !== undefined) { - contents.SearchInstanceType = - output["SearchInstanceType"]["#text"] !== undefined - ? output["SearchInstanceType"]["#text"] - : output["SearchInstanceType"]; + contents.SearchInstanceType = output["SearchInstanceType"]; } if (output["SearchPartitionCount"] !== undefined) { - contents.SearchPartitionCount = parseInt( - output["SearchPartitionCount"]["#text"] !== undefined - ? output["SearchPartitionCount"]["#text"] - : output["SearchPartitionCount"] - ); + contents.SearchPartitionCount = parseInt(output["SearchPartitionCount"]); } if (output["SearchService"] !== undefined) { contents.SearchService = deserializeAws_queryServiceEndpoint( @@ -5144,35 +5025,19 @@ const deserializeAws_queryDoubleArrayOptions = ( SourceFields: undefined }; if (output["DefaultValue"] !== undefined) { - contents.DefaultValue = parseFloat( - output["DefaultValue"]["#text"] !== undefined - ? output["DefaultValue"]["#text"] - : output["DefaultValue"] - ); + contents.DefaultValue = parseFloat(output["DefaultValue"]); } if (output["FacetEnabled"] !== undefined) { - contents.FacetEnabled = - (output["FacetEnabled"]["#text"] !== undefined - ? output["FacetEnabled"]["#text"] - : output["FacetEnabled"]) == "true"; + contents.FacetEnabled = output["FacetEnabled"] == "true"; } if (output["ReturnEnabled"] !== undefined) { - contents.ReturnEnabled = - (output["ReturnEnabled"]["#text"] !== undefined - ? output["ReturnEnabled"]["#text"] - : output["ReturnEnabled"]) == "true"; + contents.ReturnEnabled = output["ReturnEnabled"] == "true"; } if (output["SearchEnabled"] !== undefined) { - contents.SearchEnabled = - (output["SearchEnabled"]["#text"] !== undefined - ? output["SearchEnabled"]["#text"] - : output["SearchEnabled"]) == "true"; + contents.SearchEnabled = output["SearchEnabled"] == "true"; } if (output["SourceFields"] !== undefined) { - contents.SourceFields = - output["SourceFields"]["#text"] !== undefined - ? output["SourceFields"]["#text"] - : output["SourceFields"]; + contents.SourceFields = output["SourceFields"]; } return contents; }; @@ -5191,41 +5056,22 @@ const deserializeAws_queryDoubleOptions = ( SourceField: undefined }; if (output["DefaultValue"] !== undefined) { - contents.DefaultValue = parseFloat( - output["DefaultValue"]["#text"] !== undefined - ? output["DefaultValue"]["#text"] - : output["DefaultValue"] - ); + contents.DefaultValue = parseFloat(output["DefaultValue"]); } if (output["FacetEnabled"] !== undefined) { - contents.FacetEnabled = - (output["FacetEnabled"]["#text"] !== undefined - ? output["FacetEnabled"]["#text"] - : output["FacetEnabled"]) == "true"; + contents.FacetEnabled = output["FacetEnabled"] == "true"; } if (output["ReturnEnabled"] !== undefined) { - contents.ReturnEnabled = - (output["ReturnEnabled"]["#text"] !== undefined - ? output["ReturnEnabled"]["#text"] - : output["ReturnEnabled"]) == "true"; + contents.ReturnEnabled = output["ReturnEnabled"] == "true"; } if (output["SearchEnabled"] !== undefined) { - contents.SearchEnabled = - (output["SearchEnabled"]["#text"] !== undefined - ? output["SearchEnabled"]["#text"] - : output["SearchEnabled"]) == "true"; + contents.SearchEnabled = output["SearchEnabled"] == "true"; } if (output["SortEnabled"] !== undefined) { - contents.SortEnabled = - (output["SortEnabled"]["#text"] !== undefined - ? output["SortEnabled"]["#text"] - : output["SortEnabled"]) == "true"; + contents.SortEnabled = output["SortEnabled"] == "true"; } if (output["SourceField"] !== undefined) { - contents.SourceField = - output["SourceField"]["#text"] !== undefined - ? output["SourceField"]["#text"] - : output["SourceField"]; + contents.SourceField = output["SourceField"]; } return contents; }; @@ -5240,16 +5086,10 @@ const deserializeAws_queryExpression = ( ExpressionValue: undefined }; if (output["ExpressionName"] !== undefined) { - contents.ExpressionName = - output["ExpressionName"]["#text"] !== undefined - ? output["ExpressionName"]["#text"] - : output["ExpressionName"]; + contents.ExpressionName = output["ExpressionName"]; } if (output["ExpressionValue"] !== undefined) { - contents.ExpressionValue = - output["ExpressionValue"]["#text"] !== undefined - ? output["ExpressionValue"]["#text"] - : output["ExpressionValue"]; + contents.ExpressionValue = output["ExpressionValue"]; } return contents; }; @@ -5291,9 +5131,7 @@ const deserializeAws_queryFieldNameList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryIndexDocumentsResponse = ( @@ -5364,16 +5202,10 @@ const deserializeAws_queryIndexField = ( ); } if (output["IndexFieldName"] !== undefined) { - contents.IndexFieldName = - output["IndexFieldName"]["#text"] !== undefined - ? output["IndexFieldName"]["#text"] - : output["IndexFieldName"]; + contents.IndexFieldName = output["IndexFieldName"]; } if (output["IndexFieldType"] !== undefined) { - contents.IndexFieldType = - output["IndexFieldType"]["#text"] !== undefined - ? output["IndexFieldType"]["#text"] - : output["IndexFieldType"]; + contents.IndexFieldType = output["IndexFieldType"]; } if (output["IntArrayOptions"] !== undefined) { contents.IntArrayOptions = deserializeAws_queryIntArrayOptions( @@ -5466,35 +5298,19 @@ const deserializeAws_queryIntArrayOptions = ( SourceFields: undefined }; if (output["DefaultValue"] !== undefined) { - contents.DefaultValue = parseInt( - output["DefaultValue"]["#text"] !== undefined - ? output["DefaultValue"]["#text"] - : output["DefaultValue"] - ); + contents.DefaultValue = parseInt(output["DefaultValue"]); } if (output["FacetEnabled"] !== undefined) { - contents.FacetEnabled = - (output["FacetEnabled"]["#text"] !== undefined - ? output["FacetEnabled"]["#text"] - : output["FacetEnabled"]) == "true"; + contents.FacetEnabled = output["FacetEnabled"] == "true"; } if (output["ReturnEnabled"] !== undefined) { - contents.ReturnEnabled = - (output["ReturnEnabled"]["#text"] !== undefined - ? output["ReturnEnabled"]["#text"] - : output["ReturnEnabled"]) == "true"; + contents.ReturnEnabled = output["ReturnEnabled"] == "true"; } if (output["SearchEnabled"] !== undefined) { - contents.SearchEnabled = - (output["SearchEnabled"]["#text"] !== undefined - ? output["SearchEnabled"]["#text"] - : output["SearchEnabled"]) == "true"; + contents.SearchEnabled = output["SearchEnabled"] == "true"; } if (output["SourceFields"] !== undefined) { - contents.SourceFields = - output["SourceFields"]["#text"] !== undefined - ? output["SourceFields"]["#text"] - : output["SourceFields"]; + contents.SourceFields = output["SourceFields"]; } return contents; }; @@ -5513,41 +5329,22 @@ const deserializeAws_queryIntOptions = ( SourceField: undefined }; if (output["DefaultValue"] !== undefined) { - contents.DefaultValue = parseInt( - output["DefaultValue"]["#text"] !== undefined - ? output["DefaultValue"]["#text"] - : output["DefaultValue"] - ); + contents.DefaultValue = parseInt(output["DefaultValue"]); } if (output["FacetEnabled"] !== undefined) { - contents.FacetEnabled = - (output["FacetEnabled"]["#text"] !== undefined - ? output["FacetEnabled"]["#text"] - : output["FacetEnabled"]) == "true"; + contents.FacetEnabled = output["FacetEnabled"] == "true"; } if (output["ReturnEnabled"] !== undefined) { - contents.ReturnEnabled = - (output["ReturnEnabled"]["#text"] !== undefined - ? output["ReturnEnabled"]["#text"] - : output["ReturnEnabled"]) == "true"; + contents.ReturnEnabled = output["ReturnEnabled"] == "true"; } if (output["SearchEnabled"] !== undefined) { - contents.SearchEnabled = - (output["SearchEnabled"]["#text"] !== undefined - ? output["SearchEnabled"]["#text"] - : output["SearchEnabled"]) == "true"; + contents.SearchEnabled = output["SearchEnabled"] == "true"; } if (output["SortEnabled"] !== undefined) { - contents.SortEnabled = - (output["SortEnabled"]["#text"] !== undefined - ? output["SortEnabled"]["#text"] - : output["SortEnabled"]) == "true"; + contents.SortEnabled = output["SortEnabled"] == "true"; } if (output["SourceField"] !== undefined) { - contents.SourceField = - output["SourceField"]["#text"] !== undefined - ? output["SourceField"]["#text"] - : output["SourceField"]; + contents.SourceField = output["SourceField"]; } return contents; }; @@ -5562,16 +5359,10 @@ const deserializeAws_queryInternalException = ( Message: undefined }; if (output["Code"] !== undefined) { - contents.Code = - output["Code"]["#text"] !== undefined - ? output["Code"]["#text"] - : output["Code"]; + contents.Code = output["Code"]; } if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -5586,16 +5377,10 @@ const deserializeAws_queryInvalidTypeException = ( Message: undefined }; if (output["Code"] !== undefined) { - contents.Code = - output["Code"]["#text"] !== undefined - ? output["Code"]["#text"] - : output["Code"]; + contents.Code = output["Code"]; } if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -5614,40 +5399,22 @@ const deserializeAws_queryLatLonOptions = ( SourceField: undefined }; if (output["DefaultValue"] !== undefined) { - contents.DefaultValue = - output["DefaultValue"]["#text"] !== undefined - ? output["DefaultValue"]["#text"] - : output["DefaultValue"]; + contents.DefaultValue = output["DefaultValue"]; } if (output["FacetEnabled"] !== undefined) { - contents.FacetEnabled = - (output["FacetEnabled"]["#text"] !== undefined - ? output["FacetEnabled"]["#text"] - : output["FacetEnabled"]) == "true"; + contents.FacetEnabled = output["FacetEnabled"] == "true"; } if (output["ReturnEnabled"] !== undefined) { - contents.ReturnEnabled = - (output["ReturnEnabled"]["#text"] !== undefined - ? output["ReturnEnabled"]["#text"] - : output["ReturnEnabled"]) == "true"; + contents.ReturnEnabled = output["ReturnEnabled"] == "true"; } if (output["SearchEnabled"] !== undefined) { - contents.SearchEnabled = - (output["SearchEnabled"]["#text"] !== undefined - ? output["SearchEnabled"]["#text"] - : output["SearchEnabled"]) == "true"; + contents.SearchEnabled = output["SearchEnabled"] == "true"; } if (output["SortEnabled"] !== undefined) { - contents.SortEnabled = - (output["SortEnabled"]["#text"] !== undefined - ? output["SortEnabled"]["#text"] - : output["SortEnabled"]) == "true"; + contents.SortEnabled = output["SortEnabled"] == "true"; } if (output["SourceField"] !== undefined) { - contents.SourceField = - output["SourceField"]["#text"] !== undefined - ? output["SourceField"]["#text"] - : output["SourceField"]; + contents.SourceField = output["SourceField"]; } return contents; }; @@ -5662,16 +5429,10 @@ const deserializeAws_queryLimitExceededException = ( Message: undefined }; if (output["Code"] !== undefined) { - contents.Code = - output["Code"]["#text"] !== undefined - ? output["Code"]["#text"] - : output["Code"]; + contents.Code = output["Code"]; } if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -5686,17 +5447,11 @@ const deserializeAws_queryLimits = ( MaximumReplicationCount: undefined }; if (output["MaximumPartitionCount"] !== undefined) { - contents.MaximumPartitionCount = parseInt( - output["MaximumPartitionCount"]["#text"] !== undefined - ? output["MaximumPartitionCount"]["#text"] - : output["MaximumPartitionCount"] - ); + contents.MaximumPartitionCount = parseInt(output["MaximumPartitionCount"]); } if (output["MaximumReplicationCount"] !== undefined) { contents.MaximumReplicationCount = parseInt( - output["MaximumReplicationCount"]["#text"] !== undefined - ? output["MaximumReplicationCount"]["#text"] - : output["MaximumReplicationCount"] + output["MaximumReplicationCount"] ); } return contents; @@ -5738,34 +5493,19 @@ const deserializeAws_queryLiteralArrayOptions = ( SourceFields: undefined }; if (output["DefaultValue"] !== undefined) { - contents.DefaultValue = - output["DefaultValue"]["#text"] !== undefined - ? output["DefaultValue"]["#text"] - : output["DefaultValue"]; + contents.DefaultValue = output["DefaultValue"]; } if (output["FacetEnabled"] !== undefined) { - contents.FacetEnabled = - (output["FacetEnabled"]["#text"] !== undefined - ? output["FacetEnabled"]["#text"] - : output["FacetEnabled"]) == "true"; + contents.FacetEnabled = output["FacetEnabled"] == "true"; } if (output["ReturnEnabled"] !== undefined) { - contents.ReturnEnabled = - (output["ReturnEnabled"]["#text"] !== undefined - ? output["ReturnEnabled"]["#text"] - : output["ReturnEnabled"]) == "true"; + contents.ReturnEnabled = output["ReturnEnabled"] == "true"; } if (output["SearchEnabled"] !== undefined) { - contents.SearchEnabled = - (output["SearchEnabled"]["#text"] !== undefined - ? output["SearchEnabled"]["#text"] - : output["SearchEnabled"]) == "true"; + contents.SearchEnabled = output["SearchEnabled"] == "true"; } if (output["SourceFields"] !== undefined) { - contents.SourceFields = - output["SourceFields"]["#text"] !== undefined - ? output["SourceFields"]["#text"] - : output["SourceFields"]; + contents.SourceFields = output["SourceFields"]; } return contents; }; @@ -5784,40 +5524,22 @@ const deserializeAws_queryLiteralOptions = ( SourceField: undefined }; if (output["DefaultValue"] !== undefined) { - contents.DefaultValue = - output["DefaultValue"]["#text"] !== undefined - ? output["DefaultValue"]["#text"] - : output["DefaultValue"]; + contents.DefaultValue = output["DefaultValue"]; } if (output["FacetEnabled"] !== undefined) { - contents.FacetEnabled = - (output["FacetEnabled"]["#text"] !== undefined - ? output["FacetEnabled"]["#text"] - : output["FacetEnabled"]) == "true"; + contents.FacetEnabled = output["FacetEnabled"] == "true"; } if (output["ReturnEnabled"] !== undefined) { - contents.ReturnEnabled = - (output["ReturnEnabled"]["#text"] !== undefined - ? output["ReturnEnabled"]["#text"] - : output["ReturnEnabled"]) == "true"; + contents.ReturnEnabled = output["ReturnEnabled"] == "true"; } if (output["SearchEnabled"] !== undefined) { - contents.SearchEnabled = - (output["SearchEnabled"]["#text"] !== undefined - ? output["SearchEnabled"]["#text"] - : output["SearchEnabled"]) == "true"; + contents.SearchEnabled = output["SearchEnabled"] == "true"; } if (output["SortEnabled"] !== undefined) { - contents.SortEnabled = - (output["SortEnabled"]["#text"] !== undefined - ? output["SortEnabled"]["#text"] - : output["SortEnabled"]) == "true"; + contents.SortEnabled = output["SortEnabled"] == "true"; } if (output["SourceField"] !== undefined) { - contents.SourceField = - output["SourceField"]["#text"] !== undefined - ? output["SourceField"]["#text"] - : output["SourceField"]; + contents.SourceField = output["SourceField"]; } return contents; }; @@ -5838,26 +5560,16 @@ const deserializeAws_queryOptionStatus = ( contents.CreationDate = new Date(output["CreationDate"]); } if (output["PendingDeletion"] !== undefined) { - contents.PendingDeletion = - (output["PendingDeletion"]["#text"] !== undefined - ? output["PendingDeletion"]["#text"] - : output["PendingDeletion"]) == "true"; + contents.PendingDeletion = output["PendingDeletion"] == "true"; } if (output["State"] !== undefined) { - contents.State = - output["State"]["#text"] !== undefined - ? output["State"]["#text"] - : output["State"]; + contents.State = output["State"]; } if (output["UpdateDate"] !== undefined) { contents.UpdateDate = new Date(output["UpdateDate"]); } if (output["UpdateVersion"] !== undefined) { - contents.UpdateVersion = parseInt( - output["UpdateVersion"]["#text"] !== undefined - ? output["UpdateVersion"]["#text"] - : output["UpdateVersion"] - ); + contents.UpdateVersion = parseInt(output["UpdateVersion"]); } return contents; }; @@ -5872,16 +5584,10 @@ const deserializeAws_queryResourceNotFoundException = ( Message: undefined }; if (output["Code"] !== undefined) { - contents.Code = - output["Code"]["#text"] !== undefined - ? output["Code"]["#text"] - : output["Code"]; + contents.Code = output["Code"]; } if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -5897,23 +5603,14 @@ const deserializeAws_queryScalingParameters = ( DesiredReplicationCount: undefined }; if (output["DesiredInstanceType"] !== undefined) { - contents.DesiredInstanceType = - output["DesiredInstanceType"]["#text"] !== undefined - ? output["DesiredInstanceType"]["#text"] - : output["DesiredInstanceType"]; + contents.DesiredInstanceType = output["DesiredInstanceType"]; } if (output["DesiredPartitionCount"] !== undefined) { - contents.DesiredPartitionCount = parseInt( - output["DesiredPartitionCount"]["#text"] !== undefined - ? output["DesiredPartitionCount"]["#text"] - : output["DesiredPartitionCount"] - ); + contents.DesiredPartitionCount = parseInt(output["DesiredPartitionCount"]); } if (output["DesiredReplicationCount"] !== undefined) { contents.DesiredReplicationCount = parseInt( - output["DesiredReplicationCount"]["#text"] !== undefined - ? output["DesiredReplicationCount"]["#text"] - : output["DesiredReplicationCount"] + output["DesiredReplicationCount"] ); } return contents; @@ -5952,10 +5649,7 @@ const deserializeAws_queryServiceEndpoint = ( Endpoint: undefined }; if (output["Endpoint"] !== undefined) { - contents.Endpoint = - output["Endpoint"]["#text"] !== undefined - ? output["Endpoint"]["#text"] - : output["Endpoint"]; + contents.Endpoint = output["Endpoint"]; } return contents; }; @@ -5976,10 +5670,7 @@ const deserializeAws_querySuggester = ( ); } if (output["SuggesterName"] !== undefined) { - contents.SuggesterName = - output["SuggesterName"]["#text"] !== undefined - ? output["SuggesterName"]["#text"] - : output["SuggesterName"]; + contents.SuggesterName = output["SuggesterName"]; } return contents; }; @@ -6030,34 +5721,19 @@ const deserializeAws_queryTextArrayOptions = ( SourceFields: undefined }; if (output["AnalysisScheme"] !== undefined) { - contents.AnalysisScheme = - output["AnalysisScheme"]["#text"] !== undefined - ? output["AnalysisScheme"]["#text"] - : output["AnalysisScheme"]; + contents.AnalysisScheme = output["AnalysisScheme"]; } if (output["DefaultValue"] !== undefined) { - contents.DefaultValue = - output["DefaultValue"]["#text"] !== undefined - ? output["DefaultValue"]["#text"] - : output["DefaultValue"]; + contents.DefaultValue = output["DefaultValue"]; } if (output["HighlightEnabled"] !== undefined) { - contents.HighlightEnabled = - (output["HighlightEnabled"]["#text"] !== undefined - ? output["HighlightEnabled"]["#text"] - : output["HighlightEnabled"]) == "true"; + contents.HighlightEnabled = output["HighlightEnabled"] == "true"; } if (output["ReturnEnabled"] !== undefined) { - contents.ReturnEnabled = - (output["ReturnEnabled"]["#text"] !== undefined - ? output["ReturnEnabled"]["#text"] - : output["ReturnEnabled"]) == "true"; + contents.ReturnEnabled = output["ReturnEnabled"] == "true"; } if (output["SourceFields"] !== undefined) { - contents.SourceFields = - output["SourceFields"]["#text"] !== undefined - ? output["SourceFields"]["#text"] - : output["SourceFields"]; + contents.SourceFields = output["SourceFields"]; } return contents; }; @@ -6076,40 +5752,22 @@ const deserializeAws_queryTextOptions = ( SourceField: undefined }; if (output["AnalysisScheme"] !== undefined) { - contents.AnalysisScheme = - output["AnalysisScheme"]["#text"] !== undefined - ? output["AnalysisScheme"]["#text"] - : output["AnalysisScheme"]; + contents.AnalysisScheme = output["AnalysisScheme"]; } if (output["DefaultValue"] !== undefined) { - contents.DefaultValue = - output["DefaultValue"]["#text"] !== undefined - ? output["DefaultValue"]["#text"] - : output["DefaultValue"]; + contents.DefaultValue = output["DefaultValue"]; } if (output["HighlightEnabled"] !== undefined) { - contents.HighlightEnabled = - (output["HighlightEnabled"]["#text"] !== undefined - ? output["HighlightEnabled"]["#text"] - : output["HighlightEnabled"]) == "true"; + contents.HighlightEnabled = output["HighlightEnabled"] == "true"; } if (output["ReturnEnabled"] !== undefined) { - contents.ReturnEnabled = - (output["ReturnEnabled"]["#text"] !== undefined - ? output["ReturnEnabled"]["#text"] - : output["ReturnEnabled"]) == "true"; + contents.ReturnEnabled = output["ReturnEnabled"] == "true"; } if (output["SortEnabled"] !== undefined) { - contents.SortEnabled = - (output["SortEnabled"]["#text"] !== undefined - ? output["SortEnabled"]["#text"] - : output["SortEnabled"]) == "true"; + contents.SortEnabled = output["SortEnabled"] == "true"; } if (output["SourceField"] !== undefined) { - contents.SourceField = - output["SourceField"]["#text"] !== undefined - ? output["SourceField"]["#text"] - : output["SourceField"]; + contents.SourceField = output["SourceField"]; } return contents; }; @@ -6192,16 +5850,10 @@ const deserializeAws_queryValidationException = ( Message: undefined }; if (output["Code"] !== undefined) { - contents.Code = - output["Code"]["#text"] !== undefined - ? output["Code"]["#text"] - : output["Code"]; + contents.Code = output["Code"]; } if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -6281,7 +5933,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/clients/client-cloudwatch/protocols/Aws_query.ts b/clients/client-cloudwatch/protocols/Aws_query.ts index b8df7f901bd0..67134047bc80 100644 --- a/clients/client-cloudwatch/protocols/Aws_query.ts +++ b/clients/client-cloudwatch/protocols/Aws_query.ts @@ -212,7 +212,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -4298,10 +4299,7 @@ const deserializeAws_queryInvalidParameterCombinationException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -4315,10 +4313,7 @@ const deserializeAws_queryInvalidParameterValueException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -4332,10 +4327,7 @@ const deserializeAws_queryMissingRequiredParameterException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -4353,28 +4345,16 @@ const deserializeAws_queryAlarmHistoryItem = ( Timestamp: undefined }; if (output["AlarmName"] !== undefined) { - contents.AlarmName = - output["AlarmName"]["#text"] !== undefined - ? output["AlarmName"]["#text"] - : output["AlarmName"]; + contents.AlarmName = output["AlarmName"]; } if (output["HistoryData"] !== undefined) { - contents.HistoryData = - output["HistoryData"]["#text"] !== undefined - ? output["HistoryData"]["#text"] - : output["HistoryData"]; + contents.HistoryData = output["HistoryData"]; } if (output["HistoryItemType"] !== undefined) { - contents.HistoryItemType = - output["HistoryItemType"]["#text"] !== undefined - ? output["HistoryItemType"]["#text"] - : output["HistoryItemType"]; + contents.HistoryItemType = output["HistoryItemType"]; } if (output["HistorySummary"] !== undefined) { - contents.HistorySummary = - output["HistorySummary"]["#text"] !== undefined - ? output["HistorySummary"]["#text"] - : output["HistorySummary"]; + contents.HistorySummary = output["HistorySummary"]; } if (output["Timestamp"] !== undefined) { contents.Timestamp = new Date(output["Timestamp"]); @@ -4423,28 +4403,16 @@ const deserializeAws_queryAnomalyDetector = ( ); } if (output["MetricName"] !== undefined) { - contents.MetricName = - output["MetricName"]["#text"] !== undefined - ? output["MetricName"]["#text"] - : output["MetricName"]; + contents.MetricName = output["MetricName"]; } if (output["Namespace"] !== undefined) { - contents.Namespace = - output["Namespace"]["#text"] !== undefined - ? output["Namespace"]["#text"] - : output["Namespace"]; + contents.Namespace = output["Namespace"]; } if (output["Stat"] !== undefined) { - contents.Stat = - output["Stat"]["#text"] !== undefined - ? output["Stat"]["#text"] - : output["Stat"]; + contents.Stat = output["Stat"]; } if (output["StateValue"] !== undefined) { - contents.StateValue = - output["StateValue"]["#text"] !== undefined - ? output["StateValue"]["#text"] - : output["StateValue"]; + contents.StateValue = output["StateValue"]; } return contents; }; @@ -4471,10 +4439,7 @@ const deserializeAws_queryAnomalyDetectorConfiguration = ( ); } if (output["MetricTimezone"] !== undefined) { - contents.MetricTimezone = - output["MetricTimezone"]["#text"] !== undefined - ? output["MetricTimezone"]["#text"] - : output["MetricTimezone"]; + contents.MetricTimezone = output["MetricTimezone"]; } return contents; }; @@ -4515,10 +4480,7 @@ const deserializeAws_queryConcurrentModificationException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -4544,26 +4506,16 @@ const deserializeAws_queryDashboardEntry = ( Size: undefined }; if (output["DashboardArn"] !== undefined) { - contents.DashboardArn = - output["DashboardArn"]["#text"] !== undefined - ? output["DashboardArn"]["#text"] - : output["DashboardArn"]; + contents.DashboardArn = output["DashboardArn"]; } if (output["DashboardName"] !== undefined) { - contents.DashboardName = - output["DashboardName"]["#text"] !== undefined - ? output["DashboardName"]["#text"] - : output["DashboardName"]; + contents.DashboardName = output["DashboardName"]; } if (output["LastModified"] !== undefined) { contents.LastModified = new Date(output["LastModified"]); } if (output["Size"] !== undefined) { - contents.Size = parseInt( - output["Size"]["#text"] !== undefined - ? output["Size"]["#text"] - : output["Size"] - ); + contents.Size = parseInt(output["Size"]); } return contents; }; @@ -4590,10 +4542,7 @@ const deserializeAws_queryDashboardInvalidInputError = ( ); } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -4607,10 +4556,7 @@ const deserializeAws_queryDashboardNotFoundError = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -4625,16 +4571,10 @@ const deserializeAws_queryDashboardValidationMessage = ( Message: undefined }; if (output["DataPath"] !== undefined) { - contents.DataPath = - output["DataPath"]["#text"] !== undefined - ? output["DataPath"]["#text"] - : output["DataPath"]; + contents.DataPath = output["DataPath"]; } if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -4664,11 +4604,7 @@ const deserializeAws_queryDatapoint = ( Unit: undefined }; if (output["Average"] !== undefined) { - contents.Average = parseFloat( - output["Average"]["#text"] !== undefined - ? output["Average"]["#text"] - : output["Average"] - ); + contents.Average = parseFloat(output["Average"]); } if (output.ExtendedStatistics === "") { contents.ExtendedStatistics = {}; @@ -4683,41 +4619,22 @@ const deserializeAws_queryDatapoint = ( ); } if (output["Maximum"] !== undefined) { - contents.Maximum = parseFloat( - output["Maximum"]["#text"] !== undefined - ? output["Maximum"]["#text"] - : output["Maximum"] - ); + contents.Maximum = parseFloat(output["Maximum"]); } if (output["Minimum"] !== undefined) { - contents.Minimum = parseFloat( - output["Minimum"]["#text"] !== undefined - ? output["Minimum"]["#text"] - : output["Minimum"] - ); + contents.Minimum = parseFloat(output["Minimum"]); } if (output["SampleCount"] !== undefined) { - contents.SampleCount = parseFloat( - output["SampleCount"]["#text"] !== undefined - ? output["SampleCount"]["#text"] - : output["SampleCount"] - ); + contents.SampleCount = parseFloat(output["SampleCount"]); } if (output["Sum"] !== undefined) { - contents.Sum = parseFloat( - output["Sum"]["#text"] !== undefined - ? output["Sum"]["#text"] - : output["Sum"] - ); + contents.Sum = parseFloat(output["Sum"]); } if (output["Timestamp"] !== undefined) { contents.Timestamp = new Date(output["Timestamp"]); } if (output["Unit"] !== undefined) { - contents.Unit = - output["Unit"]["#text"] !== undefined - ? output["Unit"]["#text"] - : output["Unit"]; + contents.Unit = output["Unit"]; } return contents; }; @@ -4727,11 +4644,7 @@ const deserializeAws_queryDatapointValueMap = ( context: __SerdeContext ): { [key: string]: number } => { return output.reduce((acc: any, pair: any) => { - acc[pair["key"]] = parseFloat( - pair["value"]["#text"] !== undefined - ? pair["value"]["#text"] - : pair["value"] - ); + acc[pair["key"]] = parseFloat(pair["value"]); return acc; }, {}); }; @@ -4740,9 +4653,7 @@ const deserializeAws_queryDatapointValues = ( output: any, context: __SerdeContext ): number[] => { - return (output || []).map((entry: any) => - parseFloat(entry["#text"] !== undefined ? entry["#text"] : entry) - ); + return (output || []).map((entry: any) => parseFloat(entry)); }; const deserializeAws_queryDatapoints = ( @@ -4819,10 +4730,7 @@ const deserializeAws_queryDescribeAlarmHistoryOutput = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -4872,10 +4780,7 @@ const deserializeAws_queryDescribeAlarmsOutput = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -4902,10 +4807,7 @@ const deserializeAws_queryDescribeAnomalyDetectorsOutput = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -4932,10 +4834,7 @@ const deserializeAws_queryDescribeInsightRulesOutput = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -4950,16 +4849,10 @@ const deserializeAws_queryDimension = ( Value: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -5030,22 +4923,13 @@ const deserializeAws_queryGetDashboardOutput = ( DashboardName: undefined }; if (output["DashboardArn"] !== undefined) { - contents.DashboardArn = - output["DashboardArn"]["#text"] !== undefined - ? output["DashboardArn"]["#text"] - : output["DashboardArn"]; + contents.DashboardArn = output["DashboardArn"]; } if (output["DashboardBody"] !== undefined) { - contents.DashboardBody = - output["DashboardBody"]["#text"] !== undefined - ? output["DashboardBody"]["#text"] - : output["DashboardBody"]; + contents.DashboardBody = output["DashboardBody"]; } if (output["DashboardName"] !== undefined) { - contents.DashboardName = - output["DashboardName"]["#text"] !== undefined - ? output["DashboardName"]["#text"] - : output["DashboardName"]; + contents.DashboardName = output["DashboardName"]; } return contents; }; @@ -5064,23 +4948,14 @@ const deserializeAws_queryGetInsightRuleReportOutput = ( MetricDatapoints: undefined }; if (output["AggregateValue"] !== undefined) { - contents.AggregateValue = parseFloat( - output["AggregateValue"]["#text"] !== undefined - ? output["AggregateValue"]["#text"] - : output["AggregateValue"] - ); + contents.AggregateValue = parseFloat(output["AggregateValue"]); } if (output["AggregationStatistic"] !== undefined) { - contents.AggregationStatistic = - output["AggregationStatistic"]["#text"] !== undefined - ? output["AggregationStatistic"]["#text"] - : output["AggregationStatistic"]; + contents.AggregationStatistic = output["AggregationStatistic"]; } if (output["ApproximateUniqueCount"] !== undefined) { contents.ApproximateUniqueCount = parseInt( - output["ApproximateUniqueCount"]["#text"] !== undefined - ? output["ApproximateUniqueCount"]["#text"] - : output["ApproximateUniqueCount"] + output["ApproximateUniqueCount"] ); } if (output.Contributors === "") { @@ -5157,10 +5032,7 @@ const deserializeAws_queryGetMetricDataOutput = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -5187,10 +5059,7 @@ const deserializeAws_queryGetMetricStatisticsOutput = ( ); } if (output["Label"] !== undefined) { - contents.Label = - output["Label"]["#text"] !== undefined - ? output["Label"]["#text"] - : output["Label"]; + contents.Label = output["Label"]; } return contents; }; @@ -5205,9 +5074,7 @@ const deserializeAws_queryGetMetricWidgetImageOutput = ( }; if (output["MetricWidgetImage"] !== undefined) { contents.MetricWidgetImage = context.base64Decoder( - output["MetricWidgetImage"]["#text"] !== undefined - ? output["MetricWidgetImage"]["#text"] - : output["MetricWidgetImage"] + output["MetricWidgetImage"] ); } return contents; @@ -5225,28 +5092,16 @@ const deserializeAws_queryInsightRule = ( State: undefined }; if (output["Definition"] !== undefined) { - contents.Definition = - output["Definition"]["#text"] !== undefined - ? output["Definition"]["#text"] - : output["Definition"]; + contents.Definition = output["Definition"]; } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["Schema"] !== undefined) { - contents.Schema = - output["Schema"]["#text"] !== undefined - ? output["Schema"]["#text"] - : output["Schema"]; + contents.Schema = output["Schema"]; } if (output["State"] !== undefined) { - contents.State = - output["State"]["#text"] !== undefined - ? output["State"]["#text"] - : output["State"]; + contents.State = output["State"]; } return contents; }; @@ -5263,9 +5118,7 @@ const deserializeAws_queryInsightRuleContributor = ( }; if (output["ApproximateAggregateValue"] !== undefined) { contents.ApproximateAggregateValue = parseFloat( - output["ApproximateAggregateValue"]["#text"] !== undefined - ? output["ApproximateAggregateValue"]["#text"] - : output["ApproximateAggregateValue"] + output["ApproximateAggregateValue"] ); } if (output.Datapoints === "") { @@ -5302,11 +5155,7 @@ const deserializeAws_queryInsightRuleContributorDatapoint = ( Timestamp: undefined }; if (output["ApproximateValue"] !== undefined) { - contents.ApproximateValue = parseFloat( - output["ApproximateValue"]["#text"] !== undefined - ? output["ApproximateValue"]["#text"] - : output["ApproximateValue"] - ); + contents.ApproximateValue = parseFloat(output["ApproximateValue"]); } if (output["Timestamp"] !== undefined) { contents.Timestamp = new Date(output["Timestamp"]); @@ -5327,18 +5176,14 @@ const deserializeAws_queryInsightRuleContributorKeyLabels = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryInsightRuleContributorKeys = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryInsightRuleContributors = ( @@ -5366,56 +5211,28 @@ const deserializeAws_queryInsightRuleMetricDatapoint = ( UniqueContributors: undefined }; if (output["Average"] !== undefined) { - contents.Average = parseFloat( - output["Average"]["#text"] !== undefined - ? output["Average"]["#text"] - : output["Average"] - ); + contents.Average = parseFloat(output["Average"]); } if (output["MaxContributorValue"] !== undefined) { - contents.MaxContributorValue = parseFloat( - output["MaxContributorValue"]["#text"] !== undefined - ? output["MaxContributorValue"]["#text"] - : output["MaxContributorValue"] - ); + contents.MaxContributorValue = parseFloat(output["MaxContributorValue"]); } if (output["Maximum"] !== undefined) { - contents.Maximum = parseFloat( - output["Maximum"]["#text"] !== undefined - ? output["Maximum"]["#text"] - : output["Maximum"] - ); + contents.Maximum = parseFloat(output["Maximum"]); } if (output["Minimum"] !== undefined) { - contents.Minimum = parseFloat( - output["Minimum"]["#text"] !== undefined - ? output["Minimum"]["#text"] - : output["Minimum"] - ); + contents.Minimum = parseFloat(output["Minimum"]); } if (output["SampleCount"] !== undefined) { - contents.SampleCount = parseFloat( - output["SampleCount"]["#text"] !== undefined - ? output["SampleCount"]["#text"] - : output["SampleCount"] - ); + contents.SampleCount = parseFloat(output["SampleCount"]); } if (output["Sum"] !== undefined) { - contents.Sum = parseFloat( - output["Sum"]["#text"] !== undefined - ? output["Sum"]["#text"] - : output["Sum"] - ); + contents.Sum = parseFloat(output["Sum"]); } if (output["Timestamp"] !== undefined) { contents.Timestamp = new Date(output["Timestamp"]); } if (output["UniqueContributors"] !== undefined) { - contents.UniqueContributors = parseFloat( - output["UniqueContributors"]["#text"] !== undefined - ? output["UniqueContributors"]["#text"] - : output["UniqueContributors"] - ); + contents.UniqueContributors = parseFloat(output["UniqueContributors"]); } return contents; }; @@ -5447,10 +5264,7 @@ const deserializeAws_queryInternalServiceFault = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -5464,10 +5278,7 @@ const deserializeAws_queryInvalidFormatFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -5481,10 +5292,7 @@ const deserializeAws_queryInvalidNextToken = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -5498,10 +5306,7 @@ const deserializeAws_queryLimitExceededException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -5515,10 +5320,7 @@ const deserializeAws_queryLimitExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -5545,10 +5347,7 @@ const deserializeAws_queryListDashboardsOutput = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -5575,10 +5374,7 @@ const deserializeAws_queryListMetricsOutput = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -5613,16 +5409,10 @@ const deserializeAws_queryMessageData = ( Value: undefined }; if (output["Code"] !== undefined) { - contents.Code = - output["Code"]["#text"] !== undefined - ? output["Code"]["#text"] - : output["Code"]; + contents.Code = output["Code"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -5650,16 +5440,10 @@ const deserializeAws_queryMetric = ( ); } if (output["MetricName"] !== undefined) { - contents.MetricName = - output["MetricName"]["#text"] !== undefined - ? output["MetricName"]["#text"] - : output["MetricName"]; + contents.MetricName = output["MetricName"]; } if (output["Namespace"] !== undefined) { - contents.Namespace = - output["Namespace"]["#text"] !== undefined - ? output["Namespace"]["#text"] - : output["Namespace"]; + contents.Namespace = output["Namespace"]; } return contents; }; @@ -5699,10 +5483,7 @@ const deserializeAws_queryMetricAlarm = ( Unit: undefined }; if (output["ActionsEnabled"] !== undefined) { - contents.ActionsEnabled = - (output["ActionsEnabled"]["#text"] !== undefined - ? output["ActionsEnabled"]["#text"] - : output["ActionsEnabled"]) == "true"; + contents.ActionsEnabled = output["ActionsEnabled"] == "true"; } if (output.AlarmActions === "") { contents.AlarmActions = []; @@ -5717,10 +5498,7 @@ const deserializeAws_queryMetricAlarm = ( ); } if (output["AlarmArn"] !== undefined) { - contents.AlarmArn = - output["AlarmArn"]["#text"] !== undefined - ? output["AlarmArn"]["#text"] - : output["AlarmArn"]; + contents.AlarmArn = output["AlarmArn"]; } if (output["AlarmConfigurationUpdatedTimestamp"] !== undefined) { contents.AlarmConfigurationUpdatedTimestamp = new Date( @@ -5728,29 +5506,16 @@ const deserializeAws_queryMetricAlarm = ( ); } if (output["AlarmDescription"] !== undefined) { - contents.AlarmDescription = - output["AlarmDescription"]["#text"] !== undefined - ? output["AlarmDescription"]["#text"] - : output["AlarmDescription"]; + contents.AlarmDescription = output["AlarmDescription"]; } if (output["AlarmName"] !== undefined) { - contents.AlarmName = - output["AlarmName"]["#text"] !== undefined - ? output["AlarmName"]["#text"] - : output["AlarmName"]; + contents.AlarmName = output["AlarmName"]; } if (output["ComparisonOperator"] !== undefined) { - contents.ComparisonOperator = - output["ComparisonOperator"]["#text"] !== undefined - ? output["ComparisonOperator"]["#text"] - : output["ComparisonOperator"]; + contents.ComparisonOperator = output["ComparisonOperator"]; } if (output["DatapointsToAlarm"] !== undefined) { - contents.DatapointsToAlarm = parseInt( - output["DatapointsToAlarm"]["#text"] !== undefined - ? output["DatapointsToAlarm"]["#text"] - : output["DatapointsToAlarm"] - ); + contents.DatapointsToAlarm = parseInt(output["DatapointsToAlarm"]); } if (output.Dimensions === "") { contents.Dimensions = []; @@ -5766,22 +5531,13 @@ const deserializeAws_queryMetricAlarm = ( } if (output["EvaluateLowSampleCountPercentile"] !== undefined) { contents.EvaluateLowSampleCountPercentile = - output["EvaluateLowSampleCountPercentile"]["#text"] !== undefined - ? output["EvaluateLowSampleCountPercentile"]["#text"] - : output["EvaluateLowSampleCountPercentile"]; + output["EvaluateLowSampleCountPercentile"]; } if (output["EvaluationPeriods"] !== undefined) { - contents.EvaluationPeriods = parseInt( - output["EvaluationPeriods"]["#text"] !== undefined - ? output["EvaluationPeriods"]["#text"] - : output["EvaluationPeriods"] - ); + contents.EvaluationPeriods = parseInt(output["EvaluationPeriods"]); } if (output["ExtendedStatistic"] !== undefined) { - contents.ExtendedStatistic = - output["ExtendedStatistic"]["#text"] !== undefined - ? output["ExtendedStatistic"]["#text"] - : output["ExtendedStatistic"]; + contents.ExtendedStatistic = output["ExtendedStatistic"]; } if (output.InsufficientDataActions === "") { contents.InsufficientDataActions = []; @@ -5796,10 +5552,7 @@ const deserializeAws_queryMetricAlarm = ( ); } if (output["MetricName"] !== undefined) { - contents.MetricName = - output["MetricName"]["#text"] !== undefined - ? output["MetricName"]["#text"] - : output["MetricName"]; + contents.MetricName = output["MetricName"]; } if (output.Metrics === "") { contents.Metrics = []; @@ -5814,10 +5567,7 @@ const deserializeAws_queryMetricAlarm = ( ); } if (output["Namespace"] !== undefined) { - contents.Namespace = - output["Namespace"]["#text"] !== undefined - ? output["Namespace"]["#text"] - : output["Namespace"]; + contents.Namespace = output["Namespace"]; } if (output.OKActions === "") { contents.OKActions = []; @@ -5832,63 +5582,34 @@ const deserializeAws_queryMetricAlarm = ( ); } if (output["Period"] !== undefined) { - contents.Period = parseInt( - output["Period"]["#text"] !== undefined - ? output["Period"]["#text"] - : output["Period"] - ); + contents.Period = parseInt(output["Period"]); } if (output["StateReason"] !== undefined) { - contents.StateReason = - output["StateReason"]["#text"] !== undefined - ? output["StateReason"]["#text"] - : output["StateReason"]; + contents.StateReason = output["StateReason"]; } if (output["StateReasonData"] !== undefined) { - contents.StateReasonData = - output["StateReasonData"]["#text"] !== undefined - ? output["StateReasonData"]["#text"] - : output["StateReasonData"]; + contents.StateReasonData = output["StateReasonData"]; } if (output["StateUpdatedTimestamp"] !== undefined) { contents.StateUpdatedTimestamp = new Date(output["StateUpdatedTimestamp"]); } if (output["StateValue"] !== undefined) { - contents.StateValue = - output["StateValue"]["#text"] !== undefined - ? output["StateValue"]["#text"] - : output["StateValue"]; + contents.StateValue = output["StateValue"]; } if (output["Statistic"] !== undefined) { - contents.Statistic = - output["Statistic"]["#text"] !== undefined - ? output["Statistic"]["#text"] - : output["Statistic"]; + contents.Statistic = output["Statistic"]; } if (output["Threshold"] !== undefined) { - contents.Threshold = parseFloat( - output["Threshold"]["#text"] !== undefined - ? output["Threshold"]["#text"] - : output["Threshold"] - ); + contents.Threshold = parseFloat(output["Threshold"]); } if (output["ThresholdMetricId"] !== undefined) { - contents.ThresholdMetricId = - output["ThresholdMetricId"]["#text"] !== undefined - ? output["ThresholdMetricId"]["#text"] - : output["ThresholdMetricId"]; + contents.ThresholdMetricId = output["ThresholdMetricId"]; } if (output["TreatMissingData"] !== undefined) { - contents.TreatMissingData = - output["TreatMissingData"]["#text"] !== undefined - ? output["TreatMissingData"]["#text"] - : output["TreatMissingData"]; + contents.TreatMissingData = output["TreatMissingData"]; } if (output["Unit"] !== undefined) { - contents.Unit = - output["Unit"]["#text"] !== undefined - ? output["Unit"]["#text"] - : output["Unit"]; + contents.Unit = output["Unit"]; } return contents; }; @@ -5925,22 +5646,13 @@ const deserializeAws_queryMetricDataQuery = ( ReturnData: undefined }; if (output["Expression"] !== undefined) { - contents.Expression = - output["Expression"]["#text"] !== undefined - ? output["Expression"]["#text"] - : output["Expression"]; + contents.Expression = output["Expression"]; } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["Label"] !== undefined) { - contents.Label = - output["Label"]["#text"] !== undefined - ? output["Label"]["#text"] - : output["Label"]; + contents.Label = output["Label"]; } if (output["MetricStat"] !== undefined) { contents.MetricStat = deserializeAws_queryMetricStat( @@ -5949,17 +5661,10 @@ const deserializeAws_queryMetricDataQuery = ( ); } if (output["Period"] !== undefined) { - contents.Period = parseInt( - output["Period"]["#text"] !== undefined - ? output["Period"]["#text"] - : output["Period"] - ); + contents.Period = parseInt(output["Period"]); } if (output["ReturnData"] !== undefined) { - contents.ReturnData = - (output["ReturnData"]["#text"] !== undefined - ? output["ReturnData"]["#text"] - : output["ReturnData"]) == "true"; + contents.ReturnData = output["ReturnData"] == "true"; } return contents; }; @@ -5978,16 +5683,10 @@ const deserializeAws_queryMetricDataResult = ( Values: undefined }; if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["Label"] !== undefined) { - contents.Label = - output["Label"]["#text"] !== undefined - ? output["Label"]["#text"] - : output["Label"]; + contents.Label = output["Label"]; } if (output.Messages === "") { contents.Messages = []; @@ -6002,10 +5701,7 @@ const deserializeAws_queryMetricDataResult = ( ); } if (output["StatusCode"] !== undefined) { - contents.StatusCode = - output["StatusCode"]["#text"] !== undefined - ? output["StatusCode"]["#text"] - : output["StatusCode"]; + contents.StatusCode = output["StatusCode"]; } if (output.Timestamps === "") { contents.Timestamps = []; @@ -6067,23 +5763,13 @@ const deserializeAws_queryMetricStat = ( contents.Metric = deserializeAws_queryMetric(output["Metric"], context); } if (output["Period"] !== undefined) { - contents.Period = parseInt( - output["Period"]["#text"] !== undefined - ? output["Period"]["#text"] - : output["Period"] - ); + contents.Period = parseInt(output["Period"]); } if (output["Stat"] !== undefined) { - contents.Stat = - output["Stat"]["#text"] !== undefined - ? output["Stat"]["#text"] - : output["Stat"]; + contents.Stat = output["Stat"]; } if (output["Unit"] !== undefined) { - contents.Unit = - output["Unit"]["#text"] !== undefined - ? output["Unit"]["#text"] - : output["Unit"]; + contents.Unit = output["Unit"]; } return contents; }; @@ -6109,28 +5795,16 @@ const deserializeAws_queryPartialFailure = ( FailureResource: undefined }; if (output["ExceptionType"] !== undefined) { - contents.ExceptionType = - output["ExceptionType"]["#text"] !== undefined - ? output["ExceptionType"]["#text"] - : output["ExceptionType"]; + contents.ExceptionType = output["ExceptionType"]; } if (output["FailureCode"] !== undefined) { - contents.FailureCode = - output["FailureCode"]["#text"] !== undefined - ? output["FailureCode"]["#text"] - : output["FailureCode"]; + contents.FailureCode = output["FailureCode"]; } if (output["FailureDescription"] !== undefined) { - contents.FailureDescription = - output["FailureDescription"]["#text"] !== undefined - ? output["FailureDescription"]["#text"] - : output["FailureDescription"]; + contents.FailureDescription = output["FailureDescription"]; } if (output["FailureResource"] !== undefined) { - contents.FailureResource = - output["FailureResource"]["#text"] !== undefined - ? output["FailureResource"]["#text"] - : output["FailureResource"]; + contents.FailureResource = output["FailureResource"]; } return contents; }; @@ -6200,9 +5874,7 @@ const deserializeAws_queryResourceList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryResourceNotFound = ( @@ -6214,10 +5886,7 @@ const deserializeAws_queryResourceNotFound = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -6233,22 +5902,13 @@ const deserializeAws_queryResourceNotFoundException = ( ResourceType: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } if (output["ResourceId"] !== undefined) { - contents.ResourceId = - output["ResourceId"]["#text"] !== undefined - ? output["ResourceId"]["#text"] - : output["ResourceId"]; + contents.ResourceId = output["ResourceId"]; } if (output["ResourceType"] !== undefined) { - contents.ResourceType = - output["ResourceType"]["#text"] !== undefined - ? output["ResourceType"]["#text"] - : output["ResourceType"]; + contents.ResourceType = output["ResourceType"]; } return contents; }; @@ -6260,16 +5920,10 @@ const deserializeAws_queryTag = (output: any, context: __SerdeContext): Tag => { Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -6385,7 +6039,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/clients/client-docdb/protocols/Aws_query.ts b/clients/client-docdb/protocols/Aws_query.ts index 8e91337e2fdb..d1be238fbce7 100644 --- a/clients/client-docdb/protocols/Aws_query.ts +++ b/clients/client-docdb/protocols/Aws_query.ts @@ -327,7 +327,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -7280,10 +7281,7 @@ const deserializeAws_queryAuthorizationNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7297,10 +7295,7 @@ const deserializeAws_queryCertificateNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7314,10 +7309,7 @@ const deserializeAws_queryDBClusterAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7331,10 +7323,7 @@ const deserializeAws_queryDBClusterNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7348,10 +7337,7 @@ const deserializeAws_queryDBClusterParameterGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7365,10 +7351,7 @@ const deserializeAws_queryDBClusterQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7382,10 +7365,7 @@ const deserializeAws_queryDBClusterSnapshotAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7399,10 +7379,7 @@ const deserializeAws_queryDBClusterSnapshotNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7416,10 +7393,7 @@ const deserializeAws_queryDBInstanceAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7433,10 +7407,7 @@ const deserializeAws_queryDBInstanceNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7450,10 +7421,7 @@ const deserializeAws_queryDBParameterGroupAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7467,10 +7435,7 @@ const deserializeAws_queryDBParameterGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7484,10 +7449,7 @@ const deserializeAws_queryDBParameterGroupQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7501,10 +7463,7 @@ const deserializeAws_queryDBSecurityGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7518,10 +7477,7 @@ const deserializeAws_queryDBSnapshotAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7535,10 +7491,7 @@ const deserializeAws_queryDBSnapshotNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7552,10 +7505,7 @@ const deserializeAws_queryDBSubnetGroupAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7569,10 +7519,7 @@ const deserializeAws_queryDBSubnetGroupDoesNotCoverEnoughAZs = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7586,10 +7533,7 @@ const deserializeAws_queryDBSubnetGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7603,10 +7547,7 @@ const deserializeAws_queryDBSubnetGroupQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7620,10 +7561,7 @@ const deserializeAws_queryDBSubnetQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7637,10 +7575,7 @@ const deserializeAws_queryDBUpgradeDependencyFailureFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7654,10 +7589,7 @@ const deserializeAws_queryInstanceQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7671,10 +7603,7 @@ const deserializeAws_queryInsufficientDBClusterCapacityFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7688,10 +7617,7 @@ const deserializeAws_queryInsufficientDBInstanceCapacityFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7705,10 +7631,7 @@ const deserializeAws_queryInsufficientStorageClusterCapacityFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7722,10 +7645,7 @@ const deserializeAws_queryInvalidDBClusterSnapshotStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7739,10 +7659,7 @@ const deserializeAws_queryInvalidDBClusterStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7756,10 +7673,7 @@ const deserializeAws_queryInvalidDBInstanceStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7773,10 +7687,7 @@ const deserializeAws_queryInvalidDBParameterGroupStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7790,10 +7701,7 @@ const deserializeAws_queryInvalidDBSecurityGroupStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7807,10 +7715,7 @@ const deserializeAws_queryInvalidDBSnapshotStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7824,10 +7729,7 @@ const deserializeAws_queryInvalidDBSubnetGroupStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7841,10 +7743,7 @@ const deserializeAws_queryInvalidDBSubnetStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7858,10 +7757,7 @@ const deserializeAws_queryInvalidRestoreFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7875,10 +7771,7 @@ const deserializeAws_queryInvalidSubnet = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7892,10 +7785,7 @@ const deserializeAws_queryInvalidVPCNetworkStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7909,10 +7799,7 @@ const deserializeAws_queryKMSKeyNotAccessibleFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7926,10 +7813,7 @@ const deserializeAws_queryResourceNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7943,10 +7827,7 @@ const deserializeAws_querySharedSnapshotQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7960,10 +7841,7 @@ const deserializeAws_querySnapshotQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7977,10 +7855,7 @@ const deserializeAws_queryStorageQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7994,10 +7869,7 @@ const deserializeAws_queryStorageTypeNotSupportedFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -8011,10 +7883,7 @@ const deserializeAws_querySubnetAlreadyInUse = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -8040,9 +7909,7 @@ const deserializeAws_queryAttributeValueList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryAvailabilityZone = ( @@ -8054,10 +7921,7 @@ const deserializeAws_queryAvailabilityZone = ( Name: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } return contents; }; @@ -8075,9 +7939,7 @@ const deserializeAws_queryAvailabilityZones = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryCertificate = ( @@ -8094,28 +7956,16 @@ const deserializeAws_queryCertificate = ( ValidTill: undefined }; if (output["CertificateArn"] !== undefined) { - contents.CertificateArn = - output["CertificateArn"]["#text"] !== undefined - ? output["CertificateArn"]["#text"] - : output["CertificateArn"]; + contents.CertificateArn = output["CertificateArn"]; } if (output["CertificateIdentifier"] !== undefined) { - contents.CertificateIdentifier = - output["CertificateIdentifier"]["#text"] !== undefined - ? output["CertificateIdentifier"]["#text"] - : output["CertificateIdentifier"]; + contents.CertificateIdentifier = output["CertificateIdentifier"]; } if (output["CertificateType"] !== undefined) { - contents.CertificateType = - output["CertificateType"]["#text"] !== undefined - ? output["CertificateType"]["#text"] - : output["CertificateType"]; + contents.CertificateType = output["CertificateType"]; } if (output["Thumbprint"] !== undefined) { - contents.Thumbprint = - output["Thumbprint"]["#text"] !== undefined - ? output["Thumbprint"]["#text"] - : output["Thumbprint"]; + contents.Thumbprint = output["Thumbprint"]; } if (output["ValidFrom"] !== undefined) { contents.ValidFrom = new Date(output["ValidFrom"]); @@ -8157,10 +8007,7 @@ const deserializeAws_queryCertificateMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -8345,26 +8192,16 @@ const deserializeAws_queryDBCluster = ( ); } if (output["BackupRetentionPeriod"] !== undefined) { - contents.BackupRetentionPeriod = parseInt( - output["BackupRetentionPeriod"]["#text"] !== undefined - ? output["BackupRetentionPeriod"]["#text"] - : output["BackupRetentionPeriod"] - ); + contents.BackupRetentionPeriod = parseInt(output["BackupRetentionPeriod"]); } if (output["ClusterCreateTime"] !== undefined) { contents.ClusterCreateTime = new Date(output["ClusterCreateTime"]); } if (output["DBClusterArn"] !== undefined) { - contents.DBClusterArn = - output["DBClusterArn"]["#text"] !== undefined - ? output["DBClusterArn"]["#text"] - : output["DBClusterArn"]; + contents.DBClusterArn = output["DBClusterArn"]; } if (output["DBClusterIdentifier"] !== undefined) { - contents.DBClusterIdentifier = - output["DBClusterIdentifier"]["#text"] !== undefined - ? output["DBClusterIdentifier"]["#text"] - : output["DBClusterIdentifier"]; + contents.DBClusterIdentifier = output["DBClusterIdentifier"]; } if (output.DBClusterMembers === "") { contents.DBClusterMembers = []; @@ -8379,28 +8216,16 @@ const deserializeAws_queryDBCluster = ( ); } if (output["DBClusterParameterGroup"] !== undefined) { - contents.DBClusterParameterGroup = - output["DBClusterParameterGroup"]["#text"] !== undefined - ? output["DBClusterParameterGroup"]["#text"] - : output["DBClusterParameterGroup"]; + contents.DBClusterParameterGroup = output["DBClusterParameterGroup"]; } if (output["DBSubnetGroup"] !== undefined) { - contents.DBSubnetGroup = - output["DBSubnetGroup"]["#text"] !== undefined - ? output["DBSubnetGroup"]["#text"] - : output["DBSubnetGroup"]; + contents.DBSubnetGroup = output["DBSubnetGroup"]; } if (output["DbClusterResourceId"] !== undefined) { - contents.DbClusterResourceId = - output["DbClusterResourceId"]["#text"] !== undefined - ? output["DbClusterResourceId"]["#text"] - : output["DbClusterResourceId"]; + contents.DbClusterResourceId = output["DbClusterResourceId"]; } if (output["DeletionProtection"] !== undefined) { - contents.DeletionProtection = - (output["DeletionProtection"]["#text"] !== undefined - ? output["DeletionProtection"]["#text"] - : output["DeletionProtection"]) == "true"; + contents.DeletionProtection = output["DeletionProtection"] == "true"; } if (output["EarliestRestorableTime"] !== undefined) { contents.EarliestRestorableTime = new Date( @@ -8420,92 +8245,49 @@ const deserializeAws_queryDBCluster = ( ); } if (output["Endpoint"] !== undefined) { - contents.Endpoint = - output["Endpoint"]["#text"] !== undefined - ? output["Endpoint"]["#text"] - : output["Endpoint"]; + contents.Endpoint = output["Endpoint"]; } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["HostedZoneId"] !== undefined) { - contents.HostedZoneId = - output["HostedZoneId"]["#text"] !== undefined - ? output["HostedZoneId"]["#text"] - : output["HostedZoneId"]; + contents.HostedZoneId = output["HostedZoneId"]; } if (output["KmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["KmsKeyId"]["#text"] !== undefined - ? output["KmsKeyId"]["#text"] - : output["KmsKeyId"]; + contents.KmsKeyId = output["KmsKeyId"]; } if (output["LatestRestorableTime"] !== undefined) { contents.LatestRestorableTime = new Date(output["LatestRestorableTime"]); } if (output["MasterUsername"] !== undefined) { - contents.MasterUsername = - output["MasterUsername"]["#text"] !== undefined - ? output["MasterUsername"]["#text"] - : output["MasterUsername"]; + contents.MasterUsername = output["MasterUsername"]; } if (output["MultiAZ"] !== undefined) { - contents.MultiAZ = - (output["MultiAZ"]["#text"] !== undefined - ? output["MultiAZ"]["#text"] - : output["MultiAZ"]) == "true"; + contents.MultiAZ = output["MultiAZ"] == "true"; } if (output["PercentProgress"] !== undefined) { - contents.PercentProgress = - output["PercentProgress"]["#text"] !== undefined - ? output["PercentProgress"]["#text"] - : output["PercentProgress"]; + contents.PercentProgress = output["PercentProgress"]; } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } if (output["PreferredBackupWindow"] !== undefined) { - contents.PreferredBackupWindow = - output["PreferredBackupWindow"]["#text"] !== undefined - ? output["PreferredBackupWindow"]["#text"] - : output["PreferredBackupWindow"]; + contents.PreferredBackupWindow = output["PreferredBackupWindow"]; } if (output["PreferredMaintenanceWindow"] !== undefined) { - contents.PreferredMaintenanceWindow = - output["PreferredMaintenanceWindow"]["#text"] !== undefined - ? output["PreferredMaintenanceWindow"]["#text"] - : output["PreferredMaintenanceWindow"]; + contents.PreferredMaintenanceWindow = output["PreferredMaintenanceWindow"]; } if (output["ReaderEndpoint"] !== undefined) { - contents.ReaderEndpoint = - output["ReaderEndpoint"]["#text"] !== undefined - ? output["ReaderEndpoint"]["#text"] - : output["ReaderEndpoint"]; + contents.ReaderEndpoint = output["ReaderEndpoint"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["StorageEncrypted"] !== undefined) { - contents.StorageEncrypted = - (output["StorageEncrypted"]["#text"] !== undefined - ? output["StorageEncrypted"]["#text"] - : output["StorageEncrypted"]) == "true"; + contents.StorageEncrypted = output["StorageEncrypted"] == "true"; } if (output.VpcSecurityGroups === "") { contents.VpcSecurityGroups = []; @@ -8546,28 +8328,16 @@ const deserializeAws_queryDBClusterMember = ( }; if (output["DBClusterParameterGroupStatus"] !== undefined) { contents.DBClusterParameterGroupStatus = - output["DBClusterParameterGroupStatus"]["#text"] !== undefined - ? output["DBClusterParameterGroupStatus"]["#text"] - : output["DBClusterParameterGroupStatus"]; + output["DBClusterParameterGroupStatus"]; } if (output["DBInstanceIdentifier"] !== undefined) { - contents.DBInstanceIdentifier = - output["DBInstanceIdentifier"]["#text"] !== undefined - ? output["DBInstanceIdentifier"]["#text"] - : output["DBInstanceIdentifier"]; + contents.DBInstanceIdentifier = output["DBInstanceIdentifier"]; } if (output["IsClusterWriter"] !== undefined) { - contents.IsClusterWriter = - (output["IsClusterWriter"]["#text"] !== undefined - ? output["IsClusterWriter"]["#text"] - : output["IsClusterWriter"]) == "true"; + contents.IsClusterWriter = output["IsClusterWriter"] == "true"; } if (output["PromotionTier"] !== undefined) { - contents.PromotionTier = parseInt( - output["PromotionTier"]["#text"] !== undefined - ? output["PromotionTier"]["#text"] - : output["PromotionTier"] - ); + contents.PromotionTier = parseInt(output["PromotionTier"]); } return contents; }; @@ -8603,10 +8373,7 @@ const deserializeAws_queryDBClusterMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -8623,28 +8390,17 @@ const deserializeAws_queryDBClusterParameterGroup = ( Description: undefined }; if (output["DBClusterParameterGroupArn"] !== undefined) { - contents.DBClusterParameterGroupArn = - output["DBClusterParameterGroupArn"]["#text"] !== undefined - ? output["DBClusterParameterGroupArn"]["#text"] - : output["DBClusterParameterGroupArn"]; + contents.DBClusterParameterGroupArn = output["DBClusterParameterGroupArn"]; } if (output["DBClusterParameterGroupName"] !== undefined) { contents.DBClusterParameterGroupName = - output["DBClusterParameterGroupName"]["#text"] !== undefined - ? output["DBClusterParameterGroupName"]["#text"] - : output["DBClusterParameterGroupName"]; + output["DBClusterParameterGroupName"]; } if (output["DBParameterGroupFamily"] !== undefined) { - contents.DBParameterGroupFamily = - output["DBParameterGroupFamily"]["#text"] !== undefined - ? output["DBParameterGroupFamily"]["#text"] - : output["DBParameterGroupFamily"]; + contents.DBParameterGroupFamily = output["DBParameterGroupFamily"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } return contents; }; @@ -8659,10 +8415,7 @@ const deserializeAws_queryDBClusterParameterGroupDetails = ( Parameters: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Parameters === "") { contents.Parameters = []; @@ -8698,9 +8451,7 @@ const deserializeAws_queryDBClusterParameterGroupNameMessage = ( }; if (output["DBClusterParameterGroupName"] !== undefined) { contents.DBClusterParameterGroupName = - output["DBClusterParameterGroupName"]["#text"] !== undefined - ? output["DBClusterParameterGroupName"]["#text"] - : output["DBClusterParameterGroupName"]; + output["DBClusterParameterGroupName"]; } return contents; }; @@ -8729,10 +8480,7 @@ const deserializeAws_queryDBClusterParameterGroupsMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -8747,16 +8495,10 @@ const deserializeAws_queryDBClusterRole = ( Status: undefined }; if (output["RoleArn"] !== undefined) { - contents.RoleArn = - output["RoleArn"]["#text"] !== undefined - ? output["RoleArn"]["#text"] - : output["RoleArn"]; + contents.RoleArn = output["RoleArn"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -8810,93 +8552,50 @@ const deserializeAws_queryDBClusterSnapshot = ( contents.ClusterCreateTime = new Date(output["ClusterCreateTime"]); } if (output["DBClusterIdentifier"] !== undefined) { - contents.DBClusterIdentifier = - output["DBClusterIdentifier"]["#text"] !== undefined - ? output["DBClusterIdentifier"]["#text"] - : output["DBClusterIdentifier"]; + contents.DBClusterIdentifier = output["DBClusterIdentifier"]; } if (output["DBClusterSnapshotArn"] !== undefined) { - contents.DBClusterSnapshotArn = - output["DBClusterSnapshotArn"]["#text"] !== undefined - ? output["DBClusterSnapshotArn"]["#text"] - : output["DBClusterSnapshotArn"]; + contents.DBClusterSnapshotArn = output["DBClusterSnapshotArn"]; } if (output["DBClusterSnapshotIdentifier"] !== undefined) { contents.DBClusterSnapshotIdentifier = - output["DBClusterSnapshotIdentifier"]["#text"] !== undefined - ? output["DBClusterSnapshotIdentifier"]["#text"] - : output["DBClusterSnapshotIdentifier"]; + output["DBClusterSnapshotIdentifier"]; } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["KmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["KmsKeyId"]["#text"] !== undefined - ? output["KmsKeyId"]["#text"] - : output["KmsKeyId"]; + contents.KmsKeyId = output["KmsKeyId"]; } if (output["MasterUsername"] !== undefined) { - contents.MasterUsername = - output["MasterUsername"]["#text"] !== undefined - ? output["MasterUsername"]["#text"] - : output["MasterUsername"]; + contents.MasterUsername = output["MasterUsername"]; } if (output["PercentProgress"] !== undefined) { - contents.PercentProgress = parseInt( - output["PercentProgress"]["#text"] !== undefined - ? output["PercentProgress"]["#text"] - : output["PercentProgress"] - ); + contents.PercentProgress = parseInt(output["PercentProgress"]); } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } if (output["SnapshotCreateTime"] !== undefined) { contents.SnapshotCreateTime = new Date(output["SnapshotCreateTime"]); } if (output["SnapshotType"] !== undefined) { - contents.SnapshotType = - output["SnapshotType"]["#text"] !== undefined - ? output["SnapshotType"]["#text"] - : output["SnapshotType"]; + contents.SnapshotType = output["SnapshotType"]; } if (output["SourceDBClusterSnapshotArn"] !== undefined) { - contents.SourceDBClusterSnapshotArn = - output["SourceDBClusterSnapshotArn"]["#text"] !== undefined - ? output["SourceDBClusterSnapshotArn"]["#text"] - : output["SourceDBClusterSnapshotArn"]; + contents.SourceDBClusterSnapshotArn = output["SourceDBClusterSnapshotArn"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["StorageEncrypted"] !== undefined) { - contents.StorageEncrypted = - (output["StorageEncrypted"]["#text"] !== undefined - ? output["StorageEncrypted"]["#text"] - : output["StorageEncrypted"]) == "true"; + contents.StorageEncrypted = output["StorageEncrypted"] == "true"; } if (output["VpcId"] !== undefined) { - contents.VpcId = - output["VpcId"]["#text"] !== undefined - ? output["VpcId"]["#text"] - : output["VpcId"]; + contents.VpcId = output["VpcId"]; } return contents; }; @@ -8911,10 +8610,7 @@ const deserializeAws_queryDBClusterSnapshotAttribute = ( AttributeValues: undefined }; if (output["AttributeName"] !== undefined) { - contents.AttributeName = - output["AttributeName"]["#text"] !== undefined - ? output["AttributeName"]["#text"] - : output["AttributeName"]; + contents.AttributeName = output["AttributeName"]; } if (output.AttributeValues === "") { contents.AttributeValues = []; @@ -8966,9 +8662,7 @@ const deserializeAws_queryDBClusterSnapshotAttributesResult = ( } if (output["DBClusterSnapshotIdentifier"] !== undefined) { contents.DBClusterSnapshotIdentifier = - output["DBClusterSnapshotIdentifier"]["#text"] !== undefined - ? output["DBClusterSnapshotIdentifier"]["#text"] - : output["DBClusterSnapshotIdentifier"]; + output["DBClusterSnapshotIdentifier"]; } return contents; }; @@ -9004,10 +8698,7 @@ const deserializeAws_queryDBClusterSnapshotMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -9028,34 +8719,19 @@ const deserializeAws_queryDBEngineVersion = ( ValidUpgradeTarget: undefined }; if (output["DBEngineDescription"] !== undefined) { - contents.DBEngineDescription = - output["DBEngineDescription"]["#text"] !== undefined - ? output["DBEngineDescription"]["#text"] - : output["DBEngineDescription"]; + contents.DBEngineDescription = output["DBEngineDescription"]; } if (output["DBEngineVersionDescription"] !== undefined) { - contents.DBEngineVersionDescription = - output["DBEngineVersionDescription"]["#text"] !== undefined - ? output["DBEngineVersionDescription"]["#text"] - : output["DBEngineVersionDescription"]; + contents.DBEngineVersionDescription = output["DBEngineVersionDescription"]; } if (output["DBParameterGroupFamily"] !== undefined) { - contents.DBParameterGroupFamily = - output["DBParameterGroupFamily"]["#text"] !== undefined - ? output["DBParameterGroupFamily"]["#text"] - : output["DBParameterGroupFamily"]; + contents.DBParameterGroupFamily = output["DBParameterGroupFamily"]; } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output.ExportableLogTypes === "") { contents.ExportableLogTypes = []; @@ -9071,9 +8747,7 @@ const deserializeAws_queryDBEngineVersion = ( } if (output["SupportsLogExportsToCloudwatchLogs"] !== undefined) { contents.SupportsLogExportsToCloudwatchLogs = - (output["SupportsLogExportsToCloudwatchLogs"]["#text"] !== undefined - ? output["SupportsLogExportsToCloudwatchLogs"]["#text"] - : output["SupportsLogExportsToCloudwatchLogs"]) == "true"; + output["SupportsLogExportsToCloudwatchLogs"] == "true"; } if (output.ValidUpgradeTarget === "") { contents.ValidUpgradeTarget = []; @@ -9121,10 +8795,7 @@ const deserializeAws_queryDBEngineVersionMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -9164,58 +8835,31 @@ const deserializeAws_queryDBInstance = ( }; if (output["AutoMinorVersionUpgrade"] !== undefined) { contents.AutoMinorVersionUpgrade = - (output["AutoMinorVersionUpgrade"]["#text"] !== undefined - ? output["AutoMinorVersionUpgrade"]["#text"] - : output["AutoMinorVersionUpgrade"]) == "true"; + output["AutoMinorVersionUpgrade"] == "true"; } if (output["AvailabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["AvailabilityZone"]["#text"] !== undefined - ? output["AvailabilityZone"]["#text"] - : output["AvailabilityZone"]; + contents.AvailabilityZone = output["AvailabilityZone"]; } if (output["BackupRetentionPeriod"] !== undefined) { - contents.BackupRetentionPeriod = parseInt( - output["BackupRetentionPeriod"]["#text"] !== undefined - ? output["BackupRetentionPeriod"]["#text"] - : output["BackupRetentionPeriod"] - ); + contents.BackupRetentionPeriod = parseInt(output["BackupRetentionPeriod"]); } if (output["CACertificateIdentifier"] !== undefined) { - contents.CACertificateIdentifier = - output["CACertificateIdentifier"]["#text"] !== undefined - ? output["CACertificateIdentifier"]["#text"] - : output["CACertificateIdentifier"]; + contents.CACertificateIdentifier = output["CACertificateIdentifier"]; } if (output["DBClusterIdentifier"] !== undefined) { - contents.DBClusterIdentifier = - output["DBClusterIdentifier"]["#text"] !== undefined - ? output["DBClusterIdentifier"]["#text"] - : output["DBClusterIdentifier"]; + contents.DBClusterIdentifier = output["DBClusterIdentifier"]; } if (output["DBInstanceArn"] !== undefined) { - contents.DBInstanceArn = - output["DBInstanceArn"]["#text"] !== undefined - ? output["DBInstanceArn"]["#text"] - : output["DBInstanceArn"]; + contents.DBInstanceArn = output["DBInstanceArn"]; } if (output["DBInstanceClass"] !== undefined) { - contents.DBInstanceClass = - output["DBInstanceClass"]["#text"] !== undefined - ? output["DBInstanceClass"]["#text"] - : output["DBInstanceClass"]; + contents.DBInstanceClass = output["DBInstanceClass"]; } if (output["DBInstanceIdentifier"] !== undefined) { - contents.DBInstanceIdentifier = - output["DBInstanceIdentifier"]["#text"] !== undefined - ? output["DBInstanceIdentifier"]["#text"] - : output["DBInstanceIdentifier"]; + contents.DBInstanceIdentifier = output["DBInstanceIdentifier"]; } if (output["DBInstanceStatus"] !== undefined) { - contents.DBInstanceStatus = - output["DBInstanceStatus"]["#text"] !== undefined - ? output["DBInstanceStatus"]["#text"] - : output["DBInstanceStatus"]; + contents.DBInstanceStatus = output["DBInstanceStatus"]; } if (output["DBSubnetGroup"] !== undefined) { contents.DBSubnetGroup = deserializeAws_queryDBSubnetGroup( @@ -9224,10 +8868,7 @@ const deserializeAws_queryDBInstance = ( ); } if (output["DbiResourceId"] !== undefined) { - contents.DbiResourceId = - output["DbiResourceId"]["#text"] !== undefined - ? output["DbiResourceId"]["#text"] - : output["DbiResourceId"]; + contents.DbiResourceId = output["DbiResourceId"]; } if (output.EnabledCloudwatchLogsExports === "") { contents.EnabledCloudwatchLogsExports = []; @@ -9248,25 +8889,16 @@ const deserializeAws_queryDBInstance = ( ); } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["InstanceCreateTime"] !== undefined) { contents.InstanceCreateTime = new Date(output["InstanceCreateTime"]); } if (output["KmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["KmsKeyId"]["#text"] !== undefined - ? output["KmsKeyId"]["#text"] - : output["KmsKeyId"]; + contents.KmsKeyId = output["KmsKeyId"]; } if (output["LatestRestorableTime"] !== undefined) { contents.LatestRestorableTime = new Date(output["LatestRestorableTime"]); @@ -9278,29 +8910,16 @@ const deserializeAws_queryDBInstance = ( ); } if (output["PreferredBackupWindow"] !== undefined) { - contents.PreferredBackupWindow = - output["PreferredBackupWindow"]["#text"] !== undefined - ? output["PreferredBackupWindow"]["#text"] - : output["PreferredBackupWindow"]; + contents.PreferredBackupWindow = output["PreferredBackupWindow"]; } if (output["PreferredMaintenanceWindow"] !== undefined) { - contents.PreferredMaintenanceWindow = - output["PreferredMaintenanceWindow"]["#text"] !== undefined - ? output["PreferredMaintenanceWindow"]["#text"] - : output["PreferredMaintenanceWindow"]; + contents.PreferredMaintenanceWindow = output["PreferredMaintenanceWindow"]; } if (output["PromotionTier"] !== undefined) { - contents.PromotionTier = parseInt( - output["PromotionTier"]["#text"] !== undefined - ? output["PromotionTier"]["#text"] - : output["PromotionTier"] - ); + contents.PromotionTier = parseInt(output["PromotionTier"]); } if (output["PubliclyAccessible"] !== undefined) { - contents.PubliclyAccessible = - (output["PubliclyAccessible"]["#text"] !== undefined - ? output["PubliclyAccessible"]["#text"] - : output["PubliclyAccessible"]) == "true"; + contents.PubliclyAccessible = output["PubliclyAccessible"] == "true"; } if (output.StatusInfos === "") { contents.StatusInfos = []; @@ -9315,10 +8934,7 @@ const deserializeAws_queryDBInstance = ( ); } if (output["StorageEncrypted"] !== undefined) { - contents.StorageEncrypted = - (output["StorageEncrypted"]["#text"] !== undefined - ? output["StorageEncrypted"]["#text"] - : output["StorageEncrypted"]) == "true"; + contents.StorageEncrypted = output["StorageEncrypted"] == "true"; } if (output.VpcSecurityGroups === "") { contents.VpcSecurityGroups = []; @@ -9368,10 +8984,7 @@ const deserializeAws_queryDBInstanceMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -9388,28 +9001,16 @@ const deserializeAws_queryDBInstanceStatusInfo = ( StatusType: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } if (output["Normal"] !== undefined) { - contents.Normal = - (output["Normal"]["#text"] !== undefined - ? output["Normal"]["#text"] - : output["Normal"]) == "true"; + contents.Normal = output["Normal"] == "true"; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["StatusType"] !== undefined) { - contents.StatusType = - output["StatusType"]["#text"] !== undefined - ? output["StatusType"]["#text"] - : output["StatusType"]; + contents.StatusType = output["StatusType"]; } return contents; }; @@ -9437,28 +9038,16 @@ const deserializeAws_queryDBSubnetGroup = ( VpcId: undefined }; if (output["DBSubnetGroupArn"] !== undefined) { - contents.DBSubnetGroupArn = - output["DBSubnetGroupArn"]["#text"] !== undefined - ? output["DBSubnetGroupArn"]["#text"] - : output["DBSubnetGroupArn"]; + contents.DBSubnetGroupArn = output["DBSubnetGroupArn"]; } if (output["DBSubnetGroupDescription"] !== undefined) { - contents.DBSubnetGroupDescription = - output["DBSubnetGroupDescription"]["#text"] !== undefined - ? output["DBSubnetGroupDescription"]["#text"] - : output["DBSubnetGroupDescription"]; + contents.DBSubnetGroupDescription = output["DBSubnetGroupDescription"]; } if (output["DBSubnetGroupName"] !== undefined) { - contents.DBSubnetGroupName = - output["DBSubnetGroupName"]["#text"] !== undefined - ? output["DBSubnetGroupName"]["#text"] - : output["DBSubnetGroupName"]; + contents.DBSubnetGroupName = output["DBSubnetGroupName"]; } if (output["SubnetGroupStatus"] !== undefined) { - contents.SubnetGroupStatus = - output["SubnetGroupStatus"]["#text"] !== undefined - ? output["SubnetGroupStatus"]["#text"] - : output["SubnetGroupStatus"]; + contents.SubnetGroupStatus = output["SubnetGroupStatus"]; } if (output.Subnets === "") { contents.Subnets = []; @@ -9473,10 +9062,7 @@ const deserializeAws_queryDBSubnetGroup = ( ); } if (output["VpcId"] !== undefined) { - contents.VpcId = - output["VpcId"]["#text"] !== undefined - ? output["VpcId"]["#text"] - : output["VpcId"]; + contents.VpcId = output["VpcId"]; } return contents; }; @@ -9503,10 +9089,7 @@ const deserializeAws_queryDBSubnetGroupMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -9616,23 +9199,13 @@ const deserializeAws_queryEndpoint = ( Port: undefined }; if (output["Address"] !== undefined) { - contents.Address = - output["Address"]["#text"] !== undefined - ? output["Address"]["#text"] - : output["Address"]; + contents.Address = output["Address"]; } if (output["HostedZoneId"] !== undefined) { - contents.HostedZoneId = - output["HostedZoneId"]["#text"] !== undefined - ? output["HostedZoneId"]["#text"] - : output["HostedZoneId"]; + contents.HostedZoneId = output["HostedZoneId"]; } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } return contents; }; @@ -9648,16 +9221,10 @@ const deserializeAws_queryEngineDefaults = ( Parameters: undefined }; if (output["DBParameterGroupFamily"] !== undefined) { - contents.DBParameterGroupFamily = - output["DBParameterGroupFamily"]["#text"] !== undefined - ? output["DBParameterGroupFamily"]["#text"] - : output["DBParameterGroupFamily"]; + contents.DBParameterGroupFamily = output["DBParameterGroupFamily"]; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Parameters === "") { contents.Parameters = []; @@ -9703,28 +9270,16 @@ const deserializeAws_queryEvent = ( ); } if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } if (output["SourceArn"] !== undefined) { - contents.SourceArn = - output["SourceArn"]["#text"] !== undefined - ? output["SourceArn"]["#text"] - : output["SourceArn"]; + contents.SourceArn = output["SourceArn"]; } if (output["SourceIdentifier"] !== undefined) { - contents.SourceIdentifier = - output["SourceIdentifier"]["#text"] !== undefined - ? output["SourceIdentifier"]["#text"] - : output["SourceIdentifier"]; + contents.SourceIdentifier = output["SourceIdentifier"]; } if (output["SourceType"] !== undefined) { - contents.SourceType = - output["SourceType"]["#text"] !== undefined - ? output["SourceType"]["#text"] - : output["SourceType"]; + contents.SourceType = output["SourceType"]; } return contents; }; @@ -9733,9 +9288,7 @@ const deserializeAws_queryEventCategoriesList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryEventCategoriesMap = ( @@ -9760,10 +9313,7 @@ const deserializeAws_queryEventCategoriesMap = ( ); } if (output["SourceType"] !== undefined) { - contents.SourceType = - output["SourceType"]["#text"] !== undefined - ? output["SourceType"]["#text"] - : output["SourceType"]; + contents.SourceType = output["SourceType"]; } return contents; }; @@ -9833,10 +9383,7 @@ const deserializeAws_queryEventsMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -9862,9 +9409,7 @@ const deserializeAws_queryLogTypeList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryModifyDBClusterResult = ( @@ -9961,34 +9506,19 @@ const deserializeAws_queryOrderableDBInstanceOption = ( ); } if (output["DBInstanceClass"] !== undefined) { - contents.DBInstanceClass = - output["DBInstanceClass"]["#text"] !== undefined - ? output["DBInstanceClass"]["#text"] - : output["DBInstanceClass"]; + contents.DBInstanceClass = output["DBInstanceClass"]; } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["LicenseModel"] !== undefined) { - contents.LicenseModel = - output["LicenseModel"]["#text"] !== undefined - ? output["LicenseModel"]["#text"] - : output["LicenseModel"]; + contents.LicenseModel = output["LicenseModel"]; } if (output["Vpc"] !== undefined) { - contents.Vpc = - (output["Vpc"]["#text"] !== undefined - ? output["Vpc"]["#text"] - : output["Vpc"]) == "true"; + contents.Vpc = output["Vpc"] == "true"; } return contents; }; @@ -10012,10 +9542,7 @@ const deserializeAws_queryOrderableDBInstanceOptionsMessage = ( OrderableDBInstanceOptions: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.OrderableDBInstanceOptions === "") { contents.OrderableDBInstanceOptions = []; @@ -10053,64 +9580,34 @@ const deserializeAws_queryParameter = ( Source: undefined }; if (output["AllowedValues"] !== undefined) { - contents.AllowedValues = - output["AllowedValues"]["#text"] !== undefined - ? output["AllowedValues"]["#text"] - : output["AllowedValues"]; + contents.AllowedValues = output["AllowedValues"]; } if (output["ApplyMethod"] !== undefined) { - contents.ApplyMethod = - output["ApplyMethod"]["#text"] !== undefined - ? output["ApplyMethod"]["#text"] - : output["ApplyMethod"]; + contents.ApplyMethod = output["ApplyMethod"]; } if (output["ApplyType"] !== undefined) { - contents.ApplyType = - output["ApplyType"]["#text"] !== undefined - ? output["ApplyType"]["#text"] - : output["ApplyType"]; + contents.ApplyType = output["ApplyType"]; } if (output["DataType"] !== undefined) { - contents.DataType = - output["DataType"]["#text"] !== undefined - ? output["DataType"]["#text"] - : output["DataType"]; + contents.DataType = output["DataType"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["IsModifiable"] !== undefined) { - contents.IsModifiable = - (output["IsModifiable"]["#text"] !== undefined - ? output["IsModifiable"]["#text"] - : output["IsModifiable"]) == "true"; + contents.IsModifiable = output["IsModifiable"] == "true"; } if (output["MinimumEngineVersion"] !== undefined) { - contents.MinimumEngineVersion = - output["MinimumEngineVersion"]["#text"] !== undefined - ? output["MinimumEngineVersion"]["#text"] - : output["MinimumEngineVersion"]; + contents.MinimumEngineVersion = output["MinimumEngineVersion"]; } if (output["ParameterName"] !== undefined) { - contents.ParameterName = - output["ParameterName"]["#text"] !== undefined - ? output["ParameterName"]["#text"] - : output["ParameterName"]; + contents.ParameterName = output["ParameterName"]; } if (output["ParameterValue"] !== undefined) { - contents.ParameterValue = - output["ParameterValue"]["#text"] !== undefined - ? output["ParameterValue"]["#text"] - : output["ParameterValue"]; + contents.ParameterValue = output["ParameterValue"]; } if (output["Source"] !== undefined) { - contents.Source = - output["Source"]["#text"] !== undefined - ? output["Source"]["#text"] - : output["Source"]; + contents.Source = output["Source"]; } return contents; }; @@ -10174,10 +9671,7 @@ const deserializeAws_queryPendingMaintenanceAction = ( OptInStatus: undefined }; if (output["Action"] !== undefined) { - contents.Action = - output["Action"]["#text"] !== undefined - ? output["Action"]["#text"] - : output["Action"]; + contents.Action = output["Action"]; } if (output["AutoAppliedAfterDate"] !== undefined) { contents.AutoAppliedAfterDate = new Date(output["AutoAppliedAfterDate"]); @@ -10186,19 +9680,13 @@ const deserializeAws_queryPendingMaintenanceAction = ( contents.CurrentApplyDate = new Date(output["CurrentApplyDate"]); } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["ForcedApplyDate"] !== undefined) { contents.ForcedApplyDate = new Date(output["ForcedApplyDate"]); } if (output["OptInStatus"] !== undefined) { - contents.OptInStatus = - output["OptInStatus"]["#text"] !== undefined - ? output["OptInStatus"]["#text"] - : output["OptInStatus"]; + contents.OptInStatus = output["OptInStatus"]; } return contents; }; @@ -10231,10 +9719,7 @@ const deserializeAws_queryPendingMaintenanceActionsMessage = ( PendingMaintenanceActions: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.PendingMaintenanceActions === "") { contents.PendingMaintenanceActions = []; @@ -10276,73 +9761,37 @@ const deserializeAws_queryPendingModifiedValues = ( StorageType: undefined }; if (output["AllocatedStorage"] !== undefined) { - contents.AllocatedStorage = parseInt( - output["AllocatedStorage"]["#text"] !== undefined - ? output["AllocatedStorage"]["#text"] - : output["AllocatedStorage"] - ); + contents.AllocatedStorage = parseInt(output["AllocatedStorage"]); } if (output["BackupRetentionPeriod"] !== undefined) { - contents.BackupRetentionPeriod = parseInt( - output["BackupRetentionPeriod"]["#text"] !== undefined - ? output["BackupRetentionPeriod"]["#text"] - : output["BackupRetentionPeriod"] - ); + contents.BackupRetentionPeriod = parseInt(output["BackupRetentionPeriod"]); } if (output["CACertificateIdentifier"] !== undefined) { - contents.CACertificateIdentifier = - output["CACertificateIdentifier"]["#text"] !== undefined - ? output["CACertificateIdentifier"]["#text"] - : output["CACertificateIdentifier"]; + contents.CACertificateIdentifier = output["CACertificateIdentifier"]; } if (output["DBInstanceClass"] !== undefined) { - contents.DBInstanceClass = - output["DBInstanceClass"]["#text"] !== undefined - ? output["DBInstanceClass"]["#text"] - : output["DBInstanceClass"]; + contents.DBInstanceClass = output["DBInstanceClass"]; } if (output["DBInstanceIdentifier"] !== undefined) { - contents.DBInstanceIdentifier = - output["DBInstanceIdentifier"]["#text"] !== undefined - ? output["DBInstanceIdentifier"]["#text"] - : output["DBInstanceIdentifier"]; + contents.DBInstanceIdentifier = output["DBInstanceIdentifier"]; } if (output["DBSubnetGroupName"] !== undefined) { - contents.DBSubnetGroupName = - output["DBSubnetGroupName"]["#text"] !== undefined - ? output["DBSubnetGroupName"]["#text"] - : output["DBSubnetGroupName"]; + contents.DBSubnetGroupName = output["DBSubnetGroupName"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["Iops"] !== undefined) { - contents.Iops = parseInt( - output["Iops"]["#text"] !== undefined - ? output["Iops"]["#text"] - : output["Iops"] - ); + contents.Iops = parseInt(output["Iops"]); } if (output["LicenseModel"] !== undefined) { - contents.LicenseModel = - output["LicenseModel"]["#text"] !== undefined - ? output["LicenseModel"]["#text"] - : output["LicenseModel"]; + contents.LicenseModel = output["LicenseModel"]; } if (output["MasterUserPassword"] !== undefined) { - contents.MasterUserPassword = - output["MasterUserPassword"]["#text"] !== undefined - ? output["MasterUserPassword"]["#text"] - : output["MasterUserPassword"]; + contents.MasterUserPassword = output["MasterUserPassword"]; } if (output["MultiAZ"] !== undefined) { - contents.MultiAZ = - (output["MultiAZ"]["#text"] !== undefined - ? output["MultiAZ"]["#text"] - : output["MultiAZ"]) == "true"; + contents.MultiAZ = output["MultiAZ"] == "true"; } if (output["PendingCloudwatchLogsExports"] !== undefined) { contents.PendingCloudwatchLogsExports = deserializeAws_queryPendingCloudwatchLogsExports( @@ -10351,17 +9800,10 @@ const deserializeAws_queryPendingModifiedValues = ( ); } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } if (output["StorageType"] !== undefined) { - contents.StorageType = - output["StorageType"]["#text"] !== undefined - ? output["StorageType"]["#text"] - : output["StorageType"]; + contents.StorageType = output["StorageType"]; } return contents; }; @@ -10408,10 +9850,7 @@ const deserializeAws_queryResourcePendingMaintenanceActions = ( ); } if (output["ResourceIdentifier"] !== undefined) { - contents.ResourceIdentifier = - output["ResourceIdentifier"]["#text"] !== undefined - ? output["ResourceIdentifier"]["#text"] - : output["ResourceIdentifier"]; + contents.ResourceIdentifier = output["ResourceIdentifier"]; } return contents; }; @@ -10501,16 +9940,10 @@ const deserializeAws_querySubnet = ( ); } if (output["SubnetIdentifier"] !== undefined) { - contents.SubnetIdentifier = - output["SubnetIdentifier"]["#text"] !== undefined - ? output["SubnetIdentifier"]["#text"] - : output["SubnetIdentifier"]; + contents.SubnetIdentifier = output["SubnetIdentifier"]; } if (output["SubnetStatus"] !== undefined) { - contents.SubnetStatus = - output["SubnetStatus"]["#text"] !== undefined - ? output["SubnetStatus"]["#text"] - : output["SubnetStatus"]; + contents.SubnetStatus = output["SubnetStatus"]; } return contents; }; @@ -10531,16 +9964,10 @@ const deserializeAws_queryTag = (output: any, context: __SerdeContext): Tag => { Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -10590,34 +10017,19 @@ const deserializeAws_queryUpgradeTarget = ( IsMajorVersionUpgrade: undefined }; if (output["AutoUpgrade"] !== undefined) { - contents.AutoUpgrade = - (output["AutoUpgrade"]["#text"] !== undefined - ? output["AutoUpgrade"]["#text"] - : output["AutoUpgrade"]) == "true"; + contents.AutoUpgrade = output["AutoUpgrade"] == "true"; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["IsMajorVersionUpgrade"] !== undefined) { - contents.IsMajorVersionUpgrade = - (output["IsMajorVersionUpgrade"]["#text"] !== undefined - ? output["IsMajorVersionUpgrade"]["#text"] - : output["IsMajorVersionUpgrade"]) == "true"; + contents.IsMajorVersionUpgrade = output["IsMajorVersionUpgrade"] == "true"; } return contents; }; @@ -10641,16 +10053,10 @@ const deserializeAws_queryVpcSecurityGroupMembership = ( VpcSecurityGroupId: undefined }; if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["VpcSecurityGroupId"] !== undefined) { - contents.VpcSecurityGroupId = - output["VpcSecurityGroupId"]["#text"] !== undefined - ? output["VpcSecurityGroupId"]["#text"] - : output["VpcSecurityGroupId"]; + contents.VpcSecurityGroupId = output["VpcSecurityGroupId"]; } return contents; }; @@ -10739,7 +10145,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/clients/client-ec2/protocols/Aws_ec2.ts b/clients/client-ec2/protocols/Aws_ec2.ts index caa97299c4e4..7e1408f77a4f 100644 --- a/clients/client-ec2/protocols/Aws_ec2.ts +++ b/clients/client-ec2/protocols/Aws_ec2.ts @@ -2813,7 +2813,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -48345,10 +48346,7 @@ const deserializeAws_ec2AcceptReservedInstancesExchangeQuoteResult = ( ExchangeId: undefined }; if (output["exchangeId"] !== undefined) { - contents.ExchangeId = - output["exchangeId"]["#text"] !== undefined - ? output["exchangeId"]["#text"] - : output["exchangeId"]; + contents.ExchangeId = output["exchangeId"]; } return contents; }; @@ -48437,10 +48435,7 @@ const deserializeAws_ec2AccountAttribute = ( AttributeValues: undefined }; if (output["attributeName"] !== undefined) { - contents.AttributeName = - output["attributeName"]["#text"] !== undefined - ? output["attributeName"]["#text"] - : output["attributeName"]; + contents.AttributeName = output["attributeName"]; } if (output.attributeValueSet === "") { contents.AttributeValues = []; @@ -48475,10 +48470,7 @@ const deserializeAws_ec2AccountAttributeValue = ( AttributeValue: undefined }; if (output["attributeValue"] !== undefined) { - contents.AttributeValue = - output["attributeValue"]["#text"] !== undefined - ? output["attributeValue"]["#text"] - : output["attributeValue"]; + contents.AttributeValue = output["attributeValue"]; } return contents; }; @@ -48504,28 +48496,16 @@ const deserializeAws_ec2ActiveInstance = ( SpotInstanceRequestId: undefined }; if (output["instanceHealth"] !== undefined) { - contents.InstanceHealth = - output["instanceHealth"]["#text"] !== undefined - ? output["instanceHealth"]["#text"] - : output["instanceHealth"]; + contents.InstanceHealth = output["instanceHealth"]; } if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output["spotInstanceRequestId"] !== undefined) { - contents.SpotInstanceRequestId = - output["spotInstanceRequestId"]["#text"] !== undefined - ? output["spotInstanceRequestId"]["#text"] - : output["spotInstanceRequestId"]; + contents.SpotInstanceRequestId = output["spotInstanceRequestId"]; } return contents; }; @@ -48560,76 +48540,40 @@ const deserializeAws_ec2Address = ( Tags: undefined }; if (output["allocationId"] !== undefined) { - contents.AllocationId = - output["allocationId"]["#text"] !== undefined - ? output["allocationId"]["#text"] - : output["allocationId"]; + contents.AllocationId = output["allocationId"]; } if (output["associationId"] !== undefined) { - contents.AssociationId = - output["associationId"]["#text"] !== undefined - ? output["associationId"]["#text"] - : output["associationId"]; + contents.AssociationId = output["associationId"]; } if (output["customerOwnedIp"] !== undefined) { - contents.CustomerOwnedIp = - output["customerOwnedIp"]["#text"] !== undefined - ? output["customerOwnedIp"]["#text"] - : output["customerOwnedIp"]; + contents.CustomerOwnedIp = output["customerOwnedIp"]; } if (output["customerOwnedIpv4Pool"] !== undefined) { - contents.CustomerOwnedIpv4Pool = - output["customerOwnedIpv4Pool"]["#text"] !== undefined - ? output["customerOwnedIpv4Pool"]["#text"] - : output["customerOwnedIpv4Pool"]; + contents.CustomerOwnedIpv4Pool = output["customerOwnedIpv4Pool"]; } if (output["domain"] !== undefined) { - contents.Domain = - output["domain"]["#text"] !== undefined - ? output["domain"]["#text"] - : output["domain"]; + contents.Domain = output["domain"]; } if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } if (output["networkBorderGroup"] !== undefined) { - contents.NetworkBorderGroup = - output["networkBorderGroup"]["#text"] !== undefined - ? output["networkBorderGroup"]["#text"] - : output["networkBorderGroup"]; + contents.NetworkBorderGroup = output["networkBorderGroup"]; } if (output["networkInterfaceId"] !== undefined) { - contents.NetworkInterfaceId = - output["networkInterfaceId"]["#text"] !== undefined - ? output["networkInterfaceId"]["#text"] - : output["networkInterfaceId"]; + contents.NetworkInterfaceId = output["networkInterfaceId"]; } if (output["networkInterfaceOwnerId"] !== undefined) { - contents.NetworkInterfaceOwnerId = - output["networkInterfaceOwnerId"]["#text"] !== undefined - ? output["networkInterfaceOwnerId"]["#text"] - : output["networkInterfaceOwnerId"]; + contents.NetworkInterfaceOwnerId = output["networkInterfaceOwnerId"]; } if (output["privateIpAddress"] !== undefined) { - contents.PrivateIpAddress = - output["privateIpAddress"]["#text"] !== undefined - ? output["privateIpAddress"]["#text"] - : output["privateIpAddress"]; + contents.PrivateIpAddress = output["privateIpAddress"]; } if (output["publicIp"] !== undefined) { - contents.PublicIp = - output["publicIp"]["#text"] !== undefined - ? output["publicIp"]["#text"] - : output["publicIp"]; + contents.PublicIp = output["publicIp"]; } if (output["publicIpv4Pool"] !== undefined) { - contents.PublicIpv4Pool = - output["publicIpv4Pool"]["#text"] !== undefined - ? output["publicIpv4Pool"]["#text"] - : output["publicIpv4Pool"]; + contents.PublicIpv4Pool = output["publicIpv4Pool"]; } if (output.tagSet === "") { contents.Tags = []; @@ -48687,46 +48631,25 @@ const deserializeAws_ec2AllocateAddressResult = ( PublicIpv4Pool: undefined }; if (output["allocationId"] !== undefined) { - contents.AllocationId = - output["allocationId"]["#text"] !== undefined - ? output["allocationId"]["#text"] - : output["allocationId"]; + contents.AllocationId = output["allocationId"]; } if (output["customerOwnedIp"] !== undefined) { - contents.CustomerOwnedIp = - output["customerOwnedIp"]["#text"] !== undefined - ? output["customerOwnedIp"]["#text"] - : output["customerOwnedIp"]; + contents.CustomerOwnedIp = output["customerOwnedIp"]; } if (output["customerOwnedIpv4Pool"] !== undefined) { - contents.CustomerOwnedIpv4Pool = - output["customerOwnedIpv4Pool"]["#text"] !== undefined - ? output["customerOwnedIpv4Pool"]["#text"] - : output["customerOwnedIpv4Pool"]; + contents.CustomerOwnedIpv4Pool = output["customerOwnedIpv4Pool"]; } if (output["domain"] !== undefined) { - contents.Domain = - output["domain"]["#text"] !== undefined - ? output["domain"]["#text"] - : output["domain"]; + contents.Domain = output["domain"]; } if (output["networkBorderGroup"] !== undefined) { - contents.NetworkBorderGroup = - output["networkBorderGroup"]["#text"] !== undefined - ? output["networkBorderGroup"]["#text"] - : output["networkBorderGroup"]; + contents.NetworkBorderGroup = output["networkBorderGroup"]; } if (output["publicIp"] !== undefined) { - contents.PublicIp = - output["publicIp"]["#text"] !== undefined - ? output["publicIp"]["#text"] - : output["publicIp"]; + contents.PublicIp = output["publicIp"]; } if (output["publicIpv4Pool"] !== undefined) { - contents.PublicIpv4Pool = - output["publicIpv4Pool"]["#text"] !== undefined - ? output["publicIpv4Pool"]["#text"] - : output["publicIpv4Pool"]; + contents.PublicIpv4Pool = output["publicIpv4Pool"]; } return contents; }; @@ -48764,16 +48687,10 @@ const deserializeAws_ec2AllowedPrincipal = ( PrincipalType: undefined }; if (output["principal"] !== undefined) { - contents.Principal = - output["principal"]["#text"] !== undefined - ? output["principal"]["#text"] - : output["principal"]; + contents.Principal = output["principal"]; } if (output["principalType"] !== undefined) { - contents.PrincipalType = - output["principalType"]["#text"] !== undefined - ? output["principalType"]["#text"] - : output["principalType"]; + contents.PrincipalType = output["principalType"]; } return contents; }; @@ -48814,9 +48731,7 @@ const deserializeAws_ec2ArchitectureTypeList = ( output: any, context: __SerdeContext ): (ArchitectureType | string)[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2AssignIpv6AddressesResult = ( @@ -48841,10 +48756,7 @@ const deserializeAws_ec2AssignIpv6AddressesResult = ( ); } if (output["networkInterfaceId"] !== undefined) { - contents.NetworkInterfaceId = - output["networkInterfaceId"]["#text"] !== undefined - ? output["networkInterfaceId"]["#text"] - : output["networkInterfaceId"]; + contents.NetworkInterfaceId = output["networkInterfaceId"]; } return contents; }; @@ -48871,10 +48783,7 @@ const deserializeAws_ec2AssignPrivateIpAddressesResult = ( ); } if (output["networkInterfaceId"] !== undefined) { - contents.NetworkInterfaceId = - output["networkInterfaceId"]["#text"] !== undefined - ? output["networkInterfaceId"]["#text"] - : output["networkInterfaceId"]; + contents.NetworkInterfaceId = output["networkInterfaceId"]; } return contents; }; @@ -48888,10 +48797,7 @@ const deserializeAws_ec2AssignedPrivateIpAddress = ( PrivateIpAddress: undefined }; if (output["privateIpAddress"] !== undefined) { - contents.PrivateIpAddress = - output["privateIpAddress"]["#text"] !== undefined - ? output["privateIpAddress"]["#text"] - : output["privateIpAddress"]; + contents.PrivateIpAddress = output["privateIpAddress"]; } return contents; }; @@ -48914,10 +48820,7 @@ const deserializeAws_ec2AssociateAddressResult = ( AssociationId: undefined }; if (output["associationId"] !== undefined) { - contents.AssociationId = - output["associationId"]["#text"] !== undefined - ? output["associationId"]["#text"] - : output["associationId"]; + contents.AssociationId = output["associationId"]; } return contents; }; @@ -48932,10 +48835,7 @@ const deserializeAws_ec2AssociateClientVpnTargetNetworkResult = ( Status: undefined }; if (output["associationId"] !== undefined) { - contents.AssociationId = - output["associationId"]["#text"] !== undefined - ? output["associationId"]["#text"] - : output["associationId"]; + contents.AssociationId = output["associationId"]; } if (output["status"] !== undefined) { contents.Status = deserializeAws_ec2AssociationStatus( @@ -48973,10 +48873,7 @@ const deserializeAws_ec2AssociateRouteTableResult = ( AssociationState: undefined }; if (output["associationId"] !== undefined) { - contents.AssociationId = - output["associationId"]["#text"] !== undefined - ? output["associationId"]["#text"] - : output["associationId"]; + contents.AssociationId = output["associationId"]; } if (output["associationState"] !== undefined) { contents.AssociationState = deserializeAws_ec2RouteTableAssociationState( @@ -49003,10 +48900,7 @@ const deserializeAws_ec2AssociateSubnetCidrBlockResult = ( ); } if (output["subnetId"] !== undefined) { - contents.SubnetId = - output["subnetId"]["#text"] !== undefined - ? output["subnetId"]["#text"] - : output["subnetId"]; + contents.SubnetId = output["subnetId"]; } return contents; }; @@ -49068,10 +48962,7 @@ const deserializeAws_ec2AssociateVpcCidrBlockResult = ( ); } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -49086,16 +48977,10 @@ const deserializeAws_ec2AssociatedTargetNetwork = ( NetworkType: undefined }; if (output["networkId"] !== undefined) { - contents.NetworkId = - output["networkId"]["#text"] !== undefined - ? output["networkId"]["#text"] - : output["networkId"]; + contents.NetworkId = output["networkId"]; } if (output["networkType"] !== undefined) { - contents.NetworkType = - output["networkType"]["#text"] !== undefined - ? output["networkType"]["#text"] - : output["networkType"]; + contents.NetworkType = output["networkType"]; } return contents; }; @@ -49119,16 +49004,10 @@ const deserializeAws_ec2AssociationStatus = ( Message: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -49142,10 +49021,7 @@ const deserializeAws_ec2AttachClassicLinkVpcResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -49159,10 +49035,7 @@ const deserializeAws_ec2AttachNetworkInterfaceResult = ( AttachmentId: undefined }; if (output["attachmentId"] !== undefined) { - contents.AttachmentId = - output["attachmentId"]["#text"] !== undefined - ? output["attachmentId"]["#text"] - : output["attachmentId"]; + contents.AttachmentId = output["attachmentId"]; } return contents; }; @@ -49193,10 +49066,7 @@ const deserializeAws_ec2AttributeBooleanValue = ( Value: undefined }; if (output["value"] !== undefined) { - contents.Value = - (output["value"]["#text"] !== undefined - ? output["value"]["#text"] - : output["value"]) == "true"; + contents.Value = output["value"] == "true"; } return contents; }; @@ -49210,10 +49080,7 @@ const deserializeAws_ec2AttributeValue = ( Value: undefined }; if (output["value"] !== undefined) { - contents.Value = - output["value"]["#text"] !== undefined - ? output["value"]["#text"] - : output["value"]; + contents.Value = output["value"]; } return contents; }; @@ -49232,34 +49099,19 @@ const deserializeAws_ec2AuthorizationRule = ( Status: undefined }; if (output["accessAll"] !== undefined) { - contents.AccessAll = - (output["accessAll"]["#text"] !== undefined - ? output["accessAll"]["#text"] - : output["accessAll"]) == "true"; + contents.AccessAll = output["accessAll"] == "true"; } if (output["clientVpnEndpointId"] !== undefined) { - contents.ClientVpnEndpointId = - output["clientVpnEndpointId"]["#text"] !== undefined - ? output["clientVpnEndpointId"]["#text"] - : output["clientVpnEndpointId"]; + contents.ClientVpnEndpointId = output["clientVpnEndpointId"]; } if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["destinationCidr"] !== undefined) { - contents.DestinationCidr = - output["destinationCidr"]["#text"] !== undefined - ? output["destinationCidr"]["#text"] - : output["destinationCidr"]; + contents.DestinationCidr = output["destinationCidr"]; } if (output["groupId"] !== undefined) { - contents.GroupId = - output["groupId"]["#text"] !== undefined - ? output["groupId"]["#text"] - : output["groupId"]; + contents.GroupId = output["groupId"]; } if (output["status"] !== undefined) { contents.Status = deserializeAws_ec2ClientVpnAuthorizationRuleStatus( @@ -49312,10 +49164,7 @@ const deserializeAws_ec2AvailabilityZone = ( ZoneName: undefined }; if (output["groupName"] !== undefined) { - contents.GroupName = - output["groupName"]["#text"] !== undefined - ? output["groupName"]["#text"] - : output["groupName"]; + contents.GroupName = output["groupName"]; } if (output.messageSet === "") { contents.Messages = []; @@ -49330,40 +49179,22 @@ const deserializeAws_ec2AvailabilityZone = ( ); } if (output["networkBorderGroup"] !== undefined) { - contents.NetworkBorderGroup = - output["networkBorderGroup"]["#text"] !== undefined - ? output["networkBorderGroup"]["#text"] - : output["networkBorderGroup"]; + contents.NetworkBorderGroup = output["networkBorderGroup"]; } if (output["optInStatus"] !== undefined) { - contents.OptInStatus = - output["optInStatus"]["#text"] !== undefined - ? output["optInStatus"]["#text"] - : output["optInStatus"]; + contents.OptInStatus = output["optInStatus"]; } if (output["regionName"] !== undefined) { - contents.RegionName = - output["regionName"]["#text"] !== undefined - ? output["regionName"]["#text"] - : output["regionName"]; + contents.RegionName = output["regionName"]; } if (output["zoneState"] !== undefined) { - contents.State = - output["zoneState"]["#text"] !== undefined - ? output["zoneState"]["#text"] - : output["zoneState"]; + contents.State = output["zoneState"]; } if (output["zoneId"] !== undefined) { - contents.ZoneId = - output["zoneId"]["#text"] !== undefined - ? output["zoneId"]["#text"] - : output["zoneId"]; + contents.ZoneId = output["zoneId"]; } if (output["zoneName"] !== undefined) { - contents.ZoneName = - output["zoneName"]["#text"] !== undefined - ? output["zoneName"]["#text"] - : output["zoneName"]; + contents.ZoneName = output["zoneName"]; } return contents; }; @@ -49386,10 +49217,7 @@ const deserializeAws_ec2AvailabilityZoneMessage = ( Message: undefined }; if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -49425,11 +49253,7 @@ const deserializeAws_ec2AvailableCapacity = ( ); } if (output["availableVCpus"] !== undefined) { - contents.AvailableVCpus = parseInt( - output["availableVCpus"]["#text"] !== undefined - ? output["availableVCpus"]["#text"] - : output["availableVCpus"] - ); + contents.AvailableVCpus = parseInt(output["availableVCpus"]); } return contents; }; @@ -49455,25 +49279,16 @@ const deserializeAws_ec2BlockDeviceMapping = ( VirtualName: undefined }; if (output["deviceName"] !== undefined) { - contents.DeviceName = - output["deviceName"]["#text"] !== undefined - ? output["deviceName"]["#text"] - : output["deviceName"]; + contents.DeviceName = output["deviceName"]; } if (output["ebs"] !== undefined) { contents.Ebs = deserializeAws_ec2EbsBlockDevice(output["ebs"], context); } if (output["noDevice"] !== undefined) { - contents.NoDevice = - output["noDevice"]["#text"] !== undefined - ? output["noDevice"]["#text"] - : output["noDevice"]; + contents.NoDevice = output["noDevice"]; } if (output["virtualName"] !== undefined) { - contents.VirtualName = - output["virtualName"]["#text"] !== undefined - ? output["virtualName"]["#text"] - : output["virtualName"]; + contents.VirtualName = output["virtualName"]; } return contents; }; @@ -49520,10 +49335,7 @@ const deserializeAws_ec2BundleTask = ( UpdateTime: undefined }; if (output["bundleId"] !== undefined) { - contents.BundleId = - output["bundleId"]["#text"] !== undefined - ? output["bundleId"]["#text"] - : output["bundleId"]; + contents.BundleId = output["bundleId"]; } if (output["error"] !== undefined) { contents.BundleTaskError = deserializeAws_ec2BundleTaskError( @@ -49532,25 +49344,16 @@ const deserializeAws_ec2BundleTask = ( ); } if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } if (output["progress"] !== undefined) { - contents.Progress = - output["progress"]["#text"] !== undefined - ? output["progress"]["#text"] - : output["progress"]; + contents.Progress = output["progress"]; } if (output["startTime"] !== undefined) { contents.StartTime = new Date(output["startTime"]); } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["storage"] !== undefined) { contents.Storage = deserializeAws_ec2Storage(output["storage"], context); @@ -49571,16 +49374,10 @@ const deserializeAws_ec2BundleTaskError = ( Message: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -49606,28 +49403,16 @@ const deserializeAws_ec2ByoipCidr = ( StatusMessage: undefined }; if (output["cidr"] !== undefined) { - contents.Cidr = - output["cidr"]["#text"] !== undefined - ? output["cidr"]["#text"] - : output["cidr"]; + contents.Cidr = output["cidr"]; } if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["statusMessage"] !== undefined) { - contents.StatusMessage = - output["statusMessage"]["#text"] !== undefined - ? output["statusMessage"]["#text"] - : output["statusMessage"]; + contents.StatusMessage = output["statusMessage"]; } return contents; }; @@ -49667,10 +49452,7 @@ const deserializeAws_ec2CancelCapacityReservationResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -49686,22 +49468,13 @@ const deserializeAws_ec2CancelImportTaskResult = ( State: undefined }; if (output["importTaskId"] !== undefined) { - contents.ImportTaskId = - output["importTaskId"]["#text"] !== undefined - ? output["importTaskId"]["#text"] - : output["importTaskId"]; + contents.ImportTaskId = output["importTaskId"]; } if (output["previousState"] !== undefined) { - contents.PreviousState = - output["previousState"]["#text"] !== undefined - ? output["previousState"]["#text"] - : output["previousState"]; + contents.PreviousState = output["previousState"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } return contents; }; @@ -49739,16 +49512,10 @@ const deserializeAws_ec2CancelSpotFleetRequestsError = ( Message: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -49769,10 +49536,7 @@ const deserializeAws_ec2CancelSpotFleetRequestsErrorItem = ( ); } if (output["spotFleetRequestId"] !== undefined) { - contents.SpotFleetRequestId = - output["spotFleetRequestId"]["#text"] !== undefined - ? output["spotFleetRequestId"]["#text"] - : output["spotFleetRequestId"]; + contents.SpotFleetRequestId = output["spotFleetRequestId"]; } return contents; }; @@ -49834,21 +49598,14 @@ const deserializeAws_ec2CancelSpotFleetRequestsSuccessItem = ( }; if (output["currentSpotFleetRequestState"] !== undefined) { contents.CurrentSpotFleetRequestState = - output["currentSpotFleetRequestState"]["#text"] !== undefined - ? output["currentSpotFleetRequestState"]["#text"] - : output["currentSpotFleetRequestState"]; + output["currentSpotFleetRequestState"]; } if (output["previousSpotFleetRequestState"] !== undefined) { contents.PreviousSpotFleetRequestState = - output["previousSpotFleetRequestState"]["#text"] !== undefined - ? output["previousSpotFleetRequestState"]["#text"] - : output["previousSpotFleetRequestState"]; + output["previousSpotFleetRequestState"]; } if (output["spotFleetRequestId"] !== undefined) { - contents.SpotFleetRequestId = - output["spotFleetRequestId"]["#text"] !== undefined - ? output["spotFleetRequestId"]["#text"] - : output["spotFleetRequestId"]; + contents.SpotFleetRequestId = output["spotFleetRequestId"]; } return contents; }; @@ -49895,16 +49652,10 @@ const deserializeAws_ec2CancelledSpotInstanceRequest = ( State: undefined }; if (output["spotInstanceRequestId"] !== undefined) { - contents.SpotInstanceRequestId = - output["spotInstanceRequestId"]["#text"] !== undefined - ? output["spotInstanceRequestId"]["#text"] - : output["spotInstanceRequestId"]; + contents.SpotInstanceRequestId = output["spotInstanceRequestId"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } return contents; }; @@ -49944,89 +49695,51 @@ const deserializeAws_ec2CapacityReservation = ( TotalInstanceCount: undefined }; if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["availabilityZoneId"] !== undefined) { - contents.AvailabilityZoneId = - output["availabilityZoneId"]["#text"] !== undefined - ? output["availabilityZoneId"]["#text"] - : output["availabilityZoneId"]; + contents.AvailabilityZoneId = output["availabilityZoneId"]; } if (output["availableInstanceCount"] !== undefined) { contents.AvailableInstanceCount = parseInt( - output["availableInstanceCount"]["#text"] !== undefined - ? output["availableInstanceCount"]["#text"] - : output["availableInstanceCount"] + output["availableInstanceCount"] ); } if (output["capacityReservationArn"] !== undefined) { - contents.CapacityReservationArn = - output["capacityReservationArn"]["#text"] !== undefined - ? output["capacityReservationArn"]["#text"] - : output["capacityReservationArn"]; + contents.CapacityReservationArn = output["capacityReservationArn"]; } if (output["capacityReservationId"] !== undefined) { - contents.CapacityReservationId = - output["capacityReservationId"]["#text"] !== undefined - ? output["capacityReservationId"]["#text"] - : output["capacityReservationId"]; + contents.CapacityReservationId = output["capacityReservationId"]; } if (output["createDate"] !== undefined) { contents.CreateDate = new Date(output["createDate"]); } if (output["ebsOptimized"] !== undefined) { - contents.EbsOptimized = - (output["ebsOptimized"]["#text"] !== undefined - ? output["ebsOptimized"]["#text"] - : output["ebsOptimized"]) == "true"; + contents.EbsOptimized = output["ebsOptimized"] == "true"; } if (output["endDate"] !== undefined) { contents.EndDate = new Date(output["endDate"]); } if (output["endDateType"] !== undefined) { - contents.EndDateType = - output["endDateType"]["#text"] !== undefined - ? output["endDateType"]["#text"] - : output["endDateType"]; + contents.EndDateType = output["endDateType"]; } if (output["ephemeralStorage"] !== undefined) { - contents.EphemeralStorage = - (output["ephemeralStorage"]["#text"] !== undefined - ? output["ephemeralStorage"]["#text"] - : output["ephemeralStorage"]) == "true"; + contents.EphemeralStorage = output["ephemeralStorage"] == "true"; } if (output["instanceMatchCriteria"] !== undefined) { - contents.InstanceMatchCriteria = - output["instanceMatchCriteria"]["#text"] !== undefined - ? output["instanceMatchCriteria"]["#text"] - : output["instanceMatchCriteria"]; + contents.InstanceMatchCriteria = output["instanceMatchCriteria"]; } if (output["instancePlatform"] !== undefined) { - contents.InstancePlatform = - output["instancePlatform"]["#text"] !== undefined - ? output["instancePlatform"]["#text"] - : output["instancePlatform"]; + contents.InstancePlatform = output["instancePlatform"]; } if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output.tagSet === "") { contents.Tags = []; @@ -50041,17 +49754,10 @@ const deserializeAws_ec2CapacityReservation = ( ); } if (output["tenancy"] !== undefined) { - contents.Tenancy = - output["tenancy"]["#text"] !== undefined - ? output["tenancy"]["#text"] - : output["tenancy"]; + contents.Tenancy = output["tenancy"]; } if (output["totalInstanceCount"] !== undefined) { - contents.TotalInstanceCount = parseInt( - output["totalInstanceCount"]["#text"] !== undefined - ? output["totalInstanceCount"]["#text"] - : output["totalInstanceCount"] - ); + contents.TotalInstanceCount = parseInt(output["totalInstanceCount"]); } return contents; }; @@ -50065,10 +49771,7 @@ const deserializeAws_ec2CapacityReservationOptions = ( UsageStrategy: undefined }; if (output["usageStrategy"] !== undefined) { - contents.UsageStrategy = - output["usageStrategy"]["#text"] !== undefined - ? output["usageStrategy"]["#text"] - : output["usageStrategy"]; + contents.UsageStrategy = output["usageStrategy"]; } return contents; }; @@ -50093,9 +49796,7 @@ const deserializeAws_ec2CapacityReservationSpecificationResponse = ( }; if (output["capacityReservationPreference"] !== undefined) { contents.CapacityReservationPreference = - output["capacityReservationPreference"]["#text"] !== undefined - ? output["capacityReservationPreference"]["#text"] - : output["capacityReservationPreference"]; + output["capacityReservationPreference"]; } if (output["capacityReservationTarget"] !== undefined) { contents.CapacityReservationTarget = deserializeAws_ec2CapacityReservationTargetResponse( @@ -50115,10 +49816,7 @@ const deserializeAws_ec2CapacityReservationTargetResponse = ( CapacityReservationId: undefined }; if (output["capacityReservationId"] !== undefined) { - contents.CapacityReservationId = - output["capacityReservationId"]["#text"] !== undefined - ? output["capacityReservationId"]["#text"] - : output["capacityReservationId"]; + contents.CapacityReservationId = output["capacityReservationId"]; } return contents; }; @@ -50132,10 +49830,7 @@ const deserializeAws_ec2CertificateAuthentication = ( ClientRootCertificateChain: undefined }; if (output["clientRootCertificateChain"] !== undefined) { - contents.ClientRootCertificateChain = - output["clientRootCertificateChain"]["#text"] !== undefined - ? output["clientRootCertificateChain"]["#text"] - : output["clientRootCertificateChain"]; + contents.ClientRootCertificateChain = output["clientRootCertificateChain"]; } return contents; }; @@ -50149,10 +49844,7 @@ const deserializeAws_ec2CidrBlock = ( CidrBlock: undefined }; if (output["cidrBlock"] !== undefined) { - contents.CidrBlock = - output["cidrBlock"]["#text"] !== undefined - ? output["cidrBlock"]["#text"] - : output["cidrBlock"]; + contents.CidrBlock = output["cidrBlock"]; } return contents; }; @@ -50177,15 +49869,10 @@ const deserializeAws_ec2ClassicLinkDnsSupport = ( }; if (output["classicLinkDnsSupported"] !== undefined) { contents.ClassicLinkDnsSupported = - (output["classicLinkDnsSupported"]["#text"] !== undefined - ? output["classicLinkDnsSupported"]["#text"] - : output["classicLinkDnsSupported"]) == "true"; + output["classicLinkDnsSupported"] == "true"; } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -50223,10 +49910,7 @@ const deserializeAws_ec2ClassicLinkInstance = ( ); } if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } if (output.tagSet === "") { contents.Tags = []; @@ -50241,10 +49925,7 @@ const deserializeAws_ec2ClassicLinkInstance = ( ); } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -50267,10 +49948,7 @@ const deserializeAws_ec2ClassicLoadBalancer = ( Name: undefined }; if (output["name"] !== undefined) { - contents.Name = - output["name"]["#text"] !== undefined - ? output["name"]["#text"] - : output["name"]; + contents.Name = output["name"]; } return contents; }; @@ -50317,16 +49995,10 @@ const deserializeAws_ec2ClientCertificateRevocationListStatus = ( Message: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -50354,10 +50026,7 @@ const deserializeAws_ec2ClientVpnAuthentication = ( ); } if (output["type"] !== undefined) { - contents.Type = - output["type"]["#text"] !== undefined - ? output["type"]["#text"] - : output["type"]; + contents.Type = output["type"]; } return contents; }; @@ -50381,16 +50050,10 @@ const deserializeAws_ec2ClientVpnAuthorizationRuleStatus = ( Message: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -50416,64 +50079,34 @@ const deserializeAws_ec2ClientVpnConnection = ( Username: undefined }; if (output["clientIp"] !== undefined) { - contents.ClientIp = - output["clientIp"]["#text"] !== undefined - ? output["clientIp"]["#text"] - : output["clientIp"]; + contents.ClientIp = output["clientIp"]; } if (output["clientVpnEndpointId"] !== undefined) { - contents.ClientVpnEndpointId = - output["clientVpnEndpointId"]["#text"] !== undefined - ? output["clientVpnEndpointId"]["#text"] - : output["clientVpnEndpointId"]; + contents.ClientVpnEndpointId = output["clientVpnEndpointId"]; } if (output["commonName"] !== undefined) { - contents.CommonName = - output["commonName"]["#text"] !== undefined - ? output["commonName"]["#text"] - : output["commonName"]; + contents.CommonName = output["commonName"]; } if (output["connectionEndTime"] !== undefined) { - contents.ConnectionEndTime = - output["connectionEndTime"]["#text"] !== undefined - ? output["connectionEndTime"]["#text"] - : output["connectionEndTime"]; + contents.ConnectionEndTime = output["connectionEndTime"]; } if (output["connectionEstablishedTime"] !== undefined) { - contents.ConnectionEstablishedTime = - output["connectionEstablishedTime"]["#text"] !== undefined - ? output["connectionEstablishedTime"]["#text"] - : output["connectionEstablishedTime"]; + contents.ConnectionEstablishedTime = output["connectionEstablishedTime"]; } if (output["connectionId"] !== undefined) { - contents.ConnectionId = - output["connectionId"]["#text"] !== undefined - ? output["connectionId"]["#text"] - : output["connectionId"]; + contents.ConnectionId = output["connectionId"]; } if (output["egressBytes"] !== undefined) { - contents.EgressBytes = - output["egressBytes"]["#text"] !== undefined - ? output["egressBytes"]["#text"] - : output["egressBytes"]; + contents.EgressBytes = output["egressBytes"]; } if (output["egressPackets"] !== undefined) { - contents.EgressPackets = - output["egressPackets"]["#text"] !== undefined - ? output["egressPackets"]["#text"] - : output["egressPackets"]; + contents.EgressPackets = output["egressPackets"]; } if (output["ingressBytes"] !== undefined) { - contents.IngressBytes = - output["ingressBytes"]["#text"] !== undefined - ? output["ingressBytes"]["#text"] - : output["ingressBytes"]; + contents.IngressBytes = output["ingressBytes"]; } if (output["ingressPackets"] !== undefined) { - contents.IngressPackets = - output["ingressPackets"]["#text"] !== undefined - ? output["ingressPackets"]["#text"] - : output["ingressPackets"]; + contents.IngressPackets = output["ingressPackets"]; } if (output["status"] !== undefined) { contents.Status = deserializeAws_ec2ClientVpnConnectionStatus( @@ -50482,16 +50115,10 @@ const deserializeAws_ec2ClientVpnConnection = ( ); } if (output["timestamp"] !== undefined) { - contents.Timestamp = - output["timestamp"]["#text"] !== undefined - ? output["timestamp"]["#text"] - : output["timestamp"]; + contents.Timestamp = output["timestamp"]; } if (output["username"] !== undefined) { - contents.Username = - output["username"]["#text"] !== undefined - ? output["username"]["#text"] - : output["username"]; + contents.Username = output["username"]; } return contents; }; @@ -50515,16 +50142,10 @@ const deserializeAws_ec2ClientVpnConnectionStatus = ( Message: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -50578,16 +50199,10 @@ const deserializeAws_ec2ClientVpnEndpoint = ( ); } if (output["clientCidrBlock"] !== undefined) { - contents.ClientCidrBlock = - output["clientCidrBlock"]["#text"] !== undefined - ? output["clientCidrBlock"]["#text"] - : output["clientCidrBlock"]; + contents.ClientCidrBlock = output["clientCidrBlock"]; } if (output["clientVpnEndpointId"] !== undefined) { - contents.ClientVpnEndpointId = - output["clientVpnEndpointId"]["#text"] !== undefined - ? output["clientVpnEndpointId"]["#text"] - : output["clientVpnEndpointId"]; + contents.ClientVpnEndpointId = output["clientVpnEndpointId"]; } if (output["connectionLogOptions"] !== undefined) { contents.ConnectionLogOptions = deserializeAws_ec2ConnectionLogResponseOptions( @@ -50596,28 +50211,16 @@ const deserializeAws_ec2ClientVpnEndpoint = ( ); } if (output["creationTime"] !== undefined) { - contents.CreationTime = - output["creationTime"]["#text"] !== undefined - ? output["creationTime"]["#text"] - : output["creationTime"]; + contents.CreationTime = output["creationTime"]; } if (output["deletionTime"] !== undefined) { - contents.DeletionTime = - output["deletionTime"]["#text"] !== undefined - ? output["deletionTime"]["#text"] - : output["deletionTime"]; + contents.DeletionTime = output["deletionTime"]; } if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["dnsName"] !== undefined) { - contents.DnsName = - output["dnsName"]["#text"] !== undefined - ? output["dnsName"]["#text"] - : output["dnsName"]; + contents.DnsName = output["dnsName"]; } if (output.dnsServer === "") { contents.DnsServers = []; @@ -50632,16 +50235,10 @@ const deserializeAws_ec2ClientVpnEndpoint = ( ); } if (output["serverCertificateArn"] !== undefined) { - contents.ServerCertificateArn = - output["serverCertificateArn"]["#text"] !== undefined - ? output["serverCertificateArn"]["#text"] - : output["serverCertificateArn"]; + contents.ServerCertificateArn = output["serverCertificateArn"]; } if (output["splitTunnel"] !== undefined) { - contents.SplitTunnel = - (output["splitTunnel"]["#text"] !== undefined - ? output["splitTunnel"]["#text"] - : output["splitTunnel"]) == "true"; + contents.SplitTunnel = output["splitTunnel"] == "true"; } if (output["status"] !== undefined) { contents.Status = deserializeAws_ec2ClientVpnEndpointStatus( @@ -50662,23 +50259,13 @@ const deserializeAws_ec2ClientVpnEndpoint = ( ); } if (output["transportProtocol"] !== undefined) { - contents.TransportProtocol = - output["transportProtocol"]["#text"] !== undefined - ? output["transportProtocol"]["#text"] - : output["transportProtocol"]; + contents.TransportProtocol = output["transportProtocol"]; } if (output["vpnPort"] !== undefined) { - contents.VpnPort = parseInt( - output["vpnPort"]["#text"] !== undefined - ? output["vpnPort"]["#text"] - : output["vpnPort"] - ); + contents.VpnPort = parseInt(output["vpnPort"]); } if (output["vpnProtocol"] !== undefined) { - contents.VpnProtocol = - output["vpnProtocol"]["#text"] !== undefined - ? output["vpnProtocol"]["#text"] - : output["vpnProtocol"]; + contents.VpnProtocol = output["vpnProtocol"]; } return contents; }; @@ -50693,16 +50280,10 @@ const deserializeAws_ec2ClientVpnEndpointStatus = ( Message: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -50722,28 +50303,16 @@ const deserializeAws_ec2ClientVpnRoute = ( Type: undefined }; if (output["clientVpnEndpointId"] !== undefined) { - contents.ClientVpnEndpointId = - output["clientVpnEndpointId"]["#text"] !== undefined - ? output["clientVpnEndpointId"]["#text"] - : output["clientVpnEndpointId"]; + contents.ClientVpnEndpointId = output["clientVpnEndpointId"]; } if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["destinationCidr"] !== undefined) { - contents.DestinationCidr = - output["destinationCidr"]["#text"] !== undefined - ? output["destinationCidr"]["#text"] - : output["destinationCidr"]; + contents.DestinationCidr = output["destinationCidr"]; } if (output["origin"] !== undefined) { - contents.Origin = - output["origin"]["#text"] !== undefined - ? output["origin"]["#text"] - : output["origin"]; + contents.Origin = output["origin"]; } if (output["status"] !== undefined) { contents.Status = deserializeAws_ec2ClientVpnRouteStatus( @@ -50752,16 +50321,10 @@ const deserializeAws_ec2ClientVpnRoute = ( ); } if (output["targetSubnet"] !== undefined) { - contents.TargetSubnet = - output["targetSubnet"]["#text"] !== undefined - ? output["targetSubnet"]["#text"] - : output["targetSubnet"]; + contents.TargetSubnet = output["targetSubnet"]; } if (output["type"] !== undefined) { - contents.Type = - output["type"]["#text"] !== undefined - ? output["type"]["#text"] - : output["type"]; + contents.Type = output["type"]; } return contents; }; @@ -50785,16 +50348,10 @@ const deserializeAws_ec2ClientVpnRouteStatus = ( Message: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -50803,9 +50360,7 @@ const deserializeAws_ec2ClientVpnSecurityGroupIdSet = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2CoipAddressUsage = ( @@ -50820,28 +50375,16 @@ const deserializeAws_ec2CoipAddressUsage = ( CoIp: undefined }; if (output["allocationId"] !== undefined) { - contents.AllocationId = - output["allocationId"]["#text"] !== undefined - ? output["allocationId"]["#text"] - : output["allocationId"]; + contents.AllocationId = output["allocationId"]; } if (output["awsAccountId"] !== undefined) { - contents.AwsAccountId = - output["awsAccountId"]["#text"] !== undefined - ? output["awsAccountId"]["#text"] - : output["awsAccountId"]; + contents.AwsAccountId = output["awsAccountId"]; } if (output["awsService"] !== undefined) { - contents.AwsService = - output["awsService"]["#text"] !== undefined - ? output["awsService"]["#text"] - : output["awsService"]; + contents.AwsService = output["awsService"]; } if (output["coIp"] !== undefined) { - contents.CoIp = - output["coIp"]["#text"] !== undefined - ? output["coIp"]["#text"] - : output["coIp"]; + contents.CoIp = output["coIp"]; } return contents; }; @@ -50867,10 +50410,7 @@ const deserializeAws_ec2CoipPool = ( Tags: undefined }; if (output["localGatewayRouteTableId"] !== undefined) { - contents.LocalGatewayRouteTableId = - output["localGatewayRouteTableId"]["#text"] !== undefined - ? output["localGatewayRouteTableId"]["#text"] - : output["localGatewayRouteTableId"]; + contents.LocalGatewayRouteTableId = output["localGatewayRouteTableId"]; } if (output.poolCidrSet === "") { contents.PoolCidrs = []; @@ -50885,10 +50425,7 @@ const deserializeAws_ec2CoipPool = ( ); } if (output["poolId"] !== undefined) { - contents.PoolId = - output["poolId"]["#text"] !== undefined - ? output["poolId"]["#text"] - : output["poolId"]; + contents.PoolId = output["poolId"]; } if (output.tagSet === "") { contents.Tags = []; @@ -50924,16 +50461,10 @@ const deserializeAws_ec2ConfirmProductInstanceResult = ( Return: undefined }; if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -50949,22 +50480,13 @@ const deserializeAws_ec2ConnectionLogResponseOptions = ( Enabled: undefined }; if (output["CloudwatchLogGroup"] !== undefined) { - contents.CloudwatchLogGroup = - output["CloudwatchLogGroup"]["#text"] !== undefined - ? output["CloudwatchLogGroup"]["#text"] - : output["CloudwatchLogGroup"]; + contents.CloudwatchLogGroup = output["CloudwatchLogGroup"]; } if (output["CloudwatchLogStream"] !== undefined) { - contents.CloudwatchLogStream = - output["CloudwatchLogStream"]["#text"] !== undefined - ? output["CloudwatchLogStream"]["#text"] - : output["CloudwatchLogStream"]; + contents.CloudwatchLogStream = output["CloudwatchLogStream"]; } if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } return contents; }; @@ -50996,40 +50518,23 @@ const deserializeAws_ec2ConnectionNotification = ( ); } if (output["connectionNotificationArn"] !== undefined) { - contents.ConnectionNotificationArn = - output["connectionNotificationArn"]["#text"] !== undefined - ? output["connectionNotificationArn"]["#text"] - : output["connectionNotificationArn"]; + contents.ConnectionNotificationArn = output["connectionNotificationArn"]; } if (output["connectionNotificationId"] !== undefined) { - contents.ConnectionNotificationId = - output["connectionNotificationId"]["#text"] !== undefined - ? output["connectionNotificationId"]["#text"] - : output["connectionNotificationId"]; + contents.ConnectionNotificationId = output["connectionNotificationId"]; } if (output["connectionNotificationState"] !== undefined) { contents.ConnectionNotificationState = - output["connectionNotificationState"]["#text"] !== undefined - ? output["connectionNotificationState"]["#text"] - : output["connectionNotificationState"]; + output["connectionNotificationState"]; } if (output["connectionNotificationType"] !== undefined) { - contents.ConnectionNotificationType = - output["connectionNotificationType"]["#text"] !== undefined - ? output["connectionNotificationType"]["#text"] - : output["connectionNotificationType"]; + contents.ConnectionNotificationType = output["connectionNotificationType"]; } if (output["serviceId"] !== undefined) { - contents.ServiceId = - output["serviceId"]["#text"] !== undefined - ? output["serviceId"]["#text"] - : output["serviceId"]; + contents.ServiceId = output["serviceId"]; } if (output["vpcEndpointId"] !== undefined) { - contents.VpcEndpointId = - output["vpcEndpointId"]["#text"] !== undefined - ? output["vpcEndpointId"]["#text"] - : output["vpcEndpointId"]; + contents.VpcEndpointId = output["vpcEndpointId"]; } return contents; }; @@ -51058,16 +50563,10 @@ const deserializeAws_ec2ConversionTask = ( Tags: undefined }; if (output["conversionTaskId"] !== undefined) { - contents.ConversionTaskId = - output["conversionTaskId"]["#text"] !== undefined - ? output["conversionTaskId"]["#text"] - : output["conversionTaskId"]; + contents.ConversionTaskId = output["conversionTaskId"]; } if (output["expirationTime"] !== undefined) { - contents.ExpirationTime = - output["expirationTime"]["#text"] !== undefined - ? output["expirationTime"]["#text"] - : output["expirationTime"]; + contents.ExpirationTime = output["expirationTime"]; } if (output["importInstance"] !== undefined) { contents.ImportInstance = deserializeAws_ec2ImportInstanceTaskDetails( @@ -51082,16 +50581,10 @@ const deserializeAws_ec2ConversionTask = ( ); } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["statusMessage"] !== undefined) { - contents.StatusMessage = - output["statusMessage"]["#text"] !== undefined - ? output["statusMessage"]["#text"] - : output["statusMessage"]; + contents.StatusMessage = output["statusMessage"]; } if (output.tagSet === "") { contents.Tags = []; @@ -51117,10 +50610,7 @@ const deserializeAws_ec2CopyFpgaImageResult = ( FpgaImageId: undefined }; if (output["fpgaImageId"] !== undefined) { - contents.FpgaImageId = - output["fpgaImageId"]["#text"] !== undefined - ? output["fpgaImageId"]["#text"] - : output["fpgaImageId"]; + contents.FpgaImageId = output["fpgaImageId"]; } return contents; }; @@ -51134,10 +50624,7 @@ const deserializeAws_ec2CopyImageResult = ( ImageId: undefined }; if (output["imageId"] !== undefined) { - contents.ImageId = - output["imageId"]["#text"] !== undefined - ? output["imageId"]["#text"] - : output["imageId"]; + contents.ImageId = output["imageId"]; } return contents; }; @@ -51152,10 +50639,7 @@ const deserializeAws_ec2CopySnapshotResult = ( Tags: undefined }; if (output["snapshotId"] !== undefined) { - contents.SnapshotId = - output["snapshotId"]["#text"] !== undefined - ? output["snapshotId"]["#text"] - : output["snapshotId"]; + contents.SnapshotId = output["snapshotId"]; } if (output.tagSet === "") { contents.Tags = []; @@ -51176,9 +50660,7 @@ const deserializeAws_ec2CoreCountList = ( output: any, context: __SerdeContext ): number[] => { - return (output || []).map((entry: any) => - parseInt(entry["#text"] !== undefined ? entry["#text"] : entry) - ); + return (output || []).map((entry: any) => parseInt(entry)); }; const deserializeAws_ec2CpuOptions = ( @@ -51191,18 +50673,10 @@ const deserializeAws_ec2CpuOptions = ( ThreadsPerCore: undefined }; if (output["coreCount"] !== undefined) { - contents.CoreCount = parseInt( - output["coreCount"]["#text"] !== undefined - ? output["coreCount"]["#text"] - : output["coreCount"] - ); + contents.CoreCount = parseInt(output["coreCount"]); } if (output["threadsPerCore"] !== undefined) { - contents.ThreadsPerCore = parseInt( - output["threadsPerCore"]["#text"] !== undefined - ? output["threadsPerCore"]["#text"] - : output["threadsPerCore"] - ); + contents.ThreadsPerCore = parseInt(output["threadsPerCore"]); } return contents; }; @@ -51235,16 +50709,10 @@ const deserializeAws_ec2CreateClientVpnEndpointResult = ( Status: undefined }; if (output["clientVpnEndpointId"] !== undefined) { - contents.ClientVpnEndpointId = - output["clientVpnEndpointId"]["#text"] !== undefined - ? output["clientVpnEndpointId"]["#text"] - : output["clientVpnEndpointId"]; + contents.ClientVpnEndpointId = output["clientVpnEndpointId"]; } if (output["dnsName"] !== undefined) { - contents.DnsName = - output["dnsName"]["#text"] !== undefined - ? output["dnsName"]["#text"] - : output["dnsName"]; + contents.DnsName = output["dnsName"]; } if (output["status"] !== undefined) { contents.Status = deserializeAws_ec2ClientVpnEndpointStatus( @@ -51344,10 +50812,7 @@ const deserializeAws_ec2CreateEgressOnlyInternetGatewayResult = ( EgressOnlyInternetGateway: undefined }; if (output["clientToken"] !== undefined) { - contents.ClientToken = - output["clientToken"]["#text"] !== undefined - ? output["clientToken"]["#text"] - : output["clientToken"]; + contents.ClientToken = output["clientToken"]; } if (output["egressOnlyInternetGateway"] !== undefined) { contents.EgressOnlyInternetGateway = deserializeAws_ec2EgressOnlyInternetGateway( @@ -51370,16 +50835,10 @@ const deserializeAws_ec2CreateFleetError = ( Lifecycle: undefined }; if (output["errorCode"] !== undefined) { - contents.ErrorCode = - output["errorCode"]["#text"] !== undefined - ? output["errorCode"]["#text"] - : output["errorCode"]; + contents.ErrorCode = output["errorCode"]; } if (output["errorMessage"] !== undefined) { - contents.ErrorMessage = - output["errorMessage"]["#text"] !== undefined - ? output["errorMessage"]["#text"] - : output["errorMessage"]; + contents.ErrorMessage = output["errorMessage"]; } if (output["launchTemplateAndOverrides"] !== undefined) { contents.LaunchTemplateAndOverrides = deserializeAws_ec2LaunchTemplateAndOverridesResponse( @@ -51388,10 +50847,7 @@ const deserializeAws_ec2CreateFleetError = ( ); } if (output["lifecycle"] !== undefined) { - contents.Lifecycle = - output["lifecycle"]["#text"] !== undefined - ? output["lifecycle"]["#text"] - : output["lifecycle"]; + contents.Lifecycle = output["lifecycle"]; } return contents; }; @@ -51430,10 +50886,7 @@ const deserializeAws_ec2CreateFleetInstance = ( ); } if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output["launchTemplateAndOverrides"] !== undefined) { contents.LaunchTemplateAndOverrides = deserializeAws_ec2LaunchTemplateAndOverridesResponse( @@ -51442,16 +50895,10 @@ const deserializeAws_ec2CreateFleetInstance = ( ); } if (output["lifecycle"] !== undefined) { - contents.Lifecycle = - output["lifecycle"]["#text"] !== undefined - ? output["lifecycle"]["#text"] - : output["lifecycle"]; + contents.Lifecycle = output["lifecycle"]; } if (output["platform"] !== undefined) { - contents.Platform = - output["platform"]["#text"] !== undefined - ? output["platform"]["#text"] - : output["platform"]; + contents.Platform = output["platform"]; } return contents; }; @@ -51488,10 +50935,7 @@ const deserializeAws_ec2CreateFleetResult = ( ); } if (output["fleetId"] !== undefined) { - contents.FleetId = - output["fleetId"]["#text"] !== undefined - ? output["fleetId"]["#text"] - : output["fleetId"]; + contents.FleetId = output["fleetId"]; } if (output.fleetInstanceSet === "") { contents.Instances = []; @@ -51519,10 +50963,7 @@ const deserializeAws_ec2CreateFlowLogsResult = ( Unsuccessful: undefined }; if (output["clientToken"] !== undefined) { - contents.ClientToken = - output["clientToken"]["#text"] !== undefined - ? output["clientToken"]["#text"] - : output["clientToken"]; + contents.ClientToken = output["clientToken"]; } if (output.flowLogIdSet === "") { contents.FlowLogIds = []; @@ -51561,16 +51002,10 @@ const deserializeAws_ec2CreateFpgaImageResult = ( FpgaImageId: undefined }; if (output["fpgaImageGlobalId"] !== undefined) { - contents.FpgaImageGlobalId = - output["fpgaImageGlobalId"]["#text"] !== undefined - ? output["fpgaImageGlobalId"]["#text"] - : output["fpgaImageGlobalId"]; + contents.FpgaImageGlobalId = output["fpgaImageGlobalId"]; } if (output["fpgaImageId"] !== undefined) { - contents.FpgaImageId = - output["fpgaImageId"]["#text"] !== undefined - ? output["fpgaImageId"]["#text"] - : output["fpgaImageId"]; + contents.FpgaImageId = output["fpgaImageId"]; } return contents; }; @@ -51584,10 +51019,7 @@ const deserializeAws_ec2CreateImageResult = ( ImageId: undefined }; if (output["imageId"] !== undefined) { - contents.ImageId = - output["imageId"]["#text"] !== undefined - ? output["imageId"]["#text"] - : output["imageId"]; + contents.ImageId = output["imageId"]; } return contents; }; @@ -51704,10 +51136,7 @@ const deserializeAws_ec2CreateNatGatewayResult = ( NatGateway: undefined }; if (output["clientToken"] !== undefined) { - contents.ClientToken = - output["clientToken"]["#text"] !== undefined - ? output["clientToken"]["#text"] - : output["clientToken"]; + contents.ClientToken = output["clientToken"]; } if (output["natGateway"] !== undefined) { contents.NatGateway = deserializeAws_ec2NatGateway( @@ -51801,10 +51230,7 @@ const deserializeAws_ec2CreateRouteResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -51835,10 +51261,7 @@ const deserializeAws_ec2CreateSecurityGroupResult = ( GroupId: undefined }; if (output["groupId"] !== undefined) { - contents.GroupId = - output["groupId"]["#text"] !== undefined - ? output["groupId"]["#text"] - : output["groupId"]; + contents.GroupId = output["groupId"]; } return contents; }; @@ -51907,10 +51330,7 @@ const deserializeAws_ec2CreateTrafficMirrorFilterResult = ( TrafficMirrorFilter: undefined }; if (output["clientToken"] !== undefined) { - contents.ClientToken = - output["clientToken"]["#text"] !== undefined - ? output["clientToken"]["#text"] - : output["clientToken"]; + contents.ClientToken = output["clientToken"]; } if (output["trafficMirrorFilter"] !== undefined) { contents.TrafficMirrorFilter = deserializeAws_ec2TrafficMirrorFilter( @@ -51931,10 +51351,7 @@ const deserializeAws_ec2CreateTrafficMirrorFilterRuleResult = ( TrafficMirrorFilterRule: undefined }; if (output["clientToken"] !== undefined) { - contents.ClientToken = - output["clientToken"]["#text"] !== undefined - ? output["clientToken"]["#text"] - : output["clientToken"]; + contents.ClientToken = output["clientToken"]; } if (output["trafficMirrorFilterRule"] !== undefined) { contents.TrafficMirrorFilterRule = deserializeAws_ec2TrafficMirrorFilterRule( @@ -51955,10 +51372,7 @@ const deserializeAws_ec2CreateTrafficMirrorSessionResult = ( TrafficMirrorSession: undefined }; if (output["clientToken"] !== undefined) { - contents.ClientToken = - output["clientToken"]["#text"] !== undefined - ? output["clientToken"]["#text"] - : output["clientToken"]; + contents.ClientToken = output["clientToken"]; } if (output["trafficMirrorSession"] !== undefined) { contents.TrafficMirrorSession = deserializeAws_ec2TrafficMirrorSession( @@ -51979,10 +51393,7 @@ const deserializeAws_ec2CreateTrafficMirrorTargetResult = ( TrafficMirrorTarget: undefined }; if (output["clientToken"] !== undefined) { - contents.ClientToken = - output["clientToken"]["#text"] !== undefined - ? output["clientToken"]["#text"] - : output["clientToken"]; + contents.ClientToken = output["clientToken"]; } if (output["trafficMirrorTarget"] !== undefined) { contents.TrafficMirrorTarget = deserializeAws_ec2TrafficMirrorTarget( @@ -52105,16 +51516,10 @@ const deserializeAws_ec2CreateVolumePermission = ( UserId: undefined }; if (output["group"] !== undefined) { - contents.Group = - output["group"]["#text"] !== undefined - ? output["group"]["#text"] - : output["group"]; + contents.Group = output["group"]; } if (output["userId"] !== undefined) { - contents.UserId = - output["userId"]["#text"] !== undefined - ? output["userId"]["#text"] - : output["userId"]; + contents.UserId = output["userId"]; } return contents; }; @@ -52138,10 +51543,7 @@ const deserializeAws_ec2CreateVpcEndpointConnectionNotificationResult = ( ConnectionNotification: undefined }; if (output["clientToken"] !== undefined) { - contents.ClientToken = - output["clientToken"]["#text"] !== undefined - ? output["clientToken"]["#text"] - : output["clientToken"]; + contents.ClientToken = output["clientToken"]; } if (output["connectionNotification"] !== undefined) { contents.ConnectionNotification = deserializeAws_ec2ConnectionNotification( @@ -52162,10 +51564,7 @@ const deserializeAws_ec2CreateVpcEndpointResult = ( VpcEndpoint: undefined }; if (output["clientToken"] !== undefined) { - contents.ClientToken = - output["clientToken"]["#text"] !== undefined - ? output["clientToken"]["#text"] - : output["clientToken"]; + contents.ClientToken = output["clientToken"]; } if (output["vpcEndpoint"] !== undefined) { contents.VpcEndpoint = deserializeAws_ec2VpcEndpoint( @@ -52186,10 +51585,7 @@ const deserializeAws_ec2CreateVpcEndpointServiceConfigurationResult = ( ServiceConfiguration: undefined }; if (output["clientToken"] !== undefined) { - contents.ClientToken = - output["clientToken"]["#text"] !== undefined - ? output["clientToken"]["#text"] - : output["clientToken"]; + contents.ClientToken = output["clientToken"]; } if (output["serviceConfiguration"] !== undefined) { contents.ServiceConfiguration = deserializeAws_ec2ServiceConfiguration( @@ -52274,10 +51670,7 @@ const deserializeAws_ec2CreditSpecification = ( CpuCredits: undefined }; if (output["cpuCredits"] !== undefined) { - contents.CpuCredits = - output["cpuCredits"]["#text"] !== undefined - ? output["cpuCredits"]["#text"] - : output["cpuCredits"]; + contents.CpuCredits = output["cpuCredits"]; } return contents; }; @@ -52298,40 +51691,22 @@ const deserializeAws_ec2CustomerGateway = ( Type: undefined }; if (output["bgpAsn"] !== undefined) { - contents.BgpAsn = - output["bgpAsn"]["#text"] !== undefined - ? output["bgpAsn"]["#text"] - : output["bgpAsn"]; + contents.BgpAsn = output["bgpAsn"]; } if (output["certificateArn"] !== undefined) { - contents.CertificateArn = - output["certificateArn"]["#text"] !== undefined - ? output["certificateArn"]["#text"] - : output["certificateArn"]; + contents.CertificateArn = output["certificateArn"]; } if (output["customerGatewayId"] !== undefined) { - contents.CustomerGatewayId = - output["customerGatewayId"]["#text"] !== undefined - ? output["customerGatewayId"]["#text"] - : output["customerGatewayId"]; + contents.CustomerGatewayId = output["customerGatewayId"]; } if (output["deviceName"] !== undefined) { - contents.DeviceName = - output["deviceName"]["#text"] !== undefined - ? output["deviceName"]["#text"] - : output["deviceName"]; + contents.DeviceName = output["deviceName"]; } if (output["ipAddress"] !== undefined) { - contents.IpAddress = - output["ipAddress"]["#text"] !== undefined - ? output["ipAddress"]["#text"] - : output["ipAddress"]; + contents.IpAddress = output["ipAddress"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output.tagSet === "") { contents.Tags = []; @@ -52346,10 +51721,7 @@ const deserializeAws_ec2CustomerGateway = ( ); } if (output["type"] !== undefined) { - contents.Type = - output["type"]["#text"] !== undefined - ? output["type"]["#text"] - : output["type"]; + contents.Type = output["type"]; } return contents; }; @@ -52406,10 +51778,7 @@ const deserializeAws_ec2DeleteEgressOnlyInternetGatewayResult = ( ReturnCode: undefined }; if (output["returnCode"] !== undefined) { - contents.ReturnCode = - (output["returnCode"]["#text"] !== undefined - ? output["returnCode"]["#text"] - : output["returnCode"]) == "true"; + contents.ReturnCode = output["returnCode"] == "true"; } return contents; }; @@ -52424,16 +51793,10 @@ const deserializeAws_ec2DeleteFleetError = ( Message: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -52454,10 +51817,7 @@ const deserializeAws_ec2DeleteFleetErrorItem = ( ); } if (output["fleetId"] !== undefined) { - contents.FleetId = - output["fleetId"]["#text"] !== undefined - ? output["fleetId"]["#text"] - : output["fleetId"]; + contents.FleetId = output["fleetId"]; } return contents; }; @@ -52482,22 +51842,13 @@ const deserializeAws_ec2DeleteFleetSuccessItem = ( PreviousFleetState: undefined }; if (output["currentFleetState"] !== undefined) { - contents.CurrentFleetState = - output["currentFleetState"]["#text"] !== undefined - ? output["currentFleetState"]["#text"] - : output["currentFleetState"]; + contents.CurrentFleetState = output["currentFleetState"]; } if (output["fleetId"] !== undefined) { - contents.FleetId = - output["fleetId"]["#text"] !== undefined - ? output["fleetId"]["#text"] - : output["fleetId"]; + contents.FleetId = output["fleetId"]; } if (output["previousFleetState"] !== undefined) { - contents.PreviousFleetState = - output["previousFleetState"]["#text"] !== undefined - ? output["previousFleetState"]["#text"] - : output["previousFleetState"]; + contents.PreviousFleetState = output["previousFleetState"]; } return contents; }; @@ -52579,10 +51930,7 @@ const deserializeAws_ec2DeleteFpgaImageResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -52616,16 +51964,10 @@ const deserializeAws_ec2DeleteLaunchTemplateVersionsResponseErrorItem = ( VersionNumber: undefined }; if (output["launchTemplateId"] !== undefined) { - contents.LaunchTemplateId = - output["launchTemplateId"]["#text"] !== undefined - ? output["launchTemplateId"]["#text"] - : output["launchTemplateId"]; + contents.LaunchTemplateId = output["launchTemplateId"]; } if (output["launchTemplateName"] !== undefined) { - contents.LaunchTemplateName = - output["launchTemplateName"]["#text"] !== undefined - ? output["launchTemplateName"]["#text"] - : output["launchTemplateName"]; + contents.LaunchTemplateName = output["launchTemplateName"]; } if (output["responseError"] !== undefined) { contents.ResponseError = deserializeAws_ec2ResponseError( @@ -52634,11 +51976,7 @@ const deserializeAws_ec2DeleteLaunchTemplateVersionsResponseErrorItem = ( ); } if (output["versionNumber"] !== undefined) { - contents.VersionNumber = parseInt( - output["versionNumber"]["#text"] !== undefined - ? output["versionNumber"]["#text"] - : output["versionNumber"] - ); + contents.VersionNumber = parseInt(output["versionNumber"]); } return contents; }; @@ -52666,23 +52004,13 @@ const deserializeAws_ec2DeleteLaunchTemplateVersionsResponseSuccessItem = ( VersionNumber: undefined }; if (output["launchTemplateId"] !== undefined) { - contents.LaunchTemplateId = - output["launchTemplateId"]["#text"] !== undefined - ? output["launchTemplateId"]["#text"] - : output["launchTemplateId"]; + contents.LaunchTemplateId = output["launchTemplateId"]; } if (output["launchTemplateName"] !== undefined) { - contents.LaunchTemplateName = - output["launchTemplateName"]["#text"] !== undefined - ? output["launchTemplateName"]["#text"] - : output["launchTemplateName"]; + contents.LaunchTemplateName = output["launchTemplateName"]; } if (output["versionNumber"] !== undefined) { - contents.VersionNumber = parseInt( - output["versionNumber"]["#text"] !== undefined - ? output["versionNumber"]["#text"] - : output["versionNumber"] - ); + contents.VersionNumber = parseInt(output["versionNumber"]); } return contents; }; @@ -52783,10 +52111,7 @@ const deserializeAws_ec2DeleteNatGatewayResult = ( NatGatewayId: undefined }; if (output["natGatewayId"] !== undefined) { - contents.NatGatewayId = - output["natGatewayId"]["#text"] !== undefined - ? output["natGatewayId"]["#text"] - : output["natGatewayId"]; + contents.NatGatewayId = output["natGatewayId"]; } return contents; }; @@ -52800,10 +52125,7 @@ const deserializeAws_ec2DeleteNetworkInterfacePermissionResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -52818,16 +52140,10 @@ const deserializeAws_ec2DeleteQueuedReservedInstancesError = ( Message: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -52879,10 +52195,7 @@ const deserializeAws_ec2DeleteTrafficMirrorFilterResult = ( TrafficMirrorFilterId: undefined }; if (output["trafficMirrorFilterId"] !== undefined) { - contents.TrafficMirrorFilterId = - output["trafficMirrorFilterId"]["#text"] !== undefined - ? output["trafficMirrorFilterId"]["#text"] - : output["trafficMirrorFilterId"]; + contents.TrafficMirrorFilterId = output["trafficMirrorFilterId"]; } return contents; }; @@ -52896,10 +52209,7 @@ const deserializeAws_ec2DeleteTrafficMirrorFilterRuleResult = ( TrafficMirrorFilterRuleId: undefined }; if (output["trafficMirrorFilterRuleId"] !== undefined) { - contents.TrafficMirrorFilterRuleId = - output["trafficMirrorFilterRuleId"]["#text"] !== undefined - ? output["trafficMirrorFilterRuleId"]["#text"] - : output["trafficMirrorFilterRuleId"]; + contents.TrafficMirrorFilterRuleId = output["trafficMirrorFilterRuleId"]; } return contents; }; @@ -52913,10 +52223,7 @@ const deserializeAws_ec2DeleteTrafficMirrorSessionResult = ( TrafficMirrorSessionId: undefined }; if (output["trafficMirrorSessionId"] !== undefined) { - contents.TrafficMirrorSessionId = - output["trafficMirrorSessionId"]["#text"] !== undefined - ? output["trafficMirrorSessionId"]["#text"] - : output["trafficMirrorSessionId"]; + contents.TrafficMirrorSessionId = output["trafficMirrorSessionId"]; } return contents; }; @@ -52930,10 +52237,7 @@ const deserializeAws_ec2DeleteTrafficMirrorTargetResult = ( TrafficMirrorTargetId: undefined }; if (output["trafficMirrorTargetId"] !== undefined) { - contents.TrafficMirrorTargetId = - output["trafficMirrorTargetId"]["#text"] !== undefined - ? output["trafficMirrorTargetId"]["#text"] - : output["trafficMirrorTargetId"]; + contents.TrafficMirrorTargetId = output["trafficMirrorTargetId"]; } return contents; }; @@ -53118,10 +52422,7 @@ const deserializeAws_ec2DeleteVpcPeeringConnectionResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -53245,10 +52546,7 @@ const deserializeAws_ec2DescribeAggregateIdFormatResult = ( ); } if (output["useLongIdsAggregated"] !== undefined) { - contents.UseLongIdsAggregated = - (output["useLongIdsAggregated"]["#text"] !== undefined - ? output["useLongIdsAggregated"]["#text"] - : output["useLongIdsAggregated"]) == "true"; + contents.UseLongIdsAggregated = output["useLongIdsAggregated"] == "true"; } return contents; }; @@ -53321,10 +52619,7 @@ const deserializeAws_ec2DescribeByoipCidrsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -53351,10 +52646,7 @@ const deserializeAws_ec2DescribeCapacityReservationsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -53381,10 +52673,7 @@ const deserializeAws_ec2DescribeClassicLinkInstancesResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -53411,10 +52700,7 @@ const deserializeAws_ec2DescribeClientVpnAuthorizationRulesResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -53441,10 +52727,7 @@ const deserializeAws_ec2DescribeClientVpnConnectionsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -53471,10 +52754,7 @@ const deserializeAws_ec2DescribeClientVpnEndpointsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -53489,10 +52769,7 @@ const deserializeAws_ec2DescribeClientVpnRoutesResult = ( Routes: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.routes === "") { contents.Routes = []; @@ -53531,10 +52808,7 @@ const deserializeAws_ec2DescribeClientVpnTargetNetworksResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -53561,10 +52835,7 @@ const deserializeAws_ec2DescribeCoipPoolsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -53646,10 +52917,7 @@ const deserializeAws_ec2DescribeDhcpOptionsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -53676,10 +52944,7 @@ const deserializeAws_ec2DescribeEgressOnlyInternetGatewaysResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -53707,17 +52972,10 @@ const deserializeAws_ec2DescribeElasticGpusResult = ( ); } if (output["maxResults"] !== undefined) { - contents.MaxResults = parseInt( - output["maxResults"]["#text"] !== undefined - ? output["maxResults"]["#text"] - : output["maxResults"] - ); + contents.MaxResults = parseInt(output["maxResults"]); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -53744,10 +53002,7 @@ const deserializeAws_ec2DescribeExportImageTasksResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -53794,10 +53049,7 @@ const deserializeAws_ec2DescribeFastSnapshotRestoreSuccessItem = ( StateTransitionReason: undefined }; if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["disabledTime"] !== undefined) { contents.DisabledTime = new Date(output["disabledTime"]); @@ -53815,34 +53067,19 @@ const deserializeAws_ec2DescribeFastSnapshotRestoreSuccessItem = ( contents.OptimizingTime = new Date(output["optimizingTime"]); } if (output["ownerAlias"] !== undefined) { - contents.OwnerAlias = - output["ownerAlias"]["#text"] !== undefined - ? output["ownerAlias"]["#text"] - : output["ownerAlias"]; + contents.OwnerAlias = output["ownerAlias"]; } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output["snapshotId"] !== undefined) { - contents.SnapshotId = - output["snapshotId"]["#text"] !== undefined - ? output["snapshotId"]["#text"] - : output["snapshotId"]; + contents.SnapshotId = output["snapshotId"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["stateTransitionReason"] !== undefined) { - contents.StateTransitionReason = - output["stateTransitionReason"]["#text"] !== undefined - ? output["stateTransitionReason"]["#text"] - : output["stateTransitionReason"]; + contents.StateTransitionReason = output["stateTransitionReason"]; } return contents; }; @@ -53878,10 +53115,7 @@ const deserializeAws_ec2DescribeFastSnapshotRestoresResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -53898,16 +53132,10 @@ const deserializeAws_ec2DescribeFleetError = ( Lifecycle: undefined }; if (output["errorCode"] !== undefined) { - contents.ErrorCode = - output["errorCode"]["#text"] !== undefined - ? output["errorCode"]["#text"] - : output["errorCode"]; + contents.ErrorCode = output["errorCode"]; } if (output["errorMessage"] !== undefined) { - contents.ErrorMessage = - output["errorMessage"]["#text"] !== undefined - ? output["errorMessage"]["#text"] - : output["errorMessage"]; + contents.ErrorMessage = output["errorMessage"]; } if (output["launchTemplateAndOverrides"] !== undefined) { contents.LaunchTemplateAndOverrides = deserializeAws_ec2LaunchTemplateAndOverridesResponse( @@ -53916,10 +53144,7 @@ const deserializeAws_ec2DescribeFleetError = ( ); } if (output["lifecycle"] !== undefined) { - contents.Lifecycle = - output["lifecycle"]["#text"] !== undefined - ? output["lifecycle"]["#text"] - : output["lifecycle"]; + contents.Lifecycle = output["lifecycle"]; } return contents; }; @@ -53937,10 +53162,7 @@ const deserializeAws_ec2DescribeFleetHistoryResult = ( StartTime: undefined }; if (output["fleetId"] !== undefined) { - contents.FleetId = - output["fleetId"]["#text"] !== undefined - ? output["fleetId"]["#text"] - : output["fleetId"]; + contents.FleetId = output["fleetId"]; } if (output.historyRecordSet === "") { contents.HistoryRecords = []; @@ -53958,10 +53180,7 @@ const deserializeAws_ec2DescribeFleetHistoryResult = ( contents.LastEvaluatedTime = new Date(output["lastEvaluatedTime"]); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output["startTime"] !== undefined) { contents.StartTime = new Date(output["startTime"]); @@ -53992,16 +53211,10 @@ const deserializeAws_ec2DescribeFleetInstancesResult = ( ); } if (output["fleetId"] !== undefined) { - contents.FleetId = - output["fleetId"]["#text"] !== undefined - ? output["fleetId"]["#text"] - : output["fleetId"]; + contents.FleetId = output["fleetId"]; } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54040,10 +53253,7 @@ const deserializeAws_ec2DescribeFleetsInstances = ( ); } if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output["launchTemplateAndOverrides"] !== undefined) { contents.LaunchTemplateAndOverrides = deserializeAws_ec2LaunchTemplateAndOverridesResponse( @@ -54052,16 +53262,10 @@ const deserializeAws_ec2DescribeFleetsInstances = ( ); } if (output["lifecycle"] !== undefined) { - contents.Lifecycle = - output["lifecycle"]["#text"] !== undefined - ? output["lifecycle"]["#text"] - : output["lifecycle"]; + contents.Lifecycle = output["lifecycle"]; } if (output["platform"] !== undefined) { - contents.Platform = - output["platform"]["#text"] !== undefined - ? output["platform"]["#text"] - : output["platform"]; + contents.Platform = output["platform"]; } return contents; }; @@ -54097,10 +53301,7 @@ const deserializeAws_ec2DescribeFleetsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54127,10 +53328,7 @@ const deserializeAws_ec2DescribeFlowLogsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54174,10 +53372,7 @@ const deserializeAws_ec2DescribeFpgaImagesResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54192,10 +53387,7 @@ const deserializeAws_ec2DescribeHostReservationOfferingsResult = ( OfferingSet: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.offeringSet === "") { contents.OfferingSet = []; @@ -54234,10 +53426,7 @@ const deserializeAws_ec2DescribeHostReservationsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54264,10 +53453,7 @@ const deserializeAws_ec2DescribeHostsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54296,10 +53482,7 @@ const deserializeAws_ec2DescribeIamInstanceProfileAssociationsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54395,10 +53578,7 @@ const deserializeAws_ec2DescribeImportImageTasksResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54425,10 +53605,7 @@ const deserializeAws_ec2DescribeImportSnapshotTasksResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54455,10 +53632,7 @@ const deserializeAws_ec2DescribeInstanceCreditSpecificationsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54485,10 +53659,7 @@ const deserializeAws_ec2DescribeInstanceStatusResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54515,10 +53686,7 @@ const deserializeAws_ec2DescribeInstanceTypeOfferingsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54545,10 +53713,7 @@ const deserializeAws_ec2DescribeInstanceTypesResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54563,10 +53728,7 @@ const deserializeAws_ec2DescribeInstancesResult = ( Reservations: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.reservationSet === "") { contents.Reservations = []; @@ -54605,10 +53767,7 @@ const deserializeAws_ec2DescribeInternetGatewaysResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54635,10 +53794,7 @@ const deserializeAws_ec2DescribeIpv6PoolsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54688,10 +53844,7 @@ const deserializeAws_ec2DescribeLaunchTemplateVersionsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54718,10 +53871,7 @@ const deserializeAws_ec2DescribeLaunchTemplatesResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54756,10 +53906,7 @@ const deserializeAws_ec2DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssoc ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54788,10 +53935,7 @@ const deserializeAws_ec2DescribeLocalGatewayRouteTableVpcAssociationsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54818,10 +53962,7 @@ const deserializeAws_ec2DescribeLocalGatewayRouteTablesResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54850,10 +53991,7 @@ const deserializeAws_ec2DescribeLocalGatewayVirtualInterfaceGroupsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54880,10 +54018,7 @@ const deserializeAws_ec2DescribeLocalGatewayVirtualInterfacesResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54910,10 +54045,7 @@ const deserializeAws_ec2DescribeLocalGatewaysResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54940,10 +54072,7 @@ const deserializeAws_ec2DescribeMovingAddressesResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -54970,10 +54099,7 @@ const deserializeAws_ec2DescribeNatGatewaysResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -55000,10 +54126,7 @@ const deserializeAws_ec2DescribeNetworkAclsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -55045,10 +54168,7 @@ const deserializeAws_ec2DescribeNetworkInterfaceAttributeResult = ( ); } if (output["networkInterfaceId"] !== undefined) { - contents.NetworkInterfaceId = - output["networkInterfaceId"]["#text"] !== undefined - ? output["networkInterfaceId"]["#text"] - : output["networkInterfaceId"]; + contents.NetworkInterfaceId = output["networkInterfaceId"]; } if (output["sourceDestCheck"] !== undefined) { contents.SourceDestCheck = deserializeAws_ec2AttributeBooleanValue( @@ -55081,10 +54201,7 @@ const deserializeAws_ec2DescribeNetworkInterfacePermissionsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -55111,10 +54228,7 @@ const deserializeAws_ec2DescribeNetworkInterfacesResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -55152,10 +54266,7 @@ const deserializeAws_ec2DescribePrefixListsResult = ( PrefixLists: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.prefixListSet === "") { contents.PrefixLists = []; @@ -55182,10 +54293,7 @@ const deserializeAws_ec2DescribePrincipalIdFormatResult = ( Principals: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.principalSet === "") { contents.Principals = []; @@ -55212,10 +54320,7 @@ const deserializeAws_ec2DescribePublicIpv4PoolsResult = ( PublicIpv4Pools: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.publicIpv4PoolSet === "") { contents.PublicIpv4Pools = []; @@ -55288,10 +54393,7 @@ const deserializeAws_ec2DescribeReservedInstancesModificationsResult = ( ReservedInstancesModifications: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.reservedInstancesModificationsSet === "") { contents.ReservedInstancesModifications = []; @@ -55320,10 +54422,7 @@ const deserializeAws_ec2DescribeReservedInstancesOfferingsResult = ( ReservedInstancesOfferings: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.reservedInstancesOfferingsSet === "") { contents.ReservedInstancesOfferings = []; @@ -55373,10 +54472,7 @@ const deserializeAws_ec2DescribeRouteTablesResult = ( RouteTables: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.routeTableSet === "") { contents.RouteTables = []; @@ -55403,10 +54499,7 @@ const deserializeAws_ec2DescribeScheduledInstanceAvailabilityResult = ( ScheduledInstanceAvailabilitySet: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.scheduledInstanceAvailabilitySet === "") { contents.ScheduledInstanceAvailabilitySet = []; @@ -55435,10 +54528,7 @@ const deserializeAws_ec2DescribeScheduledInstancesResult = ( ScheduledInstanceSet: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.scheduledInstanceSet === "") { contents.ScheduledInstanceSet = []; @@ -55488,10 +54578,7 @@ const deserializeAws_ec2DescribeSecurityGroupsResult = ( SecurityGroups: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.securityGroupInfo === "") { contents.SecurityGroups = []; @@ -55543,10 +54630,7 @@ const deserializeAws_ec2DescribeSnapshotAttributeResult = ( ); } if (output["snapshotId"] !== undefined) { - contents.SnapshotId = - output["snapshotId"]["#text"] !== undefined - ? output["snapshotId"]["#text"] - : output["snapshotId"]; + contents.SnapshotId = output["snapshotId"]; } return contents; }; @@ -55561,10 +54645,7 @@ const deserializeAws_ec2DescribeSnapshotsResult = ( Snapshots: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.snapshotSet === "") { contents.Snapshots = []; @@ -55621,16 +54702,10 @@ const deserializeAws_ec2DescribeSpotFleetInstancesResponse = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output["spotFleetRequestId"] !== undefined) { - contents.SpotFleetRequestId = - output["spotFleetRequestId"]["#text"] !== undefined - ? output["spotFleetRequestId"]["#text"] - : output["spotFleetRequestId"]; + contents.SpotFleetRequestId = output["spotFleetRequestId"]; } return contents; }; @@ -55663,16 +54738,10 @@ const deserializeAws_ec2DescribeSpotFleetRequestHistoryResponse = ( contents.LastEvaluatedTime = new Date(output["lastEvaluatedTime"]); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output["spotFleetRequestId"] !== undefined) { - contents.SpotFleetRequestId = - output["spotFleetRequestId"]["#text"] !== undefined - ? output["spotFleetRequestId"]["#text"] - : output["spotFleetRequestId"]; + contents.SpotFleetRequestId = output["spotFleetRequestId"]; } if (output["startTime"] !== undefined) { contents.StartTime = new Date(output["startTime"]); @@ -55690,10 +54759,7 @@ const deserializeAws_ec2DescribeSpotFleetRequestsResponse = ( SpotFleetRequestConfigs: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.spotFleetRequestConfigSet === "") { contents.SpotFleetRequestConfigs = []; @@ -55720,10 +54786,7 @@ const deserializeAws_ec2DescribeSpotInstanceRequestsResult = ( SpotInstanceRequests: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.spotInstanceRequestSet === "") { contents.SpotInstanceRequests = []; @@ -55750,10 +54813,7 @@ const deserializeAws_ec2DescribeSpotPriceHistoryResult = ( SpotPriceHistory: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.spotPriceHistorySet === "") { contents.SpotPriceHistory = []; @@ -55780,10 +54840,7 @@ const deserializeAws_ec2DescribeStaleSecurityGroupsResult = ( StaleSecurityGroupSet: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.staleSecurityGroupSet === "") { contents.StaleSecurityGroupSet = []; @@ -55810,10 +54867,7 @@ const deserializeAws_ec2DescribeSubnetsResult = ( Subnets: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.subnetSet === "") { contents.Subnets = []; @@ -55840,10 +54894,7 @@ const deserializeAws_ec2DescribeTagsResult = ( Tags: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.tagSet === "") { contents.Tags = []; @@ -55870,10 +54921,7 @@ const deserializeAws_ec2DescribeTrafficMirrorFiltersResult = ( TrafficMirrorFilters: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.trafficMirrorFilterSet === "") { contents.TrafficMirrorFilters = []; @@ -55900,10 +54948,7 @@ const deserializeAws_ec2DescribeTrafficMirrorSessionsResult = ( TrafficMirrorSessions: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.trafficMirrorSessionSet === "") { contents.TrafficMirrorSessions = []; @@ -55930,10 +54975,7 @@ const deserializeAws_ec2DescribeTrafficMirrorTargetsResult = ( TrafficMirrorTargets: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.trafficMirrorTargetSet === "") { contents.TrafficMirrorTargets = []; @@ -55960,10 +55002,7 @@ const deserializeAws_ec2DescribeTransitGatewayAttachmentsResult = ( TransitGatewayAttachments: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.transitGatewayAttachments === "") { contents.TransitGatewayAttachments = []; @@ -55990,10 +55029,7 @@ const deserializeAws_ec2DescribeTransitGatewayMulticastDomainsResult = ( TransitGatewayMulticastDomains: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.transitGatewayMulticastDomains === "") { contents.TransitGatewayMulticastDomains = []; @@ -56020,10 +55056,7 @@ const deserializeAws_ec2DescribeTransitGatewayPeeringAttachmentsResult = ( TransitGatewayPeeringAttachments: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.transitGatewayPeeringAttachments === "") { contents.TransitGatewayPeeringAttachments = []; @@ -56052,10 +55085,7 @@ const deserializeAws_ec2DescribeTransitGatewayRouteTablesResult = ( TransitGatewayRouteTables: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.transitGatewayRouteTables === "") { contents.TransitGatewayRouteTables = []; @@ -56082,10 +55112,7 @@ const deserializeAws_ec2DescribeTransitGatewayVpcAttachmentsResult = ( TransitGatewayVpcAttachments: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.transitGatewayVpcAttachments === "") { contents.TransitGatewayVpcAttachments = []; @@ -56112,10 +55139,7 @@ const deserializeAws_ec2DescribeTransitGatewaysResult = ( TransitGateways: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.transitGatewaySet === "") { contents.TransitGateways = []; @@ -56161,10 +55185,7 @@ const deserializeAws_ec2DescribeVolumeAttributeResult = ( ); } if (output["volumeId"] !== undefined) { - contents.VolumeId = - output["volumeId"]["#text"] !== undefined - ? output["volumeId"]["#text"] - : output["volumeId"]; + contents.VolumeId = output["volumeId"]; } return contents; }; @@ -56179,10 +55200,7 @@ const deserializeAws_ec2DescribeVolumeStatusResult = ( VolumeStatuses: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.volumeStatusSet === "") { contents.VolumeStatuses = []; @@ -56209,10 +55227,7 @@ const deserializeAws_ec2DescribeVolumesModificationsResult = ( VolumesModifications: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.volumeModificationSet === "") { contents.VolumesModifications = []; @@ -56239,10 +55254,7 @@ const deserializeAws_ec2DescribeVolumesResult = ( Volumes: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.volumeSet === "") { contents.Volumes = []; @@ -56282,10 +55294,7 @@ const deserializeAws_ec2DescribeVpcAttributeResult = ( ); } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -56300,10 +55309,7 @@ const deserializeAws_ec2DescribeVpcClassicLinkDnsSupportResult = ( Vpcs: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.vpcs === "") { contents.Vpcs = []; @@ -56362,10 +55368,7 @@ const deserializeAws_ec2DescribeVpcEndpointConnectionNotificationsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -56380,10 +55383,7 @@ const deserializeAws_ec2DescribeVpcEndpointConnectionsResult = ( VpcEndpointConnections: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.vpcEndpointConnectionSet === "") { contents.VpcEndpointConnections = []; @@ -56410,10 +55410,7 @@ const deserializeAws_ec2DescribeVpcEndpointServiceConfigurationsResult = ( ServiceConfigurations: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.serviceConfigurationSet === "") { contents.ServiceConfigurations = []; @@ -56452,10 +55449,7 @@ const deserializeAws_ec2DescribeVpcEndpointServicePermissionsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -56471,10 +55465,7 @@ const deserializeAws_ec2DescribeVpcEndpointServicesResult = ( ServiceNames: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.serviceDetailSet === "") { contents.ServiceDetails = []; @@ -56513,10 +55504,7 @@ const deserializeAws_ec2DescribeVpcEndpointsResult = ( VpcEndpoints: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.vpcEndpointSet === "") { contents.VpcEndpoints = []; @@ -56543,10 +55531,7 @@ const deserializeAws_ec2DescribeVpcPeeringConnectionsResult = ( VpcPeeringConnections: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.vpcPeeringConnectionSet === "") { contents.VpcPeeringConnections = []; @@ -56573,10 +55558,7 @@ const deserializeAws_ec2DescribeVpcsResult = ( Vpcs: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.vpcSet === "") { contents.Vpcs = []; @@ -56648,10 +55630,7 @@ const deserializeAws_ec2DetachClassicLinkVpcResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -56666,10 +55645,7 @@ const deserializeAws_ec2DhcpConfiguration = ( Values: undefined }; if (output["key"] !== undefined) { - contents.Key = - output["key"]["#text"] !== undefined - ? output["key"]["#text"] - : output["key"]; + contents.Key = output["key"]; } if (output.valueSet === "") { contents.Values = []; @@ -56728,16 +55704,10 @@ const deserializeAws_ec2DhcpOptions = ( ); } if (output["dhcpOptionsId"] !== undefined) { - contents.DhcpOptionsId = - output["dhcpOptionsId"]["#text"] !== undefined - ? output["dhcpOptionsId"]["#text"] - : output["dhcpOptionsId"]; + contents.DhcpOptionsId = output["dhcpOptionsId"]; } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output.tagSet === "") { contents.Tags = []; @@ -56772,10 +55742,7 @@ const deserializeAws_ec2DirectoryServiceAuthentication = ( DirectoryId: undefined }; if (output["directoryId"] !== undefined) { - contents.DirectoryId = - output["directoryId"]["#text"] !== undefined - ? output["directoryId"]["#text"] - : output["directoryId"]; + contents.DirectoryId = output["directoryId"]; } return contents; }; @@ -56790,9 +55757,7 @@ const deserializeAws_ec2DisableEbsEncryptionByDefaultResult = ( }; if (output["ebsEncryptionByDefault"] !== undefined) { contents.EbsEncryptionByDefault = - (output["ebsEncryptionByDefault"]["#text"] !== undefined - ? output["ebsEncryptionByDefault"]["#text"] - : output["ebsEncryptionByDefault"]) == "true"; + output["ebsEncryptionByDefault"] == "true"; } return contents; }; @@ -56821,10 +55786,7 @@ const deserializeAws_ec2DisableFastSnapshotRestoreErrorItem = ( ); } if (output["snapshotId"] !== undefined) { - contents.SnapshotId = - output["snapshotId"]["#text"] !== undefined - ? output["snapshotId"]["#text"] - : output["snapshotId"]; + contents.SnapshotId = output["snapshotId"]; } return contents; }; @@ -56848,16 +55810,10 @@ const deserializeAws_ec2DisableFastSnapshotRestoreStateError = ( Message: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -56872,10 +55828,7 @@ const deserializeAws_ec2DisableFastSnapshotRestoreStateErrorItem = ( Error: undefined }; if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["error"] !== undefined) { contents.Error = deserializeAws_ec2DisableFastSnapshotRestoreStateError( @@ -56914,10 +55867,7 @@ const deserializeAws_ec2DisableFastSnapshotRestoreSuccessItem = ( StateTransitionReason: undefined }; if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["disabledTime"] !== undefined) { contents.DisabledTime = new Date(output["disabledTime"]); @@ -56935,34 +55885,19 @@ const deserializeAws_ec2DisableFastSnapshotRestoreSuccessItem = ( contents.OptimizingTime = new Date(output["optimizingTime"]); } if (output["ownerAlias"] !== undefined) { - contents.OwnerAlias = - output["ownerAlias"]["#text"] !== undefined - ? output["ownerAlias"]["#text"] - : output["ownerAlias"]; + contents.OwnerAlias = output["ownerAlias"]; } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output["snapshotId"] !== undefined) { - contents.SnapshotId = - output["snapshotId"]["#text"] !== undefined - ? output["snapshotId"]["#text"] - : output["snapshotId"]; + contents.SnapshotId = output["snapshotId"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["stateTransitionReason"] !== undefined) { - contents.StateTransitionReason = - output["stateTransitionReason"]["#text"] !== undefined - ? output["stateTransitionReason"]["#text"] - : output["stateTransitionReason"]; + contents.StateTransitionReason = output["stateTransitionReason"]; } return contents; }; @@ -57038,10 +55973,7 @@ const deserializeAws_ec2DisableVpcClassicLinkDnsSupportResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -57055,10 +55987,7 @@ const deserializeAws_ec2DisableVpcClassicLinkResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -57073,10 +56002,7 @@ const deserializeAws_ec2DisassociateClientVpnTargetNetworkResult = ( Status: undefined }; if (output["associationId"] !== undefined) { - contents.AssociationId = - output["associationId"]["#text"] !== undefined - ? output["associationId"]["#text"] - : output["associationId"]; + contents.AssociationId = output["associationId"]; } if (output["status"] !== undefined) { contents.Status = deserializeAws_ec2AssociationStatus( @@ -57120,10 +56046,7 @@ const deserializeAws_ec2DisassociateSubnetCidrBlockResult = ( ); } if (output["subnetId"] !== undefined) { - contents.SubnetId = - output["subnetId"]["#text"] !== undefined - ? output["subnetId"]["#text"] - : output["subnetId"]; + contents.SubnetId = output["subnetId"]; } return contents; }; @@ -57185,10 +56108,7 @@ const deserializeAws_ec2DisassociateVpcCidrBlockResult = ( ); } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -57205,29 +56125,16 @@ const deserializeAws_ec2DiskImageDescription = ( Size: undefined }; if (output["checksum"] !== undefined) { - contents.Checksum = - output["checksum"]["#text"] !== undefined - ? output["checksum"]["#text"] - : output["checksum"]; + contents.Checksum = output["checksum"]; } if (output["format"] !== undefined) { - contents.Format = - output["format"]["#text"] !== undefined - ? output["format"]["#text"] - : output["format"]; + contents.Format = output["format"]; } if (output["importManifestUrl"] !== undefined) { - contents.ImportManifestUrl = - output["importManifestUrl"]["#text"] !== undefined - ? output["importManifestUrl"]["#text"] - : output["importManifestUrl"]; + contents.ImportManifestUrl = output["importManifestUrl"]; } if (output["size"] !== undefined) { - contents.Size = parseInt( - output["size"]["#text"] !== undefined - ? output["size"]["#text"] - : output["size"] - ); + contents.Size = parseInt(output["size"]); } return contents; }; @@ -57242,17 +56149,10 @@ const deserializeAws_ec2DiskImageVolumeDescription = ( Size: undefined }; if (output["id"] !== undefined) { - contents.Id = - output["id"]["#text"] !== undefined - ? output["id"]["#text"] - : output["id"]; + contents.Id = output["id"]; } if (output["size"] !== undefined) { - contents.Size = parseInt( - output["size"]["#text"] !== undefined - ? output["size"]["#text"] - : output["size"] - ); + contents.Size = parseInt(output["size"]); } return contents; }; @@ -57268,24 +56168,13 @@ const deserializeAws_ec2DiskInfo = ( Type: undefined }; if (output["count"] !== undefined) { - contents.Count = parseInt( - output["count"]["#text"] !== undefined - ? output["count"]["#text"] - : output["count"] - ); + contents.Count = parseInt(output["count"]); } if (output["sizeInGB"] !== undefined) { - contents.SizeInGB = parseInt( - output["sizeInGB"]["#text"] !== undefined - ? output["sizeInGB"]["#text"] - : output["sizeInGB"] - ); + contents.SizeInGB = parseInt(output["sizeInGB"]); } if (output["type"] !== undefined) { - contents.Type = - output["type"]["#text"] !== undefined - ? output["type"]["#text"] - : output["type"]; + contents.Type = output["type"]; } return contents; }; @@ -57309,16 +56198,10 @@ const deserializeAws_ec2DnsEntry = ( HostedZoneId: undefined }; if (output["dnsName"] !== undefined) { - contents.DnsName = - output["dnsName"]["#text"] !== undefined - ? output["dnsName"]["#text"] - : output["dnsName"]; + contents.DnsName = output["dnsName"]; } if (output["hostedZoneId"] !== undefined) { - contents.HostedZoneId = - output["hostedZoneId"]["#text"] !== undefined - ? output["hostedZoneId"]["#text"] - : output["hostedZoneId"]; + contents.HostedZoneId = output["hostedZoneId"]; } return contents; }; @@ -57347,48 +56230,25 @@ const deserializeAws_ec2EbsBlockDevice = ( VolumeType: undefined }; if (output["deleteOnTermination"] !== undefined) { - contents.DeleteOnTermination = - (output["deleteOnTermination"]["#text"] !== undefined - ? output["deleteOnTermination"]["#text"] - : output["deleteOnTermination"]) == "true"; + contents.DeleteOnTermination = output["deleteOnTermination"] == "true"; } if (output["encrypted"] !== undefined) { - contents.Encrypted = - (output["encrypted"]["#text"] !== undefined - ? output["encrypted"]["#text"] - : output["encrypted"]) == "true"; + contents.Encrypted = output["encrypted"] == "true"; } if (output["iops"] !== undefined) { - contents.Iops = parseInt( - output["iops"]["#text"] !== undefined - ? output["iops"]["#text"] - : output["iops"] - ); + contents.Iops = parseInt(output["iops"]); } if (output["KmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["KmsKeyId"]["#text"] !== undefined - ? output["KmsKeyId"]["#text"] - : output["KmsKeyId"]; + contents.KmsKeyId = output["KmsKeyId"]; } if (output["snapshotId"] !== undefined) { - contents.SnapshotId = - output["snapshotId"]["#text"] !== undefined - ? output["snapshotId"]["#text"] - : output["snapshotId"]; + contents.SnapshotId = output["snapshotId"]; } if (output["volumeSize"] !== undefined) { - contents.VolumeSize = parseInt( - output["volumeSize"]["#text"] !== undefined - ? output["volumeSize"]["#text"] - : output["volumeSize"] - ); + contents.VolumeSize = parseInt(output["volumeSize"]); } if (output["volumeType"] !== undefined) { - contents.VolumeType = - output["volumeType"]["#text"] !== undefined - ? output["volumeType"]["#text"] - : output["volumeType"]; + contents.VolumeType = output["volumeType"]; } return contents; }; @@ -57403,16 +56263,10 @@ const deserializeAws_ec2EbsInfo = ( EncryptionSupport: undefined }; if (output["ebsOptimizedSupport"] !== undefined) { - contents.EbsOptimizedSupport = - output["ebsOptimizedSupport"]["#text"] !== undefined - ? output["ebsOptimizedSupport"]["#text"] - : output["ebsOptimizedSupport"]; + contents.EbsOptimizedSupport = output["ebsOptimizedSupport"]; } if (output["encryptionSupport"] !== undefined) { - contents.EncryptionSupport = - output["encryptionSupport"]["#text"] !== undefined - ? output["encryptionSupport"]["#text"] - : output["encryptionSupport"]; + contents.EncryptionSupport = output["encryptionSupport"]; } return contents; }; @@ -57432,22 +56286,13 @@ const deserializeAws_ec2EbsInstanceBlockDevice = ( contents.AttachTime = new Date(output["attachTime"]); } if (output["deleteOnTermination"] !== undefined) { - contents.DeleteOnTermination = - (output["deleteOnTermination"]["#text"] !== undefined - ? output["deleteOnTermination"]["#text"] - : output["deleteOnTermination"]) == "true"; + contents.DeleteOnTermination = output["deleteOnTermination"] == "true"; } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } if (output["volumeId"] !== undefined) { - contents.VolumeId = - output["volumeId"]["#text"] !== undefined - ? output["volumeId"]["#text"] - : output["volumeId"]; + contents.VolumeId = output["volumeId"]; } return contents; }; @@ -57476,9 +56321,7 @@ const deserializeAws_ec2EgressOnlyInternetGateway = ( } if (output["egressOnlyInternetGatewayId"] !== undefined) { contents.EgressOnlyInternetGatewayId = - output["egressOnlyInternetGatewayId"]["#text"] !== undefined - ? output["egressOnlyInternetGatewayId"]["#text"] - : output["egressOnlyInternetGatewayId"]; + output["egressOnlyInternetGatewayId"]; } if (output.tagSet === "") { contents.Tags = []; @@ -57516,28 +56359,16 @@ const deserializeAws_ec2ElasticGpuAssociation = ( ElasticGpuId: undefined }; if (output["elasticGpuAssociationId"] !== undefined) { - contents.ElasticGpuAssociationId = - output["elasticGpuAssociationId"]["#text"] !== undefined - ? output["elasticGpuAssociationId"]["#text"] - : output["elasticGpuAssociationId"]; + contents.ElasticGpuAssociationId = output["elasticGpuAssociationId"]; } if (output["elasticGpuAssociationState"] !== undefined) { - contents.ElasticGpuAssociationState = - output["elasticGpuAssociationState"]["#text"] !== undefined - ? output["elasticGpuAssociationState"]["#text"] - : output["elasticGpuAssociationState"]; + contents.ElasticGpuAssociationState = output["elasticGpuAssociationState"]; } if (output["elasticGpuAssociationTime"] !== undefined) { - contents.ElasticGpuAssociationTime = - output["elasticGpuAssociationTime"]["#text"] !== undefined - ? output["elasticGpuAssociationTime"]["#text"] - : output["elasticGpuAssociationTime"]; + contents.ElasticGpuAssociationTime = output["elasticGpuAssociationTime"]; } if (output["elasticGpuId"] !== undefined) { - contents.ElasticGpuId = - output["elasticGpuId"]["#text"] !== undefined - ? output["elasticGpuId"]["#text"] - : output["elasticGpuId"]; + contents.ElasticGpuId = output["elasticGpuId"]; } return contents; }; @@ -57560,10 +56391,7 @@ const deserializeAws_ec2ElasticGpuHealth = ( Status: undefined }; if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } return contents; }; @@ -57586,10 +56414,7 @@ const deserializeAws_ec2ElasticGpuSpecificationResponse = ( Type: undefined }; if (output["type"] !== undefined) { - contents.Type = - output["type"]["#text"] !== undefined - ? output["type"]["#text"] - : output["type"]; + contents.Type = output["type"]; } return contents; }; @@ -57618,10 +56443,7 @@ const deserializeAws_ec2ElasticGpus = ( Tags: undefined }; if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["elasticGpuHealth"] !== undefined) { contents.ElasticGpuHealth = deserializeAws_ec2ElasticGpuHealth( @@ -57630,28 +56452,16 @@ const deserializeAws_ec2ElasticGpus = ( ); } if (output["elasticGpuId"] !== undefined) { - contents.ElasticGpuId = - output["elasticGpuId"]["#text"] !== undefined - ? output["elasticGpuId"]["#text"] - : output["elasticGpuId"]; + contents.ElasticGpuId = output["elasticGpuId"]; } if (output["elasticGpuState"] !== undefined) { - contents.ElasticGpuState = - output["elasticGpuState"]["#text"] !== undefined - ? output["elasticGpuState"]["#text"] - : output["elasticGpuState"]; + contents.ElasticGpuState = output["elasticGpuState"]; } if (output["elasticGpuType"] !== undefined) { - contents.ElasticGpuType = - output["elasticGpuType"]["#text"] !== undefined - ? output["elasticGpuType"]["#text"] - : output["elasticGpuType"]; + contents.ElasticGpuType = output["elasticGpuType"]; } if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } if (output.tagSet === "") { contents.Tags = []; @@ -57681,22 +56491,15 @@ const deserializeAws_ec2ElasticInferenceAcceleratorAssociation = ( }; if (output["elasticInferenceAcceleratorArn"] !== undefined) { contents.ElasticInferenceAcceleratorArn = - output["elasticInferenceAcceleratorArn"]["#text"] !== undefined - ? output["elasticInferenceAcceleratorArn"]["#text"] - : output["elasticInferenceAcceleratorArn"]; + output["elasticInferenceAcceleratorArn"]; } if (output["elasticInferenceAcceleratorAssociationId"] !== undefined) { contents.ElasticInferenceAcceleratorAssociationId = - output["elasticInferenceAcceleratorAssociationId"]["#text"] !== undefined - ? output["elasticInferenceAcceleratorAssociationId"]["#text"] - : output["elasticInferenceAcceleratorAssociationId"]; + output["elasticInferenceAcceleratorAssociationId"]; } if (output["elasticInferenceAcceleratorAssociationState"] !== undefined) { contents.ElasticInferenceAcceleratorAssociationState = - output["elasticInferenceAcceleratorAssociationState"]["#text"] !== - undefined - ? output["elasticInferenceAcceleratorAssociationState"]["#text"] - : output["elasticInferenceAcceleratorAssociationState"]; + output["elasticInferenceAcceleratorAssociationState"]; } if (output["elasticInferenceAcceleratorAssociationTime"] !== undefined) { contents.ElasticInferenceAcceleratorAssociationTime = new Date( @@ -57725,9 +56528,7 @@ const deserializeAws_ec2EnableEbsEncryptionByDefaultResult = ( }; if (output["ebsEncryptionByDefault"] !== undefined) { contents.EbsEncryptionByDefault = - (output["ebsEncryptionByDefault"]["#text"] !== undefined - ? output["ebsEncryptionByDefault"]["#text"] - : output["ebsEncryptionByDefault"]) == "true"; + output["ebsEncryptionByDefault"] == "true"; } return contents; }; @@ -57756,10 +56557,7 @@ const deserializeAws_ec2EnableFastSnapshotRestoreErrorItem = ( ); } if (output["snapshotId"] !== undefined) { - contents.SnapshotId = - output["snapshotId"]["#text"] !== undefined - ? output["snapshotId"]["#text"] - : output["snapshotId"]; + contents.SnapshotId = output["snapshotId"]; } return contents; }; @@ -57783,16 +56581,10 @@ const deserializeAws_ec2EnableFastSnapshotRestoreStateError = ( Message: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -57807,10 +56599,7 @@ const deserializeAws_ec2EnableFastSnapshotRestoreStateErrorItem = ( Error: undefined }; if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["error"] !== undefined) { contents.Error = deserializeAws_ec2EnableFastSnapshotRestoreStateError( @@ -57849,10 +56638,7 @@ const deserializeAws_ec2EnableFastSnapshotRestoreSuccessItem = ( StateTransitionReason: undefined }; if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["disabledTime"] !== undefined) { contents.DisabledTime = new Date(output["disabledTime"]); @@ -57870,34 +56656,19 @@ const deserializeAws_ec2EnableFastSnapshotRestoreSuccessItem = ( contents.OptimizingTime = new Date(output["optimizingTime"]); } if (output["ownerAlias"] !== undefined) { - contents.OwnerAlias = - output["ownerAlias"]["#text"] !== undefined - ? output["ownerAlias"]["#text"] - : output["ownerAlias"]; + contents.OwnerAlias = output["ownerAlias"]; } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output["snapshotId"] !== undefined) { - contents.SnapshotId = - output["snapshotId"]["#text"] !== undefined - ? output["snapshotId"]["#text"] - : output["snapshotId"]; + contents.SnapshotId = output["snapshotId"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["stateTransitionReason"] !== undefined) { - contents.StateTransitionReason = - output["stateTransitionReason"]["#text"] !== undefined - ? output["stateTransitionReason"]["#text"] - : output["stateTransitionReason"]; + contents.StateTransitionReason = output["stateTransitionReason"]; } return contents; }; @@ -57973,10 +56744,7 @@ const deserializeAws_ec2EnableVpcClassicLinkDnsSupportResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -57990,10 +56758,7 @@ const deserializeAws_ec2EnableVpcClassicLinkResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -58018,22 +56783,13 @@ const deserializeAws_ec2EventInformation = ( InstanceId: undefined }; if (output["eventDescription"] !== undefined) { - contents.EventDescription = - output["eventDescription"]["#text"] !== undefined - ? output["eventDescription"]["#text"] - : output["eventDescription"]; + contents.EventDescription = output["eventDescription"]; } if (output["eventSubType"] !== undefined) { - contents.EventSubType = - output["eventSubType"]["#text"] !== undefined - ? output["eventSubType"]["#text"] - : output["eventSubType"]; + contents.EventSubType = output["eventSubType"]; } if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } return contents; }; @@ -58048,10 +56804,7 @@ const deserializeAws_ec2ExportClientVpnClientCertificateRevocationListResult = ( Status: undefined }; if (output["certificateRevocationList"] !== undefined) { - contents.CertificateRevocationList = - output["certificateRevocationList"]["#text"] !== undefined - ? output["certificateRevocationList"]["#text"] - : output["certificateRevocationList"]; + contents.CertificateRevocationList = output["certificateRevocationList"]; } if (output["status"] !== undefined) { contents.Status = deserializeAws_ec2ClientCertificateRevocationListStatus( @@ -58071,10 +56824,7 @@ const deserializeAws_ec2ExportClientVpnClientConfigurationResult = ( ClientConfiguration: undefined }; if (output["clientConfiguration"] !== undefined) { - contents.ClientConfiguration = - output["clientConfiguration"]["#text"] !== undefined - ? output["clientConfiguration"]["#text"] - : output["clientConfiguration"]; + contents.ClientConfiguration = output["clientConfiguration"]; } return contents; }; @@ -58096,40 +56846,22 @@ const deserializeAws_ec2ExportImageResult = ( StatusMessage: undefined }; if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["diskImageFormat"] !== undefined) { - contents.DiskImageFormat = - output["diskImageFormat"]["#text"] !== undefined - ? output["diskImageFormat"]["#text"] - : output["diskImageFormat"]; + contents.DiskImageFormat = output["diskImageFormat"]; } if (output["exportImageTaskId"] !== undefined) { - contents.ExportImageTaskId = - output["exportImageTaskId"]["#text"] !== undefined - ? output["exportImageTaskId"]["#text"] - : output["exportImageTaskId"]; + contents.ExportImageTaskId = output["exportImageTaskId"]; } if (output["imageId"] !== undefined) { - contents.ImageId = - output["imageId"]["#text"] !== undefined - ? output["imageId"]["#text"] - : output["imageId"]; + contents.ImageId = output["imageId"]; } if (output["progress"] !== undefined) { - contents.Progress = - output["progress"]["#text"] !== undefined - ? output["progress"]["#text"] - : output["progress"]; + contents.Progress = output["progress"]; } if (output["roleName"] !== undefined) { - contents.RoleName = - output["roleName"]["#text"] !== undefined - ? output["roleName"]["#text"] - : output["roleName"]; + contents.RoleName = output["roleName"]; } if (output["s3ExportLocation"] !== undefined) { contents.S3ExportLocation = deserializeAws_ec2ExportTaskS3Location( @@ -58138,16 +56870,10 @@ const deserializeAws_ec2ExportImageResult = ( ); } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } if (output["statusMessage"] !== undefined) { - contents.StatusMessage = - output["statusMessage"]["#text"] !== undefined - ? output["statusMessage"]["#text"] - : output["statusMessage"]; + contents.StatusMessage = output["statusMessage"]; } return contents; }; @@ -58167,28 +56893,16 @@ const deserializeAws_ec2ExportImageTask = ( StatusMessage: undefined }; if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["exportImageTaskId"] !== undefined) { - contents.ExportImageTaskId = - output["exportImageTaskId"]["#text"] !== undefined - ? output["exportImageTaskId"]["#text"] - : output["exportImageTaskId"]; + contents.ExportImageTaskId = output["exportImageTaskId"]; } if (output["imageId"] !== undefined) { - contents.ImageId = - output["imageId"]["#text"] !== undefined - ? output["imageId"]["#text"] - : output["imageId"]; + contents.ImageId = output["imageId"]; } if (output["progress"] !== undefined) { - contents.Progress = - output["progress"]["#text"] !== undefined - ? output["progress"]["#text"] - : output["progress"]; + contents.Progress = output["progress"]; } if (output["s3ExportLocation"] !== undefined) { contents.S3ExportLocation = deserializeAws_ec2ExportTaskS3Location( @@ -58197,16 +56911,10 @@ const deserializeAws_ec2ExportImageTask = ( ); } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } if (output["statusMessage"] !== undefined) { - contents.StatusMessage = - output["statusMessage"]["#text"] !== undefined - ? output["statusMessage"]["#text"] - : output["statusMessage"]; + contents.StatusMessage = output["statusMessage"]; } return contents; }; @@ -58235,16 +56943,10 @@ const deserializeAws_ec2ExportTask = ( Tags: undefined }; if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["exportTaskId"] !== undefined) { - contents.ExportTaskId = - output["exportTaskId"]["#text"] !== undefined - ? output["exportTaskId"]["#text"] - : output["exportTaskId"]; + contents.ExportTaskId = output["exportTaskId"]; } if (output["exportToS3"] !== undefined) { contents.ExportToS3Task = deserializeAws_ec2ExportToS3Task( @@ -58259,16 +56961,10 @@ const deserializeAws_ec2ExportTask = ( ); } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["statusMessage"] !== undefined) { - contents.StatusMessage = - output["statusMessage"]["#text"] !== undefined - ? output["statusMessage"]["#text"] - : output["statusMessage"]; + contents.StatusMessage = output["statusMessage"]; } if (output.tagSet === "") { contents.Tags = []; @@ -58304,16 +57000,10 @@ const deserializeAws_ec2ExportTaskS3Location = ( S3Prefix: undefined }; if (output["s3Bucket"] !== undefined) { - contents.S3Bucket = - output["s3Bucket"]["#text"] !== undefined - ? output["s3Bucket"]["#text"] - : output["s3Bucket"]; + contents.S3Bucket = output["s3Bucket"]; } if (output["s3Prefix"] !== undefined) { - contents.S3Prefix = - output["s3Prefix"]["#text"] !== undefined - ? output["s3Prefix"]["#text"] - : output["s3Prefix"]; + contents.S3Prefix = output["s3Prefix"]; } return contents; }; @@ -58330,28 +57020,16 @@ const deserializeAws_ec2ExportToS3Task = ( S3Key: undefined }; if (output["containerFormat"] !== undefined) { - contents.ContainerFormat = - output["containerFormat"]["#text"] !== undefined - ? output["containerFormat"]["#text"] - : output["containerFormat"]; + contents.ContainerFormat = output["containerFormat"]; } if (output["diskImageFormat"] !== undefined) { - contents.DiskImageFormat = - output["diskImageFormat"]["#text"] !== undefined - ? output["diskImageFormat"]["#text"] - : output["diskImageFormat"]; + contents.DiskImageFormat = output["diskImageFormat"]; } if (output["s3Bucket"] !== undefined) { - contents.S3Bucket = - output["s3Bucket"]["#text"] !== undefined - ? output["s3Bucket"]["#text"] - : output["s3Bucket"]; + contents.S3Bucket = output["s3Bucket"]; } if (output["s3Key"] !== undefined) { - contents.S3Key = - output["s3Key"]["#text"] !== undefined - ? output["s3Key"]["#text"] - : output["s3Key"]; + contents.S3Key = output["s3Key"]; } return contents; }; @@ -58365,10 +57043,7 @@ const deserializeAws_ec2ExportTransitGatewayRoutesResult = ( S3Location: undefined }; if (output["s3Location"] !== undefined) { - contents.S3Location = - output["s3Location"]["#text"] !== undefined - ? output["s3Location"]["#text"] - : output["s3Location"]; + contents.S3Location = output["s3Location"]; } return contents; }; @@ -58389,10 +57064,7 @@ const deserializeAws_ec2FailedQueuedPurchaseDeletion = ( ); } if (output["reservedInstancesId"] !== undefined) { - contents.ReservedInstancesId = - output["reservedInstancesId"]["#text"] !== undefined - ? output["reservedInstancesId"]["#text"] - : output["reservedInstancesId"]; + contents.ReservedInstancesId = output["reservedInstancesId"]; } return contents; }; @@ -58434,16 +57106,10 @@ const deserializeAws_ec2FleetData = ( ValidUntil: undefined }; if (output["activityStatus"] !== undefined) { - contents.ActivityStatus = - output["activityStatus"]["#text"] !== undefined - ? output["activityStatus"]["#text"] - : output["activityStatus"]; + contents.ActivityStatus = output["activityStatus"]; } if (output["clientToken"] !== undefined) { - contents.ClientToken = - output["clientToken"]["#text"] !== undefined - ? output["clientToken"]["#text"] - : output["clientToken"]; + contents.ClientToken = output["clientToken"]; } if (output["createTime"] !== undefined) { contents.CreateTime = new Date(output["createTime"]); @@ -58462,34 +57128,20 @@ const deserializeAws_ec2FleetData = ( } if (output["excessCapacityTerminationPolicy"] !== undefined) { contents.ExcessCapacityTerminationPolicy = - output["excessCapacityTerminationPolicy"]["#text"] !== undefined - ? output["excessCapacityTerminationPolicy"]["#text"] - : output["excessCapacityTerminationPolicy"]; + output["excessCapacityTerminationPolicy"]; } if (output["fleetId"] !== undefined) { - contents.FleetId = - output["fleetId"]["#text"] !== undefined - ? output["fleetId"]["#text"] - : output["fleetId"]; + contents.FleetId = output["fleetId"]; } if (output["fleetState"] !== undefined) { - contents.FleetState = - output["fleetState"]["#text"] !== undefined - ? output["fleetState"]["#text"] - : output["fleetState"]; + contents.FleetState = output["fleetState"]; } if (output["fulfilledCapacity"] !== undefined) { - contents.FulfilledCapacity = parseFloat( - output["fulfilledCapacity"]["#text"] !== undefined - ? output["fulfilledCapacity"]["#text"] - : output["fulfilledCapacity"] - ); + contents.FulfilledCapacity = parseFloat(output["fulfilledCapacity"]); } if (output["fulfilledOnDemandCapacity"] !== undefined) { contents.FulfilledOnDemandCapacity = parseFloat( - output["fulfilledOnDemandCapacity"]["#text"] !== undefined - ? output["fulfilledOnDemandCapacity"]["#text"] - : output["fulfilledOnDemandCapacity"] + output["fulfilledOnDemandCapacity"] ); } if (output.fleetInstanceSet === "") { @@ -58524,9 +57176,7 @@ const deserializeAws_ec2FleetData = ( } if (output["replaceUnhealthyInstances"] !== undefined) { contents.ReplaceUnhealthyInstances = - (output["replaceUnhealthyInstances"]["#text"] !== undefined - ? output["replaceUnhealthyInstances"]["#text"] - : output["replaceUnhealthyInstances"]) == "true"; + output["replaceUnhealthyInstances"] == "true"; } if (output["spotOptions"] !== undefined) { contents.SpotOptions = deserializeAws_ec2SpotOptions( @@ -58554,15 +57204,10 @@ const deserializeAws_ec2FleetData = ( } if (output["terminateInstancesWithExpiration"] !== undefined) { contents.TerminateInstancesWithExpiration = - (output["terminateInstancesWithExpiration"]["#text"] !== undefined - ? output["terminateInstancesWithExpiration"]["#text"] - : output["terminateInstancesWithExpiration"]) == "true"; + output["terminateInstancesWithExpiration"] == "true"; } if (output["type"] !== undefined) { - contents.Type = - output["type"]["#text"] !== undefined - ? output["type"]["#text"] - : output["type"]; + contents.Type = output["type"]; } if (output["validFrom"] !== undefined) { contents.ValidFrom = new Date(output["validFrom"]); @@ -58627,22 +57272,13 @@ const deserializeAws_ec2FleetLaunchTemplateOverrides = ( WeightedCapacity: undefined }; if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output["maxPrice"] !== undefined) { - contents.MaxPrice = - output["maxPrice"]["#text"] !== undefined - ? output["maxPrice"]["#text"] - : output["maxPrice"]; + contents.MaxPrice = output["maxPrice"]; } if (output["placement"] !== undefined) { contents.Placement = deserializeAws_ec2PlacementResponse( @@ -58651,24 +57287,13 @@ const deserializeAws_ec2FleetLaunchTemplateOverrides = ( ); } if (output["priority"] !== undefined) { - contents.Priority = parseFloat( - output["priority"]["#text"] !== undefined - ? output["priority"]["#text"] - : output["priority"] - ); + contents.Priority = parseFloat(output["priority"]); } if (output["subnetId"] !== undefined) { - contents.SubnetId = - output["subnetId"]["#text"] !== undefined - ? output["subnetId"]["#text"] - : output["subnetId"]; + contents.SubnetId = output["subnetId"]; } if (output["weightedCapacity"] !== undefined) { - contents.WeightedCapacity = parseFloat( - output["weightedCapacity"]["#text"] !== undefined - ? output["weightedCapacity"]["#text"] - : output["weightedCapacity"] - ); + contents.WeightedCapacity = parseFloat(output["weightedCapacity"]); } return contents; }; @@ -58693,22 +57318,13 @@ const deserializeAws_ec2FleetLaunchTemplateSpecification = ( Version: undefined }; if (output["launchTemplateId"] !== undefined) { - contents.LaunchTemplateId = - output["launchTemplateId"]["#text"] !== undefined - ? output["launchTemplateId"]["#text"] - : output["launchTemplateId"]; + contents.LaunchTemplateId = output["launchTemplateId"]; } if (output["launchTemplateName"] !== undefined) { - contents.LaunchTemplateName = - output["launchTemplateName"]["#text"] !== undefined - ? output["launchTemplateName"]["#text"] - : output["launchTemplateName"]; + contents.LaunchTemplateName = output["launchTemplateName"]; } if (output["version"] !== undefined) { - contents.Version = - output["version"]["#text"] !== undefined - ? output["version"]["#text"] - : output["version"]; + contents.Version = output["version"]; } return contents; }; @@ -58745,70 +57361,37 @@ const deserializeAws_ec2FlowLog = ( contents.CreationTime = new Date(output["creationTime"]); } if (output["deliverLogsErrorMessage"] !== undefined) { - contents.DeliverLogsErrorMessage = - output["deliverLogsErrorMessage"]["#text"] !== undefined - ? output["deliverLogsErrorMessage"]["#text"] - : output["deliverLogsErrorMessage"]; + contents.DeliverLogsErrorMessage = output["deliverLogsErrorMessage"]; } if (output["deliverLogsPermissionArn"] !== undefined) { - contents.DeliverLogsPermissionArn = - output["deliverLogsPermissionArn"]["#text"] !== undefined - ? output["deliverLogsPermissionArn"]["#text"] - : output["deliverLogsPermissionArn"]; + contents.DeliverLogsPermissionArn = output["deliverLogsPermissionArn"]; } if (output["deliverLogsStatus"] !== undefined) { - contents.DeliverLogsStatus = - output["deliverLogsStatus"]["#text"] !== undefined - ? output["deliverLogsStatus"]["#text"] - : output["deliverLogsStatus"]; + contents.DeliverLogsStatus = output["deliverLogsStatus"]; } if (output["flowLogId"] !== undefined) { - contents.FlowLogId = - output["flowLogId"]["#text"] !== undefined - ? output["flowLogId"]["#text"] - : output["flowLogId"]; + contents.FlowLogId = output["flowLogId"]; } if (output["flowLogStatus"] !== undefined) { - contents.FlowLogStatus = - output["flowLogStatus"]["#text"] !== undefined - ? output["flowLogStatus"]["#text"] - : output["flowLogStatus"]; + contents.FlowLogStatus = output["flowLogStatus"]; } if (output["logDestination"] !== undefined) { - contents.LogDestination = - output["logDestination"]["#text"] !== undefined - ? output["logDestination"]["#text"] - : output["logDestination"]; + contents.LogDestination = output["logDestination"]; } if (output["logDestinationType"] !== undefined) { - contents.LogDestinationType = - output["logDestinationType"]["#text"] !== undefined - ? output["logDestinationType"]["#text"] - : output["logDestinationType"]; + contents.LogDestinationType = output["logDestinationType"]; } if (output["logFormat"] !== undefined) { - contents.LogFormat = - output["logFormat"]["#text"] !== undefined - ? output["logFormat"]["#text"] - : output["logFormat"]; + contents.LogFormat = output["logFormat"]; } if (output["logGroupName"] !== undefined) { - contents.LogGroupName = - output["logGroupName"]["#text"] !== undefined - ? output["logGroupName"]["#text"] - : output["logGroupName"]; + contents.LogGroupName = output["logGroupName"]; } if (output["resourceId"] !== undefined) { - contents.ResourceId = - output["resourceId"]["#text"] !== undefined - ? output["resourceId"]["#text"] - : output["resourceId"]; + contents.ResourceId = output["resourceId"]; } if (output["trafficType"] !== undefined) { - contents.TrafficType = - output["trafficType"]["#text"] !== undefined - ? output["trafficType"]["#text"] - : output["trafficType"]; + contents.TrafficType = output["trafficType"]; } return contents; }; @@ -58834,17 +57417,10 @@ const deserializeAws_ec2FpgaDeviceInfo = ( Name: undefined }; if (output["count"] !== undefined) { - contents.Count = parseInt( - output["count"]["#text"] !== undefined - ? output["count"]["#text"] - : output["count"] - ); + contents.Count = parseInt(output["count"]); } if (output["manufacturer"] !== undefined) { - contents.Manufacturer = - output["manufacturer"]["#text"] !== undefined - ? output["manufacturer"]["#text"] - : output["manufacturer"]; + contents.Manufacturer = output["manufacturer"]; } if (output["memoryInfo"] !== undefined) { contents.MemoryInfo = deserializeAws_ec2FpgaDeviceMemoryInfo( @@ -58853,10 +57429,7 @@ const deserializeAws_ec2FpgaDeviceInfo = ( ); } if (output["name"] !== undefined) { - contents.Name = - output["name"]["#text"] !== undefined - ? output["name"]["#text"] - : output["name"]; + contents.Name = output["name"]; } return contents; }; @@ -58879,11 +57452,7 @@ const deserializeAws_ec2FpgaDeviceMemoryInfo = ( SizeInMiB: undefined }; if (output["sizeInMiB"] !== undefined) { - contents.SizeInMiB = parseInt( - output["sizeInMiB"]["#text"] !== undefined - ? output["sizeInMiB"]["#text"] - : output["sizeInMiB"] - ); + contents.SizeInMiB = parseInt(output["sizeInMiB"]); } return contents; }; @@ -58914,46 +57483,25 @@ const deserializeAws_ec2FpgaImage = ( contents.CreateTime = new Date(output["createTime"]); } if (output["dataRetentionSupport"] !== undefined) { - contents.DataRetentionSupport = - (output["dataRetentionSupport"]["#text"] !== undefined - ? output["dataRetentionSupport"]["#text"] - : output["dataRetentionSupport"]) == "true"; + contents.DataRetentionSupport = output["dataRetentionSupport"] == "true"; } if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["fpgaImageGlobalId"] !== undefined) { - contents.FpgaImageGlobalId = - output["fpgaImageGlobalId"]["#text"] !== undefined - ? output["fpgaImageGlobalId"]["#text"] - : output["fpgaImageGlobalId"]; + contents.FpgaImageGlobalId = output["fpgaImageGlobalId"]; } if (output["fpgaImageId"] !== undefined) { - contents.FpgaImageId = - output["fpgaImageId"]["#text"] !== undefined - ? output["fpgaImageId"]["#text"] - : output["fpgaImageId"]; + contents.FpgaImageId = output["fpgaImageId"]; } if (output["name"] !== undefined) { - contents.Name = - output["name"]["#text"] !== undefined - ? output["name"]["#text"] - : output["name"]; + contents.Name = output["name"]; } if (output["ownerAlias"] !== undefined) { - contents.OwnerAlias = - output["ownerAlias"]["#text"] !== undefined - ? output["ownerAlias"]["#text"] - : output["ownerAlias"]; + contents.OwnerAlias = output["ownerAlias"]; } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output["pciId"] !== undefined) { contents.PciId = deserializeAws_ec2PciId(output["pciId"], context); @@ -58971,16 +57519,10 @@ const deserializeAws_ec2FpgaImage = ( ); } if (output["public"] !== undefined) { - contents.Public = - (output["public"]["#text"] !== undefined - ? output["public"]["#text"] - : output["public"]) == "true"; + contents.Public = output["public"] == "true"; } if (output["shellVersion"] !== undefined) { - contents.ShellVersion = - output["shellVersion"]["#text"] !== undefined - ? output["shellVersion"]["#text"] - : output["shellVersion"]; + contents.ShellVersion = output["shellVersion"]; } if (output["state"] !== undefined) { contents.State = deserializeAws_ec2FpgaImageState(output["state"], context); @@ -59013,16 +57555,10 @@ const deserializeAws_ec2FpgaImageAttribute = ( ProductCodes: undefined }; if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["fpgaImageId"] !== undefined) { - contents.FpgaImageId = - output["fpgaImageId"]["#text"] !== undefined - ? output["fpgaImageId"]["#text"] - : output["fpgaImageId"]; + contents.FpgaImageId = output["fpgaImageId"]; } if (output.loadPermissions === "") { contents.LoadPermissions = []; @@ -59037,10 +57573,7 @@ const deserializeAws_ec2FpgaImageAttribute = ( ); } if (output["name"] !== undefined) { - contents.Name = - output["name"]["#text"] !== undefined - ? output["name"]["#text"] - : output["name"]; + contents.Name = output["name"]; } if (output.productCodes === "") { contents.ProductCodes = []; @@ -59076,16 +57609,10 @@ const deserializeAws_ec2FpgaImageState = ( Message: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -59109,11 +57636,7 @@ const deserializeAws_ec2FpgaInfo = ( ); } if (output["totalFpgaMemoryInMiB"] !== undefined) { - contents.TotalFpgaMemoryInMiB = parseInt( - output["totalFpgaMemoryInMiB"]["#text"] !== undefined - ? output["totalFpgaMemoryInMiB"]["#text"] - : output["totalFpgaMemoryInMiB"] - ); + contents.TotalFpgaMemoryInMiB = parseInt(output["totalFpgaMemoryInMiB"]); } return contents; }; @@ -59140,10 +57663,7 @@ const deserializeAws_ec2GetAssociatedIpv6PoolCidrsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -59164,22 +57684,14 @@ const deserializeAws_ec2GetCapacityReservationUsageResult = ( }; if (output["availableInstanceCount"] !== undefined) { contents.AvailableInstanceCount = parseInt( - output["availableInstanceCount"]["#text"] !== undefined - ? output["availableInstanceCount"]["#text"] - : output["availableInstanceCount"] + output["availableInstanceCount"] ); } if (output["capacityReservationId"] !== undefined) { - contents.CapacityReservationId = - output["capacityReservationId"]["#text"] !== undefined - ? output["capacityReservationId"]["#text"] - : output["capacityReservationId"]; + contents.CapacityReservationId = output["capacityReservationId"]; } if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output.instanceUsageSet === "") { contents.InstanceUsages = []; @@ -59194,23 +57706,13 @@ const deserializeAws_ec2GetCapacityReservationUsageResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["totalInstanceCount"] !== undefined) { - contents.TotalInstanceCount = parseInt( - output["totalInstanceCount"]["#text"] !== undefined - ? output["totalInstanceCount"]["#text"] - : output["totalInstanceCount"] - ); + contents.TotalInstanceCount = parseInt(output["totalInstanceCount"]); } return contents; }; @@ -59238,16 +57740,10 @@ const deserializeAws_ec2GetCoipPoolUsageResult = ( ); } if (output["coipPoolId"] !== undefined) { - contents.CoipPoolId = - output["coipPoolId"]["#text"] !== undefined - ? output["coipPoolId"]["#text"] - : output["coipPoolId"]; + contents.CoipPoolId = output["coipPoolId"]; } if (output["localGatewayRouteTableId"] !== undefined) { - contents.LocalGatewayRouteTableId = - output["localGatewayRouteTableId"]["#text"] !== undefined - ? output["localGatewayRouteTableId"]["#text"] - : output["localGatewayRouteTableId"]; + contents.LocalGatewayRouteTableId = output["localGatewayRouteTableId"]; } return contents; }; @@ -59263,16 +57759,10 @@ const deserializeAws_ec2GetConsoleOutputResult = ( Timestamp: undefined }; if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } if (output["output"] !== undefined) { - contents.Output = - output["output"]["#text"] !== undefined - ? output["output"]["#text"] - : output["output"]; + contents.Output = output["output"]; } if (output["timestamp"] !== undefined) { contents.Timestamp = new Date(output["timestamp"]); @@ -59290,16 +57780,10 @@ const deserializeAws_ec2GetConsoleScreenshotResult = ( InstanceId: undefined }; if (output["imageData"] !== undefined) { - contents.ImageData = - output["imageData"]["#text"] !== undefined - ? output["imageData"]["#text"] - : output["imageData"]; + contents.ImageData = output["imageData"]; } if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } return contents; }; @@ -59330,10 +57814,7 @@ const deserializeAws_ec2GetEbsDefaultKmsKeyIdResult = ( KmsKeyId: undefined }; if (output["kmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["kmsKeyId"]["#text"] !== undefined - ? output["kmsKeyId"]["#text"] - : output["kmsKeyId"]; + contents.KmsKeyId = output["kmsKeyId"]; } return contents; }; @@ -59348,9 +57829,7 @@ const deserializeAws_ec2GetEbsEncryptionByDefaultResult = ( }; if (output["ebsEncryptionByDefault"] !== undefined) { contents.EbsEncryptionByDefault = - (output["ebsEncryptionByDefault"]["#text"] !== undefined - ? output["ebsEncryptionByDefault"]["#text"] - : output["ebsEncryptionByDefault"]) == "true"; + output["ebsEncryptionByDefault"] == "true"; } return contents; }; @@ -59367,10 +57846,7 @@ const deserializeAws_ec2GetHostReservationPurchasePreviewResult = ( TotalUpfrontPrice: undefined }; if (output["currencyCode"] !== undefined) { - contents.CurrencyCode = - output["currencyCode"]["#text"] !== undefined - ? output["currencyCode"]["#text"] - : output["currencyCode"]; + contents.CurrencyCode = output["currencyCode"]; } if (output.purchase === "") { contents.Purchase = []; @@ -59385,16 +57861,10 @@ const deserializeAws_ec2GetHostReservationPurchasePreviewResult = ( ); } if (output["totalHourlyPrice"] !== undefined) { - contents.TotalHourlyPrice = - output["totalHourlyPrice"]["#text"] !== undefined - ? output["totalHourlyPrice"]["#text"] - : output["totalHourlyPrice"]; + contents.TotalHourlyPrice = output["totalHourlyPrice"]; } if (output["totalUpfrontPrice"] !== undefined) { - contents.TotalUpfrontPrice = - output["totalUpfrontPrice"]["#text"] !== undefined - ? output["totalUpfrontPrice"]["#text"] - : output["totalUpfrontPrice"]; + contents.TotalUpfrontPrice = output["totalUpfrontPrice"]; } return contents; }; @@ -59427,16 +57897,10 @@ const deserializeAws_ec2GetPasswordDataResult = ( Timestamp: undefined }; if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } if (output["passwordData"] !== undefined) { - contents.PasswordData = - output["passwordData"]["#text"] !== undefined - ? output["passwordData"]["#text"] - : output["passwordData"]; + contents.PasswordData = output["passwordData"]; } if (output["timestamp"] !== undefined) { contents.Timestamp = new Date(output["timestamp"]); @@ -59461,16 +57925,10 @@ const deserializeAws_ec2GetReservedInstancesExchangeQuoteResult = ( ValidationFailureReason: undefined }; if (output["currencyCode"] !== undefined) { - contents.CurrencyCode = - output["currencyCode"]["#text"] !== undefined - ? output["currencyCode"]["#text"] - : output["currencyCode"]; + contents.CurrencyCode = output["currencyCode"]; } if (output["isValidExchange"] !== undefined) { - contents.IsValidExchange = - (output["isValidExchange"]["#text"] !== undefined - ? output["isValidExchange"]["#text"] - : output["isValidExchange"]) == "true"; + contents.IsValidExchange = output["isValidExchange"] == "true"; } if (output["outputReservedInstancesWillExpireAt"] !== undefined) { contents.OutputReservedInstancesWillExpireAt = new Date( @@ -59478,10 +57936,7 @@ const deserializeAws_ec2GetReservedInstancesExchangeQuoteResult = ( ); } if (output["paymentDue"] !== undefined) { - contents.PaymentDue = - output["paymentDue"]["#text"] !== undefined - ? output["paymentDue"]["#text"] - : output["paymentDue"]; + contents.PaymentDue = output["paymentDue"]; } if (output["reservedInstanceValueRollup"] !== undefined) { contents.ReservedInstanceValueRollup = deserializeAws_ec2ReservationValue( @@ -59520,10 +57975,7 @@ const deserializeAws_ec2GetReservedInstancesExchangeQuoteResult = ( ); } if (output["validationFailureReason"] !== undefined) { - contents.ValidationFailureReason = - output["validationFailureReason"]["#text"] !== undefined - ? output["validationFailureReason"]["#text"] - : output["validationFailureReason"]; + contents.ValidationFailureReason = output["validationFailureReason"]; } return contents; }; @@ -59538,10 +57990,7 @@ const deserializeAws_ec2GetTransitGatewayAttachmentPropagationsResult = ( TransitGatewayAttachmentPropagations: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.transitGatewayAttachmentPropagations === "") { contents.TransitGatewayAttachmentPropagations = []; @@ -59582,10 +58031,7 @@ const deserializeAws_ec2GetTransitGatewayMulticastDomainAssociationsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -59612,10 +58058,7 @@ const deserializeAws_ec2GetTransitGatewayRouteTableAssociationsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -59630,10 +58073,7 @@ const deserializeAws_ec2GetTransitGatewayRouteTablePropagationsResult = ( TransitGatewayRouteTablePropagations: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.transitGatewayRouteTablePropagations === "") { contents.TransitGatewayRouteTablePropagations = []; @@ -59664,17 +58104,10 @@ const deserializeAws_ec2GpuDeviceInfo = ( Name: undefined }; if (output["count"] !== undefined) { - contents.Count = parseInt( - output["count"]["#text"] !== undefined - ? output["count"]["#text"] - : output["count"] - ); + contents.Count = parseInt(output["count"]); } if (output["manufacturer"] !== undefined) { - contents.Manufacturer = - output["manufacturer"]["#text"] !== undefined - ? output["manufacturer"]["#text"] - : output["manufacturer"]; + contents.Manufacturer = output["manufacturer"]; } if (output["memoryInfo"] !== undefined) { contents.MemoryInfo = deserializeAws_ec2GpuDeviceMemoryInfo( @@ -59683,10 +58116,7 @@ const deserializeAws_ec2GpuDeviceInfo = ( ); } if (output["name"] !== undefined) { - contents.Name = - output["name"]["#text"] !== undefined - ? output["name"]["#text"] - : output["name"]; + contents.Name = output["name"]; } return contents; }; @@ -59709,11 +58139,7 @@ const deserializeAws_ec2GpuDeviceMemoryInfo = ( SizeInMiB: undefined }; if (output["sizeInMiB"] !== undefined) { - contents.SizeInMiB = parseInt( - output["sizeInMiB"]["#text"] !== undefined - ? output["sizeInMiB"]["#text"] - : output["sizeInMiB"] - ); + contents.SizeInMiB = parseInt(output["sizeInMiB"]); } return contents; }; @@ -59737,11 +58163,7 @@ const deserializeAws_ec2GpuInfo = ( ); } if (output["totalGpuMemoryInMiB"] !== undefined) { - contents.TotalGpuMemoryInMiB = parseInt( - output["totalGpuMemoryInMiB"]["#text"] !== undefined - ? output["totalGpuMemoryInMiB"]["#text"] - : output["totalGpuMemoryInMiB"] - ); + contents.TotalGpuMemoryInMiB = parseInt(output["totalGpuMemoryInMiB"]); } return contents; }; @@ -59750,9 +58172,7 @@ const deserializeAws_ec2GroupIdStringList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2GroupIdentifier = ( @@ -59765,16 +58185,10 @@ const deserializeAws_ec2GroupIdentifier = ( GroupName: undefined }; if (output["groupId"] !== undefined) { - contents.GroupId = - output["groupId"]["#text"] !== undefined - ? output["groupId"]["#text"] - : output["groupId"]; + contents.GroupId = output["groupId"]; } if (output["groupName"] !== undefined) { - contents.GroupName = - output["groupName"]["#text"] !== undefined - ? output["groupName"]["#text"] - : output["groupName"]; + contents.GroupName = output["groupName"]; } return contents; }; @@ -59806,10 +58220,7 @@ const deserializeAws_ec2HibernationOptions = ( Configured: undefined }; if (output["configured"] !== undefined) { - contents.Configured = - (output["configured"]["#text"] !== undefined - ? output["configured"]["#text"] - : output["configured"]) == "true"; + contents.Configured = output["configured"] == "true"; } return contents; }; @@ -59831,10 +58242,7 @@ const deserializeAws_ec2HistoryRecord = ( ); } if (output["eventType"] !== undefined) { - contents.EventType = - output["eventType"]["#text"] !== undefined - ? output["eventType"]["#text"] - : output["eventType"]; + contents.EventType = output["eventType"]; } if (output["timestamp"] !== undefined) { contents.Timestamp = new Date(output["timestamp"]); @@ -59859,10 +58267,7 @@ const deserializeAws_ec2HistoryRecordEntry = ( ); } if (output["eventType"] !== undefined) { - contents.EventType = - output["eventType"]["#text"] !== undefined - ? output["eventType"]["#text"] - : output["eventType"]; + contents.EventType = output["eventType"]; } if (output["timestamp"] !== undefined) { contents.Timestamp = new Date(output["timestamp"]); @@ -59914,27 +58319,16 @@ const deserializeAws_ec2Host = (output: any, context: __SerdeContext): Host => { } if (output["allowsMultipleInstanceTypes"] !== undefined) { contents.AllowsMultipleInstanceTypes = - output["allowsMultipleInstanceTypes"]["#text"] !== undefined - ? output["allowsMultipleInstanceTypes"]["#text"] - : output["allowsMultipleInstanceTypes"]; + output["allowsMultipleInstanceTypes"]; } if (output["autoPlacement"] !== undefined) { - contents.AutoPlacement = - output["autoPlacement"]["#text"] !== undefined - ? output["autoPlacement"]["#text"] - : output["autoPlacement"]; + contents.AutoPlacement = output["autoPlacement"]; } if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["availabilityZoneId"] !== undefined) { - contents.AvailabilityZoneId = - output["availabilityZoneId"]["#text"] !== undefined - ? output["availabilityZoneId"]["#text"] - : output["availabilityZoneId"]; + contents.AvailabilityZoneId = output["availabilityZoneId"]; } if (output["availableCapacity"] !== undefined) { contents.AvailableCapacity = deserializeAws_ec2AvailableCapacity( @@ -59943,16 +58337,10 @@ const deserializeAws_ec2Host = (output: any, context: __SerdeContext): Host => { ); } if (output["clientToken"] !== undefined) { - contents.ClientToken = - output["clientToken"]["#text"] !== undefined - ? output["clientToken"]["#text"] - : output["clientToken"]; + contents.ClientToken = output["clientToken"]; } if (output["hostId"] !== undefined) { - contents.HostId = - output["hostId"]["#text"] !== undefined - ? output["hostId"]["#text"] - : output["hostId"]; + contents.HostId = output["hostId"]; } if (output["hostProperties"] !== undefined) { contents.HostProperties = deserializeAws_ec2HostProperties( @@ -59961,16 +58349,10 @@ const deserializeAws_ec2Host = (output: any, context: __SerdeContext): Host => { ); } if (output["hostRecovery"] !== undefined) { - contents.HostRecovery = - output["hostRecovery"]["#text"] !== undefined - ? output["hostRecovery"]["#text"] - : output["hostRecovery"]; + contents.HostRecovery = output["hostRecovery"]; } if (output["hostReservationId"] !== undefined) { - contents.HostReservationId = - output["hostReservationId"]["#text"] !== undefined - ? output["hostReservationId"]["#text"] - : output["hostReservationId"]; + contents.HostReservationId = output["hostReservationId"]; } if (output.instances === "") { contents.Instances = []; @@ -59986,24 +58368,16 @@ const deserializeAws_ec2Host = (output: any, context: __SerdeContext): Host => { } if (output["memberOfServiceLinkedResourceGroup"] !== undefined) { contents.MemberOfServiceLinkedResourceGroup = - (output["memberOfServiceLinkedResourceGroup"]["#text"] !== undefined - ? output["memberOfServiceLinkedResourceGroup"]["#text"] - : output["memberOfServiceLinkedResourceGroup"]) == "true"; + output["memberOfServiceLinkedResourceGroup"] == "true"; } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output["releaseTime"] !== undefined) { contents.ReleaseTime = new Date(output["releaseTime"]); } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output.tagSet === "") { contents.Tags = []; @@ -60031,22 +58405,13 @@ const deserializeAws_ec2HostInstance = ( OwnerId: undefined }; if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } return contents; }; @@ -60084,47 +58449,25 @@ const deserializeAws_ec2HostOffering = ( UpfrontPrice: undefined }; if (output["currencyCode"] !== undefined) { - contents.CurrencyCode = - output["currencyCode"]["#text"] !== undefined - ? output["currencyCode"]["#text"] - : output["currencyCode"]; + contents.CurrencyCode = output["currencyCode"]; } if (output["duration"] !== undefined) { - contents.Duration = parseInt( - output["duration"]["#text"] !== undefined - ? output["duration"]["#text"] - : output["duration"] - ); + contents.Duration = parseInt(output["duration"]); } if (output["hourlyPrice"] !== undefined) { - contents.HourlyPrice = - output["hourlyPrice"]["#text"] !== undefined - ? output["hourlyPrice"]["#text"] - : output["hourlyPrice"]; + contents.HourlyPrice = output["hourlyPrice"]; } if (output["instanceFamily"] !== undefined) { - contents.InstanceFamily = - output["instanceFamily"]["#text"] !== undefined - ? output["instanceFamily"]["#text"] - : output["instanceFamily"]; + contents.InstanceFamily = output["instanceFamily"]; } if (output["offeringId"] !== undefined) { - contents.OfferingId = - output["offeringId"]["#text"] !== undefined - ? output["offeringId"]["#text"] - : output["offeringId"]; + contents.OfferingId = output["offeringId"]; } if (output["paymentOption"] !== undefined) { - contents.PaymentOption = - output["paymentOption"]["#text"] !== undefined - ? output["paymentOption"]["#text"] - : output["paymentOption"]; + contents.PaymentOption = output["paymentOption"]; } if (output["upfrontPrice"] !== undefined) { - contents.UpfrontPrice = - output["upfrontPrice"]["#text"] !== undefined - ? output["upfrontPrice"]["#text"] - : output["upfrontPrice"]; + contents.UpfrontPrice = output["upfrontPrice"]; } return contents; }; @@ -60151,37 +58494,19 @@ const deserializeAws_ec2HostProperties = ( TotalVCpus: undefined }; if (output["cores"] !== undefined) { - contents.Cores = parseInt( - output["cores"]["#text"] !== undefined - ? output["cores"]["#text"] - : output["cores"] - ); + contents.Cores = parseInt(output["cores"]); } if (output["instanceFamily"] !== undefined) { - contents.InstanceFamily = - output["instanceFamily"]["#text"] !== undefined - ? output["instanceFamily"]["#text"] - : output["instanceFamily"]; + contents.InstanceFamily = output["instanceFamily"]; } if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output["sockets"] !== undefined) { - contents.Sockets = parseInt( - output["sockets"]["#text"] !== undefined - ? output["sockets"]["#text"] - : output["sockets"] - ); + contents.Sockets = parseInt(output["sockets"]); } if (output["totalVCpus"] !== undefined) { - contents.TotalVCpus = parseInt( - output["totalVCpus"]["#text"] !== undefined - ? output["totalVCpus"]["#text"] - : output["totalVCpus"] - ); + contents.TotalVCpus = parseInt(output["totalVCpus"]); } return contents; }; @@ -60208,24 +58533,13 @@ const deserializeAws_ec2HostReservation = ( UpfrontPrice: undefined }; if (output["count"] !== undefined) { - contents.Count = parseInt( - output["count"]["#text"] !== undefined - ? output["count"]["#text"] - : output["count"] - ); + contents.Count = parseInt(output["count"]); } if (output["currencyCode"] !== undefined) { - contents.CurrencyCode = - output["currencyCode"]["#text"] !== undefined - ? output["currencyCode"]["#text"] - : output["currencyCode"]; + contents.CurrencyCode = output["currencyCode"]; } if (output["duration"] !== undefined) { - contents.Duration = parseInt( - output["duration"]["#text"] !== undefined - ? output["duration"]["#text"] - : output["duration"] - ); + contents.Duration = parseInt(output["duration"]); } if (output["end"] !== undefined) { contents.End = new Date(output["end"]); @@ -60243,43 +58557,25 @@ const deserializeAws_ec2HostReservation = ( ); } if (output["hostReservationId"] !== undefined) { - contents.HostReservationId = - output["hostReservationId"]["#text"] !== undefined - ? output["hostReservationId"]["#text"] - : output["hostReservationId"]; + contents.HostReservationId = output["hostReservationId"]; } if (output["hourlyPrice"] !== undefined) { - contents.HourlyPrice = - output["hourlyPrice"]["#text"] !== undefined - ? output["hourlyPrice"]["#text"] - : output["hourlyPrice"]; + contents.HourlyPrice = output["hourlyPrice"]; } if (output["instanceFamily"] !== undefined) { - contents.InstanceFamily = - output["instanceFamily"]["#text"] !== undefined - ? output["instanceFamily"]["#text"] - : output["instanceFamily"]; + contents.InstanceFamily = output["instanceFamily"]; } if (output["offeringId"] !== undefined) { - contents.OfferingId = - output["offeringId"]["#text"] !== undefined - ? output["offeringId"]["#text"] - : output["offeringId"]; + contents.OfferingId = output["offeringId"]; } if (output["paymentOption"] !== undefined) { - contents.PaymentOption = - output["paymentOption"]["#text"] !== undefined - ? output["paymentOption"]["#text"] - : output["paymentOption"]; + contents.PaymentOption = output["paymentOption"]; } if (output["start"] !== undefined) { contents.Start = new Date(output["start"]); } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output.tagSet === "") { contents.Tags = []; @@ -60294,10 +58590,7 @@ const deserializeAws_ec2HostReservation = ( ); } if (output["upfrontPrice"] !== undefined) { - contents.UpfrontPrice = - output["upfrontPrice"]["#text"] !== undefined - ? output["upfrontPrice"]["#text"] - : output["upfrontPrice"]; + contents.UpfrontPrice = output["upfrontPrice"]; } return contents; }; @@ -60329,10 +58622,7 @@ const deserializeAws_ec2IKEVersionsListValue = ( Value: undefined }; if (output["value"] !== undefined) { - contents.Value = - output["value"]["#text"] !== undefined - ? output["value"]["#text"] - : output["value"]; + contents.Value = output["value"]; } return contents; }; @@ -60347,16 +58637,10 @@ const deserializeAws_ec2IamInstanceProfile = ( Id: undefined }; if (output["arn"] !== undefined) { - contents.Arn = - output["arn"]["#text"] !== undefined - ? output["arn"]["#text"] - : output["arn"]; + contents.Arn = output["arn"]; } if (output["id"] !== undefined) { - contents.Id = - output["id"]["#text"] !== undefined - ? output["id"]["#text"] - : output["id"]; + contents.Id = output["id"]; } return contents; }; @@ -60374,10 +58658,7 @@ const deserializeAws_ec2IamInstanceProfileAssociation = ( Timestamp: undefined }; if (output["associationId"] !== undefined) { - contents.AssociationId = - output["associationId"]["#text"] !== undefined - ? output["associationId"]["#text"] - : output["associationId"]; + contents.AssociationId = output["associationId"]; } if (output["iamInstanceProfile"] !== undefined) { contents.IamInstanceProfile = deserializeAws_ec2IamInstanceProfile( @@ -60386,16 +58667,10 @@ const deserializeAws_ec2IamInstanceProfileAssociation = ( ); } if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["timestamp"] !== undefined) { contents.Timestamp = new Date(output["timestamp"]); @@ -60422,16 +58697,10 @@ const deserializeAws_ec2IamInstanceProfileSpecification = ( Name: undefined }; if (output["arn"] !== undefined) { - contents.Arn = - output["arn"]["#text"] !== undefined - ? output["arn"]["#text"] - : output["arn"]; + contents.Arn = output["arn"]; } if (output["name"] !== undefined) { - contents.Name = - output["name"]["#text"] !== undefined - ? output["name"]["#text"] - : output["name"]; + contents.Name = output["name"]; } return contents; }; @@ -60446,18 +58715,10 @@ const deserializeAws_ec2IcmpTypeCode = ( Type: undefined }; if (output["code"] !== undefined) { - contents.Code = parseInt( - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"] - ); + contents.Code = parseInt(output["code"]); } if (output["type"] !== undefined) { - contents.Type = parseInt( - output["type"]["#text"] !== undefined - ? output["type"]["#text"] - : output["type"] - ); + contents.Type = parseInt(output["type"]); } return contents; }; @@ -60476,16 +58737,10 @@ const deserializeAws_ec2IdFormat = ( contents.Deadline = new Date(output["deadline"]); } if (output["resource"] !== undefined) { - contents.Resource = - output["resource"]["#text"] !== undefined - ? output["resource"]["#text"] - : output["resource"]; + contents.Resource = output["resource"]; } if (output["useLongIds"] !== undefined) { - contents.UseLongIds = - (output["useLongIds"]["#text"] !== undefined - ? output["useLongIds"]["#text"] - : output["useLongIds"]) == "true"; + contents.UseLongIds = output["useLongIds"] == "true"; } return contents; }; @@ -60531,10 +58786,7 @@ const deserializeAws_ec2Image = ( VirtualizationType: undefined }; if (output["architecture"] !== undefined) { - contents.Architecture = - output["architecture"]["#text"] !== undefined - ? output["architecture"]["#text"] - : output["architecture"]; + contents.Architecture = output["architecture"]; } if (output.blockDeviceMapping === "") { contents.BlockDeviceMappings = []; @@ -60549,76 +58801,40 @@ const deserializeAws_ec2Image = ( ); } if (output["creationDate"] !== undefined) { - contents.CreationDate = - output["creationDate"]["#text"] !== undefined - ? output["creationDate"]["#text"] - : output["creationDate"]; + contents.CreationDate = output["creationDate"]; } if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["enaSupport"] !== undefined) { - contents.EnaSupport = - (output["enaSupport"]["#text"] !== undefined - ? output["enaSupport"]["#text"] - : output["enaSupport"]) == "true"; + contents.EnaSupport = output["enaSupport"] == "true"; } if (output["hypervisor"] !== undefined) { - contents.Hypervisor = - output["hypervisor"]["#text"] !== undefined - ? output["hypervisor"]["#text"] - : output["hypervisor"]; + contents.Hypervisor = output["hypervisor"]; } if (output["imageId"] !== undefined) { - contents.ImageId = - output["imageId"]["#text"] !== undefined - ? output["imageId"]["#text"] - : output["imageId"]; + contents.ImageId = output["imageId"]; } if (output["imageLocation"] !== undefined) { - contents.ImageLocation = - output["imageLocation"]["#text"] !== undefined - ? output["imageLocation"]["#text"] - : output["imageLocation"]; + contents.ImageLocation = output["imageLocation"]; } if (output["imageOwnerAlias"] !== undefined) { - contents.ImageOwnerAlias = - output["imageOwnerAlias"]["#text"] !== undefined - ? output["imageOwnerAlias"]["#text"] - : output["imageOwnerAlias"]; + contents.ImageOwnerAlias = output["imageOwnerAlias"]; } if (output["imageType"] !== undefined) { - contents.ImageType = - output["imageType"]["#text"] !== undefined - ? output["imageType"]["#text"] - : output["imageType"]; + contents.ImageType = output["imageType"]; } if (output["kernelId"] !== undefined) { - contents.KernelId = - output["kernelId"]["#text"] !== undefined - ? output["kernelId"]["#text"] - : output["kernelId"]; + contents.KernelId = output["kernelId"]; } if (output["name"] !== undefined) { - contents.Name = - output["name"]["#text"] !== undefined - ? output["name"]["#text"] - : output["name"]; + contents.Name = output["name"]; } if (output["imageOwnerId"] !== undefined) { - contents.OwnerId = - output["imageOwnerId"]["#text"] !== undefined - ? output["imageOwnerId"]["#text"] - : output["imageOwnerId"]; + contents.OwnerId = output["imageOwnerId"]; } if (output["platform"] !== undefined) { - contents.Platform = - output["platform"]["#text"] !== undefined - ? output["platform"]["#text"] - : output["platform"]; + contents.Platform = output["platform"]; } if (output.productCodes === "") { contents.ProductCodes = []; @@ -60633,40 +58849,22 @@ const deserializeAws_ec2Image = ( ); } if (output["isPublic"] !== undefined) { - contents.Public = - (output["isPublic"]["#text"] !== undefined - ? output["isPublic"]["#text"] - : output["isPublic"]) == "true"; + contents.Public = output["isPublic"] == "true"; } if (output["ramdiskId"] !== undefined) { - contents.RamdiskId = - output["ramdiskId"]["#text"] !== undefined - ? output["ramdiskId"]["#text"] - : output["ramdiskId"]; + contents.RamdiskId = output["ramdiskId"]; } if (output["rootDeviceName"] !== undefined) { - contents.RootDeviceName = - output["rootDeviceName"]["#text"] !== undefined - ? output["rootDeviceName"]["#text"] - : output["rootDeviceName"]; + contents.RootDeviceName = output["rootDeviceName"]; } if (output["rootDeviceType"] !== undefined) { - contents.RootDeviceType = - output["rootDeviceType"]["#text"] !== undefined - ? output["rootDeviceType"]["#text"] - : output["rootDeviceType"]; + contents.RootDeviceType = output["rootDeviceType"]; } if (output["sriovNetSupport"] !== undefined) { - contents.SriovNetSupport = - output["sriovNetSupport"]["#text"] !== undefined - ? output["sriovNetSupport"]["#text"] - : output["sriovNetSupport"]; + contents.SriovNetSupport = output["sriovNetSupport"]; } if (output["imageState"] !== undefined) { - contents.State = - output["imageState"]["#text"] !== undefined - ? output["imageState"]["#text"] - : output["imageState"]; + contents.State = output["imageState"]; } if (output["stateReason"] !== undefined) { contents.StateReason = deserializeAws_ec2StateReason( @@ -60687,10 +58885,7 @@ const deserializeAws_ec2Image = ( ); } if (output["virtualizationType"] !== undefined) { - contents.VirtualizationType = - output["virtualizationType"]["#text"] !== undefined - ? output["virtualizationType"]["#text"] - : output["virtualizationType"]; + contents.VirtualizationType = output["virtualizationType"]; } return contents; }; @@ -60729,10 +58924,7 @@ const deserializeAws_ec2ImageAttribute = ( ); } if (output["imageId"] !== undefined) { - contents.ImageId = - output["imageId"]["#text"] !== undefined - ? output["imageId"]["#text"] - : output["imageId"]; + contents.ImageId = output["imageId"]; } if (output["kernel"] !== undefined) { contents.KernelId = deserializeAws_ec2AttributeValue( @@ -60797,10 +58989,7 @@ const deserializeAws_ec2ImportClientVpnClientCertificateRevocationListResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -60814,10 +59003,7 @@ const deserializeAws_ec2ImportImageLicenseConfigurationResponse = ( LicenseConfigurationArn: undefined }; if (output["licenseConfigurationArn"] !== undefined) { - contents.LicenseConfigurationArn = - output["licenseConfigurationArn"]["#text"] !== undefined - ? output["licenseConfigurationArn"]["#text"] - : output["licenseConfigurationArn"]; + contents.LicenseConfigurationArn = output["licenseConfigurationArn"]; } return contents; }; @@ -60853,46 +59039,25 @@ const deserializeAws_ec2ImportImageResult = ( StatusMessage: undefined }; if (output["architecture"] !== undefined) { - contents.Architecture = - output["architecture"]["#text"] !== undefined - ? output["architecture"]["#text"] - : output["architecture"]; + contents.Architecture = output["architecture"]; } if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["encrypted"] !== undefined) { - contents.Encrypted = - (output["encrypted"]["#text"] !== undefined - ? output["encrypted"]["#text"] - : output["encrypted"]) == "true"; + contents.Encrypted = output["encrypted"] == "true"; } if (output["hypervisor"] !== undefined) { - contents.Hypervisor = - output["hypervisor"]["#text"] !== undefined - ? output["hypervisor"]["#text"] - : output["hypervisor"]; + contents.Hypervisor = output["hypervisor"]; } if (output["imageId"] !== undefined) { - contents.ImageId = - output["imageId"]["#text"] !== undefined - ? output["imageId"]["#text"] - : output["imageId"]; + contents.ImageId = output["imageId"]; } if (output["importTaskId"] !== undefined) { - contents.ImportTaskId = - output["importTaskId"]["#text"] !== undefined - ? output["importTaskId"]["#text"] - : output["importTaskId"]; + contents.ImportTaskId = output["importTaskId"]; } if (output["kmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["kmsKeyId"]["#text"] !== undefined - ? output["kmsKeyId"]["#text"] - : output["kmsKeyId"]; + contents.KmsKeyId = output["kmsKeyId"]; } if (output.licenseSpecifications === "") { contents.LicenseSpecifications = []; @@ -60907,22 +59072,13 @@ const deserializeAws_ec2ImportImageResult = ( ); } if (output["licenseType"] !== undefined) { - contents.LicenseType = - output["licenseType"]["#text"] !== undefined - ? output["licenseType"]["#text"] - : output["licenseType"]; + contents.LicenseType = output["licenseType"]; } if (output["platform"] !== undefined) { - contents.Platform = - output["platform"]["#text"] !== undefined - ? output["platform"]["#text"] - : output["platform"]; + contents.Platform = output["platform"]; } if (output["progress"] !== undefined) { - contents.Progress = - output["progress"]["#text"] !== undefined - ? output["progress"]["#text"] - : output["progress"]; + contents.Progress = output["progress"]; } if (output.snapshotDetailSet === "") { contents.SnapshotDetails = []; @@ -60937,16 +59093,10 @@ const deserializeAws_ec2ImportImageResult = ( ); } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } if (output["statusMessage"] !== undefined) { - contents.StatusMessage = - output["statusMessage"]["#text"] !== undefined - ? output["statusMessage"]["#text"] - : output["statusMessage"]; + contents.StatusMessage = output["statusMessage"]; } return contents; }; @@ -60974,46 +59124,25 @@ const deserializeAws_ec2ImportImageTask = ( Tags: undefined }; if (output["architecture"] !== undefined) { - contents.Architecture = - output["architecture"]["#text"] !== undefined - ? output["architecture"]["#text"] - : output["architecture"]; + contents.Architecture = output["architecture"]; } if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["encrypted"] !== undefined) { - contents.Encrypted = - (output["encrypted"]["#text"] !== undefined - ? output["encrypted"]["#text"] - : output["encrypted"]) == "true"; + contents.Encrypted = output["encrypted"] == "true"; } if (output["hypervisor"] !== undefined) { - contents.Hypervisor = - output["hypervisor"]["#text"] !== undefined - ? output["hypervisor"]["#text"] - : output["hypervisor"]; + contents.Hypervisor = output["hypervisor"]; } if (output["imageId"] !== undefined) { - contents.ImageId = - output["imageId"]["#text"] !== undefined - ? output["imageId"]["#text"] - : output["imageId"]; + contents.ImageId = output["imageId"]; } if (output["importTaskId"] !== undefined) { - contents.ImportTaskId = - output["importTaskId"]["#text"] !== undefined - ? output["importTaskId"]["#text"] - : output["importTaskId"]; + contents.ImportTaskId = output["importTaskId"]; } if (output["kmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["kmsKeyId"]["#text"] !== undefined - ? output["kmsKeyId"]["#text"] - : output["kmsKeyId"]; + contents.KmsKeyId = output["kmsKeyId"]; } if (output.licenseSpecifications === "") { contents.LicenseSpecifications = []; @@ -61028,22 +59157,13 @@ const deserializeAws_ec2ImportImageTask = ( ); } if (output["licenseType"] !== undefined) { - contents.LicenseType = - output["licenseType"]["#text"] !== undefined - ? output["licenseType"]["#text"] - : output["licenseType"]; + contents.LicenseType = output["licenseType"]; } if (output["platform"] !== undefined) { - contents.Platform = - output["platform"]["#text"] !== undefined - ? output["platform"]["#text"] - : output["platform"]; + contents.Platform = output["platform"]; } if (output["progress"] !== undefined) { - contents.Progress = - output["progress"]["#text"] !== undefined - ? output["progress"]["#text"] - : output["progress"]; + contents.Progress = output["progress"]; } if (output.snapshotDetailSet === "") { contents.SnapshotDetails = []; @@ -61058,16 +59178,10 @@ const deserializeAws_ec2ImportImageTask = ( ); } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } if (output["statusMessage"] !== undefined) { - contents.StatusMessage = - output["statusMessage"]["#text"] !== undefined - ? output["statusMessage"]["#text"] - : output["statusMessage"]; + contents.StatusMessage = output["statusMessage"]; } if (output.tagSet === "") { contents.Tags = []; @@ -61122,22 +59236,13 @@ const deserializeAws_ec2ImportInstanceTaskDetails = ( Volumes: undefined }; if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } if (output["platform"] !== undefined) { - contents.Platform = - output["platform"]["#text"] !== undefined - ? output["platform"]["#text"] - : output["platform"]; + contents.Platform = output["platform"]; } if (output.volumes === "") { contents.Volumes = []; @@ -61169,23 +59274,13 @@ const deserializeAws_ec2ImportInstanceVolumeDetailItem = ( Volume: undefined }; if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["bytesConverted"] !== undefined) { - contents.BytesConverted = parseInt( - output["bytesConverted"]["#text"] !== undefined - ? output["bytesConverted"]["#text"] - : output["bytesConverted"] - ); + contents.BytesConverted = parseInt(output["bytesConverted"]); } if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["image"] !== undefined) { contents.Image = deserializeAws_ec2DiskImageDescription( @@ -61194,16 +59289,10 @@ const deserializeAws_ec2ImportInstanceVolumeDetailItem = ( ); } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } if (output["statusMessage"] !== undefined) { - contents.StatusMessage = - output["statusMessage"]["#text"] !== undefined - ? output["statusMessage"]["#text"] - : output["statusMessage"]; + contents.StatusMessage = output["statusMessage"]; } if (output["volume"] !== undefined) { contents.Volume = deserializeAws_ec2DiskImageVolumeDescription( @@ -61233,16 +59322,10 @@ const deserializeAws_ec2ImportKeyPairResult = ( KeyName: undefined }; if (output["keyFingerprint"] !== undefined) { - contents.KeyFingerprint = - output["keyFingerprint"]["#text"] !== undefined - ? output["keyFingerprint"]["#text"] - : output["keyFingerprint"]; + contents.KeyFingerprint = output["keyFingerprint"]; } if (output["keyName"] !== undefined) { - contents.KeyName = - output["keyName"]["#text"] !== undefined - ? output["keyName"]["#text"] - : output["keyName"]; + contents.KeyName = output["keyName"]; } return contents; }; @@ -61258,16 +59341,10 @@ const deserializeAws_ec2ImportSnapshotResult = ( SnapshotTaskDetail: undefined }; if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["importTaskId"] !== undefined) { - contents.ImportTaskId = - output["importTaskId"]["#text"] !== undefined - ? output["importTaskId"]["#text"] - : output["importTaskId"]; + contents.ImportTaskId = output["importTaskId"]; } if (output["snapshotTaskDetail"] !== undefined) { contents.SnapshotTaskDetail = deserializeAws_ec2SnapshotTaskDetail( @@ -61290,16 +59367,10 @@ const deserializeAws_ec2ImportSnapshotTask = ( Tags: undefined }; if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["importTaskId"] !== undefined) { - contents.ImportTaskId = - output["importTaskId"]["#text"] !== undefined - ? output["importTaskId"]["#text"] - : output["importTaskId"]; + contents.ImportTaskId = output["importTaskId"]; } if (output["snapshotTaskDetail"] !== undefined) { contents.SnapshotTaskDetail = deserializeAws_ec2SnapshotTaskDetail( @@ -61361,23 +59432,13 @@ const deserializeAws_ec2ImportVolumeTaskDetails = ( Volume: undefined }; if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["bytesConverted"] !== undefined) { - contents.BytesConverted = parseInt( - output["bytesConverted"]["#text"] !== undefined - ? output["bytesConverted"]["#text"] - : output["bytesConverted"] - ); + contents.BytesConverted = parseInt(output["bytesConverted"]); } if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["image"] !== undefined) { contents.Image = deserializeAws_ec2DiskImageDescription( @@ -61428,23 +59489,13 @@ const deserializeAws_ec2InferenceDeviceInfo = ( Name: undefined }; if (output["count"] !== undefined) { - contents.Count = parseInt( - output["count"]["#text"] !== undefined - ? output["count"]["#text"] - : output["count"] - ); + contents.Count = parseInt(output["count"]); } if (output["manufacturer"] !== undefined) { - contents.Manufacturer = - output["manufacturer"]["#text"] !== undefined - ? output["manufacturer"]["#text"] - : output["manufacturer"]; + contents.Manufacturer = output["manufacturer"]; } if (output["name"] !== undefined) { - contents.Name = - output["name"]["#text"] !== undefined - ? output["name"]["#text"] - : output["name"]; + contents.Name = output["name"]; } return contents; }; @@ -61513,17 +59564,10 @@ const deserializeAws_ec2Instance = ( VpcId: undefined }; if (output["amiLaunchIndex"] !== undefined) { - contents.AmiLaunchIndex = parseInt( - output["amiLaunchIndex"]["#text"] !== undefined - ? output["amiLaunchIndex"]["#text"] - : output["amiLaunchIndex"] - ); + contents.AmiLaunchIndex = parseInt(output["amiLaunchIndex"]); } if (output["architecture"] !== undefined) { - contents.Architecture = - output["architecture"]["#text"] !== undefined - ? output["architecture"]["#text"] - : output["architecture"]; + contents.Architecture = output["architecture"]; } if (output.blockDeviceMapping === "") { contents.BlockDeviceMappings = []; @@ -61538,10 +59582,7 @@ const deserializeAws_ec2Instance = ( ); } if (output["capacityReservationId"] !== undefined) { - contents.CapacityReservationId = - output["capacityReservationId"]["#text"] !== undefined - ? output["capacityReservationId"]["#text"] - : output["capacityReservationId"]; + contents.CapacityReservationId = output["capacityReservationId"]; } if (output["capacityReservationSpecification"] !== undefined) { contents.CapacityReservationSpecification = deserializeAws_ec2CapacityReservationSpecificationResponse( @@ -61550,10 +59591,7 @@ const deserializeAws_ec2Instance = ( ); } if (output["clientToken"] !== undefined) { - contents.ClientToken = - output["clientToken"]["#text"] !== undefined - ? output["clientToken"]["#text"] - : output["clientToken"]; + contents.ClientToken = output["clientToken"]; } if (output["cpuOptions"] !== undefined) { contents.CpuOptions = deserializeAws_ec2CpuOptions( @@ -61562,10 +59600,7 @@ const deserializeAws_ec2Instance = ( ); } if (output["ebsOptimized"] !== undefined) { - contents.EbsOptimized = - (output["ebsOptimized"]["#text"] !== undefined - ? output["ebsOptimized"]["#text"] - : output["ebsOptimized"]) == "true"; + contents.EbsOptimized = output["ebsOptimized"] == "true"; } if (output.elasticGpuAssociationSet === "") { contents.ElasticGpuAssociations = []; @@ -61594,10 +59629,7 @@ const deserializeAws_ec2Instance = ( ); } if (output["enaSupport"] !== undefined) { - contents.EnaSupport = - (output["enaSupport"]["#text"] !== undefined - ? output["enaSupport"]["#text"] - : output["enaSupport"]) == "true"; + contents.EnaSupport = output["enaSupport"] == "true"; } if (output["hibernationOptions"] !== undefined) { contents.HibernationOptions = deserializeAws_ec2HibernationOptions( @@ -61606,10 +59638,7 @@ const deserializeAws_ec2Instance = ( ); } if (output["hypervisor"] !== undefined) { - contents.Hypervisor = - output["hypervisor"]["#text"] !== undefined - ? output["hypervisor"]["#text"] - : output["hypervisor"]; + contents.Hypervisor = output["hypervisor"]; } if (output["iamInstanceProfile"] !== undefined) { contents.IamInstanceProfile = deserializeAws_ec2IamInstanceProfile( @@ -61618,40 +59647,22 @@ const deserializeAws_ec2Instance = ( ); } if (output["imageId"] !== undefined) { - contents.ImageId = - output["imageId"]["#text"] !== undefined - ? output["imageId"]["#text"] - : output["imageId"]; + contents.ImageId = output["imageId"]; } if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } if (output["instanceLifecycle"] !== undefined) { - contents.InstanceLifecycle = - output["instanceLifecycle"]["#text"] !== undefined - ? output["instanceLifecycle"]["#text"] - : output["instanceLifecycle"]; + contents.InstanceLifecycle = output["instanceLifecycle"]; } if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output["kernelId"] !== undefined) { - contents.KernelId = - output["kernelId"]["#text"] !== undefined - ? output["kernelId"]["#text"] - : output["kernelId"]; + contents.KernelId = output["kernelId"]; } if (output["keyName"] !== undefined) { - contents.KeyName = - output["keyName"]["#text"] !== undefined - ? output["keyName"]["#text"] - : output["keyName"]; + contents.KeyName = output["keyName"]; } if (output["launchTime"] !== undefined) { contents.LaunchTime = new Date(output["launchTime"]); @@ -61693,10 +59704,7 @@ const deserializeAws_ec2Instance = ( ); } if (output["outpostArn"] !== undefined) { - contents.OutpostArn = - output["outpostArn"]["#text"] !== undefined - ? output["outpostArn"]["#text"] - : output["outpostArn"]; + contents.OutpostArn = output["outpostArn"]; } if (output["placement"] !== undefined) { contents.Placement = deserializeAws_ec2Placement( @@ -61705,22 +59713,13 @@ const deserializeAws_ec2Instance = ( ); } if (output["platform"] !== undefined) { - contents.Platform = - output["platform"]["#text"] !== undefined - ? output["platform"]["#text"] - : output["platform"]; + contents.Platform = output["platform"]; } if (output["privateDnsName"] !== undefined) { - contents.PrivateDnsName = - output["privateDnsName"]["#text"] !== undefined - ? output["privateDnsName"]["#text"] - : output["privateDnsName"]; + contents.PrivateDnsName = output["privateDnsName"]; } if (output["privateIpAddress"] !== undefined) { - contents.PrivateIpAddress = - output["privateIpAddress"]["#text"] !== undefined - ? output["privateIpAddress"]["#text"] - : output["privateIpAddress"]; + contents.PrivateIpAddress = output["privateIpAddress"]; } if (output.productCodes === "") { contents.ProductCodes = []; @@ -61735,34 +59734,19 @@ const deserializeAws_ec2Instance = ( ); } if (output["dnsName"] !== undefined) { - contents.PublicDnsName = - output["dnsName"]["#text"] !== undefined - ? output["dnsName"]["#text"] - : output["dnsName"]; + contents.PublicDnsName = output["dnsName"]; } if (output["ipAddress"] !== undefined) { - contents.PublicIpAddress = - output["ipAddress"]["#text"] !== undefined - ? output["ipAddress"]["#text"] - : output["ipAddress"]; + contents.PublicIpAddress = output["ipAddress"]; } if (output["ramdiskId"] !== undefined) { - contents.RamdiskId = - output["ramdiskId"]["#text"] !== undefined - ? output["ramdiskId"]["#text"] - : output["ramdiskId"]; + contents.RamdiskId = output["ramdiskId"]; } if (output["rootDeviceName"] !== undefined) { - contents.RootDeviceName = - output["rootDeviceName"]["#text"] !== undefined - ? output["rootDeviceName"]["#text"] - : output["rootDeviceName"]; + contents.RootDeviceName = output["rootDeviceName"]; } if (output["rootDeviceType"] !== undefined) { - contents.RootDeviceType = - output["rootDeviceType"]["#text"] !== undefined - ? output["rootDeviceType"]["#text"] - : output["rootDeviceType"]; + contents.RootDeviceType = output["rootDeviceType"]; } if (output.groupSet === "") { contents.SecurityGroups = []; @@ -61777,22 +59761,13 @@ const deserializeAws_ec2Instance = ( ); } if (output["sourceDestCheck"] !== undefined) { - contents.SourceDestCheck = - (output["sourceDestCheck"]["#text"] !== undefined - ? output["sourceDestCheck"]["#text"] - : output["sourceDestCheck"]) == "true"; + contents.SourceDestCheck = output["sourceDestCheck"] == "true"; } if (output["spotInstanceRequestId"] !== undefined) { - contents.SpotInstanceRequestId = - output["spotInstanceRequestId"]["#text"] !== undefined - ? output["spotInstanceRequestId"]["#text"] - : output["spotInstanceRequestId"]; + contents.SpotInstanceRequestId = output["spotInstanceRequestId"]; } if (output["sriovNetSupport"] !== undefined) { - contents.SriovNetSupport = - output["sriovNetSupport"]["#text"] !== undefined - ? output["sriovNetSupport"]["#text"] - : output["sriovNetSupport"]; + contents.SriovNetSupport = output["sriovNetSupport"]; } if (output["instanceState"] !== undefined) { contents.State = deserializeAws_ec2InstanceState( @@ -61807,16 +59782,10 @@ const deserializeAws_ec2Instance = ( ); } if (output["reason"] !== undefined) { - contents.StateTransitionReason = - output["reason"]["#text"] !== undefined - ? output["reason"]["#text"] - : output["reason"]; + contents.StateTransitionReason = output["reason"]; } if (output["subnetId"] !== undefined) { - contents.SubnetId = - output["subnetId"]["#text"] !== undefined - ? output["subnetId"]["#text"] - : output["subnetId"]; + contents.SubnetId = output["subnetId"]; } if (output.tagSet === "") { contents.Tags = []; @@ -61831,16 +59800,10 @@ const deserializeAws_ec2Instance = ( ); } if (output["virtualizationType"] !== undefined) { - contents.VirtualizationType = - output["virtualizationType"]["#text"] !== undefined - ? output["virtualizationType"]["#text"] - : output["virtualizationType"]; + contents.VirtualizationType = output["virtualizationType"]; } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -61910,10 +59873,7 @@ const deserializeAws_ec2InstanceAttribute = ( ); } if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } if (output["instanceInitiatedShutdownBehavior"] !== undefined) { contents.InstanceInitiatedShutdownBehavior = deserializeAws_ec2AttributeValue( @@ -61988,10 +59948,7 @@ const deserializeAws_ec2InstanceBlockDeviceMapping = ( Ebs: undefined }; if (output["deviceName"] !== undefined) { - contents.DeviceName = - output["deviceName"]["#text"] !== undefined - ? output["deviceName"]["#text"] - : output["deviceName"]; + contents.DeviceName = output["deviceName"]; } if (output["ebs"] !== undefined) { contents.Ebs = deserializeAws_ec2EbsInstanceBlockDevice( @@ -62022,24 +59979,13 @@ const deserializeAws_ec2InstanceCapacity = ( TotalCapacity: undefined }; if (output["availableCapacity"] !== undefined) { - contents.AvailableCapacity = parseInt( - output["availableCapacity"]["#text"] !== undefined - ? output["availableCapacity"]["#text"] - : output["availableCapacity"] - ); + contents.AvailableCapacity = parseInt(output["availableCapacity"]); } if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output["totalCapacity"] !== undefined) { - contents.TotalCapacity = parseInt( - output["totalCapacity"]["#text"] !== undefined - ? output["totalCapacity"]["#text"] - : output["totalCapacity"] - ); + contents.TotalCapacity = parseInt(output["totalCapacity"]); } return contents; }; @@ -62054,17 +60000,10 @@ const deserializeAws_ec2InstanceCount = ( State: undefined }; if (output["instanceCount"] !== undefined) { - contents.InstanceCount = parseInt( - output["instanceCount"]["#text"] !== undefined - ? output["instanceCount"]["#text"] - : output["instanceCount"] - ); + contents.InstanceCount = parseInt(output["instanceCount"]); } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } return contents; }; @@ -62088,16 +60027,10 @@ const deserializeAws_ec2InstanceCreditSpecification = ( InstanceId: undefined }; if (output["cpuCredits"] !== undefined) { - contents.CpuCredits = - output["cpuCredits"]["#text"] !== undefined - ? output["cpuCredits"]["#text"] - : output["cpuCredits"]; + contents.CpuCredits = output["cpuCredits"]; } if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } return contents; }; @@ -62121,16 +60054,10 @@ const deserializeAws_ec2InstanceExportDetails = ( TargetEnvironment: undefined }; if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } if (output["targetEnvironment"] !== undefined) { - contents.TargetEnvironment = - output["targetEnvironment"]["#text"] !== undefined - ? output["targetEnvironment"]["#text"] - : output["targetEnvironment"]; + contents.TargetEnvironment = output["targetEnvironment"]; } return contents; }; @@ -62145,16 +60072,10 @@ const deserializeAws_ec2InstanceFamilyCreditSpecification = ( InstanceFamily: undefined }; if (output["cpuCredits"] !== undefined) { - contents.CpuCredits = - output["cpuCredits"]["#text"] !== undefined - ? output["cpuCredits"]["#text"] - : output["cpuCredits"]; + contents.CpuCredits = output["cpuCredits"]; } if (output["instanceFamily"] !== undefined) { - contents.InstanceFamily = - output["instanceFamily"]["#text"] !== undefined - ? output["instanceFamily"]["#text"] - : output["instanceFamily"]; + contents.InstanceFamily = output["instanceFamily"]; } return contents; }; @@ -62163,18 +60084,14 @@ const deserializeAws_ec2InstanceIdSet = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2InstanceIdsSet = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2InstanceIpv6Address = ( @@ -62186,10 +60103,7 @@ const deserializeAws_ec2InstanceIpv6Address = ( Ipv6Address: undefined }; if (output["ipv6Address"] !== undefined) { - contents.Ipv6Address = - output["ipv6Address"]["#text"] !== undefined - ? output["ipv6Address"]["#text"] - : output["ipv6Address"]; + contents.Ipv6Address = output["ipv6Address"]; } return contents; }; @@ -62224,29 +60138,18 @@ const deserializeAws_ec2InstanceMetadataOptionsResponse = ( State: undefined }; if (output["httpEndpoint"] !== undefined) { - contents.HttpEndpoint = - output["httpEndpoint"]["#text"] !== undefined - ? output["httpEndpoint"]["#text"] - : output["httpEndpoint"]; + contents.HttpEndpoint = output["httpEndpoint"]; } if (output["httpPutResponseHopLimit"] !== undefined) { contents.HttpPutResponseHopLimit = parseInt( - output["httpPutResponseHopLimit"]["#text"] !== undefined - ? output["httpPutResponseHopLimit"]["#text"] - : output["httpPutResponseHopLimit"] + output["httpPutResponseHopLimit"] ); } if (output["httpTokens"] !== undefined) { - contents.HttpTokens = - output["httpTokens"]["#text"] !== undefined - ? output["httpTokens"]["#text"] - : output["httpTokens"]; + contents.HttpTokens = output["httpTokens"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } return contents; }; @@ -62261,10 +60164,7 @@ const deserializeAws_ec2InstanceMonitoring = ( Monitoring: undefined }; if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } if (output["monitoring"] !== undefined) { contents.Monitoring = deserializeAws_ec2Monitoring( @@ -62320,10 +60220,7 @@ const deserializeAws_ec2InstanceNetworkInterface = ( ); } if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output.groupSet === "") { contents.Groups = []; @@ -62338,10 +60235,7 @@ const deserializeAws_ec2InstanceNetworkInterface = ( ); } if (output["interfaceType"] !== undefined) { - contents.InterfaceType = - output["interfaceType"]["#text"] !== undefined - ? output["interfaceType"]["#text"] - : output["interfaceType"]; + contents.InterfaceType = output["interfaceType"]; } if (output.ipv6AddressesSet === "") { contents.Ipv6Addresses = []; @@ -62356,34 +60250,19 @@ const deserializeAws_ec2InstanceNetworkInterface = ( ); } if (output["macAddress"] !== undefined) { - contents.MacAddress = - output["macAddress"]["#text"] !== undefined - ? output["macAddress"]["#text"] - : output["macAddress"]; + contents.MacAddress = output["macAddress"]; } if (output["networkInterfaceId"] !== undefined) { - contents.NetworkInterfaceId = - output["networkInterfaceId"]["#text"] !== undefined - ? output["networkInterfaceId"]["#text"] - : output["networkInterfaceId"]; + contents.NetworkInterfaceId = output["networkInterfaceId"]; } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output["privateDnsName"] !== undefined) { - contents.PrivateDnsName = - output["privateDnsName"]["#text"] !== undefined - ? output["privateDnsName"]["#text"] - : output["privateDnsName"]; + contents.PrivateDnsName = output["privateDnsName"]; } if (output["privateIpAddress"] !== undefined) { - contents.PrivateIpAddress = - output["privateIpAddress"]["#text"] !== undefined - ? output["privateIpAddress"]["#text"] - : output["privateIpAddress"]; + contents.PrivateIpAddress = output["privateIpAddress"]; } if (output.privateIpAddressesSet === "") { contents.PrivateIpAddresses = []; @@ -62398,28 +60277,16 @@ const deserializeAws_ec2InstanceNetworkInterface = ( ); } if (output["sourceDestCheck"] !== undefined) { - contents.SourceDestCheck = - (output["sourceDestCheck"]["#text"] !== undefined - ? output["sourceDestCheck"]["#text"] - : output["sourceDestCheck"]) == "true"; + contents.SourceDestCheck = output["sourceDestCheck"] == "true"; } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } if (output["subnetId"] !== undefined) { - contents.SubnetId = - output["subnetId"]["#text"] !== undefined - ? output["subnetId"]["#text"] - : output["subnetId"]; + contents.SubnetId = output["subnetId"]; } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -62435,22 +60302,13 @@ const deserializeAws_ec2InstanceNetworkInterfaceAssociation = ( PublicIp: undefined }; if (output["ipOwnerId"] !== undefined) { - contents.IpOwnerId = - output["ipOwnerId"]["#text"] !== undefined - ? output["ipOwnerId"]["#text"] - : output["ipOwnerId"]; + contents.IpOwnerId = output["ipOwnerId"]; } if (output["publicDnsName"] !== undefined) { - contents.PublicDnsName = - output["publicDnsName"]["#text"] !== undefined - ? output["publicDnsName"]["#text"] - : output["publicDnsName"]; + contents.PublicDnsName = output["publicDnsName"]; } if (output["publicIp"] !== undefined) { - contents.PublicIp = - output["publicIp"]["#text"] !== undefined - ? output["publicIp"]["#text"] - : output["publicIp"]; + contents.PublicIp = output["publicIp"]; } return contents; }; @@ -62471,29 +60329,16 @@ const deserializeAws_ec2InstanceNetworkInterfaceAttachment = ( contents.AttachTime = new Date(output["attachTime"]); } if (output["attachmentId"] !== undefined) { - contents.AttachmentId = - output["attachmentId"]["#text"] !== undefined - ? output["attachmentId"]["#text"] - : output["attachmentId"]; + contents.AttachmentId = output["attachmentId"]; } if (output["deleteOnTermination"] !== undefined) { - contents.DeleteOnTermination = - (output["deleteOnTermination"]["#text"] !== undefined - ? output["deleteOnTermination"]["#text"] - : output["deleteOnTermination"]) == "true"; + contents.DeleteOnTermination = output["deleteOnTermination"] == "true"; } if (output["deviceIndex"] !== undefined) { - contents.DeviceIndex = parseInt( - output["deviceIndex"]["#text"] !== undefined - ? output["deviceIndex"]["#text"] - : output["deviceIndex"] - ); + contents.DeviceIndex = parseInt(output["deviceIndex"]); } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } return contents; }; @@ -62529,28 +60374,16 @@ const deserializeAws_ec2InstanceNetworkInterfaceSpecification = ( }; if (output["associatePublicIpAddress"] !== undefined) { contents.AssociatePublicIpAddress = - (output["associatePublicIpAddress"]["#text"] !== undefined - ? output["associatePublicIpAddress"]["#text"] - : output["associatePublicIpAddress"]) == "true"; + output["associatePublicIpAddress"] == "true"; } if (output["deleteOnTermination"] !== undefined) { - contents.DeleteOnTermination = - (output["deleteOnTermination"]["#text"] !== undefined - ? output["deleteOnTermination"]["#text"] - : output["deleteOnTermination"]) == "true"; + contents.DeleteOnTermination = output["deleteOnTermination"] == "true"; } if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["deviceIndex"] !== undefined) { - contents.DeviceIndex = parseInt( - output["deviceIndex"]["#text"] !== undefined - ? output["deviceIndex"]["#text"] - : output["deviceIndex"] - ); + contents.DeviceIndex = parseInt(output["deviceIndex"]); } if (output.SecurityGroupId === "") { contents.Groups = []; @@ -62565,17 +60398,10 @@ const deserializeAws_ec2InstanceNetworkInterfaceSpecification = ( ); } if (output["InterfaceType"] !== undefined) { - contents.InterfaceType = - output["InterfaceType"]["#text"] !== undefined - ? output["InterfaceType"]["#text"] - : output["InterfaceType"]; + contents.InterfaceType = output["InterfaceType"]; } if (output["ipv6AddressCount"] !== undefined) { - contents.Ipv6AddressCount = parseInt( - output["ipv6AddressCount"]["#text"] !== undefined - ? output["ipv6AddressCount"]["#text"] - : output["ipv6AddressCount"] - ); + contents.Ipv6AddressCount = parseInt(output["ipv6AddressCount"]); } if (output.ipv6AddressesSet === "") { contents.Ipv6Addresses = []; @@ -62590,16 +60416,10 @@ const deserializeAws_ec2InstanceNetworkInterfaceSpecification = ( ); } if (output["networkInterfaceId"] !== undefined) { - contents.NetworkInterfaceId = - output["networkInterfaceId"]["#text"] !== undefined - ? output["networkInterfaceId"]["#text"] - : output["networkInterfaceId"]; + contents.NetworkInterfaceId = output["networkInterfaceId"]; } if (output["privateIpAddress"] !== undefined) { - contents.PrivateIpAddress = - output["privateIpAddress"]["#text"] !== undefined - ? output["privateIpAddress"]["#text"] - : output["privateIpAddress"]; + contents.PrivateIpAddress = output["privateIpAddress"]; } if (output.privateIpAddressesSet === "") { contents.PrivateIpAddresses = []; @@ -62615,16 +60435,11 @@ const deserializeAws_ec2InstanceNetworkInterfaceSpecification = ( } if (output["secondaryPrivateIpAddressCount"] !== undefined) { contents.SecondaryPrivateIpAddressCount = parseInt( - output["secondaryPrivateIpAddressCount"]["#text"] !== undefined - ? output["secondaryPrivateIpAddressCount"]["#text"] - : output["secondaryPrivateIpAddressCount"] + output["secondaryPrivateIpAddressCount"] ); } if (output["subnetId"] !== undefined) { - contents.SubnetId = - output["subnetId"]["#text"] !== undefined - ? output["subnetId"]["#text"] - : output["subnetId"]; + contents.SubnetId = output["subnetId"]; } return contents; }; @@ -62656,22 +60471,13 @@ const deserializeAws_ec2InstancePrivateIpAddress = ( ); } if (output["primary"] !== undefined) { - contents.Primary = - (output["primary"]["#text"] !== undefined - ? output["primary"]["#text"] - : output["primary"]) == "true"; + contents.Primary = output["primary"] == "true"; } if (output["privateDnsName"] !== undefined) { - contents.PrivateDnsName = - output["privateDnsName"]["#text"] !== undefined - ? output["privateDnsName"]["#text"] - : output["privateDnsName"]; + contents.PrivateDnsName = output["privateDnsName"]; } if (output["privateIpAddress"] !== undefined) { - contents.PrivateIpAddress = - output["privateIpAddress"]["#text"] !== undefined - ? output["privateIpAddress"]["#text"] - : output["privateIpAddress"]; + contents.PrivateIpAddress = output["privateIpAddress"]; } return contents; }; @@ -62695,17 +60501,10 @@ const deserializeAws_ec2InstanceState = ( Name: undefined }; if (output["code"] !== undefined) { - contents.Code = parseInt( - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"] - ); + contents.Code = parseInt(output["code"]); } if (output["name"] !== undefined) { - contents.Name = - output["name"]["#text"] !== undefined - ? output["name"]["#text"] - : output["name"]; + contents.Name = output["name"]; } return contents; }; @@ -62727,10 +60526,7 @@ const deserializeAws_ec2InstanceStateChange = ( ); } if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } if (output["previousState"] !== undefined) { contents.PreviousState = deserializeAws_ec2InstanceState( @@ -62765,10 +60561,7 @@ const deserializeAws_ec2InstanceStatus = ( SystemStatus: undefined }; if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output.eventsSet === "") { contents.Events = []; @@ -62783,10 +60576,7 @@ const deserializeAws_ec2InstanceStatus = ( ); } if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } if (output["instanceState"] !== undefined) { contents.InstanceState = deserializeAws_ec2InstanceState( @@ -62801,10 +60591,7 @@ const deserializeAws_ec2InstanceStatus = ( ); } if (output["outpostArn"] !== undefined) { - contents.OutpostArn = - output["outpostArn"]["#text"] !== undefined - ? output["outpostArn"]["#text"] - : output["outpostArn"]; + contents.OutpostArn = output["outpostArn"]; } if (output["systemStatus"] !== undefined) { contents.SystemStatus = deserializeAws_ec2InstanceStatusSummary( @@ -62829,16 +60616,10 @@ const deserializeAws_ec2InstanceStatusDetails = ( contents.ImpairedSince = new Date(output["impairedSince"]); } if (output["name"] !== undefined) { - contents.Name = - output["name"]["#text"] !== undefined - ? output["name"]["#text"] - : output["name"]; + contents.Name = output["name"]; } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } return contents; }; @@ -62866,22 +60647,13 @@ const deserializeAws_ec2InstanceStatusEvent = ( NotBeforeDeadline: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["instanceEventId"] !== undefined) { - contents.InstanceEventId = - output["instanceEventId"]["#text"] !== undefined - ? output["instanceEventId"]["#text"] - : output["instanceEventId"]; + contents.InstanceEventId = output["instanceEventId"]; } if (output["notAfter"] !== undefined) { contents.NotAfter = new Date(output["notAfter"]); @@ -62935,10 +60707,7 @@ const deserializeAws_ec2InstanceStatusSummary = ( ); } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } return contents; }; @@ -62962,11 +60731,7 @@ const deserializeAws_ec2InstanceStorageInfo = ( ); } if (output["totalSizeInGB"] !== undefined) { - contents.TotalSizeInGB = parseInt( - output["totalSizeInGB"]["#text"] !== undefined - ? output["totalSizeInGB"]["#text"] - : output["totalSizeInGB"] - ); + contents.TotalSizeInGB = parseInt(output["totalSizeInGB"]); } return contents; }; @@ -63001,34 +60766,21 @@ const deserializeAws_ec2InstanceTypeInfo = ( VCpuInfo: undefined }; if (output["autoRecoverySupported"] !== undefined) { - contents.AutoRecoverySupported = - (output["autoRecoverySupported"]["#text"] !== undefined - ? output["autoRecoverySupported"]["#text"] - : output["autoRecoverySupported"]) == "true"; + contents.AutoRecoverySupported = output["autoRecoverySupported"] == "true"; } if (output["bareMetal"] !== undefined) { - contents.BareMetal = - (output["bareMetal"]["#text"] !== undefined - ? output["bareMetal"]["#text"] - : output["bareMetal"]) == "true"; + contents.BareMetal = output["bareMetal"] == "true"; } if (output["burstablePerformanceSupported"] !== undefined) { contents.BurstablePerformanceSupported = - (output["burstablePerformanceSupported"]["#text"] !== undefined - ? output["burstablePerformanceSupported"]["#text"] - : output["burstablePerformanceSupported"]) == "true"; + output["burstablePerformanceSupported"] == "true"; } if (output["currentGeneration"] !== undefined) { - contents.CurrentGeneration = - (output["currentGeneration"]["#text"] !== undefined - ? output["currentGeneration"]["#text"] - : output["currentGeneration"]) == "true"; + contents.CurrentGeneration = output["currentGeneration"] == "true"; } if (output["dedicatedHostsSupported"] !== undefined) { contents.DedicatedHostsSupported = - (output["dedicatedHostsSupported"]["#text"] !== undefined - ? output["dedicatedHostsSupported"]["#text"] - : output["dedicatedHostsSupported"]) == "true"; + output["dedicatedHostsSupported"] == "true"; } if (output["ebsInfo"] !== undefined) { contents.EbsInfo = deserializeAws_ec2EbsInfo(output["ebsInfo"], context); @@ -63037,25 +60789,16 @@ const deserializeAws_ec2InstanceTypeInfo = ( contents.FpgaInfo = deserializeAws_ec2FpgaInfo(output["fpgaInfo"], context); } if (output["freeTierEligible"] !== undefined) { - contents.FreeTierEligible = - (output["freeTierEligible"]["#text"] !== undefined - ? output["freeTierEligible"]["#text"] - : output["freeTierEligible"]) == "true"; + contents.FreeTierEligible = output["freeTierEligible"] == "true"; } if (output["gpuInfo"] !== undefined) { contents.GpuInfo = deserializeAws_ec2GpuInfo(output["gpuInfo"], context); } if (output["hibernationSupported"] !== undefined) { - contents.HibernationSupported = - (output["hibernationSupported"]["#text"] !== undefined - ? output["hibernationSupported"]["#text"] - : output["hibernationSupported"]) == "true"; + contents.HibernationSupported = output["hibernationSupported"] == "true"; } if (output["hypervisor"] !== undefined) { - contents.Hypervisor = - output["hypervisor"]["#text"] !== undefined - ? output["hypervisor"]["#text"] - : output["hypervisor"]; + contents.Hypervisor = output["hypervisor"]; } if (output["inferenceAcceleratorInfo"] !== undefined) { contents.InferenceAcceleratorInfo = deserializeAws_ec2InferenceAcceleratorInfo( @@ -63071,15 +60814,10 @@ const deserializeAws_ec2InstanceTypeInfo = ( } if (output["instanceStorageSupported"] !== undefined) { contents.InstanceStorageSupported = - (output["instanceStorageSupported"]["#text"] !== undefined - ? output["instanceStorageSupported"]["#text"] - : output["instanceStorageSupported"]) == "true"; + output["instanceStorageSupported"] == "true"; } if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output["memoryInfo"] !== undefined) { contents.MemoryInfo = deserializeAws_ec2MemoryInfo( @@ -63155,22 +60893,13 @@ const deserializeAws_ec2InstanceTypeOffering = ( LocationType: undefined }; if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output["location"] !== undefined) { - contents.Location = - output["location"]["#text"] !== undefined - ? output["location"]["#text"] - : output["location"]; + contents.Location = output["location"]; } if (output["locationType"] !== undefined) { - contents.LocationType = - output["locationType"]["#text"] !== undefined - ? output["locationType"]["#text"] - : output["locationType"]; + contents.LocationType = output["locationType"]; } return contents; }; @@ -63194,17 +60923,10 @@ const deserializeAws_ec2InstanceUsage = ( UsedInstanceCount: undefined }; if (output["accountId"] !== undefined) { - contents.AccountId = - output["accountId"]["#text"] !== undefined - ? output["accountId"]["#text"] - : output["accountId"]; + contents.AccountId = output["accountId"]; } if (output["usedInstanceCount"] !== undefined) { - contents.UsedInstanceCount = parseInt( - output["usedInstanceCount"]["#text"] !== undefined - ? output["usedInstanceCount"]["#text"] - : output["usedInstanceCount"] - ); + contents.UsedInstanceCount = parseInt(output["usedInstanceCount"]); } return contents; }; @@ -63242,16 +60964,10 @@ const deserializeAws_ec2InternetGateway = ( ); } if (output["internetGatewayId"] !== undefined) { - contents.InternetGatewayId = - output["internetGatewayId"]["#text"] !== undefined - ? output["internetGatewayId"]["#text"] - : output["internetGatewayId"]; + contents.InternetGatewayId = output["internetGatewayId"]; } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output.tagSet === "") { contents.Tags = []; @@ -63278,16 +60994,10 @@ const deserializeAws_ec2InternetGatewayAttachment = ( VpcId: undefined }; if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -63325,17 +61035,10 @@ const deserializeAws_ec2IpPermission = ( UserIdGroupPairs: undefined }; if (output["fromPort"] !== undefined) { - contents.FromPort = parseInt( - output["fromPort"]["#text"] !== undefined - ? output["fromPort"]["#text"] - : output["fromPort"] - ); + contents.FromPort = parseInt(output["fromPort"]); } if (output["ipProtocol"] !== undefined) { - contents.IpProtocol = - output["ipProtocol"]["#text"] !== undefined - ? output["ipProtocol"]["#text"] - : output["ipProtocol"]; + contents.IpProtocol = output["ipProtocol"]; } if (output.ipRanges === "") { contents.IpRanges = []; @@ -63374,11 +61077,7 @@ const deserializeAws_ec2IpPermission = ( ); } if (output["toPort"] !== undefined) { - contents.ToPort = parseInt( - output["toPort"]["#text"] !== undefined - ? output["toPort"]["#text"] - : output["toPort"] - ); + contents.ToPort = parseInt(output["toPort"]); } if (output.groups === "") { contents.UserIdGroupPairs = []; @@ -63414,16 +61113,10 @@ const deserializeAws_ec2IpRange = ( Description: undefined }; if (output["cidrIp"] !== undefined) { - contents.CidrIp = - output["cidrIp"]["#text"] !== undefined - ? output["cidrIp"]["#text"] - : output["cidrIp"]; + contents.CidrIp = output["cidrIp"]; } if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } return contents; }; @@ -63441,18 +61134,14 @@ const deserializeAws_ec2IpRanges = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2Ipv6AddressList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2Ipv6CidrAssociation = ( @@ -63465,16 +61154,10 @@ const deserializeAws_ec2Ipv6CidrAssociation = ( Ipv6Cidr: undefined }; if (output["associatedResource"] !== undefined) { - contents.AssociatedResource = - output["associatedResource"]["#text"] !== undefined - ? output["associatedResource"]["#text"] - : output["associatedResource"]; + contents.AssociatedResource = output["associatedResource"]; } if (output["ipv6Cidr"] !== undefined) { - contents.Ipv6Cidr = - output["ipv6Cidr"]["#text"] !== undefined - ? output["ipv6Cidr"]["#text"] - : output["ipv6Cidr"]; + contents.Ipv6Cidr = output["ipv6Cidr"]; } return contents; }; @@ -63497,10 +61180,7 @@ const deserializeAws_ec2Ipv6CidrBlock = ( Ipv6CidrBlock: undefined }; if (output["ipv6CidrBlock"] !== undefined) { - contents.Ipv6CidrBlock = - output["ipv6CidrBlock"]["#text"] !== undefined - ? output["ipv6CidrBlock"]["#text"] - : output["ipv6CidrBlock"]; + contents.Ipv6CidrBlock = output["ipv6CidrBlock"]; } return contents; }; @@ -63526,10 +61206,7 @@ const deserializeAws_ec2Ipv6Pool = ( Tags: undefined }; if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output.poolCidrBlockSet === "") { contents.PoolCidrBlocks = []; @@ -63544,10 +61221,7 @@ const deserializeAws_ec2Ipv6Pool = ( ); } if (output["poolId"] !== undefined) { - contents.PoolId = - output["poolId"]["#text"] !== undefined - ? output["poolId"]["#text"] - : output["poolId"]; + contents.PoolId = output["poolId"]; } if (output.tagSet === "") { contents.Tags = []; @@ -63583,16 +61257,10 @@ const deserializeAws_ec2Ipv6Range = ( Description: undefined }; if (output["cidrIpv6"] !== undefined) { - contents.CidrIpv6 = - output["cidrIpv6"]["#text"] !== undefined - ? output["cidrIpv6"]["#text"] - : output["cidrIpv6"]; + contents.CidrIpv6 = output["cidrIpv6"]; } if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } return contents; }; @@ -63618,28 +61286,16 @@ const deserializeAws_ec2KeyPair = ( KeyPairId: undefined }; if (output["keyFingerprint"] !== undefined) { - contents.KeyFingerprint = - output["keyFingerprint"]["#text"] !== undefined - ? output["keyFingerprint"]["#text"] - : output["keyFingerprint"]; + contents.KeyFingerprint = output["keyFingerprint"]; } if (output["keyMaterial"] !== undefined) { - contents.KeyMaterial = - output["keyMaterial"]["#text"] !== undefined - ? output["keyMaterial"]["#text"] - : output["keyMaterial"]; + contents.KeyMaterial = output["keyMaterial"]; } if (output["keyName"] !== undefined) { - contents.KeyName = - output["keyName"]["#text"] !== undefined - ? output["keyName"]["#text"] - : output["keyName"]; + contents.KeyName = output["keyName"]; } if (output["keyPairId"] !== undefined) { - contents.KeyPairId = - output["keyPairId"]["#text"] !== undefined - ? output["keyPairId"]["#text"] - : output["keyPairId"]; + contents.KeyPairId = output["keyPairId"]; } return contents; }; @@ -63656,22 +61312,13 @@ const deserializeAws_ec2KeyPairInfo = ( Tags: undefined }; if (output["keyFingerprint"] !== undefined) { - contents.KeyFingerprint = - output["keyFingerprint"]["#text"] !== undefined - ? output["keyFingerprint"]["#text"] - : output["keyFingerprint"]; + contents.KeyFingerprint = output["keyFingerprint"]; } if (output["keyName"] !== undefined) { - contents.KeyName = - output["keyName"]["#text"] !== undefined - ? output["keyName"]["#text"] - : output["keyName"]; + contents.KeyName = output["keyName"]; } if (output["keyPairId"] !== undefined) { - contents.KeyPairId = - output["keyPairId"]["#text"] !== undefined - ? output["keyPairId"]["#text"] - : output["keyPairId"]; + contents.KeyPairId = output["keyPairId"]; } if (output.tagSet === "") { contents.Tags = []; @@ -63707,16 +61354,10 @@ const deserializeAws_ec2LastError = ( Message: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -63731,16 +61372,10 @@ const deserializeAws_ec2LaunchPermission = ( UserId: undefined }; if (output["group"] !== undefined) { - contents.Group = - output["group"]["#text"] !== undefined - ? output["group"]["#text"] - : output["group"]; + contents.Group = output["group"]; } if (output["userId"] !== undefined) { - contents.UserId = - output["userId"]["#text"] !== undefined - ? output["userId"]["#text"] - : output["userId"]; + contents.UserId = output["userId"]; } return contents; }; @@ -63777,10 +61412,7 @@ const deserializeAws_ec2LaunchSpecification = ( UserData: undefined }; if (output["addressingType"] !== undefined) { - contents.AddressingType = - output["addressingType"]["#text"] !== undefined - ? output["addressingType"]["#text"] - : output["addressingType"]; + contents.AddressingType = output["addressingType"]; } if (output.blockDeviceMapping === "") { contents.BlockDeviceMappings = []; @@ -63795,10 +61427,7 @@ const deserializeAws_ec2LaunchSpecification = ( ); } if (output["ebsOptimized"] !== undefined) { - contents.EbsOptimized = - (output["ebsOptimized"]["#text"] !== undefined - ? output["ebsOptimized"]["#text"] - : output["ebsOptimized"]) == "true"; + contents.EbsOptimized = output["ebsOptimized"] == "true"; } if (output["iamInstanceProfile"] !== undefined) { contents.IamInstanceProfile = deserializeAws_ec2IamInstanceProfileSpecification( @@ -63807,28 +61436,16 @@ const deserializeAws_ec2LaunchSpecification = ( ); } if (output["imageId"] !== undefined) { - contents.ImageId = - output["imageId"]["#text"] !== undefined - ? output["imageId"]["#text"] - : output["imageId"]; + contents.ImageId = output["imageId"]; } if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output["kernelId"] !== undefined) { - contents.KernelId = - output["kernelId"]["#text"] !== undefined - ? output["kernelId"]["#text"] - : output["kernelId"]; + contents.KernelId = output["kernelId"]; } if (output["keyName"] !== undefined) { - contents.KeyName = - output["keyName"]["#text"] !== undefined - ? output["keyName"]["#text"] - : output["keyName"]; + contents.KeyName = output["keyName"]; } if (output["monitoring"] !== undefined) { contents.Monitoring = deserializeAws_ec2RunInstancesMonitoringEnabled( @@ -63855,10 +61472,7 @@ const deserializeAws_ec2LaunchSpecification = ( ); } if (output["ramdiskId"] !== undefined) { - contents.RamdiskId = - output["ramdiskId"]["#text"] !== undefined - ? output["ramdiskId"]["#text"] - : output["ramdiskId"]; + contents.RamdiskId = output["ramdiskId"]; } if (output.groupSet === "") { contents.SecurityGroups = []; @@ -63873,16 +61487,10 @@ const deserializeAws_ec2LaunchSpecification = ( ); } if (output["subnetId"] !== undefined) { - contents.SubnetId = - output["subnetId"]["#text"] !== undefined - ? output["subnetId"]["#text"] - : output["subnetId"]; + contents.SubnetId = output["subnetId"]; } if (output["userData"] !== undefined) { - contents.UserData = - output["userData"]["#text"] !== undefined - ? output["userData"]["#text"] - : output["userData"]; + contents.UserData = output["userData"]; } return contents; }; @@ -63914,36 +61522,19 @@ const deserializeAws_ec2LaunchTemplate = ( contents.CreateTime = new Date(output["createTime"]); } if (output["createdBy"] !== undefined) { - contents.CreatedBy = - output["createdBy"]["#text"] !== undefined - ? output["createdBy"]["#text"] - : output["createdBy"]; + contents.CreatedBy = output["createdBy"]; } if (output["defaultVersionNumber"] !== undefined) { - contents.DefaultVersionNumber = parseInt( - output["defaultVersionNumber"]["#text"] !== undefined - ? output["defaultVersionNumber"]["#text"] - : output["defaultVersionNumber"] - ); + contents.DefaultVersionNumber = parseInt(output["defaultVersionNumber"]); } if (output["latestVersionNumber"] !== undefined) { - contents.LatestVersionNumber = parseInt( - output["latestVersionNumber"]["#text"] !== undefined - ? output["latestVersionNumber"]["#text"] - : output["latestVersionNumber"] - ); + contents.LatestVersionNumber = parseInt(output["latestVersionNumber"]); } if (output["launchTemplateId"] !== undefined) { - contents.LaunchTemplateId = - output["launchTemplateId"]["#text"] !== undefined - ? output["launchTemplateId"]["#text"] - : output["launchTemplateId"]; + contents.LaunchTemplateId = output["launchTemplateId"]; } if (output["launchTemplateName"] !== undefined) { - contents.LaunchTemplateName = - output["launchTemplateName"]["#text"] !== undefined - ? output["launchTemplateName"]["#text"] - : output["launchTemplateName"]; + contents.LaunchTemplateName = output["launchTemplateName"]; } if (output.tagSet === "") { contents.Tags = []; @@ -63996,10 +61587,7 @@ const deserializeAws_ec2LaunchTemplateBlockDeviceMapping = ( VirtualName: undefined }; if (output["deviceName"] !== undefined) { - contents.DeviceName = - output["deviceName"]["#text"] !== undefined - ? output["deviceName"]["#text"] - : output["deviceName"]; + contents.DeviceName = output["deviceName"]; } if (output["ebs"] !== undefined) { contents.Ebs = deserializeAws_ec2LaunchTemplateEbsBlockDevice( @@ -64008,16 +61596,10 @@ const deserializeAws_ec2LaunchTemplateBlockDeviceMapping = ( ); } if (output["noDevice"] !== undefined) { - contents.NoDevice = - output["noDevice"]["#text"] !== undefined - ? output["noDevice"]["#text"] - : output["noDevice"]; + contents.NoDevice = output["noDevice"]; } if (output["virtualName"] !== undefined) { - contents.VirtualName = - output["virtualName"]["#text"] !== undefined - ? output["virtualName"]["#text"] - : output["virtualName"]; + contents.VirtualName = output["virtualName"]; } return contents; }; @@ -64042,9 +61624,7 @@ const deserializeAws_ec2LaunchTemplateCapacityReservationSpecificationResponse = }; if (output["capacityReservationPreference"] !== undefined) { contents.CapacityReservationPreference = - output["capacityReservationPreference"]["#text"] !== undefined - ? output["capacityReservationPreference"]["#text"] - : output["capacityReservationPreference"]; + output["capacityReservationPreference"]; } if (output["capacityReservationTarget"] !== undefined) { contents.CapacityReservationTarget = deserializeAws_ec2CapacityReservationTargetResponse( @@ -64104,18 +61684,10 @@ const deserializeAws_ec2LaunchTemplateCpuOptions = ( ThreadsPerCore: undefined }; if (output["coreCount"] !== undefined) { - contents.CoreCount = parseInt( - output["coreCount"]["#text"] !== undefined - ? output["coreCount"]["#text"] - : output["coreCount"] - ); + contents.CoreCount = parseInt(output["coreCount"]); } if (output["threadsPerCore"] !== undefined) { - contents.ThreadsPerCore = parseInt( - output["threadsPerCore"]["#text"] !== undefined - ? output["threadsPerCore"]["#text"] - : output["threadsPerCore"] - ); + contents.ThreadsPerCore = parseInt(output["threadsPerCore"]); } return contents; }; @@ -64135,48 +61707,25 @@ const deserializeAws_ec2LaunchTemplateEbsBlockDevice = ( VolumeType: undefined }; if (output["deleteOnTermination"] !== undefined) { - contents.DeleteOnTermination = - (output["deleteOnTermination"]["#text"] !== undefined - ? output["deleteOnTermination"]["#text"] - : output["deleteOnTermination"]) == "true"; + contents.DeleteOnTermination = output["deleteOnTermination"] == "true"; } if (output["encrypted"] !== undefined) { - contents.Encrypted = - (output["encrypted"]["#text"] !== undefined - ? output["encrypted"]["#text"] - : output["encrypted"]) == "true"; + contents.Encrypted = output["encrypted"] == "true"; } if (output["iops"] !== undefined) { - contents.Iops = parseInt( - output["iops"]["#text"] !== undefined - ? output["iops"]["#text"] - : output["iops"] - ); + contents.Iops = parseInt(output["iops"]); } if (output["kmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["kmsKeyId"]["#text"] !== undefined - ? output["kmsKeyId"]["#text"] - : output["kmsKeyId"]; + contents.KmsKeyId = output["kmsKeyId"]; } if (output["snapshotId"] !== undefined) { - contents.SnapshotId = - output["snapshotId"]["#text"] !== undefined - ? output["snapshotId"]["#text"] - : output["snapshotId"]; + contents.SnapshotId = output["snapshotId"]; } if (output["volumeSize"] !== undefined) { - contents.VolumeSize = parseInt( - output["volumeSize"]["#text"] !== undefined - ? output["volumeSize"]["#text"] - : output["volumeSize"] - ); + contents.VolumeSize = parseInt(output["volumeSize"]); } if (output["volumeType"] !== undefined) { - contents.VolumeType = - output["volumeType"]["#text"] !== undefined - ? output["volumeType"]["#text"] - : output["volumeType"]; + contents.VolumeType = output["volumeType"]; } return contents; }; @@ -64191,17 +61740,10 @@ const deserializeAws_ec2LaunchTemplateElasticInferenceAcceleratorResponse = ( Type: undefined }; if (output["count"] !== undefined) { - contents.Count = parseInt( - output["count"]["#text"] !== undefined - ? output["count"]["#text"] - : output["count"] - ); + contents.Count = parseInt(output["count"]); } if (output["type"] !== undefined) { - contents.Type = - output["type"]["#text"] !== undefined - ? output["type"]["#text"] - : output["type"]; + contents.Type = output["type"]; } return contents; }; @@ -64227,10 +61769,7 @@ const deserializeAws_ec2LaunchTemplateHibernationOptions = ( Configured: undefined }; if (output["configured"] !== undefined) { - contents.Configured = - (output["configured"]["#text"] !== undefined - ? output["configured"]["#text"] - : output["configured"]) == "true"; + contents.Configured = output["configured"] == "true"; } return contents; }; @@ -64245,16 +61784,10 @@ const deserializeAws_ec2LaunchTemplateIamInstanceProfileSpecification = ( Name: undefined }; if (output["arn"] !== undefined) { - contents.Arn = - output["arn"]["#text"] !== undefined - ? output["arn"]["#text"] - : output["arn"]; + contents.Arn = output["arn"]; } if (output["name"] !== undefined) { - contents.Name = - output["name"]["#text"] !== undefined - ? output["name"]["#text"] - : output["name"]; + contents.Name = output["name"]; } return contents; }; @@ -64269,10 +61802,7 @@ const deserializeAws_ec2LaunchTemplateInstanceMarketOptions = ( SpotOptions: undefined }; if (output["marketType"] !== undefined) { - contents.MarketType = - output["marketType"]["#text"] !== undefined - ? output["marketType"]["#text"] - : output["marketType"]; + contents.MarketType = output["marketType"]; } if (output["spotOptions"] !== undefined) { contents.SpotOptions = deserializeAws_ec2LaunchTemplateSpotMarketOptions( @@ -64295,29 +61825,18 @@ const deserializeAws_ec2LaunchTemplateInstanceMetadataOptions = ( State: undefined }; if (output["httpEndpoint"] !== undefined) { - contents.HttpEndpoint = - output["httpEndpoint"]["#text"] !== undefined - ? output["httpEndpoint"]["#text"] - : output["httpEndpoint"]; + contents.HttpEndpoint = output["httpEndpoint"]; } if (output["httpPutResponseHopLimit"] !== undefined) { contents.HttpPutResponseHopLimit = parseInt( - output["httpPutResponseHopLimit"]["#text"] !== undefined - ? output["httpPutResponseHopLimit"]["#text"] - : output["httpPutResponseHopLimit"] + output["httpPutResponseHopLimit"] ); } if (output["httpTokens"] !== undefined) { - contents.HttpTokens = - output["httpTokens"]["#text"] !== undefined - ? output["httpTokens"]["#text"] - : output["httpTokens"]; + contents.HttpTokens = output["httpTokens"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } return contents; }; @@ -64344,28 +61863,16 @@ const deserializeAws_ec2LaunchTemplateInstanceNetworkInterfaceSpecification = ( }; if (output["associatePublicIpAddress"] !== undefined) { contents.AssociatePublicIpAddress = - (output["associatePublicIpAddress"]["#text"] !== undefined - ? output["associatePublicIpAddress"]["#text"] - : output["associatePublicIpAddress"]) == "true"; + output["associatePublicIpAddress"] == "true"; } if (output["deleteOnTermination"] !== undefined) { - contents.DeleteOnTermination = - (output["deleteOnTermination"]["#text"] !== undefined - ? output["deleteOnTermination"]["#text"] - : output["deleteOnTermination"]) == "true"; + contents.DeleteOnTermination = output["deleteOnTermination"] == "true"; } if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["deviceIndex"] !== undefined) { - contents.DeviceIndex = parseInt( - output["deviceIndex"]["#text"] !== undefined - ? output["deviceIndex"]["#text"] - : output["deviceIndex"] - ); + contents.DeviceIndex = parseInt(output["deviceIndex"]); } if (output.groupSet === "") { contents.Groups = []; @@ -64380,17 +61887,10 @@ const deserializeAws_ec2LaunchTemplateInstanceNetworkInterfaceSpecification = ( ); } if (output["interfaceType"] !== undefined) { - contents.InterfaceType = - output["interfaceType"]["#text"] !== undefined - ? output["interfaceType"]["#text"] - : output["interfaceType"]; + contents.InterfaceType = output["interfaceType"]; } if (output["ipv6AddressCount"] !== undefined) { - contents.Ipv6AddressCount = parseInt( - output["ipv6AddressCount"]["#text"] !== undefined - ? output["ipv6AddressCount"]["#text"] - : output["ipv6AddressCount"] - ); + contents.Ipv6AddressCount = parseInt(output["ipv6AddressCount"]); } if (output.ipv6AddressesSet === "") { contents.Ipv6Addresses = []; @@ -64405,16 +61905,10 @@ const deserializeAws_ec2LaunchTemplateInstanceNetworkInterfaceSpecification = ( ); } if (output["networkInterfaceId"] !== undefined) { - contents.NetworkInterfaceId = - output["networkInterfaceId"]["#text"] !== undefined - ? output["networkInterfaceId"]["#text"] - : output["networkInterfaceId"]; + contents.NetworkInterfaceId = output["networkInterfaceId"]; } if (output["privateIpAddress"] !== undefined) { - contents.PrivateIpAddress = - output["privateIpAddress"]["#text"] !== undefined - ? output["privateIpAddress"]["#text"] - : output["privateIpAddress"]; + contents.PrivateIpAddress = output["privateIpAddress"]; } if (output.privateIpAddressesSet === "") { contents.PrivateIpAddresses = []; @@ -64430,16 +61924,11 @@ const deserializeAws_ec2LaunchTemplateInstanceNetworkInterfaceSpecification = ( } if (output["secondaryPrivateIpAddressCount"] !== undefined) { contents.SecondaryPrivateIpAddressCount = parseInt( - output["secondaryPrivateIpAddressCount"]["#text"] !== undefined - ? output["secondaryPrivateIpAddressCount"]["#text"] - : output["secondaryPrivateIpAddressCount"] + output["secondaryPrivateIpAddressCount"] ); } if (output["subnetId"] !== undefined) { - contents.SubnetId = - output["subnetId"]["#text"] !== undefined - ? output["subnetId"]["#text"] - : output["subnetId"]; + contents.SubnetId = output["subnetId"]; } return contents; }; @@ -64465,10 +61954,7 @@ const deserializeAws_ec2LaunchTemplateLicenseConfiguration = ( LicenseConfigurationArn: undefined }; if (output["licenseConfigurationArn"] !== undefined) { - contents.LicenseConfigurationArn = - output["licenseConfigurationArn"]["#text"] !== undefined - ? output["licenseConfigurationArn"]["#text"] - : output["licenseConfigurationArn"]; + contents.LicenseConfigurationArn = output["licenseConfigurationArn"]; } return contents; }; @@ -64496,42 +61982,22 @@ const deserializeAws_ec2LaunchTemplateOverrides = ( WeightedCapacity: undefined }; if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output["priority"] !== undefined) { - contents.Priority = parseFloat( - output["priority"]["#text"] !== undefined - ? output["priority"]["#text"] - : output["priority"] - ); + contents.Priority = parseFloat(output["priority"]); } if (output["spotPrice"] !== undefined) { - contents.SpotPrice = - output["spotPrice"]["#text"] !== undefined - ? output["spotPrice"]["#text"] - : output["spotPrice"]; + contents.SpotPrice = output["spotPrice"]; } if (output["subnetId"] !== undefined) { - contents.SubnetId = - output["subnetId"]["#text"] !== undefined - ? output["subnetId"]["#text"] - : output["subnetId"]; + contents.SubnetId = output["subnetId"]; } if (output["weightedCapacity"] !== undefined) { - contents.WeightedCapacity = parseFloat( - output["weightedCapacity"]["#text"] !== undefined - ? output["weightedCapacity"]["#text"] - : output["weightedCapacity"] - ); + contents.WeightedCapacity = parseFloat(output["weightedCapacity"]); } return contents; }; @@ -64561,53 +62027,28 @@ const deserializeAws_ec2LaunchTemplatePlacement = ( Tenancy: undefined }; if (output["affinity"] !== undefined) { - contents.Affinity = - output["affinity"]["#text"] !== undefined - ? output["affinity"]["#text"] - : output["affinity"]; + contents.Affinity = output["affinity"]; } if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["groupName"] !== undefined) { - contents.GroupName = - output["groupName"]["#text"] !== undefined - ? output["groupName"]["#text"] - : output["groupName"]; + contents.GroupName = output["groupName"]; } if (output["hostId"] !== undefined) { - contents.HostId = - output["hostId"]["#text"] !== undefined - ? output["hostId"]["#text"] - : output["hostId"]; + contents.HostId = output["hostId"]; } if (output["hostResourceGroupArn"] !== undefined) { - contents.HostResourceGroupArn = - output["hostResourceGroupArn"]["#text"] !== undefined - ? output["hostResourceGroupArn"]["#text"] - : output["hostResourceGroupArn"]; + contents.HostResourceGroupArn = output["hostResourceGroupArn"]; } if (output["partitionNumber"] !== undefined) { - contents.PartitionNumber = parseInt( - output["partitionNumber"]["#text"] !== undefined - ? output["partitionNumber"]["#text"] - : output["partitionNumber"] - ); + contents.PartitionNumber = parseInt(output["partitionNumber"]); } if (output["spreadDomain"] !== undefined) { - contents.SpreadDomain = - output["spreadDomain"]["#text"] !== undefined - ? output["spreadDomain"]["#text"] - : output["spreadDomain"]; + contents.SpreadDomain = output["spreadDomain"]; } if (output["tenancy"] !== undefined) { - contents.Tenancy = - output["tenancy"]["#text"] !== undefined - ? output["tenancy"]["#text"] - : output["tenancy"]; + contents.Tenancy = output["tenancy"]; } return contents; }; @@ -64634,29 +62075,17 @@ const deserializeAws_ec2LaunchTemplateSpotMarketOptions = ( ValidUntil: undefined }; if (output["blockDurationMinutes"] !== undefined) { - contents.BlockDurationMinutes = parseInt( - output["blockDurationMinutes"]["#text"] !== undefined - ? output["blockDurationMinutes"]["#text"] - : output["blockDurationMinutes"] - ); + contents.BlockDurationMinutes = parseInt(output["blockDurationMinutes"]); } if (output["instanceInterruptionBehavior"] !== undefined) { contents.InstanceInterruptionBehavior = - output["instanceInterruptionBehavior"]["#text"] !== undefined - ? output["instanceInterruptionBehavior"]["#text"] - : output["instanceInterruptionBehavior"]; + output["instanceInterruptionBehavior"]; } if (output["maxPrice"] !== undefined) { - contents.MaxPrice = - output["maxPrice"]["#text"] !== undefined - ? output["maxPrice"]["#text"] - : output["maxPrice"]; + contents.MaxPrice = output["maxPrice"]; } if (output["spotInstanceType"] !== undefined) { - contents.SpotInstanceType = - output["spotInstanceType"]["#text"] !== undefined - ? output["spotInstanceType"]["#text"] - : output["spotInstanceType"]; + contents.SpotInstanceType = output["spotInstanceType"]; } if (output["validUntil"] !== undefined) { contents.ValidUntil = new Date(output["validUntil"]); @@ -64674,10 +62103,7 @@ const deserializeAws_ec2LaunchTemplateTagSpecification = ( Tags: undefined }; if (output["resourceType"] !== undefined) { - contents.ResourceType = - output["resourceType"]["#text"] !== undefined - ? output["resourceType"]["#text"] - : output["resourceType"]; + contents.ResourceType = output["resourceType"]; } if (output.tagSet === "") { contents.Tags = []; @@ -64722,16 +62148,10 @@ const deserializeAws_ec2LaunchTemplateVersion = ( contents.CreateTime = new Date(output["createTime"]); } if (output["createdBy"] !== undefined) { - contents.CreatedBy = - output["createdBy"]["#text"] !== undefined - ? output["createdBy"]["#text"] - : output["createdBy"]; + contents.CreatedBy = output["createdBy"]; } if (output["defaultVersion"] !== undefined) { - contents.DefaultVersion = - (output["defaultVersion"]["#text"] !== undefined - ? output["defaultVersion"]["#text"] - : output["defaultVersion"]) == "true"; + contents.DefaultVersion = output["defaultVersion"] == "true"; } if (output["launchTemplateData"] !== undefined) { contents.LaunchTemplateData = deserializeAws_ec2ResponseLaunchTemplateData( @@ -64740,29 +62160,16 @@ const deserializeAws_ec2LaunchTemplateVersion = ( ); } if (output["launchTemplateId"] !== undefined) { - contents.LaunchTemplateId = - output["launchTemplateId"]["#text"] !== undefined - ? output["launchTemplateId"]["#text"] - : output["launchTemplateId"]; + contents.LaunchTemplateId = output["launchTemplateId"]; } if (output["launchTemplateName"] !== undefined) { - contents.LaunchTemplateName = - output["launchTemplateName"]["#text"] !== undefined - ? output["launchTemplateName"]["#text"] - : output["launchTemplateName"]; + contents.LaunchTemplateName = output["launchTemplateName"]; } if (output["versionDescription"] !== undefined) { - contents.VersionDescription = - output["versionDescription"]["#text"] !== undefined - ? output["versionDescription"]["#text"] - : output["versionDescription"]; + contents.VersionDescription = output["versionDescription"]; } if (output["versionNumber"] !== undefined) { - contents.VersionNumber = parseInt( - output["versionNumber"]["#text"] !== undefined - ? output["versionNumber"]["#text"] - : output["versionNumber"] - ); + contents.VersionNumber = parseInt(output["versionNumber"]); } return contents; }; @@ -64785,10 +62192,7 @@ const deserializeAws_ec2LaunchTemplatesMonitoring = ( Enabled: undefined }; if (output["enabled"] !== undefined) { - contents.Enabled = - (output["enabled"]["#text"] !== undefined - ? output["enabled"]["#text"] - : output["enabled"]) == "true"; + contents.Enabled = output["enabled"] == "true"; } return contents; }; @@ -64802,10 +62206,7 @@ const deserializeAws_ec2LicenseConfiguration = ( LicenseConfigurationArn: undefined }; if (output["licenseConfigurationArn"] !== undefined) { - contents.LicenseConfigurationArn = - output["licenseConfigurationArn"]["#text"] !== undefined - ? output["licenseConfigurationArn"]["#text"] - : output["licenseConfigurationArn"]; + contents.LicenseConfigurationArn = output["licenseConfigurationArn"]; } return contents; }; @@ -64853,16 +62254,10 @@ const deserializeAws_ec2LoadPermission = ( UserId: undefined }; if (output["group"] !== undefined) { - contents.Group = - output["group"]["#text"] !== undefined - ? output["group"]["#text"] - : output["group"]; + contents.Group = output["group"]; } if (output["userId"] !== undefined) { - contents.UserId = - output["userId"]["#text"] !== undefined - ? output["userId"]["#text"] - : output["userId"]; + contents.UserId = output["userId"]; } return contents; }; @@ -64889,28 +62284,16 @@ const deserializeAws_ec2LocalGateway = ( Tags: undefined }; if (output["localGatewayId"] !== undefined) { - contents.LocalGatewayId = - output["localGatewayId"]["#text"] !== undefined - ? output["localGatewayId"]["#text"] - : output["localGatewayId"]; + contents.LocalGatewayId = output["localGatewayId"]; } if (output["outpostArn"] !== undefined) { - contents.OutpostArn = - output["outpostArn"]["#text"] !== undefined - ? output["outpostArn"]["#text"] - : output["outpostArn"]; + contents.OutpostArn = output["outpostArn"]; } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output.tagSet === "") { contents.Tags = []; @@ -64940,34 +62323,20 @@ const deserializeAws_ec2LocalGatewayRoute = ( Type: undefined }; if (output["destinationCidrBlock"] !== undefined) { - contents.DestinationCidrBlock = - output["destinationCidrBlock"]["#text"] !== undefined - ? output["destinationCidrBlock"]["#text"] - : output["destinationCidrBlock"]; + contents.DestinationCidrBlock = output["destinationCidrBlock"]; } if (output["localGatewayRouteTableId"] !== undefined) { - contents.LocalGatewayRouteTableId = - output["localGatewayRouteTableId"]["#text"] !== undefined - ? output["localGatewayRouteTableId"]["#text"] - : output["localGatewayRouteTableId"]; + contents.LocalGatewayRouteTableId = output["localGatewayRouteTableId"]; } if (output["localGatewayVirtualInterfaceGroupId"] !== undefined) { contents.LocalGatewayVirtualInterfaceGroupId = - output["localGatewayVirtualInterfaceGroupId"]["#text"] !== undefined - ? output["localGatewayVirtualInterfaceGroupId"]["#text"] - : output["localGatewayVirtualInterfaceGroupId"]; + output["localGatewayVirtualInterfaceGroupId"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["type"] !== undefined) { - contents.Type = - output["type"]["#text"] !== undefined - ? output["type"]["#text"] - : output["type"]; + contents.Type = output["type"]; } return contents; }; @@ -64994,28 +62363,16 @@ const deserializeAws_ec2LocalGatewayRouteTable = ( Tags: undefined }; if (output["localGatewayId"] !== undefined) { - contents.LocalGatewayId = - output["localGatewayId"]["#text"] !== undefined - ? output["localGatewayId"]["#text"] - : output["localGatewayId"]; + contents.LocalGatewayId = output["localGatewayId"]; } if (output["localGatewayRouteTableId"] !== undefined) { - contents.LocalGatewayRouteTableId = - output["localGatewayRouteTableId"]["#text"] !== undefined - ? output["localGatewayRouteTableId"]["#text"] - : output["localGatewayRouteTableId"]; + contents.LocalGatewayRouteTableId = output["localGatewayRouteTableId"]; } if (output["outpostArn"] !== undefined) { - contents.OutpostArn = - output["outpostArn"]["#text"] !== undefined - ? output["outpostArn"]["#text"] - : output["outpostArn"]; + contents.OutpostArn = output["outpostArn"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output.tagSet === "") { contents.Tags = []; @@ -65055,41 +62412,24 @@ const deserializeAws_ec2LocalGatewayRouteTableVirtualInterfaceGroupAssociation = Tags: undefined }; if (output["localGatewayId"] !== undefined) { - contents.LocalGatewayId = - output["localGatewayId"]["#text"] !== undefined - ? output["localGatewayId"]["#text"] - : output["localGatewayId"]; + contents.LocalGatewayId = output["localGatewayId"]; } if (output["localGatewayRouteTableId"] !== undefined) { - contents.LocalGatewayRouteTableId = - output["localGatewayRouteTableId"]["#text"] !== undefined - ? output["localGatewayRouteTableId"]["#text"] - : output["localGatewayRouteTableId"]; + contents.LocalGatewayRouteTableId = output["localGatewayRouteTableId"]; } if ( output["localGatewayRouteTableVirtualInterfaceGroupAssociationId"] !== undefined ) { contents.LocalGatewayRouteTableVirtualInterfaceGroupAssociationId = - output["localGatewayRouteTableVirtualInterfaceGroupAssociationId"][ - "#text" - ] !== undefined - ? output["localGatewayRouteTableVirtualInterfaceGroupAssociationId"][ - "#text" - ] - : output["localGatewayRouteTableVirtualInterfaceGroupAssociationId"]; + output["localGatewayRouteTableVirtualInterfaceGroupAssociationId"]; } if (output["localGatewayVirtualInterfaceGroupId"] !== undefined) { contents.LocalGatewayVirtualInterfaceGroupId = - output["localGatewayVirtualInterfaceGroupId"]["#text"] !== undefined - ? output["localGatewayVirtualInterfaceGroupId"]["#text"] - : output["localGatewayVirtualInterfaceGroupId"]; + output["localGatewayVirtualInterfaceGroupId"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output.tagSet === "") { contents.Tags = []; @@ -65132,28 +62472,17 @@ const deserializeAws_ec2LocalGatewayRouteTableVpcAssociation = ( VpcId: undefined }; if (output["localGatewayId"] !== undefined) { - contents.LocalGatewayId = - output["localGatewayId"]["#text"] !== undefined - ? output["localGatewayId"]["#text"] - : output["localGatewayId"]; + contents.LocalGatewayId = output["localGatewayId"]; } if (output["localGatewayRouteTableId"] !== undefined) { - contents.LocalGatewayRouteTableId = - output["localGatewayRouteTableId"]["#text"] !== undefined - ? output["localGatewayRouteTableId"]["#text"] - : output["localGatewayRouteTableId"]; + contents.LocalGatewayRouteTableId = output["localGatewayRouteTableId"]; } if (output["localGatewayRouteTableVpcAssociationId"] !== undefined) { contents.LocalGatewayRouteTableVpcAssociationId = - output["localGatewayRouteTableVpcAssociationId"]["#text"] !== undefined - ? output["localGatewayRouteTableVpcAssociationId"]["#text"] - : output["localGatewayRouteTableVpcAssociationId"]; + output["localGatewayRouteTableVpcAssociationId"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output.tagSet === "") { contents.Tags = []; @@ -65168,10 +62497,7 @@ const deserializeAws_ec2LocalGatewayRouteTableVpcAssociation = ( ); } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -65210,42 +62536,23 @@ const deserializeAws_ec2LocalGatewayVirtualInterface = ( Vlan: undefined }; if (output["localAddress"] !== undefined) { - contents.LocalAddress = - output["localAddress"]["#text"] !== undefined - ? output["localAddress"]["#text"] - : output["localAddress"]; + contents.LocalAddress = output["localAddress"]; } if (output["localBgpAsn"] !== undefined) { - contents.LocalBgpAsn = parseInt( - output["localBgpAsn"]["#text"] !== undefined - ? output["localBgpAsn"]["#text"] - : output["localBgpAsn"] - ); + contents.LocalBgpAsn = parseInt(output["localBgpAsn"]); } if (output["localGatewayId"] !== undefined) { - contents.LocalGatewayId = - output["localGatewayId"]["#text"] !== undefined - ? output["localGatewayId"]["#text"] - : output["localGatewayId"]; + contents.LocalGatewayId = output["localGatewayId"]; } if (output["localGatewayVirtualInterfaceId"] !== undefined) { contents.LocalGatewayVirtualInterfaceId = - output["localGatewayVirtualInterfaceId"]["#text"] !== undefined - ? output["localGatewayVirtualInterfaceId"]["#text"] - : output["localGatewayVirtualInterfaceId"]; + output["localGatewayVirtualInterfaceId"]; } if (output["peerAddress"] !== undefined) { - contents.PeerAddress = - output["peerAddress"]["#text"] !== undefined - ? output["peerAddress"]["#text"] - : output["peerAddress"]; + contents.PeerAddress = output["peerAddress"]; } if (output["peerBgpAsn"] !== undefined) { - contents.PeerBgpAsn = parseInt( - output["peerBgpAsn"]["#text"] !== undefined - ? output["peerBgpAsn"]["#text"] - : output["peerBgpAsn"] - ); + contents.PeerBgpAsn = parseInt(output["peerBgpAsn"]); } if (output.tagSet === "") { contents.Tags = []; @@ -65260,11 +62567,7 @@ const deserializeAws_ec2LocalGatewayVirtualInterface = ( ); } if (output["vlan"] !== undefined) { - contents.Vlan = parseInt( - output["vlan"]["#text"] !== undefined - ? output["vlan"]["#text"] - : output["vlan"] - ); + contents.Vlan = parseInt(output["vlan"]); } return contents; }; @@ -65281,16 +62584,11 @@ const deserializeAws_ec2LocalGatewayVirtualInterfaceGroup = ( Tags: undefined }; if (output["localGatewayId"] !== undefined) { - contents.LocalGatewayId = - output["localGatewayId"]["#text"] !== undefined - ? output["localGatewayId"]["#text"] - : output["localGatewayId"]; + contents.LocalGatewayId = output["localGatewayId"]; } if (output["localGatewayVirtualInterfaceGroupId"] !== undefined) { contents.LocalGatewayVirtualInterfaceGroupId = - output["localGatewayVirtualInterfaceGroupId"]["#text"] !== undefined - ? output["localGatewayVirtualInterfaceGroupId"]["#text"] - : output["localGatewayVirtualInterfaceGroupId"]; + output["localGatewayVirtualInterfaceGroupId"]; } if (output.localGatewayVirtualInterfaceIdSet === "") { contents.LocalGatewayVirtualInterfaceIds = []; @@ -65334,9 +62632,7 @@ const deserializeAws_ec2LocalGatewayVirtualInterfaceIdSet = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2LocalGatewayVirtualInterfaceSet = ( @@ -65357,11 +62653,7 @@ const deserializeAws_ec2MemoryInfo = ( SizeInMiB: undefined }; if (output["sizeInMiB"] !== undefined) { - contents.SizeInMiB = parseInt( - output["sizeInMiB"]["#text"] !== undefined - ? output["sizeInMiB"]["#text"] - : output["sizeInMiB"] - ); + contents.SizeInMiB = parseInt(output["sizeInMiB"]); } return contents; }; @@ -65375,10 +62667,7 @@ const deserializeAws_ec2ModifyCapacityReservationResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -65392,10 +62681,7 @@ const deserializeAws_ec2ModifyClientVpnEndpointResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -65426,10 +62712,7 @@ const deserializeAws_ec2ModifyEbsDefaultKmsKeyIdResult = ( KmsKeyId: undefined }; if (output["kmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["kmsKeyId"]["#text"] !== undefined - ? output["kmsKeyId"]["#text"] - : output["kmsKeyId"]; + contents.KmsKeyId = output["kmsKeyId"]; } return contents; }; @@ -65443,10 +62726,7 @@ const deserializeAws_ec2ModifyFleetResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -65513,10 +62793,7 @@ const deserializeAws_ec2ModifyInstanceCapacityReservationAttributesResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -65588,10 +62865,7 @@ const deserializeAws_ec2ModifyInstanceMetadataOptionsResult = ( InstanceMetadataOptions: undefined }; if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } if (output["instanceMetadataOptions"] !== undefined) { contents.InstanceMetadataOptions = deserializeAws_ec2InstanceMetadataOptionsResponse( @@ -65611,10 +62885,7 @@ const deserializeAws_ec2ModifyInstancePlacementResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -65646,9 +62917,7 @@ const deserializeAws_ec2ModifyReservedInstancesResult = ( }; if (output["reservedInstancesModificationId"] !== undefined) { contents.ReservedInstancesModificationId = - output["reservedInstancesModificationId"]["#text"] !== undefined - ? output["reservedInstancesModificationId"]["#text"] - : output["reservedInstancesModificationId"]; + output["reservedInstancesModificationId"]; } return contents; }; @@ -65662,10 +62931,7 @@ const deserializeAws_ec2ModifySpotFleetRequestResponse = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -65764,10 +63030,7 @@ const deserializeAws_ec2ModifyVpcEndpointConnectionNotificationResult = ( ReturnValue: undefined }; if (output["return"] !== undefined) { - contents.ReturnValue = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.ReturnValue = output["return"] == "true"; } return contents; }; @@ -65781,10 +63044,7 @@ const deserializeAws_ec2ModifyVpcEndpointResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -65798,10 +63058,7 @@ const deserializeAws_ec2ModifyVpcEndpointServiceConfigurationResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -65815,10 +63072,7 @@ const deserializeAws_ec2ModifyVpcEndpointServicePermissionsResult = ( ReturnValue: undefined }; if (output["return"] !== undefined) { - contents.ReturnValue = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.ReturnValue = output["return"] == "true"; } return contents; }; @@ -65856,10 +63110,7 @@ const deserializeAws_ec2ModifyVpcTenancyResult = ( ReturnValue: undefined }; if (output["return"] !== undefined) { - contents.ReturnValue = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.ReturnValue = output["return"] == "true"; } return contents; }; @@ -65947,10 +63198,7 @@ const deserializeAws_ec2Monitoring = ( State: undefined }; if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } return contents; }; @@ -65965,16 +63213,10 @@ const deserializeAws_ec2MoveAddressToVpcResult = ( Status: undefined }; if (output["allocationId"] !== undefined) { - contents.AllocationId = - output["allocationId"]["#text"] !== undefined - ? output["allocationId"]["#text"] - : output["allocationId"]; + contents.AllocationId = output["allocationId"]; } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } return contents; }; @@ -65989,16 +63231,10 @@ const deserializeAws_ec2MovingAddressStatus = ( PublicIp: undefined }; if (output["moveStatus"] !== undefined) { - contents.MoveStatus = - output["moveStatus"]["#text"] !== undefined - ? output["moveStatus"]["#text"] - : output["moveStatus"]; + contents.MoveStatus = output["moveStatus"]; } if (output["publicIp"] !== undefined) { - contents.PublicIp = - output["publicIp"]["#text"] !== undefined - ? output["publicIp"]["#text"] - : output["publicIp"]; + contents.PublicIp = output["publicIp"]; } return contents; }; @@ -66037,16 +63273,10 @@ const deserializeAws_ec2NatGateway = ( contents.DeleteTime = new Date(output["deleteTime"]); } if (output["failureCode"] !== undefined) { - contents.FailureCode = - output["failureCode"]["#text"] !== undefined - ? output["failureCode"]["#text"] - : output["failureCode"]; + contents.FailureCode = output["failureCode"]; } if (output["failureMessage"] !== undefined) { - contents.FailureMessage = - output["failureMessage"]["#text"] !== undefined - ? output["failureMessage"]["#text"] - : output["failureMessage"]; + contents.FailureMessage = output["failureMessage"]; } if (output.natGatewayAddressSet === "") { contents.NatGatewayAddresses = []; @@ -66061,10 +63291,7 @@ const deserializeAws_ec2NatGateway = ( ); } if (output["natGatewayId"] !== undefined) { - contents.NatGatewayId = - output["natGatewayId"]["#text"] !== undefined - ? output["natGatewayId"]["#text"] - : output["natGatewayId"]; + contents.NatGatewayId = output["natGatewayId"]; } if (output["provisionedBandwidth"] !== undefined) { contents.ProvisionedBandwidth = deserializeAws_ec2ProvisionedBandwidth( @@ -66073,16 +63300,10 @@ const deserializeAws_ec2NatGateway = ( ); } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["subnetId"] !== undefined) { - contents.SubnetId = - output["subnetId"]["#text"] !== undefined - ? output["subnetId"]["#text"] - : output["subnetId"]; + contents.SubnetId = output["subnetId"]; } if (output.tagSet === "") { contents.Tags = []; @@ -66097,10 +63318,7 @@ const deserializeAws_ec2NatGateway = ( ); } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -66117,28 +63335,16 @@ const deserializeAws_ec2NatGatewayAddress = ( PublicIp: undefined }; if (output["allocationId"] !== undefined) { - contents.AllocationId = - output["allocationId"]["#text"] !== undefined - ? output["allocationId"]["#text"] - : output["allocationId"]; + contents.AllocationId = output["allocationId"]; } if (output["networkInterfaceId"] !== undefined) { - contents.NetworkInterfaceId = - output["networkInterfaceId"]["#text"] !== undefined - ? output["networkInterfaceId"]["#text"] - : output["networkInterfaceId"]; + contents.NetworkInterfaceId = output["networkInterfaceId"]; } if (output["privateIp"] !== undefined) { - contents.PrivateIp = - output["privateIp"]["#text"] !== undefined - ? output["privateIp"]["#text"] - : output["privateIp"]; + contents.PrivateIp = output["privateIp"]; } if (output["publicIp"] !== undefined) { - contents.PublicIp = - output["publicIp"]["#text"] !== undefined - ? output["publicIp"]["#text"] - : output["publicIp"]; + contents.PublicIp = output["publicIp"]; } return contents; }; @@ -66200,22 +63406,13 @@ const deserializeAws_ec2NetworkAcl = ( ); } if (output["default"] !== undefined) { - contents.IsDefault = - (output["default"]["#text"] !== undefined - ? output["default"]["#text"] - : output["default"]) == "true"; + contents.IsDefault = output["default"] == "true"; } if (output["networkAclId"] !== undefined) { - contents.NetworkAclId = - output["networkAclId"]["#text"] !== undefined - ? output["networkAclId"]["#text"] - : output["networkAclId"]; + contents.NetworkAclId = output["networkAclId"]; } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output.tagSet === "") { contents.Tags = []; @@ -66230,10 +63427,7 @@ const deserializeAws_ec2NetworkAcl = ( ); } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -66249,22 +63443,13 @@ const deserializeAws_ec2NetworkAclAssociation = ( SubnetId: undefined }; if (output["networkAclAssociationId"] !== undefined) { - contents.NetworkAclAssociationId = - output["networkAclAssociationId"]["#text"] !== undefined - ? output["networkAclAssociationId"]["#text"] - : output["networkAclAssociationId"]; + contents.NetworkAclAssociationId = output["networkAclAssociationId"]; } if (output["networkAclId"] !== undefined) { - contents.NetworkAclId = - output["networkAclId"]["#text"] !== undefined - ? output["networkAclId"]["#text"] - : output["networkAclId"]; + contents.NetworkAclId = output["networkAclId"]; } if (output["subnetId"] !== undefined) { - contents.SubnetId = - output["subnetId"]["#text"] !== undefined - ? output["subnetId"]["#text"] - : output["subnetId"]; + contents.SubnetId = output["subnetId"]; } return contents; }; @@ -66294,16 +63479,10 @@ const deserializeAws_ec2NetworkAclEntry = ( RuleNumber: undefined }; if (output["cidrBlock"] !== undefined) { - contents.CidrBlock = - output["cidrBlock"]["#text"] !== undefined - ? output["cidrBlock"]["#text"] - : output["cidrBlock"]; + contents.CidrBlock = output["cidrBlock"]; } if (output["egress"] !== undefined) { - contents.Egress = - (output["egress"]["#text"] !== undefined - ? output["egress"]["#text"] - : output["egress"]) == "true"; + contents.Egress = output["egress"] == "true"; } if (output["icmpTypeCode"] !== undefined) { contents.IcmpTypeCode = deserializeAws_ec2IcmpTypeCode( @@ -66312,10 +63491,7 @@ const deserializeAws_ec2NetworkAclEntry = ( ); } if (output["ipv6CidrBlock"] !== undefined) { - contents.Ipv6CidrBlock = - output["ipv6CidrBlock"]["#text"] !== undefined - ? output["ipv6CidrBlock"]["#text"] - : output["ipv6CidrBlock"]; + contents.Ipv6CidrBlock = output["ipv6CidrBlock"]; } if (output["portRange"] !== undefined) { contents.PortRange = deserializeAws_ec2PortRange( @@ -66324,23 +63500,13 @@ const deserializeAws_ec2NetworkAclEntry = ( ); } if (output["protocol"] !== undefined) { - contents.Protocol = - output["protocol"]["#text"] !== undefined - ? output["protocol"]["#text"] - : output["protocol"]; + contents.Protocol = output["protocol"]; } if (output["ruleAction"] !== undefined) { - contents.RuleAction = - output["ruleAction"]["#text"] !== undefined - ? output["ruleAction"]["#text"] - : output["ruleAction"]; + contents.RuleAction = output["ruleAction"]; } if (output["ruleNumber"] !== undefined) { - contents.RuleNumber = parseInt( - output["ruleNumber"]["#text"] !== undefined - ? output["ruleNumber"]["#text"] - : output["ruleNumber"] - ); + contents.RuleNumber = parseInt(output["ruleNumber"]); } return contents; }; @@ -66377,43 +63543,28 @@ const deserializeAws_ec2NetworkInfo = ( NetworkPerformance: undefined }; if (output["enaSupport"] !== undefined) { - contents.EnaSupport = - output["enaSupport"]["#text"] !== undefined - ? output["enaSupport"]["#text"] - : output["enaSupport"]; + contents.EnaSupport = output["enaSupport"]; } if (output["ipv4AddressesPerInterface"] !== undefined) { contents.Ipv4AddressesPerInterface = parseInt( - output["ipv4AddressesPerInterface"]["#text"] !== undefined - ? output["ipv4AddressesPerInterface"]["#text"] - : output["ipv4AddressesPerInterface"] + output["ipv4AddressesPerInterface"] ); } if (output["ipv6AddressesPerInterface"] !== undefined) { contents.Ipv6AddressesPerInterface = parseInt( - output["ipv6AddressesPerInterface"]["#text"] !== undefined - ? output["ipv6AddressesPerInterface"]["#text"] - : output["ipv6AddressesPerInterface"] + output["ipv6AddressesPerInterface"] ); } if (output["ipv6Supported"] !== undefined) { - contents.Ipv6Supported = - (output["ipv6Supported"]["#text"] !== undefined - ? output["ipv6Supported"]["#text"] - : output["ipv6Supported"]) == "true"; + contents.Ipv6Supported = output["ipv6Supported"] == "true"; } if (output["maximumNetworkInterfaces"] !== undefined) { contents.MaximumNetworkInterfaces = parseInt( - output["maximumNetworkInterfaces"]["#text"] !== undefined - ? output["maximumNetworkInterfaces"]["#text"] - : output["maximumNetworkInterfaces"] + output["maximumNetworkInterfaces"] ); } if (output["networkPerformance"] !== undefined) { - contents.NetworkPerformance = - output["networkPerformance"]["#text"] !== undefined - ? output["networkPerformance"]["#text"] - : output["networkPerformance"]; + contents.NetworkPerformance = output["networkPerformance"]; } return contents; }; @@ -66459,16 +63610,10 @@ const deserializeAws_ec2NetworkInterface = ( ); } if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output.groupSet === "") { contents.Groups = []; @@ -66483,10 +63628,7 @@ const deserializeAws_ec2NetworkInterface = ( ); } if (output["interfaceType"] !== undefined) { - contents.InterfaceType = - output["interfaceType"]["#text"] !== undefined - ? output["interfaceType"]["#text"] - : output["interfaceType"]; + contents.InterfaceType = output["interfaceType"]; } if (output.ipv6AddressesSet === "") { contents.Ipv6Addresses = []; @@ -66501,40 +63643,22 @@ const deserializeAws_ec2NetworkInterface = ( ); } if (output["macAddress"] !== undefined) { - contents.MacAddress = - output["macAddress"]["#text"] !== undefined - ? output["macAddress"]["#text"] - : output["macAddress"]; + contents.MacAddress = output["macAddress"]; } if (output["networkInterfaceId"] !== undefined) { - contents.NetworkInterfaceId = - output["networkInterfaceId"]["#text"] !== undefined - ? output["networkInterfaceId"]["#text"] - : output["networkInterfaceId"]; + contents.NetworkInterfaceId = output["networkInterfaceId"]; } if (output["outpostArn"] !== undefined) { - contents.OutpostArn = - output["outpostArn"]["#text"] !== undefined - ? output["outpostArn"]["#text"] - : output["outpostArn"]; + contents.OutpostArn = output["outpostArn"]; } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output["privateDnsName"] !== undefined) { - contents.PrivateDnsName = - output["privateDnsName"]["#text"] !== undefined - ? output["privateDnsName"]["#text"] - : output["privateDnsName"]; + contents.PrivateDnsName = output["privateDnsName"]; } if (output["privateIpAddress"] !== undefined) { - contents.PrivateIpAddress = - output["privateIpAddress"]["#text"] !== undefined - ? output["privateIpAddress"]["#text"] - : output["privateIpAddress"]; + contents.PrivateIpAddress = output["privateIpAddress"]; } if (output.privateIpAddressesSet === "") { contents.PrivateIpAddresses = []; @@ -66549,34 +63673,19 @@ const deserializeAws_ec2NetworkInterface = ( ); } if (output["requesterId"] !== undefined) { - contents.RequesterId = - output["requesterId"]["#text"] !== undefined - ? output["requesterId"]["#text"] - : output["requesterId"]; + contents.RequesterId = output["requesterId"]; } if (output["requesterManaged"] !== undefined) { - contents.RequesterManaged = - (output["requesterManaged"]["#text"] !== undefined - ? output["requesterManaged"]["#text"] - : output["requesterManaged"]) == "true"; + contents.RequesterManaged = output["requesterManaged"] == "true"; } if (output["sourceDestCheck"] !== undefined) { - contents.SourceDestCheck = - (output["sourceDestCheck"]["#text"] !== undefined - ? output["sourceDestCheck"]["#text"] - : output["sourceDestCheck"]) == "true"; + contents.SourceDestCheck = output["sourceDestCheck"] == "true"; } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } if (output["subnetId"] !== undefined) { - contents.SubnetId = - output["subnetId"]["#text"] !== undefined - ? output["subnetId"]["#text"] - : output["subnetId"]; + contents.SubnetId = output["subnetId"]; } if (output.tagSet === "") { contents.TagSet = []; @@ -66591,10 +63700,7 @@ const deserializeAws_ec2NetworkInterface = ( ); } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -66612,34 +63718,19 @@ const deserializeAws_ec2NetworkInterfaceAssociation = ( PublicIp: undefined }; if (output["allocationId"] !== undefined) { - contents.AllocationId = - output["allocationId"]["#text"] !== undefined - ? output["allocationId"]["#text"] - : output["allocationId"]; + contents.AllocationId = output["allocationId"]; } if (output["associationId"] !== undefined) { - contents.AssociationId = - output["associationId"]["#text"] !== undefined - ? output["associationId"]["#text"] - : output["associationId"]; + contents.AssociationId = output["associationId"]; } if (output["ipOwnerId"] !== undefined) { - contents.IpOwnerId = - output["ipOwnerId"]["#text"] !== undefined - ? output["ipOwnerId"]["#text"] - : output["ipOwnerId"]; + contents.IpOwnerId = output["ipOwnerId"]; } if (output["publicDnsName"] !== undefined) { - contents.PublicDnsName = - output["publicDnsName"]["#text"] !== undefined - ? output["publicDnsName"]["#text"] - : output["publicDnsName"]; + contents.PublicDnsName = output["publicDnsName"]; } if (output["publicIp"] !== undefined) { - contents.PublicIp = - output["publicIp"]["#text"] !== undefined - ? output["publicIp"]["#text"] - : output["publicIp"]; + contents.PublicIp = output["publicIp"]; } return contents; }; @@ -66662,41 +63753,22 @@ const deserializeAws_ec2NetworkInterfaceAttachment = ( contents.AttachTime = new Date(output["attachTime"]); } if (output["attachmentId"] !== undefined) { - contents.AttachmentId = - output["attachmentId"]["#text"] !== undefined - ? output["attachmentId"]["#text"] - : output["attachmentId"]; + contents.AttachmentId = output["attachmentId"]; } if (output["deleteOnTermination"] !== undefined) { - contents.DeleteOnTermination = - (output["deleteOnTermination"]["#text"] !== undefined - ? output["deleteOnTermination"]["#text"] - : output["deleteOnTermination"]) == "true"; + contents.DeleteOnTermination = output["deleteOnTermination"] == "true"; } if (output["deviceIndex"] !== undefined) { - contents.DeviceIndex = parseInt( - output["deviceIndex"]["#text"] !== undefined - ? output["deviceIndex"]["#text"] - : output["deviceIndex"] - ); + contents.DeviceIndex = parseInt(output["deviceIndex"]); } if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } if (output["instanceOwnerId"] !== undefined) { - contents.InstanceOwnerId = - output["instanceOwnerId"]["#text"] !== undefined - ? output["instanceOwnerId"]["#text"] - : output["instanceOwnerId"]; + contents.InstanceOwnerId = output["instanceOwnerId"]; } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } return contents; }; @@ -66710,10 +63782,7 @@ const deserializeAws_ec2NetworkInterfaceIpv6Address = ( Ipv6Address: undefined }; if (output["ipv6Address"] !== undefined) { - contents.Ipv6Address = - output["ipv6Address"]["#text"] !== undefined - ? output["ipv6Address"]["#text"] - : output["ipv6Address"]; + contents.Ipv6Address = output["ipv6Address"]; } return contents; }; @@ -66750,34 +63819,20 @@ const deserializeAws_ec2NetworkInterfacePermission = ( PermissionState: undefined }; if (output["awsAccountId"] !== undefined) { - contents.AwsAccountId = - output["awsAccountId"]["#text"] !== undefined - ? output["awsAccountId"]["#text"] - : output["awsAccountId"]; + contents.AwsAccountId = output["awsAccountId"]; } if (output["awsService"] !== undefined) { - contents.AwsService = - output["awsService"]["#text"] !== undefined - ? output["awsService"]["#text"] - : output["awsService"]; + contents.AwsService = output["awsService"]; } if (output["networkInterfaceId"] !== undefined) { - contents.NetworkInterfaceId = - output["networkInterfaceId"]["#text"] !== undefined - ? output["networkInterfaceId"]["#text"] - : output["networkInterfaceId"]; + contents.NetworkInterfaceId = output["networkInterfaceId"]; } if (output["networkInterfacePermissionId"] !== undefined) { contents.NetworkInterfacePermissionId = - output["networkInterfacePermissionId"]["#text"] !== undefined - ? output["networkInterfacePermissionId"]["#text"] - : output["networkInterfacePermissionId"]; + output["networkInterfacePermissionId"]; } if (output["permission"] !== undefined) { - contents.Permission = - output["permission"]["#text"] !== undefined - ? output["permission"]["#text"] - : output["permission"]; + contents.Permission = output["permission"]; } if (output["permissionState"] !== undefined) { contents.PermissionState = deserializeAws_ec2NetworkInterfacePermissionState( @@ -66807,16 +63862,10 @@ const deserializeAws_ec2NetworkInterfacePermissionState = ( StatusMessage: undefined }; if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["statusMessage"] !== undefined) { - contents.StatusMessage = - output["statusMessage"]["#text"] !== undefined - ? output["statusMessage"]["#text"] - : output["statusMessage"]; + contents.StatusMessage = output["statusMessage"]; } return contents; }; @@ -66839,22 +63888,13 @@ const deserializeAws_ec2NetworkInterfacePrivateIpAddress = ( ); } if (output["primary"] !== undefined) { - contents.Primary = - (output["primary"]["#text"] !== undefined - ? output["primary"]["#text"] - : output["primary"]) == "true"; + contents.Primary = output["primary"] == "true"; } if (output["privateDnsName"] !== undefined) { - contents.PrivateDnsName = - output["privateDnsName"]["#text"] !== undefined - ? output["privateDnsName"]["#text"] - : output["privateDnsName"]; + contents.PrivateDnsName = output["privateDnsName"]; } if (output["privateIpAddress"] !== undefined) { - contents.PrivateIpAddress = - output["privateIpAddress"]["#text"] !== undefined - ? output["privateIpAddress"]["#text"] - : output["privateIpAddress"]; + contents.PrivateIpAddress = output["privateIpAddress"]; } return contents; }; @@ -66872,9 +63912,7 @@ const deserializeAws_ec2OccurrenceDaySet = ( output: any, context: __SerdeContext ): number[] => { - return (output || []).map((entry: any) => - parseInt(entry["#text"] !== undefined ? entry["#text"] : entry) - ); + return (output || []).map((entry: any) => parseInt(entry)); }; const deserializeAws_ec2OnDemandOptions = ( @@ -66891,10 +63929,7 @@ const deserializeAws_ec2OnDemandOptions = ( SingleInstanceType: undefined }; if (output["allocationStrategy"] !== undefined) { - contents.AllocationStrategy = - output["allocationStrategy"]["#text"] !== undefined - ? output["allocationStrategy"]["#text"] - : output["allocationStrategy"]; + contents.AllocationStrategy = output["allocationStrategy"]; } if (output["capacityReservationOptions"] !== undefined) { contents.CapacityReservationOptions = deserializeAws_ec2CapacityReservationOptions( @@ -66903,29 +63938,17 @@ const deserializeAws_ec2OnDemandOptions = ( ); } if (output["maxTotalPrice"] !== undefined) { - contents.MaxTotalPrice = - output["maxTotalPrice"]["#text"] !== undefined - ? output["maxTotalPrice"]["#text"] - : output["maxTotalPrice"]; + contents.MaxTotalPrice = output["maxTotalPrice"]; } if (output["minTargetCapacity"] !== undefined) { - contents.MinTargetCapacity = parseInt( - output["minTargetCapacity"]["#text"] !== undefined - ? output["minTargetCapacity"]["#text"] - : output["minTargetCapacity"] - ); + contents.MinTargetCapacity = parseInt(output["minTargetCapacity"]); } if (output["singleAvailabilityZone"] !== undefined) { contents.SingleAvailabilityZone = - (output["singleAvailabilityZone"]["#text"] !== undefined - ? output["singleAvailabilityZone"]["#text"] - : output["singleAvailabilityZone"]) == "true"; + output["singleAvailabilityZone"] == "true"; } if (output["singleInstanceType"] !== undefined) { - contents.SingleInstanceType = - (output["singleInstanceType"]["#text"] !== undefined - ? output["singleInstanceType"]["#text"] - : output["singleInstanceType"]) == "true"; + contents.SingleInstanceType = output["singleInstanceType"] == "true"; } return contents; }; @@ -66942,28 +63965,16 @@ const deserializeAws_ec2PciId = ( VendorId: undefined }; if (output["DeviceId"] !== undefined) { - contents.DeviceId = - output["DeviceId"]["#text"] !== undefined - ? output["DeviceId"]["#text"] - : output["DeviceId"]; + contents.DeviceId = output["DeviceId"]; } if (output["SubsystemId"] !== undefined) { - contents.SubsystemId = - output["SubsystemId"]["#text"] !== undefined - ? output["SubsystemId"]["#text"] - : output["SubsystemId"]; + contents.SubsystemId = output["SubsystemId"]; } if (output["SubsystemVendorId"] !== undefined) { - contents.SubsystemVendorId = - output["SubsystemVendorId"]["#text"] !== undefined - ? output["SubsystemVendorId"]["#text"] - : output["SubsystemVendorId"]; + contents.SubsystemVendorId = output["SubsystemVendorId"]; } if (output["VendorId"] !== undefined) { - contents.VendorId = - output["VendorId"]["#text"] !== undefined - ? output["VendorId"]["#text"] - : output["VendorId"]; + contents.VendorId = output["VendorId"]; } return contents; }; @@ -66978,16 +63989,10 @@ const deserializeAws_ec2PeeringAttachmentStatus = ( Message: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -67004,23 +64009,15 @@ const deserializeAws_ec2PeeringConnectionOptions = ( }; if (output["allowDnsResolutionFromRemoteVpc"] !== undefined) { contents.AllowDnsResolutionFromRemoteVpc = - (output["allowDnsResolutionFromRemoteVpc"]["#text"] !== undefined - ? output["allowDnsResolutionFromRemoteVpc"]["#text"] - : output["allowDnsResolutionFromRemoteVpc"]) == "true"; + output["allowDnsResolutionFromRemoteVpc"] == "true"; } if (output["allowEgressFromLocalClassicLinkToRemoteVpc"] !== undefined) { contents.AllowEgressFromLocalClassicLinkToRemoteVpc = - (output["allowEgressFromLocalClassicLinkToRemoteVpc"]["#text"] !== - undefined - ? output["allowEgressFromLocalClassicLinkToRemoteVpc"]["#text"] - : output["allowEgressFromLocalClassicLinkToRemoteVpc"]) == "true"; + output["allowEgressFromLocalClassicLinkToRemoteVpc"] == "true"; } if (output["allowEgressFromLocalVpcToRemoteClassicLink"] !== undefined) { contents.AllowEgressFromLocalVpcToRemoteClassicLink = - (output["allowEgressFromLocalVpcToRemoteClassicLink"]["#text"] !== - undefined - ? output["allowEgressFromLocalVpcToRemoteClassicLink"]["#text"] - : output["allowEgressFromLocalVpcToRemoteClassicLink"]) == "true"; + output["allowEgressFromLocalVpcToRemoteClassicLink"] == "true"; } return contents; }; @@ -67036,22 +64033,13 @@ const deserializeAws_ec2PeeringTgwInfo = ( TransitGatewayId: undefined }; if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output["region"] !== undefined) { - contents.Region = - output["region"]["#text"] !== undefined - ? output["region"]["#text"] - : output["region"]; + contents.Region = output["region"]; } if (output["transitGatewayId"] !== undefined) { - contents.TransitGatewayId = - output["transitGatewayId"]["#text"] !== undefined - ? output["transitGatewayId"]["#text"] - : output["transitGatewayId"]; + contents.TransitGatewayId = output["transitGatewayId"]; } return contents; }; @@ -67074,11 +64062,7 @@ const deserializeAws_ec2Phase1DHGroupNumbersListValue = ( Value: undefined }; if (output["value"] !== undefined) { - contents.Value = parseInt( - output["value"]["#text"] !== undefined - ? output["value"]["#text"] - : output["value"] - ); + contents.Value = parseInt(output["value"]); } return contents; }; @@ -67101,10 +64085,7 @@ const deserializeAws_ec2Phase1EncryptionAlgorithmsListValue = ( Value: undefined }; if (output["value"] !== undefined) { - contents.Value = - output["value"]["#text"] !== undefined - ? output["value"]["#text"] - : output["value"]; + contents.Value = output["value"]; } return contents; }; @@ -67127,10 +64108,7 @@ const deserializeAws_ec2Phase1IntegrityAlgorithmsListValue = ( Value: undefined }; if (output["value"] !== undefined) { - contents.Value = - output["value"]["#text"] !== undefined - ? output["value"]["#text"] - : output["value"]; + contents.Value = output["value"]; } return contents; }; @@ -67153,11 +64131,7 @@ const deserializeAws_ec2Phase2DHGroupNumbersListValue = ( Value: undefined }; if (output["value"] !== undefined) { - contents.Value = parseInt( - output["value"]["#text"] !== undefined - ? output["value"]["#text"] - : output["value"] - ); + contents.Value = parseInt(output["value"]); } return contents; }; @@ -67180,10 +64154,7 @@ const deserializeAws_ec2Phase2EncryptionAlgorithmsListValue = ( Value: undefined }; if (output["value"] !== undefined) { - contents.Value = - output["value"]["#text"] !== undefined - ? output["value"]["#text"] - : output["value"]; + contents.Value = output["value"]; } return contents; }; @@ -67206,10 +64177,7 @@ const deserializeAws_ec2Phase2IntegrityAlgorithmsListValue = ( Value: undefined }; if (output["value"] !== undefined) { - contents.Value = - output["value"]["#text"] !== undefined - ? output["value"]["#text"] - : output["value"]; + contents.Value = output["value"]; } return contents; }; @@ -67230,53 +64198,28 @@ const deserializeAws_ec2Placement = ( Tenancy: undefined }; if (output["affinity"] !== undefined) { - contents.Affinity = - output["affinity"]["#text"] !== undefined - ? output["affinity"]["#text"] - : output["affinity"]; + contents.Affinity = output["affinity"]; } if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["groupName"] !== undefined) { - contents.GroupName = - output["groupName"]["#text"] !== undefined - ? output["groupName"]["#text"] - : output["groupName"]; + contents.GroupName = output["groupName"]; } if (output["hostId"] !== undefined) { - contents.HostId = - output["hostId"]["#text"] !== undefined - ? output["hostId"]["#text"] - : output["hostId"]; + contents.HostId = output["hostId"]; } if (output["hostResourceGroupArn"] !== undefined) { - contents.HostResourceGroupArn = - output["hostResourceGroupArn"]["#text"] !== undefined - ? output["hostResourceGroupArn"]["#text"] - : output["hostResourceGroupArn"]; + contents.HostResourceGroupArn = output["hostResourceGroupArn"]; } if (output["partitionNumber"] !== undefined) { - contents.PartitionNumber = parseInt( - output["partitionNumber"]["#text"] !== undefined - ? output["partitionNumber"]["#text"] - : output["partitionNumber"] - ); + contents.PartitionNumber = parseInt(output["partitionNumber"]); } if (output["spreadDomain"] !== undefined) { - contents.SpreadDomain = - output["spreadDomain"]["#text"] !== undefined - ? output["spreadDomain"]["#text"] - : output["spreadDomain"]; + contents.SpreadDomain = output["spreadDomain"]; } if (output["tenancy"] !== undefined) { - contents.Tenancy = - output["tenancy"]["#text"] !== undefined - ? output["tenancy"]["#text"] - : output["tenancy"]; + contents.Tenancy = output["tenancy"]; } return contents; }; @@ -67295,35 +64238,19 @@ const deserializeAws_ec2PlacementGroup = ( Tags: undefined }; if (output["groupId"] !== undefined) { - contents.GroupId = - output["groupId"]["#text"] !== undefined - ? output["groupId"]["#text"] - : output["groupId"]; + contents.GroupId = output["groupId"]; } if (output["groupName"] !== undefined) { - contents.GroupName = - output["groupName"]["#text"] !== undefined - ? output["groupName"]["#text"] - : output["groupName"]; + contents.GroupName = output["groupName"]; } if (output["partitionCount"] !== undefined) { - contents.PartitionCount = parseInt( - output["partitionCount"]["#text"] !== undefined - ? output["partitionCount"]["#text"] - : output["partitionCount"] - ); + contents.PartitionCount = parseInt(output["partitionCount"]); } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["strategy"] !== undefined) { - contents.Strategy = - output["strategy"]["#text"] !== undefined - ? output["strategy"]["#text"] - : output["strategy"]; + contents.Strategy = output["strategy"]; } if (output.tagSet === "") { contents.Tags = []; @@ -67376,9 +64303,7 @@ const deserializeAws_ec2PlacementGroupStrategyList = ( output: any, context: __SerdeContext ): (PlacementGroupStrategy | string)[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2PlacementResponse = ( @@ -67390,10 +64315,7 @@ const deserializeAws_ec2PlacementResponse = ( GroupName: undefined }; if (output["groupName"] !== undefined) { - contents.GroupName = - output["groupName"]["#text"] !== undefined - ? output["groupName"]["#text"] - : output["groupName"]; + contents.GroupName = output["groupName"]; } return contents; }; @@ -67407,10 +64329,7 @@ const deserializeAws_ec2PoolCidrBlock = ( Cidr: undefined }; if (output["poolCidrBlock"] !== undefined) { - contents.Cidr = - output["poolCidrBlock"]["#text"] !== undefined - ? output["poolCidrBlock"]["#text"] - : output["poolCidrBlock"]; + contents.Cidr = output["poolCidrBlock"]; } return contents; }; @@ -67434,16 +64353,10 @@ const deserializeAws_ec2PortRange = ( To: undefined }; if (output["from"] !== undefined) { - contents.From = parseInt( - output["from"]["#text"] !== undefined - ? output["from"]["#text"] - : output["from"] - ); + contents.From = parseInt(output["from"]); } if (output["to"] !== undefined) { - contents.To = parseInt( - output["to"]["#text"] !== undefined ? output["to"]["#text"] : output["to"] - ); + contents.To = parseInt(output["to"]); } return contents; }; @@ -67471,16 +64384,10 @@ const deserializeAws_ec2PrefixList = ( ); } if (output["prefixListId"] !== undefined) { - contents.PrefixListId = - output["prefixListId"]["#text"] !== undefined - ? output["prefixListId"]["#text"] - : output["prefixListId"]; + contents.PrefixListId = output["prefixListId"]; } if (output["prefixListName"] !== undefined) { - contents.PrefixListName = - output["prefixListName"]["#text"] !== undefined - ? output["prefixListName"]["#text"] - : output["prefixListName"]; + contents.PrefixListName = output["prefixListName"]; } return contents; }; @@ -67495,16 +64402,10 @@ const deserializeAws_ec2PrefixListId = ( PrefixListId: undefined }; if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["prefixListId"] !== undefined) { - contents.PrefixListId = - output["prefixListId"]["#text"] !== undefined - ? output["prefixListId"]["#text"] - : output["prefixListId"]; + contents.PrefixListId = output["prefixListId"]; } return contents; }; @@ -67522,9 +64423,7 @@ const deserializeAws_ec2PrefixListIdSet = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2PrefixListSet = ( @@ -67548,30 +64447,16 @@ const deserializeAws_ec2PriceSchedule = ( Term: undefined }; if (output["active"] !== undefined) { - contents.Active = - (output["active"]["#text"] !== undefined - ? output["active"]["#text"] - : output["active"]) == "true"; + contents.Active = output["active"] == "true"; } if (output["currencyCode"] !== undefined) { - contents.CurrencyCode = - output["currencyCode"]["#text"] !== undefined - ? output["currencyCode"]["#text"] - : output["currencyCode"]; + contents.CurrencyCode = output["currencyCode"]; } if (output["price"] !== undefined) { - contents.Price = parseFloat( - output["price"]["#text"] !== undefined - ? output["price"]["#text"] - : output["price"] - ); + contents.Price = parseFloat(output["price"]); } if (output["term"] !== undefined) { - contents.Term = parseInt( - output["term"]["#text"] !== undefined - ? output["term"]["#text"] - : output["term"] - ); + contents.Term = parseInt(output["term"]); } return contents; }; @@ -67595,18 +64480,10 @@ const deserializeAws_ec2PricingDetail = ( Price: undefined }; if (output["count"] !== undefined) { - contents.Count = parseInt( - output["count"]["#text"] !== undefined - ? output["count"]["#text"] - : output["count"] - ); + contents.Count = parseInt(output["count"]); } if (output["price"] !== undefined) { - contents.Price = parseFloat( - output["price"]["#text"] !== undefined - ? output["price"]["#text"] - : output["price"] - ); + contents.Price = parseFloat(output["price"]); } return contents; }; @@ -67630,10 +64507,7 @@ const deserializeAws_ec2PrincipalIdFormat = ( Statuses: undefined }; if (output["arn"] !== undefined) { - contents.Arn = - output["arn"]["#text"] !== undefined - ? output["arn"]["#text"] - : output["arn"]; + contents.Arn = output["arn"]; } if (output.statusSet === "") { contents.Statuses = []; @@ -67671,28 +64545,16 @@ const deserializeAws_ec2PrivateDnsNameConfiguration = ( Value: undefined }; if (output["name"] !== undefined) { - contents.Name = - output["name"]["#text"] !== undefined - ? output["name"]["#text"] - : output["name"]; + contents.Name = output["name"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["type"] !== undefined) { - contents.Type = - output["type"]["#text"] !== undefined - ? output["type"]["#text"] - : output["type"]; + contents.Type = output["type"]; } if (output["value"] !== undefined) { - contents.Value = - output["value"]["#text"] !== undefined - ? output["value"]["#text"] - : output["value"]; + contents.Value = output["value"]; } return contents; }; @@ -67707,16 +64569,10 @@ const deserializeAws_ec2PrivateIpAddressSpecification = ( PrivateIpAddress: undefined }; if (output["primary"] !== undefined) { - contents.Primary = - (output["primary"]["#text"] !== undefined - ? output["primary"]["#text"] - : output["primary"]) == "true"; + contents.Primary = output["primary"] == "true"; } if (output["privateIpAddress"] !== undefined) { - contents.PrivateIpAddress = - output["privateIpAddress"]["#text"] !== undefined - ? output["privateIpAddress"]["#text"] - : output["privateIpAddress"]; + contents.PrivateIpAddress = output["privateIpAddress"]; } return contents; }; @@ -67753,9 +64609,7 @@ const deserializeAws_ec2ProcessorInfo = ( } if (output["sustainedClockSpeedInGhz"] !== undefined) { contents.SustainedClockSpeedInGhz = parseFloat( - output["sustainedClockSpeedInGhz"]["#text"] !== undefined - ? output["sustainedClockSpeedInGhz"]["#text"] - : output["sustainedClockSpeedInGhz"] + output["sustainedClockSpeedInGhz"] ); } return contents; @@ -67771,16 +64625,10 @@ const deserializeAws_ec2ProductCode = ( ProductCodeType: undefined }; if (output["productCode"] !== undefined) { - contents.ProductCodeId = - output["productCode"]["#text"] !== undefined - ? output["productCode"]["#text"] - : output["productCode"]; + contents.ProductCodeId = output["productCode"]; } if (output["type"] !== undefined) { - contents.ProductCodeType = - output["type"]["#text"] !== undefined - ? output["type"]["#text"] - : output["type"]; + contents.ProductCodeType = output["type"]; } return contents; }; @@ -67803,10 +64651,7 @@ const deserializeAws_ec2PropagatingVgw = ( GatewayId: undefined }; if (output["gatewayId"] !== undefined) { - contents.GatewayId = - output["gatewayId"]["#text"] !== undefined - ? output["gatewayId"]["#text"] - : output["gatewayId"]; + contents.GatewayId = output["gatewayId"]; } return contents; }; @@ -67853,25 +64698,16 @@ const deserializeAws_ec2ProvisionedBandwidth = ( contents.ProvisionTime = new Date(output["provisionTime"]); } if (output["provisioned"] !== undefined) { - contents.Provisioned = - output["provisioned"]["#text"] !== undefined - ? output["provisioned"]["#text"] - : output["provisioned"]; + contents.Provisioned = output["provisioned"]; } if (output["requestTime"] !== undefined) { contents.RequestTime = new Date(output["requestTime"]); } if (output["requested"] !== undefined) { - contents.Requested = - output["requested"]["#text"] !== undefined - ? output["requested"]["#text"] - : output["requested"]; + contents.Requested = output["requested"]; } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } return contents; }; @@ -67889,10 +64725,7 @@ const deserializeAws_ec2PublicIpv4Pool = ( TotalAvailableAddressCount: undefined }; if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output.poolAddressRangeSet === "") { contents.PoolAddressRanges = []; @@ -67907,23 +64740,14 @@ const deserializeAws_ec2PublicIpv4Pool = ( ); } if (output["poolId"] !== undefined) { - contents.PoolId = - output["poolId"]["#text"] !== undefined - ? output["poolId"]["#text"] - : output["poolId"]; + contents.PoolId = output["poolId"]; } if (output["totalAddressCount"] !== undefined) { - contents.TotalAddressCount = parseInt( - output["totalAddressCount"]["#text"] !== undefined - ? output["totalAddressCount"]["#text"] - : output["totalAddressCount"] - ); + contents.TotalAddressCount = parseInt(output["totalAddressCount"]); } if (output["totalAvailableAddressCount"] !== undefined) { contents.TotalAvailableAddressCount = parseInt( - output["totalAvailableAddressCount"]["#text"] !== undefined - ? output["totalAvailableAddressCount"]["#text"] - : output["totalAvailableAddressCount"] + output["totalAvailableAddressCount"] ); } return contents; @@ -67941,30 +64765,16 @@ const deserializeAws_ec2PublicIpv4PoolRange = ( LastAddress: undefined }; if (output["addressCount"] !== undefined) { - contents.AddressCount = parseInt( - output["addressCount"]["#text"] !== undefined - ? output["addressCount"]["#text"] - : output["addressCount"] - ); + contents.AddressCount = parseInt(output["addressCount"]); } if (output["availableAddressCount"] !== undefined) { - contents.AvailableAddressCount = parseInt( - output["availableAddressCount"]["#text"] !== undefined - ? output["availableAddressCount"]["#text"] - : output["availableAddressCount"] - ); + contents.AvailableAddressCount = parseInt(output["availableAddressCount"]); } if (output["firstAddress"] !== undefined) { - contents.FirstAddress = - output["firstAddress"]["#text"] !== undefined - ? output["firstAddress"]["#text"] - : output["firstAddress"]; + contents.FirstAddress = output["firstAddress"]; } if (output["lastAddress"] !== undefined) { - contents.LastAddress = - output["lastAddress"]["#text"] !== undefined - ? output["lastAddress"]["#text"] - : output["lastAddress"]; + contents.LastAddress = output["lastAddress"]; } return contents; }; @@ -68003,17 +64813,10 @@ const deserializeAws_ec2Purchase = ( UpfrontPrice: undefined }; if (output["currencyCode"] !== undefined) { - contents.CurrencyCode = - output["currencyCode"]["#text"] !== undefined - ? output["currencyCode"]["#text"] - : output["currencyCode"]; + contents.CurrencyCode = output["currencyCode"]; } if (output["duration"] !== undefined) { - contents.Duration = parseInt( - output["duration"]["#text"] !== undefined - ? output["duration"]["#text"] - : output["duration"] - ); + contents.Duration = parseInt(output["duration"]); } if (output.hostIdSet === "") { contents.HostIdSet = []; @@ -68028,34 +64831,19 @@ const deserializeAws_ec2Purchase = ( ); } if (output["hostReservationId"] !== undefined) { - contents.HostReservationId = - output["hostReservationId"]["#text"] !== undefined - ? output["hostReservationId"]["#text"] - : output["hostReservationId"]; + contents.HostReservationId = output["hostReservationId"]; } if (output["hourlyPrice"] !== undefined) { - contents.HourlyPrice = - output["hourlyPrice"]["#text"] !== undefined - ? output["hourlyPrice"]["#text"] - : output["hourlyPrice"]; + contents.HourlyPrice = output["hourlyPrice"]; } if (output["instanceFamily"] !== undefined) { - contents.InstanceFamily = - output["instanceFamily"]["#text"] !== undefined - ? output["instanceFamily"]["#text"] - : output["instanceFamily"]; + contents.InstanceFamily = output["instanceFamily"]; } if (output["paymentOption"] !== undefined) { - contents.PaymentOption = - output["paymentOption"]["#text"] !== undefined - ? output["paymentOption"]["#text"] - : output["paymentOption"]; + contents.PaymentOption = output["paymentOption"]; } if (output["upfrontPrice"] !== undefined) { - contents.UpfrontPrice = - output["upfrontPrice"]["#text"] !== undefined - ? output["upfrontPrice"]["#text"] - : output["upfrontPrice"]; + contents.UpfrontPrice = output["upfrontPrice"]; } return contents; }; @@ -68073,16 +64861,10 @@ const deserializeAws_ec2PurchaseHostReservationResult = ( TotalUpfrontPrice: undefined }; if (output["clientToken"] !== undefined) { - contents.ClientToken = - output["clientToken"]["#text"] !== undefined - ? output["clientToken"]["#text"] - : output["clientToken"]; + contents.ClientToken = output["clientToken"]; } if (output["currencyCode"] !== undefined) { - contents.CurrencyCode = - output["currencyCode"]["#text"] !== undefined - ? output["currencyCode"]["#text"] - : output["currencyCode"]; + contents.CurrencyCode = output["currencyCode"]; } if (output.purchase === "") { contents.Purchase = []; @@ -68097,16 +64879,10 @@ const deserializeAws_ec2PurchaseHostReservationResult = ( ); } if (output["totalHourlyPrice"] !== undefined) { - contents.TotalHourlyPrice = - output["totalHourlyPrice"]["#text"] !== undefined - ? output["totalHourlyPrice"]["#text"] - : output["totalHourlyPrice"]; + contents.TotalHourlyPrice = output["totalHourlyPrice"]; } if (output["totalUpfrontPrice"] !== undefined) { - contents.TotalUpfrontPrice = - output["totalUpfrontPrice"]["#text"] !== undefined - ? output["totalUpfrontPrice"]["#text"] - : output["totalUpfrontPrice"]; + contents.TotalUpfrontPrice = output["totalUpfrontPrice"]; } return contents; }; @@ -68120,10 +64896,7 @@ const deserializeAws_ec2PurchaseReservedInstancesOfferingResult = ( ReservedInstancesId: undefined }; if (output["reservedInstancesId"] !== undefined) { - contents.ReservedInstancesId = - output["reservedInstancesId"]["#text"] !== undefined - ? output["reservedInstancesId"]["#text"] - : output["reservedInstancesId"]; + contents.ReservedInstancesId = output["reservedInstancesId"]; } return contents; }; @@ -68179,17 +64952,10 @@ const deserializeAws_ec2RecurringCharge = ( Frequency: undefined }; if (output["amount"] !== undefined) { - contents.Amount = parseFloat( - output["amount"]["#text"] !== undefined - ? output["amount"]["#text"] - : output["amount"] - ); + contents.Amount = parseFloat(output["amount"]); } if (output["frequency"] !== undefined) { - contents.Frequency = - output["frequency"]["#text"] !== undefined - ? output["frequency"]["#text"] - : output["frequency"]; + contents.Frequency = output["frequency"]; } return contents; }; @@ -68214,22 +64980,13 @@ const deserializeAws_ec2Region = ( RegionName: undefined }; if (output["regionEndpoint"] !== undefined) { - contents.Endpoint = - output["regionEndpoint"]["#text"] !== undefined - ? output["regionEndpoint"]["#text"] - : output["regionEndpoint"]; + contents.Endpoint = output["regionEndpoint"]; } if (output["optInStatus"] !== undefined) { - contents.OptInStatus = - output["optInStatus"]["#text"] !== undefined - ? output["optInStatus"]["#text"] - : output["optInStatus"]; + contents.OptInStatus = output["optInStatus"]; } if (output["regionName"] !== undefined) { - contents.RegionName = - output["regionName"]["#text"] !== undefined - ? output["regionName"]["#text"] - : output["regionName"]; + contents.RegionName = output["regionName"]; } return contents; }; @@ -68252,10 +65009,7 @@ const deserializeAws_ec2RegisterImageResult = ( ImageId: undefined }; if (output["imageId"] !== undefined) { - contents.ImageId = - output["imageId"]["#text"] !== undefined - ? output["imageId"]["#text"] - : output["imageId"]; + contents.ImageId = output["imageId"]; } return contents; }; @@ -68360,10 +65114,7 @@ const deserializeAws_ec2RejectVpcPeeringConnectionResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -68430,10 +65181,7 @@ const deserializeAws_ec2ReplaceNetworkAclAssociationResult = ( NewAssociationId: undefined }; if (output["newAssociationId"] !== undefined) { - contents.NewAssociationId = - output["newAssociationId"]["#text"] !== undefined - ? output["newAssociationId"]["#text"] - : output["newAssociationId"]; + contents.NewAssociationId = output["newAssociationId"]; } return contents; }; @@ -68454,10 +65202,7 @@ const deserializeAws_ec2ReplaceRouteTableAssociationResult = ( ); } if (output["newAssociationId"] !== undefined) { - contents.NewAssociationId = - output["newAssociationId"]["#text"] !== undefined - ? output["newAssociationId"]["#text"] - : output["newAssociationId"]; + contents.NewAssociationId = output["newAssociationId"]; } return contents; }; @@ -68488,10 +65233,7 @@ const deserializeAws_ec2RequestSpotFleetResponse = ( SpotFleetRequestId: undefined }; if (output["spotFleetRequestId"] !== undefined) { - contents.SpotFleetRequestId = - output["spotFleetRequestId"]["#text"] !== undefined - ? output["spotFleetRequestId"]["#text"] - : output["spotFleetRequestId"]; + contents.SpotFleetRequestId = output["spotFleetRequestId"]; } return contents; }; @@ -68556,22 +65298,13 @@ const deserializeAws_ec2Reservation = ( ); } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output["requesterId"] !== undefined) { - contents.RequesterId = - output["requesterId"]["#text"] !== undefined - ? output["requesterId"]["#text"] - : output["requesterId"]; + contents.RequesterId = output["requesterId"]; } if (output["reservationId"] !== undefined) { - contents.ReservationId = - output["reservationId"]["#text"] !== undefined - ? output["reservationId"]["#text"] - : output["reservationId"]; + contents.ReservationId = output["reservationId"]; } return contents; }; @@ -68596,22 +65329,13 @@ const deserializeAws_ec2ReservationValue = ( RemainingUpfrontValue: undefined }; if (output["hourlyPrice"] !== undefined) { - contents.HourlyPrice = - output["hourlyPrice"]["#text"] !== undefined - ? output["hourlyPrice"]["#text"] - : output["hourlyPrice"]; + contents.HourlyPrice = output["hourlyPrice"]; } if (output["remainingTotalValue"] !== undefined) { - contents.RemainingTotalValue = - output["remainingTotalValue"]["#text"] !== undefined - ? output["remainingTotalValue"]["#text"] - : output["remainingTotalValue"]; + contents.RemainingTotalValue = output["remainingTotalValue"]; } if (output["remainingUpfrontValue"] !== undefined) { - contents.RemainingUpfrontValue = - output["remainingUpfrontValue"]["#text"] !== undefined - ? output["remainingUpfrontValue"]["#text"] - : output["remainingUpfrontValue"]; + contents.RemainingUpfrontValue = output["remainingUpfrontValue"]; } return contents; }; @@ -68632,10 +65356,7 @@ const deserializeAws_ec2ReservedInstanceReservationValue = ( ); } if (output["reservedInstanceId"] !== undefined) { - contents.ReservedInstanceId = - output["reservedInstanceId"]["#text"] !== undefined - ? output["reservedInstanceId"]["#text"] - : output["reservedInstanceId"]; + contents.ReservedInstanceId = output["reservedInstanceId"]; } return contents; }; @@ -68675,70 +65396,37 @@ const deserializeAws_ec2ReservedInstances = ( UsagePrice: undefined }; if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["currencyCode"] !== undefined) { - contents.CurrencyCode = - output["currencyCode"]["#text"] !== undefined - ? output["currencyCode"]["#text"] - : output["currencyCode"]; + contents.CurrencyCode = output["currencyCode"]; } if (output["duration"] !== undefined) { - contents.Duration = parseInt( - output["duration"]["#text"] !== undefined - ? output["duration"]["#text"] - : output["duration"] - ); + contents.Duration = parseInt(output["duration"]); } if (output["end"] !== undefined) { contents.End = new Date(output["end"]); } if (output["fixedPrice"] !== undefined) { - contents.FixedPrice = parseFloat( - output["fixedPrice"]["#text"] !== undefined - ? output["fixedPrice"]["#text"] - : output["fixedPrice"] - ); + contents.FixedPrice = parseFloat(output["fixedPrice"]); } if (output["instanceCount"] !== undefined) { - contents.InstanceCount = parseInt( - output["instanceCount"]["#text"] !== undefined - ? output["instanceCount"]["#text"] - : output["instanceCount"] - ); + contents.InstanceCount = parseInt(output["instanceCount"]); } if (output["instanceTenancy"] !== undefined) { - contents.InstanceTenancy = - output["instanceTenancy"]["#text"] !== undefined - ? output["instanceTenancy"]["#text"] - : output["instanceTenancy"]; + contents.InstanceTenancy = output["instanceTenancy"]; } if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output["offeringClass"] !== undefined) { - contents.OfferingClass = - output["offeringClass"]["#text"] !== undefined - ? output["offeringClass"]["#text"] - : output["offeringClass"]; + contents.OfferingClass = output["offeringClass"]; } if (output["offeringType"] !== undefined) { - contents.OfferingType = - output["offeringType"]["#text"] !== undefined - ? output["offeringType"]["#text"] - : output["offeringType"]; + contents.OfferingType = output["offeringType"]; } if (output["productDescription"] !== undefined) { - contents.ProductDescription = - output["productDescription"]["#text"] !== undefined - ? output["productDescription"]["#text"] - : output["productDescription"]; + contents.ProductDescription = output["productDescription"]; } if (output.recurringCharges === "") { contents.RecurringCharges = []; @@ -68753,25 +65441,16 @@ const deserializeAws_ec2ReservedInstances = ( ); } if (output["reservedInstancesId"] !== undefined) { - contents.ReservedInstancesId = - output["reservedInstancesId"]["#text"] !== undefined - ? output["reservedInstancesId"]["#text"] - : output["reservedInstancesId"]; + contents.ReservedInstancesId = output["reservedInstancesId"]; } if (output["scope"] !== undefined) { - contents.Scope = - output["scope"]["#text"] !== undefined - ? output["scope"]["#text"] - : output["scope"]; + contents.Scope = output["scope"]; } if (output["start"] !== undefined) { contents.Start = new Date(output["start"]); } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output.tagSet === "") { contents.Tags = []; @@ -68786,11 +65465,7 @@ const deserializeAws_ec2ReservedInstances = ( ); } if (output["usagePrice"] !== undefined) { - contents.UsagePrice = parseFloat( - output["usagePrice"]["#text"] !== undefined - ? output["usagePrice"]["#text"] - : output["usagePrice"] - ); + contents.UsagePrice = parseFloat(output["usagePrice"]); } return contents; }; @@ -68808,35 +65483,19 @@ const deserializeAws_ec2ReservedInstancesConfiguration = ( Scope: undefined }; if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["instanceCount"] !== undefined) { - contents.InstanceCount = parseInt( - output["instanceCount"]["#text"] !== undefined - ? output["instanceCount"]["#text"] - : output["instanceCount"] - ); + contents.InstanceCount = parseInt(output["instanceCount"]); } if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output["platform"] !== undefined) { - contents.Platform = - output["platform"]["#text"] !== undefined - ? output["platform"]["#text"] - : output["platform"]; + contents.Platform = output["platform"]; } if (output["scope"] !== undefined) { - contents.Scope = - output["scope"]["#text"] !== undefined - ? output["scope"]["#text"] - : output["scope"]; + contents.Scope = output["scope"]; } return contents; }; @@ -68850,10 +65509,7 @@ const deserializeAws_ec2ReservedInstancesId = ( ReservedInstancesId: undefined }; if (output["reservedInstancesId"] !== undefined) { - contents.ReservedInstancesId = - output["reservedInstancesId"]["#text"] !== undefined - ? output["reservedInstancesId"]["#text"] - : output["reservedInstancesId"]; + contents.ReservedInstancesId = output["reservedInstancesId"]; } return contents; }; @@ -68885,10 +65541,7 @@ const deserializeAws_ec2ReservedInstancesListing = ( UpdateDate: undefined }; if (output["clientToken"] !== undefined) { - contents.ClientToken = - output["clientToken"]["#text"] !== undefined - ? output["clientToken"]["#text"] - : output["clientToken"]; + contents.ClientToken = output["clientToken"]; } if (output["createDate"] !== undefined) { contents.CreateDate = new Date(output["createDate"]); @@ -68918,28 +65571,16 @@ const deserializeAws_ec2ReservedInstancesListing = ( ); } if (output["reservedInstancesId"] !== undefined) { - contents.ReservedInstancesId = - output["reservedInstancesId"]["#text"] !== undefined - ? output["reservedInstancesId"]["#text"] - : output["reservedInstancesId"]; + contents.ReservedInstancesId = output["reservedInstancesId"]; } if (output["reservedInstancesListingId"] !== undefined) { - contents.ReservedInstancesListingId = - output["reservedInstancesListingId"]["#text"] !== undefined - ? output["reservedInstancesListingId"]["#text"] - : output["reservedInstancesListingId"]; + contents.ReservedInstancesListingId = output["reservedInstancesListingId"]; } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } if (output["statusMessage"] !== undefined) { - contents.StatusMessage = - output["statusMessage"]["#text"] !== undefined - ? output["statusMessage"]["#text"] - : output["statusMessage"]; + contents.StatusMessage = output["statusMessage"]; } if (output.tagSet === "") { contents.Tags = []; @@ -68985,10 +65626,7 @@ const deserializeAws_ec2ReservedInstancesModification = ( UpdateDate: undefined }; if (output["clientToken"] !== undefined) { - contents.ClientToken = - output["clientToken"]["#text"] !== undefined - ? output["clientToken"]["#text"] - : output["clientToken"]; + contents.ClientToken = output["clientToken"]; } if (output["createDate"] !== undefined) { contents.CreateDate = new Date(output["createDate"]); @@ -69022,21 +65660,13 @@ const deserializeAws_ec2ReservedInstancesModification = ( } if (output["reservedInstancesModificationId"] !== undefined) { contents.ReservedInstancesModificationId = - output["reservedInstancesModificationId"]["#text"] !== undefined - ? output["reservedInstancesModificationId"]["#text"] - : output["reservedInstancesModificationId"]; + output["reservedInstancesModificationId"]; } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } if (output["statusMessage"] !== undefined) { - contents.StatusMessage = - output["statusMessage"]["#text"] !== undefined - ? output["statusMessage"]["#text"] - : output["statusMessage"]; + contents.StatusMessage = output["statusMessage"]; } if (output["updateDate"] !== undefined) { contents.UpdateDate = new Date(output["updateDate"]); @@ -69063,10 +65693,7 @@ const deserializeAws_ec2ReservedInstancesModificationResult = ( TargetConfiguration: undefined }; if (output["reservedInstancesId"] !== undefined) { - contents.ReservedInstancesId = - output["reservedInstancesId"]["#text"] !== undefined - ? output["reservedInstancesId"]["#text"] - : output["reservedInstancesId"]; + contents.ReservedInstancesId = output["reservedInstancesId"]; } if (output["targetConfiguration"] !== undefined) { contents.TargetConfiguration = deserializeAws_ec2ReservedInstancesConfiguration( @@ -69109,60 +65736,31 @@ const deserializeAws_ec2ReservedInstancesOffering = ( UsagePrice: undefined }; if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["currencyCode"] !== undefined) { - contents.CurrencyCode = - output["currencyCode"]["#text"] !== undefined - ? output["currencyCode"]["#text"] - : output["currencyCode"]; + contents.CurrencyCode = output["currencyCode"]; } if (output["duration"] !== undefined) { - contents.Duration = parseInt( - output["duration"]["#text"] !== undefined - ? output["duration"]["#text"] - : output["duration"] - ); + contents.Duration = parseInt(output["duration"]); } if (output["fixedPrice"] !== undefined) { - contents.FixedPrice = parseFloat( - output["fixedPrice"]["#text"] !== undefined - ? output["fixedPrice"]["#text"] - : output["fixedPrice"] - ); + contents.FixedPrice = parseFloat(output["fixedPrice"]); } if (output["instanceTenancy"] !== undefined) { - contents.InstanceTenancy = - output["instanceTenancy"]["#text"] !== undefined - ? output["instanceTenancy"]["#text"] - : output["instanceTenancy"]; + contents.InstanceTenancy = output["instanceTenancy"]; } if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output["marketplace"] !== undefined) { - contents.Marketplace = - (output["marketplace"]["#text"] !== undefined - ? output["marketplace"]["#text"] - : output["marketplace"]) == "true"; + contents.Marketplace = output["marketplace"] == "true"; } if (output["offeringClass"] !== undefined) { - contents.OfferingClass = - output["offeringClass"]["#text"] !== undefined - ? output["offeringClass"]["#text"] - : output["offeringClass"]; + contents.OfferingClass = output["offeringClass"]; } if (output["offeringType"] !== undefined) { - contents.OfferingType = - output["offeringType"]["#text"] !== undefined - ? output["offeringType"]["#text"] - : output["offeringType"]; + contents.OfferingType = output["offeringType"]; } if (output.pricingDetailsSet === "") { contents.PricingDetails = []; @@ -69177,10 +65775,7 @@ const deserializeAws_ec2ReservedInstancesOffering = ( ); } if (output["productDescription"] !== undefined) { - contents.ProductDescription = - output["productDescription"]["#text"] !== undefined - ? output["productDescription"]["#text"] - : output["productDescription"]; + contents.ProductDescription = output["productDescription"]; } if (output.recurringCharges === "") { contents.RecurringCharges = []; @@ -69196,22 +65791,13 @@ const deserializeAws_ec2ReservedInstancesOffering = ( } if (output["reservedInstancesOfferingId"] !== undefined) { contents.ReservedInstancesOfferingId = - output["reservedInstancesOfferingId"]["#text"] !== undefined - ? output["reservedInstancesOfferingId"]["#text"] - : output["reservedInstancesOfferingId"]; + output["reservedInstancesOfferingId"]; } if (output["scope"] !== undefined) { - contents.Scope = - output["scope"]["#text"] !== undefined - ? output["scope"]["#text"] - : output["scope"]; + contents.Scope = output["scope"]; } if (output["usagePrice"] !== undefined) { - contents.UsagePrice = parseFloat( - output["usagePrice"]["#text"] !== undefined - ? output["usagePrice"]["#text"] - : output["usagePrice"] - ); + contents.UsagePrice = parseFloat(output["usagePrice"]); } return contents; }; @@ -69243,10 +65829,7 @@ const deserializeAws_ec2ResetEbsDefaultKmsKeyIdResult = ( KmsKeyId: undefined }; if (output["kmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["kmsKeyId"]["#text"] !== undefined - ? output["kmsKeyId"]["#text"] - : output["kmsKeyId"]; + contents.KmsKeyId = output["kmsKeyId"]; } return contents; }; @@ -69260,10 +65843,7 @@ const deserializeAws_ec2ResetFpgaImageAttributeResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -69278,16 +65858,10 @@ const deserializeAws_ec2ResponseError = ( Message: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -69296,18 +65870,14 @@ const deserializeAws_ec2ResponseHostIdList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2ResponseHostIdSet = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2ResponseLaunchTemplateData = ( @@ -69374,16 +65944,10 @@ const deserializeAws_ec2ResponseLaunchTemplateData = ( ); } if (output["disableApiTermination"] !== undefined) { - contents.DisableApiTermination = - (output["disableApiTermination"]["#text"] !== undefined - ? output["disableApiTermination"]["#text"] - : output["disableApiTermination"]) == "true"; + contents.DisableApiTermination = output["disableApiTermination"] == "true"; } if (output["ebsOptimized"] !== undefined) { - contents.EbsOptimized = - (output["ebsOptimized"]["#text"] !== undefined - ? output["ebsOptimized"]["#text"] - : output["ebsOptimized"]) == "true"; + contents.EbsOptimized = output["ebsOptimized"] == "true"; } if (output.elasticGpuSpecificationSet === "") { contents.ElasticGpuSpecifications = []; @@ -69422,16 +65986,11 @@ const deserializeAws_ec2ResponseLaunchTemplateData = ( ); } if (output["imageId"] !== undefined) { - contents.ImageId = - output["imageId"]["#text"] !== undefined - ? output["imageId"]["#text"] - : output["imageId"]; + contents.ImageId = output["imageId"]; } if (output["instanceInitiatedShutdownBehavior"] !== undefined) { contents.InstanceInitiatedShutdownBehavior = - output["instanceInitiatedShutdownBehavior"]["#text"] !== undefined - ? output["instanceInitiatedShutdownBehavior"]["#text"] - : output["instanceInitiatedShutdownBehavior"]; + output["instanceInitiatedShutdownBehavior"]; } if (output["instanceMarketOptions"] !== undefined) { contents.InstanceMarketOptions = deserializeAws_ec2LaunchTemplateInstanceMarketOptions( @@ -69440,22 +65999,13 @@ const deserializeAws_ec2ResponseLaunchTemplateData = ( ); } if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output["kernelId"] !== undefined) { - contents.KernelId = - output["kernelId"]["#text"] !== undefined - ? output["kernelId"]["#text"] - : output["kernelId"]; + contents.KernelId = output["kernelId"]; } if (output["keyName"] !== undefined) { - contents.KeyName = - output["keyName"]["#text"] !== undefined - ? output["keyName"]["#text"] - : output["keyName"]; + contents.KeyName = output["keyName"]; } if (output.licenseSet === "") { contents.LicenseSpecifications = []; @@ -69500,10 +66050,7 @@ const deserializeAws_ec2ResponseLaunchTemplateData = ( ); } if (output["ramDiskId"] !== undefined) { - contents.RamDiskId = - output["ramDiskId"]["#text"] !== undefined - ? output["ramDiskId"]["#text"] - : output["ramDiskId"]; + contents.RamDiskId = output["ramDiskId"]; } if (output.securityGroupIdSet === "") { contents.SecurityGroupIds = []; @@ -69542,10 +66089,7 @@ const deserializeAws_ec2ResponseLaunchTemplateData = ( ); } if (output["userData"] !== undefined) { - contents.UserData = - output["userData"]["#text"] !== undefined - ? output["userData"]["#text"] - : output["userData"]; + contents.UserData = output["userData"]; } return contents; }; @@ -69560,16 +66104,10 @@ const deserializeAws_ec2RestoreAddressToClassicResult = ( Status: undefined }; if (output["publicIp"] !== undefined) { - contents.PublicIp = - output["publicIp"]["#text"] !== undefined - ? output["publicIp"]["#text"] - : output["publicIp"]; + contents.PublicIp = output["publicIp"]; } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } return contents; }; @@ -69595,9 +66133,7 @@ const deserializeAws_ec2RootDeviceTypeList = ( output: any, context: __SerdeContext ): (RootDeviceType | string)[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2Route = ( @@ -69622,88 +66158,47 @@ const deserializeAws_ec2Route = ( VpcPeeringConnectionId: undefined }; if (output["destinationCidrBlock"] !== undefined) { - contents.DestinationCidrBlock = - output["destinationCidrBlock"]["#text"] !== undefined - ? output["destinationCidrBlock"]["#text"] - : output["destinationCidrBlock"]; + contents.DestinationCidrBlock = output["destinationCidrBlock"]; } if (output["destinationIpv6CidrBlock"] !== undefined) { - contents.DestinationIpv6CidrBlock = - output["destinationIpv6CidrBlock"]["#text"] !== undefined - ? output["destinationIpv6CidrBlock"]["#text"] - : output["destinationIpv6CidrBlock"]; + contents.DestinationIpv6CidrBlock = output["destinationIpv6CidrBlock"]; } if (output["destinationPrefixListId"] !== undefined) { - contents.DestinationPrefixListId = - output["destinationPrefixListId"]["#text"] !== undefined - ? output["destinationPrefixListId"]["#text"] - : output["destinationPrefixListId"]; + contents.DestinationPrefixListId = output["destinationPrefixListId"]; } if (output["egressOnlyInternetGatewayId"] !== undefined) { contents.EgressOnlyInternetGatewayId = - output["egressOnlyInternetGatewayId"]["#text"] !== undefined - ? output["egressOnlyInternetGatewayId"]["#text"] - : output["egressOnlyInternetGatewayId"]; + output["egressOnlyInternetGatewayId"]; } if (output["gatewayId"] !== undefined) { - contents.GatewayId = - output["gatewayId"]["#text"] !== undefined - ? output["gatewayId"]["#text"] - : output["gatewayId"]; + contents.GatewayId = output["gatewayId"]; } if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } if (output["instanceOwnerId"] !== undefined) { - contents.InstanceOwnerId = - output["instanceOwnerId"]["#text"] !== undefined - ? output["instanceOwnerId"]["#text"] - : output["instanceOwnerId"]; + contents.InstanceOwnerId = output["instanceOwnerId"]; } if (output["localGatewayId"] !== undefined) { - contents.LocalGatewayId = - output["localGatewayId"]["#text"] !== undefined - ? output["localGatewayId"]["#text"] - : output["localGatewayId"]; + contents.LocalGatewayId = output["localGatewayId"]; } if (output["natGatewayId"] !== undefined) { - contents.NatGatewayId = - output["natGatewayId"]["#text"] !== undefined - ? output["natGatewayId"]["#text"] - : output["natGatewayId"]; + contents.NatGatewayId = output["natGatewayId"]; } if (output["networkInterfaceId"] !== undefined) { - contents.NetworkInterfaceId = - output["networkInterfaceId"]["#text"] !== undefined - ? output["networkInterfaceId"]["#text"] - : output["networkInterfaceId"]; + contents.NetworkInterfaceId = output["networkInterfaceId"]; } if (output["origin"] !== undefined) { - contents.Origin = - output["origin"]["#text"] !== undefined - ? output["origin"]["#text"] - : output["origin"]; + contents.Origin = output["origin"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["transitGatewayId"] !== undefined) { - contents.TransitGatewayId = - output["transitGatewayId"]["#text"] !== undefined - ? output["transitGatewayId"]["#text"] - : output["transitGatewayId"]; + contents.TransitGatewayId = output["transitGatewayId"]; } if (output["vpcPeeringConnectionId"] !== undefined) { - contents.VpcPeeringConnectionId = - output["vpcPeeringConnectionId"]["#text"] !== undefined - ? output["vpcPeeringConnectionId"]["#text"] - : output["vpcPeeringConnectionId"]; + contents.VpcPeeringConnectionId = output["vpcPeeringConnectionId"]; } return contents; }; @@ -69744,10 +66239,7 @@ const deserializeAws_ec2RouteTable = ( ); } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output.propagatingVgwSet === "") { contents.PropagatingVgws = []; @@ -69762,10 +66254,7 @@ const deserializeAws_ec2RouteTable = ( ); } if (output["routeTableId"] !== undefined) { - contents.RouteTableId = - output["routeTableId"]["#text"] !== undefined - ? output["routeTableId"]["#text"] - : output["routeTableId"]; + contents.RouteTableId = output["routeTableId"]; } if (output.routeSet === "") { contents.Routes = []; @@ -69792,10 +66281,7 @@ const deserializeAws_ec2RouteTable = ( ); } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -69820,34 +66306,19 @@ const deserializeAws_ec2RouteTableAssociation = ( ); } if (output["gatewayId"] !== undefined) { - contents.GatewayId = - output["gatewayId"]["#text"] !== undefined - ? output["gatewayId"]["#text"] - : output["gatewayId"]; + contents.GatewayId = output["gatewayId"]; } if (output["main"] !== undefined) { - contents.Main = - (output["main"]["#text"] !== undefined - ? output["main"]["#text"] - : output["main"]) == "true"; + contents.Main = output["main"] == "true"; } if (output["routeTableAssociationId"] !== undefined) { - contents.RouteTableAssociationId = - output["routeTableAssociationId"]["#text"] !== undefined - ? output["routeTableAssociationId"]["#text"] - : output["routeTableAssociationId"]; + contents.RouteTableAssociationId = output["routeTableAssociationId"]; } if (output["routeTableId"] !== undefined) { - contents.RouteTableId = - output["routeTableId"]["#text"] !== undefined - ? output["routeTableId"]["#text"] - : output["routeTableId"]; + contents.RouteTableId = output["routeTableId"]; } if (output["subnetId"] !== undefined) { - contents.SubnetId = - output["subnetId"]["#text"] !== undefined - ? output["subnetId"]["#text"] - : output["subnetId"]; + contents.SubnetId = output["subnetId"]; } return contents; }; @@ -69871,16 +66342,10 @@ const deserializeAws_ec2RouteTableAssociationState = ( StatusMessage: undefined }; if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["statusMessage"] !== undefined) { - contents.StatusMessage = - output["statusMessage"]["#text"] !== undefined - ? output["statusMessage"]["#text"] - : output["statusMessage"]; + contents.StatusMessage = output["statusMessage"]; } return contents; }; @@ -69903,10 +66368,7 @@ const deserializeAws_ec2RunInstancesMonitoringEnabled = ( Enabled: undefined }; if (output["enabled"] !== undefined) { - contents.Enabled = - (output["enabled"]["#text"] !== undefined - ? output["enabled"]["#text"] - : output["enabled"]) == "true"; + contents.Enabled = output["enabled"] == "true"; } return contents; }; @@ -69947,35 +66409,19 @@ const deserializeAws_ec2S3Storage = ( UploadPolicySignature: undefined }; if (output["AWSAccessKeyId"] !== undefined) { - contents.AWSAccessKeyId = - output["AWSAccessKeyId"]["#text"] !== undefined - ? output["AWSAccessKeyId"]["#text"] - : output["AWSAccessKeyId"]; + contents.AWSAccessKeyId = output["AWSAccessKeyId"]; } if (output["bucket"] !== undefined) { - contents.Bucket = - output["bucket"]["#text"] !== undefined - ? output["bucket"]["#text"] - : output["bucket"]; + contents.Bucket = output["bucket"]; } if (output["prefix"] !== undefined) { - contents.Prefix = - output["prefix"]["#text"] !== undefined - ? output["prefix"]["#text"] - : output["prefix"]; + contents.Prefix = output["prefix"]; } if (output["uploadPolicy"] !== undefined) { - contents.UploadPolicy = context.base64Decoder( - output["uploadPolicy"]["#text"] !== undefined - ? output["uploadPolicy"]["#text"] - : output["uploadPolicy"] - ); + contents.UploadPolicy = context.base64Decoder(output["uploadPolicy"]); } if (output["uploadPolicySignature"] !== undefined) { - contents.UploadPolicySignature = - output["uploadPolicySignature"]["#text"] !== undefined - ? output["uploadPolicySignature"]["#text"] - : output["uploadPolicySignature"]; + contents.UploadPolicySignature = output["uploadPolicySignature"]; } return contents; }; @@ -70003,47 +66449,28 @@ const deserializeAws_ec2ScheduledInstance = ( TotalScheduledInstanceHours: undefined }; if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["createDate"] !== undefined) { contents.CreateDate = new Date(output["createDate"]); } if (output["hourlyPrice"] !== undefined) { - contents.HourlyPrice = - output["hourlyPrice"]["#text"] !== undefined - ? output["hourlyPrice"]["#text"] - : output["hourlyPrice"]; + contents.HourlyPrice = output["hourlyPrice"]; } if (output["instanceCount"] !== undefined) { - contents.InstanceCount = parseInt( - output["instanceCount"]["#text"] !== undefined - ? output["instanceCount"]["#text"] - : output["instanceCount"] - ); + contents.InstanceCount = parseInt(output["instanceCount"]); } if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output["networkPlatform"] !== undefined) { - contents.NetworkPlatform = - output["networkPlatform"]["#text"] !== undefined - ? output["networkPlatform"]["#text"] - : output["networkPlatform"]; + contents.NetworkPlatform = output["networkPlatform"]; } if (output["nextSlotStartTime"] !== undefined) { contents.NextSlotStartTime = new Date(output["nextSlotStartTime"]); } if (output["platform"] !== undefined) { - contents.Platform = - output["platform"]["#text"] !== undefined - ? output["platform"]["#text"] - : output["platform"]; + contents.Platform = output["platform"]; } if (output["previousSlotEndTime"] !== undefined) { contents.PreviousSlotEndTime = new Date(output["previousSlotEndTime"]); @@ -70055,17 +66482,10 @@ const deserializeAws_ec2ScheduledInstance = ( ); } if (output["scheduledInstanceId"] !== undefined) { - contents.ScheduledInstanceId = - output["scheduledInstanceId"]["#text"] !== undefined - ? output["scheduledInstanceId"]["#text"] - : output["scheduledInstanceId"]; + contents.ScheduledInstanceId = output["scheduledInstanceId"]; } if (output["slotDurationInHours"] !== undefined) { - contents.SlotDurationInHours = parseInt( - output["slotDurationInHours"]["#text"] !== undefined - ? output["slotDurationInHours"]["#text"] - : output["slotDurationInHours"] - ); + contents.SlotDurationInHours = parseInt(output["slotDurationInHours"]); } if (output["termEndDate"] !== undefined) { contents.TermEndDate = new Date(output["termEndDate"]); @@ -70075,9 +66495,7 @@ const deserializeAws_ec2ScheduledInstance = ( } if (output["totalScheduledInstanceHours"] !== undefined) { contents.TotalScheduledInstanceHours = parseInt( - output["totalScheduledInstanceHours"]["#text"] !== undefined - ? output["totalScheduledInstanceHours"]["#text"] - : output["totalScheduledInstanceHours"] + output["totalScheduledInstanceHours"] ); } return contents; @@ -70104,64 +66522,36 @@ const deserializeAws_ec2ScheduledInstanceAvailability = ( TotalScheduledInstanceHours: undefined }; if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["availableInstanceCount"] !== undefined) { contents.AvailableInstanceCount = parseInt( - output["availableInstanceCount"]["#text"] !== undefined - ? output["availableInstanceCount"]["#text"] - : output["availableInstanceCount"] + output["availableInstanceCount"] ); } if (output["firstSlotStartTime"] !== undefined) { contents.FirstSlotStartTime = new Date(output["firstSlotStartTime"]); } if (output["hourlyPrice"] !== undefined) { - contents.HourlyPrice = - output["hourlyPrice"]["#text"] !== undefined - ? output["hourlyPrice"]["#text"] - : output["hourlyPrice"]; + contents.HourlyPrice = output["hourlyPrice"]; } if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output["maxTermDurationInDays"] !== undefined) { - contents.MaxTermDurationInDays = parseInt( - output["maxTermDurationInDays"]["#text"] !== undefined - ? output["maxTermDurationInDays"]["#text"] - : output["maxTermDurationInDays"] - ); + contents.MaxTermDurationInDays = parseInt(output["maxTermDurationInDays"]); } if (output["minTermDurationInDays"] !== undefined) { - contents.MinTermDurationInDays = parseInt( - output["minTermDurationInDays"]["#text"] !== undefined - ? output["minTermDurationInDays"]["#text"] - : output["minTermDurationInDays"] - ); + contents.MinTermDurationInDays = parseInt(output["minTermDurationInDays"]); } if (output["networkPlatform"] !== undefined) { - contents.NetworkPlatform = - output["networkPlatform"]["#text"] !== undefined - ? output["networkPlatform"]["#text"] - : output["networkPlatform"]; + contents.NetworkPlatform = output["networkPlatform"]; } if (output["platform"] !== undefined) { - contents.Platform = - output["platform"]["#text"] !== undefined - ? output["platform"]["#text"] - : output["platform"]; + contents.Platform = output["platform"]; } if (output["purchaseToken"] !== undefined) { - contents.PurchaseToken = - output["purchaseToken"]["#text"] !== undefined - ? output["purchaseToken"]["#text"] - : output["purchaseToken"]; + contents.PurchaseToken = output["purchaseToken"]; } if (output["recurrence"] !== undefined) { contents.Recurrence = deserializeAws_ec2ScheduledInstanceRecurrence( @@ -70170,17 +66560,11 @@ const deserializeAws_ec2ScheduledInstanceAvailability = ( ); } if (output["slotDurationInHours"] !== undefined) { - contents.SlotDurationInHours = parseInt( - output["slotDurationInHours"]["#text"] !== undefined - ? output["slotDurationInHours"]["#text"] - : output["slotDurationInHours"] - ); + contents.SlotDurationInHours = parseInt(output["slotDurationInHours"]); } if (output["totalScheduledInstanceHours"] !== undefined) { contents.TotalScheduledInstanceHours = parseInt( - output["totalScheduledInstanceHours"]["#text"] !== undefined - ? output["totalScheduledInstanceHours"]["#text"] - : output["totalScheduledInstanceHours"] + output["totalScheduledInstanceHours"] ); } return contents; @@ -70208,17 +66592,10 @@ const deserializeAws_ec2ScheduledInstanceRecurrence = ( OccurrenceUnit: undefined }; if (output["frequency"] !== undefined) { - contents.Frequency = - output["frequency"]["#text"] !== undefined - ? output["frequency"]["#text"] - : output["frequency"]; + contents.Frequency = output["frequency"]; } if (output["interval"] !== undefined) { - contents.Interval = parseInt( - output["interval"]["#text"] !== undefined - ? output["interval"]["#text"] - : output["interval"] - ); + contents.Interval = parseInt(output["interval"]); } if (output.occurrenceDaySet === "") { contents.OccurrenceDaySet = []; @@ -70234,15 +66611,10 @@ const deserializeAws_ec2ScheduledInstanceRecurrence = ( } if (output["occurrenceRelativeToEnd"] !== undefined) { contents.OccurrenceRelativeToEnd = - (output["occurrenceRelativeToEnd"]["#text"] !== undefined - ? output["occurrenceRelativeToEnd"]["#text"] - : output["occurrenceRelativeToEnd"]) == "true"; + output["occurrenceRelativeToEnd"] == "true"; } if (output["occurrenceUnit"] !== undefined) { - contents.OccurrenceUnit = - output["occurrenceUnit"]["#text"] !== undefined - ? output["occurrenceUnit"]["#text"] - : output["occurrenceUnit"]; + contents.OccurrenceUnit = output["occurrenceUnit"]; } return contents; }; @@ -70266,10 +66638,7 @@ const deserializeAws_ec2SearchLocalGatewayRoutesResult = ( Routes: undefined }; if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } if (output.routeSet === "") { contents.Routes = []; @@ -70308,10 +66677,7 @@ const deserializeAws_ec2SearchTransitGatewayMulticastGroupsResult = ( ); } if (output["nextToken"] !== undefined) { - contents.NextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.NextToken = output["nextToken"]; } return contents; }; @@ -70327,9 +66693,7 @@ const deserializeAws_ec2SearchTransitGatewayRoutesResult = ( }; if (output["additionalRoutesAvailable"] !== undefined) { contents.AdditionalRoutesAvailable = - (output["additionalRoutesAvailable"]["#text"] !== undefined - ? output["additionalRoutesAvailable"]["#text"] - : output["additionalRoutesAvailable"]) == "true"; + output["additionalRoutesAvailable"] == "true"; } if (output.routeSet === "") { contents.Routes = []; @@ -70362,22 +66726,13 @@ const deserializeAws_ec2SecurityGroup = ( VpcId: undefined }; if (output["groupDescription"] !== undefined) { - contents.Description = - output["groupDescription"]["#text"] !== undefined - ? output["groupDescription"]["#text"] - : output["groupDescription"]; + contents.Description = output["groupDescription"]; } if (output["groupId"] !== undefined) { - contents.GroupId = - output["groupId"]["#text"] !== undefined - ? output["groupId"]["#text"] - : output["groupId"]; + contents.GroupId = output["groupId"]; } if (output["groupName"] !== undefined) { - contents.GroupName = - output["groupName"]["#text"] !== undefined - ? output["groupName"]["#text"] - : output["groupName"]; + contents.GroupName = output["groupName"]; } if (output.ipPermissions === "") { contents.IpPermissions = []; @@ -70404,10 +66759,7 @@ const deserializeAws_ec2SecurityGroup = ( ); } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output.tagSet === "") { contents.Tags = []; @@ -70422,10 +66774,7 @@ const deserializeAws_ec2SecurityGroup = ( ); } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -70434,9 +66783,7 @@ const deserializeAws_ec2SecurityGroupIdStringList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2SecurityGroupIdentifier = ( @@ -70449,16 +66796,10 @@ const deserializeAws_ec2SecurityGroupIdentifier = ( GroupName: undefined }; if (output["groupId"] !== undefined) { - contents.GroupId = - output["groupId"]["#text"] !== undefined - ? output["groupId"]["#text"] - : output["groupId"]; + contents.GroupId = output["groupId"]; } if (output["groupName"] !== undefined) { - contents.GroupName = - output["groupName"]["#text"] !== undefined - ? output["groupName"]["#text"] - : output["groupName"]; + contents.GroupName = output["groupName"]; } return contents; }; @@ -70483,22 +66824,13 @@ const deserializeAws_ec2SecurityGroupReference = ( VpcPeeringConnectionId: undefined }; if (output["groupId"] !== undefined) { - contents.GroupId = - output["groupId"]["#text"] !== undefined - ? output["groupId"]["#text"] - : output["groupId"]; + contents.GroupId = output["groupId"]; } if (output["referencingVpcId"] !== undefined) { - contents.ReferencingVpcId = - output["referencingVpcId"]["#text"] !== undefined - ? output["referencingVpcId"]["#text"] - : output["referencingVpcId"]; + contents.ReferencingVpcId = output["referencingVpcId"]; } if (output["vpcPeeringConnectionId"] !== undefined) { - contents.VpcPeeringConnectionId = - output["vpcPeeringConnectionId"]["#text"] !== undefined - ? output["vpcPeeringConnectionId"]["#text"] - : output["vpcPeeringConnectionId"]; + contents.VpcPeeringConnectionId = output["vpcPeeringConnectionId"]; } return contents; }; @@ -70532,10 +66864,7 @@ const deserializeAws_ec2ServiceConfiguration = ( Tags: undefined }; if (output["acceptanceRequired"] !== undefined) { - contents.AcceptanceRequired = - (output["acceptanceRequired"]["#text"] !== undefined - ? output["acceptanceRequired"]["#text"] - : output["acceptanceRequired"]) == "true"; + contents.AcceptanceRequired = output["acceptanceRequired"] == "true"; } if (output.availabilityZoneSet === "") { contents.AvailabilityZones = []; @@ -70562,10 +66891,7 @@ const deserializeAws_ec2ServiceConfiguration = ( ); } if (output["managesVpcEndpoints"] !== undefined) { - contents.ManagesVpcEndpoints = - (output["managesVpcEndpoints"]["#text"] !== undefined - ? output["managesVpcEndpoints"]["#text"] - : output["managesVpcEndpoints"]) == "true"; + contents.ManagesVpcEndpoints = output["managesVpcEndpoints"] == "true"; } if (output.networkLoadBalancerArnSet === "") { contents.NetworkLoadBalancerArns = []; @@ -70580,10 +66906,7 @@ const deserializeAws_ec2ServiceConfiguration = ( ); } if (output["privateDnsName"] !== undefined) { - contents.PrivateDnsName = - output["privateDnsName"]["#text"] !== undefined - ? output["privateDnsName"]["#text"] - : output["privateDnsName"]; + contents.PrivateDnsName = output["privateDnsName"]; } if (output["privateDnsNameConfiguration"] !== undefined) { contents.PrivateDnsNameConfiguration = deserializeAws_ec2PrivateDnsNameConfiguration( @@ -70592,22 +66915,13 @@ const deserializeAws_ec2ServiceConfiguration = ( ); } if (output["serviceId"] !== undefined) { - contents.ServiceId = - output["serviceId"]["#text"] !== undefined - ? output["serviceId"]["#text"] - : output["serviceId"]; + contents.ServiceId = output["serviceId"]; } if (output["serviceName"] !== undefined) { - contents.ServiceName = - output["serviceName"]["#text"] !== undefined - ? output["serviceName"]["#text"] - : output["serviceName"]; + contents.ServiceName = output["serviceName"]; } if (output["serviceState"] !== undefined) { - contents.ServiceState = - output["serviceState"]["#text"] !== undefined - ? output["serviceState"]["#text"] - : output["serviceState"]; + contents.ServiceState = output["serviceState"]; } if (output.serviceType === "") { contents.ServiceType = []; @@ -70665,10 +66979,7 @@ const deserializeAws_ec2ServiceDetail = ( VpcEndpointPolicySupported: undefined }; if (output["acceptanceRequired"] !== undefined) { - contents.AcceptanceRequired = - (output["acceptanceRequired"]["#text"] !== undefined - ? output["acceptanceRequired"]["#text"] - : output["acceptanceRequired"]) == "true"; + contents.AcceptanceRequired = output["acceptanceRequired"] == "true"; } if (output.availabilityZoneSet === "") { contents.AvailabilityZones = []; @@ -70695,40 +67006,23 @@ const deserializeAws_ec2ServiceDetail = ( ); } if (output["managesVpcEndpoints"] !== undefined) { - contents.ManagesVpcEndpoints = - (output["managesVpcEndpoints"]["#text"] !== undefined - ? output["managesVpcEndpoints"]["#text"] - : output["managesVpcEndpoints"]) == "true"; + contents.ManagesVpcEndpoints = output["managesVpcEndpoints"] == "true"; } if (output["owner"] !== undefined) { - contents.Owner = - output["owner"]["#text"] !== undefined - ? output["owner"]["#text"] - : output["owner"]; + contents.Owner = output["owner"]; } if (output["privateDnsName"] !== undefined) { - contents.PrivateDnsName = - output["privateDnsName"]["#text"] !== undefined - ? output["privateDnsName"]["#text"] - : output["privateDnsName"]; + contents.PrivateDnsName = output["privateDnsName"]; } if (output["privateDnsNameVerificationState"] !== undefined) { contents.PrivateDnsNameVerificationState = - output["privateDnsNameVerificationState"]["#text"] !== undefined - ? output["privateDnsNameVerificationState"]["#text"] - : output["privateDnsNameVerificationState"]; + output["privateDnsNameVerificationState"]; } if (output["serviceId"] !== undefined) { - contents.ServiceId = - output["serviceId"]["#text"] !== undefined - ? output["serviceId"]["#text"] - : output["serviceId"]; + contents.ServiceId = output["serviceId"]; } if (output["serviceName"] !== undefined) { - contents.ServiceName = - output["serviceName"]["#text"] !== undefined - ? output["serviceName"]["#text"] - : output["serviceName"]; + contents.ServiceName = output["serviceName"]; } if (output.serviceType === "") { contents.ServiceType = []; @@ -70756,9 +67050,7 @@ const deserializeAws_ec2ServiceDetail = ( } if (output["vpcEndpointPolicySupported"] !== undefined) { contents.VpcEndpointPolicySupported = - (output["vpcEndpointPolicySupported"]["#text"] !== undefined - ? output["vpcEndpointPolicySupported"]["#text"] - : output["vpcEndpointPolicySupported"]) == "true"; + output["vpcEndpointPolicySupported"] == "true"; } return contents; }; @@ -70781,10 +67073,7 @@ const deserializeAws_ec2ServiceTypeDetail = ( ServiceType: undefined }; if (output["serviceType"] !== undefined) { - contents.ServiceType = - output["serviceType"]["#text"] !== undefined - ? output["serviceType"]["#text"] - : output["serviceType"]; + contents.ServiceType = output["serviceType"]; } return contents; }; @@ -70820,67 +67109,37 @@ const deserializeAws_ec2Snapshot = ( VolumeSize: undefined }; if (output["dataEncryptionKeyId"] !== undefined) { - contents.DataEncryptionKeyId = - output["dataEncryptionKeyId"]["#text"] !== undefined - ? output["dataEncryptionKeyId"]["#text"] - : output["dataEncryptionKeyId"]; + contents.DataEncryptionKeyId = output["dataEncryptionKeyId"]; } if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["encrypted"] !== undefined) { - contents.Encrypted = - (output["encrypted"]["#text"] !== undefined - ? output["encrypted"]["#text"] - : output["encrypted"]) == "true"; + contents.Encrypted = output["encrypted"] == "true"; } if (output["kmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["kmsKeyId"]["#text"] !== undefined - ? output["kmsKeyId"]["#text"] - : output["kmsKeyId"]; + contents.KmsKeyId = output["kmsKeyId"]; } if (output["ownerAlias"] !== undefined) { - contents.OwnerAlias = - output["ownerAlias"]["#text"] !== undefined - ? output["ownerAlias"]["#text"] - : output["ownerAlias"]; + contents.OwnerAlias = output["ownerAlias"]; } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output["progress"] !== undefined) { - contents.Progress = - output["progress"]["#text"] !== undefined - ? output["progress"]["#text"] - : output["progress"]; + contents.Progress = output["progress"]; } if (output["snapshotId"] !== undefined) { - contents.SnapshotId = - output["snapshotId"]["#text"] !== undefined - ? output["snapshotId"]["#text"] - : output["snapshotId"]; + contents.SnapshotId = output["snapshotId"]; } if (output["startTime"] !== undefined) { contents.StartTime = new Date(output["startTime"]); } if (output["status"] !== undefined) { - contents.State = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.State = output["status"]; } if (output["statusMessage"] !== undefined) { - contents.StateMessage = - output["statusMessage"]["#text"] !== undefined - ? output["statusMessage"]["#text"] - : output["statusMessage"]; + contents.StateMessage = output["statusMessage"]; } if (output.tagSet === "") { contents.Tags = []; @@ -70895,17 +67154,10 @@ const deserializeAws_ec2Snapshot = ( ); } if (output["volumeId"] !== undefined) { - contents.VolumeId = - output["volumeId"]["#text"] !== undefined - ? output["volumeId"]["#text"] - : output["volumeId"]; + contents.VolumeId = output["volumeId"]; } if (output["volumeSize"] !== undefined) { - contents.VolumeSize = parseInt( - output["volumeSize"]["#text"] !== undefined - ? output["volumeSize"]["#text"] - : output["volumeSize"] - ); + contents.VolumeSize = parseInt(output["volumeSize"]); } return contents; }; @@ -70928,59 +67180,31 @@ const deserializeAws_ec2SnapshotDetail = ( UserBucket: undefined }; if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["deviceName"] !== undefined) { - contents.DeviceName = - output["deviceName"]["#text"] !== undefined - ? output["deviceName"]["#text"] - : output["deviceName"]; + contents.DeviceName = output["deviceName"]; } if (output["diskImageSize"] !== undefined) { - contents.DiskImageSize = parseFloat( - output["diskImageSize"]["#text"] !== undefined - ? output["diskImageSize"]["#text"] - : output["diskImageSize"] - ); + contents.DiskImageSize = parseFloat(output["diskImageSize"]); } if (output["format"] !== undefined) { - contents.Format = - output["format"]["#text"] !== undefined - ? output["format"]["#text"] - : output["format"]; + contents.Format = output["format"]; } if (output["progress"] !== undefined) { - contents.Progress = - output["progress"]["#text"] !== undefined - ? output["progress"]["#text"] - : output["progress"]; + contents.Progress = output["progress"]; } if (output["snapshotId"] !== undefined) { - contents.SnapshotId = - output["snapshotId"]["#text"] !== undefined - ? output["snapshotId"]["#text"] - : output["snapshotId"]; + contents.SnapshotId = output["snapshotId"]; } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } if (output["statusMessage"] !== undefined) { - contents.StatusMessage = - output["statusMessage"]["#text"] !== undefined - ? output["statusMessage"]["#text"] - : output["statusMessage"]; + contents.StatusMessage = output["statusMessage"]; } if (output["url"] !== undefined) { - contents.Url = - output["url"]["#text"] !== undefined - ? output["url"]["#text"] - : output["url"]; + contents.Url = output["url"]; } if (output["userBucket"] !== undefined) { contents.UserBucket = deserializeAws_ec2UserBucketDetails( @@ -71018,43 +67242,25 @@ const deserializeAws_ec2SnapshotInfo = ( VolumeSize: undefined }; if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["encrypted"] !== undefined) { - contents.Encrypted = - (output["encrypted"]["#text"] !== undefined - ? output["encrypted"]["#text"] - : output["encrypted"]) == "true"; + contents.Encrypted = output["encrypted"] == "true"; } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output["progress"] !== undefined) { - contents.Progress = - output["progress"]["#text"] !== undefined - ? output["progress"]["#text"] - : output["progress"]; + contents.Progress = output["progress"]; } if (output["snapshotId"] !== undefined) { - contents.SnapshotId = - output["snapshotId"]["#text"] !== undefined - ? output["snapshotId"]["#text"] - : output["snapshotId"]; + contents.SnapshotId = output["snapshotId"]; } if (output["startTime"] !== undefined) { contents.StartTime = new Date(output["startTime"]); } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output.tagSet === "") { contents.Tags = []; @@ -71069,17 +67275,10 @@ const deserializeAws_ec2SnapshotInfo = ( ); } if (output["volumeId"] !== undefined) { - contents.VolumeId = - output["volumeId"]["#text"] !== undefined - ? output["volumeId"]["#text"] - : output["volumeId"]; + contents.VolumeId = output["volumeId"]; } if (output["volumeSize"] !== undefined) { - contents.VolumeSize = parseInt( - output["volumeSize"]["#text"] !== undefined - ? output["volumeSize"]["#text"] - : output["volumeSize"] - ); + contents.VolumeSize = parseInt(output["volumeSize"]); } return contents; }; @@ -71121,65 +67320,34 @@ const deserializeAws_ec2SnapshotTaskDetail = ( UserBucket: undefined }; if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["diskImageSize"] !== undefined) { - contents.DiskImageSize = parseFloat( - output["diskImageSize"]["#text"] !== undefined - ? output["diskImageSize"]["#text"] - : output["diskImageSize"] - ); + contents.DiskImageSize = parseFloat(output["diskImageSize"]); } if (output["encrypted"] !== undefined) { - contents.Encrypted = - (output["encrypted"]["#text"] !== undefined - ? output["encrypted"]["#text"] - : output["encrypted"]) == "true"; + contents.Encrypted = output["encrypted"] == "true"; } if (output["format"] !== undefined) { - contents.Format = - output["format"]["#text"] !== undefined - ? output["format"]["#text"] - : output["format"]; + contents.Format = output["format"]; } if (output["kmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["kmsKeyId"]["#text"] !== undefined - ? output["kmsKeyId"]["#text"] - : output["kmsKeyId"]; + contents.KmsKeyId = output["kmsKeyId"]; } if (output["progress"] !== undefined) { - contents.Progress = - output["progress"]["#text"] !== undefined - ? output["progress"]["#text"] - : output["progress"]; + contents.Progress = output["progress"]; } if (output["snapshotId"] !== undefined) { - contents.SnapshotId = - output["snapshotId"]["#text"] !== undefined - ? output["snapshotId"]["#text"] - : output["snapshotId"]; + contents.SnapshotId = output["snapshotId"]; } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } if (output["statusMessage"] !== undefined) { - contents.StatusMessage = - output["statusMessage"]["#text"] !== undefined - ? output["statusMessage"]["#text"] - : output["statusMessage"]; + contents.StatusMessage = output["statusMessage"]; } if (output["url"] !== undefined) { - contents.Url = - output["url"]["#text"] !== undefined - ? output["url"]["#text"] - : output["url"]; + contents.Url = output["url"]; } if (output["userBucket"] !== undefined) { contents.UserBucket = deserializeAws_ec2UserBucketDetails( @@ -71203,10 +67371,7 @@ const deserializeAws_ec2SpotDatafeedSubscription = ( State: undefined }; if (output["bucket"] !== undefined) { - contents.Bucket = - output["bucket"]["#text"] !== undefined - ? output["bucket"]["#text"] - : output["bucket"]; + contents.Bucket = output["bucket"]; } if (output["fault"] !== undefined) { contents.Fault = deserializeAws_ec2SpotInstanceStateFault( @@ -71215,22 +67380,13 @@ const deserializeAws_ec2SpotDatafeedSubscription = ( ); } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output["prefix"] !== undefined) { - contents.Prefix = - output["prefix"]["#text"] !== undefined - ? output["prefix"]["#text"] - : output["prefix"]; + contents.Prefix = output["prefix"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } return contents; }; @@ -71261,10 +67417,7 @@ const deserializeAws_ec2SpotFleetLaunchSpecification = ( WeightedCapacity: undefined }; if (output["addressingType"] !== undefined) { - contents.AddressingType = - output["addressingType"]["#text"] !== undefined - ? output["addressingType"]["#text"] - : output["addressingType"]; + contents.AddressingType = output["addressingType"]; } if (output.blockDeviceMapping === "") { contents.BlockDeviceMappings = []; @@ -71279,10 +67432,7 @@ const deserializeAws_ec2SpotFleetLaunchSpecification = ( ); } if (output["ebsOptimized"] !== undefined) { - contents.EbsOptimized = - (output["ebsOptimized"]["#text"] !== undefined - ? output["ebsOptimized"]["#text"] - : output["ebsOptimized"]) == "true"; + contents.EbsOptimized = output["ebsOptimized"] == "true"; } if (output["iamInstanceProfile"] !== undefined) { contents.IamInstanceProfile = deserializeAws_ec2IamInstanceProfileSpecification( @@ -71291,28 +67441,16 @@ const deserializeAws_ec2SpotFleetLaunchSpecification = ( ); } if (output["imageId"] !== undefined) { - contents.ImageId = - output["imageId"]["#text"] !== undefined - ? output["imageId"]["#text"] - : output["imageId"]; + contents.ImageId = output["imageId"]; } if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output["kernelId"] !== undefined) { - contents.KernelId = - output["kernelId"]["#text"] !== undefined - ? output["kernelId"]["#text"] - : output["kernelId"]; + contents.KernelId = output["kernelId"]; } if (output["keyName"] !== undefined) { - contents.KeyName = - output["keyName"]["#text"] !== undefined - ? output["keyName"]["#text"] - : output["keyName"]; + contents.KeyName = output["keyName"]; } if (output["monitoring"] !== undefined) { contents.Monitoring = deserializeAws_ec2SpotFleetMonitoring( @@ -71339,10 +67477,7 @@ const deserializeAws_ec2SpotFleetLaunchSpecification = ( ); } if (output["ramdiskId"] !== undefined) { - contents.RamdiskId = - output["ramdiskId"]["#text"] !== undefined - ? output["ramdiskId"]["#text"] - : output["ramdiskId"]; + contents.RamdiskId = output["ramdiskId"]; } if (output.groupSet === "") { contents.SecurityGroups = []; @@ -71357,16 +67492,10 @@ const deserializeAws_ec2SpotFleetLaunchSpecification = ( ); } if (output["spotPrice"] !== undefined) { - contents.SpotPrice = - output["spotPrice"]["#text"] !== undefined - ? output["spotPrice"]["#text"] - : output["spotPrice"]; + contents.SpotPrice = output["spotPrice"]; } if (output["subnetId"] !== undefined) { - contents.SubnetId = - output["subnetId"]["#text"] !== undefined - ? output["subnetId"]["#text"] - : output["subnetId"]; + contents.SubnetId = output["subnetId"]; } if (output.tagSpecificationSet === "") { contents.TagSpecifications = []; @@ -71381,17 +67510,10 @@ const deserializeAws_ec2SpotFleetLaunchSpecification = ( ); } if (output["userData"] !== undefined) { - contents.UserData = - output["userData"]["#text"] !== undefined - ? output["userData"]["#text"] - : output["userData"]; + contents.UserData = output["userData"]; } if (output["weightedCapacity"] !== undefined) { - contents.WeightedCapacity = parseFloat( - output["weightedCapacity"]["#text"] !== undefined - ? output["weightedCapacity"]["#text"] - : output["weightedCapacity"] - ); + contents.WeightedCapacity = parseFloat(output["weightedCapacity"]); } return contents; }; @@ -71405,10 +67527,7 @@ const deserializeAws_ec2SpotFleetMonitoring = ( Enabled: undefined }; if (output["enabled"] !== undefined) { - contents.Enabled = - (output["enabled"]["#text"] !== undefined - ? output["enabled"]["#text"] - : output["enabled"]) == "true"; + contents.Enabled = output["enabled"] == "true"; } return contents; }; @@ -71426,10 +67545,7 @@ const deserializeAws_ec2SpotFleetRequestConfig = ( SpotFleetRequestState: undefined }; if (output["activityStatus"] !== undefined) { - contents.ActivityStatus = - output["activityStatus"]["#text"] !== undefined - ? output["activityStatus"]["#text"] - : output["activityStatus"]; + contents.ActivityStatus = output["activityStatus"]; } if (output["createTime"] !== undefined) { contents.CreateTime = new Date(output["createTime"]); @@ -71441,16 +67557,10 @@ const deserializeAws_ec2SpotFleetRequestConfig = ( ); } if (output["spotFleetRequestId"] !== undefined) { - contents.SpotFleetRequestId = - output["spotFleetRequestId"]["#text"] !== undefined - ? output["spotFleetRequestId"]["#text"] - : output["spotFleetRequestId"]; + contents.SpotFleetRequestId = output["spotFleetRequestId"]; } if (output["spotFleetRequestState"] !== undefined) { - contents.SpotFleetRequestState = - output["spotFleetRequestState"]["#text"] !== undefined - ? output["spotFleetRequestState"]["#text"] - : output["spotFleetRequestState"]; + contents.SpotFleetRequestState = output["spotFleetRequestState"]; } return contents; }; @@ -71485,47 +67595,28 @@ const deserializeAws_ec2SpotFleetRequestConfigData = ( ValidUntil: undefined }; if (output["allocationStrategy"] !== undefined) { - contents.AllocationStrategy = - output["allocationStrategy"]["#text"] !== undefined - ? output["allocationStrategy"]["#text"] - : output["allocationStrategy"]; + contents.AllocationStrategy = output["allocationStrategy"]; } if (output["clientToken"] !== undefined) { - contents.ClientToken = - output["clientToken"]["#text"] !== undefined - ? output["clientToken"]["#text"] - : output["clientToken"]; + contents.ClientToken = output["clientToken"]; } if (output["excessCapacityTerminationPolicy"] !== undefined) { contents.ExcessCapacityTerminationPolicy = - output["excessCapacityTerminationPolicy"]["#text"] !== undefined - ? output["excessCapacityTerminationPolicy"]["#text"] - : output["excessCapacityTerminationPolicy"]; + output["excessCapacityTerminationPolicy"]; } if (output["fulfilledCapacity"] !== undefined) { - contents.FulfilledCapacity = parseFloat( - output["fulfilledCapacity"]["#text"] !== undefined - ? output["fulfilledCapacity"]["#text"] - : output["fulfilledCapacity"] - ); + contents.FulfilledCapacity = parseFloat(output["fulfilledCapacity"]); } if (output["iamFleetRole"] !== undefined) { - contents.IamFleetRole = - output["iamFleetRole"]["#text"] !== undefined - ? output["iamFleetRole"]["#text"] - : output["iamFleetRole"]; + contents.IamFleetRole = output["iamFleetRole"]; } if (output["instanceInterruptionBehavior"] !== undefined) { contents.InstanceInterruptionBehavior = - output["instanceInterruptionBehavior"]["#text"] !== undefined - ? output["instanceInterruptionBehavior"]["#text"] - : output["instanceInterruptionBehavior"]; + output["instanceInterruptionBehavior"]; } if (output["instancePoolsToUseCount"] !== undefined) { contents.InstancePoolsToUseCount = parseInt( - output["instancePoolsToUseCount"]["#text"] !== undefined - ? output["instancePoolsToUseCount"]["#text"] - : output["instancePoolsToUseCount"] + output["instancePoolsToUseCount"] ); } if (output.launchSpecifications === "") { @@ -71559,67 +67650,40 @@ const deserializeAws_ec2SpotFleetRequestConfigData = ( ); } if (output["onDemandAllocationStrategy"] !== undefined) { - contents.OnDemandAllocationStrategy = - output["onDemandAllocationStrategy"]["#text"] !== undefined - ? output["onDemandAllocationStrategy"]["#text"] - : output["onDemandAllocationStrategy"]; + contents.OnDemandAllocationStrategy = output["onDemandAllocationStrategy"]; } if (output["onDemandFulfilledCapacity"] !== undefined) { contents.OnDemandFulfilledCapacity = parseFloat( - output["onDemandFulfilledCapacity"]["#text"] !== undefined - ? output["onDemandFulfilledCapacity"]["#text"] - : output["onDemandFulfilledCapacity"] + output["onDemandFulfilledCapacity"] ); } if (output["onDemandMaxTotalPrice"] !== undefined) { - contents.OnDemandMaxTotalPrice = - output["onDemandMaxTotalPrice"]["#text"] !== undefined - ? output["onDemandMaxTotalPrice"]["#text"] - : output["onDemandMaxTotalPrice"]; + contents.OnDemandMaxTotalPrice = output["onDemandMaxTotalPrice"]; } if (output["onDemandTargetCapacity"] !== undefined) { contents.OnDemandTargetCapacity = parseInt( - output["onDemandTargetCapacity"]["#text"] !== undefined - ? output["onDemandTargetCapacity"]["#text"] - : output["onDemandTargetCapacity"] + output["onDemandTargetCapacity"] ); } if (output["replaceUnhealthyInstances"] !== undefined) { contents.ReplaceUnhealthyInstances = - (output["replaceUnhealthyInstances"]["#text"] !== undefined - ? output["replaceUnhealthyInstances"]["#text"] - : output["replaceUnhealthyInstances"]) == "true"; + output["replaceUnhealthyInstances"] == "true"; } if (output["spotMaxTotalPrice"] !== undefined) { - contents.SpotMaxTotalPrice = - output["spotMaxTotalPrice"]["#text"] !== undefined - ? output["spotMaxTotalPrice"]["#text"] - : output["spotMaxTotalPrice"]; + contents.SpotMaxTotalPrice = output["spotMaxTotalPrice"]; } if (output["spotPrice"] !== undefined) { - contents.SpotPrice = - output["spotPrice"]["#text"] !== undefined - ? output["spotPrice"]["#text"] - : output["spotPrice"]; + contents.SpotPrice = output["spotPrice"]; } if (output["targetCapacity"] !== undefined) { - contents.TargetCapacity = parseInt( - output["targetCapacity"]["#text"] !== undefined - ? output["targetCapacity"]["#text"] - : output["targetCapacity"] - ); + contents.TargetCapacity = parseInt(output["targetCapacity"]); } if (output["terminateInstancesWithExpiration"] !== undefined) { contents.TerminateInstancesWithExpiration = - (output["terminateInstancesWithExpiration"]["#text"] !== undefined - ? output["terminateInstancesWithExpiration"]["#text"] - : output["terminateInstancesWithExpiration"]) == "true"; + output["terminateInstancesWithExpiration"] == "true"; } if (output["type"] !== undefined) { - contents.Type = - output["type"]["#text"] !== undefined - ? output["type"]["#text"] - : output["type"]; + contents.Type = output["type"]; } if (output["validFrom"] !== undefined) { contents.ValidFrom = new Date(output["validFrom"]); @@ -71649,10 +67713,7 @@ const deserializeAws_ec2SpotFleetTagSpecification = ( Tags: undefined }; if (output["resourceType"] !== undefined) { - contents.ResourceType = - output["resourceType"]["#text"] !== undefined - ? output["resourceType"]["#text"] - : output["resourceType"]; + contents.ResourceType = output["resourceType"]; } if (output.tag === "") { contents.Tags = []; @@ -71702,23 +67763,13 @@ const deserializeAws_ec2SpotInstanceRequest = ( ValidUntil: undefined }; if (output["actualBlockHourlyPrice"] !== undefined) { - contents.ActualBlockHourlyPrice = - output["actualBlockHourlyPrice"]["#text"] !== undefined - ? output["actualBlockHourlyPrice"]["#text"] - : output["actualBlockHourlyPrice"]; + contents.ActualBlockHourlyPrice = output["actualBlockHourlyPrice"]; } if (output["availabilityZoneGroup"] !== undefined) { - contents.AvailabilityZoneGroup = - output["availabilityZoneGroup"]["#text"] !== undefined - ? output["availabilityZoneGroup"]["#text"] - : output["availabilityZoneGroup"]; + contents.AvailabilityZoneGroup = output["availabilityZoneGroup"]; } if (output["blockDurationMinutes"] !== undefined) { - contents.BlockDurationMinutes = parseInt( - output["blockDurationMinutes"]["#text"] !== undefined - ? output["blockDurationMinutes"]["#text"] - : output["blockDurationMinutes"] - ); + contents.BlockDurationMinutes = parseInt(output["blockDurationMinutes"]); } if (output["createTime"] !== undefined) { contents.CreateTime = new Date(output["createTime"]); @@ -71730,22 +67781,14 @@ const deserializeAws_ec2SpotInstanceRequest = ( ); } if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } if (output["instanceInterruptionBehavior"] !== undefined) { contents.InstanceInterruptionBehavior = - output["instanceInterruptionBehavior"]["#text"] !== undefined - ? output["instanceInterruptionBehavior"]["#text"] - : output["instanceInterruptionBehavior"]; + output["instanceInterruptionBehavior"]; } if (output["launchGroup"] !== undefined) { - contents.LaunchGroup = - output["launchGroup"]["#text"] !== undefined - ? output["launchGroup"]["#text"] - : output["launchGroup"]; + contents.LaunchGroup = output["launchGroup"]; } if (output["launchSpecification"] !== undefined) { contents.LaunchSpecification = deserializeAws_ec2LaunchSpecification( @@ -71754,34 +67797,19 @@ const deserializeAws_ec2SpotInstanceRequest = ( ); } if (output["launchedAvailabilityZone"] !== undefined) { - contents.LaunchedAvailabilityZone = - output["launchedAvailabilityZone"]["#text"] !== undefined - ? output["launchedAvailabilityZone"]["#text"] - : output["launchedAvailabilityZone"]; + contents.LaunchedAvailabilityZone = output["launchedAvailabilityZone"]; } if (output["productDescription"] !== undefined) { - contents.ProductDescription = - output["productDescription"]["#text"] !== undefined - ? output["productDescription"]["#text"] - : output["productDescription"]; + contents.ProductDescription = output["productDescription"]; } if (output["spotInstanceRequestId"] !== undefined) { - contents.SpotInstanceRequestId = - output["spotInstanceRequestId"]["#text"] !== undefined - ? output["spotInstanceRequestId"]["#text"] - : output["spotInstanceRequestId"]; + contents.SpotInstanceRequestId = output["spotInstanceRequestId"]; } if (output["spotPrice"] !== undefined) { - contents.SpotPrice = - output["spotPrice"]["#text"] !== undefined - ? output["spotPrice"]["#text"] - : output["spotPrice"]; + contents.SpotPrice = output["spotPrice"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["status"] !== undefined) { contents.Status = deserializeAws_ec2SpotInstanceStatus( @@ -71802,10 +67830,7 @@ const deserializeAws_ec2SpotInstanceRequest = ( ); } if (output["type"] !== undefined) { - contents.Type = - output["type"]["#text"] !== undefined - ? output["type"]["#text"] - : output["type"]; + contents.Type = output["type"]; } if (output["validFrom"] !== undefined) { contents.ValidFrom = new Date(output["validFrom"]); @@ -71835,16 +67860,10 @@ const deserializeAws_ec2SpotInstanceStateFault = ( Message: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -71860,16 +67879,10 @@ const deserializeAws_ec2SpotInstanceStatus = ( UpdateTime: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } if (output["updateTime"] !== undefined) { contents.UpdateTime = new Date(output["updateTime"]); @@ -71892,48 +67905,29 @@ const deserializeAws_ec2SpotOptions = ( SingleInstanceType: undefined }; if (output["allocationStrategy"] !== undefined) { - contents.AllocationStrategy = - output["allocationStrategy"]["#text"] !== undefined - ? output["allocationStrategy"]["#text"] - : output["allocationStrategy"]; + contents.AllocationStrategy = output["allocationStrategy"]; } if (output["instanceInterruptionBehavior"] !== undefined) { contents.InstanceInterruptionBehavior = - output["instanceInterruptionBehavior"]["#text"] !== undefined - ? output["instanceInterruptionBehavior"]["#text"] - : output["instanceInterruptionBehavior"]; + output["instanceInterruptionBehavior"]; } if (output["instancePoolsToUseCount"] !== undefined) { contents.InstancePoolsToUseCount = parseInt( - output["instancePoolsToUseCount"]["#text"] !== undefined - ? output["instancePoolsToUseCount"]["#text"] - : output["instancePoolsToUseCount"] + output["instancePoolsToUseCount"] ); } if (output["maxTotalPrice"] !== undefined) { - contents.MaxTotalPrice = - output["maxTotalPrice"]["#text"] !== undefined - ? output["maxTotalPrice"]["#text"] - : output["maxTotalPrice"]; + contents.MaxTotalPrice = output["maxTotalPrice"]; } if (output["minTargetCapacity"] !== undefined) { - contents.MinTargetCapacity = parseInt( - output["minTargetCapacity"]["#text"] !== undefined - ? output["minTargetCapacity"]["#text"] - : output["minTargetCapacity"] - ); + contents.MinTargetCapacity = parseInt(output["minTargetCapacity"]); } if (output["singleAvailabilityZone"] !== undefined) { contents.SingleAvailabilityZone = - (output["singleAvailabilityZone"]["#text"] !== undefined - ? output["singleAvailabilityZone"]["#text"] - : output["singleAvailabilityZone"]) == "true"; + output["singleAvailabilityZone"] == "true"; } if (output["singleInstanceType"] !== undefined) { - contents.SingleInstanceType = - (output["singleInstanceType"]["#text"] !== undefined - ? output["singleInstanceType"]["#text"] - : output["singleInstanceType"]) == "true"; + contents.SingleInstanceType = output["singleInstanceType"] == "true"; } return contents; }; @@ -71949,22 +67943,13 @@ const deserializeAws_ec2SpotPlacement = ( Tenancy: undefined }; if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["groupName"] !== undefined) { - contents.GroupName = - output["groupName"]["#text"] !== undefined - ? output["groupName"]["#text"] - : output["groupName"]; + contents.GroupName = output["groupName"]; } if (output["tenancy"] !== undefined) { - contents.Tenancy = - output["tenancy"]["#text"] !== undefined - ? output["tenancy"]["#text"] - : output["tenancy"]; + contents.Tenancy = output["tenancy"]; } return contents; }; @@ -71982,28 +67967,16 @@ const deserializeAws_ec2SpotPrice = ( Timestamp: undefined }; if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["instanceType"] !== undefined) { - contents.InstanceType = - output["instanceType"]["#text"] !== undefined - ? output["instanceType"]["#text"] - : output["instanceType"]; + contents.InstanceType = output["instanceType"]; } if (output["productDescription"] !== undefined) { - contents.ProductDescription = - output["productDescription"]["#text"] !== undefined - ? output["productDescription"]["#text"] - : output["productDescription"]; + contents.ProductDescription = output["productDescription"]; } if (output["spotPrice"] !== undefined) { - contents.SpotPrice = - output["spotPrice"]["#text"] !== undefined - ? output["spotPrice"]["#text"] - : output["spotPrice"]; + contents.SpotPrice = output["spotPrice"]; } if (output["timestamp"] !== undefined) { contents.Timestamp = new Date(output["timestamp"]); @@ -72034,17 +68007,10 @@ const deserializeAws_ec2StaleIpPermission = ( UserIdGroupPairs: undefined }; if (output["fromPort"] !== undefined) { - contents.FromPort = parseInt( - output["fromPort"]["#text"] !== undefined - ? output["fromPort"]["#text"] - : output["fromPort"] - ); + contents.FromPort = parseInt(output["fromPort"]); } if (output["ipProtocol"] !== undefined) { - contents.IpProtocol = - output["ipProtocol"]["#text"] !== undefined - ? output["ipProtocol"]["#text"] - : output["ipProtocol"]; + contents.IpProtocol = output["ipProtocol"]; } if (output.ipRanges === "") { contents.IpRanges = []; @@ -72071,11 +68037,7 @@ const deserializeAws_ec2StaleIpPermission = ( ); } if (output["toPort"] !== undefined) { - contents.ToPort = parseInt( - output["toPort"]["#text"] !== undefined - ? output["toPort"]["#text"] - : output["toPort"] - ); + contents.ToPort = parseInt(output["toPort"]); } if (output.groups === "") { contents.UserIdGroupPairs = []; @@ -72115,22 +68077,13 @@ const deserializeAws_ec2StaleSecurityGroup = ( VpcId: undefined }; if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["groupId"] !== undefined) { - contents.GroupId = - output["groupId"]["#text"] !== undefined - ? output["groupId"]["#text"] - : output["groupId"]; + contents.GroupId = output["groupId"]; } if (output["groupName"] !== undefined) { - contents.GroupName = - output["groupName"]["#text"] !== undefined - ? output["groupName"]["#text"] - : output["groupName"]; + contents.GroupName = output["groupName"]; } if (output.staleIpPermissions === "") { contents.StaleIpPermissions = []; @@ -72157,10 +68110,7 @@ const deserializeAws_ec2StaleSecurityGroup = ( ); } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -72206,10 +68156,7 @@ const deserializeAws_ec2StartVpcEndpointServicePrivateDnsVerificationResult = ( ReturnValue: undefined }; if (output["return"] !== undefined) { - contents.ReturnValue = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.ReturnValue = output["return"] == "true"; } return contents; }; @@ -72224,16 +68171,10 @@ const deserializeAws_ec2StateReason = ( Message: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -72299,40 +68240,24 @@ const deserializeAws_ec2Subnet = ( }; if (output["assignIpv6AddressOnCreation"] !== undefined) { contents.AssignIpv6AddressOnCreation = - (output["assignIpv6AddressOnCreation"]["#text"] !== undefined - ? output["assignIpv6AddressOnCreation"]["#text"] - : output["assignIpv6AddressOnCreation"]) == "true"; + output["assignIpv6AddressOnCreation"] == "true"; } if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["availabilityZoneId"] !== undefined) { - contents.AvailabilityZoneId = - output["availabilityZoneId"]["#text"] !== undefined - ? output["availabilityZoneId"]["#text"] - : output["availabilityZoneId"]; + contents.AvailabilityZoneId = output["availabilityZoneId"]; } if (output["availableIpAddressCount"] !== undefined) { contents.AvailableIpAddressCount = parseInt( - output["availableIpAddressCount"]["#text"] !== undefined - ? output["availableIpAddressCount"]["#text"] - : output["availableIpAddressCount"] + output["availableIpAddressCount"] ); } if (output["cidrBlock"] !== undefined) { - contents.CidrBlock = - output["cidrBlock"]["#text"] !== undefined - ? output["cidrBlock"]["#text"] - : output["cidrBlock"]; + contents.CidrBlock = output["cidrBlock"]; } if (output["defaultForAz"] !== undefined) { - contents.DefaultForAz = - (output["defaultForAz"]["#text"] !== undefined - ? output["defaultForAz"]["#text"] - : output["defaultForAz"]) == "true"; + contents.DefaultForAz = output["defaultForAz"] == "true"; } if (output.ipv6CidrBlockAssociationSet === "") { contents.Ipv6CidrBlockAssociationSet = []; @@ -72347,40 +68272,22 @@ const deserializeAws_ec2Subnet = ( ); } if (output["mapPublicIpOnLaunch"] !== undefined) { - contents.MapPublicIpOnLaunch = - (output["mapPublicIpOnLaunch"]["#text"] !== undefined - ? output["mapPublicIpOnLaunch"]["#text"] - : output["mapPublicIpOnLaunch"]) == "true"; + contents.MapPublicIpOnLaunch = output["mapPublicIpOnLaunch"] == "true"; } if (output["outpostArn"] !== undefined) { - contents.OutpostArn = - output["outpostArn"]["#text"] !== undefined - ? output["outpostArn"]["#text"] - : output["outpostArn"]; + contents.OutpostArn = output["outpostArn"]; } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["subnetArn"] !== undefined) { - contents.SubnetArn = - output["subnetArn"]["#text"] !== undefined - ? output["subnetArn"]["#text"] - : output["subnetArn"]; + contents.SubnetArn = output["subnetArn"]; } if (output["subnetId"] !== undefined) { - contents.SubnetId = - output["subnetId"]["#text"] !== undefined - ? output["subnetId"]["#text"] - : output["subnetId"]; + contents.SubnetId = output["subnetId"]; } if (output.tagSet === "") { contents.Tags = []; @@ -72395,10 +68302,7 @@ const deserializeAws_ec2Subnet = ( ); } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -72413,16 +68317,10 @@ const deserializeAws_ec2SubnetAssociation = ( SubnetId: undefined }; if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["subnetId"] !== undefined) { - contents.SubnetId = - output["subnetId"]["#text"] !== undefined - ? output["subnetId"]["#text"] - : output["subnetId"]; + contents.SubnetId = output["subnetId"]; } return contents; }; @@ -72446,16 +68344,10 @@ const deserializeAws_ec2SubnetCidrBlockState = ( StatusMessage: undefined }; if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["statusMessage"] !== undefined) { - contents.StatusMessage = - output["statusMessage"]["#text"] !== undefined - ? output["statusMessage"]["#text"] - : output["statusMessage"]; + contents.StatusMessage = output["statusMessage"]; } return contents; }; @@ -72471,16 +68363,10 @@ const deserializeAws_ec2SubnetIpv6CidrBlockAssociation = ( Ipv6CidrBlockState: undefined }; if (output["associationId"] !== undefined) { - contents.AssociationId = - output["associationId"]["#text"] !== undefined - ? output["associationId"]["#text"] - : output["associationId"]; + contents.AssociationId = output["associationId"]; } if (output["ipv6CidrBlock"] !== undefined) { - contents.Ipv6CidrBlock = - output["ipv6CidrBlock"]["#text"] !== undefined - ? output["ipv6CidrBlock"]["#text"] - : output["ipv6CidrBlock"]; + contents.Ipv6CidrBlock = output["ipv6CidrBlock"]; } if (output["ipv6CidrBlockState"] !== undefined) { contents.Ipv6CidrBlockState = deserializeAws_ec2SubnetCidrBlockState( @@ -72518,10 +68404,7 @@ const deserializeAws_ec2SuccessfulInstanceCreditSpecificationItem = ( InstanceId: undefined }; if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } return contents; }; @@ -72544,10 +68427,7 @@ const deserializeAws_ec2SuccessfulQueuedPurchaseDeletion = ( ReservedInstancesId: undefined }; if (output["reservedInstancesId"] !== undefined) { - contents.ReservedInstancesId = - output["reservedInstancesId"]["#text"] !== undefined - ? output["reservedInstancesId"]["#text"] - : output["reservedInstancesId"]; + contents.ReservedInstancesId = output["reservedInstancesId"]; } return contents; }; @@ -72568,16 +68448,10 @@ const deserializeAws_ec2Tag = (output: any, context: __SerdeContext): Tag => { Value: undefined }; if (output["key"] !== undefined) { - contents.Key = - output["key"]["#text"] !== undefined - ? output["key"]["#text"] - : output["key"]; + contents.Key = output["key"]; } if (output["value"] !== undefined) { - contents.Value = - output["value"]["#text"] !== undefined - ? output["value"]["#text"] - : output["value"]; + contents.Value = output["value"]; } return contents; }; @@ -72594,28 +68468,16 @@ const deserializeAws_ec2TagDescription = ( Value: undefined }; if (output["key"] !== undefined) { - contents.Key = - output["key"]["#text"] !== undefined - ? output["key"]["#text"] - : output["key"]; + contents.Key = output["key"]; } if (output["resourceId"] !== undefined) { - contents.ResourceId = - output["resourceId"]["#text"] !== undefined - ? output["resourceId"]["#text"] - : output["resourceId"]; + contents.ResourceId = output["resourceId"]; } if (output["resourceType"] !== undefined) { - contents.ResourceType = - output["resourceType"]["#text"] !== undefined - ? output["resourceType"]["#text"] - : output["resourceType"]; + contents.ResourceType = output["resourceType"]; } if (output["value"] !== undefined) { - contents.Value = - output["value"]["#text"] !== undefined - ? output["value"]["#text"] - : output["value"]; + contents.Value = output["value"]; } return contents; }; @@ -72650,31 +68512,18 @@ const deserializeAws_ec2TargetCapacitySpecification = ( TotalTargetCapacity: undefined }; if (output["defaultTargetCapacityType"] !== undefined) { - contents.DefaultTargetCapacityType = - output["defaultTargetCapacityType"]["#text"] !== undefined - ? output["defaultTargetCapacityType"]["#text"] - : output["defaultTargetCapacityType"]; + contents.DefaultTargetCapacityType = output["defaultTargetCapacityType"]; } if (output["onDemandTargetCapacity"] !== undefined) { contents.OnDemandTargetCapacity = parseInt( - output["onDemandTargetCapacity"]["#text"] !== undefined - ? output["onDemandTargetCapacity"]["#text"] - : output["onDemandTargetCapacity"] + output["onDemandTargetCapacity"] ); } if (output["spotTargetCapacity"] !== undefined) { - contents.SpotTargetCapacity = parseInt( - output["spotTargetCapacity"]["#text"] !== undefined - ? output["spotTargetCapacity"]["#text"] - : output["spotTargetCapacity"] - ); + contents.SpotTargetCapacity = parseInt(output["spotTargetCapacity"]); } if (output["totalTargetCapacity"] !== undefined) { - contents.TotalTargetCapacity = parseInt( - output["totalTargetCapacity"]["#text"] !== undefined - ? output["totalTargetCapacity"]["#text"] - : output["totalTargetCapacity"] - ); + contents.TotalTargetCapacity = parseInt(output["totalTargetCapacity"]); } return contents; }; @@ -72689,17 +68538,10 @@ const deserializeAws_ec2TargetConfiguration = ( OfferingId: undefined }; if (output["instanceCount"] !== undefined) { - contents.InstanceCount = parseInt( - output["instanceCount"]["#text"] !== undefined - ? output["instanceCount"]["#text"] - : output["instanceCount"] - ); + contents.InstanceCount = parseInt(output["instanceCount"]); } if (output["offeringId"] !== undefined) { - contents.OfferingId = - output["offeringId"]["#text"] !== undefined - ? output["offeringId"]["#text"] - : output["offeringId"]; + contents.OfferingId = output["offeringId"]; } return contents; }; @@ -72713,10 +68555,7 @@ const deserializeAws_ec2TargetGroup = ( Arn: undefined }; if (output["arn"] !== undefined) { - contents.Arn = - output["arn"]["#text"] !== undefined - ? output["arn"]["#text"] - : output["arn"]; + contents.Arn = output["arn"]; } return contents; }; @@ -72767,16 +68606,10 @@ const deserializeAws_ec2TargetNetwork = ( VpcId: undefined }; if (output["associationId"] !== undefined) { - contents.AssociationId = - output["associationId"]["#text"] !== undefined - ? output["associationId"]["#text"] - : output["associationId"]; + contents.AssociationId = output["associationId"]; } if (output["clientVpnEndpointId"] !== undefined) { - contents.ClientVpnEndpointId = - output["clientVpnEndpointId"]["#text"] !== undefined - ? output["clientVpnEndpointId"]["#text"] - : output["clientVpnEndpointId"]; + contents.ClientVpnEndpointId = output["clientVpnEndpointId"]; } if (output.securityGroups === "") { contents.SecurityGroups = []; @@ -72797,16 +68630,10 @@ const deserializeAws_ec2TargetNetwork = ( ); } if (output["targetNetworkId"] !== undefined) { - contents.TargetNetworkId = - output["targetNetworkId"]["#text"] !== undefined - ? output["targetNetworkId"]["#text"] - : output["targetNetworkId"]; + contents.TargetNetworkId = output["targetNetworkId"]; } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -72864,10 +68691,7 @@ const deserializeAws_ec2TerminateClientVpnConnectionsResult = ( Username: undefined }; if (output["clientVpnEndpointId"] !== undefined) { - contents.ClientVpnEndpointId = - output["clientVpnEndpointId"]["#text"] !== undefined - ? output["clientVpnEndpointId"]["#text"] - : output["clientVpnEndpointId"]; + contents.ClientVpnEndpointId = output["clientVpnEndpointId"]; } if (output.connectionStatuses === "") { contents.ConnectionStatuses = []; @@ -72882,10 +68706,7 @@ const deserializeAws_ec2TerminateClientVpnConnectionsResult = ( ); } if (output["username"] !== undefined) { - contents.Username = - output["username"]["#text"] !== undefined - ? output["username"]["#text"] - : output["username"]; + contents.Username = output["username"]; } return contents; }; @@ -72901,10 +68722,7 @@ const deserializeAws_ec2TerminateConnectionStatus = ( PreviousStatus: undefined }; if (output["connectionId"] !== undefined) { - contents.ConnectionId = - output["connectionId"]["#text"] !== undefined - ? output["connectionId"]["#text"] - : output["connectionId"]; + contents.ConnectionId = output["connectionId"]; } if (output["currentStatus"] !== undefined) { contents.CurrentStatus = deserializeAws_ec2ClientVpnConnectionStatus( @@ -72957,9 +68775,7 @@ const deserializeAws_ec2ThreadsPerCoreList = ( output: any, context: __SerdeContext ): number[] => { - return (output || []).map((entry: any) => - parseInt(entry["#text"] !== undefined ? entry["#text"] : entry) - ); + return (output || []).map((entry: any) => parseInt(entry)); }; const deserializeAws_ec2TrafficMirrorFilter = ( @@ -72976,10 +68792,7 @@ const deserializeAws_ec2TrafficMirrorFilter = ( TrafficMirrorFilterId: undefined }; if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output.egressFilterRuleSet === "") { contents.EgressFilterRules = []; @@ -73030,10 +68843,7 @@ const deserializeAws_ec2TrafficMirrorFilter = ( ); } if (output["trafficMirrorFilterId"] !== undefined) { - contents.TrafficMirrorFilterId = - output["trafficMirrorFilterId"]["#text"] !== undefined - ? output["trafficMirrorFilterId"]["#text"] - : output["trafficMirrorFilterId"]; + contents.TrafficMirrorFilterId = output["trafficMirrorFilterId"]; } return contents; }; @@ -73057,16 +68867,10 @@ const deserializeAws_ec2TrafficMirrorFilterRule = ( TrafficMirrorFilterRuleId: undefined }; if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["destinationCidrBlock"] !== undefined) { - contents.DestinationCidrBlock = - output["destinationCidrBlock"]["#text"] !== undefined - ? output["destinationCidrBlock"]["#text"] - : output["destinationCidrBlock"]; + contents.DestinationCidrBlock = output["destinationCidrBlock"]; } if (output["destinationPortRange"] !== undefined) { contents.DestinationPortRange = deserializeAws_ec2TrafficMirrorPortRange( @@ -73075,30 +68879,16 @@ const deserializeAws_ec2TrafficMirrorFilterRule = ( ); } if (output["protocol"] !== undefined) { - contents.Protocol = parseInt( - output["protocol"]["#text"] !== undefined - ? output["protocol"]["#text"] - : output["protocol"] - ); + contents.Protocol = parseInt(output["protocol"]); } if (output["ruleAction"] !== undefined) { - contents.RuleAction = - output["ruleAction"]["#text"] !== undefined - ? output["ruleAction"]["#text"] - : output["ruleAction"]; + contents.RuleAction = output["ruleAction"]; } if (output["ruleNumber"] !== undefined) { - contents.RuleNumber = parseInt( - output["ruleNumber"]["#text"] !== undefined - ? output["ruleNumber"]["#text"] - : output["ruleNumber"] - ); + contents.RuleNumber = parseInt(output["ruleNumber"]); } if (output["sourceCidrBlock"] !== undefined) { - contents.SourceCidrBlock = - output["sourceCidrBlock"]["#text"] !== undefined - ? output["sourceCidrBlock"]["#text"] - : output["sourceCidrBlock"]; + contents.SourceCidrBlock = output["sourceCidrBlock"]; } if (output["sourcePortRange"] !== undefined) { contents.SourcePortRange = deserializeAws_ec2TrafficMirrorPortRange( @@ -73107,22 +68897,13 @@ const deserializeAws_ec2TrafficMirrorFilterRule = ( ); } if (output["trafficDirection"] !== undefined) { - contents.TrafficDirection = - output["trafficDirection"]["#text"] !== undefined - ? output["trafficDirection"]["#text"] - : output["trafficDirection"]; + contents.TrafficDirection = output["trafficDirection"]; } if (output["trafficMirrorFilterId"] !== undefined) { - contents.TrafficMirrorFilterId = - output["trafficMirrorFilterId"]["#text"] !== undefined - ? output["trafficMirrorFilterId"]["#text"] - : output["trafficMirrorFilterId"]; + contents.TrafficMirrorFilterId = output["trafficMirrorFilterId"]; } if (output["trafficMirrorFilterRuleId"] !== undefined) { - contents.TrafficMirrorFilterRuleId = - output["trafficMirrorFilterRuleId"]["#text"] !== undefined - ? output["trafficMirrorFilterRuleId"]["#text"] - : output["trafficMirrorFilterRuleId"]; + contents.TrafficMirrorFilterRuleId = output["trafficMirrorFilterRuleId"]; } return contents; }; @@ -73149,9 +68930,7 @@ const deserializeAws_ec2TrafficMirrorNetworkServiceList = ( output: any, context: __SerdeContext ): (TrafficMirrorNetworkService | string)[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2TrafficMirrorPortRange = ( @@ -73164,18 +68943,10 @@ const deserializeAws_ec2TrafficMirrorPortRange = ( ToPort: undefined }; if (output["fromPort"] !== undefined) { - contents.FromPort = parseInt( - output["fromPort"]["#text"] !== undefined - ? output["fromPort"]["#text"] - : output["fromPort"] - ); + contents.FromPort = parseInt(output["fromPort"]); } if (output["toPort"] !== undefined) { - contents.ToPort = parseInt( - output["toPort"]["#text"] !== undefined - ? output["toPort"]["#text"] - : output["toPort"] - ); + contents.ToPort = parseInt(output["toPort"]); } return contents; }; @@ -73198,36 +68969,19 @@ const deserializeAws_ec2TrafficMirrorSession = ( VirtualNetworkId: undefined }; if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["networkInterfaceId"] !== undefined) { - contents.NetworkInterfaceId = - output["networkInterfaceId"]["#text"] !== undefined - ? output["networkInterfaceId"]["#text"] - : output["networkInterfaceId"]; + contents.NetworkInterfaceId = output["networkInterfaceId"]; } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output["packetLength"] !== undefined) { - contents.PacketLength = parseInt( - output["packetLength"]["#text"] !== undefined - ? output["packetLength"]["#text"] - : output["packetLength"] - ); + contents.PacketLength = parseInt(output["packetLength"]); } if (output["sessionNumber"] !== undefined) { - contents.SessionNumber = parseInt( - output["sessionNumber"]["#text"] !== undefined - ? output["sessionNumber"]["#text"] - : output["sessionNumber"] - ); + contents.SessionNumber = parseInt(output["sessionNumber"]); } if (output.tagSet === "") { contents.Tags = []; @@ -73242,29 +68996,16 @@ const deserializeAws_ec2TrafficMirrorSession = ( ); } if (output["trafficMirrorFilterId"] !== undefined) { - contents.TrafficMirrorFilterId = - output["trafficMirrorFilterId"]["#text"] !== undefined - ? output["trafficMirrorFilterId"]["#text"] - : output["trafficMirrorFilterId"]; + contents.TrafficMirrorFilterId = output["trafficMirrorFilterId"]; } if (output["trafficMirrorSessionId"] !== undefined) { - contents.TrafficMirrorSessionId = - output["trafficMirrorSessionId"]["#text"] !== undefined - ? output["trafficMirrorSessionId"]["#text"] - : output["trafficMirrorSessionId"]; + contents.TrafficMirrorSessionId = output["trafficMirrorSessionId"]; } if (output["trafficMirrorTargetId"] !== undefined) { - contents.TrafficMirrorTargetId = - output["trafficMirrorTargetId"]["#text"] !== undefined - ? output["trafficMirrorTargetId"]["#text"] - : output["trafficMirrorTargetId"]; + contents.TrafficMirrorTargetId = output["trafficMirrorTargetId"]; } if (output["virtualNetworkId"] !== undefined) { - contents.VirtualNetworkId = parseInt( - output["virtualNetworkId"]["#text"] !== undefined - ? output["virtualNetworkId"]["#text"] - : output["virtualNetworkId"] - ); + contents.VirtualNetworkId = parseInt(output["virtualNetworkId"]); } return contents; }; @@ -73293,28 +69034,16 @@ const deserializeAws_ec2TrafficMirrorTarget = ( Type: undefined }; if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["networkInterfaceId"] !== undefined) { - contents.NetworkInterfaceId = - output["networkInterfaceId"]["#text"] !== undefined - ? output["networkInterfaceId"]["#text"] - : output["networkInterfaceId"]; + contents.NetworkInterfaceId = output["networkInterfaceId"]; } if (output["networkLoadBalancerArn"] !== undefined) { - contents.NetworkLoadBalancerArn = - output["networkLoadBalancerArn"]["#text"] !== undefined - ? output["networkLoadBalancerArn"]["#text"] - : output["networkLoadBalancerArn"]; + contents.NetworkLoadBalancerArn = output["networkLoadBalancerArn"]; } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output.tagSet === "") { contents.Tags = []; @@ -73329,16 +69058,10 @@ const deserializeAws_ec2TrafficMirrorTarget = ( ); } if (output["trafficMirrorTargetId"] !== undefined) { - contents.TrafficMirrorTargetId = - output["trafficMirrorTargetId"]["#text"] !== undefined - ? output["trafficMirrorTargetId"]["#text"] - : output["trafficMirrorTargetId"]; + contents.TrafficMirrorTargetId = output["trafficMirrorTargetId"]; } if (output["type"] !== undefined) { - contents.Type = - output["type"]["#text"] !== undefined - ? output["type"]["#text"] - : output["type"]; + contents.Type = output["type"]; } return contents; }; @@ -73371,10 +69094,7 @@ const deserializeAws_ec2TransitGateway = ( contents.CreationTime = new Date(output["creationTime"]); } if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["options"] !== undefined) { contents.Options = deserializeAws_ec2TransitGatewayOptions( @@ -73383,16 +69103,10 @@ const deserializeAws_ec2TransitGateway = ( ); } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output.tagSet === "") { contents.Tags = []; @@ -73407,16 +69121,10 @@ const deserializeAws_ec2TransitGateway = ( ); } if (output["transitGatewayArn"] !== undefined) { - contents.TransitGatewayArn = - output["transitGatewayArn"]["#text"] !== undefined - ? output["transitGatewayArn"]["#text"] - : output["transitGatewayArn"]; + contents.TransitGatewayArn = output["transitGatewayArn"]; } if (output["transitGatewayId"] !== undefined) { - contents.TransitGatewayId = - output["transitGatewayId"]["#text"] !== undefined - ? output["transitGatewayId"]["#text"] - : output["transitGatewayId"]; + contents.TransitGatewayId = output["transitGatewayId"]; } return contents; }; @@ -73434,34 +69142,19 @@ const deserializeAws_ec2TransitGatewayAssociation = ( TransitGatewayRouteTableId: undefined }; if (output["resourceId"] !== undefined) { - contents.ResourceId = - output["resourceId"]["#text"] !== undefined - ? output["resourceId"]["#text"] - : output["resourceId"]; + contents.ResourceId = output["resourceId"]; } if (output["resourceType"] !== undefined) { - contents.ResourceType = - output["resourceType"]["#text"] !== undefined - ? output["resourceType"]["#text"] - : output["resourceType"]; + contents.ResourceType = output["resourceType"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["transitGatewayAttachmentId"] !== undefined) { - contents.TransitGatewayAttachmentId = - output["transitGatewayAttachmentId"]["#text"] !== undefined - ? output["transitGatewayAttachmentId"]["#text"] - : output["transitGatewayAttachmentId"]; + contents.TransitGatewayAttachmentId = output["transitGatewayAttachmentId"]; } if (output["transitGatewayRouteTableId"] !== undefined) { - contents.TransitGatewayRouteTableId = - output["transitGatewayRouteTableId"]["#text"] !== undefined - ? output["transitGatewayRouteTableId"]["#text"] - : output["transitGatewayRouteTableId"]; + contents.TransitGatewayRouteTableId = output["transitGatewayRouteTableId"]; } return contents; }; @@ -73493,28 +69186,16 @@ const deserializeAws_ec2TransitGatewayAttachment = ( contents.CreationTime = new Date(output["creationTime"]); } if (output["resourceId"] !== undefined) { - contents.ResourceId = - output["resourceId"]["#text"] !== undefined - ? output["resourceId"]["#text"] - : output["resourceId"]; + contents.ResourceId = output["resourceId"]; } if (output["resourceOwnerId"] !== undefined) { - contents.ResourceOwnerId = - output["resourceOwnerId"]["#text"] !== undefined - ? output["resourceOwnerId"]["#text"] - : output["resourceOwnerId"]; + contents.ResourceOwnerId = output["resourceOwnerId"]; } if (output["resourceType"] !== undefined) { - contents.ResourceType = - output["resourceType"]["#text"] !== undefined - ? output["resourceType"]["#text"] - : output["resourceType"]; + contents.ResourceType = output["resourceType"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output.tagSet === "") { contents.Tags = []; @@ -73529,22 +69210,13 @@ const deserializeAws_ec2TransitGatewayAttachment = ( ); } if (output["transitGatewayAttachmentId"] !== undefined) { - contents.TransitGatewayAttachmentId = - output["transitGatewayAttachmentId"]["#text"] !== undefined - ? output["transitGatewayAttachmentId"]["#text"] - : output["transitGatewayAttachmentId"]; + contents.TransitGatewayAttachmentId = output["transitGatewayAttachmentId"]; } if (output["transitGatewayId"] !== undefined) { - contents.TransitGatewayId = - output["transitGatewayId"]["#text"] !== undefined - ? output["transitGatewayId"]["#text"] - : output["transitGatewayId"]; + contents.TransitGatewayId = output["transitGatewayId"]; } if (output["transitGatewayOwnerId"] !== undefined) { - contents.TransitGatewayOwnerId = - output["transitGatewayOwnerId"]["#text"] !== undefined - ? output["transitGatewayOwnerId"]["#text"] - : output["transitGatewayOwnerId"]; + contents.TransitGatewayOwnerId = output["transitGatewayOwnerId"]; } return contents; }; @@ -73559,16 +69231,10 @@ const deserializeAws_ec2TransitGatewayAttachmentAssociation = ( TransitGatewayRouteTableId: undefined }; if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["transitGatewayRouteTableId"] !== undefined) { - contents.TransitGatewayRouteTableId = - output["transitGatewayRouteTableId"]["#text"] !== undefined - ? output["transitGatewayRouteTableId"]["#text"] - : output["transitGatewayRouteTableId"]; + contents.TransitGatewayRouteTableId = output["transitGatewayRouteTableId"]; } return contents; }; @@ -73592,16 +69258,10 @@ const deserializeAws_ec2TransitGatewayAttachmentPropagation = ( TransitGatewayRouteTableId: undefined }; if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["transitGatewayRouteTableId"] !== undefined) { - contents.TransitGatewayRouteTableId = - output["transitGatewayRouteTableId"]["#text"] !== undefined - ? output["transitGatewayRouteTableId"]["#text"] - : output["transitGatewayRouteTableId"]; + contents.TransitGatewayRouteTableId = output["transitGatewayRouteTableId"]; } return contents; }; @@ -73647,16 +69307,11 @@ const deserializeAws_ec2TransitGatewayMulticastDeregisteredGroupMembers = ( ); } if (output["groupIpAddress"] !== undefined) { - contents.GroupIpAddress = - output["groupIpAddress"]["#text"] !== undefined - ? output["groupIpAddress"]["#text"] - : output["groupIpAddress"]; + contents.GroupIpAddress = output["groupIpAddress"]; } if (output["transitGatewayMulticastDomainId"] !== undefined) { contents.TransitGatewayMulticastDomainId = - output["transitGatewayMulticastDomainId"]["#text"] !== undefined - ? output["transitGatewayMulticastDomainId"]["#text"] - : output["transitGatewayMulticastDomainId"]; + output["transitGatewayMulticastDomainId"]; } return contents; }; @@ -73684,16 +69339,11 @@ const deserializeAws_ec2TransitGatewayMulticastDeregisteredGroupSources = ( ); } if (output["groupIpAddress"] !== undefined) { - contents.GroupIpAddress = - output["groupIpAddress"]["#text"] !== undefined - ? output["groupIpAddress"]["#text"] - : output["groupIpAddress"]; + contents.GroupIpAddress = output["groupIpAddress"]; } if (output["transitGatewayMulticastDomainId"] !== undefined) { contents.TransitGatewayMulticastDomainId = - output["transitGatewayMulticastDomainId"]["#text"] !== undefined - ? output["transitGatewayMulticastDomainId"]["#text"] - : output["transitGatewayMulticastDomainId"]; + output["transitGatewayMulticastDomainId"]; } return contents; }; @@ -73714,10 +69364,7 @@ const deserializeAws_ec2TransitGatewayMulticastDomain = ( contents.CreationTime = new Date(output["creationTime"]); } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output.tagSet === "") { contents.Tags = []; @@ -73732,16 +69379,11 @@ const deserializeAws_ec2TransitGatewayMulticastDomain = ( ); } if (output["transitGatewayId"] !== undefined) { - contents.TransitGatewayId = - output["transitGatewayId"]["#text"] !== undefined - ? output["transitGatewayId"]["#text"] - : output["transitGatewayId"]; + contents.TransitGatewayId = output["transitGatewayId"]; } if (output["transitGatewayMulticastDomainId"] !== undefined) { contents.TransitGatewayMulticastDomainId = - output["transitGatewayMulticastDomainId"]["#text"] !== undefined - ? output["transitGatewayMulticastDomainId"]["#text"] - : output["transitGatewayMulticastDomainId"]; + output["transitGatewayMulticastDomainId"]; } return contents; }; @@ -73758,16 +69400,10 @@ const deserializeAws_ec2TransitGatewayMulticastDomainAssociation = ( TransitGatewayAttachmentId: undefined }; if (output["resourceId"] !== undefined) { - contents.ResourceId = - output["resourceId"]["#text"] !== undefined - ? output["resourceId"]["#text"] - : output["resourceId"]; + contents.ResourceId = output["resourceId"]; } if (output["resourceType"] !== undefined) { - contents.ResourceType = - output["resourceType"]["#text"] !== undefined - ? output["resourceType"]["#text"] - : output["resourceType"]; + contents.ResourceType = output["resourceType"]; } if (output["subnet"] !== undefined) { contents.Subnet = deserializeAws_ec2SubnetAssociation( @@ -73776,10 +69412,7 @@ const deserializeAws_ec2TransitGatewayMulticastDomainAssociation = ( ); } if (output["transitGatewayAttachmentId"] !== undefined) { - contents.TransitGatewayAttachmentId = - output["transitGatewayAttachmentId"]["#text"] !== undefined - ? output["transitGatewayAttachmentId"]["#text"] - : output["transitGatewayAttachmentId"]; + contents.TransitGatewayAttachmentId = output["transitGatewayAttachmentId"]; } return contents; }; @@ -73806,16 +69439,10 @@ const deserializeAws_ec2TransitGatewayMulticastDomainAssociations = ( TransitGatewayMulticastDomainId: undefined }; if (output["resourceId"] !== undefined) { - contents.ResourceId = - output["resourceId"]["#text"] !== undefined - ? output["resourceId"]["#text"] - : output["resourceId"]; + contents.ResourceId = output["resourceId"]; } if (output["resourceType"] !== undefined) { - contents.ResourceType = - output["resourceType"]["#text"] !== undefined - ? output["resourceType"]["#text"] - : output["resourceType"]; + contents.ResourceType = output["resourceType"]; } if (output.subnets === "") { contents.Subnets = []; @@ -73830,16 +69457,11 @@ const deserializeAws_ec2TransitGatewayMulticastDomainAssociations = ( ); } if (output["transitGatewayAttachmentId"] !== undefined) { - contents.TransitGatewayAttachmentId = - output["transitGatewayAttachmentId"]["#text"] !== undefined - ? output["transitGatewayAttachmentId"]["#text"] - : output["transitGatewayAttachmentId"]; + contents.TransitGatewayAttachmentId = output["transitGatewayAttachmentId"]; } if (output["transitGatewayMulticastDomainId"] !== undefined) { contents.TransitGatewayMulticastDomainId = - output["transitGatewayMulticastDomainId"]["#text"] !== undefined - ? output["transitGatewayMulticastDomainId"]["#text"] - : output["transitGatewayMulticastDomainId"]; + output["transitGatewayMulticastDomainId"]; } return contents; }; @@ -73871,64 +69493,34 @@ const deserializeAws_ec2TransitGatewayMulticastGroup = ( TransitGatewayAttachmentId: undefined }; if (output["groupIpAddress"] !== undefined) { - contents.GroupIpAddress = - output["groupIpAddress"]["#text"] !== undefined - ? output["groupIpAddress"]["#text"] - : output["groupIpAddress"]; + contents.GroupIpAddress = output["groupIpAddress"]; } if (output["groupMember"] !== undefined) { - contents.GroupMember = - (output["groupMember"]["#text"] !== undefined - ? output["groupMember"]["#text"] - : output["groupMember"]) == "true"; + contents.GroupMember = output["groupMember"] == "true"; } if (output["groupSource"] !== undefined) { - contents.GroupSource = - (output["groupSource"]["#text"] !== undefined - ? output["groupSource"]["#text"] - : output["groupSource"]) == "true"; + contents.GroupSource = output["groupSource"] == "true"; } if (output["memberType"] !== undefined) { - contents.MemberType = - output["memberType"]["#text"] !== undefined - ? output["memberType"]["#text"] - : output["memberType"]; + contents.MemberType = output["memberType"]; } if (output["networkInterfaceId"] !== undefined) { - contents.NetworkInterfaceId = - output["networkInterfaceId"]["#text"] !== undefined - ? output["networkInterfaceId"]["#text"] - : output["networkInterfaceId"]; + contents.NetworkInterfaceId = output["networkInterfaceId"]; } if (output["resourceId"] !== undefined) { - contents.ResourceId = - output["resourceId"]["#text"] !== undefined - ? output["resourceId"]["#text"] - : output["resourceId"]; + contents.ResourceId = output["resourceId"]; } if (output["resourceType"] !== undefined) { - contents.ResourceType = - output["resourceType"]["#text"] !== undefined - ? output["resourceType"]["#text"] - : output["resourceType"]; + contents.ResourceType = output["resourceType"]; } if (output["sourceType"] !== undefined) { - contents.SourceType = - output["sourceType"]["#text"] !== undefined - ? output["sourceType"]["#text"] - : output["sourceType"]; + contents.SourceType = output["sourceType"]; } if (output["subnetId"] !== undefined) { - contents.SubnetId = - output["subnetId"]["#text"] !== undefined - ? output["subnetId"]["#text"] - : output["subnetId"]; + contents.SubnetId = output["subnetId"]; } if (output["transitGatewayAttachmentId"] !== undefined) { - contents.TransitGatewayAttachmentId = - output["transitGatewayAttachmentId"]["#text"] !== undefined - ? output["transitGatewayAttachmentId"]["#text"] - : output["transitGatewayAttachmentId"]; + contents.TransitGatewayAttachmentId = output["transitGatewayAttachmentId"]; } return contents; }; @@ -73953,10 +69545,7 @@ const deserializeAws_ec2TransitGatewayMulticastRegisteredGroupMembers = ( TransitGatewayMulticastDomainId: undefined }; if (output["groupIpAddress"] !== undefined) { - contents.GroupIpAddress = - output["groupIpAddress"]["#text"] !== undefined - ? output["groupIpAddress"]["#text"] - : output["groupIpAddress"]; + contents.GroupIpAddress = output["groupIpAddress"]; } if (output.registeredNetworkInterfaceIds === "") { contents.RegisteredNetworkInterfaceIds = []; @@ -73972,9 +69561,7 @@ const deserializeAws_ec2TransitGatewayMulticastRegisteredGroupMembers = ( } if (output["transitGatewayMulticastDomainId"] !== undefined) { contents.TransitGatewayMulticastDomainId = - output["transitGatewayMulticastDomainId"]["#text"] !== undefined - ? output["transitGatewayMulticastDomainId"]["#text"] - : output["transitGatewayMulticastDomainId"]; + output["transitGatewayMulticastDomainId"]; } return contents; }; @@ -73990,10 +69577,7 @@ const deserializeAws_ec2TransitGatewayMulticastRegisteredGroupSources = ( TransitGatewayMulticastDomainId: undefined }; if (output["groupIpAddress"] !== undefined) { - contents.GroupIpAddress = - output["groupIpAddress"]["#text"] !== undefined - ? output["groupIpAddress"]["#text"] - : output["groupIpAddress"]; + contents.GroupIpAddress = output["groupIpAddress"]; } if (output.registeredNetworkInterfaceIds === "") { contents.RegisteredNetworkInterfaceIds = []; @@ -74009,9 +69593,7 @@ const deserializeAws_ec2TransitGatewayMulticastRegisteredGroupSources = ( } if (output["transitGatewayMulticastDomainId"] !== undefined) { contents.TransitGatewayMulticastDomainId = - output["transitGatewayMulticastDomainId"]["#text"] !== undefined - ? output["transitGatewayMulticastDomainId"]["#text"] - : output["transitGatewayMulticastDomainId"]; + output["transitGatewayMulticastDomainId"]; } return contents; }; @@ -74033,59 +69615,36 @@ const deserializeAws_ec2TransitGatewayOptions = ( VpnEcmpSupport: undefined }; if (output["amazonSideAsn"] !== undefined) { - contents.AmazonSideAsn = parseInt( - output["amazonSideAsn"]["#text"] !== undefined - ? output["amazonSideAsn"]["#text"] - : output["amazonSideAsn"] - ); + contents.AmazonSideAsn = parseInt(output["amazonSideAsn"]); } if (output["associationDefaultRouteTableId"] !== undefined) { contents.AssociationDefaultRouteTableId = - output["associationDefaultRouteTableId"]["#text"] !== undefined - ? output["associationDefaultRouteTableId"]["#text"] - : output["associationDefaultRouteTableId"]; + output["associationDefaultRouteTableId"]; } if (output["autoAcceptSharedAttachments"] !== undefined) { contents.AutoAcceptSharedAttachments = - output["autoAcceptSharedAttachments"]["#text"] !== undefined - ? output["autoAcceptSharedAttachments"]["#text"] - : output["autoAcceptSharedAttachments"]; + output["autoAcceptSharedAttachments"]; } if (output["defaultRouteTableAssociation"] !== undefined) { contents.DefaultRouteTableAssociation = - output["defaultRouteTableAssociation"]["#text"] !== undefined - ? output["defaultRouteTableAssociation"]["#text"] - : output["defaultRouteTableAssociation"]; + output["defaultRouteTableAssociation"]; } if (output["defaultRouteTablePropagation"] !== undefined) { contents.DefaultRouteTablePropagation = - output["defaultRouteTablePropagation"]["#text"] !== undefined - ? output["defaultRouteTablePropagation"]["#text"] - : output["defaultRouteTablePropagation"]; + output["defaultRouteTablePropagation"]; } if (output["dnsSupport"] !== undefined) { - contents.DnsSupport = - output["dnsSupport"]["#text"] !== undefined - ? output["dnsSupport"]["#text"] - : output["dnsSupport"]; + contents.DnsSupport = output["dnsSupport"]; } if (output["multicastSupport"] !== undefined) { - contents.MulticastSupport = - output["multicastSupport"]["#text"] !== undefined - ? output["multicastSupport"]["#text"] - : output["multicastSupport"]; + contents.MulticastSupport = output["multicastSupport"]; } if (output["propagationDefaultRouteTableId"] !== undefined) { contents.PropagationDefaultRouteTableId = - output["propagationDefaultRouteTableId"]["#text"] !== undefined - ? output["propagationDefaultRouteTableId"]["#text"] - : output["propagationDefaultRouteTableId"]; + output["propagationDefaultRouteTableId"]; } if (output["vpnEcmpSupport"] !== undefined) { - contents.VpnEcmpSupport = - output["vpnEcmpSupport"]["#text"] !== undefined - ? output["vpnEcmpSupport"]["#text"] - : output["vpnEcmpSupport"]; + contents.VpnEcmpSupport = output["vpnEcmpSupport"]; } return contents; }; @@ -74120,10 +69679,7 @@ const deserializeAws_ec2TransitGatewayPeeringAttachment = ( ); } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["status"] !== undefined) { contents.Status = deserializeAws_ec2PeeringAttachmentStatus( @@ -74144,10 +69700,7 @@ const deserializeAws_ec2TransitGatewayPeeringAttachment = ( ); } if (output["transitGatewayAttachmentId"] !== undefined) { - contents.TransitGatewayAttachmentId = - output["transitGatewayAttachmentId"]["#text"] !== undefined - ? output["transitGatewayAttachmentId"]["#text"] - : output["transitGatewayAttachmentId"]; + contents.TransitGatewayAttachmentId = output["transitGatewayAttachmentId"]; } return contents; }; @@ -74174,34 +69727,19 @@ const deserializeAws_ec2TransitGatewayPropagation = ( TransitGatewayRouteTableId: undefined }; if (output["resourceId"] !== undefined) { - contents.ResourceId = - output["resourceId"]["#text"] !== undefined - ? output["resourceId"]["#text"] - : output["resourceId"]; + contents.ResourceId = output["resourceId"]; } if (output["resourceType"] !== undefined) { - contents.ResourceType = - output["resourceType"]["#text"] !== undefined - ? output["resourceType"]["#text"] - : output["resourceType"]; + contents.ResourceType = output["resourceType"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["transitGatewayAttachmentId"] !== undefined) { - contents.TransitGatewayAttachmentId = - output["transitGatewayAttachmentId"]["#text"] !== undefined - ? output["transitGatewayAttachmentId"]["#text"] - : output["transitGatewayAttachmentId"]; + contents.TransitGatewayAttachmentId = output["transitGatewayAttachmentId"]; } if (output["transitGatewayRouteTableId"] !== undefined) { - contents.TransitGatewayRouteTableId = - output["transitGatewayRouteTableId"]["#text"] !== undefined - ? output["transitGatewayRouteTableId"]["#text"] - : output["transitGatewayRouteTableId"]; + contents.TransitGatewayRouteTableId = output["transitGatewayRouteTableId"]; } return contents; }; @@ -74218,16 +69756,10 @@ const deserializeAws_ec2TransitGatewayRoute = ( Type: undefined }; if (output["destinationCidrBlock"] !== undefined) { - contents.DestinationCidrBlock = - output["destinationCidrBlock"]["#text"] !== undefined - ? output["destinationCidrBlock"]["#text"] - : output["destinationCidrBlock"]; + contents.DestinationCidrBlock = output["destinationCidrBlock"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output.transitGatewayAttachments === "") { contents.TransitGatewayAttachments = []; @@ -74242,10 +69774,7 @@ const deserializeAws_ec2TransitGatewayRoute = ( ); } if (output["type"] !== undefined) { - contents.Type = - output["type"]["#text"] !== undefined - ? output["type"]["#text"] - : output["type"]; + contents.Type = output["type"]; } return contents; }; @@ -74261,22 +69790,13 @@ const deserializeAws_ec2TransitGatewayRouteAttachment = ( TransitGatewayAttachmentId: undefined }; if (output["resourceId"] !== undefined) { - contents.ResourceId = - output["resourceId"]["#text"] !== undefined - ? output["resourceId"]["#text"] - : output["resourceId"]; + contents.ResourceId = output["resourceId"]; } if (output["resourceType"] !== undefined) { - contents.ResourceType = - output["resourceType"]["#text"] !== undefined - ? output["resourceType"]["#text"] - : output["resourceType"]; + contents.ResourceType = output["resourceType"]; } if (output["transitGatewayAttachmentId"] !== undefined) { - contents.TransitGatewayAttachmentId = - output["transitGatewayAttachmentId"]["#text"] !== undefined - ? output["transitGatewayAttachmentId"]["#text"] - : output["transitGatewayAttachmentId"]; + contents.TransitGatewayAttachmentId = output["transitGatewayAttachmentId"]; } return contents; }; @@ -74318,21 +69838,14 @@ const deserializeAws_ec2TransitGatewayRouteTable = ( } if (output["defaultAssociationRouteTable"] !== undefined) { contents.DefaultAssociationRouteTable = - (output["defaultAssociationRouteTable"]["#text"] !== undefined - ? output["defaultAssociationRouteTable"]["#text"] - : output["defaultAssociationRouteTable"]) == "true"; + output["defaultAssociationRouteTable"] == "true"; } if (output["defaultPropagationRouteTable"] !== undefined) { contents.DefaultPropagationRouteTable = - (output["defaultPropagationRouteTable"]["#text"] !== undefined - ? output["defaultPropagationRouteTable"]["#text"] - : output["defaultPropagationRouteTable"]) == "true"; + output["defaultPropagationRouteTable"] == "true"; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output.tagSet === "") { contents.Tags = []; @@ -74347,16 +69860,10 @@ const deserializeAws_ec2TransitGatewayRouteTable = ( ); } if (output["transitGatewayId"] !== undefined) { - contents.TransitGatewayId = - output["transitGatewayId"]["#text"] !== undefined - ? output["transitGatewayId"]["#text"] - : output["transitGatewayId"]; + contents.TransitGatewayId = output["transitGatewayId"]; } if (output["transitGatewayRouteTableId"] !== undefined) { - contents.TransitGatewayRouteTableId = - output["transitGatewayRouteTableId"]["#text"] !== undefined - ? output["transitGatewayRouteTableId"]["#text"] - : output["transitGatewayRouteTableId"]; + contents.TransitGatewayRouteTableId = output["transitGatewayRouteTableId"]; } return contents; }; @@ -74373,28 +69880,16 @@ const deserializeAws_ec2TransitGatewayRouteTableAssociation = ( TransitGatewayAttachmentId: undefined }; if (output["resourceId"] !== undefined) { - contents.ResourceId = - output["resourceId"]["#text"] !== undefined - ? output["resourceId"]["#text"] - : output["resourceId"]; + contents.ResourceId = output["resourceId"]; } if (output["resourceType"] !== undefined) { - contents.ResourceType = - output["resourceType"]["#text"] !== undefined - ? output["resourceType"]["#text"] - : output["resourceType"]; + contents.ResourceType = output["resourceType"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["transitGatewayAttachmentId"] !== undefined) { - contents.TransitGatewayAttachmentId = - output["transitGatewayAttachmentId"]["#text"] !== undefined - ? output["transitGatewayAttachmentId"]["#text"] - : output["transitGatewayAttachmentId"]; + contents.TransitGatewayAttachmentId = output["transitGatewayAttachmentId"]; } return contents; }; @@ -74429,28 +69924,16 @@ const deserializeAws_ec2TransitGatewayRouteTablePropagation = ( TransitGatewayAttachmentId: undefined }; if (output["resourceId"] !== undefined) { - contents.ResourceId = - output["resourceId"]["#text"] !== undefined - ? output["resourceId"]["#text"] - : output["resourceId"]; + contents.ResourceId = output["resourceId"]; } if (output["resourceType"] !== undefined) { - contents.ResourceType = - output["resourceType"]["#text"] !== undefined - ? output["resourceType"]["#text"] - : output["resourceType"]; + contents.ResourceType = output["resourceType"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["transitGatewayAttachmentId"] !== undefined) { - contents.TransitGatewayAttachmentId = - output["transitGatewayAttachmentId"]["#text"] !== undefined - ? output["transitGatewayAttachmentId"]["#text"] - : output["transitGatewayAttachmentId"]; + contents.TransitGatewayAttachmentId = output["transitGatewayAttachmentId"]; } return contents; }; @@ -74490,10 +69973,7 @@ const deserializeAws_ec2TransitGatewayVpcAttachment = ( ); } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output.subnetIds === "") { contents.SubnetIds = []; @@ -74520,28 +70000,16 @@ const deserializeAws_ec2TransitGatewayVpcAttachment = ( ); } if (output["transitGatewayAttachmentId"] !== undefined) { - contents.TransitGatewayAttachmentId = - output["transitGatewayAttachmentId"]["#text"] !== undefined - ? output["transitGatewayAttachmentId"]["#text"] - : output["transitGatewayAttachmentId"]; + contents.TransitGatewayAttachmentId = output["transitGatewayAttachmentId"]; } if (output["transitGatewayId"] !== undefined) { - contents.TransitGatewayId = - output["transitGatewayId"]["#text"] !== undefined - ? output["transitGatewayId"]["#text"] - : output["transitGatewayId"]; + contents.TransitGatewayId = output["transitGatewayId"]; } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } if (output["vpcOwnerId"] !== undefined) { - contents.VpcOwnerId = - output["vpcOwnerId"]["#text"] !== undefined - ? output["vpcOwnerId"]["#text"] - : output["vpcOwnerId"]; + contents.VpcOwnerId = output["vpcOwnerId"]; } return contents; }; @@ -74565,16 +70033,10 @@ const deserializeAws_ec2TransitGatewayVpcAttachmentOptions = ( Ipv6Support: undefined }; if (output["dnsSupport"] !== undefined) { - contents.DnsSupport = - output["dnsSupport"]["#text"] !== undefined - ? output["dnsSupport"]["#text"] - : output["dnsSupport"]; + contents.DnsSupport = output["dnsSupport"]; } if (output["ipv6Support"] !== undefined) { - contents.Ipv6Support = - output["ipv6Support"]["#text"] !== undefined - ? output["ipv6Support"]["#text"] - : output["ipv6Support"]; + contents.Ipv6Support = output["ipv6Support"]; } return contents; }; @@ -74603,11 +70065,7 @@ const deserializeAws_ec2TunnelOption = ( TunnelInsideCidr: undefined }; if (output["dpdTimeoutSeconds"] !== undefined) { - contents.DpdTimeoutSeconds = parseInt( - output["dpdTimeoutSeconds"]["#text"] !== undefined - ? output["dpdTimeoutSeconds"]["#text"] - : output["dpdTimeoutSeconds"] - ); + contents.DpdTimeoutSeconds = parseInt(output["dpdTimeoutSeconds"]); } if (output.ikeVersionSet === "") { contents.IkeVersions = []; @@ -74622,10 +70080,7 @@ const deserializeAws_ec2TunnelOption = ( ); } if (output["outsideIpAddress"] !== undefined) { - contents.OutsideIpAddress = - output["outsideIpAddress"]["#text"] !== undefined - ? output["outsideIpAddress"]["#text"] - : output["outsideIpAddress"]; + contents.OutsideIpAddress = output["outsideIpAddress"]; } if (output.phase1DHGroupNumberSet === "") { contents.Phase1DHGroupNumbers = []; @@ -74664,11 +70119,7 @@ const deserializeAws_ec2TunnelOption = ( ); } if (output["phase1LifetimeSeconds"] !== undefined) { - contents.Phase1LifetimeSeconds = parseInt( - output["phase1LifetimeSeconds"]["#text"] !== undefined - ? output["phase1LifetimeSeconds"]["#text"] - : output["phase1LifetimeSeconds"] - ); + contents.Phase1LifetimeSeconds = parseInt(output["phase1LifetimeSeconds"]); } if (output.phase2DHGroupNumberSet === "") { contents.Phase2DHGroupNumbers = []; @@ -74707,44 +70158,24 @@ const deserializeAws_ec2TunnelOption = ( ); } if (output["phase2LifetimeSeconds"] !== undefined) { - contents.Phase2LifetimeSeconds = parseInt( - output["phase2LifetimeSeconds"]["#text"] !== undefined - ? output["phase2LifetimeSeconds"]["#text"] - : output["phase2LifetimeSeconds"] - ); + contents.Phase2LifetimeSeconds = parseInt(output["phase2LifetimeSeconds"]); } if (output["preSharedKey"] !== undefined) { - contents.PreSharedKey = - output["preSharedKey"]["#text"] !== undefined - ? output["preSharedKey"]["#text"] - : output["preSharedKey"]; + contents.PreSharedKey = output["preSharedKey"]; } if (output["rekeyFuzzPercentage"] !== undefined) { - contents.RekeyFuzzPercentage = parseInt( - output["rekeyFuzzPercentage"]["#text"] !== undefined - ? output["rekeyFuzzPercentage"]["#text"] - : output["rekeyFuzzPercentage"] - ); + contents.RekeyFuzzPercentage = parseInt(output["rekeyFuzzPercentage"]); } if (output["rekeyMarginTimeSeconds"] !== undefined) { contents.RekeyMarginTimeSeconds = parseInt( - output["rekeyMarginTimeSeconds"]["#text"] !== undefined - ? output["rekeyMarginTimeSeconds"]["#text"] - : output["rekeyMarginTimeSeconds"] + output["rekeyMarginTimeSeconds"] ); } if (output["replayWindowSize"] !== undefined) { - contents.ReplayWindowSize = parseInt( - output["replayWindowSize"]["#text"] !== undefined - ? output["replayWindowSize"]["#text"] - : output["replayWindowSize"] - ); + contents.ReplayWindowSize = parseInt(output["replayWindowSize"]); } if (output["tunnelInsideCidr"] !== undefined) { - contents.TunnelInsideCidr = - output["tunnelInsideCidr"]["#text"] !== undefined - ? output["tunnelInsideCidr"]["#text"] - : output["tunnelInsideCidr"]; + contents.TunnelInsideCidr = output["tunnelInsideCidr"]; } return contents; }; @@ -74768,10 +70199,7 @@ const deserializeAws_ec2UnassignIpv6AddressesResult = ( UnassignedIpv6Addresses: undefined }; if (output["networkInterfaceId"] !== undefined) { - contents.NetworkInterfaceId = - output["networkInterfaceId"]["#text"] !== undefined - ? output["networkInterfaceId"]["#text"] - : output["networkInterfaceId"]; + contents.NetworkInterfaceId = output["networkInterfaceId"]; } if (output.unassignedIpv6Addresses === "") { contents.UnassignedIpv6Addresses = []; @@ -74827,10 +70255,7 @@ const deserializeAws_ec2UnsuccessfulInstanceCreditSpecificationItem = ( ); } if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } return contents; }; @@ -74845,16 +70270,10 @@ const deserializeAws_ec2UnsuccessfulInstanceCreditSpecificationItemError = ( Message: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -74887,10 +70306,7 @@ const deserializeAws_ec2UnsuccessfulItem = ( ); } if (output["resourceId"] !== undefined) { - contents.ResourceId = - output["resourceId"]["#text"] !== undefined - ? output["resourceId"]["#text"] - : output["resourceId"]; + contents.ResourceId = output["resourceId"]; } return contents; }; @@ -74905,16 +70321,10 @@ const deserializeAws_ec2UnsuccessfulItemError = ( Message: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -74946,10 +70356,7 @@ const deserializeAws_ec2UpdateSecurityGroupRuleDescriptionsEgressResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -74963,10 +70370,7 @@ const deserializeAws_ec2UpdateSecurityGroupRuleDescriptionsIngressResult = ( Return: undefined }; if (output["return"] !== undefined) { - contents.Return = - (output["return"]["#text"] !== undefined - ? output["return"]["#text"] - : output["return"]) == "true"; + contents.Return = output["return"] == "true"; } return contents; }; @@ -74975,9 +70379,7 @@ const deserializeAws_ec2UsageClassTypeList = ( output: any, context: __SerdeContext ): (UsageClassType | string)[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2UserBucketDetails = ( @@ -74990,16 +70392,10 @@ const deserializeAws_ec2UserBucketDetails = ( S3Key: undefined }; if (output["s3Bucket"] !== undefined) { - contents.S3Bucket = - output["s3Bucket"]["#text"] !== undefined - ? output["s3Bucket"]["#text"] - : output["s3Bucket"]; + contents.S3Bucket = output["s3Bucket"]; } if (output["s3Key"] !== undefined) { - contents.S3Key = - output["s3Key"]["#text"] !== undefined - ? output["s3Key"]["#text"] - : output["s3Key"]; + contents.S3Key = output["s3Key"]; } return contents; }; @@ -75019,46 +70415,25 @@ const deserializeAws_ec2UserIdGroupPair = ( VpcPeeringConnectionId: undefined }; if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["groupId"] !== undefined) { - contents.GroupId = - output["groupId"]["#text"] !== undefined - ? output["groupId"]["#text"] - : output["groupId"]; + contents.GroupId = output["groupId"]; } if (output["groupName"] !== undefined) { - contents.GroupName = - output["groupName"]["#text"] !== undefined - ? output["groupName"]["#text"] - : output["groupName"]; + contents.GroupName = output["groupName"]; } if (output["peeringStatus"] !== undefined) { - contents.PeeringStatus = - output["peeringStatus"]["#text"] !== undefined - ? output["peeringStatus"]["#text"] - : output["peeringStatus"]; + contents.PeeringStatus = output["peeringStatus"]; } if (output["userId"] !== undefined) { - contents.UserId = - output["userId"]["#text"] !== undefined - ? output["userId"]["#text"] - : output["userId"]; + contents.UserId = output["userId"]; } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } if (output["vpcPeeringConnectionId"] !== undefined) { - contents.VpcPeeringConnectionId = - output["vpcPeeringConnectionId"]["#text"] !== undefined - ? output["vpcPeeringConnectionId"]["#text"] - : output["vpcPeeringConnectionId"]; + contents.VpcPeeringConnectionId = output["vpcPeeringConnectionId"]; } return contents; }; @@ -75094,25 +70469,13 @@ const deserializeAws_ec2VCpuInfo = ( ValidThreadsPerCore: undefined }; if (output["defaultCores"] !== undefined) { - contents.DefaultCores = parseInt( - output["defaultCores"]["#text"] !== undefined - ? output["defaultCores"]["#text"] - : output["defaultCores"] - ); + contents.DefaultCores = parseInt(output["defaultCores"]); } if (output["defaultThreadsPerCore"] !== undefined) { - contents.DefaultThreadsPerCore = parseInt( - output["defaultThreadsPerCore"]["#text"] !== undefined - ? output["defaultThreadsPerCore"]["#text"] - : output["defaultThreadsPerCore"] - ); + contents.DefaultThreadsPerCore = parseInt(output["defaultThreadsPerCore"]); } if (output["defaultVCpus"] !== undefined) { - contents.DefaultVCpus = parseInt( - output["defaultVCpus"]["#text"] !== undefined - ? output["defaultVCpus"]["#text"] - : output["defaultVCpus"] - ); + contents.DefaultVCpus = parseInt(output["defaultVCpus"]); } if (output.validCores === "") { contents.ValidCores = []; @@ -75145,9 +70508,7 @@ const deserializeAws_ec2ValueStringList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2VgwTelemetry = ( @@ -75164,38 +70525,22 @@ const deserializeAws_ec2VgwTelemetry = ( StatusMessage: undefined }; if (output["acceptedRouteCount"] !== undefined) { - contents.AcceptedRouteCount = parseInt( - output["acceptedRouteCount"]["#text"] !== undefined - ? output["acceptedRouteCount"]["#text"] - : output["acceptedRouteCount"] - ); + contents.AcceptedRouteCount = parseInt(output["acceptedRouteCount"]); } if (output["certificateArn"] !== undefined) { - contents.CertificateArn = - output["certificateArn"]["#text"] !== undefined - ? output["certificateArn"]["#text"] - : output["certificateArn"]; + contents.CertificateArn = output["certificateArn"]; } if (output["lastStatusChange"] !== undefined) { contents.LastStatusChange = new Date(output["lastStatusChange"]); } if (output["outsideIpAddress"] !== undefined) { - contents.OutsideIpAddress = - output["outsideIpAddress"]["#text"] !== undefined - ? output["outsideIpAddress"]["#text"] - : output["outsideIpAddress"]; + contents.OutsideIpAddress = output["outsideIpAddress"]; } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } if (output["statusMessage"] !== undefined) { - contents.StatusMessage = - output["statusMessage"]["#text"] !== undefined - ? output["statusMessage"]["#text"] - : output["statusMessage"]; + contents.StatusMessage = output["statusMessage"]; } return contents; }; @@ -75243,63 +70588,34 @@ const deserializeAws_ec2Volume = ( ); } if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["createTime"] !== undefined) { contents.CreateTime = new Date(output["createTime"]); } if (output["encrypted"] !== undefined) { - contents.Encrypted = - (output["encrypted"]["#text"] !== undefined - ? output["encrypted"]["#text"] - : output["encrypted"]) == "true"; + contents.Encrypted = output["encrypted"] == "true"; } if (output["fastRestored"] !== undefined) { - contents.FastRestored = - (output["fastRestored"]["#text"] !== undefined - ? output["fastRestored"]["#text"] - : output["fastRestored"]) == "true"; + contents.FastRestored = output["fastRestored"] == "true"; } if (output["iops"] !== undefined) { - contents.Iops = parseInt( - output["iops"]["#text"] !== undefined - ? output["iops"]["#text"] - : output["iops"] - ); + contents.Iops = parseInt(output["iops"]); } if (output["kmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["kmsKeyId"]["#text"] !== undefined - ? output["kmsKeyId"]["#text"] - : output["kmsKeyId"]; + contents.KmsKeyId = output["kmsKeyId"]; } if (output["outpostArn"] !== undefined) { - contents.OutpostArn = - output["outpostArn"]["#text"] !== undefined - ? output["outpostArn"]["#text"] - : output["outpostArn"]; + contents.OutpostArn = output["outpostArn"]; } if (output["size"] !== undefined) { - contents.Size = parseInt( - output["size"]["#text"] !== undefined - ? output["size"]["#text"] - : output["size"] - ); + contents.Size = parseInt(output["size"]); } if (output["snapshotId"] !== undefined) { - contents.SnapshotId = - output["snapshotId"]["#text"] !== undefined - ? output["snapshotId"]["#text"] - : output["snapshotId"]; + contents.SnapshotId = output["snapshotId"]; } if (output["status"] !== undefined) { - contents.State = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.State = output["status"]; } if (output.tagSet === "") { contents.Tags = []; @@ -75314,16 +70630,10 @@ const deserializeAws_ec2Volume = ( ); } if (output["volumeId"] !== undefined) { - contents.VolumeId = - output["volumeId"]["#text"] !== undefined - ? output["volumeId"]["#text"] - : output["volumeId"]; + contents.VolumeId = output["volumeId"]; } if (output["volumeType"] !== undefined) { - contents.VolumeType = - output["volumeType"]["#text"] !== undefined - ? output["volumeType"]["#text"] - : output["volumeType"]; + contents.VolumeType = output["volumeType"]; } return contents; }; @@ -75345,34 +70655,19 @@ const deserializeAws_ec2VolumeAttachment = ( contents.AttachTime = new Date(output["attachTime"]); } if (output["deleteOnTermination"] !== undefined) { - contents.DeleteOnTermination = - (output["deleteOnTermination"]["#text"] !== undefined - ? output["deleteOnTermination"]["#text"] - : output["deleteOnTermination"]) == "true"; + contents.DeleteOnTermination = output["deleteOnTermination"] == "true"; } if (output["device"] !== undefined) { - contents.Device = - output["device"]["#text"] !== undefined - ? output["device"]["#text"] - : output["device"]; + contents.Device = output["device"]; } if (output["instanceId"] !== undefined) { - contents.InstanceId = - output["instanceId"]["#text"] !== undefined - ? output["instanceId"]["#text"] - : output["instanceId"]; + contents.InstanceId = output["instanceId"]; } if (output["status"] !== undefined) { - contents.State = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.State = output["status"]; } if (output["volumeId"] !== undefined) { - contents.VolumeId = - output["volumeId"]["#text"] !== undefined - ? output["volumeId"]["#text"] - : output["volumeId"]; + contents.VolumeId = output["volumeId"]; } return contents; }; @@ -75418,72 +70713,37 @@ const deserializeAws_ec2VolumeModification = ( contents.EndTime = new Date(output["endTime"]); } if (output["modificationState"] !== undefined) { - contents.ModificationState = - output["modificationState"]["#text"] !== undefined - ? output["modificationState"]["#text"] - : output["modificationState"]; + contents.ModificationState = output["modificationState"]; } if (output["originalIops"] !== undefined) { - contents.OriginalIops = parseInt( - output["originalIops"]["#text"] !== undefined - ? output["originalIops"]["#text"] - : output["originalIops"] - ); + contents.OriginalIops = parseInt(output["originalIops"]); } if (output["originalSize"] !== undefined) { - contents.OriginalSize = parseInt( - output["originalSize"]["#text"] !== undefined - ? output["originalSize"]["#text"] - : output["originalSize"] - ); + contents.OriginalSize = parseInt(output["originalSize"]); } if (output["originalVolumeType"] !== undefined) { - contents.OriginalVolumeType = - output["originalVolumeType"]["#text"] !== undefined - ? output["originalVolumeType"]["#text"] - : output["originalVolumeType"]; + contents.OriginalVolumeType = output["originalVolumeType"]; } if (output["progress"] !== undefined) { - contents.Progress = parseInt( - output["progress"]["#text"] !== undefined - ? output["progress"]["#text"] - : output["progress"] - ); + contents.Progress = parseInt(output["progress"]); } if (output["startTime"] !== undefined) { contents.StartTime = new Date(output["startTime"]); } if (output["statusMessage"] !== undefined) { - contents.StatusMessage = - output["statusMessage"]["#text"] !== undefined - ? output["statusMessage"]["#text"] - : output["statusMessage"]; + contents.StatusMessage = output["statusMessage"]; } if (output["targetIops"] !== undefined) { - contents.TargetIops = parseInt( - output["targetIops"]["#text"] !== undefined - ? output["targetIops"]["#text"] - : output["targetIops"] - ); + contents.TargetIops = parseInt(output["targetIops"]); } if (output["targetSize"] !== undefined) { - contents.TargetSize = parseInt( - output["targetSize"]["#text"] !== undefined - ? output["targetSize"]["#text"] - : output["targetSize"] - ); + contents.TargetSize = parseInt(output["targetSize"]); } if (output["targetVolumeType"] !== undefined) { - contents.TargetVolumeType = - output["targetVolumeType"]["#text"] !== undefined - ? output["targetVolumeType"]["#text"] - : output["targetVolumeType"]; + contents.TargetVolumeType = output["targetVolumeType"]; } if (output["volumeId"] !== undefined) { - contents.VolumeId = - output["volumeId"]["#text"] !== undefined - ? output["volumeId"]["#text"] - : output["volumeId"]; + contents.VolumeId = output["volumeId"]; } return contents; }; @@ -75509,28 +70769,16 @@ const deserializeAws_ec2VolumeStatusAction = ( EventType: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["eventId"] !== undefined) { - contents.EventId = - output["eventId"]["#text"] !== undefined - ? output["eventId"]["#text"] - : output["eventId"]; + contents.EventId = output["eventId"]; } if (output["eventType"] !== undefined) { - contents.EventType = - output["eventType"]["#text"] !== undefined - ? output["eventType"]["#text"] - : output["eventType"]; + contents.EventType = output["eventType"]; } return contents; }; @@ -75554,16 +70802,10 @@ const deserializeAws_ec2VolumeStatusDetails = ( Status: undefined }; if (output["name"] !== undefined) { - contents.Name = - output["name"]["#text"] !== undefined - ? output["name"]["#text"] - : output["name"]; + contents.Name = output["name"]; } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } return contents; }; @@ -75590,22 +70832,13 @@ const deserializeAws_ec2VolumeStatusEvent = ( NotBefore: undefined }; if (output["description"] !== undefined) { - contents.Description = - output["description"]["#text"] !== undefined - ? output["description"]["#text"] - : output["description"]; + contents.Description = output["description"]; } if (output["eventId"] !== undefined) { - contents.EventId = - output["eventId"]["#text"] !== undefined - ? output["eventId"]["#text"] - : output["eventId"]; + contents.EventId = output["eventId"]; } if (output["eventType"] !== undefined) { - contents.EventType = - output["eventType"]["#text"] !== undefined - ? output["eventType"]["#text"] - : output["eventType"]; + contents.EventType = output["eventType"]; } if (output["notAfter"] !== undefined) { contents.NotAfter = new Date(output["notAfter"]); @@ -75647,10 +70880,7 @@ const deserializeAws_ec2VolumeStatusInfo = ( ); } if (output["status"] !== undefined) { - contents.Status = - output["status"]["#text"] !== undefined - ? output["status"]["#text"] - : output["status"]; + contents.Status = output["status"]; } return contents; }; @@ -75681,10 +70911,7 @@ const deserializeAws_ec2VolumeStatusItem = ( ); } if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output.eventsSet === "") { contents.Events = []; @@ -75699,16 +70926,10 @@ const deserializeAws_ec2VolumeStatusItem = ( ); } if (output["outpostArn"] !== undefined) { - contents.OutpostArn = - output["outpostArn"]["#text"] !== undefined - ? output["outpostArn"]["#text"] - : output["outpostArn"]; + contents.OutpostArn = output["outpostArn"]; } if (output["volumeId"] !== undefined) { - contents.VolumeId = - output["volumeId"]["#text"] !== undefined - ? output["volumeId"]["#text"] - : output["volumeId"]; + contents.VolumeId = output["volumeId"]; } if (output["volumeStatus"] !== undefined) { contents.VolumeStatus = deserializeAws_ec2VolumeStatusInfo( @@ -75743,10 +70964,7 @@ const deserializeAws_ec2Vpc = (output: any, context: __SerdeContext): Vpc => { VpcId: undefined }; if (output["cidrBlock"] !== undefined) { - contents.CidrBlock = - output["cidrBlock"]["#text"] !== undefined - ? output["cidrBlock"]["#text"] - : output["cidrBlock"]; + contents.CidrBlock = output["cidrBlock"]; } if (output.cidrBlockAssociationSet === "") { contents.CidrBlockAssociationSet = []; @@ -75761,16 +70979,10 @@ const deserializeAws_ec2Vpc = (output: any, context: __SerdeContext): Vpc => { ); } if (output["dhcpOptionsId"] !== undefined) { - contents.DhcpOptionsId = - output["dhcpOptionsId"]["#text"] !== undefined - ? output["dhcpOptionsId"]["#text"] - : output["dhcpOptionsId"]; + contents.DhcpOptionsId = output["dhcpOptionsId"]; } if (output["instanceTenancy"] !== undefined) { - contents.InstanceTenancy = - output["instanceTenancy"]["#text"] !== undefined - ? output["instanceTenancy"]["#text"] - : output["instanceTenancy"]; + contents.InstanceTenancy = output["instanceTenancy"]; } if (output.ipv6CidrBlockAssociationSet === "") { contents.Ipv6CidrBlockAssociationSet = []; @@ -75785,22 +70997,13 @@ const deserializeAws_ec2Vpc = (output: any, context: __SerdeContext): Vpc => { ); } if (output["isDefault"] !== undefined) { - contents.IsDefault = - (output["isDefault"]["#text"] !== undefined - ? output["isDefault"]["#text"] - : output["isDefault"]) == "true"; + contents.IsDefault = output["isDefault"] == "true"; } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output.tagSet === "") { contents.Tags = []; @@ -75815,10 +71018,7 @@ const deserializeAws_ec2Vpc = (output: any, context: __SerdeContext): Vpc => { ); } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -75833,16 +71033,10 @@ const deserializeAws_ec2VpcAttachment = ( VpcId: undefined }; if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -75867,16 +71061,10 @@ const deserializeAws_ec2VpcCidrBlockAssociation = ( CidrBlockState: undefined }; if (output["associationId"] !== undefined) { - contents.AssociationId = - output["associationId"]["#text"] !== undefined - ? output["associationId"]["#text"] - : output["associationId"]; + contents.AssociationId = output["associationId"]; } if (output["cidrBlock"] !== undefined) { - contents.CidrBlock = - output["cidrBlock"]["#text"] !== undefined - ? output["cidrBlock"]["#text"] - : output["cidrBlock"]; + contents.CidrBlock = output["cidrBlock"]; } if (output["cidrBlockState"] !== undefined) { contents.CidrBlockState = deserializeAws_ec2VpcCidrBlockState( @@ -75906,16 +71094,10 @@ const deserializeAws_ec2VpcCidrBlockState = ( StatusMessage: undefined }; if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output["statusMessage"] !== undefined) { - contents.StatusMessage = - output["statusMessage"]["#text"] !== undefined - ? output["statusMessage"]["#text"] - : output["statusMessage"]; + contents.StatusMessage = output["statusMessage"]; } return contents; }; @@ -75931,10 +71113,7 @@ const deserializeAws_ec2VpcClassicLink = ( VpcId: undefined }; if (output["classicLinkEnabled"] !== undefined) { - contents.ClassicLinkEnabled = - (output["classicLinkEnabled"]["#text"] !== undefined - ? output["classicLinkEnabled"]["#text"] - : output["classicLinkEnabled"]) == "true"; + contents.ClassicLinkEnabled = output["classicLinkEnabled"] == "true"; } if (output.tagSet === "") { contents.Tags = []; @@ -75949,10 +71128,7 @@ const deserializeAws_ec2VpcClassicLink = ( ); } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -76036,28 +71212,16 @@ const deserializeAws_ec2VpcEndpoint = ( ); } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output["policyDocument"] !== undefined) { - contents.PolicyDocument = - output["policyDocument"]["#text"] !== undefined - ? output["policyDocument"]["#text"] - : output["policyDocument"]; + contents.PolicyDocument = output["policyDocument"]; } if (output["privateDnsEnabled"] !== undefined) { - contents.PrivateDnsEnabled = - (output["privateDnsEnabled"]["#text"] !== undefined - ? output["privateDnsEnabled"]["#text"] - : output["privateDnsEnabled"]) == "true"; + contents.PrivateDnsEnabled = output["privateDnsEnabled"] == "true"; } if (output["requesterManaged"] !== undefined) { - contents.RequesterManaged = - (output["requesterManaged"]["#text"] !== undefined - ? output["requesterManaged"]["#text"] - : output["requesterManaged"]) == "true"; + contents.RequesterManaged = output["requesterManaged"] == "true"; } if (output.routeTableIdSet === "") { contents.RouteTableIds = []; @@ -76072,16 +71236,10 @@ const deserializeAws_ec2VpcEndpoint = ( ); } if (output["serviceName"] !== undefined) { - contents.ServiceName = - output["serviceName"]["#text"] !== undefined - ? output["serviceName"]["#text"] - : output["serviceName"]; + contents.ServiceName = output["serviceName"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output.subnetIdSet === "") { contents.SubnetIds = []; @@ -76108,22 +71266,13 @@ const deserializeAws_ec2VpcEndpoint = ( ); } if (output["vpcEndpointId"] !== undefined) { - contents.VpcEndpointId = - output["vpcEndpointId"]["#text"] !== undefined - ? output["vpcEndpointId"]["#text"] - : output["vpcEndpointId"]; + contents.VpcEndpointId = output["vpcEndpointId"]; } if (output["vpcEndpointType"] !== undefined) { - contents.VpcEndpointType = - output["vpcEndpointType"]["#text"] !== undefined - ? output["vpcEndpointType"]["#text"] - : output["vpcEndpointType"]; + contents.VpcEndpointType = output["vpcEndpointType"]; } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -76170,28 +71319,16 @@ const deserializeAws_ec2VpcEndpointConnection = ( ); } if (output["serviceId"] !== undefined) { - contents.ServiceId = - output["serviceId"]["#text"] !== undefined - ? output["serviceId"]["#text"] - : output["serviceId"]; + contents.ServiceId = output["serviceId"]; } if (output["vpcEndpointId"] !== undefined) { - contents.VpcEndpointId = - output["vpcEndpointId"]["#text"] !== undefined - ? output["vpcEndpointId"]["#text"] - : output["vpcEndpointId"]; + contents.VpcEndpointId = output["vpcEndpointId"]; } if (output["vpcEndpointOwner"] !== undefined) { - contents.VpcEndpointOwner = - output["vpcEndpointOwner"]["#text"] !== undefined - ? output["vpcEndpointOwner"]["#text"] - : output["vpcEndpointOwner"]; + contents.VpcEndpointOwner = output["vpcEndpointOwner"]; } if (output["vpcEndpointState"] !== undefined) { - contents.VpcEndpointState = - output["vpcEndpointState"]["#text"] !== undefined - ? output["vpcEndpointState"]["#text"] - : output["vpcEndpointState"]; + contents.VpcEndpointState = output["vpcEndpointState"]; } return contents; }; @@ -76227,16 +71364,10 @@ const deserializeAws_ec2VpcIpv6CidrBlockAssociation = ( NetworkBorderGroup: undefined }; if (output["associationId"] !== undefined) { - contents.AssociationId = - output["associationId"]["#text"] !== undefined - ? output["associationId"]["#text"] - : output["associationId"]; + contents.AssociationId = output["associationId"]; } if (output["ipv6CidrBlock"] !== undefined) { - contents.Ipv6CidrBlock = - output["ipv6CidrBlock"]["#text"] !== undefined - ? output["ipv6CidrBlock"]["#text"] - : output["ipv6CidrBlock"]; + contents.Ipv6CidrBlock = output["ipv6CidrBlock"]; } if (output["ipv6CidrBlockState"] !== undefined) { contents.Ipv6CidrBlockState = deserializeAws_ec2VpcCidrBlockState( @@ -76245,16 +71376,10 @@ const deserializeAws_ec2VpcIpv6CidrBlockAssociation = ( ); } if (output["ipv6Pool"] !== undefined) { - contents.Ipv6Pool = - output["ipv6Pool"]["#text"] !== undefined - ? output["ipv6Pool"]["#text"] - : output["ipv6Pool"]; + contents.Ipv6Pool = output["ipv6Pool"]; } if (output["networkBorderGroup"] !== undefined) { - contents.NetworkBorderGroup = - output["networkBorderGroup"]["#text"] !== undefined - ? output["networkBorderGroup"]["#text"] - : output["networkBorderGroup"]; + contents.NetworkBorderGroup = output["networkBorderGroup"]; } return contents; }; @@ -76324,10 +71449,7 @@ const deserializeAws_ec2VpcPeeringConnection = ( ); } if (output["vpcPeeringConnectionId"] !== undefined) { - contents.VpcPeeringConnectionId = - output["vpcPeeringConnectionId"]["#text"] !== undefined - ? output["vpcPeeringConnectionId"]["#text"] - : output["vpcPeeringConnectionId"]; + contents.VpcPeeringConnectionId = output["vpcPeeringConnectionId"]; } return contents; }; @@ -76353,23 +71475,15 @@ const deserializeAws_ec2VpcPeeringConnectionOptionsDescription = ( }; if (output["allowDnsResolutionFromRemoteVpc"] !== undefined) { contents.AllowDnsResolutionFromRemoteVpc = - (output["allowDnsResolutionFromRemoteVpc"]["#text"] !== undefined - ? output["allowDnsResolutionFromRemoteVpc"]["#text"] - : output["allowDnsResolutionFromRemoteVpc"]) == "true"; + output["allowDnsResolutionFromRemoteVpc"] == "true"; } if (output["allowEgressFromLocalClassicLinkToRemoteVpc"] !== undefined) { contents.AllowEgressFromLocalClassicLinkToRemoteVpc = - (output["allowEgressFromLocalClassicLinkToRemoteVpc"]["#text"] !== - undefined - ? output["allowEgressFromLocalClassicLinkToRemoteVpc"]["#text"] - : output["allowEgressFromLocalClassicLinkToRemoteVpc"]) == "true"; + output["allowEgressFromLocalClassicLinkToRemoteVpc"] == "true"; } if (output["allowEgressFromLocalVpcToRemoteClassicLink"] !== undefined) { contents.AllowEgressFromLocalVpcToRemoteClassicLink = - (output["allowEgressFromLocalVpcToRemoteClassicLink"]["#text"] !== - undefined - ? output["allowEgressFromLocalVpcToRemoteClassicLink"]["#text"] - : output["allowEgressFromLocalVpcToRemoteClassicLink"]) == "true"; + output["allowEgressFromLocalVpcToRemoteClassicLink"] == "true"; } return contents; }; @@ -76384,16 +71498,10 @@ const deserializeAws_ec2VpcPeeringConnectionStateReason = ( Message: undefined }; if (output["code"] !== undefined) { - contents.Code = - output["code"]["#text"] !== undefined - ? output["code"]["#text"] - : output["code"]; + contents.Code = output["code"]; } if (output["message"] !== undefined) { - contents.Message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.Message = output["message"]; } return contents; }; @@ -76413,10 +71521,7 @@ const deserializeAws_ec2VpcPeeringConnectionVpcInfo = ( VpcId: undefined }; if (output["cidrBlock"] !== undefined) { - contents.CidrBlock = - output["cidrBlock"]["#text"] !== undefined - ? output["cidrBlock"]["#text"] - : output["cidrBlock"]; + contents.CidrBlock = output["cidrBlock"]; } if (output.cidrBlockSet === "") { contents.CidrBlockSet = []; @@ -76443,10 +71548,7 @@ const deserializeAws_ec2VpcPeeringConnectionVpcInfo = ( ); } if (output["ownerId"] !== undefined) { - contents.OwnerId = - output["ownerId"]["#text"] !== undefined - ? output["ownerId"]["#text"] - : output["ownerId"]; + contents.OwnerId = output["ownerId"]; } if (output["peeringOptions"] !== undefined) { contents.PeeringOptions = deserializeAws_ec2VpcPeeringConnectionOptionsDescription( @@ -76455,16 +71557,10 @@ const deserializeAws_ec2VpcPeeringConnectionVpcInfo = ( ); } if (output["region"] !== undefined) { - contents.Region = - output["region"]["#text"] !== undefined - ? output["region"]["#text"] - : output["region"]; + contents.Region = output["region"]; } if (output["vpcId"] !== undefined) { - contents.VpcId = - output["vpcId"]["#text"] !== undefined - ? output["vpcId"]["#text"] - : output["vpcId"]; + contents.VpcId = output["vpcId"]; } return contents; }; @@ -76489,22 +71585,14 @@ const deserializeAws_ec2VpnConnection = ( VpnGatewayId: undefined }; if (output["category"] !== undefined) { - contents.Category = - output["category"]["#text"] !== undefined - ? output["category"]["#text"] - : output["category"]; + contents.Category = output["category"]; } if (output["customerGatewayConfiguration"] !== undefined) { contents.CustomerGatewayConfiguration = - output["customerGatewayConfiguration"]["#text"] !== undefined - ? output["customerGatewayConfiguration"]["#text"] - : output["customerGatewayConfiguration"]; + output["customerGatewayConfiguration"]; } if (output["customerGatewayId"] !== undefined) { - contents.CustomerGatewayId = - output["customerGatewayId"]["#text"] !== undefined - ? output["customerGatewayId"]["#text"] - : output["customerGatewayId"]; + contents.CustomerGatewayId = output["customerGatewayId"]; } if (output["options"] !== undefined) { contents.Options = deserializeAws_ec2VpnConnectionOptions( @@ -76525,10 +71613,7 @@ const deserializeAws_ec2VpnConnection = ( ); } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output.tagSet === "") { contents.Tags = []; @@ -76543,16 +71628,10 @@ const deserializeAws_ec2VpnConnection = ( ); } if (output["transitGatewayId"] !== undefined) { - contents.TransitGatewayId = - output["transitGatewayId"]["#text"] !== undefined - ? output["transitGatewayId"]["#text"] - : output["transitGatewayId"]; + contents.TransitGatewayId = output["transitGatewayId"]; } if (output["type"] !== undefined) { - contents.Type = - output["type"]["#text"] !== undefined - ? output["type"]["#text"] - : output["type"]; + contents.Type = output["type"]; } if (output.vgwTelemetry === "") { contents.VgwTelemetry = []; @@ -76567,16 +71646,10 @@ const deserializeAws_ec2VpnConnection = ( ); } if (output["vpnConnectionId"] !== undefined) { - contents.VpnConnectionId = - output["vpnConnectionId"]["#text"] !== undefined - ? output["vpnConnectionId"]["#text"] - : output["vpnConnectionId"]; + contents.VpnConnectionId = output["vpnConnectionId"]; } if (output["vpnGatewayId"] !== undefined) { - contents.VpnGatewayId = - output["vpnGatewayId"]["#text"] !== undefined - ? output["vpnGatewayId"]["#text"] - : output["vpnGatewayId"]; + contents.VpnGatewayId = output["vpnGatewayId"]; } return contents; }; @@ -76601,16 +71674,10 @@ const deserializeAws_ec2VpnConnectionOptions = ( TunnelOptions: undefined }; if (output["enableAcceleration"] !== undefined) { - contents.EnableAcceleration = - (output["enableAcceleration"]["#text"] !== undefined - ? output["enableAcceleration"]["#text"] - : output["enableAcceleration"]) == "true"; + contents.EnableAcceleration = output["enableAcceleration"] == "true"; } if (output["staticRoutesOnly"] !== undefined) { - contents.StaticRoutesOnly = - (output["staticRoutesOnly"]["#text"] !== undefined - ? output["staticRoutesOnly"]["#text"] - : output["staticRoutesOnly"]) == "true"; + contents.StaticRoutesOnly = output["staticRoutesOnly"] == "true"; } if (output.tunnelOptionSet === "") { contents.TunnelOptions = []; @@ -76642,23 +71709,13 @@ const deserializeAws_ec2VpnGateway = ( VpnGatewayId: undefined }; if (output["amazonSideAsn"] !== undefined) { - contents.AmazonSideAsn = parseInt( - output["amazonSideAsn"]["#text"] !== undefined - ? output["amazonSideAsn"]["#text"] - : output["amazonSideAsn"] - ); + contents.AmazonSideAsn = parseInt(output["amazonSideAsn"]); } if (output["availabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["availabilityZone"]["#text"] !== undefined - ? output["availabilityZone"]["#text"] - : output["availabilityZone"]; + contents.AvailabilityZone = output["availabilityZone"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } if (output.tagSet === "") { contents.Tags = []; @@ -76673,10 +71730,7 @@ const deserializeAws_ec2VpnGateway = ( ); } if (output["type"] !== undefined) { - contents.Type = - output["type"]["#text"] !== undefined - ? output["type"]["#text"] - : output["type"]; + contents.Type = output["type"]; } if (output.attachments === "") { contents.VpcAttachments = []; @@ -76691,10 +71745,7 @@ const deserializeAws_ec2VpnGateway = ( ); } if (output["vpnGatewayId"] !== undefined) { - contents.VpnGatewayId = - output["vpnGatewayId"]["#text"] !== undefined - ? output["vpnGatewayId"]["#text"] - : output["vpnGatewayId"]; + contents.VpnGatewayId = output["vpnGatewayId"]; } return contents; }; @@ -76719,22 +71770,13 @@ const deserializeAws_ec2VpnStaticRoute = ( State: undefined }; if (output["destinationCidrBlock"] !== undefined) { - contents.DestinationCidrBlock = - output["destinationCidrBlock"]["#text"] !== undefined - ? output["destinationCidrBlock"]["#text"] - : output["destinationCidrBlock"]; + contents.DestinationCidrBlock = output["destinationCidrBlock"]; } if (output["source"] !== undefined) { - contents.Source = - output["source"]["#text"] !== undefined - ? output["source"]["#text"] - : output["source"]; + contents.Source = output["source"]; } if (output["state"] !== undefined) { - contents.State = - output["state"]["#text"] !== undefined - ? output["state"]["#text"] - : output["state"]; + contents.State = output["state"]; } return contents; }; @@ -76840,7 +71882,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/clients/client-elastic-beanstalk/protocols/Aws_query.ts b/clients/client-elastic-beanstalk/protocols/Aws_query.ts index 4226c27d0324..2534d2483cc2 100644 --- a/clients/client-elastic-beanstalk/protocols/Aws_query.ts +++ b/clients/client-elastic-beanstalk/protocols/Aws_query.ts @@ -324,7 +324,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -5913,16 +5914,10 @@ const deserializeAws_queryApplicationDescription = ( Versions: undefined }; if (output["ApplicationArn"] !== undefined) { - contents.ApplicationArn = - output["ApplicationArn"]["#text"] !== undefined - ? output["ApplicationArn"]["#text"] - : output["ApplicationArn"]; + contents.ApplicationArn = output["ApplicationArn"]; } if (output["ApplicationName"] !== undefined) { - contents.ApplicationName = - output["ApplicationName"]["#text"] !== undefined - ? output["ApplicationName"]["#text"] - : output["ApplicationName"]; + contents.ApplicationName = output["ApplicationName"]; } if (output.ConfigurationTemplates === "") { contents.ConfigurationTemplates = []; @@ -5943,10 +5938,7 @@ const deserializeAws_queryApplicationDescription = ( contents.DateUpdated = new Date(output["DateUpdated"]); } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["ResourceLifecycleConfig"] !== undefined) { contents.ResourceLifecycleConfig = deserializeAws_queryApplicationResourceLifecycleConfig( @@ -6030,21 +6022,13 @@ const deserializeAws_queryApplicationMetrics = ( StatusCodes: undefined }; if (output["Duration"] !== undefined) { - contents.Duration = parseInt( - output["Duration"]["#text"] !== undefined - ? output["Duration"]["#text"] - : output["Duration"] - ); + contents.Duration = parseInt(output["Duration"]); } if (output["Latency"] !== undefined) { contents.Latency = deserializeAws_queryLatency(output["Latency"], context); } if (output["RequestCount"] !== undefined) { - contents.RequestCount = parseInt( - output["RequestCount"]["#text"] !== undefined - ? output["RequestCount"]["#text"] - : output["RequestCount"] - ); + contents.RequestCount = parseInt(output["RequestCount"]); } if (output["StatusCodes"] !== undefined) { contents.StatusCodes = deserializeAws_queryStatusCodes( @@ -6065,10 +6049,7 @@ const deserializeAws_queryApplicationResourceLifecycleConfig = ( VersionLifecycleConfig: undefined }; if (output["ServiceRole"] !== undefined) { - contents.ServiceRole = - output["ServiceRole"]["#text"] !== undefined - ? output["ServiceRole"]["#text"] - : output["ServiceRole"]; + contents.ServiceRole = output["ServiceRole"]; } if (output["VersionLifecycleConfig"] !== undefined) { contents.VersionLifecycleConfig = deserializeAws_queryApplicationVersionLifecycleConfig( @@ -6089,10 +6070,7 @@ const deserializeAws_queryApplicationResourceLifecycleDescriptionMessage = ( ResourceLifecycleConfig: undefined }; if (output["ApplicationName"] !== undefined) { - contents.ApplicationName = - output["ApplicationName"]["#text"] !== undefined - ? output["ApplicationName"]["#text"] - : output["ApplicationName"]; + contents.ApplicationName = output["ApplicationName"]; } if (output["ResourceLifecycleConfig"] !== undefined) { contents.ResourceLifecycleConfig = deserializeAws_queryApplicationResourceLifecycleConfig( @@ -6121,22 +6099,13 @@ const deserializeAws_queryApplicationVersionDescription = ( VersionLabel: undefined }; if (output["ApplicationName"] !== undefined) { - contents.ApplicationName = - output["ApplicationName"]["#text"] !== undefined - ? output["ApplicationName"]["#text"] - : output["ApplicationName"]; + contents.ApplicationName = output["ApplicationName"]; } if (output["ApplicationVersionArn"] !== undefined) { - contents.ApplicationVersionArn = - output["ApplicationVersionArn"]["#text"] !== undefined - ? output["ApplicationVersionArn"]["#text"] - : output["ApplicationVersionArn"]; + contents.ApplicationVersionArn = output["ApplicationVersionArn"]; } if (output["BuildArn"] !== undefined) { - contents.BuildArn = - output["BuildArn"]["#text"] !== undefined - ? output["BuildArn"]["#text"] - : output["BuildArn"]; + contents.BuildArn = output["BuildArn"]; } if (output["DateCreated"] !== undefined) { contents.DateCreated = new Date(output["DateCreated"]); @@ -6145,10 +6114,7 @@ const deserializeAws_queryApplicationVersionDescription = ( contents.DateUpdated = new Date(output["DateUpdated"]); } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["SourceBuildInformation"] !== undefined) { contents.SourceBuildInformation = deserializeAws_querySourceBuildInformation( @@ -6163,16 +6129,10 @@ const deserializeAws_queryApplicationVersionDescription = ( ); } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["VersionLabel"] !== undefined) { - contents.VersionLabel = - output["VersionLabel"]["#text"] !== undefined - ? output["VersionLabel"]["#text"] - : output["VersionLabel"]; + contents.VersionLabel = output["VersionLabel"]; } return contents; }; @@ -6225,10 +6185,7 @@ const deserializeAws_queryApplicationVersionDescriptionsMessage = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -6269,28 +6226,16 @@ const deserializeAws_queryApplyEnvironmentManagedActionResult = ( Status: undefined }; if (output["ActionDescription"] !== undefined) { - contents.ActionDescription = - output["ActionDescription"]["#text"] !== undefined - ? output["ActionDescription"]["#text"] - : output["ActionDescription"]; + contents.ActionDescription = output["ActionDescription"]; } if (output["ActionId"] !== undefined) { - contents.ActionId = - output["ActionId"]["#text"] !== undefined - ? output["ActionId"]["#text"] - : output["ActionId"]; + contents.ActionId = output["ActionId"]; } if (output["ActionType"] !== undefined) { - contents.ActionType = - output["ActionType"]["#text"] !== undefined - ? output["ActionType"]["#text"] - : output["ActionType"]; + contents.ActionType = output["ActionType"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -6304,10 +6249,7 @@ const deserializeAws_queryAutoScalingGroup = ( Name: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } return contents; }; @@ -6334,9 +6276,7 @@ const deserializeAws_queryAvailableSolutionStackNamesList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryBuilder = ( @@ -6348,10 +6288,7 @@ const deserializeAws_queryBuilder = ( ARN: undefined }; if (output["ARN"] !== undefined) { - contents.ARN = - output["ARN"]["#text"] !== undefined - ? output["ARN"]["#text"] - : output["ARN"]; + contents.ARN = output["ARN"]; } return contents; }; @@ -6372,60 +6309,28 @@ const deserializeAws_queryCPUUtilization = ( User: undefined }; if (output["IOWait"] !== undefined) { - contents.IOWait = parseFloat( - output["IOWait"]["#text"] !== undefined - ? output["IOWait"]["#text"] - : output["IOWait"] - ); + contents.IOWait = parseFloat(output["IOWait"]); } if (output["IRQ"] !== undefined) { - contents.IRQ = parseFloat( - output["IRQ"]["#text"] !== undefined - ? output["IRQ"]["#text"] - : output["IRQ"] - ); + contents.IRQ = parseFloat(output["IRQ"]); } if (output["Idle"] !== undefined) { - contents.Idle = parseFloat( - output["Idle"]["#text"] !== undefined - ? output["Idle"]["#text"] - : output["Idle"] - ); + contents.Idle = parseFloat(output["Idle"]); } if (output["Nice"] !== undefined) { - contents.Nice = parseFloat( - output["Nice"]["#text"] !== undefined - ? output["Nice"]["#text"] - : output["Nice"] - ); + contents.Nice = parseFloat(output["Nice"]); } if (output["Privileged"] !== undefined) { - contents.Privileged = parseFloat( - output["Privileged"]["#text"] !== undefined - ? output["Privileged"]["#text"] - : output["Privileged"] - ); + contents.Privileged = parseFloat(output["Privileged"]); } if (output["SoftIRQ"] !== undefined) { - contents.SoftIRQ = parseFloat( - output["SoftIRQ"]["#text"] !== undefined - ? output["SoftIRQ"]["#text"] - : output["SoftIRQ"] - ); + contents.SoftIRQ = parseFloat(output["SoftIRQ"]); } if (output["System"] !== undefined) { - contents.System = parseFloat( - output["System"]["#text"] !== undefined - ? output["System"]["#text"] - : output["System"] - ); + contents.System = parseFloat(output["System"]); } if (output["User"] !== undefined) { - contents.User = parseFloat( - output["User"]["#text"] !== undefined - ? output["User"]["#text"] - : output["User"] - ); + contents.User = parseFloat(output["User"]); } return contents; }; @@ -6434,9 +6339,7 @@ const deserializeAws_queryCauses = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryCheckDNSAvailabilityResultMessage = ( @@ -6449,16 +6352,10 @@ const deserializeAws_queryCheckDNSAvailabilityResultMessage = ( FullyQualifiedCNAME: undefined }; if (output["Available"] !== undefined) { - contents.Available = - (output["Available"]["#text"] !== undefined - ? output["Available"]["#text"] - : output["Available"]) == "true"; + contents.Available = output["Available"] == "true"; } if (output["FullyQualifiedCNAME"] !== undefined) { - contents.FullyQualifiedCNAME = - output["FullyQualifiedCNAME"]["#text"] !== undefined - ? output["FullyQualifiedCNAME"]["#text"] - : output["FullyQualifiedCNAME"]; + contents.FullyQualifiedCNAME = output["FullyQualifiedCNAME"]; } return contents; }; @@ -6472,10 +6369,7 @@ const deserializeAws_queryCodeBuildNotInServiceRegionException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -6499,49 +6393,25 @@ const deserializeAws_queryConfigurationOptionDescription = ( ValueType: undefined }; if (output["ChangeSeverity"] !== undefined) { - contents.ChangeSeverity = - output["ChangeSeverity"]["#text"] !== undefined - ? output["ChangeSeverity"]["#text"] - : output["ChangeSeverity"]; + contents.ChangeSeverity = output["ChangeSeverity"]; } if (output["DefaultValue"] !== undefined) { - contents.DefaultValue = - output["DefaultValue"]["#text"] !== undefined - ? output["DefaultValue"]["#text"] - : output["DefaultValue"]; + contents.DefaultValue = output["DefaultValue"]; } if (output["MaxLength"] !== undefined) { - contents.MaxLength = parseInt( - output["MaxLength"]["#text"] !== undefined - ? output["MaxLength"]["#text"] - : output["MaxLength"] - ); + contents.MaxLength = parseInt(output["MaxLength"]); } if (output["MaxValue"] !== undefined) { - contents.MaxValue = parseInt( - output["MaxValue"]["#text"] !== undefined - ? output["MaxValue"]["#text"] - : output["MaxValue"] - ); + contents.MaxValue = parseInt(output["MaxValue"]); } if (output["MinValue"] !== undefined) { - contents.MinValue = parseInt( - output["MinValue"]["#text"] !== undefined - ? output["MinValue"]["#text"] - : output["MinValue"] - ); + contents.MinValue = parseInt(output["MinValue"]); } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["Namespace"] !== undefined) { - contents.Namespace = - output["Namespace"]["#text"] !== undefined - ? output["Namespace"]["#text"] - : output["Namespace"]; + contents.Namespace = output["Namespace"]; } if (output["Regex"] !== undefined) { contents.Regex = deserializeAws_queryOptionRestrictionRegex( @@ -6550,10 +6420,7 @@ const deserializeAws_queryConfigurationOptionDescription = ( ); } if (output["UserDefined"] !== undefined) { - contents.UserDefined = - (output["UserDefined"]["#text"] !== undefined - ? output["UserDefined"]["#text"] - : output["UserDefined"]) == "true"; + contents.UserDefined = output["UserDefined"] == "true"; } if (output.ValueOptions === "") { contents.ValueOptions = []; @@ -6568,10 +6435,7 @@ const deserializeAws_queryConfigurationOptionDescription = ( ); } if (output["ValueType"] !== undefined) { - contents.ValueType = - output["ValueType"]["#text"] !== undefined - ? output["ValueType"]["#text"] - : output["ValueType"]; + contents.ValueType = output["ValueType"]; } return contents; }; @@ -6589,9 +6453,7 @@ const deserializeAws_queryConfigurationOptionPossibleValues = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryConfigurationOptionSetting = ( @@ -6606,28 +6468,16 @@ const deserializeAws_queryConfigurationOptionSetting = ( Value: undefined }; if (output["Namespace"] !== undefined) { - contents.Namespace = - output["Namespace"]["#text"] !== undefined - ? output["Namespace"]["#text"] - : output["Namespace"]; + contents.Namespace = output["Namespace"]; } if (output["OptionName"] !== undefined) { - contents.OptionName = - output["OptionName"]["#text"] !== undefined - ? output["OptionName"]["#text"] - : output["OptionName"]; + contents.OptionName = output["OptionName"]; } if (output["ResourceName"] !== undefined) { - contents.ResourceName = - output["ResourceName"]["#text"] !== undefined - ? output["ResourceName"]["#text"] - : output["ResourceName"]; + contents.ResourceName = output["ResourceName"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -6664,16 +6514,10 @@ const deserializeAws_queryConfigurationOptionsDescription = ( ); } if (output["PlatformArn"] !== undefined) { - contents.PlatformArn = - output["PlatformArn"]["#text"] !== undefined - ? output["PlatformArn"]["#text"] - : output["PlatformArn"]; + contents.PlatformArn = output["PlatformArn"]; } if (output["SolutionStackName"] !== undefined) { - contents.SolutionStackName = - output["SolutionStackName"]["#text"] !== undefined - ? output["SolutionStackName"]["#text"] - : output["SolutionStackName"]; + contents.SolutionStackName = output["SolutionStackName"]; } return contents; }; @@ -6696,10 +6540,7 @@ const deserializeAws_queryConfigurationSettingsDescription = ( TemplateName: undefined }; if (output["ApplicationName"] !== undefined) { - contents.ApplicationName = - output["ApplicationName"]["#text"] !== undefined - ? output["ApplicationName"]["#text"] - : output["ApplicationName"]; + contents.ApplicationName = output["ApplicationName"]; } if (output["DateCreated"] !== undefined) { contents.DateCreated = new Date(output["DateCreated"]); @@ -6708,22 +6549,13 @@ const deserializeAws_queryConfigurationSettingsDescription = ( contents.DateUpdated = new Date(output["DateUpdated"]); } if (output["DeploymentStatus"] !== undefined) { - contents.DeploymentStatus = - output["DeploymentStatus"]["#text"] !== undefined - ? output["DeploymentStatus"]["#text"] - : output["DeploymentStatus"]; + contents.DeploymentStatus = output["DeploymentStatus"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["EnvironmentName"] !== undefined) { - contents.EnvironmentName = - output["EnvironmentName"]["#text"] !== undefined - ? output["EnvironmentName"]["#text"] - : output["EnvironmentName"]; + contents.EnvironmentName = output["EnvironmentName"]; } if (output.OptionSettings === "") { contents.OptionSettings = []; @@ -6738,22 +6570,13 @@ const deserializeAws_queryConfigurationSettingsDescription = ( ); } if (output["PlatformArn"] !== undefined) { - contents.PlatformArn = - output["PlatformArn"]["#text"] !== undefined - ? output["PlatformArn"]["#text"] - : output["PlatformArn"]; + contents.PlatformArn = output["PlatformArn"]; } if (output["SolutionStackName"] !== undefined) { - contents.SolutionStackName = - output["SolutionStackName"]["#text"] !== undefined - ? output["SolutionStackName"]["#text"] - : output["SolutionStackName"]; + contents.SolutionStackName = output["SolutionStackName"]; } if (output["TemplateName"] !== undefined) { - contents.TemplateName = - output["TemplateName"]["#text"] !== undefined - ? output["TemplateName"]["#text"] - : output["TemplateName"]; + contents.TemplateName = output["TemplateName"]; } return contents; }; @@ -6817,9 +6640,7 @@ const deserializeAws_queryConfigurationTemplateNamesList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryCreatePlatformVersionResult = ( @@ -6852,10 +6673,7 @@ const deserializeAws_queryCreateStorageLocationResultMessage = ( S3Bucket: undefined }; if (output["S3Bucket"] !== undefined) { - contents.S3Bucket = - output["S3Bucket"]["#text"] !== undefined - ? output["S3Bucket"]["#text"] - : output["S3Bucket"]; + contents.S3Bucket = output["S3Bucket"]; } return contents; }; @@ -6870,16 +6688,10 @@ const deserializeAws_queryCustomAmi = ( VirtualizationType: undefined }; if (output["ImageId"] !== undefined) { - contents.ImageId = - output["ImageId"]["#text"] !== undefined - ? output["ImageId"]["#text"] - : output["ImageId"]; + contents.ImageId = output["ImageId"]; } if (output["VirtualizationType"] !== undefined) { - contents.VirtualizationType = - output["VirtualizationType"]["#text"] !== undefined - ? output["VirtualizationType"]["#text"] - : output["VirtualizationType"]; + contents.VirtualizationType = output["VirtualizationType"]; } return contents; }; @@ -6922,26 +6734,16 @@ const deserializeAws_queryDeployment = ( VersionLabel: undefined }; if (output["DeploymentId"] !== undefined) { - contents.DeploymentId = parseInt( - output["DeploymentId"]["#text"] !== undefined - ? output["DeploymentId"]["#text"] - : output["DeploymentId"] - ); + contents.DeploymentId = parseInt(output["DeploymentId"]); } if (output["DeploymentTime"] !== undefined) { contents.DeploymentTime = new Date(output["DeploymentTime"]); } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["VersionLabel"] !== undefined) { - contents.VersionLabel = - output["VersionLabel"]["#text"] !== undefined - ? output["VersionLabel"]["#text"] - : output["VersionLabel"]; + contents.VersionLabel = output["VersionLabel"]; } return contents; }; @@ -6997,22 +6799,13 @@ const deserializeAws_queryDescribeEnvironmentHealthResult = ( ); } if (output["Color"] !== undefined) { - contents.Color = - output["Color"]["#text"] !== undefined - ? output["Color"]["#text"] - : output["Color"]; + contents.Color = output["Color"]; } if (output["EnvironmentName"] !== undefined) { - contents.EnvironmentName = - output["EnvironmentName"]["#text"] !== undefined - ? output["EnvironmentName"]["#text"] - : output["EnvironmentName"]; + contents.EnvironmentName = output["EnvironmentName"]; } if (output["HealthStatus"] !== undefined) { - contents.HealthStatus = - output["HealthStatus"]["#text"] !== undefined - ? output["HealthStatus"]["#text"] - : output["HealthStatus"]; + contents.HealthStatus = output["HealthStatus"]; } if (output["InstancesHealth"] !== undefined) { contents.InstancesHealth = deserializeAws_queryInstanceHealthSummary( @@ -7024,10 +6817,7 @@ const deserializeAws_queryDescribeEnvironmentHealthResult = ( contents.RefreshedAt = new Date(output["RefreshedAt"]); } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -7054,10 +6844,7 @@ const deserializeAws_queryDescribeEnvironmentManagedActionHistoryResult = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -7108,10 +6895,7 @@ const deserializeAws_queryDescribeInstancesHealthResult = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output["RefreshedAt"] !== undefined) { contents.RefreshedAt = new Date(output["RefreshedAt"]); @@ -7145,10 +6929,7 @@ const deserializeAws_queryElasticBeanstalkServiceException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7182,21 +6963,13 @@ const deserializeAws_queryEnvironmentDescription = ( }; if (output["AbortableOperationInProgress"] !== undefined) { contents.AbortableOperationInProgress = - (output["AbortableOperationInProgress"]["#text"] !== undefined - ? output["AbortableOperationInProgress"]["#text"] - : output["AbortableOperationInProgress"]) == "true"; + output["AbortableOperationInProgress"] == "true"; } if (output["ApplicationName"] !== undefined) { - contents.ApplicationName = - output["ApplicationName"]["#text"] !== undefined - ? output["ApplicationName"]["#text"] - : output["ApplicationName"]; + contents.ApplicationName = output["ApplicationName"]; } if (output["CNAME"] !== undefined) { - contents.CNAME = - output["CNAME"]["#text"] !== undefined - ? output["CNAME"]["#text"] - : output["CNAME"]; + contents.CNAME = output["CNAME"]; } if (output["DateCreated"] !== undefined) { contents.DateCreated = new Date(output["DateCreated"]); @@ -7205,28 +6978,16 @@ const deserializeAws_queryEnvironmentDescription = ( contents.DateUpdated = new Date(output["DateUpdated"]); } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["EndpointURL"] !== undefined) { - contents.EndpointURL = - output["EndpointURL"]["#text"] !== undefined - ? output["EndpointURL"]["#text"] - : output["EndpointURL"]; + contents.EndpointURL = output["EndpointURL"]; } if (output["EnvironmentArn"] !== undefined) { - contents.EnvironmentArn = - output["EnvironmentArn"]["#text"] !== undefined - ? output["EnvironmentArn"]["#text"] - : output["EnvironmentArn"]; + contents.EnvironmentArn = output["EnvironmentArn"]; } if (output["EnvironmentId"] !== undefined) { - contents.EnvironmentId = - output["EnvironmentId"]["#text"] !== undefined - ? output["EnvironmentId"]["#text"] - : output["EnvironmentId"]; + contents.EnvironmentId = output["EnvironmentId"]; } if (output.EnvironmentLinks === "") { contents.EnvironmentLinks = []; @@ -7241,28 +7002,16 @@ const deserializeAws_queryEnvironmentDescription = ( ); } if (output["EnvironmentName"] !== undefined) { - contents.EnvironmentName = - output["EnvironmentName"]["#text"] !== undefined - ? output["EnvironmentName"]["#text"] - : output["EnvironmentName"]; + contents.EnvironmentName = output["EnvironmentName"]; } if (output["Health"] !== undefined) { - contents.Health = - output["Health"]["#text"] !== undefined - ? output["Health"]["#text"] - : output["Health"]; + contents.Health = output["Health"]; } if (output["HealthStatus"] !== undefined) { - contents.HealthStatus = - output["HealthStatus"]["#text"] !== undefined - ? output["HealthStatus"]["#text"] - : output["HealthStatus"]; + contents.HealthStatus = output["HealthStatus"]; } if (output["PlatformArn"] !== undefined) { - contents.PlatformArn = - output["PlatformArn"]["#text"] !== undefined - ? output["PlatformArn"]["#text"] - : output["PlatformArn"]; + contents.PlatformArn = output["PlatformArn"]; } if (output["Resources"] !== undefined) { contents.Resources = deserializeAws_queryEnvironmentResourcesDescription( @@ -7271,22 +7020,13 @@ const deserializeAws_queryEnvironmentDescription = ( ); } if (output["SolutionStackName"] !== undefined) { - contents.SolutionStackName = - output["SolutionStackName"]["#text"] !== undefined - ? output["SolutionStackName"]["#text"] - : output["SolutionStackName"]; + contents.SolutionStackName = output["SolutionStackName"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["TemplateName"] !== undefined) { - contents.TemplateName = - output["TemplateName"]["#text"] !== undefined - ? output["TemplateName"]["#text"] - : output["TemplateName"]; + contents.TemplateName = output["TemplateName"]; } if (output["Tier"] !== undefined) { contents.Tier = deserializeAws_queryEnvironmentTier( @@ -7295,10 +7035,7 @@ const deserializeAws_queryEnvironmentDescription = ( ); } if (output["VersionLabel"] !== undefined) { - contents.VersionLabel = - output["VersionLabel"]["#text"] !== undefined - ? output["VersionLabel"]["#text"] - : output["VersionLabel"]; + contents.VersionLabel = output["VersionLabel"]; } return contents; }; @@ -7334,10 +7071,7 @@ const deserializeAws_queryEnvironmentDescriptionsMessage = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -7354,22 +7088,13 @@ const deserializeAws_queryEnvironmentInfoDescription = ( SampleTimestamp: undefined }; if (output["Ec2InstanceId"] !== undefined) { - contents.Ec2InstanceId = - output["Ec2InstanceId"]["#text"] !== undefined - ? output["Ec2InstanceId"]["#text"] - : output["Ec2InstanceId"]; + contents.Ec2InstanceId = output["Ec2InstanceId"]; } if (output["InfoType"] !== undefined) { - contents.InfoType = - output["InfoType"]["#text"] !== undefined - ? output["InfoType"]["#text"] - : output["InfoType"]; + contents.InfoType = output["InfoType"]; } if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } if (output["SampleTimestamp"] !== undefined) { contents.SampleTimestamp = new Date(output["SampleTimestamp"]); @@ -7396,16 +7121,10 @@ const deserializeAws_queryEnvironmentLink = ( LinkName: undefined }; if (output["EnvironmentName"] !== undefined) { - contents.EnvironmentName = - output["EnvironmentName"]["#text"] !== undefined - ? output["EnvironmentName"]["#text"] - : output["EnvironmentName"]; + contents.EnvironmentName = output["EnvironmentName"]; } if (output["LinkName"] !== undefined) { - contents.LinkName = - output["LinkName"]["#text"] !== undefined - ? output["LinkName"]["#text"] - : output["LinkName"]; + contents.LinkName = output["LinkName"]; } return contents; }; @@ -7447,10 +7166,7 @@ const deserializeAws_queryEnvironmentResourceDescription = ( ); } if (output["EnvironmentName"] !== undefined) { - contents.EnvironmentName = - output["EnvironmentName"]["#text"] !== undefined - ? output["EnvironmentName"]["#text"] - : output["EnvironmentName"]; + contents.EnvironmentName = output["EnvironmentName"]; } if (output.Instances === "") { contents.Instances = []; @@ -7572,22 +7288,13 @@ const deserializeAws_queryEnvironmentTier = ( Version: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["Type"] !== undefined) { - contents.Type = - output["Type"]["#text"] !== undefined - ? output["Type"]["#text"] - : output["Type"]; + contents.Type = output["Type"]; } if (output["Version"] !== undefined) { - contents.Version = - output["Version"]["#text"] !== undefined - ? output["Version"]["#text"] - : output["Version"]; + contents.Version = output["Version"]; } return contents; }; @@ -7609,55 +7316,31 @@ const deserializeAws_queryEventDescription = ( VersionLabel: undefined }; if (output["ApplicationName"] !== undefined) { - contents.ApplicationName = - output["ApplicationName"]["#text"] !== undefined - ? output["ApplicationName"]["#text"] - : output["ApplicationName"]; + contents.ApplicationName = output["ApplicationName"]; } if (output["EnvironmentName"] !== undefined) { - contents.EnvironmentName = - output["EnvironmentName"]["#text"] !== undefined - ? output["EnvironmentName"]["#text"] - : output["EnvironmentName"]; + contents.EnvironmentName = output["EnvironmentName"]; } if (output["EventDate"] !== undefined) { contents.EventDate = new Date(output["EventDate"]); } if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } if (output["PlatformArn"] !== undefined) { - contents.PlatformArn = - output["PlatformArn"]["#text"] !== undefined - ? output["PlatformArn"]["#text"] - : output["PlatformArn"]; + contents.PlatformArn = output["PlatformArn"]; } if (output["RequestId"] !== undefined) { - contents.RequestId = - output["RequestId"]["#text"] !== undefined - ? output["RequestId"]["#text"] - : output["RequestId"]; + contents.RequestId = output["RequestId"]; } if (output["Severity"] !== undefined) { - contents.Severity = - output["Severity"]["#text"] !== undefined - ? output["Severity"]["#text"] - : output["Severity"]; + contents.Severity = output["Severity"]; } if (output["TemplateName"] !== undefined) { - contents.TemplateName = - output["TemplateName"]["#text"] !== undefined - ? output["TemplateName"]["#text"] - : output["TemplateName"]; + contents.TemplateName = output["TemplateName"]; } if (output["VersionLabel"] !== undefined) { - contents.VersionLabel = - output["VersionLabel"]["#text"] !== undefined - ? output["VersionLabel"]["#text"] - : output["VersionLabel"]; + contents.VersionLabel = output["VersionLabel"]; } return contents; }; @@ -7693,10 +7376,7 @@ const deserializeAws_queryEventDescriptionsMessage = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -7710,10 +7390,7 @@ const deserializeAws_queryInstance = ( Id: undefined }; if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } return contents; }; @@ -7743,58 +7420,28 @@ const deserializeAws_queryInstanceHealthSummary = ( Warning: undefined }; if (output["Degraded"] !== undefined) { - contents.Degraded = parseInt( - output["Degraded"]["#text"] !== undefined - ? output["Degraded"]["#text"] - : output["Degraded"] - ); + contents.Degraded = parseInt(output["Degraded"]); } if (output["Info"] !== undefined) { - contents.Info = parseInt( - output["Info"]["#text"] !== undefined - ? output["Info"]["#text"] - : output["Info"] - ); + contents.Info = parseInt(output["Info"]); } if (output["NoData"] !== undefined) { - contents.NoData = parseInt( - output["NoData"]["#text"] !== undefined - ? output["NoData"]["#text"] - : output["NoData"] - ); + contents.NoData = parseInt(output["NoData"]); } if (output["Ok"] !== undefined) { - contents.Ok = parseInt( - output["Ok"]["#text"] !== undefined ? output["Ok"]["#text"] : output["Ok"] - ); + contents.Ok = parseInt(output["Ok"]); } if (output["Pending"] !== undefined) { - contents.Pending = parseInt( - output["Pending"]["#text"] !== undefined - ? output["Pending"]["#text"] - : output["Pending"] - ); + contents.Pending = parseInt(output["Pending"]); } if (output["Severe"] !== undefined) { - contents.Severe = parseInt( - output["Severe"]["#text"] !== undefined - ? output["Severe"]["#text"] - : output["Severe"] - ); + contents.Severe = parseInt(output["Severe"]); } if (output["Unknown"] !== undefined) { - contents.Unknown = parseInt( - output["Unknown"]["#text"] !== undefined - ? output["Unknown"]["#text"] - : output["Unknown"] - ); + contents.Unknown = parseInt(output["Unknown"]); } if (output["Warning"] !== undefined) { - contents.Warning = parseInt( - output["Warning"]["#text"] !== undefined - ? output["Warning"]["#text"] - : output["Warning"] - ); + contents.Warning = parseInt(output["Warning"]); } return contents; }; @@ -7817,10 +7464,7 @@ const deserializeAws_queryInsufficientPrivilegesException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7834,10 +7478,7 @@ const deserializeAws_queryInvalidRequestException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -7858,60 +7499,28 @@ const deserializeAws_queryLatency = ( P999: undefined }; if (output["P10"] !== undefined) { - contents.P10 = parseFloat( - output["P10"]["#text"] !== undefined - ? output["P10"]["#text"] - : output["P10"] - ); + contents.P10 = parseFloat(output["P10"]); } if (output["P50"] !== undefined) { - contents.P50 = parseFloat( - output["P50"]["#text"] !== undefined - ? output["P50"]["#text"] - : output["P50"] - ); + contents.P50 = parseFloat(output["P50"]); } if (output["P75"] !== undefined) { - contents.P75 = parseFloat( - output["P75"]["#text"] !== undefined - ? output["P75"]["#text"] - : output["P75"] - ); + contents.P75 = parseFloat(output["P75"]); } if (output["P85"] !== undefined) { - contents.P85 = parseFloat( - output["P85"]["#text"] !== undefined - ? output["P85"]["#text"] - : output["P85"] - ); + contents.P85 = parseFloat(output["P85"]); } if (output["P90"] !== undefined) { - contents.P90 = parseFloat( - output["P90"]["#text"] !== undefined - ? output["P90"]["#text"] - : output["P90"] - ); + contents.P90 = parseFloat(output["P90"]); } if (output["P95"] !== undefined) { - contents.P95 = parseFloat( - output["P95"]["#text"] !== undefined - ? output["P95"]["#text"] - : output["P95"] - ); + contents.P95 = parseFloat(output["P95"]); } if (output["P99"] !== undefined) { - contents.P99 = parseFloat( - output["P99"]["#text"] !== undefined - ? output["P99"]["#text"] - : output["P99"] - ); + contents.P99 = parseFloat(output["P99"]); } if (output["P999"] !== undefined) { - contents.P999 = parseFloat( - output["P999"]["#text"] !== undefined - ? output["P999"]["#text"] - : output["P999"] - ); + contents.P999 = parseFloat(output["P999"]); } return contents; }; @@ -7925,10 +7534,7 @@ const deserializeAws_queryLaunchConfiguration = ( Name: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } return contents; }; @@ -7951,10 +7557,7 @@ const deserializeAws_queryLaunchTemplate = ( Id: undefined }; if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } return contents; }; @@ -8014,10 +7617,7 @@ const deserializeAws_queryListPlatformVersionsResult = ( PlatformSummaryList: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.PlatformSummaryList === "") { contents.PlatformSummaryList = []; @@ -8044,17 +7644,10 @@ const deserializeAws_queryListener = ( Protocol: undefined }; if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } if (output["Protocol"] !== undefined) { - contents.Protocol = - output["Protocol"]["#text"] !== undefined - ? output["Protocol"]["#text"] - : output["Protocol"]; + contents.Protocol = output["Protocol"]; } return contents; }; @@ -8063,9 +7656,7 @@ const deserializeAws_queryLoadAverage = ( output: any, context: __SerdeContext ): number[] => { - return (output || []).map((entry: any) => - parseFloat(entry["#text"] !== undefined ? entry["#text"] : entry) - ); + return (output || []).map((entry: any) => parseFloat(entry)); }; const deserializeAws_queryLoadBalancer = ( @@ -8077,10 +7668,7 @@ const deserializeAws_queryLoadBalancer = ( Name: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } return contents; }; @@ -8096,10 +7684,7 @@ const deserializeAws_queryLoadBalancerDescription = ( LoadBalancerName: undefined }; if (output["Domain"] !== undefined) { - contents.Domain = - output["Domain"]["#text"] !== undefined - ? output["Domain"]["#text"] - : output["Domain"]; + contents.Domain = output["Domain"]; } if (output.Listeners === "") { contents.Listeners = []; @@ -8114,10 +7699,7 @@ const deserializeAws_queryLoadBalancerDescription = ( ); } if (output["LoadBalancerName"] !== undefined) { - contents.LoadBalancerName = - output["LoadBalancerName"]["#text"] !== undefined - ? output["LoadBalancerName"]["#text"] - : output["LoadBalancerName"]; + contents.LoadBalancerName = output["LoadBalancerName"]; } return contents; }; @@ -8153,28 +7735,16 @@ const deserializeAws_queryManagedAction = ( WindowStartTime: undefined }; if (output["ActionDescription"] !== undefined) { - contents.ActionDescription = - output["ActionDescription"]["#text"] !== undefined - ? output["ActionDescription"]["#text"] - : output["ActionDescription"]; + contents.ActionDescription = output["ActionDescription"]; } if (output["ActionId"] !== undefined) { - contents.ActionId = - output["ActionId"]["#text"] !== undefined - ? output["ActionId"]["#text"] - : output["ActionId"]; + contents.ActionId = output["ActionId"]; } if (output["ActionType"] !== undefined) { - contents.ActionType = - output["ActionType"]["#text"] !== undefined - ? output["ActionType"]["#text"] - : output["ActionType"]; + contents.ActionType = output["ActionType"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["WindowStartTime"] !== undefined) { contents.WindowStartTime = new Date(output["WindowStartTime"]); @@ -8198,46 +7768,28 @@ const deserializeAws_queryManagedActionHistoryItem = ( Status: undefined }; if (output["ActionDescription"] !== undefined) { - contents.ActionDescription = - output["ActionDescription"]["#text"] !== undefined - ? output["ActionDescription"]["#text"] - : output["ActionDescription"]; + contents.ActionDescription = output["ActionDescription"]; } if (output["ActionId"] !== undefined) { - contents.ActionId = - output["ActionId"]["#text"] !== undefined - ? output["ActionId"]["#text"] - : output["ActionId"]; + contents.ActionId = output["ActionId"]; } if (output["ActionType"] !== undefined) { - contents.ActionType = - output["ActionType"]["#text"] !== undefined - ? output["ActionType"]["#text"] - : output["ActionType"]; + contents.ActionType = output["ActionType"]; } if (output["ExecutedTime"] !== undefined) { contents.ExecutedTime = new Date(output["ExecutedTime"]); } if (output["FailureDescription"] !== undefined) { - contents.FailureDescription = - output["FailureDescription"]["#text"] !== undefined - ? output["FailureDescription"]["#text"] - : output["FailureDescription"]; + contents.FailureDescription = output["FailureDescription"]; } if (output["FailureType"] !== undefined) { - contents.FailureType = - output["FailureType"]["#text"] !== undefined - ? output["FailureType"]["#text"] - : output["FailureType"]; + contents.FailureType = output["FailureType"]; } if (output["FinishedTime"] !== undefined) { contents.FinishedTime = new Date(output["FinishedTime"]); } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -8260,10 +7812,7 @@ const deserializeAws_queryManagedActionInvalidStateException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -8288,23 +7837,13 @@ const deserializeAws_queryMaxAgeRule = ( MaxAgeInDays: undefined }; if (output["DeleteSourceFromS3"] !== undefined) { - contents.DeleteSourceFromS3 = - (output["DeleteSourceFromS3"]["#text"] !== undefined - ? output["DeleteSourceFromS3"]["#text"] - : output["DeleteSourceFromS3"]) == "true"; + contents.DeleteSourceFromS3 = output["DeleteSourceFromS3"] == "true"; } if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } if (output["MaxAgeInDays"] !== undefined) { - contents.MaxAgeInDays = parseInt( - output["MaxAgeInDays"]["#text"] !== undefined - ? output["MaxAgeInDays"]["#text"] - : output["MaxAgeInDays"] - ); + contents.MaxAgeInDays = parseInt(output["MaxAgeInDays"]); } return contents; }; @@ -8320,23 +7859,13 @@ const deserializeAws_queryMaxCountRule = ( MaxCount: undefined }; if (output["DeleteSourceFromS3"] !== undefined) { - contents.DeleteSourceFromS3 = - (output["DeleteSourceFromS3"]["#text"] !== undefined - ? output["DeleteSourceFromS3"]["#text"] - : output["DeleteSourceFromS3"]) == "true"; + contents.DeleteSourceFromS3 = output["DeleteSourceFromS3"] == "true"; } if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } if (output["MaxCount"] !== undefined) { - contents.MaxCount = parseInt( - output["MaxCount"]["#text"] !== undefined - ? output["MaxCount"]["#text"] - : output["MaxCount"] - ); + contents.MaxCount = parseInt(output["MaxCount"]); } return contents; }; @@ -8350,10 +7879,7 @@ const deserializeAws_queryOperationInProgressException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -8368,16 +7894,10 @@ const deserializeAws_queryOptionRestrictionRegex = ( Pattern: undefined }; if (output["Label"] !== undefined) { - contents.Label = - output["Label"]["#text"] !== undefined - ? output["Label"]["#text"] - : output["Label"]; + contents.Label = output["Label"]; } if (output["Pattern"] !== undefined) { - contents.Pattern = - output["Pattern"]["#text"] !== undefined - ? output["Pattern"]["#text"] - : output["Pattern"]; + contents.Pattern = output["Pattern"]; } return contents; }; @@ -8426,10 +7946,7 @@ const deserializeAws_queryPlatformDescription = ( contents.DateUpdated = new Date(output["DateUpdated"]); } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output.Frameworks === "") { contents.Frameworks = []; @@ -8444,58 +7961,31 @@ const deserializeAws_queryPlatformDescription = ( ); } if (output["Maintainer"] !== undefined) { - contents.Maintainer = - output["Maintainer"]["#text"] !== undefined - ? output["Maintainer"]["#text"] - : output["Maintainer"]; + contents.Maintainer = output["Maintainer"]; } if (output["OperatingSystemName"] !== undefined) { - contents.OperatingSystemName = - output["OperatingSystemName"]["#text"] !== undefined - ? output["OperatingSystemName"]["#text"] - : output["OperatingSystemName"]; + contents.OperatingSystemName = output["OperatingSystemName"]; } if (output["OperatingSystemVersion"] !== undefined) { - contents.OperatingSystemVersion = - output["OperatingSystemVersion"]["#text"] !== undefined - ? output["OperatingSystemVersion"]["#text"] - : output["OperatingSystemVersion"]; + contents.OperatingSystemVersion = output["OperatingSystemVersion"]; } if (output["PlatformArn"] !== undefined) { - contents.PlatformArn = - output["PlatformArn"]["#text"] !== undefined - ? output["PlatformArn"]["#text"] - : output["PlatformArn"]; + contents.PlatformArn = output["PlatformArn"]; } if (output["PlatformCategory"] !== undefined) { - contents.PlatformCategory = - output["PlatformCategory"]["#text"] !== undefined - ? output["PlatformCategory"]["#text"] - : output["PlatformCategory"]; + contents.PlatformCategory = output["PlatformCategory"]; } if (output["PlatformName"] !== undefined) { - contents.PlatformName = - output["PlatformName"]["#text"] !== undefined - ? output["PlatformName"]["#text"] - : output["PlatformName"]; + contents.PlatformName = output["PlatformName"]; } if (output["PlatformOwner"] !== undefined) { - contents.PlatformOwner = - output["PlatformOwner"]["#text"] !== undefined - ? output["PlatformOwner"]["#text"] - : output["PlatformOwner"]; + contents.PlatformOwner = output["PlatformOwner"]; } if (output["PlatformStatus"] !== undefined) { - contents.PlatformStatus = - output["PlatformStatus"]["#text"] !== undefined - ? output["PlatformStatus"]["#text"] - : output["PlatformStatus"]; + contents.PlatformStatus = output["PlatformStatus"]; } if (output["PlatformVersion"] !== undefined) { - contents.PlatformVersion = - output["PlatformVersion"]["#text"] !== undefined - ? output["PlatformVersion"]["#text"] - : output["PlatformVersion"]; + contents.PlatformVersion = output["PlatformVersion"]; } if (output.ProgrammingLanguages === "") { contents.ProgrammingLanguages = []; @@ -8510,10 +8000,7 @@ const deserializeAws_queryPlatformDescription = ( ); } if (output["SolutionStackName"] !== undefined) { - contents.SolutionStackName = - output["SolutionStackName"]["#text"] !== undefined - ? output["SolutionStackName"]["#text"] - : output["SolutionStackName"]; + contents.SolutionStackName = output["SolutionStackName"]; } if (output.SupportedAddonList === "") { contents.SupportedAddonList = []; @@ -8552,16 +8039,10 @@ const deserializeAws_queryPlatformFramework = ( Version: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["Version"] !== undefined) { - contents.Version = - output["Version"]["#text"] !== undefined - ? output["Version"]["#text"] - : output["Version"]; + contents.Version = output["Version"]; } return contents; }; @@ -8585,16 +8066,10 @@ const deserializeAws_queryPlatformProgrammingLanguage = ( Version: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["Version"] !== undefined) { - contents.Version = - output["Version"]["#text"] !== undefined - ? output["Version"]["#text"] - : output["Version"]; + contents.Version = output["Version"]; } return contents; }; @@ -8624,40 +8099,22 @@ const deserializeAws_queryPlatformSummary = ( SupportedTierList: undefined }; if (output["OperatingSystemName"] !== undefined) { - contents.OperatingSystemName = - output["OperatingSystemName"]["#text"] !== undefined - ? output["OperatingSystemName"]["#text"] - : output["OperatingSystemName"]; + contents.OperatingSystemName = output["OperatingSystemName"]; } if (output["OperatingSystemVersion"] !== undefined) { - contents.OperatingSystemVersion = - output["OperatingSystemVersion"]["#text"] !== undefined - ? output["OperatingSystemVersion"]["#text"] - : output["OperatingSystemVersion"]; + contents.OperatingSystemVersion = output["OperatingSystemVersion"]; } if (output["PlatformArn"] !== undefined) { - contents.PlatformArn = - output["PlatformArn"]["#text"] !== undefined - ? output["PlatformArn"]["#text"] - : output["PlatformArn"]; + contents.PlatformArn = output["PlatformArn"]; } if (output["PlatformCategory"] !== undefined) { - contents.PlatformCategory = - output["PlatformCategory"]["#text"] !== undefined - ? output["PlatformCategory"]["#text"] - : output["PlatformCategory"]; + contents.PlatformCategory = output["PlatformCategory"]; } if (output["PlatformOwner"] !== undefined) { - contents.PlatformOwner = - output["PlatformOwner"]["#text"] !== undefined - ? output["PlatformOwner"]["#text"] - : output["PlatformOwner"]; + contents.PlatformOwner = output["PlatformOwner"]; } if (output["PlatformStatus"] !== undefined) { - contents.PlatformStatus = - output["PlatformStatus"]["#text"] !== undefined - ? output["PlatformStatus"]["#text"] - : output["PlatformStatus"]; + contents.PlatformStatus = output["PlatformStatus"]; } if (output.SupportedAddonList === "") { contents.SupportedAddonList = []; @@ -8704,10 +8161,7 @@ const deserializeAws_queryPlatformVersionStillReferencedException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -8722,16 +8176,10 @@ const deserializeAws_queryQueue = ( URL: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["URL"] !== undefined) { - contents.URL = - output["URL"]["#text"] !== undefined - ? output["URL"]["#text"] - : output["URL"]; + contents.URL = output["URL"]; } return contents; }; @@ -8754,10 +8202,7 @@ const deserializeAws_queryResourceNotFoundException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -8771,11 +8216,7 @@ const deserializeAws_queryResourceQuota = ( Maximum: undefined }; if (output["Maximum"] !== undefined) { - contents.Maximum = parseInt( - output["Maximum"]["#text"] !== undefined - ? output["Maximum"]["#text"] - : output["Maximum"] - ); + contents.Maximum = parseInt(output["Maximum"]); } return contents; }; @@ -8835,10 +8276,7 @@ const deserializeAws_queryResourceTagsDescriptionMessage = ( ResourceTags: undefined }; if (output["ResourceArn"] !== undefined) { - contents.ResourceArn = - output["ResourceArn"]["#text"] !== undefined - ? output["ResourceArn"]["#text"] - : output["ResourceArn"]; + contents.ResourceArn = output["ResourceArn"]; } if (output.ResourceTags === "") { contents.ResourceTags = []; @@ -8864,10 +8302,7 @@ const deserializeAws_queryResourceTypeNotSupportedException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -8905,16 +8340,10 @@ const deserializeAws_queryS3Location = ( S3Key: undefined }; if (output["S3Bucket"] !== undefined) { - contents.S3Bucket = - output["S3Bucket"]["#text"] !== undefined - ? output["S3Bucket"]["#text"] - : output["S3Bucket"]; + contents.S3Bucket = output["S3Bucket"]; } if (output["S3Key"] !== undefined) { - contents.S3Key = - output["S3Key"]["#text"] !== undefined - ? output["S3Key"]["#text"] - : output["S3Key"]; + contents.S3Key = output["S3Key"]; } return contents; }; @@ -8928,10 +8357,7 @@ const deserializeAws_queryS3LocationNotInServiceRegionException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -8945,10 +8371,7 @@ const deserializeAws_queryS3SubscriptionRequiredException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -8977,10 +8400,7 @@ const deserializeAws_querySingleInstanceHealth = ( ); } if (output["AvailabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["AvailabilityZone"]["#text"] !== undefined - ? output["AvailabilityZone"]["#text"] - : output["AvailabilityZone"]; + contents.AvailabilityZone = output["AvailabilityZone"]; } if (output.Causes === "") { contents.Causes = []; @@ -8995,10 +8415,7 @@ const deserializeAws_querySingleInstanceHealth = ( ); } if (output["Color"] !== undefined) { - contents.Color = - output["Color"]["#text"] !== undefined - ? output["Color"]["#text"] - : output["Color"]; + contents.Color = output["Color"]; } if (output["Deployment"] !== undefined) { contents.Deployment = deserializeAws_queryDeployment( @@ -9007,22 +8424,13 @@ const deserializeAws_querySingleInstanceHealth = ( ); } if (output["HealthStatus"] !== undefined) { - contents.HealthStatus = - output["HealthStatus"]["#text"] !== undefined - ? output["HealthStatus"]["#text"] - : output["HealthStatus"]; + contents.HealthStatus = output["HealthStatus"]; } if (output["InstanceId"] !== undefined) { - contents.InstanceId = - output["InstanceId"]["#text"] !== undefined - ? output["InstanceId"]["#text"] - : output["InstanceId"]; + contents.InstanceId = output["InstanceId"]; } if (output["InstanceType"] !== undefined) { - contents.InstanceType = - output["InstanceType"]["#text"] !== undefined - ? output["InstanceType"]["#text"] - : output["InstanceType"]; + contents.InstanceType = output["InstanceType"]; } if (output["LaunchedAt"] !== undefined) { contents.LaunchedAt = new Date(output["LaunchedAt"]); @@ -9058,10 +8466,7 @@ const deserializeAws_querySolutionStackDescription = ( ); } if (output["SolutionStackName"] !== undefined) { - contents.SolutionStackName = - output["SolutionStackName"]["#text"] !== undefined - ? output["SolutionStackName"]["#text"] - : output["SolutionStackName"]; + contents.SolutionStackName = output["SolutionStackName"]; } return contents; }; @@ -9070,9 +8475,7 @@ const deserializeAws_querySolutionStackFileTypeList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_querySourceBuildInformation = ( @@ -9086,22 +8489,13 @@ const deserializeAws_querySourceBuildInformation = ( SourceType: undefined }; if (output["SourceLocation"] !== undefined) { - contents.SourceLocation = - output["SourceLocation"]["#text"] !== undefined - ? output["SourceLocation"]["#text"] - : output["SourceLocation"]; + contents.SourceLocation = output["SourceLocation"]; } if (output["SourceRepository"] !== undefined) { - contents.SourceRepository = - output["SourceRepository"]["#text"] !== undefined - ? output["SourceRepository"]["#text"] - : output["SourceRepository"]; + contents.SourceRepository = output["SourceRepository"]; } if (output["SourceType"] !== undefined) { - contents.SourceType = - output["SourceType"]["#text"] !== undefined - ? output["SourceType"]["#text"] - : output["SourceType"]; + contents.SourceType = output["SourceType"]; } return contents; }; @@ -9115,10 +8509,7 @@ const deserializeAws_querySourceBundleDeletionException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9135,32 +8526,16 @@ const deserializeAws_queryStatusCodes = ( Status5xx: undefined }; if (output["Status2xx"] !== undefined) { - contents.Status2xx = parseInt( - output["Status2xx"]["#text"] !== undefined - ? output["Status2xx"]["#text"] - : output["Status2xx"] - ); + contents.Status2xx = parseInt(output["Status2xx"]); } if (output["Status3xx"] !== undefined) { - contents.Status3xx = parseInt( - output["Status3xx"]["#text"] !== undefined - ? output["Status3xx"]["#text"] - : output["Status3xx"] - ); + contents.Status3xx = parseInt(output["Status3xx"]); } if (output["Status4xx"] !== undefined) { - contents.Status4xx = parseInt( - output["Status4xx"]["#text"] !== undefined - ? output["Status4xx"]["#text"] - : output["Status4xx"] - ); + contents.Status4xx = parseInt(output["Status4xx"]); } if (output["Status5xx"] !== undefined) { - contents.Status5xx = parseInt( - output["Status5xx"]["#text"] !== undefined - ? output["Status5xx"]["#text"] - : output["Status5xx"] - ); + contents.Status5xx = parseInt(output["Status5xx"]); } return contents; }; @@ -9169,18 +8544,14 @@ const deserializeAws_querySupportedAddonList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_querySupportedTierList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_querySystemStatus = ( @@ -9220,16 +8591,10 @@ const deserializeAws_queryTag = (output: any, context: __SerdeContext): Tag => { Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -9252,10 +8617,7 @@ const deserializeAws_queryTooManyApplicationVersionsException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9269,10 +8631,7 @@ const deserializeAws_queryTooManyApplicationsException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9286,10 +8645,7 @@ const deserializeAws_queryTooManyBucketsException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9303,10 +8659,7 @@ const deserializeAws_queryTooManyConfigurationTemplatesException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9320,10 +8673,7 @@ const deserializeAws_queryTooManyEnvironmentsException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9337,10 +8687,7 @@ const deserializeAws_queryTooManyPlatformsException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9354,10 +8701,7 @@ const deserializeAws_queryTooManyTagsException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9371,10 +8715,7 @@ const deserializeAws_queryTrigger = ( Name: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } return contents; }; @@ -9400,28 +8741,16 @@ const deserializeAws_queryValidationMessage = ( Severity: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } if (output["Namespace"] !== undefined) { - contents.Namespace = - output["Namespace"]["#text"] !== undefined - ? output["Namespace"]["#text"] - : output["Namespace"]; + contents.Namespace = output["Namespace"]; } if (output["OptionName"] !== undefined) { - contents.OptionName = - output["OptionName"]["#text"] !== undefined - ? output["OptionName"]["#text"] - : output["OptionName"]; + contents.OptionName = output["OptionName"]; } if (output["Severity"] !== undefined) { - contents.Severity = - output["Severity"]["#text"] !== undefined - ? output["Severity"]["#text"] - : output["Severity"]; + contents.Severity = output["Severity"]; } return contents; }; @@ -9439,9 +8768,7 @@ const deserializeAws_queryVersionLabelsList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ @@ -9519,7 +8846,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/clients/client-elastic-load-balancing-v2/protocols/Aws_query.ts b/clients/client-elastic-load-balancing-v2/protocols/Aws_query.ts index 0434c296051a..80e617c5b599 100644 --- a/clients/client-elastic-load-balancing-v2/protocols/Aws_query.ts +++ b/clients/client-elastic-load-balancing-v2/protocols/Aws_query.ts @@ -284,7 +284,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -6616,11 +6617,7 @@ const deserializeAws_queryAction = ( ); } if (output["Order"] !== undefined) { - contents.Order = parseInt( - output["Order"]["#text"] !== undefined - ? output["Order"]["#text"] - : output["Order"] - ); + contents.Order = parseInt(output["Order"]); } if (output["RedirectConfig"] !== undefined) { contents.RedirectConfig = deserializeAws_queryRedirectActionConfig( @@ -6629,16 +6626,10 @@ const deserializeAws_queryAction = ( ); } if (output["TargetGroupArn"] !== undefined) { - contents.TargetGroupArn = - output["TargetGroupArn"]["#text"] !== undefined - ? output["TargetGroupArn"]["#text"] - : output["TargetGroupArn"]; + contents.TargetGroupArn = output["TargetGroupArn"]; } if (output["Type"] !== undefined) { - contents.Type = - output["Type"]["#text"] !== undefined - ? output["Type"]["#text"] - : output["Type"]; + contents.Type = output["Type"]; } return contents; }; @@ -6694,10 +6685,7 @@ const deserializeAws_queryAllocationIdNotFoundException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -6707,10 +6695,7 @@ const deserializeAws_queryAuthenticateCognitoActionAuthenticationRequestExtraPar context: __SerdeContext ): { [key: string]: string } => { return output.reduce((acc: any, pair: any) => { - acc[pair["key"]] = - pair["value"]["#text"] !== undefined - ? pair["value"]["#text"] - : pair["value"]; + acc[pair["key"]] = pair["value"]; return acc; }, {}); }; @@ -6745,47 +6730,25 @@ const deserializeAws_queryAuthenticateCognitoActionConfig = ( ); } if (output["OnUnauthenticatedRequest"] !== undefined) { - contents.OnUnauthenticatedRequest = - output["OnUnauthenticatedRequest"]["#text"] !== undefined - ? output["OnUnauthenticatedRequest"]["#text"] - : output["OnUnauthenticatedRequest"]; + contents.OnUnauthenticatedRequest = output["OnUnauthenticatedRequest"]; } if (output["Scope"] !== undefined) { - contents.Scope = - output["Scope"]["#text"] !== undefined - ? output["Scope"]["#text"] - : output["Scope"]; + contents.Scope = output["Scope"]; } if (output["SessionCookieName"] !== undefined) { - contents.SessionCookieName = - output["SessionCookieName"]["#text"] !== undefined - ? output["SessionCookieName"]["#text"] - : output["SessionCookieName"]; + contents.SessionCookieName = output["SessionCookieName"]; } if (output["SessionTimeout"] !== undefined) { - contents.SessionTimeout = parseInt( - output["SessionTimeout"]["#text"] !== undefined - ? output["SessionTimeout"]["#text"] - : output["SessionTimeout"] - ); + contents.SessionTimeout = parseInt(output["SessionTimeout"]); } if (output["UserPoolArn"] !== undefined) { - contents.UserPoolArn = - output["UserPoolArn"]["#text"] !== undefined - ? output["UserPoolArn"]["#text"] - : output["UserPoolArn"]; + contents.UserPoolArn = output["UserPoolArn"]; } if (output["UserPoolClientId"] !== undefined) { - contents.UserPoolClientId = - output["UserPoolClientId"]["#text"] !== undefined - ? output["UserPoolClientId"]["#text"] - : output["UserPoolClientId"]; + contents.UserPoolClientId = output["UserPoolClientId"]; } if (output["UserPoolDomain"] !== undefined) { - contents.UserPoolDomain = - output["UserPoolDomain"]["#text"] !== undefined - ? output["UserPoolDomain"]["#text"] - : output["UserPoolDomain"]; + contents.UserPoolDomain = output["UserPoolDomain"]; } return contents; }; @@ -6795,10 +6758,7 @@ const deserializeAws_queryAuthenticateOidcActionAuthenticationRequestExtraParams context: __SerdeContext ): { [key: string]: string } => { return output.reduce((acc: any, pair: any) => { - acc[pair["key"]] = - pair["value"]["#text"] !== undefined - ? pair["value"]["#text"] - : pair["value"]; + acc[pair["key"]] = pair["value"]; return acc; }, {}); }; @@ -6837,71 +6797,38 @@ const deserializeAws_queryAuthenticateOidcActionConfig = ( ); } if (output["AuthorizationEndpoint"] !== undefined) { - contents.AuthorizationEndpoint = - output["AuthorizationEndpoint"]["#text"] !== undefined - ? output["AuthorizationEndpoint"]["#text"] - : output["AuthorizationEndpoint"]; + contents.AuthorizationEndpoint = output["AuthorizationEndpoint"]; } if (output["ClientId"] !== undefined) { - contents.ClientId = - output["ClientId"]["#text"] !== undefined - ? output["ClientId"]["#text"] - : output["ClientId"]; + contents.ClientId = output["ClientId"]; } if (output["ClientSecret"] !== undefined) { - contents.ClientSecret = - output["ClientSecret"]["#text"] !== undefined - ? output["ClientSecret"]["#text"] - : output["ClientSecret"]; + contents.ClientSecret = output["ClientSecret"]; } if (output["Issuer"] !== undefined) { - contents.Issuer = - output["Issuer"]["#text"] !== undefined - ? output["Issuer"]["#text"] - : output["Issuer"]; + contents.Issuer = output["Issuer"]; } if (output["OnUnauthenticatedRequest"] !== undefined) { - contents.OnUnauthenticatedRequest = - output["OnUnauthenticatedRequest"]["#text"] !== undefined - ? output["OnUnauthenticatedRequest"]["#text"] - : output["OnUnauthenticatedRequest"]; + contents.OnUnauthenticatedRequest = output["OnUnauthenticatedRequest"]; } if (output["Scope"] !== undefined) { - contents.Scope = - output["Scope"]["#text"] !== undefined - ? output["Scope"]["#text"] - : output["Scope"]; + contents.Scope = output["Scope"]; } if (output["SessionCookieName"] !== undefined) { - contents.SessionCookieName = - output["SessionCookieName"]["#text"] !== undefined - ? output["SessionCookieName"]["#text"] - : output["SessionCookieName"]; + contents.SessionCookieName = output["SessionCookieName"]; } if (output["SessionTimeout"] !== undefined) { - contents.SessionTimeout = parseInt( - output["SessionTimeout"]["#text"] !== undefined - ? output["SessionTimeout"]["#text"] - : output["SessionTimeout"] - ); + contents.SessionTimeout = parseInt(output["SessionTimeout"]); } if (output["TokenEndpoint"] !== undefined) { - contents.TokenEndpoint = - output["TokenEndpoint"]["#text"] !== undefined - ? output["TokenEndpoint"]["#text"] - : output["TokenEndpoint"]; + contents.TokenEndpoint = output["TokenEndpoint"]; } if (output["UseExistingClientSecret"] !== undefined) { contents.UseExistingClientSecret = - (output["UseExistingClientSecret"]["#text"] !== undefined - ? output["UseExistingClientSecret"]["#text"] - : output["UseExistingClientSecret"]) == "true"; + output["UseExistingClientSecret"] == "true"; } if (output["UserInfoEndpoint"] !== undefined) { - contents.UserInfoEndpoint = - output["UserInfoEndpoint"]["#text"] !== undefined - ? output["UserInfoEndpoint"]["#text"] - : output["UserInfoEndpoint"]; + contents.UserInfoEndpoint = output["UserInfoEndpoint"]; } return contents; }; @@ -6929,16 +6856,10 @@ const deserializeAws_queryAvailabilityZone = ( ); } if (output["SubnetId"] !== undefined) { - contents.SubnetId = - output["SubnetId"]["#text"] !== undefined - ? output["SubnetId"]["#text"] - : output["SubnetId"]; + contents.SubnetId = output["SubnetId"]; } if (output["ZoneName"] !== undefined) { - contents.ZoneName = - output["ZoneName"]["#text"] !== undefined - ? output["ZoneName"]["#text"] - : output["ZoneName"]; + contents.ZoneName = output["ZoneName"]; } return contents; }; @@ -6952,10 +6873,7 @@ const deserializeAws_queryAvailabilityZoneNotSupportedException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -6979,16 +6897,10 @@ const deserializeAws_queryCertificate = ( IsDefault: undefined }; if (output["CertificateArn"] !== undefined) { - contents.CertificateArn = - output["CertificateArn"]["#text"] !== undefined - ? output["CertificateArn"]["#text"] - : output["CertificateArn"]; + contents.CertificateArn = output["CertificateArn"]; } if (output["IsDefault"] !== undefined) { - contents.IsDefault = - (output["IsDefault"]["#text"] !== undefined - ? output["IsDefault"]["#text"] - : output["IsDefault"]) == "true"; + contents.IsDefault = output["IsDefault"] == "true"; } return contents; }; @@ -7011,10 +6923,7 @@ const deserializeAws_queryCertificateNotFoundException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -7029,17 +6938,10 @@ const deserializeAws_queryCipher = ( Priority: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["Priority"] !== undefined) { - contents.Priority = parseInt( - output["Priority"]["#text"] !== undefined - ? output["Priority"]["#text"] - : output["Priority"] - ); + contents.Priority = parseInt(output["Priority"]); } return contents; }; @@ -7217,10 +7119,7 @@ const deserializeAws_queryDescribeAccountLimitsOutput = ( ); } if (output["NextMarker"] !== undefined) { - contents.NextMarker = - output["NextMarker"]["#text"] !== undefined - ? output["NextMarker"]["#text"] - : output["NextMarker"]; + contents.NextMarker = output["NextMarker"]; } return contents; }; @@ -7247,10 +7146,7 @@ const deserializeAws_queryDescribeListenerCertificatesOutput = ( ); } if (output["NextMarker"] !== undefined) { - contents.NextMarker = - output["NextMarker"]["#text"] !== undefined - ? output["NextMarker"]["#text"] - : output["NextMarker"]; + contents.NextMarker = output["NextMarker"]; } return contents; }; @@ -7277,10 +7173,7 @@ const deserializeAws_queryDescribeListenersOutput = ( ); } if (output["NextMarker"] !== undefined) { - contents.NextMarker = - output["NextMarker"]["#text"] !== undefined - ? output["NextMarker"]["#text"] - : output["NextMarker"]; + contents.NextMarker = output["NextMarker"]; } return contents; }; @@ -7330,10 +7223,7 @@ const deserializeAws_queryDescribeLoadBalancersOutput = ( ); } if (output["NextMarker"] !== undefined) { - contents.NextMarker = - output["NextMarker"]["#text"] !== undefined - ? output["NextMarker"]["#text"] - : output["NextMarker"]; + contents.NextMarker = output["NextMarker"]; } return contents; }; @@ -7348,10 +7238,7 @@ const deserializeAws_queryDescribeRulesOutput = ( Rules: undefined }; if (output["NextMarker"] !== undefined) { - contents.NextMarker = - output["NextMarker"]["#text"] !== undefined - ? output["NextMarker"]["#text"] - : output["NextMarker"]; + contents.NextMarker = output["NextMarker"]; } if (output.Rules === "") { contents.Rules = []; @@ -7378,10 +7265,7 @@ const deserializeAws_queryDescribeSSLPoliciesOutput = ( SslPolicies: undefined }; if (output["NextMarker"] !== undefined) { - contents.NextMarker = - output["NextMarker"]["#text"] !== undefined - ? output["NextMarker"]["#text"] - : output["NextMarker"]; + contents.NextMarker = output["NextMarker"]; } if (output.SslPolicies === "") { contents.SslPolicies = []; @@ -7454,10 +7338,7 @@ const deserializeAws_queryDescribeTargetGroupsOutput = ( TargetGroups: undefined }; if (output["NextMarker"] !== undefined) { - contents.NextMarker = - output["NextMarker"]["#text"] !== undefined - ? output["NextMarker"]["#text"] - : output["NextMarker"]; + contents.NextMarker = output["NextMarker"]; } if (output.TargetGroups === "") { contents.TargetGroups = []; @@ -7506,10 +7387,7 @@ const deserializeAws_queryDuplicateListenerException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -7523,10 +7401,7 @@ const deserializeAws_queryDuplicateLoadBalancerNameException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -7540,10 +7415,7 @@ const deserializeAws_queryDuplicateTagKeysException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -7557,10 +7429,7 @@ const deserializeAws_queryDuplicateTargetGroupNameException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -7576,22 +7445,13 @@ const deserializeAws_queryFixedResponseActionConfig = ( StatusCode: undefined }; if (output["ContentType"] !== undefined) { - contents.ContentType = - output["ContentType"]["#text"] !== undefined - ? output["ContentType"]["#text"] - : output["ContentType"]; + contents.ContentType = output["ContentType"]; } if (output["MessageBody"] !== undefined) { - contents.MessageBody = - output["MessageBody"]["#text"] !== undefined - ? output["MessageBody"]["#text"] - : output["MessageBody"]; + contents.MessageBody = output["MessageBody"]; } if (output["StatusCode"] !== undefined) { - contents.StatusCode = - output["StatusCode"]["#text"] !== undefined - ? output["StatusCode"]["#text"] - : output["StatusCode"]; + contents.StatusCode = output["StatusCode"]; } return contents; }; @@ -7635,10 +7495,7 @@ const deserializeAws_queryHealthUnavailableException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -7676,10 +7533,7 @@ const deserializeAws_queryHttpHeaderConditionConfig = ( Values: undefined }; if (output["HttpHeaderName"] !== undefined) { - contents.HttpHeaderName = - output["HttpHeaderName"]["#text"] !== undefined - ? output["HttpHeaderName"]["#text"] - : output["HttpHeaderName"]; + contents.HttpHeaderName = output["HttpHeaderName"]; } if (output.Values === "") { contents.Values = []; @@ -7728,10 +7582,7 @@ const deserializeAws_queryIncompatibleProtocolsException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -7745,10 +7596,7 @@ const deserializeAws_queryInvalidConfigurationRequestException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -7762,10 +7610,7 @@ const deserializeAws_queryInvalidLoadBalancerActionException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -7779,10 +7624,7 @@ const deserializeAws_queryInvalidSchemeException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -7796,10 +7638,7 @@ const deserializeAws_queryInvalidSecurityGroupException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -7813,10 +7652,7 @@ const deserializeAws_queryInvalidSubnetException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -7830,10 +7666,7 @@ const deserializeAws_queryInvalidTargetException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -7848,16 +7681,10 @@ const deserializeAws_queryLimit = ( Name: undefined }; if (output["Max"] !== undefined) { - contents.Max = - output["Max"]["#text"] !== undefined - ? output["Max"]["#text"] - : output["Max"]; + contents.Max = output["Max"]; } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } return contents; }; @@ -7875,9 +7702,7 @@ const deserializeAws_queryListOfString = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryListener = ( @@ -7919,35 +7744,19 @@ const deserializeAws_queryListener = ( ); } if (output["ListenerArn"] !== undefined) { - contents.ListenerArn = - output["ListenerArn"]["#text"] !== undefined - ? output["ListenerArn"]["#text"] - : output["ListenerArn"]; + contents.ListenerArn = output["ListenerArn"]; } if (output["LoadBalancerArn"] !== undefined) { - contents.LoadBalancerArn = - output["LoadBalancerArn"]["#text"] !== undefined - ? output["LoadBalancerArn"]["#text"] - : output["LoadBalancerArn"]; + contents.LoadBalancerArn = output["LoadBalancerArn"]; } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } if (output["Protocol"] !== undefined) { - contents.Protocol = - output["Protocol"]["#text"] !== undefined - ? output["Protocol"]["#text"] - : output["Protocol"]; + contents.Protocol = output["Protocol"]; } if (output["SslPolicy"] !== undefined) { - contents.SslPolicy = - output["SslPolicy"]["#text"] !== undefined - ? output["SslPolicy"]["#text"] - : output["SslPolicy"]; + contents.SslPolicy = output["SslPolicy"]; } return contents; }; @@ -7961,10 +7770,7 @@ const deserializeAws_queryListenerNotFoundException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -8010,43 +7816,25 @@ const deserializeAws_queryLoadBalancer = ( ); } if (output["CanonicalHostedZoneId"] !== undefined) { - contents.CanonicalHostedZoneId = - output["CanonicalHostedZoneId"]["#text"] !== undefined - ? output["CanonicalHostedZoneId"]["#text"] - : output["CanonicalHostedZoneId"]; + contents.CanonicalHostedZoneId = output["CanonicalHostedZoneId"]; } if (output["CreatedTime"] !== undefined) { contents.CreatedTime = new Date(output["CreatedTime"]); } if (output["DNSName"] !== undefined) { - contents.DNSName = - output["DNSName"]["#text"] !== undefined - ? output["DNSName"]["#text"] - : output["DNSName"]; + contents.DNSName = output["DNSName"]; } if (output["IpAddressType"] !== undefined) { - contents.IpAddressType = - output["IpAddressType"]["#text"] !== undefined - ? output["IpAddressType"]["#text"] - : output["IpAddressType"]; + contents.IpAddressType = output["IpAddressType"]; } if (output["LoadBalancerArn"] !== undefined) { - contents.LoadBalancerArn = - output["LoadBalancerArn"]["#text"] !== undefined - ? output["LoadBalancerArn"]["#text"] - : output["LoadBalancerArn"]; + contents.LoadBalancerArn = output["LoadBalancerArn"]; } if (output["LoadBalancerName"] !== undefined) { - contents.LoadBalancerName = - output["LoadBalancerName"]["#text"] !== undefined - ? output["LoadBalancerName"]["#text"] - : output["LoadBalancerName"]; + contents.LoadBalancerName = output["LoadBalancerName"]; } if (output["Scheme"] !== undefined) { - contents.Scheme = - output["Scheme"]["#text"] !== undefined - ? output["Scheme"]["#text"] - : output["Scheme"]; + contents.Scheme = output["Scheme"]; } if (output.SecurityGroups === "") { contents.SecurityGroups = []; @@ -8067,16 +7855,10 @@ const deserializeAws_queryLoadBalancer = ( ); } if (output["Type"] !== undefined) { - contents.Type = - output["Type"]["#text"] !== undefined - ? output["Type"]["#text"] - : output["Type"]; + contents.Type = output["Type"]; } if (output["VpcId"] !== undefined) { - contents.VpcId = - output["VpcId"]["#text"] !== undefined - ? output["VpcId"]["#text"] - : output["VpcId"]; + contents.VpcId = output["VpcId"]; } return contents; }; @@ -8092,22 +7874,13 @@ const deserializeAws_queryLoadBalancerAddress = ( PrivateIPv4Address: undefined }; if (output["AllocationId"] !== undefined) { - contents.AllocationId = - output["AllocationId"]["#text"] !== undefined - ? output["AllocationId"]["#text"] - : output["AllocationId"]; + contents.AllocationId = output["AllocationId"]; } if (output["IpAddress"] !== undefined) { - contents.IpAddress = - output["IpAddress"]["#text"] !== undefined - ? output["IpAddress"]["#text"] - : output["IpAddress"]; + contents.IpAddress = output["IpAddress"]; } if (output["PrivateIPv4Address"] !== undefined) { - contents.PrivateIPv4Address = - output["PrivateIPv4Address"]["#text"] !== undefined - ? output["PrivateIPv4Address"]["#text"] - : output["PrivateIPv4Address"]; + contents.PrivateIPv4Address = output["PrivateIPv4Address"]; } return contents; }; @@ -8125,9 +7898,7 @@ const deserializeAws_queryLoadBalancerArns = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryLoadBalancerAttribute = ( @@ -8140,16 +7911,10 @@ const deserializeAws_queryLoadBalancerAttribute = ( Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -8172,10 +7937,7 @@ const deserializeAws_queryLoadBalancerNotFoundException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -8190,16 +7952,10 @@ const deserializeAws_queryLoadBalancerState = ( Reason: undefined }; if (output["Code"] !== undefined) { - contents.Code = - output["Code"]["#text"] !== undefined - ? output["Code"]["#text"] - : output["Code"]; + contents.Code = output["Code"]; } if (output["Reason"] !== undefined) { - contents.Reason = - output["Reason"]["#text"] !== undefined - ? output["Reason"]["#text"] - : output["Reason"]; + contents.Reason = output["Reason"]; } return contents; }; @@ -8222,10 +7978,7 @@ const deserializeAws_queryMatcher = ( HttpCode: undefined }; if (output["HttpCode"] !== undefined) { - contents.HttpCode = - output["HttpCode"]["#text"] !== undefined - ? output["HttpCode"]["#text"] - : output["HttpCode"]; + contents.HttpCode = output["HttpCode"]; } return contents; }; @@ -8354,10 +8107,7 @@ const deserializeAws_queryOperationNotPermittedException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -8394,10 +8144,7 @@ const deserializeAws_queryPriorityInUseException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -8435,16 +8182,10 @@ const deserializeAws_queryQueryStringKeyValuePair = ( Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -8472,40 +8213,22 @@ const deserializeAws_queryRedirectActionConfig = ( StatusCode: undefined }; if (output["Host"] !== undefined) { - contents.Host = - output["Host"]["#text"] !== undefined - ? output["Host"]["#text"] - : output["Host"]; + contents.Host = output["Host"]; } if (output["Path"] !== undefined) { - contents.Path = - output["Path"]["#text"] !== undefined - ? output["Path"]["#text"] - : output["Path"]; + contents.Path = output["Path"]; } if (output["Port"] !== undefined) { - contents.Port = - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"]; + contents.Port = output["Port"]; } if (output["Protocol"] !== undefined) { - contents.Protocol = - output["Protocol"]["#text"] !== undefined - ? output["Protocol"]["#text"] - : output["Protocol"]; + contents.Protocol = output["Protocol"]; } if (output["Query"] !== undefined) { - contents.Query = - output["Query"]["#text"] !== undefined - ? output["Query"]["#text"] - : output["Query"]; + contents.Query = output["Query"]; } if (output["StatusCode"] !== undefined) { - contents.StatusCode = - output["StatusCode"]["#text"] !== undefined - ? output["StatusCode"]["#text"] - : output["StatusCode"]; + contents.StatusCode = output["StatusCode"]; } return contents; }; @@ -8549,10 +8272,7 @@ const deserializeAws_queryResourceInUseException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -8594,22 +8314,13 @@ const deserializeAws_queryRule = ( ); } if (output["IsDefault"] !== undefined) { - contents.IsDefault = - (output["IsDefault"]["#text"] !== undefined - ? output["IsDefault"]["#text"] - : output["IsDefault"]) == "true"; + contents.IsDefault = output["IsDefault"] == "true"; } if (output["Priority"] !== undefined) { - contents.Priority = - output["Priority"]["#text"] !== undefined - ? output["Priority"]["#text"] - : output["Priority"]; + contents.Priority = output["Priority"]; } if (output["RuleArn"] !== undefined) { - contents.RuleArn = - output["RuleArn"]["#text"] !== undefined - ? output["RuleArn"]["#text"] - : output["RuleArn"]; + contents.RuleArn = output["RuleArn"]; } return contents; }; @@ -8630,10 +8341,7 @@ const deserializeAws_queryRuleCondition = ( Values: undefined }; if (output["Field"] !== undefined) { - contents.Field = - output["Field"]["#text"] !== undefined - ? output["Field"]["#text"] - : output["Field"]; + contents.Field = output["Field"]; } if (output["HostHeaderConfig"] !== undefined) { contents.HostHeaderConfig = deserializeAws_queryHostHeaderConditionConfig( @@ -8704,10 +8412,7 @@ const deserializeAws_queryRuleNotFoundException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -8730,10 +8435,7 @@ const deserializeAws_querySSLPolicyNotFoundException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -8742,9 +8444,7 @@ const deserializeAws_querySecurityGroups = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_querySetIpAddressTypeOutput = ( @@ -8756,10 +8456,7 @@ const deserializeAws_querySetIpAddressTypeOutput = ( IpAddressType: undefined }; if (output["IpAddressType"] !== undefined) { - contents.IpAddressType = - output["IpAddressType"]["#text"] !== undefined - ? output["IpAddressType"]["#text"] - : output["IpAddressType"]; + contents.IpAddressType = output["IpAddressType"]; } return contents; }; @@ -8888,10 +8585,7 @@ const deserializeAws_querySslPolicy = ( ); } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output.SslProtocols === "") { contents.SslProtocols = []; @@ -8912,9 +8606,7 @@ const deserializeAws_querySslProtocols = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_querySubnetNotFoundException = ( @@ -8926,10 +8618,7 @@ const deserializeAws_querySubnetNotFoundException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -8941,16 +8630,10 @@ const deserializeAws_queryTag = (output: any, context: __SerdeContext): Tag => { Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -8965,10 +8648,7 @@ const deserializeAws_queryTagDescription = ( Tags: undefined }; if (output["ResourceArn"] !== undefined) { - contents.ResourceArn = - output["ResourceArn"]["#text"] !== undefined - ? output["ResourceArn"]["#text"] - : output["ResourceArn"]; + contents.ResourceArn = output["ResourceArn"]; } if (output.Tags === "") { contents.Tags = []; @@ -9011,23 +8691,13 @@ const deserializeAws_queryTargetDescription = ( Port: undefined }; if (output["AvailabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["AvailabilityZone"]["#text"] !== undefined - ? output["AvailabilityZone"]["#text"] - : output["AvailabilityZone"]; + contents.AvailabilityZone = output["AvailabilityZone"]; } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } return contents; }; @@ -9056,49 +8726,29 @@ const deserializeAws_queryTargetGroup = ( VpcId: undefined }; if (output["HealthCheckEnabled"] !== undefined) { - contents.HealthCheckEnabled = - (output["HealthCheckEnabled"]["#text"] !== undefined - ? output["HealthCheckEnabled"]["#text"] - : output["HealthCheckEnabled"]) == "true"; + contents.HealthCheckEnabled = output["HealthCheckEnabled"] == "true"; } if (output["HealthCheckIntervalSeconds"] !== undefined) { contents.HealthCheckIntervalSeconds = parseInt( - output["HealthCheckIntervalSeconds"]["#text"] !== undefined - ? output["HealthCheckIntervalSeconds"]["#text"] - : output["HealthCheckIntervalSeconds"] + output["HealthCheckIntervalSeconds"] ); } if (output["HealthCheckPath"] !== undefined) { - contents.HealthCheckPath = - output["HealthCheckPath"]["#text"] !== undefined - ? output["HealthCheckPath"]["#text"] - : output["HealthCheckPath"]; + contents.HealthCheckPath = output["HealthCheckPath"]; } if (output["HealthCheckPort"] !== undefined) { - contents.HealthCheckPort = - output["HealthCheckPort"]["#text"] !== undefined - ? output["HealthCheckPort"]["#text"] - : output["HealthCheckPort"]; + contents.HealthCheckPort = output["HealthCheckPort"]; } if (output["HealthCheckProtocol"] !== undefined) { - contents.HealthCheckProtocol = - output["HealthCheckProtocol"]["#text"] !== undefined - ? output["HealthCheckProtocol"]["#text"] - : output["HealthCheckProtocol"]; + contents.HealthCheckProtocol = output["HealthCheckProtocol"]; } if (output["HealthCheckTimeoutSeconds"] !== undefined) { contents.HealthCheckTimeoutSeconds = parseInt( - output["HealthCheckTimeoutSeconds"]["#text"] !== undefined - ? output["HealthCheckTimeoutSeconds"]["#text"] - : output["HealthCheckTimeoutSeconds"] + output["HealthCheckTimeoutSeconds"] ); } if (output["HealthyThresholdCount"] !== undefined) { - contents.HealthyThresholdCount = parseInt( - output["HealthyThresholdCount"]["#text"] !== undefined - ? output["HealthyThresholdCount"]["#text"] - : output["HealthyThresholdCount"] - ); + contents.HealthyThresholdCount = parseInt(output["HealthyThresholdCount"]); } if (output.LoadBalancerArns === "") { contents.LoadBalancerArns = []; @@ -9116,48 +8766,27 @@ const deserializeAws_queryTargetGroup = ( contents.Matcher = deserializeAws_queryMatcher(output["Matcher"], context); } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } if (output["Protocol"] !== undefined) { - contents.Protocol = - output["Protocol"]["#text"] !== undefined - ? output["Protocol"]["#text"] - : output["Protocol"]; + contents.Protocol = output["Protocol"]; } if (output["TargetGroupArn"] !== undefined) { - contents.TargetGroupArn = - output["TargetGroupArn"]["#text"] !== undefined - ? output["TargetGroupArn"]["#text"] - : output["TargetGroupArn"]; + contents.TargetGroupArn = output["TargetGroupArn"]; } if (output["TargetGroupName"] !== undefined) { - contents.TargetGroupName = - output["TargetGroupName"]["#text"] !== undefined - ? output["TargetGroupName"]["#text"] - : output["TargetGroupName"]; + contents.TargetGroupName = output["TargetGroupName"]; } if (output["TargetType"] !== undefined) { - contents.TargetType = - output["TargetType"]["#text"] !== undefined - ? output["TargetType"]["#text"] - : output["TargetType"]; + contents.TargetType = output["TargetType"]; } if (output["UnhealthyThresholdCount"] !== undefined) { contents.UnhealthyThresholdCount = parseInt( - output["UnhealthyThresholdCount"]["#text"] !== undefined - ? output["UnhealthyThresholdCount"]["#text"] - : output["UnhealthyThresholdCount"] + output["UnhealthyThresholdCount"] ); } if (output["VpcId"] !== undefined) { - contents.VpcId = - output["VpcId"]["#text"] !== undefined - ? output["VpcId"]["#text"] - : output["VpcId"]; + contents.VpcId = output["VpcId"]; } return contents; }; @@ -9171,10 +8800,7 @@ const deserializeAws_queryTargetGroupAssociationLimitException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -9189,16 +8815,10 @@ const deserializeAws_queryTargetGroupAttribute = ( Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -9230,10 +8850,7 @@ const deserializeAws_queryTargetGroupNotFoundException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -9248,17 +8865,10 @@ const deserializeAws_queryTargetGroupStickinessConfig = ( Enabled: undefined }; if (output["DurationSeconds"] !== undefined) { - contents.DurationSeconds = parseInt( - output["DurationSeconds"]["#text"] !== undefined - ? output["DurationSeconds"]["#text"] - : output["DurationSeconds"] - ); + contents.DurationSeconds = parseInt(output["DurationSeconds"]); } if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } return contents; }; @@ -9273,17 +8883,10 @@ const deserializeAws_queryTargetGroupTuple = ( Weight: undefined }; if (output["TargetGroupArn"] !== undefined) { - contents.TargetGroupArn = - output["TargetGroupArn"]["#text"] !== undefined - ? output["TargetGroupArn"]["#text"] - : output["TargetGroupArn"]; + contents.TargetGroupArn = output["TargetGroupArn"]; } if (output["Weight"] !== undefined) { - contents.Weight = parseInt( - output["Weight"]["#text"] !== undefined - ? output["Weight"]["#text"] - : output["Weight"] - ); + contents.Weight = parseInt(output["Weight"]); } return contents; }; @@ -9308,22 +8911,13 @@ const deserializeAws_queryTargetHealth = ( State: undefined }; if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["Reason"] !== undefined) { - contents.Reason = - output["Reason"]["#text"] !== undefined - ? output["Reason"]["#text"] - : output["Reason"]; + contents.Reason = output["Reason"]; } if (output["State"] !== undefined) { - contents.State = - output["State"]["#text"] !== undefined - ? output["State"]["#text"] - : output["State"]; + contents.State = output["State"]; } return contents; }; @@ -9339,10 +8933,7 @@ const deserializeAws_queryTargetHealthDescription = ( TargetHealth: undefined }; if (output["HealthCheckPort"] !== undefined) { - contents.HealthCheckPort = - output["HealthCheckPort"]["#text"] !== undefined - ? output["HealthCheckPort"]["#text"] - : output["HealthCheckPort"]; + contents.HealthCheckPort = output["HealthCheckPort"]; } if (output["Target"] !== undefined) { contents.Target = deserializeAws_queryTargetDescription( @@ -9377,10 +8968,7 @@ const deserializeAws_queryTooManyActionsException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -9394,10 +8982,7 @@ const deserializeAws_queryTooManyCertificatesException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -9411,10 +8996,7 @@ const deserializeAws_queryTooManyListenersException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -9428,10 +9010,7 @@ const deserializeAws_queryTooManyLoadBalancersException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -9445,10 +9024,7 @@ const deserializeAws_queryTooManyRegistrationsForTargetIdException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -9462,10 +9038,7 @@ const deserializeAws_queryTooManyRulesException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -9479,10 +9052,7 @@ const deserializeAws_queryTooManyTagsException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -9496,10 +9066,7 @@ const deserializeAws_queryTooManyTargetGroupsException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -9513,10 +9080,7 @@ const deserializeAws_queryTooManyTargetsException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -9530,10 +9094,7 @@ const deserializeAws_queryTooManyUniqueTargetGroupsPerLoadBalancerException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -9547,10 +9108,7 @@ const deserializeAws_queryUnsupportedProtocolException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -9630,7 +9188,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/clients/client-elastic-load-balancing/protocols/Aws_query.ts b/clients/client-elastic-load-balancing/protocols/Aws_query.ts index d2f233a98b34..4b81873bd999 100644 --- a/clients/client-elastic-load-balancing/protocols/Aws_query.ts +++ b/clients/client-elastic-load-balancing/protocols/Aws_query.ts @@ -229,7 +229,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -4594,29 +4595,16 @@ const deserializeAws_queryAccessLog = ( S3BucketPrefix: undefined }; if (output["EmitInterval"] !== undefined) { - contents.EmitInterval = parseInt( - output["EmitInterval"]["#text"] !== undefined - ? output["EmitInterval"]["#text"] - : output["EmitInterval"] - ); + contents.EmitInterval = parseInt(output["EmitInterval"]); } if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } if (output["S3BucketName"] !== undefined) { - contents.S3BucketName = - output["S3BucketName"]["#text"] !== undefined - ? output["S3BucketName"]["#text"] - : output["S3BucketName"]; + contents.S3BucketName = output["S3BucketName"]; } if (output["S3BucketPrefix"] !== undefined) { - contents.S3BucketPrefix = - output["S3BucketPrefix"]["#text"] !== undefined - ? output["S3BucketPrefix"]["#text"] - : output["S3BucketPrefix"]; + contents.S3BucketPrefix = output["S3BucketPrefix"]; } return contents; }; @@ -4630,10 +4618,7 @@ const deserializeAws_queryAccessPointNotFoundException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -4681,16 +4666,10 @@ const deserializeAws_queryAdditionalAttribute = ( Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -4723,16 +4702,10 @@ const deserializeAws_queryAppCookieStickinessPolicy = ( PolicyName: undefined }; if (output["CookieName"] !== undefined) { - contents.CookieName = - output["CookieName"]["#text"] !== undefined - ? output["CookieName"]["#text"] - : output["CookieName"]; + contents.CookieName = output["CookieName"]; } if (output["PolicyName"] !== undefined) { - contents.PolicyName = - output["PolicyName"]["#text"] !== undefined - ? output["PolicyName"]["#text"] - : output["PolicyName"]; + contents.PolicyName = output["PolicyName"]; } return contents; }; @@ -4787,9 +4760,7 @@ const deserializeAws_queryAvailabilityZones = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryBackendServerDescription = ( @@ -4802,11 +4773,7 @@ const deserializeAws_queryBackendServerDescription = ( PolicyNames: undefined }; if (output["InstancePort"] !== undefined) { - contents.InstancePort = parseInt( - output["InstancePort"]["#text"] !== undefined - ? output["InstancePort"]["#text"] - : output["InstancePort"] - ); + contents.InstancePort = parseInt(output["InstancePort"]); } if (output.PolicyNames === "") { contents.PolicyNames = []; @@ -4841,10 +4808,7 @@ const deserializeAws_queryCertificateNotFoundException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -4876,17 +4840,10 @@ const deserializeAws_queryConnectionDraining = ( Timeout: undefined }; if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } if (output["Timeout"] !== undefined) { - contents.Timeout = parseInt( - output["Timeout"]["#text"] !== undefined - ? output["Timeout"]["#text"] - : output["Timeout"] - ); + contents.Timeout = parseInt(output["Timeout"]); } return contents; }; @@ -4900,11 +4857,7 @@ const deserializeAws_queryConnectionSettings = ( IdleTimeout: undefined }; if (output["IdleTimeout"] !== undefined) { - contents.IdleTimeout = parseInt( - output["IdleTimeout"]["#text"] !== undefined - ? output["IdleTimeout"]["#text"] - : output["IdleTimeout"] - ); + contents.IdleTimeout = parseInt(output["IdleTimeout"]); } return contents; }; @@ -4918,10 +4871,7 @@ const deserializeAws_queryCreateAccessPointOutput = ( DNSName: undefined }; if (output["DNSName"] !== undefined) { - contents.DNSName = - output["DNSName"]["#text"] !== undefined - ? output["DNSName"]["#text"] - : output["DNSName"]; + contents.DNSName = output["DNSName"]; } return contents; }; @@ -4975,10 +4925,7 @@ const deserializeAws_queryCrossZoneLoadBalancing = ( Enabled: undefined }; if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } return contents; }; @@ -5022,10 +4969,7 @@ const deserializeAws_queryDependencyThrottleException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -5075,10 +5019,7 @@ const deserializeAws_queryDescribeAccessPointsOutput = ( ); } if (output["NextMarker"] !== undefined) { - contents.NextMarker = - output["NextMarker"]["#text"] !== undefined - ? output["NextMarker"]["#text"] - : output["NextMarker"]; + contents.NextMarker = output["NextMarker"]; } return contents; }; @@ -5105,10 +5046,7 @@ const deserializeAws_queryDescribeAccountLimitsOutput = ( ); } if (output["NextMarker"] !== undefined) { - contents.NextMarker = - output["NextMarker"]["#text"] !== undefined - ? output["NextMarker"]["#text"] - : output["NextMarker"]; + contents.NextMarker = output["NextMarker"]; } return contents; }; @@ -5254,10 +5192,7 @@ const deserializeAws_queryDuplicateAccessPointNameException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -5271,10 +5206,7 @@ const deserializeAws_queryDuplicateListenerException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -5288,10 +5220,7 @@ const deserializeAws_queryDuplicatePolicyNameException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -5305,10 +5234,7 @@ const deserializeAws_queryDuplicateTagKeysException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -5326,38 +5252,19 @@ const deserializeAws_queryHealthCheck = ( UnhealthyThreshold: undefined }; if (output["HealthyThreshold"] !== undefined) { - contents.HealthyThreshold = parseInt( - output["HealthyThreshold"]["#text"] !== undefined - ? output["HealthyThreshold"]["#text"] - : output["HealthyThreshold"] - ); + contents.HealthyThreshold = parseInt(output["HealthyThreshold"]); } if (output["Interval"] !== undefined) { - contents.Interval = parseInt( - output["Interval"]["#text"] !== undefined - ? output["Interval"]["#text"] - : output["Interval"] - ); + contents.Interval = parseInt(output["Interval"]); } if (output["Target"] !== undefined) { - contents.Target = - output["Target"]["#text"] !== undefined - ? output["Target"]["#text"] - : output["Target"]; + contents.Target = output["Target"]; } if (output["Timeout"] !== undefined) { - contents.Timeout = parseInt( - output["Timeout"]["#text"] !== undefined - ? output["Timeout"]["#text"] - : output["Timeout"] - ); + contents.Timeout = parseInt(output["Timeout"]); } if (output["UnhealthyThreshold"] !== undefined) { - contents.UnhealthyThreshold = parseInt( - output["UnhealthyThreshold"]["#text"] !== undefined - ? output["UnhealthyThreshold"]["#text"] - : output["UnhealthyThreshold"] - ); + contents.UnhealthyThreshold = parseInt(output["UnhealthyThreshold"]); } return contents; }; @@ -5371,10 +5278,7 @@ const deserializeAws_queryInstance = ( InstanceId: undefined }; if (output["InstanceId"] !== undefined) { - contents.InstanceId = - output["InstanceId"]["#text"] !== undefined - ? output["InstanceId"]["#text"] - : output["InstanceId"]; + contents.InstanceId = output["InstanceId"]; } return contents; }; @@ -5391,28 +5295,16 @@ const deserializeAws_queryInstanceState = ( State: undefined }; if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["InstanceId"] !== undefined) { - contents.InstanceId = - output["InstanceId"]["#text"] !== undefined - ? output["InstanceId"]["#text"] - : output["InstanceId"]; + contents.InstanceId = output["InstanceId"]; } if (output["ReasonCode"] !== undefined) { - contents.ReasonCode = - output["ReasonCode"]["#text"] !== undefined - ? output["ReasonCode"]["#text"] - : output["ReasonCode"]; + contents.ReasonCode = output["ReasonCode"]; } if (output["State"] !== undefined) { - contents.State = - output["State"]["#text"] !== undefined - ? output["State"]["#text"] - : output["State"]; + contents.State = output["State"]; } return contents; }; @@ -5444,10 +5336,7 @@ const deserializeAws_queryInvalidConfigurationRequestException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -5461,10 +5350,7 @@ const deserializeAws_queryInvalidEndPointException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -5478,10 +5364,7 @@ const deserializeAws_queryInvalidSchemeException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -5495,10 +5378,7 @@ const deserializeAws_queryInvalidSecurityGroupException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -5512,10 +5392,7 @@ const deserializeAws_queryInvalidSubnetException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -5540,16 +5417,11 @@ const deserializeAws_queryLBCookieStickinessPolicy = ( }; if (output["CookieExpirationPeriod"] !== undefined) { contents.CookieExpirationPeriod = parseInt( - output["CookieExpirationPeriod"]["#text"] !== undefined - ? output["CookieExpirationPeriod"]["#text"] - : output["CookieExpirationPeriod"] + output["CookieExpirationPeriod"] ); } if (output["PolicyName"] !== undefined) { - contents.PolicyName = - output["PolicyName"]["#text"] !== undefined - ? output["PolicyName"]["#text"] - : output["PolicyName"]; + contents.PolicyName = output["PolicyName"]; } return contents; }; @@ -5564,16 +5436,10 @@ const deserializeAws_queryLimit = ( Name: undefined }; if (output["Max"] !== undefined) { - contents.Max = - output["Max"]["#text"] !== undefined - ? output["Max"]["#text"] - : output["Max"]; + contents.Max = output["Max"]; } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } return contents; }; @@ -5600,36 +5466,19 @@ const deserializeAws_queryListener = ( SSLCertificateId: undefined }; if (output["InstancePort"] !== undefined) { - contents.InstancePort = parseInt( - output["InstancePort"]["#text"] !== undefined - ? output["InstancePort"]["#text"] - : output["InstancePort"] - ); + contents.InstancePort = parseInt(output["InstancePort"]); } if (output["InstanceProtocol"] !== undefined) { - contents.InstanceProtocol = - output["InstanceProtocol"]["#text"] !== undefined - ? output["InstanceProtocol"]["#text"] - : output["InstanceProtocol"]; + contents.InstanceProtocol = output["InstanceProtocol"]; } if (output["LoadBalancerPort"] !== undefined) { - contents.LoadBalancerPort = parseInt( - output["LoadBalancerPort"]["#text"] !== undefined - ? output["LoadBalancerPort"]["#text"] - : output["LoadBalancerPort"] - ); + contents.LoadBalancerPort = parseInt(output["LoadBalancerPort"]); } if (output["Protocol"] !== undefined) { - contents.Protocol = - output["Protocol"]["#text"] !== undefined - ? output["Protocol"]["#text"] - : output["Protocol"]; + contents.Protocol = output["Protocol"]; } if (output["SSLCertificateId"] !== undefined) { - contents.SSLCertificateId = - output["SSLCertificateId"]["#text"] !== undefined - ? output["SSLCertificateId"]["#text"] - : output["SSLCertificateId"]; + contents.SSLCertificateId = output["SSLCertificateId"]; } return contents; }; @@ -5682,10 +5531,7 @@ const deserializeAws_queryListenerNotFoundException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -5699,10 +5545,7 @@ const deserializeAws_queryLoadBalancerAttributeNotFoundException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -5806,25 +5649,16 @@ const deserializeAws_queryLoadBalancerDescription = ( ); } if (output["CanonicalHostedZoneName"] !== undefined) { - contents.CanonicalHostedZoneName = - output["CanonicalHostedZoneName"]["#text"] !== undefined - ? output["CanonicalHostedZoneName"]["#text"] - : output["CanonicalHostedZoneName"]; + contents.CanonicalHostedZoneName = output["CanonicalHostedZoneName"]; } if (output["CanonicalHostedZoneNameID"] !== undefined) { - contents.CanonicalHostedZoneNameID = - output["CanonicalHostedZoneNameID"]["#text"] !== undefined - ? output["CanonicalHostedZoneNameID"]["#text"] - : output["CanonicalHostedZoneNameID"]; + contents.CanonicalHostedZoneNameID = output["CanonicalHostedZoneNameID"]; } if (output["CreatedTime"] !== undefined) { contents.CreatedTime = new Date(output["CreatedTime"]); } if (output["DNSName"] !== undefined) { - contents.DNSName = - output["DNSName"]["#text"] !== undefined - ? output["DNSName"]["#text"] - : output["DNSName"]; + contents.DNSName = output["DNSName"]; } if (output["HealthCheck"] !== undefined) { contents.HealthCheck = deserializeAws_queryHealthCheck( @@ -5857,10 +5691,7 @@ const deserializeAws_queryLoadBalancerDescription = ( ); } if (output["LoadBalancerName"] !== undefined) { - contents.LoadBalancerName = - output["LoadBalancerName"]["#text"] !== undefined - ? output["LoadBalancerName"]["#text"] - : output["LoadBalancerName"]; + contents.LoadBalancerName = output["LoadBalancerName"]; } if (output["Policies"] !== undefined) { contents.Policies = deserializeAws_queryPolicies( @@ -5869,10 +5700,7 @@ const deserializeAws_queryLoadBalancerDescription = ( ); } if (output["Scheme"] !== undefined) { - contents.Scheme = - output["Scheme"]["#text"] !== undefined - ? output["Scheme"]["#text"] - : output["Scheme"]; + contents.Scheme = output["Scheme"]; } if (output.SecurityGroups === "") { contents.SecurityGroups = []; @@ -5905,10 +5733,7 @@ const deserializeAws_queryLoadBalancerDescription = ( ); } if (output["VPCId"] !== undefined) { - contents.VPCId = - output["VPCId"]["#text"] !== undefined - ? output["VPCId"]["#text"] - : output["VPCId"]; + contents.VPCId = output["VPCId"]; } return contents; }; @@ -5938,10 +5763,7 @@ const deserializeAws_queryModifyLoadBalancerAttributesOutput = ( ); } if (output["LoadBalancerName"] !== undefined) { - contents.LoadBalancerName = - output["LoadBalancerName"]["#text"] !== undefined - ? output["LoadBalancerName"]["#text"] - : output["LoadBalancerName"]; + contents.LoadBalancerName = output["LoadBalancerName"]; } return contents; }; @@ -5955,10 +5777,7 @@ const deserializeAws_queryOperationNotPermittedException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -6022,16 +5841,10 @@ const deserializeAws_queryPolicyAttributeDescription = ( AttributeValue: undefined }; if (output["AttributeName"] !== undefined) { - contents.AttributeName = - output["AttributeName"]["#text"] !== undefined - ? output["AttributeName"]["#text"] - : output["AttributeName"]; + contents.AttributeName = output["AttributeName"]; } if (output["AttributeValue"] !== undefined) { - contents.AttributeValue = - output["AttributeValue"]["#text"] !== undefined - ? output["AttributeValue"]["#text"] - : output["AttributeValue"]; + contents.AttributeValue = output["AttributeValue"]; } return contents; }; @@ -6058,34 +5871,19 @@ const deserializeAws_queryPolicyAttributeTypeDescription = ( Description: undefined }; if (output["AttributeName"] !== undefined) { - contents.AttributeName = - output["AttributeName"]["#text"] !== undefined - ? output["AttributeName"]["#text"] - : output["AttributeName"]; + contents.AttributeName = output["AttributeName"]; } if (output["AttributeType"] !== undefined) { - contents.AttributeType = - output["AttributeType"]["#text"] !== undefined - ? output["AttributeType"]["#text"] - : output["AttributeType"]; + contents.AttributeType = output["AttributeType"]; } if (output["Cardinality"] !== undefined) { - contents.Cardinality = - output["Cardinality"]["#text"] !== undefined - ? output["Cardinality"]["#text"] - : output["Cardinality"]; + contents.Cardinality = output["Cardinality"]; } if (output["DefaultValue"] !== undefined) { - contents.DefaultValue = - output["DefaultValue"]["#text"] !== undefined - ? output["DefaultValue"]["#text"] - : output["DefaultValue"]; + contents.DefaultValue = output["DefaultValue"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } return contents; }; @@ -6122,16 +5920,10 @@ const deserializeAws_queryPolicyDescription = ( ); } if (output["PolicyName"] !== undefined) { - contents.PolicyName = - output["PolicyName"]["#text"] !== undefined - ? output["PolicyName"]["#text"] - : output["PolicyName"]; + contents.PolicyName = output["PolicyName"]; } if (output["PolicyTypeName"] !== undefined) { - contents.PolicyTypeName = - output["PolicyTypeName"]["#text"] !== undefined - ? output["PolicyTypeName"]["#text"] - : output["PolicyTypeName"]; + contents.PolicyTypeName = output["PolicyTypeName"]; } return contents; }; @@ -6149,9 +5941,7 @@ const deserializeAws_queryPolicyNames = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryPolicyNotFoundException = ( @@ -6163,10 +5953,7 @@ const deserializeAws_queryPolicyNotFoundException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -6182,10 +5969,7 @@ const deserializeAws_queryPolicyTypeDescription = ( PolicyTypeName: undefined }; if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output.PolicyAttributeTypeDescriptions === "") { contents.PolicyAttributeTypeDescriptions = []; @@ -6202,10 +5986,7 @@ const deserializeAws_queryPolicyTypeDescription = ( ); } if (output["PolicyTypeName"] !== undefined) { - contents.PolicyTypeName = - output["PolicyTypeName"]["#text"] !== undefined - ? output["PolicyTypeName"]["#text"] - : output["PolicyTypeName"]; + contents.PolicyTypeName = output["PolicyTypeName"]; } return contents; }; @@ -6228,10 +6009,7 @@ const deserializeAws_queryPolicyTypeNotFoundException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -6296,9 +6074,7 @@ const deserializeAws_querySecurityGroups = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_querySetLoadBalancerListenerSSLCertificateOutput = ( @@ -6341,16 +6117,10 @@ const deserializeAws_querySourceSecurityGroup = ( OwnerAlias: undefined }; if (output["GroupName"] !== undefined) { - contents.GroupName = - output["GroupName"]["#text"] !== undefined - ? output["GroupName"]["#text"] - : output["GroupName"]; + contents.GroupName = output["GroupName"]; } if (output["OwnerAlias"] !== undefined) { - contents.OwnerAlias = - output["OwnerAlias"]["#text"] !== undefined - ? output["OwnerAlias"]["#text"] - : output["OwnerAlias"]; + contents.OwnerAlias = output["OwnerAlias"]; } return contents; }; @@ -6364,10 +6134,7 @@ const deserializeAws_querySubnetNotFoundException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -6376,9 +6143,7 @@ const deserializeAws_querySubnets = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryTag = (output: any, context: __SerdeContext): Tag => { @@ -6388,16 +6153,10 @@ const deserializeAws_queryTag = (output: any, context: __SerdeContext): Tag => { Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -6412,10 +6171,7 @@ const deserializeAws_queryTagDescription = ( Tags: undefined }; if (output["LoadBalancerName"] !== undefined) { - contents.LoadBalancerName = - output["LoadBalancerName"]["#text"] !== undefined - ? output["LoadBalancerName"]["#text"] - : output["LoadBalancerName"]; + contents.LoadBalancerName = output["LoadBalancerName"]; } if (output.Tags === "") { contents.Tags = []; @@ -6456,10 +6212,7 @@ const deserializeAws_queryTooManyAccessPointsException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -6473,10 +6226,7 @@ const deserializeAws_queryTooManyPoliciesException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -6490,10 +6240,7 @@ const deserializeAws_queryTooManyTagsException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -6507,10 +6254,7 @@ const deserializeAws_queryUnsupportedProtocolException = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -6590,7 +6334,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/clients/client-elasticache/protocols/Aws_query.ts b/clients/client-elasticache/protocols/Aws_query.ts index 05a7e7978f85..95e759ca70fd 100644 --- a/clients/client-elasticache/protocols/Aws_query.ts +++ b/clients/client-elasticache/protocols/Aws_query.ts @@ -387,7 +387,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -9226,10 +9227,7 @@ const deserializeAws_queryInvalidParameterCombinationException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9243,10 +9241,7 @@ const deserializeAws_queryInvalidParameterValueException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9260,10 +9255,7 @@ const deserializeAws_queryAPICallRateForCustomerExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9277,10 +9269,7 @@ const deserializeAws_queryAuthorizationAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9294,10 +9283,7 @@ const deserializeAws_queryAuthorizationNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9311,10 +9297,7 @@ const deserializeAws_queryCacheClusterAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9328,10 +9311,7 @@ const deserializeAws_queryCacheClusterNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9345,10 +9325,7 @@ const deserializeAws_queryCacheParameterGroupAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9362,10 +9339,7 @@ const deserializeAws_queryCacheParameterGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9379,10 +9353,7 @@ const deserializeAws_queryCacheParameterGroupQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9396,10 +9367,7 @@ const deserializeAws_queryCacheSecurityGroupAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9413,10 +9381,7 @@ const deserializeAws_queryCacheSecurityGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9430,10 +9395,7 @@ const deserializeAws_queryCacheSecurityGroupQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9447,10 +9409,7 @@ const deserializeAws_queryCacheSubnetGroupAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9464,10 +9423,7 @@ const deserializeAws_queryCacheSubnetGroupInUse = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9481,10 +9437,7 @@ const deserializeAws_queryCacheSubnetGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9498,10 +9451,7 @@ const deserializeAws_queryCacheSubnetGroupQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9515,10 +9465,7 @@ const deserializeAws_queryCacheSubnetQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9532,10 +9479,7 @@ const deserializeAws_queryClusterQuotaForCustomerExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9549,10 +9493,7 @@ const deserializeAws_queryInsufficientCacheClusterCapacityFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9566,10 +9507,7 @@ const deserializeAws_queryInvalidARNFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9583,10 +9521,7 @@ const deserializeAws_queryInvalidCacheClusterStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9600,10 +9535,7 @@ const deserializeAws_queryInvalidCacheParameterGroupStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9617,10 +9549,7 @@ const deserializeAws_queryInvalidCacheSecurityGroupStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9634,10 +9563,7 @@ const deserializeAws_queryInvalidKMSKeyFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9651,10 +9577,7 @@ const deserializeAws_queryInvalidReplicationGroupStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9668,10 +9591,7 @@ const deserializeAws_queryInvalidSnapshotStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9685,10 +9605,7 @@ const deserializeAws_queryInvalidSubnet = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9702,10 +9619,7 @@ const deserializeAws_queryInvalidVPCNetworkStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9719,10 +9633,7 @@ const deserializeAws_queryNoOperationFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9736,10 +9647,7 @@ const deserializeAws_queryNodeGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9753,10 +9661,7 @@ const deserializeAws_queryNodeGroupsPerReplicationGroupQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9770,10 +9675,7 @@ const deserializeAws_queryNodeQuotaForClusterExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9787,10 +9689,7 @@ const deserializeAws_queryNodeQuotaForCustomerExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9804,10 +9703,7 @@ const deserializeAws_queryReplicationGroupAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9821,10 +9717,7 @@ const deserializeAws_queryReplicationGroupAlreadyUnderMigrationFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9838,10 +9731,7 @@ const deserializeAws_queryReplicationGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9855,10 +9745,7 @@ const deserializeAws_queryReplicationGroupNotUnderMigrationFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9872,10 +9759,7 @@ const deserializeAws_queryReservedCacheNodeAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9889,10 +9773,7 @@ const deserializeAws_queryReservedCacheNodeNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9906,10 +9787,7 @@ const deserializeAws_queryReservedCacheNodeQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9923,10 +9801,7 @@ const deserializeAws_queryReservedCacheNodesOfferingNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9940,10 +9815,7 @@ const deserializeAws_queryServiceLinkedRoleNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9957,10 +9829,7 @@ const deserializeAws_queryServiceUpdateNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9974,10 +9843,7 @@ const deserializeAws_querySnapshotAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9991,10 +9857,7 @@ const deserializeAws_querySnapshotFeatureNotSupportedFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10008,10 +9871,7 @@ const deserializeAws_querySnapshotNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10025,10 +9885,7 @@ const deserializeAws_querySnapshotQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10042,10 +9899,7 @@ const deserializeAws_querySubnetInUse = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10059,10 +9913,7 @@ const deserializeAws_queryTagNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10076,10 +9927,7 @@ const deserializeAws_queryTagQuotaPerResourceExceeded = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10093,10 +9941,7 @@ const deserializeAws_queryTestFailoverNotAvailableFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10163,10 +10008,7 @@ const deserializeAws_queryAvailabilityZone = ( Name: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } return contents; }; @@ -10175,9 +10017,7 @@ const deserializeAws_queryAvailabilityZonesList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryCacheCluster = ( @@ -10215,15 +10055,10 @@ const deserializeAws_queryCacheCluster = ( }; if (output["AtRestEncryptionEnabled"] !== undefined) { contents.AtRestEncryptionEnabled = - (output["AtRestEncryptionEnabled"]["#text"] !== undefined - ? output["AtRestEncryptionEnabled"]["#text"] - : output["AtRestEncryptionEnabled"]) == "true"; + output["AtRestEncryptionEnabled"] == "true"; } if (output["AuthTokenEnabled"] !== undefined) { - contents.AuthTokenEnabled = - (output["AuthTokenEnabled"]["#text"] !== undefined - ? output["AuthTokenEnabled"]["#text"] - : output["AuthTokenEnabled"]) == "true"; + contents.AuthTokenEnabled = output["AuthTokenEnabled"] == "true"; } if (output["AuthTokenLastModifiedDate"] !== undefined) { contents.AuthTokenLastModifiedDate = new Date( @@ -10232,9 +10067,7 @@ const deserializeAws_queryCacheCluster = ( } if (output["AutoMinorVersionUpgrade"] !== undefined) { contents.AutoMinorVersionUpgrade = - (output["AutoMinorVersionUpgrade"]["#text"] !== undefined - ? output["AutoMinorVersionUpgrade"]["#text"] - : output["AutoMinorVersionUpgrade"]) == "true"; + output["AutoMinorVersionUpgrade"] == "true"; } if (output["CacheClusterCreateTime"] !== undefined) { contents.CacheClusterCreateTime = new Date( @@ -10242,22 +10075,13 @@ const deserializeAws_queryCacheCluster = ( ); } if (output["CacheClusterId"] !== undefined) { - contents.CacheClusterId = - output["CacheClusterId"]["#text"] !== undefined - ? output["CacheClusterId"]["#text"] - : output["CacheClusterId"]; + contents.CacheClusterId = output["CacheClusterId"]; } if (output["CacheClusterStatus"] !== undefined) { - contents.CacheClusterStatus = - output["CacheClusterStatus"]["#text"] !== undefined - ? output["CacheClusterStatus"]["#text"] - : output["CacheClusterStatus"]; + contents.CacheClusterStatus = output["CacheClusterStatus"]; } if (output["CacheNodeType"] !== undefined) { - contents.CacheNodeType = - output["CacheNodeType"]["#text"] !== undefined - ? output["CacheNodeType"]["#text"] - : output["CacheNodeType"]; + contents.CacheNodeType = output["CacheNodeType"]; } if (output.CacheNodes === "") { contents.CacheNodes = []; @@ -10292,16 +10116,10 @@ const deserializeAws_queryCacheCluster = ( ); } if (output["CacheSubnetGroupName"] !== undefined) { - contents.CacheSubnetGroupName = - output["CacheSubnetGroupName"]["#text"] !== undefined - ? output["CacheSubnetGroupName"]["#text"] - : output["CacheSubnetGroupName"]; + contents.CacheSubnetGroupName = output["CacheSubnetGroupName"]; } if (output["ClientDownloadLandingPage"] !== undefined) { - contents.ClientDownloadLandingPage = - output["ClientDownloadLandingPage"]["#text"] !== undefined - ? output["ClientDownloadLandingPage"]["#text"] - : output["ClientDownloadLandingPage"]; + contents.ClientDownloadLandingPage = output["ClientDownloadLandingPage"]; } if (output["ConfigurationEndpoint"] !== undefined) { contents.ConfigurationEndpoint = deserializeAws_queryEndpoint( @@ -10310,16 +10128,10 @@ const deserializeAws_queryCacheCluster = ( ); } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["NotificationConfiguration"] !== undefined) { contents.NotificationConfiguration = deserializeAws_queryNotificationConfiguration( @@ -10328,11 +10140,7 @@ const deserializeAws_queryCacheCluster = ( ); } if (output["NumCacheNodes"] !== undefined) { - contents.NumCacheNodes = parseInt( - output["NumCacheNodes"]["#text"] !== undefined - ? output["NumCacheNodes"]["#text"] - : output["NumCacheNodes"] - ); + contents.NumCacheNodes = parseInt(output["NumCacheNodes"]); } if (output["PendingModifiedValues"] !== undefined) { contents.PendingModifiedValues = deserializeAws_queryPendingModifiedValues( @@ -10341,22 +10149,13 @@ const deserializeAws_queryCacheCluster = ( ); } if (output["PreferredAvailabilityZone"] !== undefined) { - contents.PreferredAvailabilityZone = - output["PreferredAvailabilityZone"]["#text"] !== undefined - ? output["PreferredAvailabilityZone"]["#text"] - : output["PreferredAvailabilityZone"]; + contents.PreferredAvailabilityZone = output["PreferredAvailabilityZone"]; } if (output["PreferredMaintenanceWindow"] !== undefined) { - contents.PreferredMaintenanceWindow = - output["PreferredMaintenanceWindow"]["#text"] !== undefined - ? output["PreferredMaintenanceWindow"]["#text"] - : output["PreferredMaintenanceWindow"]; + contents.PreferredMaintenanceWindow = output["PreferredMaintenanceWindow"]; } if (output["ReplicationGroupId"] !== undefined) { - contents.ReplicationGroupId = - output["ReplicationGroupId"]["#text"] !== undefined - ? output["ReplicationGroupId"]["#text"] - : output["ReplicationGroupId"]; + contents.ReplicationGroupId = output["ReplicationGroupId"]; } if (output.SecurityGroups === "") { contents.SecurityGroups = []; @@ -10372,22 +10171,15 @@ const deserializeAws_queryCacheCluster = ( } if (output["SnapshotRetentionLimit"] !== undefined) { contents.SnapshotRetentionLimit = parseInt( - output["SnapshotRetentionLimit"]["#text"] !== undefined - ? output["SnapshotRetentionLimit"]["#text"] - : output["SnapshotRetentionLimit"] + output["SnapshotRetentionLimit"] ); } if (output["SnapshotWindow"] !== undefined) { - contents.SnapshotWindow = - output["SnapshotWindow"]["#text"] !== undefined - ? output["SnapshotWindow"]["#text"] - : output["SnapshotWindow"]; + contents.SnapshotWindow = output["SnapshotWindow"]; } if (output["TransitEncryptionEnabled"] !== undefined) { contents.TransitEncryptionEnabled = - (output["TransitEncryptionEnabled"]["#text"] !== undefined - ? output["TransitEncryptionEnabled"]["#text"] - : output["TransitEncryptionEnabled"]) == "true"; + output["TransitEncryptionEnabled"] == "true"; } return contents; }; @@ -10423,10 +10215,7 @@ const deserializeAws_queryCacheClusterMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -10444,34 +10233,20 @@ const deserializeAws_queryCacheEngineVersion = ( EngineVersion: undefined }; if (output["CacheEngineDescription"] !== undefined) { - contents.CacheEngineDescription = - output["CacheEngineDescription"]["#text"] !== undefined - ? output["CacheEngineDescription"]["#text"] - : output["CacheEngineDescription"]; + contents.CacheEngineDescription = output["CacheEngineDescription"]; } if (output["CacheEngineVersionDescription"] !== undefined) { contents.CacheEngineVersionDescription = - output["CacheEngineVersionDescription"]["#text"] !== undefined - ? output["CacheEngineVersionDescription"]["#text"] - : output["CacheEngineVersionDescription"]; + output["CacheEngineVersionDescription"]; } if (output["CacheParameterGroupFamily"] !== undefined) { - contents.CacheParameterGroupFamily = - output["CacheParameterGroupFamily"]["#text"] !== undefined - ? output["CacheParameterGroupFamily"]["#text"] - : output["CacheParameterGroupFamily"]; + contents.CacheParameterGroupFamily = output["CacheParameterGroupFamily"]; } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } return contents; }; @@ -10509,10 +10284,7 @@ const deserializeAws_queryCacheEngineVersionMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -10535,22 +10307,13 @@ const deserializeAws_queryCacheNode = ( contents.CacheNodeCreateTime = new Date(output["CacheNodeCreateTime"]); } if (output["CacheNodeId"] !== undefined) { - contents.CacheNodeId = - output["CacheNodeId"]["#text"] !== undefined - ? output["CacheNodeId"]["#text"] - : output["CacheNodeId"]; + contents.CacheNodeId = output["CacheNodeId"]; } if (output["CacheNodeStatus"] !== undefined) { - contents.CacheNodeStatus = - output["CacheNodeStatus"]["#text"] !== undefined - ? output["CacheNodeStatus"]["#text"] - : output["CacheNodeStatus"]; + contents.CacheNodeStatus = output["CacheNodeStatus"]; } if (output["CustomerAvailabilityZone"] !== undefined) { - contents.CustomerAvailabilityZone = - output["CustomerAvailabilityZone"]["#text"] !== undefined - ? output["CustomerAvailabilityZone"]["#text"] - : output["CustomerAvailabilityZone"]; + contents.CustomerAvailabilityZone = output["CustomerAvailabilityZone"]; } if (output["Endpoint"] !== undefined) { contents.Endpoint = deserializeAws_queryEndpoint( @@ -10559,16 +10322,10 @@ const deserializeAws_queryCacheNode = ( ); } if (output["ParameterGroupStatus"] !== undefined) { - contents.ParameterGroupStatus = - output["ParameterGroupStatus"]["#text"] !== undefined - ? output["ParameterGroupStatus"]["#text"] - : output["ParameterGroupStatus"]; + contents.ParameterGroupStatus = output["ParameterGroupStatus"]; } if (output["SourceCacheNodeId"] !== undefined) { - contents.SourceCacheNodeId = - output["SourceCacheNodeId"]["#text"] !== undefined - ? output["SourceCacheNodeId"]["#text"] - : output["SourceCacheNodeId"]; + contents.SourceCacheNodeId = output["SourceCacheNodeId"]; } return contents; }; @@ -10577,9 +10334,7 @@ const deserializeAws_queryCacheNodeIdsList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryCacheNodeList = ( @@ -10608,10 +10363,7 @@ const deserializeAws_queryCacheNodeTypeSpecificParameter = ( Source: undefined }; if (output["AllowedValues"] !== undefined) { - contents.AllowedValues = - output["AllowedValues"]["#text"] !== undefined - ? output["AllowedValues"]["#text"] - : output["AllowedValues"]; + contents.AllowedValues = output["AllowedValues"]; } if (output.CacheNodeTypeSpecificValues === "") { contents.CacheNodeTypeSpecificValues = []; @@ -10629,46 +10381,25 @@ const deserializeAws_queryCacheNodeTypeSpecificParameter = ( ); } if (output["ChangeType"] !== undefined) { - contents.ChangeType = - output["ChangeType"]["#text"] !== undefined - ? output["ChangeType"]["#text"] - : output["ChangeType"]; + contents.ChangeType = output["ChangeType"]; } if (output["DataType"] !== undefined) { - contents.DataType = - output["DataType"]["#text"] !== undefined - ? output["DataType"]["#text"] - : output["DataType"]; + contents.DataType = output["DataType"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["IsModifiable"] !== undefined) { - contents.IsModifiable = - (output["IsModifiable"]["#text"] !== undefined - ? output["IsModifiable"]["#text"] - : output["IsModifiable"]) == "true"; + contents.IsModifiable = output["IsModifiable"] == "true"; } if (output["MinimumEngineVersion"] !== undefined) { - contents.MinimumEngineVersion = - output["MinimumEngineVersion"]["#text"] !== undefined - ? output["MinimumEngineVersion"]["#text"] - : output["MinimumEngineVersion"]; + contents.MinimumEngineVersion = output["MinimumEngineVersion"]; } if (output["ParameterName"] !== undefined) { - contents.ParameterName = - output["ParameterName"]["#text"] !== undefined - ? output["ParameterName"]["#text"] - : output["ParameterName"]; + contents.ParameterName = output["ParameterName"]; } if (output["Source"] !== undefined) { - contents.Source = - output["Source"]["#text"] !== undefined - ? output["Source"]["#text"] - : output["Source"]; + contents.Source = output["Source"]; } return contents; }; @@ -10692,16 +10423,10 @@ const deserializeAws_queryCacheNodeTypeSpecificValue = ( Value: undefined }; if (output["CacheNodeType"] !== undefined) { - contents.CacheNodeType = - output["CacheNodeType"]["#text"] !== undefined - ? output["CacheNodeType"]["#text"] - : output["CacheNodeType"]; + contents.CacheNodeType = output["CacheNodeType"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -10731,10 +10456,7 @@ const deserializeAws_queryCacheNodeUpdateStatus = ( NodeUpdateStatusModifiedDate: undefined }; if (output["CacheNodeId"] !== undefined) { - contents.CacheNodeId = - output["CacheNodeId"]["#text"] !== undefined - ? output["CacheNodeId"]["#text"] - : output["CacheNodeId"]; + contents.CacheNodeId = output["CacheNodeId"]; } if (output["NodeDeletionDate"] !== undefined) { contents.NodeDeletionDate = new Date(output["NodeDeletionDate"]); @@ -10743,10 +10465,7 @@ const deserializeAws_queryCacheNodeUpdateStatus = ( contents.NodeUpdateEndDate = new Date(output["NodeUpdateEndDate"]); } if (output["NodeUpdateInitiatedBy"] !== undefined) { - contents.NodeUpdateInitiatedBy = - output["NodeUpdateInitiatedBy"]["#text"] !== undefined - ? output["NodeUpdateInitiatedBy"]["#text"] - : output["NodeUpdateInitiatedBy"]; + contents.NodeUpdateInitiatedBy = output["NodeUpdateInitiatedBy"]; } if (output["NodeUpdateInitiatedDate"] !== undefined) { contents.NodeUpdateInitiatedDate = new Date( @@ -10757,10 +10476,7 @@ const deserializeAws_queryCacheNodeUpdateStatus = ( contents.NodeUpdateStartDate = new Date(output["NodeUpdateStartDate"]); } if (output["NodeUpdateStatus"] !== undefined) { - contents.NodeUpdateStatus = - output["NodeUpdateStatus"]["#text"] !== undefined - ? output["NodeUpdateStatus"]["#text"] - : output["NodeUpdateStatus"]; + contents.NodeUpdateStatus = output["NodeUpdateStatus"]; } if (output["NodeUpdateStatusModifiedDate"] !== undefined) { contents.NodeUpdateStatusModifiedDate = new Date( @@ -10790,22 +10506,13 @@ const deserializeAws_queryCacheParameterGroup = ( Description: undefined }; if (output["CacheParameterGroupFamily"] !== undefined) { - contents.CacheParameterGroupFamily = - output["CacheParameterGroupFamily"]["#text"] !== undefined - ? output["CacheParameterGroupFamily"]["#text"] - : output["CacheParameterGroupFamily"]; + contents.CacheParameterGroupFamily = output["CacheParameterGroupFamily"]; } if (output["CacheParameterGroupName"] !== undefined) { - contents.CacheParameterGroupName = - output["CacheParameterGroupName"]["#text"] !== undefined - ? output["CacheParameterGroupName"]["#text"] - : output["CacheParameterGroupName"]; + contents.CacheParameterGroupName = output["CacheParameterGroupName"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } return contents; }; @@ -10839,10 +10546,7 @@ const deserializeAws_queryCacheParameterGroupDetails = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Parameters === "") { contents.Parameters = []; @@ -10877,10 +10581,7 @@ const deserializeAws_queryCacheParameterGroupNameMessage = ( CacheParameterGroupName: undefined }; if (output["CacheParameterGroupName"] !== undefined) { - contents.CacheParameterGroupName = - output["CacheParameterGroupName"]["#text"] !== undefined - ? output["CacheParameterGroupName"]["#text"] - : output["CacheParameterGroupName"]; + contents.CacheParameterGroupName = output["CacheParameterGroupName"]; } return contents; }; @@ -10908,16 +10609,10 @@ const deserializeAws_queryCacheParameterGroupStatus = ( ); } if (output["CacheParameterGroupName"] !== undefined) { - contents.CacheParameterGroupName = - output["CacheParameterGroupName"]["#text"] !== undefined - ? output["CacheParameterGroupName"]["#text"] - : output["CacheParameterGroupName"]; + contents.CacheParameterGroupName = output["CacheParameterGroupName"]; } if (output["ParameterApplyStatus"] !== undefined) { - contents.ParameterApplyStatus = - output["ParameterApplyStatus"]["#text"] !== undefined - ? output["ParameterApplyStatus"]["#text"] - : output["ParameterApplyStatus"]; + contents.ParameterApplyStatus = output["ParameterApplyStatus"]; } return contents; }; @@ -10946,10 +10641,7 @@ const deserializeAws_queryCacheParameterGroupsMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -10966,16 +10658,10 @@ const deserializeAws_queryCacheSecurityGroup = ( OwnerId: undefined }; if (output["CacheSecurityGroupName"] !== undefined) { - contents.CacheSecurityGroupName = - output["CacheSecurityGroupName"]["#text"] !== undefined - ? output["CacheSecurityGroupName"]["#text"] - : output["CacheSecurityGroupName"]; + contents.CacheSecurityGroupName = output["CacheSecurityGroupName"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output.EC2SecurityGroups === "") { contents.EC2SecurityGroups = []; @@ -10990,10 +10676,7 @@ const deserializeAws_queryCacheSecurityGroup = ( ); } if (output["OwnerId"] !== undefined) { - contents.OwnerId = - output["OwnerId"]["#text"] !== undefined - ? output["OwnerId"]["#text"] - : output["OwnerId"]; + contents.OwnerId = output["OwnerId"]; } return contents; }; @@ -11008,16 +10691,10 @@ const deserializeAws_queryCacheSecurityGroupMembership = ( Status: undefined }; if (output["CacheSecurityGroupName"] !== undefined) { - contents.CacheSecurityGroupName = - output["CacheSecurityGroupName"]["#text"] !== undefined - ? output["CacheSecurityGroupName"]["#text"] - : output["CacheSecurityGroupName"]; + contents.CacheSecurityGroupName = output["CacheSecurityGroupName"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -11055,10 +10732,7 @@ const deserializeAws_queryCacheSecurityGroupMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -11085,15 +10759,10 @@ const deserializeAws_queryCacheSubnetGroup = ( }; if (output["CacheSubnetGroupDescription"] !== undefined) { contents.CacheSubnetGroupDescription = - output["CacheSubnetGroupDescription"]["#text"] !== undefined - ? output["CacheSubnetGroupDescription"]["#text"] - : output["CacheSubnetGroupDescription"]; + output["CacheSubnetGroupDescription"]; } if (output["CacheSubnetGroupName"] !== undefined) { - contents.CacheSubnetGroupName = - output["CacheSubnetGroupName"]["#text"] !== undefined - ? output["CacheSubnetGroupName"]["#text"] - : output["CacheSubnetGroupName"]; + contents.CacheSubnetGroupName = output["CacheSubnetGroupName"]; } if (output.Subnets === "") { contents.Subnets = []; @@ -11108,10 +10777,7 @@ const deserializeAws_queryCacheSubnetGroup = ( ); } if (output["VpcId"] !== undefined) { - contents.VpcId = - output["VpcId"]["#text"] !== undefined - ? output["VpcId"]["#text"] - : output["VpcId"]; + contents.VpcId = output["VpcId"]; } return contents; }; @@ -11138,10 +10804,7 @@ const deserializeAws_queryCacheSubnetGroupMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -11159,9 +10822,7 @@ const deserializeAws_queryClusterIdList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryCompleteMigrationResponse = ( @@ -11395,10 +11056,7 @@ const deserializeAws_queryDescribeSnapshotsListMessage = ( Snapshots: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Snapshots === "") { contents.Snapshots = []; @@ -11426,22 +11084,13 @@ const deserializeAws_queryEC2SecurityGroup = ( Status: undefined }; if (output["EC2SecurityGroupName"] !== undefined) { - contents.EC2SecurityGroupName = - output["EC2SecurityGroupName"]["#text"] !== undefined - ? output["EC2SecurityGroupName"]["#text"] - : output["EC2SecurityGroupName"]; + contents.EC2SecurityGroupName = output["EC2SecurityGroupName"]; } if (output["EC2SecurityGroupOwnerId"] !== undefined) { - contents.EC2SecurityGroupOwnerId = - output["EC2SecurityGroupOwnerId"]["#text"] !== undefined - ? output["EC2SecurityGroupOwnerId"]["#text"] - : output["EC2SecurityGroupOwnerId"]; + contents.EC2SecurityGroupOwnerId = output["EC2SecurityGroupOwnerId"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -11465,17 +11114,10 @@ const deserializeAws_queryEndpoint = ( Port: undefined }; if (output["Address"] !== undefined) { - contents.Address = - output["Address"]["#text"] !== undefined - ? output["Address"]["#text"] - : output["Address"]; + contents.Address = output["Address"]; } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } return contents; }; @@ -11510,16 +11152,10 @@ const deserializeAws_queryEngineDefaults = ( ); } if (output["CacheParameterGroupFamily"] !== undefined) { - contents.CacheParameterGroupFamily = - output["CacheParameterGroupFamily"]["#text"] !== undefined - ? output["CacheParameterGroupFamily"]["#text"] - : output["CacheParameterGroupFamily"]; + contents.CacheParameterGroupFamily = output["CacheParameterGroupFamily"]; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Parameters === "") { contents.Parameters = []; @@ -11551,22 +11187,13 @@ const deserializeAws_queryEvent = ( contents.Date = new Date(output["Date"]); } if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } if (output["SourceIdentifier"] !== undefined) { - contents.SourceIdentifier = - output["SourceIdentifier"]["#text"] !== undefined - ? output["SourceIdentifier"]["#text"] - : output["SourceIdentifier"]; + contents.SourceIdentifier = output["SourceIdentifier"]; } if (output["SourceType"] !== undefined) { - contents.SourceType = - output["SourceType"]["#text"] !== undefined - ? output["SourceType"]["#text"] - : output["SourceType"]; + contents.SourceType = output["SourceType"]; } return contents; }; @@ -11602,10 +11229,7 @@ const deserializeAws_queryEventsMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -11709,10 +11333,7 @@ const deserializeAws_queryNodeGroup = ( Status: undefined }; if (output["NodeGroupId"] !== undefined) { - contents.NodeGroupId = - output["NodeGroupId"]["#text"] !== undefined - ? output["NodeGroupId"]["#text"] - : output["NodeGroupId"]; + contents.NodeGroupId = output["NodeGroupId"]; } if (output.NodeGroupMembers === "") { contents.NodeGroupMembers = []; @@ -11739,16 +11360,10 @@ const deserializeAws_queryNodeGroup = ( ); } if (output["Slots"] !== undefined) { - contents.Slots = - output["Slots"]["#text"] !== undefined - ? output["Slots"]["#text"] - : output["Slots"]; + contents.Slots = output["Slots"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -11766,16 +11381,10 @@ const deserializeAws_queryNodeGroupConfiguration = ( Slots: undefined }; if (output["NodeGroupId"] !== undefined) { - contents.NodeGroupId = - output["NodeGroupId"]["#text"] !== undefined - ? output["NodeGroupId"]["#text"] - : output["NodeGroupId"]; + contents.NodeGroupId = output["NodeGroupId"]; } if (output["PrimaryAvailabilityZone"] !== undefined) { - contents.PrimaryAvailabilityZone = - output["PrimaryAvailabilityZone"]["#text"] !== undefined - ? output["PrimaryAvailabilityZone"]["#text"] - : output["PrimaryAvailabilityZone"]; + contents.PrimaryAvailabilityZone = output["PrimaryAvailabilityZone"]; } if (output.ReplicaAvailabilityZones === "") { contents.ReplicaAvailabilityZones = []; @@ -11792,17 +11401,10 @@ const deserializeAws_queryNodeGroupConfiguration = ( ); } if (output["ReplicaCount"] !== undefined) { - contents.ReplicaCount = parseInt( - output["ReplicaCount"]["#text"] !== undefined - ? output["ReplicaCount"]["#text"] - : output["ReplicaCount"] - ); + contents.ReplicaCount = parseInt(output["ReplicaCount"]); } if (output["Slots"] !== undefined) { - contents.Slots = - output["Slots"]["#text"] !== undefined - ? output["Slots"]["#text"] - : output["Slots"]; + contents.Slots = output["Slots"]; } return contents; }; @@ -11829,28 +11431,16 @@ const deserializeAws_queryNodeGroupMember = ( ReadEndpoint: undefined }; if (output["CacheClusterId"] !== undefined) { - contents.CacheClusterId = - output["CacheClusterId"]["#text"] !== undefined - ? output["CacheClusterId"]["#text"] - : output["CacheClusterId"]; + contents.CacheClusterId = output["CacheClusterId"]; } if (output["CacheNodeId"] !== undefined) { - contents.CacheNodeId = - output["CacheNodeId"]["#text"] !== undefined - ? output["CacheNodeId"]["#text"] - : output["CacheNodeId"]; + contents.CacheNodeId = output["CacheNodeId"]; } if (output["CurrentRole"] !== undefined) { - contents.CurrentRole = - output["CurrentRole"]["#text"] !== undefined - ? output["CurrentRole"]["#text"] - : output["CurrentRole"]; + contents.CurrentRole = output["CurrentRole"]; } if (output["PreferredAvailabilityZone"] !== undefined) { - contents.PreferredAvailabilityZone = - output["PreferredAvailabilityZone"]["#text"] !== undefined - ? output["PreferredAvailabilityZone"]["#text"] - : output["PreferredAvailabilityZone"]; + contents.PreferredAvailabilityZone = output["PreferredAvailabilityZone"]; } if (output["ReadEndpoint"] !== undefined) { contents.ReadEndpoint = deserializeAws_queryEndpoint( @@ -11887,16 +11477,10 @@ const deserializeAws_queryNodeGroupMemberUpdateStatus = ( NodeUpdateStatusModifiedDate: undefined }; if (output["CacheClusterId"] !== undefined) { - contents.CacheClusterId = - output["CacheClusterId"]["#text"] !== undefined - ? output["CacheClusterId"]["#text"] - : output["CacheClusterId"]; + contents.CacheClusterId = output["CacheClusterId"]; } if (output["CacheNodeId"] !== undefined) { - contents.CacheNodeId = - output["CacheNodeId"]["#text"] !== undefined - ? output["CacheNodeId"]["#text"] - : output["CacheNodeId"]; + contents.CacheNodeId = output["CacheNodeId"]; } if (output["NodeDeletionDate"] !== undefined) { contents.NodeDeletionDate = new Date(output["NodeDeletionDate"]); @@ -11905,10 +11489,7 @@ const deserializeAws_queryNodeGroupMemberUpdateStatus = ( contents.NodeUpdateEndDate = new Date(output["NodeUpdateEndDate"]); } if (output["NodeUpdateInitiatedBy"] !== undefined) { - contents.NodeUpdateInitiatedBy = - output["NodeUpdateInitiatedBy"]["#text"] !== undefined - ? output["NodeUpdateInitiatedBy"]["#text"] - : output["NodeUpdateInitiatedBy"]; + contents.NodeUpdateInitiatedBy = output["NodeUpdateInitiatedBy"]; } if (output["NodeUpdateInitiatedDate"] !== undefined) { contents.NodeUpdateInitiatedDate = new Date( @@ -11919,10 +11500,7 @@ const deserializeAws_queryNodeGroupMemberUpdateStatus = ( contents.NodeUpdateStartDate = new Date(output["NodeUpdateStartDate"]); } if (output["NodeUpdateStatus"] !== undefined) { - contents.NodeUpdateStatus = - output["NodeUpdateStatus"]["#text"] !== undefined - ? output["NodeUpdateStatus"]["#text"] - : output["NodeUpdateStatus"]; + contents.NodeUpdateStatus = output["NodeUpdateStatus"]; } if (output["NodeUpdateStatusModifiedDate"] !== undefined) { contents.NodeUpdateStatusModifiedDate = new Date( @@ -11951,10 +11529,7 @@ const deserializeAws_queryNodeGroupUpdateStatus = ( NodeGroupMemberUpdateStatus: undefined }; if (output["NodeGroupId"] !== undefined) { - contents.NodeGroupId = - output["NodeGroupId"]["#text"] !== undefined - ? output["NodeGroupId"]["#text"] - : output["NodeGroupId"]; + contents.NodeGroupId = output["NodeGroupId"]; } if (output.NodeGroupMemberUpdateStatus === "") { contents.NodeGroupMemberUpdateStatus = []; @@ -11998,25 +11573,16 @@ const deserializeAws_queryNodeSnapshot = ( SnapshotCreateTime: undefined }; if (output["CacheClusterId"] !== undefined) { - contents.CacheClusterId = - output["CacheClusterId"]["#text"] !== undefined - ? output["CacheClusterId"]["#text"] - : output["CacheClusterId"]; + contents.CacheClusterId = output["CacheClusterId"]; } if (output["CacheNodeCreateTime"] !== undefined) { contents.CacheNodeCreateTime = new Date(output["CacheNodeCreateTime"]); } if (output["CacheNodeId"] !== undefined) { - contents.CacheNodeId = - output["CacheNodeId"]["#text"] !== undefined - ? output["CacheNodeId"]["#text"] - : output["CacheNodeId"]; + contents.CacheNodeId = output["CacheNodeId"]; } if (output["CacheSize"] !== undefined) { - contents.CacheSize = - output["CacheSize"]["#text"] !== undefined - ? output["CacheSize"]["#text"] - : output["CacheSize"]; + contents.CacheSize = output["CacheSize"]; } if (output["NodeGroupConfiguration"] !== undefined) { contents.NodeGroupConfiguration = deserializeAws_queryNodeGroupConfiguration( @@ -12025,10 +11591,7 @@ const deserializeAws_queryNodeSnapshot = ( ); } if (output["NodeGroupId"] !== undefined) { - contents.NodeGroupId = - output["NodeGroupId"]["#text"] !== undefined - ? output["NodeGroupId"]["#text"] - : output["NodeGroupId"]; + contents.NodeGroupId = output["NodeGroupId"]; } if (output["SnapshotCreateTime"] !== undefined) { contents.SnapshotCreateTime = new Date(output["SnapshotCreateTime"]); @@ -12049,9 +11612,7 @@ const deserializeAws_queryNodeTypeList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryNotificationConfiguration = ( @@ -12064,16 +11625,10 @@ const deserializeAws_queryNotificationConfiguration = ( TopicStatus: undefined }; if (output["TopicArn"] !== undefined) { - contents.TopicArn = - output["TopicArn"]["#text"] !== undefined - ? output["TopicArn"]["#text"] - : output["TopicArn"]; + contents.TopicArn = output["TopicArn"]; } if (output["TopicStatus"] !== undefined) { - contents.TopicStatus = - output["TopicStatus"]["#text"] !== undefined - ? output["TopicStatus"]["#text"] - : output["TopicStatus"]; + contents.TopicStatus = output["TopicStatus"]; } return contents; }; @@ -12095,58 +11650,31 @@ const deserializeAws_queryParameter = ( Source: undefined }; if (output["AllowedValues"] !== undefined) { - contents.AllowedValues = - output["AllowedValues"]["#text"] !== undefined - ? output["AllowedValues"]["#text"] - : output["AllowedValues"]; + contents.AllowedValues = output["AllowedValues"]; } if (output["ChangeType"] !== undefined) { - contents.ChangeType = - output["ChangeType"]["#text"] !== undefined - ? output["ChangeType"]["#text"] - : output["ChangeType"]; + contents.ChangeType = output["ChangeType"]; } if (output["DataType"] !== undefined) { - contents.DataType = - output["DataType"]["#text"] !== undefined - ? output["DataType"]["#text"] - : output["DataType"]; + contents.DataType = output["DataType"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["IsModifiable"] !== undefined) { - contents.IsModifiable = - (output["IsModifiable"]["#text"] !== undefined - ? output["IsModifiable"]["#text"] - : output["IsModifiable"]) == "true"; + contents.IsModifiable = output["IsModifiable"] == "true"; } if (output["MinimumEngineVersion"] !== undefined) { - contents.MinimumEngineVersion = - output["MinimumEngineVersion"]["#text"] !== undefined - ? output["MinimumEngineVersion"]["#text"] - : output["MinimumEngineVersion"]; + contents.MinimumEngineVersion = output["MinimumEngineVersion"]; } if (output["ParameterName"] !== undefined) { - contents.ParameterName = - output["ParameterName"]["#text"] !== undefined - ? output["ParameterName"]["#text"] - : output["ParameterName"]; + contents.ParameterName = output["ParameterName"]; } if (output["ParameterValue"] !== undefined) { - contents.ParameterValue = - output["ParameterValue"]["#text"] !== undefined - ? output["ParameterValue"]["#text"] - : output["ParameterValue"]; + contents.ParameterValue = output["ParameterValue"]; } if (output["Source"] !== undefined) { - contents.Source = - output["Source"]["#text"] !== undefined - ? output["Source"]["#text"] - : output["Source"]; + contents.Source = output["Source"]; } return contents; }; @@ -12173,10 +11701,7 @@ const deserializeAws_queryPendingModifiedValues = ( NumCacheNodes: undefined }; if (output["AuthTokenStatus"] !== undefined) { - contents.AuthTokenStatus = - output["AuthTokenStatus"]["#text"] !== undefined - ? output["AuthTokenStatus"]["#text"] - : output["AuthTokenStatus"]; + contents.AuthTokenStatus = output["AuthTokenStatus"]; } if (output.CacheNodeIdsToRemove === "") { contents.CacheNodeIdsToRemove = []; @@ -12191,23 +11716,13 @@ const deserializeAws_queryPendingModifiedValues = ( ); } if (output["CacheNodeType"] !== undefined) { - contents.CacheNodeType = - output["CacheNodeType"]["#text"] !== undefined - ? output["CacheNodeType"]["#text"] - : output["CacheNodeType"]; + contents.CacheNodeType = output["CacheNodeType"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["NumCacheNodes"] !== undefined) { - contents.NumCacheNodes = parseInt( - output["NumCacheNodes"]["#text"] !== undefined - ? output["NumCacheNodes"]["#text"] - : output["NumCacheNodes"] - ); + contents.NumCacheNodes = parseInt(output["NumCacheNodes"]); } return contents; }; @@ -12224,28 +11739,16 @@ const deserializeAws_queryProcessedUpdateAction = ( UpdateActionStatus: undefined }; if (output["CacheClusterId"] !== undefined) { - contents.CacheClusterId = - output["CacheClusterId"]["#text"] !== undefined - ? output["CacheClusterId"]["#text"] - : output["CacheClusterId"]; + contents.CacheClusterId = output["CacheClusterId"]; } if (output["ReplicationGroupId"] !== undefined) { - contents.ReplicationGroupId = - output["ReplicationGroupId"]["#text"] !== undefined - ? output["ReplicationGroupId"]["#text"] - : output["ReplicationGroupId"]; + contents.ReplicationGroupId = output["ReplicationGroupId"]; } if (output["ServiceUpdateName"] !== undefined) { - contents.ServiceUpdateName = - output["ServiceUpdateName"]["#text"] !== undefined - ? output["ServiceUpdateName"]["#text"] - : output["ServiceUpdateName"]; + contents.ServiceUpdateName = output["ServiceUpdateName"]; } if (output["UpdateActionStatus"] !== undefined) { - contents.UpdateActionStatus = - output["UpdateActionStatus"]["#text"] !== undefined - ? output["UpdateActionStatus"]["#text"] - : output["UpdateActionStatus"]; + contents.UpdateActionStatus = output["UpdateActionStatus"]; } return contents; }; @@ -12304,16 +11807,11 @@ const deserializeAws_queryRecurringCharge = ( }; if (output["RecurringChargeAmount"] !== undefined) { contents.RecurringChargeAmount = parseFloat( - output["RecurringChargeAmount"]["#text"] !== undefined - ? output["RecurringChargeAmount"]["#text"] - : output["RecurringChargeAmount"] + output["RecurringChargeAmount"] ); } if (output["RecurringChargeFrequency"] !== undefined) { - contents.RecurringChargeFrequency = - output["RecurringChargeFrequency"]["#text"] !== undefined - ? output["RecurringChargeFrequency"]["#text"] - : output["RecurringChargeFrequency"]; + contents.RecurringChargeFrequency = output["RecurringChargeFrequency"]; } return contents; }; @@ -12354,15 +11852,10 @@ const deserializeAws_queryReplicationGroup = ( }; if (output["AtRestEncryptionEnabled"] !== undefined) { contents.AtRestEncryptionEnabled = - (output["AtRestEncryptionEnabled"]["#text"] !== undefined - ? output["AtRestEncryptionEnabled"]["#text"] - : output["AtRestEncryptionEnabled"]) == "true"; + output["AtRestEncryptionEnabled"] == "true"; } if (output["AuthTokenEnabled"] !== undefined) { - contents.AuthTokenEnabled = - (output["AuthTokenEnabled"]["#text"] !== undefined - ? output["AuthTokenEnabled"]["#text"] - : output["AuthTokenEnabled"]) == "true"; + contents.AuthTokenEnabled = output["AuthTokenEnabled"] == "true"; } if (output["AuthTokenLastModifiedDate"] !== undefined) { contents.AuthTokenLastModifiedDate = new Date( @@ -12370,22 +11863,13 @@ const deserializeAws_queryReplicationGroup = ( ); } if (output["AutomaticFailover"] !== undefined) { - contents.AutomaticFailover = - output["AutomaticFailover"]["#text"] !== undefined - ? output["AutomaticFailover"]["#text"] - : output["AutomaticFailover"]; + contents.AutomaticFailover = output["AutomaticFailover"]; } if (output["CacheNodeType"] !== undefined) { - contents.CacheNodeType = - output["CacheNodeType"]["#text"] !== undefined - ? output["CacheNodeType"]["#text"] - : output["CacheNodeType"]; + contents.CacheNodeType = output["CacheNodeType"]; } if (output["ClusterEnabled"] !== undefined) { - contents.ClusterEnabled = - (output["ClusterEnabled"]["#text"] !== undefined - ? output["ClusterEnabled"]["#text"] - : output["ClusterEnabled"]) == "true"; + contents.ClusterEnabled = output["ClusterEnabled"] == "true"; } if (output["ConfigurationEndpoint"] !== undefined) { contents.ConfigurationEndpoint = deserializeAws_queryEndpoint( @@ -12394,16 +11878,10 @@ const deserializeAws_queryReplicationGroup = ( ); } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["KmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["KmsKeyId"]["#text"] !== undefined - ? output["KmsKeyId"]["#text"] - : output["KmsKeyId"]; + contents.KmsKeyId = output["KmsKeyId"]; } if (output.MemberClusters === "") { contents.MemberClusters = []; @@ -12436,41 +11914,25 @@ const deserializeAws_queryReplicationGroup = ( ); } if (output["ReplicationGroupId"] !== undefined) { - contents.ReplicationGroupId = - output["ReplicationGroupId"]["#text"] !== undefined - ? output["ReplicationGroupId"]["#text"] - : output["ReplicationGroupId"]; + contents.ReplicationGroupId = output["ReplicationGroupId"]; } if (output["SnapshotRetentionLimit"] !== undefined) { contents.SnapshotRetentionLimit = parseInt( - output["SnapshotRetentionLimit"]["#text"] !== undefined - ? output["SnapshotRetentionLimit"]["#text"] - : output["SnapshotRetentionLimit"] + output["SnapshotRetentionLimit"] ); } if (output["SnapshotWindow"] !== undefined) { - contents.SnapshotWindow = - output["SnapshotWindow"]["#text"] !== undefined - ? output["SnapshotWindow"]["#text"] - : output["SnapshotWindow"]; + contents.SnapshotWindow = output["SnapshotWindow"]; } if (output["SnapshottingClusterId"] !== undefined) { - contents.SnapshottingClusterId = - output["SnapshottingClusterId"]["#text"] !== undefined - ? output["SnapshottingClusterId"]["#text"] - : output["SnapshottingClusterId"]; + contents.SnapshottingClusterId = output["SnapshottingClusterId"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["TransitEncryptionEnabled"] !== undefined) { contents.TransitEncryptionEnabled = - (output["TransitEncryptionEnabled"]["#text"] !== undefined - ? output["TransitEncryptionEnabled"]["#text"] - : output["TransitEncryptionEnabled"]) == "true"; + output["TransitEncryptionEnabled"] == "true"; } return contents; }; @@ -12494,10 +11956,7 @@ const deserializeAws_queryReplicationGroupMessage = ( ReplicationGroups: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.ReplicationGroups === "") { contents.ReplicationGroups = []; @@ -12526,22 +11985,13 @@ const deserializeAws_queryReplicationGroupPendingModifiedValues = ( Resharding: undefined }; if (output["AuthTokenStatus"] !== undefined) { - contents.AuthTokenStatus = - output["AuthTokenStatus"]["#text"] !== undefined - ? output["AuthTokenStatus"]["#text"] - : output["AuthTokenStatus"]; + contents.AuthTokenStatus = output["AuthTokenStatus"]; } if (output["AutomaticFailoverStatus"] !== undefined) { - contents.AutomaticFailoverStatus = - output["AutomaticFailoverStatus"]["#text"] !== undefined - ? output["AutomaticFailoverStatus"]["#text"] - : output["AutomaticFailoverStatus"]; + contents.AutomaticFailoverStatus = output["AutomaticFailoverStatus"]; } if (output["PrimaryClusterId"] !== undefined) { - contents.PrimaryClusterId = - output["PrimaryClusterId"]["#text"] !== undefined - ? output["PrimaryClusterId"]["#text"] - : output["PrimaryClusterId"]; + contents.PrimaryClusterId = output["PrimaryClusterId"]; } if (output["Resharding"] !== undefined) { contents.Resharding = deserializeAws_queryReshardingStatus( @@ -12573,43 +12023,22 @@ const deserializeAws_queryReservedCacheNode = ( UsagePrice: undefined }; if (output["CacheNodeCount"] !== undefined) { - contents.CacheNodeCount = parseInt( - output["CacheNodeCount"]["#text"] !== undefined - ? output["CacheNodeCount"]["#text"] - : output["CacheNodeCount"] - ); + contents.CacheNodeCount = parseInt(output["CacheNodeCount"]); } if (output["CacheNodeType"] !== undefined) { - contents.CacheNodeType = - output["CacheNodeType"]["#text"] !== undefined - ? output["CacheNodeType"]["#text"] - : output["CacheNodeType"]; + contents.CacheNodeType = output["CacheNodeType"]; } if (output["Duration"] !== undefined) { - contents.Duration = parseInt( - output["Duration"]["#text"] !== undefined - ? output["Duration"]["#text"] - : output["Duration"] - ); + contents.Duration = parseInt(output["Duration"]); } if (output["FixedPrice"] !== undefined) { - contents.FixedPrice = parseFloat( - output["FixedPrice"]["#text"] !== undefined - ? output["FixedPrice"]["#text"] - : output["FixedPrice"] - ); + contents.FixedPrice = parseFloat(output["FixedPrice"]); } if (output["OfferingType"] !== undefined) { - contents.OfferingType = - output["OfferingType"]["#text"] !== undefined - ? output["OfferingType"]["#text"] - : output["OfferingType"]; + contents.OfferingType = output["OfferingType"]; } if (output["ProductDescription"] !== undefined) { - contents.ProductDescription = - output["ProductDescription"]["#text"] !== undefined - ? output["ProductDescription"]["#text"] - : output["ProductDescription"]; + contents.ProductDescription = output["ProductDescription"]; } if (output.RecurringCharges === "") { contents.RecurringCharges = []; @@ -12624,38 +12053,23 @@ const deserializeAws_queryReservedCacheNode = ( ); } if (output["ReservationARN"] !== undefined) { - contents.ReservationARN = - output["ReservationARN"]["#text"] !== undefined - ? output["ReservationARN"]["#text"] - : output["ReservationARN"]; + contents.ReservationARN = output["ReservationARN"]; } if (output["ReservedCacheNodeId"] !== undefined) { - contents.ReservedCacheNodeId = - output["ReservedCacheNodeId"]["#text"] !== undefined - ? output["ReservedCacheNodeId"]["#text"] - : output["ReservedCacheNodeId"]; + contents.ReservedCacheNodeId = output["ReservedCacheNodeId"]; } if (output["ReservedCacheNodesOfferingId"] !== undefined) { contents.ReservedCacheNodesOfferingId = - output["ReservedCacheNodesOfferingId"]["#text"] !== undefined - ? output["ReservedCacheNodesOfferingId"]["#text"] - : output["ReservedCacheNodesOfferingId"]; + output["ReservedCacheNodesOfferingId"]; } if (output["StartTime"] !== undefined) { contents.StartTime = new Date(output["StartTime"]); } if (output["State"] !== undefined) { - contents.State = - output["State"]["#text"] !== undefined - ? output["State"]["#text"] - : output["State"]; + contents.State = output["State"]; } if (output["UsagePrice"] !== undefined) { - contents.UsagePrice = parseFloat( - output["UsagePrice"]["#text"] !== undefined - ? output["UsagePrice"]["#text"] - : output["UsagePrice"] - ); + contents.UsagePrice = parseFloat(output["UsagePrice"]); } return contents; }; @@ -12679,10 +12093,7 @@ const deserializeAws_queryReservedCacheNodeMessage = ( ReservedCacheNodes: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.ReservedCacheNodes === "") { contents.ReservedCacheNodes = []; @@ -12715,36 +12126,19 @@ const deserializeAws_queryReservedCacheNodesOffering = ( UsagePrice: undefined }; if (output["CacheNodeType"] !== undefined) { - contents.CacheNodeType = - output["CacheNodeType"]["#text"] !== undefined - ? output["CacheNodeType"]["#text"] - : output["CacheNodeType"]; + contents.CacheNodeType = output["CacheNodeType"]; } if (output["Duration"] !== undefined) { - contents.Duration = parseInt( - output["Duration"]["#text"] !== undefined - ? output["Duration"]["#text"] - : output["Duration"] - ); + contents.Duration = parseInt(output["Duration"]); } if (output["FixedPrice"] !== undefined) { - contents.FixedPrice = parseFloat( - output["FixedPrice"]["#text"] !== undefined - ? output["FixedPrice"]["#text"] - : output["FixedPrice"] - ); + contents.FixedPrice = parseFloat(output["FixedPrice"]); } if (output["OfferingType"] !== undefined) { - contents.OfferingType = - output["OfferingType"]["#text"] !== undefined - ? output["OfferingType"]["#text"] - : output["OfferingType"]; + contents.OfferingType = output["OfferingType"]; } if (output["ProductDescription"] !== undefined) { - contents.ProductDescription = - output["ProductDescription"]["#text"] !== undefined - ? output["ProductDescription"]["#text"] - : output["ProductDescription"]; + contents.ProductDescription = output["ProductDescription"]; } if (output.RecurringCharges === "") { contents.RecurringCharges = []; @@ -12760,16 +12154,10 @@ const deserializeAws_queryReservedCacheNodesOffering = ( } if (output["ReservedCacheNodesOfferingId"] !== undefined) { contents.ReservedCacheNodesOfferingId = - output["ReservedCacheNodesOfferingId"]["#text"] !== undefined - ? output["ReservedCacheNodesOfferingId"]["#text"] - : output["ReservedCacheNodesOfferingId"]; + output["ReservedCacheNodesOfferingId"]; } if (output["UsagePrice"] !== undefined) { - contents.UsagePrice = parseFloat( - output["UsagePrice"]["#text"] !== undefined - ? output["UsagePrice"]["#text"] - : output["UsagePrice"] - ); + contents.UsagePrice = parseFloat(output["UsagePrice"]); } return contents; }; @@ -12793,10 +12181,7 @@ const deserializeAws_queryReservedCacheNodesOfferingMessage = ( ReservedCacheNodesOfferings: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.ReservedCacheNodesOfferings === "") { contents.ReservedCacheNodesOfferings = []; @@ -12860,16 +12245,10 @@ const deserializeAws_querySecurityGroupMembership = ( Status: undefined }; if (output["SecurityGroupId"] !== undefined) { - contents.SecurityGroupId = - output["SecurityGroupId"]["#text"] !== undefined - ? output["SecurityGroupId"]["#text"] - : output["SecurityGroupId"]; + contents.SecurityGroupId = output["SecurityGroupId"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -12904,42 +12283,25 @@ const deserializeAws_queryServiceUpdate = ( }; if (output["AutoUpdateAfterRecommendedApplyByDate"] !== undefined) { contents.AutoUpdateAfterRecommendedApplyByDate = - (output["AutoUpdateAfterRecommendedApplyByDate"]["#text"] !== undefined - ? output["AutoUpdateAfterRecommendedApplyByDate"]["#text"] - : output["AutoUpdateAfterRecommendedApplyByDate"]) == "true"; + output["AutoUpdateAfterRecommendedApplyByDate"] == "true"; } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["EstimatedUpdateTime"] !== undefined) { - contents.EstimatedUpdateTime = - output["EstimatedUpdateTime"]["#text"] !== undefined - ? output["EstimatedUpdateTime"]["#text"] - : output["EstimatedUpdateTime"]; + contents.EstimatedUpdateTime = output["EstimatedUpdateTime"]; } if (output["ServiceUpdateDescription"] !== undefined) { - contents.ServiceUpdateDescription = - output["ServiceUpdateDescription"]["#text"] !== undefined - ? output["ServiceUpdateDescription"]["#text"] - : output["ServiceUpdateDescription"]; + contents.ServiceUpdateDescription = output["ServiceUpdateDescription"]; } if (output["ServiceUpdateEndDate"] !== undefined) { contents.ServiceUpdateEndDate = new Date(output["ServiceUpdateEndDate"]); } if (output["ServiceUpdateName"] !== undefined) { - contents.ServiceUpdateName = - output["ServiceUpdateName"]["#text"] !== undefined - ? output["ServiceUpdateName"]["#text"] - : output["ServiceUpdateName"]; + contents.ServiceUpdateName = output["ServiceUpdateName"]; } if (output["ServiceUpdateRecommendedApplyByDate"] !== undefined) { contents.ServiceUpdateRecommendedApplyByDate = new Date( @@ -12952,22 +12314,13 @@ const deserializeAws_queryServiceUpdate = ( ); } if (output["ServiceUpdateSeverity"] !== undefined) { - contents.ServiceUpdateSeverity = - output["ServiceUpdateSeverity"]["#text"] !== undefined - ? output["ServiceUpdateSeverity"]["#text"] - : output["ServiceUpdateSeverity"]; + contents.ServiceUpdateSeverity = output["ServiceUpdateSeverity"]; } if (output["ServiceUpdateStatus"] !== undefined) { - contents.ServiceUpdateStatus = - output["ServiceUpdateStatus"]["#text"] !== undefined - ? output["ServiceUpdateStatus"]["#text"] - : output["ServiceUpdateStatus"]; + contents.ServiceUpdateStatus = output["ServiceUpdateStatus"]; } if (output["ServiceUpdateType"] !== undefined) { - contents.ServiceUpdateType = - output["ServiceUpdateType"]["#text"] !== undefined - ? output["ServiceUpdateType"]["#text"] - : output["ServiceUpdateType"]; + contents.ServiceUpdateType = output["ServiceUpdateType"]; } return contents; }; @@ -12991,10 +12344,7 @@ const deserializeAws_queryServiceUpdatesMessage = ( ServiceUpdates: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.ServiceUpdates === "") { contents.ServiceUpdates = []; @@ -13020,11 +12370,7 @@ const deserializeAws_querySlotMigration = ( ProgressPercentage: undefined }; if (output["ProgressPercentage"] !== undefined) { - contents.ProgressPercentage = parseFloat( - output["ProgressPercentage"]["#text"] !== undefined - ? output["ProgressPercentage"]["#text"] - : output["ProgressPercentage"] - ); + contents.ProgressPercentage = parseFloat(output["ProgressPercentage"]); } return contents; }; @@ -13063,15 +12409,10 @@ const deserializeAws_querySnapshot = ( }; if (output["AutoMinorVersionUpgrade"] !== undefined) { contents.AutoMinorVersionUpgrade = - (output["AutoMinorVersionUpgrade"]["#text"] !== undefined - ? output["AutoMinorVersionUpgrade"]["#text"] - : output["AutoMinorVersionUpgrade"]) == "true"; + output["AutoMinorVersionUpgrade"] == "true"; } if (output["AutomaticFailover"] !== undefined) { - contents.AutomaticFailover = - output["AutomaticFailover"]["#text"] !== undefined - ? output["AutomaticFailover"]["#text"] - : output["AutomaticFailover"]; + contents.AutomaticFailover = output["AutomaticFailover"]; } if (output["CacheClusterCreateTime"] !== undefined) { contents.CacheClusterCreateTime = new Date( @@ -13079,46 +12420,25 @@ const deserializeAws_querySnapshot = ( ); } if (output["CacheClusterId"] !== undefined) { - contents.CacheClusterId = - output["CacheClusterId"]["#text"] !== undefined - ? output["CacheClusterId"]["#text"] - : output["CacheClusterId"]; + contents.CacheClusterId = output["CacheClusterId"]; } if (output["CacheNodeType"] !== undefined) { - contents.CacheNodeType = - output["CacheNodeType"]["#text"] !== undefined - ? output["CacheNodeType"]["#text"] - : output["CacheNodeType"]; + contents.CacheNodeType = output["CacheNodeType"]; } if (output["CacheParameterGroupName"] !== undefined) { - contents.CacheParameterGroupName = - output["CacheParameterGroupName"]["#text"] !== undefined - ? output["CacheParameterGroupName"]["#text"] - : output["CacheParameterGroupName"]; + contents.CacheParameterGroupName = output["CacheParameterGroupName"]; } if (output["CacheSubnetGroupName"] !== undefined) { - contents.CacheSubnetGroupName = - output["CacheSubnetGroupName"]["#text"] !== undefined - ? output["CacheSubnetGroupName"]["#text"] - : output["CacheSubnetGroupName"]; + contents.CacheSubnetGroupName = output["CacheSubnetGroupName"]; } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["KmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["KmsKeyId"]["#text"] !== undefined - ? output["KmsKeyId"]["#text"] - : output["KmsKeyId"]; + contents.KmsKeyId = output["KmsKeyId"]; } if (output.NodeSnapshots === "") { contents.NodeSnapshots = []; @@ -13133,92 +12453,49 @@ const deserializeAws_querySnapshot = ( ); } if (output["NumCacheNodes"] !== undefined) { - contents.NumCacheNodes = parseInt( - output["NumCacheNodes"]["#text"] !== undefined - ? output["NumCacheNodes"]["#text"] - : output["NumCacheNodes"] - ); + contents.NumCacheNodes = parseInt(output["NumCacheNodes"]); } if (output["NumNodeGroups"] !== undefined) { - contents.NumNodeGroups = parseInt( - output["NumNodeGroups"]["#text"] !== undefined - ? output["NumNodeGroups"]["#text"] - : output["NumNodeGroups"] - ); + contents.NumNodeGroups = parseInt(output["NumNodeGroups"]); } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } if (output["PreferredAvailabilityZone"] !== undefined) { - contents.PreferredAvailabilityZone = - output["PreferredAvailabilityZone"]["#text"] !== undefined - ? output["PreferredAvailabilityZone"]["#text"] - : output["PreferredAvailabilityZone"]; + contents.PreferredAvailabilityZone = output["PreferredAvailabilityZone"]; } if (output["PreferredMaintenanceWindow"] !== undefined) { - contents.PreferredMaintenanceWindow = - output["PreferredMaintenanceWindow"]["#text"] !== undefined - ? output["PreferredMaintenanceWindow"]["#text"] - : output["PreferredMaintenanceWindow"]; + contents.PreferredMaintenanceWindow = output["PreferredMaintenanceWindow"]; } if (output["ReplicationGroupDescription"] !== undefined) { contents.ReplicationGroupDescription = - output["ReplicationGroupDescription"]["#text"] !== undefined - ? output["ReplicationGroupDescription"]["#text"] - : output["ReplicationGroupDescription"]; + output["ReplicationGroupDescription"]; } if (output["ReplicationGroupId"] !== undefined) { - contents.ReplicationGroupId = - output["ReplicationGroupId"]["#text"] !== undefined - ? output["ReplicationGroupId"]["#text"] - : output["ReplicationGroupId"]; + contents.ReplicationGroupId = output["ReplicationGroupId"]; } if (output["SnapshotName"] !== undefined) { - contents.SnapshotName = - output["SnapshotName"]["#text"] !== undefined - ? output["SnapshotName"]["#text"] - : output["SnapshotName"]; + contents.SnapshotName = output["SnapshotName"]; } if (output["SnapshotRetentionLimit"] !== undefined) { contents.SnapshotRetentionLimit = parseInt( - output["SnapshotRetentionLimit"]["#text"] !== undefined - ? output["SnapshotRetentionLimit"]["#text"] - : output["SnapshotRetentionLimit"] + output["SnapshotRetentionLimit"] ); } if (output["SnapshotSource"] !== undefined) { - contents.SnapshotSource = - output["SnapshotSource"]["#text"] !== undefined - ? output["SnapshotSource"]["#text"] - : output["SnapshotSource"]; + contents.SnapshotSource = output["SnapshotSource"]; } if (output["SnapshotStatus"] !== undefined) { - contents.SnapshotStatus = - output["SnapshotStatus"]["#text"] !== undefined - ? output["SnapshotStatus"]["#text"] - : output["SnapshotStatus"]; + contents.SnapshotStatus = output["SnapshotStatus"]; } if (output["SnapshotWindow"] !== undefined) { - contents.SnapshotWindow = - output["SnapshotWindow"]["#text"] !== undefined - ? output["SnapshotWindow"]["#text"] - : output["SnapshotWindow"]; + contents.SnapshotWindow = output["SnapshotWindow"]; } if (output["TopicArn"] !== undefined) { - contents.TopicArn = - output["TopicArn"]["#text"] !== undefined - ? output["TopicArn"]["#text"] - : output["TopicArn"]; + contents.TopicArn = output["TopicArn"]; } if (output["VpcId"] !== undefined) { - contents.VpcId = - output["VpcId"]["#text"] !== undefined - ? output["VpcId"]["#text"] - : output["VpcId"]; + contents.VpcId = output["VpcId"]; } return contents; }; @@ -13265,10 +12542,7 @@ const deserializeAws_querySubnet = ( ); } if (output["SubnetIdentifier"] !== undefined) { - contents.SubnetIdentifier = - output["SubnetIdentifier"]["#text"] !== undefined - ? output["SubnetIdentifier"]["#text"] - : output["SubnetIdentifier"]; + contents.SubnetIdentifier = output["SubnetIdentifier"]; } return contents; }; @@ -13289,16 +12563,10 @@ const deserializeAws_queryTag = (output: any, context: __SerdeContext): Tag => { Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -13365,34 +12633,19 @@ const deserializeAws_queryUnprocessedUpdateAction = ( ServiceUpdateName: undefined }; if (output["CacheClusterId"] !== undefined) { - contents.CacheClusterId = - output["CacheClusterId"]["#text"] !== undefined - ? output["CacheClusterId"]["#text"] - : output["CacheClusterId"]; + contents.CacheClusterId = output["CacheClusterId"]; } if (output["ErrorMessage"] !== undefined) { - contents.ErrorMessage = - output["ErrorMessage"]["#text"] !== undefined - ? output["ErrorMessage"]["#text"] - : output["ErrorMessage"]; + contents.ErrorMessage = output["ErrorMessage"]; } if (output["ErrorType"] !== undefined) { - contents.ErrorType = - output["ErrorType"]["#text"] !== undefined - ? output["ErrorType"]["#text"] - : output["ErrorType"]; + contents.ErrorType = output["ErrorType"]; } if (output["ReplicationGroupId"] !== undefined) { - contents.ReplicationGroupId = - output["ReplicationGroupId"]["#text"] !== undefined - ? output["ReplicationGroupId"]["#text"] - : output["ReplicationGroupId"]; + contents.ReplicationGroupId = output["ReplicationGroupId"]; } if (output["ServiceUpdateName"] !== undefined) { - contents.ServiceUpdateName = - output["ServiceUpdateName"]["#text"] !== undefined - ? output["ServiceUpdateName"]["#text"] - : output["ServiceUpdateName"]; + contents.ServiceUpdateName = output["ServiceUpdateName"]; } return contents; }; @@ -13431,10 +12684,7 @@ const deserializeAws_queryUpdateAction = ( UpdateActionStatusModifiedDate: undefined }; if (output["CacheClusterId"] !== undefined) { - contents.CacheClusterId = - output["CacheClusterId"]["#text"] !== undefined - ? output["CacheClusterId"]["#text"] - : output["CacheClusterId"]; + contents.CacheClusterId = output["CacheClusterId"]; } if (output.CacheNodeUpdateStatus === "") { contents.CacheNodeUpdateStatus = []; @@ -13451,16 +12701,10 @@ const deserializeAws_queryUpdateAction = ( ); } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EstimatedUpdateTime"] !== undefined) { - contents.EstimatedUpdateTime = - output["EstimatedUpdateTime"]["#text"] !== undefined - ? output["EstimatedUpdateTime"]["#text"] - : output["EstimatedUpdateTime"]; + contents.EstimatedUpdateTime = output["EstimatedUpdateTime"]; } if (output.NodeGroupUpdateStatus === "") { contents.NodeGroupUpdateStatus = []; @@ -13477,22 +12721,13 @@ const deserializeAws_queryUpdateAction = ( ); } if (output["NodesUpdated"] !== undefined) { - contents.NodesUpdated = - output["NodesUpdated"]["#text"] !== undefined - ? output["NodesUpdated"]["#text"] - : output["NodesUpdated"]; + contents.NodesUpdated = output["NodesUpdated"]; } if (output["ReplicationGroupId"] !== undefined) { - contents.ReplicationGroupId = - output["ReplicationGroupId"]["#text"] !== undefined - ? output["ReplicationGroupId"]["#text"] - : output["ReplicationGroupId"]; + contents.ReplicationGroupId = output["ReplicationGroupId"]; } if (output["ServiceUpdateName"] !== undefined) { - contents.ServiceUpdateName = - output["ServiceUpdateName"]["#text"] !== undefined - ? output["ServiceUpdateName"]["#text"] - : output["ServiceUpdateName"]; + contents.ServiceUpdateName = output["ServiceUpdateName"]; } if (output["ServiceUpdateRecommendedApplyByDate"] !== undefined) { contents.ServiceUpdateRecommendedApplyByDate = new Date( @@ -13505,28 +12740,16 @@ const deserializeAws_queryUpdateAction = ( ); } if (output["ServiceUpdateSeverity"] !== undefined) { - contents.ServiceUpdateSeverity = - output["ServiceUpdateSeverity"]["#text"] !== undefined - ? output["ServiceUpdateSeverity"]["#text"] - : output["ServiceUpdateSeverity"]; + contents.ServiceUpdateSeverity = output["ServiceUpdateSeverity"]; } if (output["ServiceUpdateStatus"] !== undefined) { - contents.ServiceUpdateStatus = - output["ServiceUpdateStatus"]["#text"] !== undefined - ? output["ServiceUpdateStatus"]["#text"] - : output["ServiceUpdateStatus"]; + contents.ServiceUpdateStatus = output["ServiceUpdateStatus"]; } if (output["ServiceUpdateType"] !== undefined) { - contents.ServiceUpdateType = - output["ServiceUpdateType"]["#text"] !== undefined - ? output["ServiceUpdateType"]["#text"] - : output["ServiceUpdateType"]; + contents.ServiceUpdateType = output["ServiceUpdateType"]; } if (output["SlaMet"] !== undefined) { - contents.SlaMet = - output["SlaMet"]["#text"] !== undefined - ? output["SlaMet"]["#text"] - : output["SlaMet"]; + contents.SlaMet = output["SlaMet"]; } if (output["UpdateActionAvailableDate"] !== undefined) { contents.UpdateActionAvailableDate = new Date( @@ -13534,10 +12757,7 @@ const deserializeAws_queryUpdateAction = ( ); } if (output["UpdateActionStatus"] !== undefined) { - contents.UpdateActionStatus = - output["UpdateActionStatus"]["#text"] !== undefined - ? output["UpdateActionStatus"]["#text"] - : output["UpdateActionStatus"]; + contents.UpdateActionStatus = output["UpdateActionStatus"]; } if (output["UpdateActionStatusModifiedDate"] !== undefined) { contents.UpdateActionStatusModifiedDate = new Date( @@ -13606,10 +12826,7 @@ const deserializeAws_queryUpdateActionsMessage = ( UpdateActions: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.UpdateActions === "") { contents.UpdateActions = []; @@ -13701,7 +12918,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/clients/client-iam/protocols/Aws_query.ts b/clients/client-iam/protocols/Aws_query.ts index fe38d4ef4508..776d4560661b 100644 --- a/clients/client-iam/protocols/Aws_query.ts +++ b/clients/client-iam/protocols/Aws_query.ts @@ -857,7 +857,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -17762,37 +17763,23 @@ const deserializeAws_queryAccessDetail = ( TotalAuthenticatedEntities: undefined }; if (output["EntityPath"] !== undefined) { - contents.EntityPath = - output["EntityPath"]["#text"] !== undefined - ? output["EntityPath"]["#text"] - : output["EntityPath"]; + contents.EntityPath = output["EntityPath"]; } if (output["LastAuthenticatedTime"] !== undefined) { contents.LastAuthenticatedTime = new Date(output["LastAuthenticatedTime"]); } if (output["Region"] !== undefined) { - contents.Region = - output["Region"]["#text"] !== undefined - ? output["Region"]["#text"] - : output["Region"]; + contents.Region = output["Region"]; } if (output["ServiceName"] !== undefined) { - contents.ServiceName = - output["ServiceName"]["#text"] !== undefined - ? output["ServiceName"]["#text"] - : output["ServiceName"]; + contents.ServiceName = output["ServiceName"]; } if (output["ServiceNamespace"] !== undefined) { - contents.ServiceNamespace = - output["ServiceNamespace"]["#text"] !== undefined - ? output["ServiceNamespace"]["#text"] - : output["ServiceNamespace"]; + contents.ServiceNamespace = output["ServiceNamespace"]; } if (output["TotalAuthenticatedEntities"] !== undefined) { contents.TotalAuthenticatedEntities = parseInt( - output["TotalAuthenticatedEntities"]["#text"] !== undefined - ? output["TotalAuthenticatedEntities"]["#text"] - : output["TotalAuthenticatedEntities"] + output["TotalAuthenticatedEntities"] ); } return contents; @@ -17820,31 +17807,19 @@ const deserializeAws_queryAccessKey = ( UserName: undefined }; if (output["AccessKeyId"] !== undefined) { - contents.AccessKeyId = - output["AccessKeyId"]["#text"] !== undefined - ? output["AccessKeyId"]["#text"] - : output["AccessKeyId"]; + contents.AccessKeyId = output["AccessKeyId"]; } if (output["CreateDate"] !== undefined) { contents.CreateDate = new Date(output["CreateDate"]); } if (output["SecretAccessKey"] !== undefined) { - contents.SecretAccessKey = - output["SecretAccessKey"]["#text"] !== undefined - ? output["SecretAccessKey"]["#text"] - : output["SecretAccessKey"]; + contents.SecretAccessKey = output["SecretAccessKey"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["UserName"] !== undefined) { - contents.UserName = - output["UserName"]["#text"] !== undefined - ? output["UserName"]["#text"] - : output["UserName"]; + contents.UserName = output["UserName"]; } return contents; }; @@ -17863,16 +17838,10 @@ const deserializeAws_queryAccessKeyLastUsed = ( contents.LastUsedDate = new Date(output["LastUsedDate"]); } if (output["Region"] !== undefined) { - contents.Region = - output["Region"]["#text"] !== undefined - ? output["Region"]["#text"] - : output["Region"]; + contents.Region = output["Region"]; } if (output["ServiceName"] !== undefined) { - contents.ServiceName = - output["ServiceName"]["#text"] !== undefined - ? output["ServiceName"]["#text"] - : output["ServiceName"]; + contents.ServiceName = output["ServiceName"]; } return contents; }; @@ -17889,25 +17858,16 @@ const deserializeAws_queryAccessKeyMetadata = ( UserName: undefined }; if (output["AccessKeyId"] !== undefined) { - contents.AccessKeyId = - output["AccessKeyId"]["#text"] !== undefined - ? output["AccessKeyId"]["#text"] - : output["AccessKeyId"]; + contents.AccessKeyId = output["AccessKeyId"]; } if (output["CreateDate"] !== undefined) { contents.CreateDate = new Date(output["CreateDate"]); } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["UserName"] !== undefined) { - contents.UserName = - output["UserName"]["#text"] !== undefined - ? output["UserName"]["#text"] - : output["UserName"]; + contents.UserName = output["UserName"]; } return contents; }; @@ -17916,9 +17876,7 @@ const deserializeAws_queryArnListType = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryAttachedPermissionsBoundary = ( @@ -17931,16 +17889,10 @@ const deserializeAws_queryAttachedPermissionsBoundary = ( PermissionsBoundaryType: undefined }; if (output["PermissionsBoundaryArn"] !== undefined) { - contents.PermissionsBoundaryArn = - output["PermissionsBoundaryArn"]["#text"] !== undefined - ? output["PermissionsBoundaryArn"]["#text"] - : output["PermissionsBoundaryArn"]; + contents.PermissionsBoundaryArn = output["PermissionsBoundaryArn"]; } if (output["PermissionsBoundaryType"] !== undefined) { - contents.PermissionsBoundaryType = - output["PermissionsBoundaryType"]["#text"] !== undefined - ? output["PermissionsBoundaryType"]["#text"] - : output["PermissionsBoundaryType"]; + contents.PermissionsBoundaryType = output["PermissionsBoundaryType"]; } return contents; }; @@ -17955,16 +17907,10 @@ const deserializeAws_queryAttachedPolicy = ( PolicyName: undefined }; if (output["PolicyArn"] !== undefined) { - contents.PolicyArn = - output["PolicyArn"]["#text"] !== undefined - ? output["PolicyArn"]["#text"] - : output["PolicyArn"]; + contents.PolicyArn = output["PolicyArn"]; } if (output["PolicyName"] !== undefined) { - contents.PolicyName = - output["PolicyName"]["#text"] !== undefined - ? output["PolicyName"]["#text"] - : output["PolicyName"]; + contents.PolicyName = output["PolicyName"]; } return contents; }; @@ -17978,10 +17924,7 @@ const deserializeAws_queryConcurrentModificationException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -17990,9 +17933,7 @@ const deserializeAws_queryContextKeyNamesResultListType = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryCreateAccessKeyResponse = ( @@ -18069,10 +18010,7 @@ const deserializeAws_queryCreateOpenIDConnectProviderResponse = ( OpenIDConnectProviderArn: undefined }; if (output["OpenIDConnectProviderArn"] !== undefined) { - contents.OpenIDConnectProviderArn = - output["OpenIDConnectProviderArn"]["#text"] !== undefined - ? output["OpenIDConnectProviderArn"]["#text"] - : output["OpenIDConnectProviderArn"]; + contents.OpenIDConnectProviderArn = output["OpenIDConnectProviderArn"]; } return contents; }; @@ -18131,10 +18069,7 @@ const deserializeAws_queryCreateSAMLProviderResponse = ( SAMLProviderArn: undefined }; if (output["SAMLProviderArn"] !== undefined) { - contents.SAMLProviderArn = - output["SAMLProviderArn"]["#text"] !== undefined - ? output["SAMLProviderArn"]["#text"] - : output["SAMLProviderArn"]; + contents.SAMLProviderArn = output["SAMLProviderArn"]; } return contents; }; @@ -18210,10 +18145,7 @@ const deserializeAws_queryCredentialReportExpiredException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -18227,10 +18159,7 @@ const deserializeAws_queryCredentialReportNotPresentException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -18244,10 +18173,7 @@ const deserializeAws_queryCredentialReportNotReadyException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -18261,10 +18187,7 @@ const deserializeAws_queryDeleteConflictException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -18278,10 +18201,7 @@ const deserializeAws_queryDeleteServiceLinkedRoleResponse = ( DeletionTaskId: undefined }; if (output["DeletionTaskId"] !== undefined) { - contents.DeletionTaskId = - output["DeletionTaskId"]["#text"] !== undefined - ? output["DeletionTaskId"]["#text"] - : output["DeletionTaskId"]; + contents.DeletionTaskId = output["DeletionTaskId"]; } return contents; }; @@ -18296,10 +18216,7 @@ const deserializeAws_queryDeletionTaskFailureReasonType = ( RoleUsageList: undefined }; if (output["Reason"] !== undefined) { - contents.Reason = - output["Reason"]["#text"] !== undefined - ? output["Reason"]["#text"] - : output["Reason"]; + contents.Reason = output["Reason"]; } if (output.RoleUsageList === "") { contents.RoleUsageList = []; @@ -18325,10 +18242,7 @@ const deserializeAws_queryDuplicateCertificateException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -18342,10 +18256,7 @@ const deserializeAws_queryDuplicateSSHPublicKeyException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -18359,10 +18270,7 @@ const deserializeAws_queryEntityAlreadyExistsException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -18401,34 +18309,19 @@ const deserializeAws_queryEntityInfo = ( Type: undefined }; if (output["Arn"] !== undefined) { - contents.Arn = - output["Arn"]["#text"] !== undefined - ? output["Arn"]["#text"] - : output["Arn"]; + contents.Arn = output["Arn"]; } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["Path"] !== undefined) { - contents.Path = - output["Path"]["#text"] !== undefined - ? output["Path"]["#text"] - : output["Path"]; + contents.Path = output["Path"]; } if (output["Type"] !== undefined) { - contents.Type = - output["Type"]["#text"] !== undefined - ? output["Type"]["#text"] - : output["Type"]; + contents.Type = output["Type"]; } return contents; }; @@ -18442,10 +18335,7 @@ const deserializeAws_queryEntityTemporarilyUnmodifiableException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -18460,16 +18350,10 @@ const deserializeAws_queryErrorDetails = ( Message: undefined }; if (output["Code"] !== undefined) { - contents.Code = - output["Code"]["#text"] !== undefined - ? output["Code"]["#text"] - : output["Code"]; + contents.Code = output["Code"]; } if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -18479,10 +18363,7 @@ const deserializeAws_queryEvalDecisionDetailsType = ( context: __SerdeContext ): { [key: string]: PolicyEvaluationDecisionType | string } => { return output.reduce((acc: any, pair: any) => { - acc[pair["key"]] = - pair["value"]["#text"] !== undefined - ? pair["value"]["#text"] - : pair["value"]; + acc[pair["key"]] = pair["value"]; return acc; }, {}); }; @@ -18503,16 +18384,10 @@ const deserializeAws_queryEvaluationResult = ( ResourceSpecificResults: undefined }; if (output["EvalActionName"] !== undefined) { - contents.EvalActionName = - output["EvalActionName"]["#text"] !== undefined - ? output["EvalActionName"]["#text"] - : output["EvalActionName"]; + contents.EvalActionName = output["EvalActionName"]; } if (output["EvalDecision"] !== undefined) { - contents.EvalDecision = - output["EvalDecision"]["#text"] !== undefined - ? output["EvalDecision"]["#text"] - : output["EvalDecision"]; + contents.EvalDecision = output["EvalDecision"]; } if (output.EvalDecisionDetails === "") { contents.EvalDecisionDetails = {}; @@ -18527,10 +18402,7 @@ const deserializeAws_queryEvaluationResult = ( ); } if (output["EvalResourceName"] !== undefined) { - contents.EvalResourceName = - output["EvalResourceName"]["#text"] !== undefined - ? output["EvalResourceName"]["#text"] - : output["EvalResourceName"]; + contents.EvalResourceName = output["EvalResourceName"]; } if (output.MatchedStatements === "") { contents.MatchedStatements = []; @@ -18596,16 +18468,10 @@ const deserializeAws_queryGenerateCredentialReportResponse = ( State: undefined }; if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["State"] !== undefined) { - contents.State = - output["State"]["#text"] !== undefined - ? output["State"]["#text"] - : output["State"]; + contents.State = output["State"]; } return contents; }; @@ -18619,10 +18485,7 @@ const deserializeAws_queryGenerateOrganizationsAccessReportResponse = ( JobId: undefined }; if (output["JobId"] !== undefined) { - contents.JobId = - output["JobId"]["#text"] !== undefined - ? output["JobId"]["#text"] - : output["JobId"]; + contents.JobId = output["JobId"]; } return contents; }; @@ -18636,10 +18499,7 @@ const deserializeAws_queryGenerateServiceLastAccessedDetailsResponse = ( JobId: undefined }; if (output["JobId"] !== undefined) { - contents.JobId = - output["JobId"]["#text"] !== undefined - ? output["JobId"]["#text"] - : output["JobId"]; + contents.JobId = output["JobId"]; } return contents; }; @@ -18660,10 +18520,7 @@ const deserializeAws_queryGetAccessKeyLastUsedResponse = ( ); } if (output["UserName"] !== undefined) { - contents.UserName = - output["UserName"]["#text"] !== undefined - ? output["UserName"]["#text"] - : output["UserName"]; + contents.UserName = output["UserName"]; } return contents; }; @@ -18694,16 +18551,10 @@ const deserializeAws_queryGetAccountAuthorizationDetailsResponse = ( ); } if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Policies === "") { contents.Policies = []; @@ -18818,20 +18669,13 @@ const deserializeAws_queryGetCredentialReportResponse = ( ReportFormat: undefined }; if (output["Content"] !== undefined) { - contents.Content = context.base64Decoder( - output["Content"]["#text"] !== undefined - ? output["Content"]["#text"] - : output["Content"] - ); + contents.Content = context.base64Decoder(output["Content"]); } if (output["GeneratedTime"] !== undefined) { contents.GeneratedTime = new Date(output["GeneratedTime"]); } if (output["ReportFormat"] !== undefined) { - contents.ReportFormat = - output["ReportFormat"]["#text"] !== undefined - ? output["ReportFormat"]["#text"] - : output["ReportFormat"]; + contents.ReportFormat = output["ReportFormat"]; } return contents; }; @@ -18847,22 +18691,13 @@ const deserializeAws_queryGetGroupPolicyResponse = ( PolicyName: undefined }; if (output["GroupName"] !== undefined) { - contents.GroupName = - output["GroupName"]["#text"] !== undefined - ? output["GroupName"]["#text"] - : output["GroupName"]; + contents.GroupName = output["GroupName"]; } if (output["PolicyDocument"] !== undefined) { - contents.PolicyDocument = - output["PolicyDocument"]["#text"] !== undefined - ? output["PolicyDocument"]["#text"] - : output["PolicyDocument"]; + contents.PolicyDocument = output["PolicyDocument"]; } if (output["PolicyName"] !== undefined) { - contents.PolicyName = - output["PolicyName"]["#text"] !== undefined - ? output["PolicyName"]["#text"] - : output["PolicyName"]; + contents.PolicyName = output["PolicyName"]; } return contents; }; @@ -18882,16 +18717,10 @@ const deserializeAws_queryGetGroupResponse = ( contents.Group = deserializeAws_queryGroup(output["Group"], context); } if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Users === "") { contents.Users = []; @@ -18981,10 +18810,7 @@ const deserializeAws_queryGetOpenIDConnectProviderResponse = ( ); } if (output["Url"] !== undefined) { - contents.Url = - output["Url"]["#text"] !== undefined - ? output["Url"]["#text"] - : output["Url"]; + contents.Url = output["Url"]; } return contents; }; @@ -19024,10 +18850,7 @@ const deserializeAws_queryGetOrganizationsAccessReportResponse = ( ); } if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["JobCompletionDate"] !== undefined) { contents.JobCompletionDate = new Date(output["JobCompletionDate"]); @@ -19036,29 +18859,19 @@ const deserializeAws_queryGetOrganizationsAccessReportResponse = ( contents.JobCreationDate = new Date(output["JobCreationDate"]); } if (output["JobStatus"] !== undefined) { - contents.JobStatus = - output["JobStatus"]["#text"] !== undefined - ? output["JobStatus"]["#text"] - : output["JobStatus"]; + contents.JobStatus = output["JobStatus"]; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output["NumberOfServicesAccessible"] !== undefined) { contents.NumberOfServicesAccessible = parseInt( - output["NumberOfServicesAccessible"]["#text"] !== undefined - ? output["NumberOfServicesAccessible"]["#text"] - : output["NumberOfServicesAccessible"] + output["NumberOfServicesAccessible"] ); } if (output["NumberOfServicesNotAccessed"] !== undefined) { contents.NumberOfServicesNotAccessed = parseInt( - output["NumberOfServicesNotAccessed"]["#text"] !== undefined - ? output["NumberOfServicesNotAccessed"]["#text"] - : output["NumberOfServicesNotAccessed"] + output["NumberOfServicesNotAccessed"] ); } return contents; @@ -19106,22 +18919,13 @@ const deserializeAws_queryGetRolePolicyResponse = ( RoleName: undefined }; if (output["PolicyDocument"] !== undefined) { - contents.PolicyDocument = - output["PolicyDocument"]["#text"] !== undefined - ? output["PolicyDocument"]["#text"] - : output["PolicyDocument"]; + contents.PolicyDocument = output["PolicyDocument"]; } if (output["PolicyName"] !== undefined) { - contents.PolicyName = - output["PolicyName"]["#text"] !== undefined - ? output["PolicyName"]["#text"] - : output["PolicyName"]; + contents.PolicyName = output["PolicyName"]; } if (output["RoleName"] !== undefined) { - contents.RoleName = - output["RoleName"]["#text"] !== undefined - ? output["RoleName"]["#text"] - : output["RoleName"]; + contents.RoleName = output["RoleName"]; } return contents; }; @@ -19154,10 +18958,7 @@ const deserializeAws_queryGetSAMLProviderResponse = ( contents.CreateDate = new Date(output["CreateDate"]); } if (output["SAMLMetadataDocument"] !== undefined) { - contents.SAMLMetadataDocument = - output["SAMLMetadataDocument"]["#text"] !== undefined - ? output["SAMLMetadataDocument"]["#text"] - : output["SAMLMetadataDocument"]; + contents.SAMLMetadataDocument = output["SAMLMetadataDocument"]; } if (output["ValidUntil"] !== undefined) { contents.ValidUntil = new Date(output["ValidUntil"]); @@ -19217,10 +19018,7 @@ const deserializeAws_queryGetServiceLastAccessedDetailsResponse = ( contents.Error = deserializeAws_queryErrorDetails(output["Error"], context); } if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["JobCompletionDate"] !== undefined) { contents.JobCompletionDate = new Date(output["JobCompletionDate"]); @@ -19229,16 +19027,10 @@ const deserializeAws_queryGetServiceLastAccessedDetailsResponse = ( contents.JobCreationDate = new Date(output["JobCreationDate"]); } if (output["JobStatus"] !== undefined) { - contents.JobStatus = - output["JobStatus"]["#text"] !== undefined - ? output["JobStatus"]["#text"] - : output["JobStatus"]; + contents.JobStatus = output["JobStatus"]; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.ServicesLastAccessed === "") { contents.ServicesLastAccessed = []; @@ -19285,10 +19077,7 @@ const deserializeAws_queryGetServiceLastAccessedDetailsWithEntitiesResponse = ( contents.Error = deserializeAws_queryErrorDetails(output["Error"], context); } if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["JobCompletionDate"] !== undefined) { contents.JobCompletionDate = new Date(output["JobCompletionDate"]); @@ -19297,16 +19086,10 @@ const deserializeAws_queryGetServiceLastAccessedDetailsWithEntitiesResponse = ( contents.JobCreationDate = new Date(output["JobCreationDate"]); } if (output["JobStatus"] !== undefined) { - contents.JobStatus = - output["JobStatus"]["#text"] !== undefined - ? output["JobStatus"]["#text"] - : output["JobStatus"]; + contents.JobStatus = output["JobStatus"]; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -19327,10 +19110,7 @@ const deserializeAws_queryGetServiceLinkedRoleDeletionStatusResponse = ( ); } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -19346,22 +19126,13 @@ const deserializeAws_queryGetUserPolicyResponse = ( UserName: undefined }; if (output["PolicyDocument"] !== undefined) { - contents.PolicyDocument = - output["PolicyDocument"]["#text"] !== undefined - ? output["PolicyDocument"]["#text"] - : output["PolicyDocument"]; + contents.PolicyDocument = output["PolicyDocument"]; } if (output["PolicyName"] !== undefined) { - contents.PolicyName = - output["PolicyName"]["#text"] !== undefined - ? output["PolicyName"]["#text"] - : output["PolicyName"]; + contents.PolicyName = output["PolicyName"]; } if (output["UserName"] !== undefined) { - contents.UserName = - output["UserName"]["#text"] !== undefined - ? output["UserName"]["#text"] - : output["UserName"]; + contents.UserName = output["UserName"]; } return contents; }; @@ -19393,31 +19164,19 @@ const deserializeAws_queryGroup = ( Path: undefined }; if (output["Arn"] !== undefined) { - contents.Arn = - output["Arn"]["#text"] !== undefined - ? output["Arn"]["#text"] - : output["Arn"]; + contents.Arn = output["Arn"]; } if (output["CreateDate"] !== undefined) { contents.CreateDate = new Date(output["CreateDate"]); } if (output["GroupId"] !== undefined) { - contents.GroupId = - output["GroupId"]["#text"] !== undefined - ? output["GroupId"]["#text"] - : output["GroupId"]; + contents.GroupId = output["GroupId"]; } if (output["GroupName"] !== undefined) { - contents.GroupName = - output["GroupName"]["#text"] !== undefined - ? output["GroupName"]["#text"] - : output["GroupName"]; + contents.GroupName = output["GroupName"]; } if (output["Path"] !== undefined) { - contents.Path = - output["Path"]["#text"] !== undefined - ? output["Path"]["#text"] - : output["Path"]; + contents.Path = output["Path"]; } return contents; }; @@ -19437,10 +19196,7 @@ const deserializeAws_queryGroupDetail = ( Path: undefined }; if (output["Arn"] !== undefined) { - contents.Arn = - output["Arn"]["#text"] !== undefined - ? output["Arn"]["#text"] - : output["Arn"]; + contents.Arn = output["Arn"]; } if (output.AttachedManagedPolicies === "") { contents.AttachedManagedPolicies = []; @@ -19458,16 +19214,10 @@ const deserializeAws_queryGroupDetail = ( contents.CreateDate = new Date(output["CreateDate"]); } if (output["GroupId"] !== undefined) { - contents.GroupId = - output["GroupId"]["#text"] !== undefined - ? output["GroupId"]["#text"] - : output["GroupId"]; + contents.GroupId = output["GroupId"]; } if (output["GroupName"] !== undefined) { - contents.GroupName = - output["GroupName"]["#text"] !== undefined - ? output["GroupName"]["#text"] - : output["GroupName"]; + contents.GroupName = output["GroupName"]; } if (output.GroupPolicyList === "") { contents.GroupPolicyList = []; @@ -19482,10 +19232,7 @@ const deserializeAws_queryGroupDetail = ( ); } if (output["Path"] !== undefined) { - contents.Path = - output["Path"]["#text"] !== undefined - ? output["Path"]["#text"] - : output["Path"]; + contents.Path = output["Path"]; } return contents; }; @@ -19504,31 +19251,19 @@ const deserializeAws_queryInstanceProfile = ( Roles: undefined }; if (output["Arn"] !== undefined) { - contents.Arn = - output["Arn"]["#text"] !== undefined - ? output["Arn"]["#text"] - : output["Arn"]; + contents.Arn = output["Arn"]; } if (output["CreateDate"] !== undefined) { contents.CreateDate = new Date(output["CreateDate"]); } if (output["InstanceProfileId"] !== undefined) { - contents.InstanceProfileId = - output["InstanceProfileId"]["#text"] !== undefined - ? output["InstanceProfileId"]["#text"] - : output["InstanceProfileId"]; + contents.InstanceProfileId = output["InstanceProfileId"]; } if (output["InstanceProfileName"] !== undefined) { - contents.InstanceProfileName = - output["InstanceProfileName"]["#text"] !== undefined - ? output["InstanceProfileName"]["#text"] - : output["InstanceProfileName"]; + contents.InstanceProfileName = output["InstanceProfileName"]; } if (output["Path"] !== undefined) { - contents.Path = - output["Path"]["#text"] !== undefined - ? output["Path"]["#text"] - : output["Path"]; + contents.Path = output["Path"]; } if (output.Roles === "") { contents.Roles = []; @@ -19554,10 +19289,7 @@ const deserializeAws_queryInvalidAuthenticationCodeException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -19571,10 +19303,7 @@ const deserializeAws_queryInvalidCertificateException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -19588,10 +19317,7 @@ const deserializeAws_queryInvalidInputException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -19605,10 +19331,7 @@ const deserializeAws_queryInvalidPublicKeyException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -19622,10 +19345,7 @@ const deserializeAws_queryInvalidUserTypeException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -19639,10 +19359,7 @@ const deserializeAws_queryKeyPairMismatchException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -19656,10 +19373,7 @@ const deserializeAws_queryLimitExceededException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -19687,16 +19401,10 @@ const deserializeAws_queryListAccessKeysResponse = ( ); } if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -19724,16 +19432,10 @@ const deserializeAws_queryListAccountAliasesResponse = ( ); } if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -19761,16 +19463,10 @@ const deserializeAws_queryListAttachedGroupPoliciesResponse = ( ); } if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -19798,16 +19494,10 @@ const deserializeAws_queryListAttachedRolePoliciesResponse = ( ); } if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -19835,16 +19525,10 @@ const deserializeAws_queryListAttachedUserPoliciesResponse = ( ); } if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -19862,16 +19546,10 @@ const deserializeAws_queryListEntitiesForPolicyResponse = ( PolicyUsers: undefined }; if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.PolicyGroups === "") { contents.PolicyGroups = []; @@ -19923,16 +19601,10 @@ const deserializeAws_queryListGroupPoliciesResponse = ( PolicyNames: undefined }; if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.PolicyNames === "") { contents.PolicyNames = []; @@ -19972,16 +19644,10 @@ const deserializeAws_queryListGroupsForUserResponse = ( ); } if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -20009,16 +19675,10 @@ const deserializeAws_queryListGroupsResponse = ( ); } if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -20046,16 +19706,10 @@ const deserializeAws_queryListInstanceProfilesForRoleResponse = ( ); } if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -20083,16 +19737,10 @@ const deserializeAws_queryListInstanceProfilesResponse = ( ); } if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -20108,10 +19756,7 @@ const deserializeAws_queryListMFADevicesResponse = ( Marker: undefined }; if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output.MFADevices === "") { contents.MFADevices = []; @@ -20126,10 +19771,7 @@ const deserializeAws_queryListMFADevicesResponse = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -20179,10 +19821,7 @@ const deserializeAws_queryListPoliciesGrantingServiceAccessEntry = ( ); } if (output["ServiceNamespace"] !== undefined) { - contents.ServiceNamespace = - output["ServiceNamespace"]["#text"] !== undefined - ? output["ServiceNamespace"]["#text"] - : output["ServiceNamespace"]; + contents.ServiceNamespace = output["ServiceNamespace"]; } return contents; }; @@ -20198,16 +19837,10 @@ const deserializeAws_queryListPoliciesGrantingServiceAccessResponse = ( PoliciesGrantingServiceAccess: undefined }; if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.PoliciesGrantingServiceAccess === "") { contents.PoliciesGrantingServiceAccess = []; @@ -20235,16 +19868,10 @@ const deserializeAws_queryListPoliciesResponse = ( Policies: undefined }; if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Policies === "") { contents.Policies = []; @@ -20272,16 +19899,10 @@ const deserializeAws_queryListPolicyVersionsResponse = ( Versions: undefined }; if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Versions === "") { contents.Versions = []; @@ -20309,16 +19930,10 @@ const deserializeAws_queryListRolePoliciesResponse = ( PolicyNames: undefined }; if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.PolicyNames === "") { contents.PolicyNames = []; @@ -20346,16 +19961,10 @@ const deserializeAws_queryListRoleTagsResponse = ( Tags: undefined }; if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Tags === "") { contents.Tags = []; @@ -20380,16 +19989,10 @@ const deserializeAws_queryListRolesResponse = ( Roles: undefined }; if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Roles === "") { contents.Roles = []; @@ -20440,16 +20043,10 @@ const deserializeAws_queryListSSHPublicKeysResponse = ( SSHPublicKeys: undefined }; if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.SSHPublicKeys === "") { contents.SSHPublicKeys = []; @@ -20477,16 +20074,10 @@ const deserializeAws_queryListServerCertificatesResponse = ( ServerCertificateMetadataList: undefined }; if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.ServerCertificateMetadataList === "") { contents.ServerCertificateMetadataList = []; @@ -20549,16 +20140,10 @@ const deserializeAws_queryListSigningCertificatesResponse = ( ); } if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -20574,16 +20159,10 @@ const deserializeAws_queryListUserPoliciesResponse = ( PolicyNames: undefined }; if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.PolicyNames === "") { contents.PolicyNames = []; @@ -20611,16 +20190,10 @@ const deserializeAws_queryListUserTagsResponse = ( Tags: undefined }; if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Tags === "") { contents.Tags = []; @@ -20645,16 +20218,10 @@ const deserializeAws_queryListUsersResponse = ( Users: undefined }; if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Users === "") { contents.Users = []; @@ -20682,16 +20249,10 @@ const deserializeAws_queryListVirtualMFADevicesResponse = ( VirtualMFADevices: undefined }; if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.VirtualMFADevices === "") { contents.VirtualMFADevices = []; @@ -20722,16 +20283,10 @@ const deserializeAws_queryLoginProfile = ( contents.CreateDate = new Date(output["CreateDate"]); } if (output["PasswordResetRequired"] !== undefined) { - contents.PasswordResetRequired = - (output["PasswordResetRequired"]["#text"] !== undefined - ? output["PasswordResetRequired"]["#text"] - : output["PasswordResetRequired"]) == "true"; + contents.PasswordResetRequired = output["PasswordResetRequired"] == "true"; } if (output["UserName"] !== undefined) { - contents.UserName = - output["UserName"]["#text"] !== undefined - ? output["UserName"]["#text"] - : output["UserName"]; + contents.UserName = output["UserName"]; } return contents; }; @@ -20750,16 +20305,10 @@ const deserializeAws_queryMFADevice = ( contents.EnableDate = new Date(output["EnableDate"]); } if (output["SerialNumber"] !== undefined) { - contents.SerialNumber = - output["SerialNumber"]["#text"] !== undefined - ? output["SerialNumber"]["#text"] - : output["SerialNumber"]; + contents.SerialNumber = output["SerialNumber"]; } if (output["UserName"] !== undefined) { - contents.UserName = - output["UserName"]["#text"] !== undefined - ? output["UserName"]["#text"] - : output["UserName"]; + contents.UserName = output["UserName"]; } return contents; }; @@ -20773,10 +20322,7 @@ const deserializeAws_queryMalformedCertificateException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -20790,10 +20336,7 @@ const deserializeAws_queryMalformedPolicyDocumentException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -20818,63 +20361,36 @@ const deserializeAws_queryManagedPolicyDetail = ( UpdateDate: undefined }; if (output["Arn"] !== undefined) { - contents.Arn = - output["Arn"]["#text"] !== undefined - ? output["Arn"]["#text"] - : output["Arn"]; + contents.Arn = output["Arn"]; } if (output["AttachmentCount"] !== undefined) { - contents.AttachmentCount = parseInt( - output["AttachmentCount"]["#text"] !== undefined - ? output["AttachmentCount"]["#text"] - : output["AttachmentCount"] - ); + contents.AttachmentCount = parseInt(output["AttachmentCount"]); } if (output["CreateDate"] !== undefined) { contents.CreateDate = new Date(output["CreateDate"]); } if (output["DefaultVersionId"] !== undefined) { - contents.DefaultVersionId = - output["DefaultVersionId"]["#text"] !== undefined - ? output["DefaultVersionId"]["#text"] - : output["DefaultVersionId"]; + contents.DefaultVersionId = output["DefaultVersionId"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["IsAttachable"] !== undefined) { - contents.IsAttachable = - (output["IsAttachable"]["#text"] !== undefined - ? output["IsAttachable"]["#text"] - : output["IsAttachable"]) == "true"; + contents.IsAttachable = output["IsAttachable"] == "true"; } if (output["Path"] !== undefined) { - contents.Path = - output["Path"]["#text"] !== undefined - ? output["Path"]["#text"] - : output["Path"]; + contents.Path = output["Path"]; } if (output["PermissionsBoundaryUsageCount"] !== undefined) { contents.PermissionsBoundaryUsageCount = parseInt( - output["PermissionsBoundaryUsageCount"]["#text"] !== undefined - ? output["PermissionsBoundaryUsageCount"]["#text"] - : output["PermissionsBoundaryUsageCount"] + output["PermissionsBoundaryUsageCount"] ); } if (output["PolicyId"] !== undefined) { - contents.PolicyId = - output["PolicyId"]["#text"] !== undefined - ? output["PolicyId"]["#text"] - : output["PolicyId"]; + contents.PolicyId = output["PolicyId"]; } if (output["PolicyName"] !== undefined) { - contents.PolicyName = - output["PolicyName"]["#text"] !== undefined - ? output["PolicyName"]["#text"] - : output["PolicyName"]; + contents.PolicyName = output["PolicyName"]; } if (output.PolicyVersionList === "") { contents.PolicyVersionList = []; @@ -20912,10 +20428,7 @@ const deserializeAws_queryNoSuchEntityException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -20929,10 +20442,7 @@ const deserializeAws_queryOpenIDConnectProviderListEntry = ( Arn: undefined }; if (output["Arn"] !== undefined) { - contents.Arn = - output["Arn"]["#text"] !== undefined - ? output["Arn"]["#text"] - : output["Arn"]; + contents.Arn = output["Arn"]; } return contents; }; @@ -20956,9 +20466,7 @@ const deserializeAws_queryOrganizationsDecisionDetail = ( }; if (output["AllowedByOrganizations"] !== undefined) { contents.AllowedByOrganizations = - (output["AllowedByOrganizations"]["#text"] !== undefined - ? output["AllowedByOrganizations"]["#text"] - : output["AllowedByOrganizations"]) == "true"; + output["AllowedByOrganizations"] == "true"; } return contents; }; @@ -20982,66 +20490,38 @@ const deserializeAws_queryPasswordPolicy = ( }; if (output["AllowUsersToChangePassword"] !== undefined) { contents.AllowUsersToChangePassword = - (output["AllowUsersToChangePassword"]["#text"] !== undefined - ? output["AllowUsersToChangePassword"]["#text"] - : output["AllowUsersToChangePassword"]) == "true"; + output["AllowUsersToChangePassword"] == "true"; } if (output["ExpirePasswords"] !== undefined) { - contents.ExpirePasswords = - (output["ExpirePasswords"]["#text"] !== undefined - ? output["ExpirePasswords"]["#text"] - : output["ExpirePasswords"]) == "true"; + contents.ExpirePasswords = output["ExpirePasswords"] == "true"; } if (output["HardExpiry"] !== undefined) { - contents.HardExpiry = - (output["HardExpiry"]["#text"] !== undefined - ? output["HardExpiry"]["#text"] - : output["HardExpiry"]) == "true"; + contents.HardExpiry = output["HardExpiry"] == "true"; } if (output["MaxPasswordAge"] !== undefined) { - contents.MaxPasswordAge = parseInt( - output["MaxPasswordAge"]["#text"] !== undefined - ? output["MaxPasswordAge"]["#text"] - : output["MaxPasswordAge"] - ); + contents.MaxPasswordAge = parseInt(output["MaxPasswordAge"]); } if (output["MinimumPasswordLength"] !== undefined) { - contents.MinimumPasswordLength = parseInt( - output["MinimumPasswordLength"]["#text"] !== undefined - ? output["MinimumPasswordLength"]["#text"] - : output["MinimumPasswordLength"] - ); + contents.MinimumPasswordLength = parseInt(output["MinimumPasswordLength"]); } if (output["PasswordReusePrevention"] !== undefined) { contents.PasswordReusePrevention = parseInt( - output["PasswordReusePrevention"]["#text"] !== undefined - ? output["PasswordReusePrevention"]["#text"] - : output["PasswordReusePrevention"] + output["PasswordReusePrevention"] ); } if (output["RequireLowercaseCharacters"] !== undefined) { contents.RequireLowercaseCharacters = - (output["RequireLowercaseCharacters"]["#text"] !== undefined - ? output["RequireLowercaseCharacters"]["#text"] - : output["RequireLowercaseCharacters"]) == "true"; + output["RequireLowercaseCharacters"] == "true"; } if (output["RequireNumbers"] !== undefined) { - contents.RequireNumbers = - (output["RequireNumbers"]["#text"] !== undefined - ? output["RequireNumbers"]["#text"] - : output["RequireNumbers"]) == "true"; + contents.RequireNumbers = output["RequireNumbers"] == "true"; } if (output["RequireSymbols"] !== undefined) { - contents.RequireSymbols = - (output["RequireSymbols"]["#text"] !== undefined - ? output["RequireSymbols"]["#text"] - : output["RequireSymbols"]) == "true"; + contents.RequireSymbols = output["RequireSymbols"] == "true"; } if (output["RequireUppercaseCharacters"] !== undefined) { contents.RequireUppercaseCharacters = - (output["RequireUppercaseCharacters"]["#text"] !== undefined - ? output["RequireUppercaseCharacters"]["#text"] - : output["RequireUppercaseCharacters"]) == "true"; + output["RequireUppercaseCharacters"] == "true"; } return contents; }; @@ -21055,10 +20535,7 @@ const deserializeAws_queryPasswordPolicyViolationException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21082,63 +20559,36 @@ const deserializeAws_queryPolicy = ( UpdateDate: undefined }; if (output["Arn"] !== undefined) { - contents.Arn = - output["Arn"]["#text"] !== undefined - ? output["Arn"]["#text"] - : output["Arn"]; + contents.Arn = output["Arn"]; } if (output["AttachmentCount"] !== undefined) { - contents.AttachmentCount = parseInt( - output["AttachmentCount"]["#text"] !== undefined - ? output["AttachmentCount"]["#text"] - : output["AttachmentCount"] - ); + contents.AttachmentCount = parseInt(output["AttachmentCount"]); } if (output["CreateDate"] !== undefined) { contents.CreateDate = new Date(output["CreateDate"]); } if (output["DefaultVersionId"] !== undefined) { - contents.DefaultVersionId = - output["DefaultVersionId"]["#text"] !== undefined - ? output["DefaultVersionId"]["#text"] - : output["DefaultVersionId"]; + contents.DefaultVersionId = output["DefaultVersionId"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["IsAttachable"] !== undefined) { - contents.IsAttachable = - (output["IsAttachable"]["#text"] !== undefined - ? output["IsAttachable"]["#text"] - : output["IsAttachable"]) == "true"; + contents.IsAttachable = output["IsAttachable"] == "true"; } if (output["Path"] !== undefined) { - contents.Path = - output["Path"]["#text"] !== undefined - ? output["Path"]["#text"] - : output["Path"]; + contents.Path = output["Path"]; } if (output["PermissionsBoundaryUsageCount"] !== undefined) { contents.PermissionsBoundaryUsageCount = parseInt( - output["PermissionsBoundaryUsageCount"]["#text"] !== undefined - ? output["PermissionsBoundaryUsageCount"]["#text"] - : output["PermissionsBoundaryUsageCount"] + output["PermissionsBoundaryUsageCount"] ); } if (output["PolicyId"] !== undefined) { - contents.PolicyId = - output["PolicyId"]["#text"] !== undefined - ? output["PolicyId"]["#text"] - : output["PolicyId"]; + contents.PolicyId = output["PolicyId"]; } if (output["PolicyName"] !== undefined) { - contents.PolicyName = - output["PolicyName"]["#text"] !== undefined - ? output["PolicyName"]["#text"] - : output["PolicyName"]; + contents.PolicyName = output["PolicyName"]; } if (output["UpdateDate"] !== undefined) { contents.UpdateDate = new Date(output["UpdateDate"]); @@ -21156,16 +20606,10 @@ const deserializeAws_queryPolicyDetail = ( PolicyName: undefined }; if (output["PolicyDocument"] !== undefined) { - contents.PolicyDocument = - output["PolicyDocument"]["#text"] !== undefined - ? output["PolicyDocument"]["#text"] - : output["PolicyDocument"]; + contents.PolicyDocument = output["PolicyDocument"]; } if (output["PolicyName"] !== undefined) { - contents.PolicyName = - output["PolicyName"]["#text"] !== undefined - ? output["PolicyName"]["#text"] - : output["PolicyName"]; + contents.PolicyName = output["PolicyName"]; } return contents; }; @@ -21179,10 +20623,7 @@ const deserializeAws_queryPolicyEvaluationException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21200,34 +20641,19 @@ const deserializeAws_queryPolicyGrantingServiceAccess = ( PolicyType: undefined }; if (output["EntityName"] !== undefined) { - contents.EntityName = - output["EntityName"]["#text"] !== undefined - ? output["EntityName"]["#text"] - : output["EntityName"]; + contents.EntityName = output["EntityName"]; } if (output["EntityType"] !== undefined) { - contents.EntityType = - output["EntityType"]["#text"] !== undefined - ? output["EntityType"]["#text"] - : output["EntityType"]; + contents.EntityType = output["EntityType"]; } if (output["PolicyArn"] !== undefined) { - contents.PolicyArn = - output["PolicyArn"]["#text"] !== undefined - ? output["PolicyArn"]["#text"] - : output["PolicyArn"]; + contents.PolicyArn = output["PolicyArn"]; } if (output["PolicyName"] !== undefined) { - contents.PolicyName = - output["PolicyName"]["#text"] !== undefined - ? output["PolicyName"]["#text"] - : output["PolicyName"]; + contents.PolicyName = output["PolicyName"]; } if (output["PolicyType"] !== undefined) { - contents.PolicyType = - output["PolicyType"]["#text"] !== undefined - ? output["PolicyType"]["#text"] - : output["PolicyType"]; + contents.PolicyType = output["PolicyType"]; } return contents; }; @@ -21242,16 +20668,10 @@ const deserializeAws_queryPolicyGroup = ( GroupName: undefined }; if (output["GroupId"] !== undefined) { - contents.GroupId = - output["GroupId"]["#text"] !== undefined - ? output["GroupId"]["#text"] - : output["GroupId"]; + contents.GroupId = output["GroupId"]; } if (output["GroupName"] !== undefined) { - contents.GroupName = - output["GroupName"]["#text"] !== undefined - ? output["GroupName"]["#text"] - : output["GroupName"]; + contents.GroupName = output["GroupName"]; } return contents; }; @@ -21274,10 +20694,7 @@ const deserializeAws_queryPolicyNotAttachableException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21292,16 +20709,10 @@ const deserializeAws_queryPolicyRole = ( RoleName: undefined }; if (output["RoleId"] !== undefined) { - contents.RoleId = - output["RoleId"]["#text"] !== undefined - ? output["RoleId"]["#text"] - : output["RoleId"]; + contents.RoleId = output["RoleId"]; } if (output["RoleName"] !== undefined) { - contents.RoleName = - output["RoleName"]["#text"] !== undefined - ? output["RoleName"]["#text"] - : output["RoleName"]; + contents.RoleName = output["RoleName"]; } return contents; }; @@ -21325,16 +20736,10 @@ const deserializeAws_queryPolicyUser = ( UserName: undefined }; if (output["UserId"] !== undefined) { - contents.UserId = - output["UserId"]["#text"] !== undefined - ? output["UserId"]["#text"] - : output["UserId"]; + contents.UserId = output["UserId"]; } if (output["UserName"] !== undefined) { - contents.UserName = - output["UserName"]["#text"] !== undefined - ? output["UserName"]["#text"] - : output["UserName"]; + contents.UserName = output["UserName"]; } return contents; }; @@ -21363,22 +20768,13 @@ const deserializeAws_queryPolicyVersion = ( contents.CreateDate = new Date(output["CreateDate"]); } if (output["Document"] !== undefined) { - contents.Document = - output["Document"]["#text"] !== undefined - ? output["Document"]["#text"] - : output["Document"]; + contents.Document = output["Document"]; } if (output["IsDefaultVersion"] !== undefined) { - contents.IsDefaultVersion = - (output["IsDefaultVersion"]["#text"] !== undefined - ? output["IsDefaultVersion"]["#text"] - : output["IsDefaultVersion"]) == "true"; + contents.IsDefaultVersion = output["IsDefaultVersion"] == "true"; } if (output["VersionId"] !== undefined) { - contents.VersionId = - output["VersionId"]["#text"] !== undefined - ? output["VersionId"]["#text"] - : output["VersionId"]; + contents.VersionId = output["VersionId"]; } return contents; }; @@ -21393,18 +20789,10 @@ const deserializeAws_queryPosition = ( Line: undefined }; if (output["Column"] !== undefined) { - contents.Column = parseInt( - output["Column"]["#text"] !== undefined - ? output["Column"]["#text"] - : output["Column"] - ); + contents.Column = parseInt(output["Column"]); } if (output["Line"] !== undefined) { - contents.Line = parseInt( - output["Line"]["#text"] !== undefined - ? output["Line"]["#text"] - : output["Line"] - ); + contents.Line = parseInt(output["Line"]); } return contents; }; @@ -21418,10 +20806,7 @@ const deserializeAws_queryReportGenerationLimitExceededException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21468,16 +20853,10 @@ const deserializeAws_queryResourceSpecificResult = ( ); } if (output["EvalResourceDecision"] !== undefined) { - contents.EvalResourceDecision = - output["EvalResourceDecision"]["#text"] !== undefined - ? output["EvalResourceDecision"]["#text"] - : output["EvalResourceDecision"]; + contents.EvalResourceDecision = output["EvalResourceDecision"]; } if (output["EvalResourceName"] !== undefined) { - contents.EvalResourceName = - output["EvalResourceName"]["#text"] !== undefined - ? output["EvalResourceName"]["#text"] - : output["EvalResourceName"]; + contents.EvalResourceName = output["EvalResourceName"]; } if (output.MatchedStatements === "") { contents.MatchedStatements = []; @@ -21534,38 +20913,22 @@ const deserializeAws_queryRole = ( Tags: undefined }; if (output["Arn"] !== undefined) { - contents.Arn = - output["Arn"]["#text"] !== undefined - ? output["Arn"]["#text"] - : output["Arn"]; + contents.Arn = output["Arn"]; } if (output["AssumeRolePolicyDocument"] !== undefined) { - contents.AssumeRolePolicyDocument = - output["AssumeRolePolicyDocument"]["#text"] !== undefined - ? output["AssumeRolePolicyDocument"]["#text"] - : output["AssumeRolePolicyDocument"]; + contents.AssumeRolePolicyDocument = output["AssumeRolePolicyDocument"]; } if (output["CreateDate"] !== undefined) { contents.CreateDate = new Date(output["CreateDate"]); } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["MaxSessionDuration"] !== undefined) { - contents.MaxSessionDuration = parseInt( - output["MaxSessionDuration"]["#text"] !== undefined - ? output["MaxSessionDuration"]["#text"] - : output["MaxSessionDuration"] - ); + contents.MaxSessionDuration = parseInt(output["MaxSessionDuration"]); } if (output["Path"] !== undefined) { - contents.Path = - output["Path"]["#text"] !== undefined - ? output["Path"]["#text"] - : output["Path"]; + contents.Path = output["Path"]; } if (output["PermissionsBoundary"] !== undefined) { contents.PermissionsBoundary = deserializeAws_queryAttachedPermissionsBoundary( @@ -21574,10 +20937,7 @@ const deserializeAws_queryRole = ( ); } if (output["RoleId"] !== undefined) { - contents.RoleId = - output["RoleId"]["#text"] !== undefined - ? output["RoleId"]["#text"] - : output["RoleId"]; + contents.RoleId = output["RoleId"]; } if (output["RoleLastUsed"] !== undefined) { contents.RoleLastUsed = deserializeAws_queryRoleLastUsed( @@ -21586,10 +20946,7 @@ const deserializeAws_queryRole = ( ); } if (output["RoleName"] !== undefined) { - contents.RoleName = - output["RoleName"]["#text"] !== undefined - ? output["RoleName"]["#text"] - : output["RoleName"]; + contents.RoleName = output["RoleName"]; } if (output.Tags === "") { contents.Tags = []; @@ -21623,16 +20980,10 @@ const deserializeAws_queryRoleDetail = ( Tags: undefined }; if (output["Arn"] !== undefined) { - contents.Arn = - output["Arn"]["#text"] !== undefined - ? output["Arn"]["#text"] - : output["Arn"]; + contents.Arn = output["Arn"]; } if (output["AssumeRolePolicyDocument"] !== undefined) { - contents.AssumeRolePolicyDocument = - output["AssumeRolePolicyDocument"]["#text"] !== undefined - ? output["AssumeRolePolicyDocument"]["#text"] - : output["AssumeRolePolicyDocument"]; + contents.AssumeRolePolicyDocument = output["AssumeRolePolicyDocument"]; } if (output.AttachedManagedPolicies === "") { contents.AttachedManagedPolicies = []; @@ -21662,10 +21013,7 @@ const deserializeAws_queryRoleDetail = ( ); } if (output["Path"] !== undefined) { - contents.Path = - output["Path"]["#text"] !== undefined - ? output["Path"]["#text"] - : output["Path"]; + contents.Path = output["Path"]; } if (output["PermissionsBoundary"] !== undefined) { contents.PermissionsBoundary = deserializeAws_queryAttachedPermissionsBoundary( @@ -21674,10 +21022,7 @@ const deserializeAws_queryRoleDetail = ( ); } if (output["RoleId"] !== undefined) { - contents.RoleId = - output["RoleId"]["#text"] !== undefined - ? output["RoleId"]["#text"] - : output["RoleId"]; + contents.RoleId = output["RoleId"]; } if (output["RoleLastUsed"] !== undefined) { contents.RoleLastUsed = deserializeAws_queryRoleLastUsed( @@ -21686,10 +21031,7 @@ const deserializeAws_queryRoleDetail = ( ); } if (output["RoleName"] !== undefined) { - contents.RoleName = - output["RoleName"]["#text"] !== undefined - ? output["RoleName"]["#text"] - : output["RoleName"]; + contents.RoleName = output["RoleName"]; } if (output.RolePolicyList === "") { contents.RolePolicyList = []; @@ -21728,10 +21070,7 @@ const deserializeAws_queryRoleLastUsed = ( contents.LastUsedDate = new Date(output["LastUsedDate"]); } if (output["Region"] !== undefined) { - contents.Region = - output["Region"]["#text"] !== undefined - ? output["Region"]["#text"] - : output["Region"]; + contents.Region = output["Region"]; } return contents; }; @@ -21755,10 +21094,7 @@ const deserializeAws_queryRoleUsageType = ( Resources: undefined }; if (output["Region"] !== undefined) { - contents.Region = - output["Region"]["#text"] !== undefined - ? output["Region"]["#text"] - : output["Region"]; + contents.Region = output["Region"]; } if (output.Resources === "") { contents.Resources = []; @@ -21786,10 +21122,7 @@ const deserializeAws_querySAMLProviderListEntry = ( ValidUntil: undefined }; if (output["Arn"] !== undefined) { - contents.Arn = - output["Arn"]["#text"] !== undefined - ? output["Arn"]["#text"] - : output["Arn"]; + contents.Arn = output["Arn"]; } if (output["CreateDate"] !== undefined) { contents.CreateDate = new Date(output["CreateDate"]); @@ -21823,37 +21156,22 @@ const deserializeAws_querySSHPublicKey = ( UserName: undefined }; if (output["Fingerprint"] !== undefined) { - contents.Fingerprint = - output["Fingerprint"]["#text"] !== undefined - ? output["Fingerprint"]["#text"] - : output["Fingerprint"]; + contents.Fingerprint = output["Fingerprint"]; } if (output["SSHPublicKeyBody"] !== undefined) { - contents.SSHPublicKeyBody = - output["SSHPublicKeyBody"]["#text"] !== undefined - ? output["SSHPublicKeyBody"]["#text"] - : output["SSHPublicKeyBody"]; + contents.SSHPublicKeyBody = output["SSHPublicKeyBody"]; } if (output["SSHPublicKeyId"] !== undefined) { - contents.SSHPublicKeyId = - output["SSHPublicKeyId"]["#text"] !== undefined - ? output["SSHPublicKeyId"]["#text"] - : output["SSHPublicKeyId"]; + contents.SSHPublicKeyId = output["SSHPublicKeyId"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["UploadDate"] !== undefined) { contents.UploadDate = new Date(output["UploadDate"]); } if (output["UserName"] !== undefined) { - contents.UserName = - output["UserName"]["#text"] !== undefined - ? output["UserName"]["#text"] - : output["UserName"]; + contents.UserName = output["UserName"]; } return contents; }; @@ -21879,25 +21197,16 @@ const deserializeAws_querySSHPublicKeyMetadata = ( UserName: undefined }; if (output["SSHPublicKeyId"] !== undefined) { - contents.SSHPublicKeyId = - output["SSHPublicKeyId"]["#text"] !== undefined - ? output["SSHPublicKeyId"]["#text"] - : output["SSHPublicKeyId"]; + contents.SSHPublicKeyId = output["SSHPublicKeyId"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["UploadDate"] !== undefined) { contents.UploadDate = new Date(output["UploadDate"]); } if (output["UserName"] !== undefined) { - contents.UserName = - output["UserName"]["#text"] !== undefined - ? output["UserName"]["#text"] - : output["UserName"]; + contents.UserName = output["UserName"]; } return contents; }; @@ -21913,16 +21222,10 @@ const deserializeAws_queryServerCertificate = ( ServerCertificateMetadata: undefined }; if (output["CertificateBody"] !== undefined) { - contents.CertificateBody = - output["CertificateBody"]["#text"] !== undefined - ? output["CertificateBody"]["#text"] - : output["CertificateBody"]; + contents.CertificateBody = output["CertificateBody"]; } if (output["CertificateChain"] !== undefined) { - contents.CertificateChain = - output["CertificateChain"]["#text"] !== undefined - ? output["CertificateChain"]["#text"] - : output["CertificateChain"]; + contents.CertificateChain = output["CertificateChain"]; } if (output["ServerCertificateMetadata"] !== undefined) { contents.ServerCertificateMetadata = deserializeAws_queryServerCertificateMetadata( @@ -21947,31 +21250,19 @@ const deserializeAws_queryServerCertificateMetadata = ( UploadDate: undefined }; if (output["Arn"] !== undefined) { - contents.Arn = - output["Arn"]["#text"] !== undefined - ? output["Arn"]["#text"] - : output["Arn"]; + contents.Arn = output["Arn"]; } if (output["Expiration"] !== undefined) { contents.Expiration = new Date(output["Expiration"]); } if (output["Path"] !== undefined) { - contents.Path = - output["Path"]["#text"] !== undefined - ? output["Path"]["#text"] - : output["Path"]; + contents.Path = output["Path"]; } if (output["ServerCertificateId"] !== undefined) { - contents.ServerCertificateId = - output["ServerCertificateId"]["#text"] !== undefined - ? output["ServerCertificateId"]["#text"] - : output["ServerCertificateId"]; + contents.ServerCertificateId = output["ServerCertificateId"]; } if (output["ServerCertificateName"] !== undefined) { - contents.ServerCertificateName = - output["ServerCertificateName"]["#text"] !== undefined - ? output["ServerCertificateName"]["#text"] - : output["ServerCertificateName"]; + contents.ServerCertificateName = output["ServerCertificateName"]; } if (output["UploadDate"] !== undefined) { contents.UploadDate = new Date(output["UploadDate"]); @@ -21988,10 +21279,7 @@ const deserializeAws_queryServiceFailureException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22012,28 +21300,17 @@ const deserializeAws_queryServiceLastAccessed = ( contents.LastAuthenticated = new Date(output["LastAuthenticated"]); } if (output["LastAuthenticatedEntity"] !== undefined) { - contents.LastAuthenticatedEntity = - output["LastAuthenticatedEntity"]["#text"] !== undefined - ? output["LastAuthenticatedEntity"]["#text"] - : output["LastAuthenticatedEntity"]; + contents.LastAuthenticatedEntity = output["LastAuthenticatedEntity"]; } if (output["ServiceName"] !== undefined) { - contents.ServiceName = - output["ServiceName"]["#text"] !== undefined - ? output["ServiceName"]["#text"] - : output["ServiceName"]; + contents.ServiceName = output["ServiceName"]; } if (output["ServiceNamespace"] !== undefined) { - contents.ServiceNamespace = - output["ServiceNamespace"]["#text"] !== undefined - ? output["ServiceNamespace"]["#text"] - : output["ServiceNamespace"]; + contents.ServiceNamespace = output["ServiceNamespace"]; } if (output["TotalAuthenticatedEntities"] !== undefined) { contents.TotalAuthenticatedEntities = parseInt( - output["TotalAuthenticatedEntities"]["#text"] !== undefined - ? output["TotalAuthenticatedEntities"]["#text"] - : output["TotalAuthenticatedEntities"] + output["TotalAuthenticatedEntities"] ); } return contents; @@ -22048,10 +21325,7 @@ const deserializeAws_queryServiceNotSupportedException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22074,40 +21348,23 @@ const deserializeAws_queryServiceSpecificCredential = ( contents.CreateDate = new Date(output["CreateDate"]); } if (output["ServiceName"] !== undefined) { - contents.ServiceName = - output["ServiceName"]["#text"] !== undefined - ? output["ServiceName"]["#text"] - : output["ServiceName"]; + contents.ServiceName = output["ServiceName"]; } if (output["ServicePassword"] !== undefined) { - contents.ServicePassword = - output["ServicePassword"]["#text"] !== undefined - ? output["ServicePassword"]["#text"] - : output["ServicePassword"]; + contents.ServicePassword = output["ServicePassword"]; } if (output["ServiceSpecificCredentialId"] !== undefined) { contents.ServiceSpecificCredentialId = - output["ServiceSpecificCredentialId"]["#text"] !== undefined - ? output["ServiceSpecificCredentialId"]["#text"] - : output["ServiceSpecificCredentialId"]; + output["ServiceSpecificCredentialId"]; } if (output["ServiceUserName"] !== undefined) { - contents.ServiceUserName = - output["ServiceUserName"]["#text"] !== undefined - ? output["ServiceUserName"]["#text"] - : output["ServiceUserName"]; + contents.ServiceUserName = output["ServiceUserName"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["UserName"] !== undefined) { - contents.UserName = - output["UserName"]["#text"] !== undefined - ? output["UserName"]["#text"] - : output["UserName"]; + contents.UserName = output["UserName"]; } return contents; }; @@ -22129,34 +21386,20 @@ const deserializeAws_queryServiceSpecificCredentialMetadata = ( contents.CreateDate = new Date(output["CreateDate"]); } if (output["ServiceName"] !== undefined) { - contents.ServiceName = - output["ServiceName"]["#text"] !== undefined - ? output["ServiceName"]["#text"] - : output["ServiceName"]; + contents.ServiceName = output["ServiceName"]; } if (output["ServiceSpecificCredentialId"] !== undefined) { contents.ServiceSpecificCredentialId = - output["ServiceSpecificCredentialId"]["#text"] !== undefined - ? output["ServiceSpecificCredentialId"]["#text"] - : output["ServiceSpecificCredentialId"]; + output["ServiceSpecificCredentialId"]; } if (output["ServiceUserName"] !== undefined) { - contents.ServiceUserName = - output["ServiceUserName"]["#text"] !== undefined - ? output["ServiceUserName"]["#text"] - : output["ServiceUserName"]; + contents.ServiceUserName = output["ServiceUserName"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["UserName"] !== undefined) { - contents.UserName = - output["UserName"]["#text"] !== undefined - ? output["UserName"]["#text"] - : output["UserName"]; + contents.UserName = output["UserName"]; } return contents; }; @@ -22192,31 +21435,19 @@ const deserializeAws_querySigningCertificate = ( UserName: undefined }; if (output["CertificateBody"] !== undefined) { - contents.CertificateBody = - output["CertificateBody"]["#text"] !== undefined - ? output["CertificateBody"]["#text"] - : output["CertificateBody"]; + contents.CertificateBody = output["CertificateBody"]; } if (output["CertificateId"] !== undefined) { - contents.CertificateId = - output["CertificateId"]["#text"] !== undefined - ? output["CertificateId"]["#text"] - : output["CertificateId"]; + contents.CertificateId = output["CertificateId"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["UploadDate"] !== undefined) { contents.UploadDate = new Date(output["UploadDate"]); } if (output["UserName"] !== undefined) { - contents.UserName = - output["UserName"]["#text"] !== undefined - ? output["UserName"]["#text"] - : output["UserName"]; + contents.UserName = output["UserName"]; } return contents; }; @@ -22244,16 +21475,10 @@ const deserializeAws_querySimulatePolicyResponse = ( ); } if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = - (output["IsTruncated"]["#text"] !== undefined - ? output["IsTruncated"]["#text"] - : output["IsTruncated"]) == "true"; + contents.IsTruncated = output["IsTruncated"] == "true"; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -22276,16 +21501,10 @@ const deserializeAws_queryStatement = ( ); } if (output["SourcePolicyId"] !== undefined) { - contents.SourcePolicyId = - output["SourcePolicyId"]["#text"] !== undefined - ? output["SourcePolicyId"]["#text"] - : output["SourcePolicyId"]; + contents.SourcePolicyId = output["SourcePolicyId"]; } if (output["SourcePolicyType"] !== undefined) { - contents.SourcePolicyType = - output["SourcePolicyType"]["#text"] !== undefined - ? output["SourcePolicyType"]["#text"] - : output["SourcePolicyType"]; + contents.SourcePolicyType = output["SourcePolicyType"]; } if (output["StartPosition"] !== undefined) { contents.StartPosition = deserializeAws_queryPosition( @@ -22312,16 +21531,10 @@ const deserializeAws_queryTag = (output: any, context: __SerdeContext): Tag => { Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -22335,10 +21548,7 @@ const deserializeAws_queryUnmodifiableEntityException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22352,10 +21562,7 @@ const deserializeAws_queryUnrecognizedPublicKeyEncodingException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22393,10 +21600,7 @@ const deserializeAws_queryUpdateSAMLProviderResponse = ( SAMLProviderArn: undefined }; if (output["SAMLProviderArn"] !== undefined) { - contents.SAMLProviderArn = - output["SAMLProviderArn"]["#text"] !== undefined - ? output["SAMLProviderArn"]["#text"] - : output["SAMLProviderArn"]; + contents.SAMLProviderArn = output["SAMLProviderArn"]; } return contents; }; @@ -22468,10 +21672,7 @@ const deserializeAws_queryUser = ( UserName: undefined }; if (output["Arn"] !== undefined) { - contents.Arn = - output["Arn"]["#text"] !== undefined - ? output["Arn"]["#text"] - : output["Arn"]; + contents.Arn = output["Arn"]; } if (output["CreateDate"] !== undefined) { contents.CreateDate = new Date(output["CreateDate"]); @@ -22480,10 +21681,7 @@ const deserializeAws_queryUser = ( contents.PasswordLastUsed = new Date(output["PasswordLastUsed"]); } if (output["Path"] !== undefined) { - contents.Path = - output["Path"]["#text"] !== undefined - ? output["Path"]["#text"] - : output["Path"]; + contents.Path = output["Path"]; } if (output["PermissionsBoundary"] !== undefined) { contents.PermissionsBoundary = deserializeAws_queryAttachedPermissionsBoundary( @@ -22501,16 +21699,10 @@ const deserializeAws_queryUser = ( ); } if (output["UserId"] !== undefined) { - contents.UserId = - output["UserId"]["#text"] !== undefined - ? output["UserId"]["#text"] - : output["UserId"]; + contents.UserId = output["UserId"]; } if (output["UserName"] !== undefined) { - contents.UserName = - output["UserName"]["#text"] !== undefined - ? output["UserName"]["#text"] - : output["UserName"]; + contents.UserName = output["UserName"]; } return contents; }; @@ -22533,10 +21725,7 @@ const deserializeAws_queryUserDetail = ( UserPolicyList: undefined }; if (output["Arn"] !== undefined) { - contents.Arn = - output["Arn"]["#text"] !== undefined - ? output["Arn"]["#text"] - : output["Arn"]; + contents.Arn = output["Arn"]; } if (output.AttachedManagedPolicies === "") { contents.AttachedManagedPolicies = []; @@ -22566,10 +21755,7 @@ const deserializeAws_queryUserDetail = ( ); } if (output["Path"] !== undefined) { - contents.Path = - output["Path"]["#text"] !== undefined - ? output["Path"]["#text"] - : output["Path"]; + contents.Path = output["Path"]; } if (output["PermissionsBoundary"] !== undefined) { contents.PermissionsBoundary = deserializeAws_queryAttachedPermissionsBoundary( @@ -22587,16 +21773,10 @@ const deserializeAws_queryUserDetail = ( ); } if (output["UserId"] !== undefined) { - contents.UserId = - output["UserId"]["#text"] !== undefined - ? output["UserId"]["#text"] - : output["UserId"]; + contents.UserId = output["UserId"]; } if (output["UserName"] !== undefined) { - contents.UserName = - output["UserName"]["#text"] !== undefined - ? output["UserName"]["#text"] - : output["UserName"]; + contents.UserName = output["UserName"]; } if (output.UserPolicyList === "") { contents.UserPolicyList = []; @@ -22627,26 +21807,17 @@ const deserializeAws_queryVirtualMFADevice = ( }; if (output["Base32StringSeed"] !== undefined) { contents.Base32StringSeed = context.base64Decoder( - output["Base32StringSeed"]["#text"] !== undefined - ? output["Base32StringSeed"]["#text"] - : output["Base32StringSeed"] + output["Base32StringSeed"] ); } if (output["EnableDate"] !== undefined) { contents.EnableDate = new Date(output["EnableDate"]); } if (output["QRCodePNG"] !== undefined) { - contents.QRCodePNG = context.base64Decoder( - output["QRCodePNG"]["#text"] !== undefined - ? output["QRCodePNG"]["#text"] - : output["QRCodePNG"] - ); + contents.QRCodePNG = context.base64Decoder(output["QRCodePNG"]); } if (output["SerialNumber"] !== undefined) { - contents.SerialNumber = - output["SerialNumber"]["#text"] !== undefined - ? output["SerialNumber"]["#text"] - : output["SerialNumber"]; + contents.SerialNumber = output["SerialNumber"]; } if (output["User"] !== undefined) { contents.User = deserializeAws_queryUser(output["User"], context); @@ -22667,9 +21838,7 @@ const deserializeAws_queryaccountAliasListType = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryattachedPoliciesListType = ( @@ -22694,9 +21863,7 @@ const deserializeAws_queryclientIDListType = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryentityDetailsListType = ( @@ -22730,9 +21897,7 @@ const deserializeAws_querygroupNameListType = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryinstanceProfileListType = ( @@ -22802,9 +21967,7 @@ const deserializeAws_querypolicyNameListType = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryroleDetailListType = ( @@ -22839,11 +22002,7 @@ const deserializeAws_querysummaryMapType = ( context: __SerdeContext ): { [key: string]: number } => { return output.reduce((acc: any, pair: any) => { - acc[pair["key"]] = parseInt( - pair["value"]["#text"] !== undefined - ? pair["value"]["#text"] - : pair["value"] - ); + acc[pair["key"]] = parseInt(pair["value"]); return acc; }, {}); }; @@ -22861,9 +22020,7 @@ const deserializeAws_querythumbprintListType = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryuserDetailListType = ( @@ -22968,7 +22125,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/clients/client-neptune/protocols/Aws_query.ts b/clients/client-neptune/protocols/Aws_query.ts index bdb2fca63a57..6c0335af41ad 100644 --- a/clients/client-neptune/protocols/Aws_query.ts +++ b/clients/client-neptune/protocols/Aws_query.ts @@ -440,7 +440,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -9878,10 +9879,7 @@ const deserializeAws_queryAuthorizationNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9895,10 +9893,7 @@ const deserializeAws_queryCertificateNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9912,10 +9907,7 @@ const deserializeAws_queryDBClusterAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9929,10 +9921,7 @@ const deserializeAws_queryDBClusterNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9946,10 +9935,7 @@ const deserializeAws_queryDBClusterParameterGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9963,10 +9949,7 @@ const deserializeAws_queryDBClusterQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9980,10 +9963,7 @@ const deserializeAws_queryDBClusterRoleAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9997,10 +9977,7 @@ const deserializeAws_queryDBClusterRoleNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10014,10 +9991,7 @@ const deserializeAws_queryDBClusterRoleQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10031,10 +10005,7 @@ const deserializeAws_queryDBClusterSnapshotAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10048,10 +10019,7 @@ const deserializeAws_queryDBClusterSnapshotNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10065,10 +10033,7 @@ const deserializeAws_queryDBInstanceAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10082,10 +10047,7 @@ const deserializeAws_queryDBInstanceNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10099,10 +10061,7 @@ const deserializeAws_queryDBParameterGroupAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10116,10 +10075,7 @@ const deserializeAws_queryDBParameterGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10133,10 +10089,7 @@ const deserializeAws_queryDBParameterGroupQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10150,10 +10103,7 @@ const deserializeAws_queryDBSecurityGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10167,10 +10117,7 @@ const deserializeAws_queryDBSnapshotAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10184,10 +10131,7 @@ const deserializeAws_queryDBSnapshotNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10201,10 +10145,7 @@ const deserializeAws_queryDBSubnetGroupAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10218,10 +10159,7 @@ const deserializeAws_queryDBSubnetGroupDoesNotCoverEnoughAZs = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10235,10 +10173,7 @@ const deserializeAws_queryDBSubnetGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10252,10 +10187,7 @@ const deserializeAws_queryDBSubnetGroupQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10269,10 +10201,7 @@ const deserializeAws_queryDBSubnetQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10286,10 +10215,7 @@ const deserializeAws_queryDBUpgradeDependencyFailureFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10303,10 +10229,7 @@ const deserializeAws_queryDomainNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10320,10 +10243,7 @@ const deserializeAws_queryEventSubscriptionQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10337,10 +10257,7 @@ const deserializeAws_queryInstanceQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10354,10 +10271,7 @@ const deserializeAws_queryInsufficientDBClusterCapacityFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10371,10 +10285,7 @@ const deserializeAws_queryInsufficientDBInstanceCapacityFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10388,10 +10299,7 @@ const deserializeAws_queryInsufficientStorageClusterCapacityFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10405,10 +10313,7 @@ const deserializeAws_queryInvalidDBClusterSnapshotStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10422,10 +10327,7 @@ const deserializeAws_queryInvalidDBClusterStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10439,10 +10341,7 @@ const deserializeAws_queryInvalidDBInstanceStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10456,10 +10355,7 @@ const deserializeAws_queryInvalidDBParameterGroupStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10473,10 +10369,7 @@ const deserializeAws_queryInvalidDBSecurityGroupStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10490,10 +10383,7 @@ const deserializeAws_queryInvalidDBSnapshotStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10507,10 +10397,7 @@ const deserializeAws_queryInvalidDBSubnetGroupStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10524,10 +10411,7 @@ const deserializeAws_queryInvalidDBSubnetStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10541,10 +10425,7 @@ const deserializeAws_queryInvalidEventSubscriptionStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10558,10 +10439,7 @@ const deserializeAws_queryInvalidRestoreFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10575,10 +10453,7 @@ const deserializeAws_queryInvalidSubnet = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10592,10 +10467,7 @@ const deserializeAws_queryInvalidVPCNetworkStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10609,10 +10481,7 @@ const deserializeAws_queryKMSKeyNotAccessibleFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10626,10 +10495,7 @@ const deserializeAws_queryOptionGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10643,10 +10509,7 @@ const deserializeAws_queryProvisionedIopsNotAvailableInAZFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10660,10 +10523,7 @@ const deserializeAws_queryResourceNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10677,10 +10537,7 @@ const deserializeAws_querySNSInvalidTopicFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10694,10 +10551,7 @@ const deserializeAws_querySNSNoAuthorizationFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10711,10 +10565,7 @@ const deserializeAws_querySNSTopicArnNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10728,10 +10579,7 @@ const deserializeAws_querySharedSnapshotQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10745,10 +10593,7 @@ const deserializeAws_querySnapshotQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10762,10 +10607,7 @@ const deserializeAws_querySourceNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10779,10 +10621,7 @@ const deserializeAws_queryStorageQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10796,10 +10635,7 @@ const deserializeAws_queryStorageTypeNotSupportedFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10813,10 +10649,7 @@ const deserializeAws_querySubnetAlreadyInUse = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10830,10 +10663,7 @@ const deserializeAws_querySubscriptionAlreadyExistFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10847,10 +10677,7 @@ const deserializeAws_querySubscriptionCategoryNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10864,10 +10691,7 @@ const deserializeAws_querySubscriptionNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10910,9 +10734,7 @@ const deserializeAws_queryAttributeValueList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryAvailabilityZone = ( @@ -10924,10 +10746,7 @@ const deserializeAws_queryAvailabilityZone = ( Name: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } return contents; }; @@ -10945,9 +10764,7 @@ const deserializeAws_queryAvailabilityZones = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryCharacterSet = ( @@ -10960,16 +10777,10 @@ const deserializeAws_queryCharacterSet = ( CharacterSetName: undefined }; if (output["CharacterSetDescription"] !== undefined) { - contents.CharacterSetDescription = - output["CharacterSetDescription"]["#text"] !== undefined - ? output["CharacterSetDescription"]["#text"] - : output["CharacterSetDescription"]; + contents.CharacterSetDescription = output["CharacterSetDescription"]; } if (output["CharacterSetName"] !== undefined) { - contents.CharacterSetName = - output["CharacterSetName"]["#text"] !== undefined - ? output["CharacterSetName"]["#text"] - : output["CharacterSetName"]; + contents.CharacterSetName = output["CharacterSetName"]; } return contents; }; @@ -11189,11 +11000,7 @@ const deserializeAws_queryDBCluster = ( VpcSecurityGroups: undefined }; if (output["AllocatedStorage"] !== undefined) { - contents.AllocatedStorage = parseInt( - output["AllocatedStorage"]["#text"] !== undefined - ? output["AllocatedStorage"]["#text"] - : output["AllocatedStorage"] - ); + contents.AllocatedStorage = parseInt(output["AllocatedStorage"]); } if (output.AssociatedRoles === "") { contents.AssociatedRoles = []; @@ -11220,38 +11027,22 @@ const deserializeAws_queryDBCluster = ( ); } if (output["BackupRetentionPeriod"] !== undefined) { - contents.BackupRetentionPeriod = parseInt( - output["BackupRetentionPeriod"]["#text"] !== undefined - ? output["BackupRetentionPeriod"]["#text"] - : output["BackupRetentionPeriod"] - ); + contents.BackupRetentionPeriod = parseInt(output["BackupRetentionPeriod"]); } if (output["CharacterSetName"] !== undefined) { - contents.CharacterSetName = - output["CharacterSetName"]["#text"] !== undefined - ? output["CharacterSetName"]["#text"] - : output["CharacterSetName"]; + contents.CharacterSetName = output["CharacterSetName"]; } if (output["CloneGroupId"] !== undefined) { - contents.CloneGroupId = - output["CloneGroupId"]["#text"] !== undefined - ? output["CloneGroupId"]["#text"] - : output["CloneGroupId"]; + contents.CloneGroupId = output["CloneGroupId"]; } if (output["ClusterCreateTime"] !== undefined) { contents.ClusterCreateTime = new Date(output["ClusterCreateTime"]); } if (output["DBClusterArn"] !== undefined) { - contents.DBClusterArn = - output["DBClusterArn"]["#text"] !== undefined - ? output["DBClusterArn"]["#text"] - : output["DBClusterArn"]; + contents.DBClusterArn = output["DBClusterArn"]; } if (output["DBClusterIdentifier"] !== undefined) { - contents.DBClusterIdentifier = - output["DBClusterIdentifier"]["#text"] !== undefined - ? output["DBClusterIdentifier"]["#text"] - : output["DBClusterIdentifier"]; + contents.DBClusterIdentifier = output["DBClusterIdentifier"]; } if (output.DBClusterMembers === "") { contents.DBClusterMembers = []; @@ -11281,34 +11072,19 @@ const deserializeAws_queryDBCluster = ( ); } if (output["DBClusterParameterGroup"] !== undefined) { - contents.DBClusterParameterGroup = - output["DBClusterParameterGroup"]["#text"] !== undefined - ? output["DBClusterParameterGroup"]["#text"] - : output["DBClusterParameterGroup"]; + contents.DBClusterParameterGroup = output["DBClusterParameterGroup"]; } if (output["DBSubnetGroup"] !== undefined) { - contents.DBSubnetGroup = - output["DBSubnetGroup"]["#text"] !== undefined - ? output["DBSubnetGroup"]["#text"] - : output["DBSubnetGroup"]; + contents.DBSubnetGroup = output["DBSubnetGroup"]; } if (output["DatabaseName"] !== undefined) { - contents.DatabaseName = - output["DatabaseName"]["#text"] !== undefined - ? output["DatabaseName"]["#text"] - : output["DatabaseName"]; + contents.DatabaseName = output["DatabaseName"]; } if (output["DbClusterResourceId"] !== undefined) { - contents.DbClusterResourceId = - output["DbClusterResourceId"]["#text"] !== undefined - ? output["DbClusterResourceId"]["#text"] - : output["DbClusterResourceId"]; + contents.DbClusterResourceId = output["DbClusterResourceId"]; } if (output["DeletionProtection"] !== undefined) { - contents.DeletionProtection = - (output["DeletionProtection"]["#text"] !== undefined - ? output["DeletionProtection"]["#text"] - : output["DeletionProtection"]) == "true"; + contents.DeletionProtection = output["DeletionProtection"] == "true"; } if (output["EarliestRestorableTime"] !== undefined) { contents.EarliestRestorableTime = new Date( @@ -11328,80 +11104,44 @@ const deserializeAws_queryDBCluster = ( ); } if (output["Endpoint"] !== undefined) { - contents.Endpoint = - output["Endpoint"]["#text"] !== undefined - ? output["Endpoint"]["#text"] - : output["Endpoint"]; + contents.Endpoint = output["Endpoint"]; } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["HostedZoneId"] !== undefined) { - contents.HostedZoneId = - output["HostedZoneId"]["#text"] !== undefined - ? output["HostedZoneId"]["#text"] - : output["HostedZoneId"]; + contents.HostedZoneId = output["HostedZoneId"]; } if (output["IAMDatabaseAuthenticationEnabled"] !== undefined) { contents.IAMDatabaseAuthenticationEnabled = - (output["IAMDatabaseAuthenticationEnabled"]["#text"] !== undefined - ? output["IAMDatabaseAuthenticationEnabled"]["#text"] - : output["IAMDatabaseAuthenticationEnabled"]) == "true"; + output["IAMDatabaseAuthenticationEnabled"] == "true"; } if (output["KmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["KmsKeyId"]["#text"] !== undefined - ? output["KmsKeyId"]["#text"] - : output["KmsKeyId"]; + contents.KmsKeyId = output["KmsKeyId"]; } if (output["LatestRestorableTime"] !== undefined) { contents.LatestRestorableTime = new Date(output["LatestRestorableTime"]); } if (output["MasterUsername"] !== undefined) { - contents.MasterUsername = - output["MasterUsername"]["#text"] !== undefined - ? output["MasterUsername"]["#text"] - : output["MasterUsername"]; + contents.MasterUsername = output["MasterUsername"]; } if (output["MultiAZ"] !== undefined) { - contents.MultiAZ = - (output["MultiAZ"]["#text"] !== undefined - ? output["MultiAZ"]["#text"] - : output["MultiAZ"]) == "true"; + contents.MultiAZ = output["MultiAZ"] == "true"; } if (output["PercentProgress"] !== undefined) { - contents.PercentProgress = - output["PercentProgress"]["#text"] !== undefined - ? output["PercentProgress"]["#text"] - : output["PercentProgress"]; + contents.PercentProgress = output["PercentProgress"]; } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } if (output["PreferredBackupWindow"] !== undefined) { - contents.PreferredBackupWindow = - output["PreferredBackupWindow"]["#text"] !== undefined - ? output["PreferredBackupWindow"]["#text"] - : output["PreferredBackupWindow"]; + contents.PreferredBackupWindow = output["PreferredBackupWindow"]; } if (output["PreferredMaintenanceWindow"] !== undefined) { - contents.PreferredMaintenanceWindow = - output["PreferredMaintenanceWindow"]["#text"] !== undefined - ? output["PreferredMaintenanceWindow"]["#text"] - : output["PreferredMaintenanceWindow"]; + contents.PreferredMaintenanceWindow = output["PreferredMaintenanceWindow"]; } if (output.ReadReplicaIdentifiers === "") { contents.ReadReplicaIdentifiers = []; @@ -11418,28 +11158,17 @@ const deserializeAws_queryDBCluster = ( ); } if (output["ReaderEndpoint"] !== undefined) { - contents.ReaderEndpoint = - output["ReaderEndpoint"]["#text"] !== undefined - ? output["ReaderEndpoint"]["#text"] - : output["ReaderEndpoint"]; + contents.ReaderEndpoint = output["ReaderEndpoint"]; } if (output["ReplicationSourceIdentifier"] !== undefined) { contents.ReplicationSourceIdentifier = - output["ReplicationSourceIdentifier"]["#text"] !== undefined - ? output["ReplicationSourceIdentifier"]["#text"] - : output["ReplicationSourceIdentifier"]; + output["ReplicationSourceIdentifier"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["StorageEncrypted"] !== undefined) { - contents.StorageEncrypted = - (output["StorageEncrypted"]["#text"] !== undefined - ? output["StorageEncrypted"]["#text"] - : output["StorageEncrypted"]) == "true"; + contents.StorageEncrypted = output["StorageEncrypted"] == "true"; } if (output.VpcSecurityGroups === "") { contents.VpcSecurityGroups = []; @@ -11480,28 +11209,16 @@ const deserializeAws_queryDBClusterMember = ( }; if (output["DBClusterParameterGroupStatus"] !== undefined) { contents.DBClusterParameterGroupStatus = - output["DBClusterParameterGroupStatus"]["#text"] !== undefined - ? output["DBClusterParameterGroupStatus"]["#text"] - : output["DBClusterParameterGroupStatus"]; + output["DBClusterParameterGroupStatus"]; } if (output["DBInstanceIdentifier"] !== undefined) { - contents.DBInstanceIdentifier = - output["DBInstanceIdentifier"]["#text"] !== undefined - ? output["DBInstanceIdentifier"]["#text"] - : output["DBInstanceIdentifier"]; + contents.DBInstanceIdentifier = output["DBInstanceIdentifier"]; } if (output["IsClusterWriter"] !== undefined) { - contents.IsClusterWriter = - (output["IsClusterWriter"]["#text"] !== undefined - ? output["IsClusterWriter"]["#text"] - : output["IsClusterWriter"]) == "true"; + contents.IsClusterWriter = output["IsClusterWriter"] == "true"; } if (output["PromotionTier"] !== undefined) { - contents.PromotionTier = parseInt( - output["PromotionTier"]["#text"] !== undefined - ? output["PromotionTier"]["#text"] - : output["PromotionTier"] - ); + contents.PromotionTier = parseInt(output["PromotionTier"]); } return contents; }; @@ -11537,10 +11254,7 @@ const deserializeAws_queryDBClusterMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -11564,16 +11278,10 @@ const deserializeAws_queryDBClusterOptionGroupStatus = ( Status: undefined }; if (output["DBClusterOptionGroupName"] !== undefined) { - contents.DBClusterOptionGroupName = - output["DBClusterOptionGroupName"]["#text"] !== undefined - ? output["DBClusterOptionGroupName"]["#text"] - : output["DBClusterOptionGroupName"]; + contents.DBClusterOptionGroupName = output["DBClusterOptionGroupName"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -11590,28 +11298,17 @@ const deserializeAws_queryDBClusterParameterGroup = ( Description: undefined }; if (output["DBClusterParameterGroupArn"] !== undefined) { - contents.DBClusterParameterGroupArn = - output["DBClusterParameterGroupArn"]["#text"] !== undefined - ? output["DBClusterParameterGroupArn"]["#text"] - : output["DBClusterParameterGroupArn"]; + contents.DBClusterParameterGroupArn = output["DBClusterParameterGroupArn"]; } if (output["DBClusterParameterGroupName"] !== undefined) { contents.DBClusterParameterGroupName = - output["DBClusterParameterGroupName"]["#text"] !== undefined - ? output["DBClusterParameterGroupName"]["#text"] - : output["DBClusterParameterGroupName"]; + output["DBClusterParameterGroupName"]; } if (output["DBParameterGroupFamily"] !== undefined) { - contents.DBParameterGroupFamily = - output["DBParameterGroupFamily"]["#text"] !== undefined - ? output["DBParameterGroupFamily"]["#text"] - : output["DBParameterGroupFamily"]; + contents.DBParameterGroupFamily = output["DBParameterGroupFamily"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } return contents; }; @@ -11626,10 +11323,7 @@ const deserializeAws_queryDBClusterParameterGroupDetails = ( Parameters: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Parameters === "") { contents.Parameters = []; @@ -11665,9 +11359,7 @@ const deserializeAws_queryDBClusterParameterGroupNameMessage = ( }; if (output["DBClusterParameterGroupName"] !== undefined) { contents.DBClusterParameterGroupName = - output["DBClusterParameterGroupName"]["#text"] !== undefined - ? output["DBClusterParameterGroupName"]["#text"] - : output["DBClusterParameterGroupName"]; + output["DBClusterParameterGroupName"]; } return contents; }; @@ -11696,10 +11388,7 @@ const deserializeAws_queryDBClusterParameterGroupsMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -11714,16 +11403,10 @@ const deserializeAws_queryDBClusterRole = ( Status: undefined }; if (output["RoleArn"] !== undefined) { - contents.RoleArn = - output["RoleArn"]["#text"] !== undefined - ? output["RoleArn"]["#text"] - : output["RoleArn"]; + contents.RoleArn = output["RoleArn"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -11765,11 +11448,7 @@ const deserializeAws_queryDBClusterSnapshot = ( VpcId: undefined }; if (output["AllocatedStorage"] !== undefined) { - contents.AllocatedStorage = parseInt( - output["AllocatedStorage"]["#text"] !== undefined - ? output["AllocatedStorage"]["#text"] - : output["AllocatedStorage"] - ); + contents.AllocatedStorage = parseInt(output["AllocatedStorage"]); } if (output.AvailabilityZones === "") { contents.AvailabilityZones = []; @@ -11787,105 +11466,57 @@ const deserializeAws_queryDBClusterSnapshot = ( contents.ClusterCreateTime = new Date(output["ClusterCreateTime"]); } if (output["DBClusterIdentifier"] !== undefined) { - contents.DBClusterIdentifier = - output["DBClusterIdentifier"]["#text"] !== undefined - ? output["DBClusterIdentifier"]["#text"] - : output["DBClusterIdentifier"]; + contents.DBClusterIdentifier = output["DBClusterIdentifier"]; } if (output["DBClusterSnapshotArn"] !== undefined) { - contents.DBClusterSnapshotArn = - output["DBClusterSnapshotArn"]["#text"] !== undefined - ? output["DBClusterSnapshotArn"]["#text"] - : output["DBClusterSnapshotArn"]; + contents.DBClusterSnapshotArn = output["DBClusterSnapshotArn"]; } if (output["DBClusterSnapshotIdentifier"] !== undefined) { contents.DBClusterSnapshotIdentifier = - output["DBClusterSnapshotIdentifier"]["#text"] !== undefined - ? output["DBClusterSnapshotIdentifier"]["#text"] - : output["DBClusterSnapshotIdentifier"]; + output["DBClusterSnapshotIdentifier"]; } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["IAMDatabaseAuthenticationEnabled"] !== undefined) { contents.IAMDatabaseAuthenticationEnabled = - (output["IAMDatabaseAuthenticationEnabled"]["#text"] !== undefined - ? output["IAMDatabaseAuthenticationEnabled"]["#text"] - : output["IAMDatabaseAuthenticationEnabled"]) == "true"; + output["IAMDatabaseAuthenticationEnabled"] == "true"; } if (output["KmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["KmsKeyId"]["#text"] !== undefined - ? output["KmsKeyId"]["#text"] - : output["KmsKeyId"]; + contents.KmsKeyId = output["KmsKeyId"]; } if (output["LicenseModel"] !== undefined) { - contents.LicenseModel = - output["LicenseModel"]["#text"] !== undefined - ? output["LicenseModel"]["#text"] - : output["LicenseModel"]; + contents.LicenseModel = output["LicenseModel"]; } if (output["MasterUsername"] !== undefined) { - contents.MasterUsername = - output["MasterUsername"]["#text"] !== undefined - ? output["MasterUsername"]["#text"] - : output["MasterUsername"]; + contents.MasterUsername = output["MasterUsername"]; } if (output["PercentProgress"] !== undefined) { - contents.PercentProgress = parseInt( - output["PercentProgress"]["#text"] !== undefined - ? output["PercentProgress"]["#text"] - : output["PercentProgress"] - ); + contents.PercentProgress = parseInt(output["PercentProgress"]); } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } if (output["SnapshotCreateTime"] !== undefined) { contents.SnapshotCreateTime = new Date(output["SnapshotCreateTime"]); } if (output["SnapshotType"] !== undefined) { - contents.SnapshotType = - output["SnapshotType"]["#text"] !== undefined - ? output["SnapshotType"]["#text"] - : output["SnapshotType"]; + contents.SnapshotType = output["SnapshotType"]; } if (output["SourceDBClusterSnapshotArn"] !== undefined) { - contents.SourceDBClusterSnapshotArn = - output["SourceDBClusterSnapshotArn"]["#text"] !== undefined - ? output["SourceDBClusterSnapshotArn"]["#text"] - : output["SourceDBClusterSnapshotArn"]; + contents.SourceDBClusterSnapshotArn = output["SourceDBClusterSnapshotArn"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["StorageEncrypted"] !== undefined) { - contents.StorageEncrypted = - (output["StorageEncrypted"]["#text"] !== undefined - ? output["StorageEncrypted"]["#text"] - : output["StorageEncrypted"]) == "true"; + contents.StorageEncrypted = output["StorageEncrypted"] == "true"; } if (output["VpcId"] !== undefined) { - contents.VpcId = - output["VpcId"]["#text"] !== undefined - ? output["VpcId"]["#text"] - : output["VpcId"]; + contents.VpcId = output["VpcId"]; } return contents; }; @@ -11900,10 +11531,7 @@ const deserializeAws_queryDBClusterSnapshotAttribute = ( AttributeValues: undefined }; if (output["AttributeName"] !== undefined) { - contents.AttributeName = - output["AttributeName"]["#text"] !== undefined - ? output["AttributeName"]["#text"] - : output["AttributeName"]; + contents.AttributeName = output["AttributeName"]; } if (output.AttributeValues === "") { contents.AttributeValues = []; @@ -11955,9 +11583,7 @@ const deserializeAws_queryDBClusterSnapshotAttributesResult = ( } if (output["DBClusterSnapshotIdentifier"] !== undefined) { contents.DBClusterSnapshotIdentifier = - output["DBClusterSnapshotIdentifier"]["#text"] !== undefined - ? output["DBClusterSnapshotIdentifier"]["#text"] - : output["DBClusterSnapshotIdentifier"]; + output["DBClusterSnapshotIdentifier"]; } return contents; }; @@ -11993,10 +11619,7 @@ const deserializeAws_queryDBClusterSnapshotMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -12021,22 +11644,13 @@ const deserializeAws_queryDBEngineVersion = ( ValidUpgradeTarget: undefined }; if (output["DBEngineDescription"] !== undefined) { - contents.DBEngineDescription = - output["DBEngineDescription"]["#text"] !== undefined - ? output["DBEngineDescription"]["#text"] - : output["DBEngineDescription"]; + contents.DBEngineDescription = output["DBEngineDescription"]; } if (output["DBEngineVersionDescription"] !== undefined) { - contents.DBEngineVersionDescription = - output["DBEngineVersionDescription"]["#text"] !== undefined - ? output["DBEngineVersionDescription"]["#text"] - : output["DBEngineVersionDescription"]; + contents.DBEngineVersionDescription = output["DBEngineVersionDescription"]; } if (output["DBParameterGroupFamily"] !== undefined) { - contents.DBParameterGroupFamily = - output["DBParameterGroupFamily"]["#text"] !== undefined - ? output["DBParameterGroupFamily"]["#text"] - : output["DBParameterGroupFamily"]; + contents.DBParameterGroupFamily = output["DBParameterGroupFamily"]; } if (output["DefaultCharacterSet"] !== undefined) { contents.DefaultCharacterSet = deserializeAws_queryCharacterSet( @@ -12045,16 +11659,10 @@ const deserializeAws_queryDBEngineVersion = ( ); } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output.ExportableLogTypes === "") { contents.ExportableLogTypes = []; @@ -12094,15 +11702,10 @@ const deserializeAws_queryDBEngineVersion = ( } if (output["SupportsLogExportsToCloudwatchLogs"] !== undefined) { contents.SupportsLogExportsToCloudwatchLogs = - (output["SupportsLogExportsToCloudwatchLogs"]["#text"] !== undefined - ? output["SupportsLogExportsToCloudwatchLogs"]["#text"] - : output["SupportsLogExportsToCloudwatchLogs"]) == "true"; + output["SupportsLogExportsToCloudwatchLogs"] == "true"; } if (output["SupportsReadReplica"] !== undefined) { - contents.SupportsReadReplica = - (output["SupportsReadReplica"]["#text"] !== undefined - ? output["SupportsReadReplica"]["#text"] - : output["SupportsReadReplica"]) == "true"; + contents.SupportsReadReplica = output["SupportsReadReplica"] == "true"; } if (output.ValidUpgradeTarget === "") { contents.ValidUpgradeTarget = []; @@ -12150,10 +11753,7 @@ const deserializeAws_queryDBEngineVersionMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -12219,84 +11819,44 @@ const deserializeAws_queryDBInstance = ( VpcSecurityGroups: undefined }; if (output["AllocatedStorage"] !== undefined) { - contents.AllocatedStorage = parseInt( - output["AllocatedStorage"]["#text"] !== undefined - ? output["AllocatedStorage"]["#text"] - : output["AllocatedStorage"] - ); + contents.AllocatedStorage = parseInt(output["AllocatedStorage"]); } if (output["AutoMinorVersionUpgrade"] !== undefined) { contents.AutoMinorVersionUpgrade = - (output["AutoMinorVersionUpgrade"]["#text"] !== undefined - ? output["AutoMinorVersionUpgrade"]["#text"] - : output["AutoMinorVersionUpgrade"]) == "true"; + output["AutoMinorVersionUpgrade"] == "true"; } if (output["AvailabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["AvailabilityZone"]["#text"] !== undefined - ? output["AvailabilityZone"]["#text"] - : output["AvailabilityZone"]; + contents.AvailabilityZone = output["AvailabilityZone"]; } if (output["BackupRetentionPeriod"] !== undefined) { - contents.BackupRetentionPeriod = parseInt( - output["BackupRetentionPeriod"]["#text"] !== undefined - ? output["BackupRetentionPeriod"]["#text"] - : output["BackupRetentionPeriod"] - ); + contents.BackupRetentionPeriod = parseInt(output["BackupRetentionPeriod"]); } if (output["CACertificateIdentifier"] !== undefined) { - contents.CACertificateIdentifier = - output["CACertificateIdentifier"]["#text"] !== undefined - ? output["CACertificateIdentifier"]["#text"] - : output["CACertificateIdentifier"]; + contents.CACertificateIdentifier = output["CACertificateIdentifier"]; } if (output["CharacterSetName"] !== undefined) { - contents.CharacterSetName = - output["CharacterSetName"]["#text"] !== undefined - ? output["CharacterSetName"]["#text"] - : output["CharacterSetName"]; + contents.CharacterSetName = output["CharacterSetName"]; } if (output["CopyTagsToSnapshot"] !== undefined) { - contents.CopyTagsToSnapshot = - (output["CopyTagsToSnapshot"]["#text"] !== undefined - ? output["CopyTagsToSnapshot"]["#text"] - : output["CopyTagsToSnapshot"]) == "true"; + contents.CopyTagsToSnapshot = output["CopyTagsToSnapshot"] == "true"; } if (output["DBClusterIdentifier"] !== undefined) { - contents.DBClusterIdentifier = - output["DBClusterIdentifier"]["#text"] !== undefined - ? output["DBClusterIdentifier"]["#text"] - : output["DBClusterIdentifier"]; + contents.DBClusterIdentifier = output["DBClusterIdentifier"]; } if (output["DBInstanceArn"] !== undefined) { - contents.DBInstanceArn = - output["DBInstanceArn"]["#text"] !== undefined - ? output["DBInstanceArn"]["#text"] - : output["DBInstanceArn"]; + contents.DBInstanceArn = output["DBInstanceArn"]; } if (output["DBInstanceClass"] !== undefined) { - contents.DBInstanceClass = - output["DBInstanceClass"]["#text"] !== undefined - ? output["DBInstanceClass"]["#text"] - : output["DBInstanceClass"]; + contents.DBInstanceClass = output["DBInstanceClass"]; } if (output["DBInstanceIdentifier"] !== undefined) { - contents.DBInstanceIdentifier = - output["DBInstanceIdentifier"]["#text"] !== undefined - ? output["DBInstanceIdentifier"]["#text"] - : output["DBInstanceIdentifier"]; + contents.DBInstanceIdentifier = output["DBInstanceIdentifier"]; } if (output["DBInstanceStatus"] !== undefined) { - contents.DBInstanceStatus = - output["DBInstanceStatus"]["#text"] !== undefined - ? output["DBInstanceStatus"]["#text"] - : output["DBInstanceStatus"]; + contents.DBInstanceStatus = output["DBInstanceStatus"]; } if (output["DBName"] !== undefined) { - contents.DBName = - output["DBName"]["#text"] !== undefined - ? output["DBName"]["#text"] - : output["DBName"]; + contents.DBName = output["DBName"]; } if (output.DBParameterGroups === "") { contents.DBParameterGroups = []; @@ -12329,23 +11889,13 @@ const deserializeAws_queryDBInstance = ( ); } if (output["DbInstancePort"] !== undefined) { - contents.DbInstancePort = parseInt( - output["DbInstancePort"]["#text"] !== undefined - ? output["DbInstancePort"]["#text"] - : output["DbInstancePort"] - ); + contents.DbInstancePort = parseInt(output["DbInstancePort"]); } if (output["DbiResourceId"] !== undefined) { - contents.DbiResourceId = - output["DbiResourceId"]["#text"] !== undefined - ? output["DbiResourceId"]["#text"] - : output["DbiResourceId"]; + contents.DbiResourceId = output["DbiResourceId"]; } if (output["DeletionProtection"] !== undefined) { - contents.DeletionProtection = - (output["DeletionProtection"]["#text"] !== undefined - ? output["DeletionProtection"]["#text"] - : output["DeletionProtection"]) == "true"; + contents.DeletionProtection = output["DeletionProtection"] == "true"; } if (output.DomainMemberships === "") { contents.DomainMemberships = []; @@ -12378,78 +11928,45 @@ const deserializeAws_queryDBInstance = ( ); } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["EnhancedMonitoringResourceArn"] !== undefined) { contents.EnhancedMonitoringResourceArn = - output["EnhancedMonitoringResourceArn"]["#text"] !== undefined - ? output["EnhancedMonitoringResourceArn"]["#text"] - : output["EnhancedMonitoringResourceArn"]; + output["EnhancedMonitoringResourceArn"]; } if (output["IAMDatabaseAuthenticationEnabled"] !== undefined) { contents.IAMDatabaseAuthenticationEnabled = - (output["IAMDatabaseAuthenticationEnabled"]["#text"] !== undefined - ? output["IAMDatabaseAuthenticationEnabled"]["#text"] - : output["IAMDatabaseAuthenticationEnabled"]) == "true"; + output["IAMDatabaseAuthenticationEnabled"] == "true"; } if (output["InstanceCreateTime"] !== undefined) { contents.InstanceCreateTime = new Date(output["InstanceCreateTime"]); } if (output["Iops"] !== undefined) { - contents.Iops = parseInt( - output["Iops"]["#text"] !== undefined - ? output["Iops"]["#text"] - : output["Iops"] - ); + contents.Iops = parseInt(output["Iops"]); } if (output["KmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["KmsKeyId"]["#text"] !== undefined - ? output["KmsKeyId"]["#text"] - : output["KmsKeyId"]; + contents.KmsKeyId = output["KmsKeyId"]; } if (output["LatestRestorableTime"] !== undefined) { contents.LatestRestorableTime = new Date(output["LatestRestorableTime"]); } if (output["LicenseModel"] !== undefined) { - contents.LicenseModel = - output["LicenseModel"]["#text"] !== undefined - ? output["LicenseModel"]["#text"] - : output["LicenseModel"]; + contents.LicenseModel = output["LicenseModel"]; } if (output["MasterUsername"] !== undefined) { - contents.MasterUsername = - output["MasterUsername"]["#text"] !== undefined - ? output["MasterUsername"]["#text"] - : output["MasterUsername"]; + contents.MasterUsername = output["MasterUsername"]; } if (output["MonitoringInterval"] !== undefined) { - contents.MonitoringInterval = parseInt( - output["MonitoringInterval"]["#text"] !== undefined - ? output["MonitoringInterval"]["#text"] - : output["MonitoringInterval"] - ); + contents.MonitoringInterval = parseInt(output["MonitoringInterval"]); } if (output["MonitoringRoleArn"] !== undefined) { - contents.MonitoringRoleArn = - output["MonitoringRoleArn"]["#text"] !== undefined - ? output["MonitoringRoleArn"]["#text"] - : output["MonitoringRoleArn"]; + contents.MonitoringRoleArn = output["MonitoringRoleArn"]; } if (output["MultiAZ"] !== undefined) { - contents.MultiAZ = - (output["MultiAZ"]["#text"] !== undefined - ? output["MultiAZ"]["#text"] - : output["MultiAZ"]) == "true"; + contents.MultiAZ = output["MultiAZ"] == "true"; } if (output.OptionGroupMemberships === "") { contents.OptionGroupMemberships = []; @@ -12473,40 +11990,23 @@ const deserializeAws_queryDBInstance = ( } if (output["PerformanceInsightsEnabled"] !== undefined) { contents.PerformanceInsightsEnabled = - (output["PerformanceInsightsEnabled"]["#text"] !== undefined - ? output["PerformanceInsightsEnabled"]["#text"] - : output["PerformanceInsightsEnabled"]) == "true"; + output["PerformanceInsightsEnabled"] == "true"; } if (output["PerformanceInsightsKMSKeyId"] !== undefined) { contents.PerformanceInsightsKMSKeyId = - output["PerformanceInsightsKMSKeyId"]["#text"] !== undefined - ? output["PerformanceInsightsKMSKeyId"]["#text"] - : output["PerformanceInsightsKMSKeyId"]; + output["PerformanceInsightsKMSKeyId"]; } if (output["PreferredBackupWindow"] !== undefined) { - contents.PreferredBackupWindow = - output["PreferredBackupWindow"]["#text"] !== undefined - ? output["PreferredBackupWindow"]["#text"] - : output["PreferredBackupWindow"]; + contents.PreferredBackupWindow = output["PreferredBackupWindow"]; } if (output["PreferredMaintenanceWindow"] !== undefined) { - contents.PreferredMaintenanceWindow = - output["PreferredMaintenanceWindow"]["#text"] !== undefined - ? output["PreferredMaintenanceWindow"]["#text"] - : output["PreferredMaintenanceWindow"]; + contents.PreferredMaintenanceWindow = output["PreferredMaintenanceWindow"]; } if (output["PromotionTier"] !== undefined) { - contents.PromotionTier = parseInt( - output["PromotionTier"]["#text"] !== undefined - ? output["PromotionTier"]["#text"] - : output["PromotionTier"] - ); + contents.PromotionTier = parseInt(output["PromotionTier"]); } if (output["PubliclyAccessible"] !== undefined) { - contents.PubliclyAccessible = - (output["PubliclyAccessible"]["#text"] !== undefined - ? output["PubliclyAccessible"]["#text"] - : output["PubliclyAccessible"]) == "true"; + contents.PubliclyAccessible = output["PubliclyAccessible"] == "true"; } if (output.ReadReplicaDBClusterIdentifiers === "") { contents.ReadReplicaDBClusterIdentifiers = []; @@ -12546,15 +12046,10 @@ const deserializeAws_queryDBInstance = ( } if (output["ReadReplicaSourceDBInstanceIdentifier"] !== undefined) { contents.ReadReplicaSourceDBInstanceIdentifier = - output["ReadReplicaSourceDBInstanceIdentifier"]["#text"] !== undefined - ? output["ReadReplicaSourceDBInstanceIdentifier"]["#text"] - : output["ReadReplicaSourceDBInstanceIdentifier"]; + output["ReadReplicaSourceDBInstanceIdentifier"]; } if (output["SecondaryAvailabilityZone"] !== undefined) { - contents.SecondaryAvailabilityZone = - output["SecondaryAvailabilityZone"]["#text"] !== undefined - ? output["SecondaryAvailabilityZone"]["#text"] - : output["SecondaryAvailabilityZone"]; + contents.SecondaryAvailabilityZone = output["SecondaryAvailabilityZone"]; } if (output.StatusInfos === "") { contents.StatusInfos = []; @@ -12569,28 +12064,16 @@ const deserializeAws_queryDBInstance = ( ); } if (output["StorageEncrypted"] !== undefined) { - contents.StorageEncrypted = - (output["StorageEncrypted"]["#text"] !== undefined - ? output["StorageEncrypted"]["#text"] - : output["StorageEncrypted"]) == "true"; + contents.StorageEncrypted = output["StorageEncrypted"] == "true"; } if (output["StorageType"] !== undefined) { - contents.StorageType = - output["StorageType"]["#text"] !== undefined - ? output["StorageType"]["#text"] - : output["StorageType"]; + contents.StorageType = output["StorageType"]; } if (output["TdeCredentialArn"] !== undefined) { - contents.TdeCredentialArn = - output["TdeCredentialArn"]["#text"] !== undefined - ? output["TdeCredentialArn"]["#text"] - : output["TdeCredentialArn"]; + contents.TdeCredentialArn = output["TdeCredentialArn"]; } if (output["Timezone"] !== undefined) { - contents.Timezone = - output["Timezone"]["#text"] !== undefined - ? output["Timezone"]["#text"] - : output["Timezone"]; + contents.Timezone = output["Timezone"]; } if (output.VpcSecurityGroups === "") { contents.VpcSecurityGroups = []; @@ -12640,10 +12123,7 @@ const deserializeAws_queryDBInstanceMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -12660,28 +12140,16 @@ const deserializeAws_queryDBInstanceStatusInfo = ( StatusType: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } if (output["Normal"] !== undefined) { - contents.Normal = - (output["Normal"]["#text"] !== undefined - ? output["Normal"]["#text"] - : output["Normal"]) == "true"; + contents.Normal = output["Normal"] == "true"; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["StatusType"] !== undefined) { - contents.StatusType = - output["StatusType"]["#text"] !== undefined - ? output["StatusType"]["#text"] - : output["StatusType"]; + contents.StatusType = output["StatusType"]; } return contents; }; @@ -12707,28 +12175,16 @@ const deserializeAws_queryDBParameterGroup = ( Description: undefined }; if (output["DBParameterGroupArn"] !== undefined) { - contents.DBParameterGroupArn = - output["DBParameterGroupArn"]["#text"] !== undefined - ? output["DBParameterGroupArn"]["#text"] - : output["DBParameterGroupArn"]; + contents.DBParameterGroupArn = output["DBParameterGroupArn"]; } if (output["DBParameterGroupFamily"] !== undefined) { - contents.DBParameterGroupFamily = - output["DBParameterGroupFamily"]["#text"] !== undefined - ? output["DBParameterGroupFamily"]["#text"] - : output["DBParameterGroupFamily"]; + contents.DBParameterGroupFamily = output["DBParameterGroupFamily"]; } if (output["DBParameterGroupName"] !== undefined) { - contents.DBParameterGroupName = - output["DBParameterGroupName"]["#text"] !== undefined - ? output["DBParameterGroupName"]["#text"] - : output["DBParameterGroupName"]; + contents.DBParameterGroupName = output["DBParameterGroupName"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } return contents; }; @@ -12743,10 +12199,7 @@ const deserializeAws_queryDBParameterGroupDetails = ( Parameters: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Parameters === "") { contents.Parameters = []; @@ -12781,10 +12234,7 @@ const deserializeAws_queryDBParameterGroupNameMessage = ( DBParameterGroupName: undefined }; if (output["DBParameterGroupName"] !== undefined) { - contents.DBParameterGroupName = - output["DBParameterGroupName"]["#text"] !== undefined - ? output["DBParameterGroupName"]["#text"] - : output["DBParameterGroupName"]; + contents.DBParameterGroupName = output["DBParameterGroupName"]; } return contents; }; @@ -12799,16 +12249,10 @@ const deserializeAws_queryDBParameterGroupStatus = ( ParameterApplyStatus: undefined }; if (output["DBParameterGroupName"] !== undefined) { - contents.DBParameterGroupName = - output["DBParameterGroupName"]["#text"] !== undefined - ? output["DBParameterGroupName"]["#text"] - : output["DBParameterGroupName"]; + contents.DBParameterGroupName = output["DBParameterGroupName"]; } if (output["ParameterApplyStatus"] !== undefined) { - contents.ParameterApplyStatus = - output["ParameterApplyStatus"]["#text"] !== undefined - ? output["ParameterApplyStatus"]["#text"] - : output["ParameterApplyStatus"]; + contents.ParameterApplyStatus = output["ParameterApplyStatus"]; } return contents; }; @@ -12844,10 +12288,7 @@ const deserializeAws_queryDBParameterGroupsMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -12862,16 +12303,10 @@ const deserializeAws_queryDBSecurityGroupMembership = ( Status: undefined }; if (output["DBSecurityGroupName"] !== undefined) { - contents.DBSecurityGroupName = - output["DBSecurityGroupName"]["#text"] !== undefined - ? output["DBSecurityGroupName"]["#text"] - : output["DBSecurityGroupName"]; + contents.DBSecurityGroupName = output["DBSecurityGroupName"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -12899,28 +12334,16 @@ const deserializeAws_queryDBSubnetGroup = ( VpcId: undefined }; if (output["DBSubnetGroupArn"] !== undefined) { - contents.DBSubnetGroupArn = - output["DBSubnetGroupArn"]["#text"] !== undefined - ? output["DBSubnetGroupArn"]["#text"] - : output["DBSubnetGroupArn"]; + contents.DBSubnetGroupArn = output["DBSubnetGroupArn"]; } if (output["DBSubnetGroupDescription"] !== undefined) { - contents.DBSubnetGroupDescription = - output["DBSubnetGroupDescription"]["#text"] !== undefined - ? output["DBSubnetGroupDescription"]["#text"] - : output["DBSubnetGroupDescription"]; + contents.DBSubnetGroupDescription = output["DBSubnetGroupDescription"]; } if (output["DBSubnetGroupName"] !== undefined) { - contents.DBSubnetGroupName = - output["DBSubnetGroupName"]["#text"] !== undefined - ? output["DBSubnetGroupName"]["#text"] - : output["DBSubnetGroupName"]; + contents.DBSubnetGroupName = output["DBSubnetGroupName"]; } if (output["SubnetGroupStatus"] !== undefined) { - contents.SubnetGroupStatus = - output["SubnetGroupStatus"]["#text"] !== undefined - ? output["SubnetGroupStatus"]["#text"] - : output["SubnetGroupStatus"]; + contents.SubnetGroupStatus = output["SubnetGroupStatus"]; } if (output.Subnets === "") { contents.Subnets = []; @@ -12935,10 +12358,7 @@ const deserializeAws_queryDBSubnetGroup = ( ); } if (output["VpcId"] !== undefined) { - contents.VpcId = - output["VpcId"]["#text"] !== undefined - ? output["VpcId"]["#text"] - : output["VpcId"]; + contents.VpcId = output["VpcId"]; } return contents; }; @@ -12965,10 +12385,7 @@ const deserializeAws_queryDBSubnetGroupMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -13130,28 +12547,16 @@ const deserializeAws_queryDomainMembership = ( Status: undefined }; if (output["Domain"] !== undefined) { - contents.Domain = - output["Domain"]["#text"] !== undefined - ? output["Domain"]["#text"] - : output["Domain"]; + contents.Domain = output["Domain"]; } if (output["FQDN"] !== undefined) { - contents.FQDN = - output["FQDN"]["#text"] !== undefined - ? output["FQDN"]["#text"] - : output["FQDN"]; + contents.FQDN = output["FQDN"]; } if (output["IAMRoleName"] !== undefined) { - contents.IAMRoleName = - output["IAMRoleName"]["#text"] !== undefined - ? output["IAMRoleName"]["#text"] - : output["IAMRoleName"]; + contents.IAMRoleName = output["IAMRoleName"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -13175,16 +12580,10 @@ const deserializeAws_queryDoubleRange = ( To: undefined }; if (output["From"] !== undefined) { - contents.From = parseFloat( - output["From"]["#text"] !== undefined - ? output["From"]["#text"] - : output["From"] - ); + contents.From = parseFloat(output["From"]); } if (output["To"] !== undefined) { - contents.To = parseFloat( - output["To"]["#text"] !== undefined ? output["To"]["#text"] : output["To"] - ); + contents.To = parseFloat(output["To"]); } return contents; }; @@ -13209,23 +12608,13 @@ const deserializeAws_queryEndpoint = ( Port: undefined }; if (output["Address"] !== undefined) { - contents.Address = - output["Address"]["#text"] !== undefined - ? output["Address"]["#text"] - : output["Address"]; + contents.Address = output["Address"]; } if (output["HostedZoneId"] !== undefined) { - contents.HostedZoneId = - output["HostedZoneId"]["#text"] !== undefined - ? output["HostedZoneId"]["#text"] - : output["HostedZoneId"]; + contents.HostedZoneId = output["HostedZoneId"]; } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } return contents; }; @@ -13241,16 +12630,10 @@ const deserializeAws_queryEngineDefaults = ( Parameters: undefined }; if (output["DBParameterGroupFamily"] !== undefined) { - contents.DBParameterGroupFamily = - output["DBParameterGroupFamily"]["#text"] !== undefined - ? output["DBParameterGroupFamily"]["#text"] - : output["DBParameterGroupFamily"]; + contents.DBParameterGroupFamily = output["DBParameterGroupFamily"]; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Parameters === "") { contents.Parameters = []; @@ -13296,28 +12679,16 @@ const deserializeAws_queryEvent = ( ); } if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } if (output["SourceArn"] !== undefined) { - contents.SourceArn = - output["SourceArn"]["#text"] !== undefined - ? output["SourceArn"]["#text"] - : output["SourceArn"]; + contents.SourceArn = output["SourceArn"]; } if (output["SourceIdentifier"] !== undefined) { - contents.SourceIdentifier = - output["SourceIdentifier"]["#text"] !== undefined - ? output["SourceIdentifier"]["#text"] - : output["SourceIdentifier"]; + contents.SourceIdentifier = output["SourceIdentifier"]; } if (output["SourceType"] !== undefined) { - contents.SourceType = - output["SourceType"]["#text"] !== undefined - ? output["SourceType"]["#text"] - : output["SourceType"]; + contents.SourceType = output["SourceType"]; } return contents; }; @@ -13326,9 +12697,7 @@ const deserializeAws_queryEventCategoriesList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryEventCategoriesMap = ( @@ -13353,10 +12722,7 @@ const deserializeAws_queryEventCategoriesMap = ( ); } if (output["SourceType"] !== undefined) { - contents.SourceType = - output["SourceType"]["#text"] !== undefined - ? output["SourceType"]["#text"] - : output["SourceType"]; + contents.SourceType = output["SourceType"]; } return contents; }; @@ -13422,22 +12788,13 @@ const deserializeAws_queryEventSubscription = ( SubscriptionCreationTime: undefined }; if (output["CustSubscriptionId"] !== undefined) { - contents.CustSubscriptionId = - output["CustSubscriptionId"]["#text"] !== undefined - ? output["CustSubscriptionId"]["#text"] - : output["CustSubscriptionId"]; + contents.CustSubscriptionId = output["CustSubscriptionId"]; } if (output["CustomerAwsId"] !== undefined) { - contents.CustomerAwsId = - output["CustomerAwsId"]["#text"] !== undefined - ? output["CustomerAwsId"]["#text"] - : output["CustomerAwsId"]; + contents.CustomerAwsId = output["CustomerAwsId"]; } if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } if (output.EventCategoriesList === "") { contents.EventCategoriesList = []; @@ -13452,16 +12809,10 @@ const deserializeAws_queryEventSubscription = ( ); } if (output["EventSubscriptionArn"] !== undefined) { - contents.EventSubscriptionArn = - output["EventSubscriptionArn"]["#text"] !== undefined - ? output["EventSubscriptionArn"]["#text"] - : output["EventSubscriptionArn"]; + contents.EventSubscriptionArn = output["EventSubscriptionArn"]; } if (output["SnsTopicArn"] !== undefined) { - contents.SnsTopicArn = - output["SnsTopicArn"]["#text"] !== undefined - ? output["SnsTopicArn"]["#text"] - : output["SnsTopicArn"]; + contents.SnsTopicArn = output["SnsTopicArn"]; } if (output.SourceIdsList === "") { contents.SourceIdsList = []; @@ -13476,22 +12827,13 @@ const deserializeAws_queryEventSubscription = ( ); } if (output["SourceType"] !== undefined) { - contents.SourceType = - output["SourceType"]["#text"] !== undefined - ? output["SourceType"]["#text"] - : output["SourceType"]; + contents.SourceType = output["SourceType"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["SubscriptionCreationTime"] !== undefined) { - contents.SubscriptionCreationTime = - output["SubscriptionCreationTime"]["#text"] !== undefined - ? output["SubscriptionCreationTime"]["#text"] - : output["SubscriptionCreationTime"]; + contents.SubscriptionCreationTime = output["SubscriptionCreationTime"]; } return contents; }; @@ -13529,10 +12871,7 @@ const deserializeAws_queryEventSubscriptionsMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -13559,10 +12898,7 @@ const deserializeAws_queryEventsMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -13588,9 +12924,7 @@ const deserializeAws_queryLogTypeList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryModifyDBClusterResult = ( @@ -13688,16 +13022,10 @@ const deserializeAws_queryOptionGroupMembership = ( Status: undefined }; if (output["OptionGroupName"] !== undefined) { - contents.OptionGroupName = - output["OptionGroupName"]["#text"] !== undefined - ? output["OptionGroupName"]["#text"] - : output["OptionGroupName"]; + contents.OptionGroupName = output["OptionGroupName"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -13751,124 +13079,65 @@ const deserializeAws_queryOrderableDBInstanceOption = ( ); } if (output["DBInstanceClass"] !== undefined) { - contents.DBInstanceClass = - output["DBInstanceClass"]["#text"] !== undefined - ? output["DBInstanceClass"]["#text"] - : output["DBInstanceClass"]; + contents.DBInstanceClass = output["DBInstanceClass"]; } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["LicenseModel"] !== undefined) { - contents.LicenseModel = - output["LicenseModel"]["#text"] !== undefined - ? output["LicenseModel"]["#text"] - : output["LicenseModel"]; + contents.LicenseModel = output["LicenseModel"]; } if (output["MaxIopsPerDbInstance"] !== undefined) { - contents.MaxIopsPerDbInstance = parseInt( - output["MaxIopsPerDbInstance"]["#text"] !== undefined - ? output["MaxIopsPerDbInstance"]["#text"] - : output["MaxIopsPerDbInstance"] - ); + contents.MaxIopsPerDbInstance = parseInt(output["MaxIopsPerDbInstance"]); } if (output["MaxIopsPerGib"] !== undefined) { - contents.MaxIopsPerGib = parseFloat( - output["MaxIopsPerGib"]["#text"] !== undefined - ? output["MaxIopsPerGib"]["#text"] - : output["MaxIopsPerGib"] - ); + contents.MaxIopsPerGib = parseFloat(output["MaxIopsPerGib"]); } if (output["MaxStorageSize"] !== undefined) { - contents.MaxStorageSize = parseInt( - output["MaxStorageSize"]["#text"] !== undefined - ? output["MaxStorageSize"]["#text"] - : output["MaxStorageSize"] - ); + contents.MaxStorageSize = parseInt(output["MaxStorageSize"]); } if (output["MinIopsPerDbInstance"] !== undefined) { - contents.MinIopsPerDbInstance = parseInt( - output["MinIopsPerDbInstance"]["#text"] !== undefined - ? output["MinIopsPerDbInstance"]["#text"] - : output["MinIopsPerDbInstance"] - ); + contents.MinIopsPerDbInstance = parseInt(output["MinIopsPerDbInstance"]); } if (output["MinIopsPerGib"] !== undefined) { - contents.MinIopsPerGib = parseFloat( - output["MinIopsPerGib"]["#text"] !== undefined - ? output["MinIopsPerGib"]["#text"] - : output["MinIopsPerGib"] - ); + contents.MinIopsPerGib = parseFloat(output["MinIopsPerGib"]); } if (output["MinStorageSize"] !== undefined) { - contents.MinStorageSize = parseInt( - output["MinStorageSize"]["#text"] !== undefined - ? output["MinStorageSize"]["#text"] - : output["MinStorageSize"] - ); + contents.MinStorageSize = parseInt(output["MinStorageSize"]); } if (output["MultiAZCapable"] !== undefined) { - contents.MultiAZCapable = - (output["MultiAZCapable"]["#text"] !== undefined - ? output["MultiAZCapable"]["#text"] - : output["MultiAZCapable"]) == "true"; + contents.MultiAZCapable = output["MultiAZCapable"] == "true"; } if (output["ReadReplicaCapable"] !== undefined) { - contents.ReadReplicaCapable = - (output["ReadReplicaCapable"]["#text"] !== undefined - ? output["ReadReplicaCapable"]["#text"] - : output["ReadReplicaCapable"]) == "true"; + contents.ReadReplicaCapable = output["ReadReplicaCapable"] == "true"; } if (output["StorageType"] !== undefined) { - contents.StorageType = - output["StorageType"]["#text"] !== undefined - ? output["StorageType"]["#text"] - : output["StorageType"]; + contents.StorageType = output["StorageType"]; } if (output["SupportsEnhancedMonitoring"] !== undefined) { contents.SupportsEnhancedMonitoring = - (output["SupportsEnhancedMonitoring"]["#text"] !== undefined - ? output["SupportsEnhancedMonitoring"]["#text"] - : output["SupportsEnhancedMonitoring"]) == "true"; + output["SupportsEnhancedMonitoring"] == "true"; } if (output["SupportsIAMDatabaseAuthentication"] !== undefined) { contents.SupportsIAMDatabaseAuthentication = - (output["SupportsIAMDatabaseAuthentication"]["#text"] !== undefined - ? output["SupportsIAMDatabaseAuthentication"]["#text"] - : output["SupportsIAMDatabaseAuthentication"]) == "true"; + output["SupportsIAMDatabaseAuthentication"] == "true"; } if (output["SupportsIops"] !== undefined) { - contents.SupportsIops = - (output["SupportsIops"]["#text"] !== undefined - ? output["SupportsIops"]["#text"] - : output["SupportsIops"]) == "true"; + contents.SupportsIops = output["SupportsIops"] == "true"; } if (output["SupportsPerformanceInsights"] !== undefined) { contents.SupportsPerformanceInsights = - (output["SupportsPerformanceInsights"]["#text"] !== undefined - ? output["SupportsPerformanceInsights"]["#text"] - : output["SupportsPerformanceInsights"]) == "true"; + output["SupportsPerformanceInsights"] == "true"; } if (output["SupportsStorageEncryption"] !== undefined) { contents.SupportsStorageEncryption = - (output["SupportsStorageEncryption"]["#text"] !== undefined - ? output["SupportsStorageEncryption"]["#text"] - : output["SupportsStorageEncryption"]) == "true"; + output["SupportsStorageEncryption"] == "true"; } if (output["Vpc"] !== undefined) { - contents.Vpc = - (output["Vpc"]["#text"] !== undefined - ? output["Vpc"]["#text"] - : output["Vpc"]) == "true"; + contents.Vpc = output["Vpc"] == "true"; } return contents; }; @@ -13892,10 +13161,7 @@ const deserializeAws_queryOrderableDBInstanceOptionsMessage = ( OrderableDBInstanceOptions: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.OrderableDBInstanceOptions === "") { contents.OrderableDBInstanceOptions = []; @@ -13933,64 +13199,34 @@ const deserializeAws_queryParameter = ( Source: undefined }; if (output["AllowedValues"] !== undefined) { - contents.AllowedValues = - output["AllowedValues"]["#text"] !== undefined - ? output["AllowedValues"]["#text"] - : output["AllowedValues"]; + contents.AllowedValues = output["AllowedValues"]; } if (output["ApplyMethod"] !== undefined) { - contents.ApplyMethod = - output["ApplyMethod"]["#text"] !== undefined - ? output["ApplyMethod"]["#text"] - : output["ApplyMethod"]; + contents.ApplyMethod = output["ApplyMethod"]; } if (output["ApplyType"] !== undefined) { - contents.ApplyType = - output["ApplyType"]["#text"] !== undefined - ? output["ApplyType"]["#text"] - : output["ApplyType"]; + contents.ApplyType = output["ApplyType"]; } if (output["DataType"] !== undefined) { - contents.DataType = - output["DataType"]["#text"] !== undefined - ? output["DataType"]["#text"] - : output["DataType"]; + contents.DataType = output["DataType"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["IsModifiable"] !== undefined) { - contents.IsModifiable = - (output["IsModifiable"]["#text"] !== undefined - ? output["IsModifiable"]["#text"] - : output["IsModifiable"]) == "true"; + contents.IsModifiable = output["IsModifiable"] == "true"; } if (output["MinimumEngineVersion"] !== undefined) { - contents.MinimumEngineVersion = - output["MinimumEngineVersion"]["#text"] !== undefined - ? output["MinimumEngineVersion"]["#text"] - : output["MinimumEngineVersion"]; + contents.MinimumEngineVersion = output["MinimumEngineVersion"]; } if (output["ParameterName"] !== undefined) { - contents.ParameterName = - output["ParameterName"]["#text"] !== undefined - ? output["ParameterName"]["#text"] - : output["ParameterName"]; + contents.ParameterName = output["ParameterName"]; } if (output["ParameterValue"] !== undefined) { - contents.ParameterValue = - output["ParameterValue"]["#text"] !== undefined - ? output["ParameterValue"]["#text"] - : output["ParameterValue"]; + contents.ParameterValue = output["ParameterValue"]; } if (output["Source"] !== undefined) { - contents.Source = - output["Source"]["#text"] !== undefined - ? output["Source"]["#text"] - : output["Source"]; + contents.Source = output["Source"]; } return contents; }; @@ -14054,10 +13290,7 @@ const deserializeAws_queryPendingMaintenanceAction = ( OptInStatus: undefined }; if (output["Action"] !== undefined) { - contents.Action = - output["Action"]["#text"] !== undefined - ? output["Action"]["#text"] - : output["Action"]; + contents.Action = output["Action"]; } if (output["AutoAppliedAfterDate"] !== undefined) { contents.AutoAppliedAfterDate = new Date(output["AutoAppliedAfterDate"]); @@ -14066,19 +13299,13 @@ const deserializeAws_queryPendingMaintenanceAction = ( contents.CurrentApplyDate = new Date(output["CurrentApplyDate"]); } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["ForcedApplyDate"] !== undefined) { contents.ForcedApplyDate = new Date(output["ForcedApplyDate"]); } if (output["OptInStatus"] !== undefined) { - contents.OptInStatus = - output["OptInStatus"]["#text"] !== undefined - ? output["OptInStatus"]["#text"] - : output["OptInStatus"]; + contents.OptInStatus = output["OptInStatus"]; } return contents; }; @@ -14111,10 +13338,7 @@ const deserializeAws_queryPendingMaintenanceActionsMessage = ( PendingMaintenanceActions: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.PendingMaintenanceActions === "") { contents.PendingMaintenanceActions = []; @@ -14156,73 +13380,37 @@ const deserializeAws_queryPendingModifiedValues = ( StorageType: undefined }; if (output["AllocatedStorage"] !== undefined) { - contents.AllocatedStorage = parseInt( - output["AllocatedStorage"]["#text"] !== undefined - ? output["AllocatedStorage"]["#text"] - : output["AllocatedStorage"] - ); + contents.AllocatedStorage = parseInt(output["AllocatedStorage"]); } if (output["BackupRetentionPeriod"] !== undefined) { - contents.BackupRetentionPeriod = parseInt( - output["BackupRetentionPeriod"]["#text"] !== undefined - ? output["BackupRetentionPeriod"]["#text"] - : output["BackupRetentionPeriod"] - ); + contents.BackupRetentionPeriod = parseInt(output["BackupRetentionPeriod"]); } if (output["CACertificateIdentifier"] !== undefined) { - contents.CACertificateIdentifier = - output["CACertificateIdentifier"]["#text"] !== undefined - ? output["CACertificateIdentifier"]["#text"] - : output["CACertificateIdentifier"]; + contents.CACertificateIdentifier = output["CACertificateIdentifier"]; } if (output["DBInstanceClass"] !== undefined) { - contents.DBInstanceClass = - output["DBInstanceClass"]["#text"] !== undefined - ? output["DBInstanceClass"]["#text"] - : output["DBInstanceClass"]; + contents.DBInstanceClass = output["DBInstanceClass"]; } if (output["DBInstanceIdentifier"] !== undefined) { - contents.DBInstanceIdentifier = - output["DBInstanceIdentifier"]["#text"] !== undefined - ? output["DBInstanceIdentifier"]["#text"] - : output["DBInstanceIdentifier"]; + contents.DBInstanceIdentifier = output["DBInstanceIdentifier"]; } if (output["DBSubnetGroupName"] !== undefined) { - contents.DBSubnetGroupName = - output["DBSubnetGroupName"]["#text"] !== undefined - ? output["DBSubnetGroupName"]["#text"] - : output["DBSubnetGroupName"]; + contents.DBSubnetGroupName = output["DBSubnetGroupName"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["Iops"] !== undefined) { - contents.Iops = parseInt( - output["Iops"]["#text"] !== undefined - ? output["Iops"]["#text"] - : output["Iops"] - ); + contents.Iops = parseInt(output["Iops"]); } if (output["LicenseModel"] !== undefined) { - contents.LicenseModel = - output["LicenseModel"]["#text"] !== undefined - ? output["LicenseModel"]["#text"] - : output["LicenseModel"]; + contents.LicenseModel = output["LicenseModel"]; } if (output["MasterUserPassword"] !== undefined) { - contents.MasterUserPassword = - output["MasterUserPassword"]["#text"] !== undefined - ? output["MasterUserPassword"]["#text"] - : output["MasterUserPassword"]; + contents.MasterUserPassword = output["MasterUserPassword"]; } if (output["MultiAZ"] !== undefined) { - contents.MultiAZ = - (output["MultiAZ"]["#text"] !== undefined - ? output["MultiAZ"]["#text"] - : output["MultiAZ"]) == "true"; + contents.MultiAZ = output["MultiAZ"] == "true"; } if (output["PendingCloudwatchLogsExports"] !== undefined) { contents.PendingCloudwatchLogsExports = deserializeAws_queryPendingCloudwatchLogsExports( @@ -14231,17 +13419,10 @@ const deserializeAws_queryPendingModifiedValues = ( ); } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } if (output["StorageType"] !== undefined) { - contents.StorageType = - output["StorageType"]["#text"] !== undefined - ? output["StorageType"]["#text"] - : output["StorageType"]; + contents.StorageType = output["StorageType"]; } return contents; }; @@ -14274,23 +13455,13 @@ const deserializeAws_queryRange = ( To: undefined }; if (output["From"] !== undefined) { - contents.From = parseInt( - output["From"]["#text"] !== undefined - ? output["From"]["#text"] - : output["From"] - ); + contents.From = parseInt(output["From"]); } if (output["Step"] !== undefined) { - contents.Step = parseInt( - output["Step"]["#text"] !== undefined - ? output["Step"]["#text"] - : output["Step"] - ); + contents.Step = parseInt(output["Step"]); } if (output["To"] !== undefined) { - contents.To = parseInt( - output["To"]["#text"] !== undefined ? output["To"]["#text"] : output["To"] - ); + contents.To = parseInt(output["To"]); } return contents; }; @@ -14308,27 +13479,21 @@ const deserializeAws_queryReadReplicaDBClusterIdentifierList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryReadReplicaDBInstanceIdentifierList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryReadReplicaIdentifierList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryRebootDBInstanceResult = ( @@ -14390,10 +13555,7 @@ const deserializeAws_queryResourcePendingMaintenanceActions = ( ); } if (output["ResourceIdentifier"] !== undefined) { - contents.ResourceIdentifier = - output["ResourceIdentifier"]["#text"] !== undefined - ? output["ResourceIdentifier"]["#text"] - : output["ResourceIdentifier"]; + contents.ResourceIdentifier = output["ResourceIdentifier"]; } return contents; }; @@ -14436,9 +13598,7 @@ const deserializeAws_querySourceIdsList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_querySubnet = ( @@ -14458,16 +13618,10 @@ const deserializeAws_querySubnet = ( ); } if (output["SubnetIdentifier"] !== undefined) { - contents.SubnetIdentifier = - output["SubnetIdentifier"]["#text"] !== undefined - ? output["SubnetIdentifier"]["#text"] - : output["SubnetIdentifier"]; + contents.SubnetIdentifier = output["SubnetIdentifier"]; } if (output["SubnetStatus"] !== undefined) { - contents.SubnetStatus = - output["SubnetStatus"]["#text"] !== undefined - ? output["SubnetStatus"]["#text"] - : output["SubnetStatus"]; + contents.SubnetStatus = output["SubnetStatus"]; } return contents; }; @@ -14506,16 +13660,10 @@ const deserializeAws_queryTag = (output: any, context: __SerdeContext): Tag => { Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -14561,10 +13709,7 @@ const deserializeAws_queryTimezone = ( TimezoneName: undefined }; if (output["TimezoneName"] !== undefined) { - contents.TimezoneName = - output["TimezoneName"]["#text"] !== undefined - ? output["TimezoneName"]["#text"] - : output["TimezoneName"]; + contents.TimezoneName = output["TimezoneName"]; } return contents; }; @@ -14582,34 +13727,19 @@ const deserializeAws_queryUpgradeTarget = ( IsMajorVersionUpgrade: undefined }; if (output["AutoUpgrade"] !== undefined) { - contents.AutoUpgrade = - (output["AutoUpgrade"]["#text"] !== undefined - ? output["AutoUpgrade"]["#text"] - : output["AutoUpgrade"]) == "true"; + contents.AutoUpgrade = output["AutoUpgrade"] == "true"; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["IsMajorVersionUpgrade"] !== undefined) { - contents.IsMajorVersionUpgrade = - (output["IsMajorVersionUpgrade"]["#text"] !== undefined - ? output["IsMajorVersionUpgrade"]["#text"] - : output["IsMajorVersionUpgrade"]) == "true"; + contents.IsMajorVersionUpgrade = output["IsMajorVersionUpgrade"] == "true"; } return contents; }; @@ -14685,10 +13815,7 @@ const deserializeAws_queryValidStorageOptions = ( ); } if (output["StorageType"] !== undefined) { - contents.StorageType = - output["StorageType"]["#text"] !== undefined - ? output["StorageType"]["#text"] - : output["StorageType"]; + contents.StorageType = output["StorageType"]; } return contents; }; @@ -14721,16 +13848,10 @@ const deserializeAws_queryVpcSecurityGroupMembership = ( VpcSecurityGroupId: undefined }; if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["VpcSecurityGroupId"] !== undefined) { - contents.VpcSecurityGroupId = - output["VpcSecurityGroupId"]["#text"] !== undefined - ? output["VpcSecurityGroupId"]["#text"] - : output["VpcSecurityGroupId"]; + contents.VpcSecurityGroupId = output["VpcSecurityGroupId"]; } return contents; }; @@ -14819,7 +13940,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/clients/client-rds/protocols/Aws_query.ts b/clients/client-rds/protocols/Aws_query.ts index 6ca704a2ea85..30b899ddf485 100644 --- a/clients/client-rds/protocols/Aws_query.ts +++ b/clients/client-rds/protocols/Aws_query.ts @@ -939,7 +939,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -21647,10 +21648,7 @@ const deserializeAws_queryAuthorizationAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21664,10 +21662,7 @@ const deserializeAws_queryAuthorizationNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21681,10 +21676,7 @@ const deserializeAws_queryAuthorizationQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21698,10 +21690,7 @@ const deserializeAws_queryBackupPolicyNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21715,10 +21704,7 @@ const deserializeAws_queryCertificateNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21732,10 +21718,7 @@ const deserializeAws_queryCustomAvailabilityZoneAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21749,10 +21732,7 @@ const deserializeAws_queryCustomAvailabilityZoneNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21766,10 +21746,7 @@ const deserializeAws_queryCustomAvailabilityZoneQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21783,10 +21760,7 @@ const deserializeAws_queryDBClusterAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21800,10 +21774,7 @@ const deserializeAws_queryDBClusterBacktrackNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21817,10 +21788,7 @@ const deserializeAws_queryDBClusterEndpointAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21834,10 +21802,7 @@ const deserializeAws_queryDBClusterEndpointNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21851,10 +21816,7 @@ const deserializeAws_queryDBClusterEndpointQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21868,10 +21830,7 @@ const deserializeAws_queryDBClusterNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21885,10 +21844,7 @@ const deserializeAws_queryDBClusterParameterGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21902,10 +21858,7 @@ const deserializeAws_queryDBClusterQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21919,10 +21872,7 @@ const deserializeAws_queryDBClusterRoleAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21936,10 +21886,7 @@ const deserializeAws_queryDBClusterRoleNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21953,10 +21900,7 @@ const deserializeAws_queryDBClusterRoleQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21970,10 +21914,7 @@ const deserializeAws_queryDBClusterSnapshotAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -21987,10 +21928,7 @@ const deserializeAws_queryDBClusterSnapshotNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22004,10 +21942,7 @@ const deserializeAws_queryDBInstanceAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22021,10 +21956,7 @@ const deserializeAws_queryDBInstanceAutomatedBackupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22038,10 +21970,7 @@ const deserializeAws_queryDBInstanceAutomatedBackupQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22055,10 +21984,7 @@ const deserializeAws_queryDBInstanceNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22072,10 +21998,7 @@ const deserializeAws_queryDBInstanceRoleAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22089,10 +22012,7 @@ const deserializeAws_queryDBInstanceRoleNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22106,10 +22026,7 @@ const deserializeAws_queryDBInstanceRoleQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22123,10 +22040,7 @@ const deserializeAws_queryDBLogFileNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22140,10 +22054,7 @@ const deserializeAws_queryDBParameterGroupAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22157,10 +22068,7 @@ const deserializeAws_queryDBParameterGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22174,10 +22082,7 @@ const deserializeAws_queryDBParameterGroupQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22191,10 +22096,7 @@ const deserializeAws_queryDBProxyAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22208,10 +22110,7 @@ const deserializeAws_queryDBProxyNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22225,10 +22124,7 @@ const deserializeAws_queryDBProxyQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22242,10 +22138,7 @@ const deserializeAws_queryDBProxyTargetAlreadyRegisteredFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22259,10 +22152,7 @@ const deserializeAws_queryDBProxyTargetGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22276,10 +22166,7 @@ const deserializeAws_queryDBProxyTargetNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22293,10 +22180,7 @@ const deserializeAws_queryDBSecurityGroupAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22310,10 +22194,7 @@ const deserializeAws_queryDBSecurityGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22327,10 +22208,7 @@ const deserializeAws_queryDBSecurityGroupNotSupportedFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22344,10 +22222,7 @@ const deserializeAws_queryDBSecurityGroupQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22361,10 +22236,7 @@ const deserializeAws_queryDBSnapshotAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22378,10 +22250,7 @@ const deserializeAws_queryDBSnapshotNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22395,10 +22264,7 @@ const deserializeAws_queryDBSubnetGroupAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22412,10 +22278,7 @@ const deserializeAws_queryDBSubnetGroupDoesNotCoverEnoughAZs = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22429,10 +22292,7 @@ const deserializeAws_queryDBSubnetGroupNotAllowedFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22446,10 +22306,7 @@ const deserializeAws_queryDBSubnetGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22463,10 +22320,7 @@ const deserializeAws_queryDBSubnetGroupQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22480,10 +22334,7 @@ const deserializeAws_queryDBSubnetQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22497,10 +22348,7 @@ const deserializeAws_queryDBUpgradeDependencyFailureFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22514,10 +22362,7 @@ const deserializeAws_queryDomainNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22531,10 +22376,7 @@ const deserializeAws_queryEventSubscriptionQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22548,10 +22390,7 @@ const deserializeAws_queryGlobalClusterAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22565,10 +22404,7 @@ const deserializeAws_queryGlobalClusterNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22582,10 +22418,7 @@ const deserializeAws_queryGlobalClusterQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22599,10 +22432,7 @@ const deserializeAws_queryInstallationMediaAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22616,10 +22446,7 @@ const deserializeAws_queryInstallationMediaNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22633,10 +22460,7 @@ const deserializeAws_queryInstanceQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22650,10 +22474,7 @@ const deserializeAws_queryInsufficientDBClusterCapacityFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22667,10 +22488,7 @@ const deserializeAws_queryInsufficientDBInstanceCapacityFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22684,10 +22502,7 @@ const deserializeAws_queryInsufficientStorageClusterCapacityFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22701,10 +22516,7 @@ const deserializeAws_queryInvalidDBClusterCapacityFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22718,10 +22530,7 @@ const deserializeAws_queryInvalidDBClusterEndpointStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22735,10 +22544,7 @@ const deserializeAws_queryInvalidDBClusterSnapshotStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22752,10 +22558,7 @@ const deserializeAws_queryInvalidDBClusterStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22769,10 +22572,7 @@ const deserializeAws_queryInvalidDBInstanceAutomatedBackupStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22786,10 +22586,7 @@ const deserializeAws_queryInvalidDBInstanceStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22803,10 +22600,7 @@ const deserializeAws_queryInvalidDBParameterGroupStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22820,10 +22614,7 @@ const deserializeAws_queryInvalidDBProxyStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22837,10 +22628,7 @@ const deserializeAws_queryInvalidDBSecurityGroupStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22854,10 +22642,7 @@ const deserializeAws_queryInvalidDBSnapshotStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22871,10 +22656,7 @@ const deserializeAws_queryInvalidDBSubnetGroupFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22888,10 +22670,7 @@ const deserializeAws_queryInvalidDBSubnetGroupStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22905,10 +22684,7 @@ const deserializeAws_queryInvalidDBSubnetStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22922,10 +22698,7 @@ const deserializeAws_queryInvalidEventSubscriptionStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22939,10 +22712,7 @@ const deserializeAws_queryInvalidGlobalClusterStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22956,10 +22726,7 @@ const deserializeAws_queryInvalidOptionGroupStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22973,10 +22740,7 @@ const deserializeAws_queryInvalidRestoreFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -22990,10 +22754,7 @@ const deserializeAws_queryInvalidS3BucketFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23007,10 +22768,7 @@ const deserializeAws_queryInvalidSubnet = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23024,10 +22782,7 @@ const deserializeAws_queryInvalidVPCNetworkStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23041,10 +22796,7 @@ const deserializeAws_queryKMSKeyNotAccessibleFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23058,10 +22810,7 @@ const deserializeAws_queryOptionGroupAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23075,10 +22824,7 @@ const deserializeAws_queryOptionGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23092,10 +22838,7 @@ const deserializeAws_queryOptionGroupQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23109,10 +22852,7 @@ const deserializeAws_queryPointInTimeRestoreNotEnabledFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23126,10 +22866,7 @@ const deserializeAws_queryProvisionedIopsNotAvailableInAZFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23143,10 +22880,7 @@ const deserializeAws_queryReservedDBInstanceAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23160,10 +22894,7 @@ const deserializeAws_queryReservedDBInstanceNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23177,10 +22908,7 @@ const deserializeAws_queryReservedDBInstanceQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23194,10 +22922,7 @@ const deserializeAws_queryReservedDBInstancesOfferingNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23211,10 +22936,7 @@ const deserializeAws_queryResourceNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23228,10 +22950,7 @@ const deserializeAws_querySNSInvalidTopicFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23245,10 +22964,7 @@ const deserializeAws_querySNSNoAuthorizationFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23262,10 +22978,7 @@ const deserializeAws_querySNSTopicArnNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23279,10 +22992,7 @@ const deserializeAws_querySharedSnapshotQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23296,10 +23006,7 @@ const deserializeAws_querySnapshotQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23313,10 +23020,7 @@ const deserializeAws_querySourceNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23330,10 +23034,7 @@ const deserializeAws_queryStorageQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23347,10 +23048,7 @@ const deserializeAws_queryStorageTypeNotSupportedFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23364,10 +23062,7 @@ const deserializeAws_querySubnetAlreadyInUse = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23381,10 +23076,7 @@ const deserializeAws_querySubscriptionAlreadyExistFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23398,10 +23090,7 @@ const deserializeAws_querySubscriptionCategoryNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23415,10 +23104,7 @@ const deserializeAws_querySubscriptionNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -23457,24 +23143,13 @@ const deserializeAws_queryAccountQuota = ( Used: undefined }; if (output["AccountQuotaName"] !== undefined) { - contents.AccountQuotaName = - output["AccountQuotaName"]["#text"] !== undefined - ? output["AccountQuotaName"]["#text"] - : output["AccountQuotaName"]; + contents.AccountQuotaName = output["AccountQuotaName"]; } if (output["Max"] !== undefined) { - contents.Max = parseInt( - output["Max"]["#text"] !== undefined - ? output["Max"]["#text"] - : output["Max"] - ); + contents.Max = parseInt(output["Max"]); } if (output["Used"] !== undefined) { - contents.Used = parseInt( - output["Used"]["#text"] !== undefined - ? output["Used"]["#text"] - : output["Used"] - ); + contents.Used = parseInt(output["Used"]); } return contents; }; @@ -23526,9 +23201,7 @@ const deserializeAws_queryAttributeValueList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryAuthorizeDBSecurityGroupIngressResult = ( @@ -23557,10 +23230,7 @@ const deserializeAws_queryAvailabilityZone = ( Name: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } return contents; }; @@ -23578,9 +23248,7 @@ const deserializeAws_queryAvailabilityZones = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryAvailableProcessorFeature = ( @@ -23594,22 +23262,13 @@ const deserializeAws_queryAvailableProcessorFeature = ( Name: undefined }; if (output["AllowedValues"] !== undefined) { - contents.AllowedValues = - output["AllowedValues"]["#text"] !== undefined - ? output["AllowedValues"]["#text"] - : output["AllowedValues"]; + contents.AllowedValues = output["AllowedValues"]; } if (output["DefaultValue"] !== undefined) { - contents.DefaultValue = - output["DefaultValue"]["#text"] !== undefined - ? output["DefaultValue"]["#text"] - : output["DefaultValue"]; + contents.DefaultValue = output["DefaultValue"]; } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } return contents; }; @@ -23639,28 +23298,16 @@ const deserializeAws_queryCertificate = ( ValidTill: undefined }; if (output["CertificateArn"] !== undefined) { - contents.CertificateArn = - output["CertificateArn"]["#text"] !== undefined - ? output["CertificateArn"]["#text"] - : output["CertificateArn"]; + contents.CertificateArn = output["CertificateArn"]; } if (output["CertificateIdentifier"] !== undefined) { - contents.CertificateIdentifier = - output["CertificateIdentifier"]["#text"] !== undefined - ? output["CertificateIdentifier"]["#text"] - : output["CertificateIdentifier"]; + contents.CertificateIdentifier = output["CertificateIdentifier"]; } if (output["CertificateType"] !== undefined) { - contents.CertificateType = - output["CertificateType"]["#text"] !== undefined - ? output["CertificateType"]["#text"] - : output["CertificateType"]; + contents.CertificateType = output["CertificateType"]; } if (output["CustomerOverride"] !== undefined) { - contents.CustomerOverride = - (output["CustomerOverride"]["#text"] !== undefined - ? output["CustomerOverride"]["#text"] - : output["CustomerOverride"]) == "true"; + contents.CustomerOverride = output["CustomerOverride"] == "true"; } if (output["CustomerOverrideValidTill"] !== undefined) { contents.CustomerOverrideValidTill = new Date( @@ -23668,10 +23315,7 @@ const deserializeAws_queryCertificate = ( ); } if (output["Thumbprint"] !== undefined) { - contents.Thumbprint = - output["Thumbprint"]["#text"] !== undefined - ? output["Thumbprint"]["#text"] - : output["Thumbprint"]; + contents.Thumbprint = output["Thumbprint"]; } if (output["ValidFrom"] !== undefined) { contents.ValidFrom = new Date(output["ValidFrom"]); @@ -23713,10 +23357,7 @@ const deserializeAws_queryCertificateMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -23731,16 +23372,10 @@ const deserializeAws_queryCharacterSet = ( CharacterSetName: undefined }; if (output["CharacterSetDescription"] !== undefined) { - contents.CharacterSetDescription = - output["CharacterSetDescription"]["#text"] !== undefined - ? output["CharacterSetDescription"]["#text"] - : output["CharacterSetDescription"]; + contents.CharacterSetDescription = output["CharacterSetDescription"]; } if (output["CharacterSetName"] !== undefined) { - contents.CharacterSetName = - output["CharacterSetName"]["#text"] !== undefined - ? output["CharacterSetName"]["#text"] - : output["CharacterSetName"]; + contents.CharacterSetName = output["CharacterSetName"]; } return contents; }; @@ -23759,29 +23394,18 @@ const deserializeAws_queryConnectionPoolConfigurationInfo = ( }; if (output["ConnectionBorrowTimeout"] !== undefined) { contents.ConnectionBorrowTimeout = parseInt( - output["ConnectionBorrowTimeout"]["#text"] !== undefined - ? output["ConnectionBorrowTimeout"]["#text"] - : output["ConnectionBorrowTimeout"] + output["ConnectionBorrowTimeout"] ); } if (output["InitQuery"] !== undefined) { - contents.InitQuery = - output["InitQuery"]["#text"] !== undefined - ? output["InitQuery"]["#text"] - : output["InitQuery"]; + contents.InitQuery = output["InitQuery"]; } if (output["MaxConnectionsPercent"] !== undefined) { - contents.MaxConnectionsPercent = parseInt( - output["MaxConnectionsPercent"]["#text"] !== undefined - ? output["MaxConnectionsPercent"]["#text"] - : output["MaxConnectionsPercent"] - ); + contents.MaxConnectionsPercent = parseInt(output["MaxConnectionsPercent"]); } if (output["MaxIdleConnectionsPercent"] !== undefined) { contents.MaxIdleConnectionsPercent = parseInt( - output["MaxIdleConnectionsPercent"]["#text"] !== undefined - ? output["MaxIdleConnectionsPercent"]["#text"] - : output["MaxIdleConnectionsPercent"] + output["MaxIdleConnectionsPercent"] ); } if (output.SessionPinningFilters === "") { @@ -24131,22 +23755,14 @@ const deserializeAws_queryCustomAvailabilityZone = ( VpnDetails: undefined }; if (output["CustomAvailabilityZoneId"] !== undefined) { - contents.CustomAvailabilityZoneId = - output["CustomAvailabilityZoneId"]["#text"] !== undefined - ? output["CustomAvailabilityZoneId"]["#text"] - : output["CustomAvailabilityZoneId"]; + contents.CustomAvailabilityZoneId = output["CustomAvailabilityZoneId"]; } if (output["CustomAvailabilityZoneName"] !== undefined) { - contents.CustomAvailabilityZoneName = - output["CustomAvailabilityZoneName"]["#text"] !== undefined - ? output["CustomAvailabilityZoneName"]["#text"] - : output["CustomAvailabilityZoneName"]; + contents.CustomAvailabilityZoneName = output["CustomAvailabilityZoneName"]; } if (output["CustomAvailabilityZoneStatus"] !== undefined) { contents.CustomAvailabilityZoneStatus = - output["CustomAvailabilityZoneStatus"]["#text"] !== undefined - ? output["CustomAvailabilityZoneStatus"]["#text"] - : output["CustomAvailabilityZoneStatus"]; + output["CustomAvailabilityZoneStatus"]; } if (output["VpnDetails"] !== undefined) { contents.VpnDetails = deserializeAws_queryVpnDetails( @@ -24190,10 +23806,7 @@ const deserializeAws_queryCustomAvailabilityZoneMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -24258,34 +23871,19 @@ const deserializeAws_queryDBCluster = ( }; if (output["ActivityStreamKinesisStreamName"] !== undefined) { contents.ActivityStreamKinesisStreamName = - output["ActivityStreamKinesisStreamName"]["#text"] !== undefined - ? output["ActivityStreamKinesisStreamName"]["#text"] - : output["ActivityStreamKinesisStreamName"]; + output["ActivityStreamKinesisStreamName"]; } if (output["ActivityStreamKmsKeyId"] !== undefined) { - contents.ActivityStreamKmsKeyId = - output["ActivityStreamKmsKeyId"]["#text"] !== undefined - ? output["ActivityStreamKmsKeyId"]["#text"] - : output["ActivityStreamKmsKeyId"]; + contents.ActivityStreamKmsKeyId = output["ActivityStreamKmsKeyId"]; } if (output["ActivityStreamMode"] !== undefined) { - contents.ActivityStreamMode = - output["ActivityStreamMode"]["#text"] !== undefined - ? output["ActivityStreamMode"]["#text"] - : output["ActivityStreamMode"]; + contents.ActivityStreamMode = output["ActivityStreamMode"]; } if (output["ActivityStreamStatus"] !== undefined) { - contents.ActivityStreamStatus = - output["ActivityStreamStatus"]["#text"] !== undefined - ? output["ActivityStreamStatus"]["#text"] - : output["ActivityStreamStatus"]; + contents.ActivityStreamStatus = output["ActivityStreamStatus"]; } if (output["AllocatedStorage"] !== undefined) { - contents.AllocatedStorage = parseInt( - output["AllocatedStorage"]["#text"] !== undefined - ? output["AllocatedStorage"]["#text"] - : output["AllocatedStorage"] - ); + contents.AllocatedStorage = parseInt(output["AllocatedStorage"]); } if (output.AssociatedRoles === "") { contents.AssociatedRoles = []; @@ -24313,58 +23911,32 @@ const deserializeAws_queryDBCluster = ( } if (output["BacktrackConsumedChangeRecords"] !== undefined) { contents.BacktrackConsumedChangeRecords = parseInt( - output["BacktrackConsumedChangeRecords"]["#text"] !== undefined - ? output["BacktrackConsumedChangeRecords"]["#text"] - : output["BacktrackConsumedChangeRecords"] + output["BacktrackConsumedChangeRecords"] ); } if (output["BacktrackWindow"] !== undefined) { - contents.BacktrackWindow = parseInt( - output["BacktrackWindow"]["#text"] !== undefined - ? output["BacktrackWindow"]["#text"] - : output["BacktrackWindow"] - ); + contents.BacktrackWindow = parseInt(output["BacktrackWindow"]); } if (output["BackupRetentionPeriod"] !== undefined) { - contents.BackupRetentionPeriod = parseInt( - output["BackupRetentionPeriod"]["#text"] !== undefined - ? output["BackupRetentionPeriod"]["#text"] - : output["BackupRetentionPeriod"] - ); + contents.BackupRetentionPeriod = parseInt(output["BackupRetentionPeriod"]); } if (output["Capacity"] !== undefined) { - contents.Capacity = parseInt( - output["Capacity"]["#text"] !== undefined - ? output["Capacity"]["#text"] - : output["Capacity"] - ); + contents.Capacity = parseInt(output["Capacity"]); } if (output["CharacterSetName"] !== undefined) { - contents.CharacterSetName = - output["CharacterSetName"]["#text"] !== undefined - ? output["CharacterSetName"]["#text"] - : output["CharacterSetName"]; + contents.CharacterSetName = output["CharacterSetName"]; } if (output["CloneGroupId"] !== undefined) { - contents.CloneGroupId = - output["CloneGroupId"]["#text"] !== undefined - ? output["CloneGroupId"]["#text"] - : output["CloneGroupId"]; + contents.CloneGroupId = output["CloneGroupId"]; } if (output["ClusterCreateTime"] !== undefined) { contents.ClusterCreateTime = new Date(output["ClusterCreateTime"]); } if (output["CopyTagsToSnapshot"] !== undefined) { - contents.CopyTagsToSnapshot = - (output["CopyTagsToSnapshot"]["#text"] !== undefined - ? output["CopyTagsToSnapshot"]["#text"] - : output["CopyTagsToSnapshot"]) == "true"; + contents.CopyTagsToSnapshot = output["CopyTagsToSnapshot"] == "true"; } if (output["CrossAccountClone"] !== undefined) { - contents.CrossAccountClone = - (output["CrossAccountClone"]["#text"] !== undefined - ? output["CrossAccountClone"]["#text"] - : output["CrossAccountClone"]) == "true"; + contents.CrossAccountClone = output["CrossAccountClone"] == "true"; } if (output.CustomEndpoints === "") { contents.CustomEndpoints = []; @@ -24379,16 +23951,10 @@ const deserializeAws_queryDBCluster = ( ); } if (output["DBClusterArn"] !== undefined) { - contents.DBClusterArn = - output["DBClusterArn"]["#text"] !== undefined - ? output["DBClusterArn"]["#text"] - : output["DBClusterArn"]; + contents.DBClusterArn = output["DBClusterArn"]; } if (output["DBClusterIdentifier"] !== undefined) { - contents.DBClusterIdentifier = - output["DBClusterIdentifier"]["#text"] !== undefined - ? output["DBClusterIdentifier"]["#text"] - : output["DBClusterIdentifier"]; + contents.DBClusterIdentifier = output["DBClusterIdentifier"]; } if (output.DBClusterMembers === "") { contents.DBClusterMembers = []; @@ -24418,34 +23984,19 @@ const deserializeAws_queryDBCluster = ( ); } if (output["DBClusterParameterGroup"] !== undefined) { - contents.DBClusterParameterGroup = - output["DBClusterParameterGroup"]["#text"] !== undefined - ? output["DBClusterParameterGroup"]["#text"] - : output["DBClusterParameterGroup"]; + contents.DBClusterParameterGroup = output["DBClusterParameterGroup"]; } if (output["DBSubnetGroup"] !== undefined) { - contents.DBSubnetGroup = - output["DBSubnetGroup"]["#text"] !== undefined - ? output["DBSubnetGroup"]["#text"] - : output["DBSubnetGroup"]; + contents.DBSubnetGroup = output["DBSubnetGroup"]; } if (output["DatabaseName"] !== undefined) { - contents.DatabaseName = - output["DatabaseName"]["#text"] !== undefined - ? output["DatabaseName"]["#text"] - : output["DatabaseName"]; + contents.DatabaseName = output["DatabaseName"]; } if (output["DbClusterResourceId"] !== undefined) { - contents.DbClusterResourceId = - output["DbClusterResourceId"]["#text"] !== undefined - ? output["DbClusterResourceId"]["#text"] - : output["DbClusterResourceId"]; + contents.DbClusterResourceId = output["DbClusterResourceId"]; } if (output["DeletionProtection"] !== undefined) { - contents.DeletionProtection = - (output["DeletionProtection"]["#text"] !== undefined - ? output["DeletionProtection"]["#text"] - : output["DeletionProtection"]) == "true"; + contents.DeletionProtection = output["DeletionProtection"] == "true"; } if (output["EarliestBacktrackTime"] !== undefined) { contents.EarliestBacktrackTime = new Date(output["EarliestBacktrackTime"]); @@ -24468,92 +24019,50 @@ const deserializeAws_queryDBCluster = ( ); } if (output["Endpoint"] !== undefined) { - contents.Endpoint = - output["Endpoint"]["#text"] !== undefined - ? output["Endpoint"]["#text"] - : output["Endpoint"]; + contents.Endpoint = output["Endpoint"]; } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineMode"] !== undefined) { - contents.EngineMode = - output["EngineMode"]["#text"] !== undefined - ? output["EngineMode"]["#text"] - : output["EngineMode"]; + contents.EngineMode = output["EngineMode"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["HostedZoneId"] !== undefined) { - contents.HostedZoneId = - output["HostedZoneId"]["#text"] !== undefined - ? output["HostedZoneId"]["#text"] - : output["HostedZoneId"]; + contents.HostedZoneId = output["HostedZoneId"]; } if (output["HttpEndpointEnabled"] !== undefined) { - contents.HttpEndpointEnabled = - (output["HttpEndpointEnabled"]["#text"] !== undefined - ? output["HttpEndpointEnabled"]["#text"] - : output["HttpEndpointEnabled"]) == "true"; + contents.HttpEndpointEnabled = output["HttpEndpointEnabled"] == "true"; } if (output["IAMDatabaseAuthenticationEnabled"] !== undefined) { contents.IAMDatabaseAuthenticationEnabled = - (output["IAMDatabaseAuthenticationEnabled"]["#text"] !== undefined - ? output["IAMDatabaseAuthenticationEnabled"]["#text"] - : output["IAMDatabaseAuthenticationEnabled"]) == "true"; + output["IAMDatabaseAuthenticationEnabled"] == "true"; } if (output["KmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["KmsKeyId"]["#text"] !== undefined - ? output["KmsKeyId"]["#text"] - : output["KmsKeyId"]; + contents.KmsKeyId = output["KmsKeyId"]; } if (output["LatestRestorableTime"] !== undefined) { contents.LatestRestorableTime = new Date(output["LatestRestorableTime"]); } if (output["MasterUsername"] !== undefined) { - contents.MasterUsername = - output["MasterUsername"]["#text"] !== undefined - ? output["MasterUsername"]["#text"] - : output["MasterUsername"]; + contents.MasterUsername = output["MasterUsername"]; } if (output["MultiAZ"] !== undefined) { - contents.MultiAZ = - (output["MultiAZ"]["#text"] !== undefined - ? output["MultiAZ"]["#text"] - : output["MultiAZ"]) == "true"; + contents.MultiAZ = output["MultiAZ"] == "true"; } if (output["PercentProgress"] !== undefined) { - contents.PercentProgress = - output["PercentProgress"]["#text"] !== undefined - ? output["PercentProgress"]["#text"] - : output["PercentProgress"]; + contents.PercentProgress = output["PercentProgress"]; } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } if (output["PreferredBackupWindow"] !== undefined) { - contents.PreferredBackupWindow = - output["PreferredBackupWindow"]["#text"] !== undefined - ? output["PreferredBackupWindow"]["#text"] - : output["PreferredBackupWindow"]; + contents.PreferredBackupWindow = output["PreferredBackupWindow"]; } if (output["PreferredMaintenanceWindow"] !== undefined) { - contents.PreferredMaintenanceWindow = - output["PreferredMaintenanceWindow"]["#text"] !== undefined - ? output["PreferredMaintenanceWindow"]["#text"] - : output["PreferredMaintenanceWindow"]; + contents.PreferredMaintenanceWindow = output["PreferredMaintenanceWindow"]; } if (output.ReadReplicaIdentifiers === "") { contents.ReadReplicaIdentifiers = []; @@ -24570,16 +24079,11 @@ const deserializeAws_queryDBCluster = ( ); } if (output["ReaderEndpoint"] !== undefined) { - contents.ReaderEndpoint = - output["ReaderEndpoint"]["#text"] !== undefined - ? output["ReaderEndpoint"]["#text"] - : output["ReaderEndpoint"]; + contents.ReaderEndpoint = output["ReaderEndpoint"]; } if (output["ReplicationSourceIdentifier"] !== undefined) { contents.ReplicationSourceIdentifier = - output["ReplicationSourceIdentifier"]["#text"] !== undefined - ? output["ReplicationSourceIdentifier"]["#text"] - : output["ReplicationSourceIdentifier"]; + output["ReplicationSourceIdentifier"]; } if (output["ScalingConfigurationInfo"] !== undefined) { contents.ScalingConfigurationInfo = deserializeAws_queryScalingConfigurationInfo( @@ -24588,16 +24092,10 @@ const deserializeAws_queryDBCluster = ( ); } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["StorageEncrypted"] !== undefined) { - contents.StorageEncrypted = - (output["StorageEncrypted"]["#text"] !== undefined - ? output["StorageEncrypted"]["#text"] - : output["StorageEncrypted"]) == "true"; + contents.StorageEncrypted = output["StorageEncrypted"] == "true"; } if (output.VpcSecurityGroups === "") { contents.VpcSecurityGroups = []; @@ -24630,10 +24128,7 @@ const deserializeAws_queryDBClusterBacktrack = ( Status: undefined }; if (output["BacktrackIdentifier"] !== undefined) { - contents.BacktrackIdentifier = - output["BacktrackIdentifier"]["#text"] !== undefined - ? output["BacktrackIdentifier"]["#text"] - : output["BacktrackIdentifier"]; + contents.BacktrackIdentifier = output["BacktrackIdentifier"]; } if (output["BacktrackRequestCreationTime"] !== undefined) { contents.BacktrackRequestCreationTime = new Date( @@ -24647,16 +24142,10 @@ const deserializeAws_queryDBClusterBacktrack = ( contents.BacktrackedFrom = new Date(output["BacktrackedFrom"]); } if (output["DBClusterIdentifier"] !== undefined) { - contents.DBClusterIdentifier = - output["DBClusterIdentifier"]["#text"] !== undefined - ? output["DBClusterIdentifier"]["#text"] - : output["DBClusterIdentifier"]; + contents.DBClusterIdentifier = output["DBClusterIdentifier"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -24694,10 +24183,7 @@ const deserializeAws_queryDBClusterBacktrackMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -24715,37 +24201,19 @@ const deserializeAws_queryDBClusterCapacityInfo = ( TimeoutAction: undefined }; if (output["CurrentCapacity"] !== undefined) { - contents.CurrentCapacity = parseInt( - output["CurrentCapacity"]["#text"] !== undefined - ? output["CurrentCapacity"]["#text"] - : output["CurrentCapacity"] - ); + contents.CurrentCapacity = parseInt(output["CurrentCapacity"]); } if (output["DBClusterIdentifier"] !== undefined) { - contents.DBClusterIdentifier = - output["DBClusterIdentifier"]["#text"] !== undefined - ? output["DBClusterIdentifier"]["#text"] - : output["DBClusterIdentifier"]; + contents.DBClusterIdentifier = output["DBClusterIdentifier"]; } if (output["PendingCapacity"] !== undefined) { - contents.PendingCapacity = parseInt( - output["PendingCapacity"]["#text"] !== undefined - ? output["PendingCapacity"]["#text"] - : output["PendingCapacity"] - ); + contents.PendingCapacity = parseInt(output["PendingCapacity"]); } if (output["SecondsBeforeTimeout"] !== undefined) { - contents.SecondsBeforeTimeout = parseInt( - output["SecondsBeforeTimeout"]["#text"] !== undefined - ? output["SecondsBeforeTimeout"]["#text"] - : output["SecondsBeforeTimeout"] - ); + contents.SecondsBeforeTimeout = parseInt(output["SecondsBeforeTimeout"]); } if (output["TimeoutAction"] !== undefined) { - contents.TimeoutAction = - output["TimeoutAction"]["#text"] !== undefined - ? output["TimeoutAction"]["#text"] - : output["TimeoutAction"]; + contents.TimeoutAction = output["TimeoutAction"]; } return contents; }; @@ -24768,46 +24236,27 @@ const deserializeAws_queryDBClusterEndpoint = ( Status: undefined }; if (output["CustomEndpointType"] !== undefined) { - contents.CustomEndpointType = - output["CustomEndpointType"]["#text"] !== undefined - ? output["CustomEndpointType"]["#text"] - : output["CustomEndpointType"]; + contents.CustomEndpointType = output["CustomEndpointType"]; } if (output["DBClusterEndpointArn"] !== undefined) { - contents.DBClusterEndpointArn = - output["DBClusterEndpointArn"]["#text"] !== undefined - ? output["DBClusterEndpointArn"]["#text"] - : output["DBClusterEndpointArn"]; + contents.DBClusterEndpointArn = output["DBClusterEndpointArn"]; } if (output["DBClusterEndpointIdentifier"] !== undefined) { contents.DBClusterEndpointIdentifier = - output["DBClusterEndpointIdentifier"]["#text"] !== undefined - ? output["DBClusterEndpointIdentifier"]["#text"] - : output["DBClusterEndpointIdentifier"]; + output["DBClusterEndpointIdentifier"]; } if (output["DBClusterEndpointResourceIdentifier"] !== undefined) { contents.DBClusterEndpointResourceIdentifier = - output["DBClusterEndpointResourceIdentifier"]["#text"] !== undefined - ? output["DBClusterEndpointResourceIdentifier"]["#text"] - : output["DBClusterEndpointResourceIdentifier"]; + output["DBClusterEndpointResourceIdentifier"]; } if (output["DBClusterIdentifier"] !== undefined) { - contents.DBClusterIdentifier = - output["DBClusterIdentifier"]["#text"] !== undefined - ? output["DBClusterIdentifier"]["#text"] - : output["DBClusterIdentifier"]; + contents.DBClusterIdentifier = output["DBClusterIdentifier"]; } if (output["Endpoint"] !== undefined) { - contents.Endpoint = - output["Endpoint"]["#text"] !== undefined - ? output["Endpoint"]["#text"] - : output["Endpoint"]; + contents.Endpoint = output["Endpoint"]; } if (output["EndpointType"] !== undefined) { - contents.EndpointType = - output["EndpointType"]["#text"] !== undefined - ? output["EndpointType"]["#text"] - : output["EndpointType"]; + contents.EndpointType = output["EndpointType"]; } if (output.ExcludedMembers === "") { contents.ExcludedMembers = []; @@ -24834,10 +24283,7 @@ const deserializeAws_queryDBClusterEndpoint = ( ); } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -24875,10 +24321,7 @@ const deserializeAws_queryDBClusterEndpointMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -24905,28 +24348,16 @@ const deserializeAws_queryDBClusterMember = ( }; if (output["DBClusterParameterGroupStatus"] !== undefined) { contents.DBClusterParameterGroupStatus = - output["DBClusterParameterGroupStatus"]["#text"] !== undefined - ? output["DBClusterParameterGroupStatus"]["#text"] - : output["DBClusterParameterGroupStatus"]; + output["DBClusterParameterGroupStatus"]; } if (output["DBInstanceIdentifier"] !== undefined) { - contents.DBInstanceIdentifier = - output["DBInstanceIdentifier"]["#text"] !== undefined - ? output["DBInstanceIdentifier"]["#text"] - : output["DBInstanceIdentifier"]; + contents.DBInstanceIdentifier = output["DBInstanceIdentifier"]; } if (output["IsClusterWriter"] !== undefined) { - contents.IsClusterWriter = - (output["IsClusterWriter"]["#text"] !== undefined - ? output["IsClusterWriter"]["#text"] - : output["IsClusterWriter"]) == "true"; + contents.IsClusterWriter = output["IsClusterWriter"] == "true"; } if (output["PromotionTier"] !== undefined) { - contents.PromotionTier = parseInt( - output["PromotionTier"]["#text"] !== undefined - ? output["PromotionTier"]["#text"] - : output["PromotionTier"] - ); + contents.PromotionTier = parseInt(output["PromotionTier"]); } return contents; }; @@ -24962,10 +24393,7 @@ const deserializeAws_queryDBClusterMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -24989,16 +24417,10 @@ const deserializeAws_queryDBClusterOptionGroupStatus = ( Status: undefined }; if (output["DBClusterOptionGroupName"] !== undefined) { - contents.DBClusterOptionGroupName = - output["DBClusterOptionGroupName"]["#text"] !== undefined - ? output["DBClusterOptionGroupName"]["#text"] - : output["DBClusterOptionGroupName"]; + contents.DBClusterOptionGroupName = output["DBClusterOptionGroupName"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -25015,28 +24437,17 @@ const deserializeAws_queryDBClusterParameterGroup = ( Description: undefined }; if (output["DBClusterParameterGroupArn"] !== undefined) { - contents.DBClusterParameterGroupArn = - output["DBClusterParameterGroupArn"]["#text"] !== undefined - ? output["DBClusterParameterGroupArn"]["#text"] - : output["DBClusterParameterGroupArn"]; + contents.DBClusterParameterGroupArn = output["DBClusterParameterGroupArn"]; } if (output["DBClusterParameterGroupName"] !== undefined) { contents.DBClusterParameterGroupName = - output["DBClusterParameterGroupName"]["#text"] !== undefined - ? output["DBClusterParameterGroupName"]["#text"] - : output["DBClusterParameterGroupName"]; + output["DBClusterParameterGroupName"]; } if (output["DBParameterGroupFamily"] !== undefined) { - contents.DBParameterGroupFamily = - output["DBParameterGroupFamily"]["#text"] !== undefined - ? output["DBParameterGroupFamily"]["#text"] - : output["DBParameterGroupFamily"]; + contents.DBParameterGroupFamily = output["DBParameterGroupFamily"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } return contents; }; @@ -25051,10 +24462,7 @@ const deserializeAws_queryDBClusterParameterGroupDetails = ( Parameters: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Parameters === "") { contents.Parameters = []; @@ -25090,9 +24498,7 @@ const deserializeAws_queryDBClusterParameterGroupNameMessage = ( }; if (output["DBClusterParameterGroupName"] !== undefined) { contents.DBClusterParameterGroupName = - output["DBClusterParameterGroupName"]["#text"] !== undefined - ? output["DBClusterParameterGroupName"]["#text"] - : output["DBClusterParameterGroupName"]; + output["DBClusterParameterGroupName"]; } return contents; }; @@ -25121,10 +24527,7 @@ const deserializeAws_queryDBClusterParameterGroupsMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -25140,22 +24543,13 @@ const deserializeAws_queryDBClusterRole = ( Status: undefined }; if (output["FeatureName"] !== undefined) { - contents.FeatureName = - output["FeatureName"]["#text"] !== undefined - ? output["FeatureName"]["#text"] - : output["FeatureName"]; + contents.FeatureName = output["FeatureName"]; } if (output["RoleArn"] !== undefined) { - contents.RoleArn = - output["RoleArn"]["#text"] !== undefined - ? output["RoleArn"]["#text"] - : output["RoleArn"]; + contents.RoleArn = output["RoleArn"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -25197,11 +24591,7 @@ const deserializeAws_queryDBClusterSnapshot = ( VpcId: undefined }; if (output["AllocatedStorage"] !== undefined) { - contents.AllocatedStorage = parseInt( - output["AllocatedStorage"]["#text"] !== undefined - ? output["AllocatedStorage"]["#text"] - : output["AllocatedStorage"] - ); + contents.AllocatedStorage = parseInt(output["AllocatedStorage"]); } if (output.AvailabilityZones === "") { contents.AvailabilityZones = []; @@ -25219,105 +24609,57 @@ const deserializeAws_queryDBClusterSnapshot = ( contents.ClusterCreateTime = new Date(output["ClusterCreateTime"]); } if (output["DBClusterIdentifier"] !== undefined) { - contents.DBClusterIdentifier = - output["DBClusterIdentifier"]["#text"] !== undefined - ? output["DBClusterIdentifier"]["#text"] - : output["DBClusterIdentifier"]; + contents.DBClusterIdentifier = output["DBClusterIdentifier"]; } if (output["DBClusterSnapshotArn"] !== undefined) { - contents.DBClusterSnapshotArn = - output["DBClusterSnapshotArn"]["#text"] !== undefined - ? output["DBClusterSnapshotArn"]["#text"] - : output["DBClusterSnapshotArn"]; + contents.DBClusterSnapshotArn = output["DBClusterSnapshotArn"]; } if (output["DBClusterSnapshotIdentifier"] !== undefined) { contents.DBClusterSnapshotIdentifier = - output["DBClusterSnapshotIdentifier"]["#text"] !== undefined - ? output["DBClusterSnapshotIdentifier"]["#text"] - : output["DBClusterSnapshotIdentifier"]; + output["DBClusterSnapshotIdentifier"]; } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["IAMDatabaseAuthenticationEnabled"] !== undefined) { contents.IAMDatabaseAuthenticationEnabled = - (output["IAMDatabaseAuthenticationEnabled"]["#text"] !== undefined - ? output["IAMDatabaseAuthenticationEnabled"]["#text"] - : output["IAMDatabaseAuthenticationEnabled"]) == "true"; + output["IAMDatabaseAuthenticationEnabled"] == "true"; } if (output["KmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["KmsKeyId"]["#text"] !== undefined - ? output["KmsKeyId"]["#text"] - : output["KmsKeyId"]; + contents.KmsKeyId = output["KmsKeyId"]; } if (output["LicenseModel"] !== undefined) { - contents.LicenseModel = - output["LicenseModel"]["#text"] !== undefined - ? output["LicenseModel"]["#text"] - : output["LicenseModel"]; + contents.LicenseModel = output["LicenseModel"]; } if (output["MasterUsername"] !== undefined) { - contents.MasterUsername = - output["MasterUsername"]["#text"] !== undefined - ? output["MasterUsername"]["#text"] - : output["MasterUsername"]; + contents.MasterUsername = output["MasterUsername"]; } if (output["PercentProgress"] !== undefined) { - contents.PercentProgress = parseInt( - output["PercentProgress"]["#text"] !== undefined - ? output["PercentProgress"]["#text"] - : output["PercentProgress"] - ); + contents.PercentProgress = parseInt(output["PercentProgress"]); } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } if (output["SnapshotCreateTime"] !== undefined) { contents.SnapshotCreateTime = new Date(output["SnapshotCreateTime"]); } if (output["SnapshotType"] !== undefined) { - contents.SnapshotType = - output["SnapshotType"]["#text"] !== undefined - ? output["SnapshotType"]["#text"] - : output["SnapshotType"]; + contents.SnapshotType = output["SnapshotType"]; } if (output["SourceDBClusterSnapshotArn"] !== undefined) { - contents.SourceDBClusterSnapshotArn = - output["SourceDBClusterSnapshotArn"]["#text"] !== undefined - ? output["SourceDBClusterSnapshotArn"]["#text"] - : output["SourceDBClusterSnapshotArn"]; + contents.SourceDBClusterSnapshotArn = output["SourceDBClusterSnapshotArn"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["StorageEncrypted"] !== undefined) { - contents.StorageEncrypted = - (output["StorageEncrypted"]["#text"] !== undefined - ? output["StorageEncrypted"]["#text"] - : output["StorageEncrypted"]) == "true"; + contents.StorageEncrypted = output["StorageEncrypted"] == "true"; } if (output["VpcId"] !== undefined) { - contents.VpcId = - output["VpcId"]["#text"] !== undefined - ? output["VpcId"]["#text"] - : output["VpcId"]; + contents.VpcId = output["VpcId"]; } return contents; }; @@ -25332,10 +24674,7 @@ const deserializeAws_queryDBClusterSnapshotAttribute = ( AttributeValues: undefined }; if (output["AttributeName"] !== undefined) { - contents.AttributeName = - output["AttributeName"]["#text"] !== undefined - ? output["AttributeName"]["#text"] - : output["AttributeName"]; + contents.AttributeName = output["AttributeName"]; } if (output.AttributeValues === "") { contents.AttributeValues = []; @@ -25387,9 +24726,7 @@ const deserializeAws_queryDBClusterSnapshotAttributesResult = ( } if (output["DBClusterSnapshotIdentifier"] !== undefined) { contents.DBClusterSnapshotIdentifier = - output["DBClusterSnapshotIdentifier"]["#text"] !== undefined - ? output["DBClusterSnapshotIdentifier"]["#text"] - : output["DBClusterSnapshotIdentifier"]; + output["DBClusterSnapshotIdentifier"]; } return contents; }; @@ -25425,10 +24762,7 @@ const deserializeAws_queryDBClusterSnapshotMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -25456,22 +24790,13 @@ const deserializeAws_queryDBEngineVersion = ( ValidUpgradeTarget: undefined }; if (output["DBEngineDescription"] !== undefined) { - contents.DBEngineDescription = - output["DBEngineDescription"]["#text"] !== undefined - ? output["DBEngineDescription"]["#text"] - : output["DBEngineDescription"]; + contents.DBEngineDescription = output["DBEngineDescription"]; } if (output["DBEngineVersionDescription"] !== undefined) { - contents.DBEngineVersionDescription = - output["DBEngineVersionDescription"]["#text"] !== undefined - ? output["DBEngineVersionDescription"]["#text"] - : output["DBEngineVersionDescription"]; + contents.DBEngineVersionDescription = output["DBEngineVersionDescription"]; } if (output["DBParameterGroupFamily"] !== undefined) { - contents.DBParameterGroupFamily = - output["DBParameterGroupFamily"]["#text"] !== undefined - ? output["DBParameterGroupFamily"]["#text"] - : output["DBParameterGroupFamily"]; + contents.DBParameterGroupFamily = output["DBParameterGroupFamily"]; } if (output["DefaultCharacterSet"] !== undefined) { contents.DefaultCharacterSet = deserializeAws_queryCharacterSet( @@ -25480,16 +24805,10 @@ const deserializeAws_queryDBEngineVersion = ( ); } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output.ExportableLogTypes === "") { contents.ExportableLogTypes = []; @@ -25504,10 +24823,7 @@ const deserializeAws_queryDBEngineVersion = ( ); } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output.SupportedCharacterSets === "") { contents.SupportedCharacterSets = []; @@ -25559,15 +24875,10 @@ const deserializeAws_queryDBEngineVersion = ( } if (output["SupportsLogExportsToCloudwatchLogs"] !== undefined) { contents.SupportsLogExportsToCloudwatchLogs = - (output["SupportsLogExportsToCloudwatchLogs"]["#text"] !== undefined - ? output["SupportsLogExportsToCloudwatchLogs"]["#text"] - : output["SupportsLogExportsToCloudwatchLogs"]) == "true"; + output["SupportsLogExportsToCloudwatchLogs"] == "true"; } if (output["SupportsReadReplica"] !== undefined) { - contents.SupportsReadReplica = - (output["SupportsReadReplica"]["#text"] !== undefined - ? output["SupportsReadReplica"]["#text"] - : output["SupportsReadReplica"]) == "true"; + contents.SupportsReadReplica = output["SupportsReadReplica"] == "true"; } if (output.ValidUpgradeTarget === "") { contents.ValidUpgradeTarget = []; @@ -25615,10 +24926,7 @@ const deserializeAws_queryDBEngineVersionMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -25689,11 +24997,7 @@ const deserializeAws_queryDBInstance = ( VpcSecurityGroups: undefined }; if (output["AllocatedStorage"] !== undefined) { - contents.AllocatedStorage = parseInt( - output["AllocatedStorage"]["#text"] !== undefined - ? output["AllocatedStorage"]["#text"] - : output["AllocatedStorage"] - ); + contents.AllocatedStorage = parseInt(output["AllocatedStorage"]); } if (output.AssociatedRoles === "") { contents.AssociatedRoles = []; @@ -25709,76 +25013,40 @@ const deserializeAws_queryDBInstance = ( } if (output["AutoMinorVersionUpgrade"] !== undefined) { contents.AutoMinorVersionUpgrade = - (output["AutoMinorVersionUpgrade"]["#text"] !== undefined - ? output["AutoMinorVersionUpgrade"]["#text"] - : output["AutoMinorVersionUpgrade"]) == "true"; + output["AutoMinorVersionUpgrade"] == "true"; } if (output["AvailabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["AvailabilityZone"]["#text"] !== undefined - ? output["AvailabilityZone"]["#text"] - : output["AvailabilityZone"]; + contents.AvailabilityZone = output["AvailabilityZone"]; } if (output["BackupRetentionPeriod"] !== undefined) { - contents.BackupRetentionPeriod = parseInt( - output["BackupRetentionPeriod"]["#text"] !== undefined - ? output["BackupRetentionPeriod"]["#text"] - : output["BackupRetentionPeriod"] - ); + contents.BackupRetentionPeriod = parseInt(output["BackupRetentionPeriod"]); } if (output["CACertificateIdentifier"] !== undefined) { - contents.CACertificateIdentifier = - output["CACertificateIdentifier"]["#text"] !== undefined - ? output["CACertificateIdentifier"]["#text"] - : output["CACertificateIdentifier"]; + contents.CACertificateIdentifier = output["CACertificateIdentifier"]; } if (output["CharacterSetName"] !== undefined) { - contents.CharacterSetName = - output["CharacterSetName"]["#text"] !== undefined - ? output["CharacterSetName"]["#text"] - : output["CharacterSetName"]; + contents.CharacterSetName = output["CharacterSetName"]; } if (output["CopyTagsToSnapshot"] !== undefined) { - contents.CopyTagsToSnapshot = - (output["CopyTagsToSnapshot"]["#text"] !== undefined - ? output["CopyTagsToSnapshot"]["#text"] - : output["CopyTagsToSnapshot"]) == "true"; + contents.CopyTagsToSnapshot = output["CopyTagsToSnapshot"] == "true"; } if (output["DBClusterIdentifier"] !== undefined) { - contents.DBClusterIdentifier = - output["DBClusterIdentifier"]["#text"] !== undefined - ? output["DBClusterIdentifier"]["#text"] - : output["DBClusterIdentifier"]; + contents.DBClusterIdentifier = output["DBClusterIdentifier"]; } if (output["DBInstanceArn"] !== undefined) { - contents.DBInstanceArn = - output["DBInstanceArn"]["#text"] !== undefined - ? output["DBInstanceArn"]["#text"] - : output["DBInstanceArn"]; + contents.DBInstanceArn = output["DBInstanceArn"]; } if (output["DBInstanceClass"] !== undefined) { - contents.DBInstanceClass = - output["DBInstanceClass"]["#text"] !== undefined - ? output["DBInstanceClass"]["#text"] - : output["DBInstanceClass"]; + contents.DBInstanceClass = output["DBInstanceClass"]; } if (output["DBInstanceIdentifier"] !== undefined) { - contents.DBInstanceIdentifier = - output["DBInstanceIdentifier"]["#text"] !== undefined - ? output["DBInstanceIdentifier"]["#text"] - : output["DBInstanceIdentifier"]; + contents.DBInstanceIdentifier = output["DBInstanceIdentifier"]; } if (output["DBInstanceStatus"] !== undefined) { - contents.DBInstanceStatus = - output["DBInstanceStatus"]["#text"] !== undefined - ? output["DBInstanceStatus"]["#text"] - : output["DBInstanceStatus"]; + contents.DBInstanceStatus = output["DBInstanceStatus"]; } if (output["DBName"] !== undefined) { - contents.DBName = - output["DBName"]["#text"] !== undefined - ? output["DBName"]["#text"] - : output["DBName"]; + contents.DBName = output["DBName"]; } if (output.DBParameterGroups === "") { contents.DBParameterGroups = []; @@ -25811,23 +25079,13 @@ const deserializeAws_queryDBInstance = ( ); } if (output["DbInstancePort"] !== undefined) { - contents.DbInstancePort = parseInt( - output["DbInstancePort"]["#text"] !== undefined - ? output["DbInstancePort"]["#text"] - : output["DbInstancePort"] - ); + contents.DbInstancePort = parseInt(output["DbInstancePort"]); } if (output["DbiResourceId"] !== undefined) { - contents.DbiResourceId = - output["DbiResourceId"]["#text"] !== undefined - ? output["DbiResourceId"]["#text"] - : output["DbiResourceId"]; + contents.DbiResourceId = output["DbiResourceId"]; } if (output["DeletionProtection"] !== undefined) { - contents.DeletionProtection = - (output["DeletionProtection"]["#text"] !== undefined - ? output["DeletionProtection"]["#text"] - : output["DeletionProtection"]) == "true"; + contents.DeletionProtection = output["DeletionProtection"] == "true"; } if (output.DomainMemberships === "") { contents.DomainMemberships = []; @@ -25860,53 +25118,33 @@ const deserializeAws_queryDBInstance = ( ); } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["EnhancedMonitoringResourceArn"] !== undefined) { contents.EnhancedMonitoringResourceArn = - output["EnhancedMonitoringResourceArn"]["#text"] !== undefined - ? output["EnhancedMonitoringResourceArn"]["#text"] - : output["EnhancedMonitoringResourceArn"]; + output["EnhancedMonitoringResourceArn"]; } if (output["IAMDatabaseAuthenticationEnabled"] !== undefined) { contents.IAMDatabaseAuthenticationEnabled = - (output["IAMDatabaseAuthenticationEnabled"]["#text"] !== undefined - ? output["IAMDatabaseAuthenticationEnabled"]["#text"] - : output["IAMDatabaseAuthenticationEnabled"]) == "true"; + output["IAMDatabaseAuthenticationEnabled"] == "true"; } if (output["InstanceCreateTime"] !== undefined) { contents.InstanceCreateTime = new Date(output["InstanceCreateTime"]); } if (output["Iops"] !== undefined) { - contents.Iops = parseInt( - output["Iops"]["#text"] !== undefined - ? output["Iops"]["#text"] - : output["Iops"] - ); + contents.Iops = parseInt(output["Iops"]); } if (output["KmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["KmsKeyId"]["#text"] !== undefined - ? output["KmsKeyId"]["#text"] - : output["KmsKeyId"]; + contents.KmsKeyId = output["KmsKeyId"]; } if (output["LatestRestorableTime"] !== undefined) { contents.LatestRestorableTime = new Date(output["LatestRestorableTime"]); } if (output["LicenseModel"] !== undefined) { - contents.LicenseModel = - output["LicenseModel"]["#text"] !== undefined - ? output["LicenseModel"]["#text"] - : output["LicenseModel"]; + contents.LicenseModel = output["LicenseModel"]; } if (output["ListenerEndpoint"] !== undefined) { contents.ListenerEndpoint = deserializeAws_queryEndpoint( @@ -25915,36 +25153,19 @@ const deserializeAws_queryDBInstance = ( ); } if (output["MasterUsername"] !== undefined) { - contents.MasterUsername = - output["MasterUsername"]["#text"] !== undefined - ? output["MasterUsername"]["#text"] - : output["MasterUsername"]; + contents.MasterUsername = output["MasterUsername"]; } if (output["MaxAllocatedStorage"] !== undefined) { - contents.MaxAllocatedStorage = parseInt( - output["MaxAllocatedStorage"]["#text"] !== undefined - ? output["MaxAllocatedStorage"]["#text"] - : output["MaxAllocatedStorage"] - ); + contents.MaxAllocatedStorage = parseInt(output["MaxAllocatedStorage"]); } if (output["MonitoringInterval"] !== undefined) { - contents.MonitoringInterval = parseInt( - output["MonitoringInterval"]["#text"] !== undefined - ? output["MonitoringInterval"]["#text"] - : output["MonitoringInterval"] - ); + contents.MonitoringInterval = parseInt(output["MonitoringInterval"]); } if (output["MonitoringRoleArn"] !== undefined) { - contents.MonitoringRoleArn = - output["MonitoringRoleArn"]["#text"] !== undefined - ? output["MonitoringRoleArn"]["#text"] - : output["MonitoringRoleArn"]; + contents.MonitoringRoleArn = output["MonitoringRoleArn"]; } if (output["MultiAZ"] !== undefined) { - contents.MultiAZ = - (output["MultiAZ"]["#text"] !== undefined - ? output["MultiAZ"]["#text"] - : output["MultiAZ"]) == "true"; + contents.MultiAZ = output["MultiAZ"] == "true"; } if (output.OptionGroupMemberships === "") { contents.OptionGroupMemberships = []; @@ -25968,34 +25189,22 @@ const deserializeAws_queryDBInstance = ( } if (output["PerformanceInsightsEnabled"] !== undefined) { contents.PerformanceInsightsEnabled = - (output["PerformanceInsightsEnabled"]["#text"] !== undefined - ? output["PerformanceInsightsEnabled"]["#text"] - : output["PerformanceInsightsEnabled"]) == "true"; + output["PerformanceInsightsEnabled"] == "true"; } if (output["PerformanceInsightsKMSKeyId"] !== undefined) { contents.PerformanceInsightsKMSKeyId = - output["PerformanceInsightsKMSKeyId"]["#text"] !== undefined - ? output["PerformanceInsightsKMSKeyId"]["#text"] - : output["PerformanceInsightsKMSKeyId"]; + output["PerformanceInsightsKMSKeyId"]; } if (output["PerformanceInsightsRetentionPeriod"] !== undefined) { contents.PerformanceInsightsRetentionPeriod = parseInt( - output["PerformanceInsightsRetentionPeriod"]["#text"] !== undefined - ? output["PerformanceInsightsRetentionPeriod"]["#text"] - : output["PerformanceInsightsRetentionPeriod"] + output["PerformanceInsightsRetentionPeriod"] ); } if (output["PreferredBackupWindow"] !== undefined) { - contents.PreferredBackupWindow = - output["PreferredBackupWindow"]["#text"] !== undefined - ? output["PreferredBackupWindow"]["#text"] - : output["PreferredBackupWindow"]; + contents.PreferredBackupWindow = output["PreferredBackupWindow"]; } if (output["PreferredMaintenanceWindow"] !== undefined) { - contents.PreferredMaintenanceWindow = - output["PreferredMaintenanceWindow"]["#text"] !== undefined - ? output["PreferredMaintenanceWindow"]["#text"] - : output["PreferredMaintenanceWindow"]; + contents.PreferredMaintenanceWindow = output["PreferredMaintenanceWindow"]; } if (output.ProcessorFeatures === "") { contents.ProcessorFeatures = []; @@ -26010,17 +25219,10 @@ const deserializeAws_queryDBInstance = ( ); } if (output["PromotionTier"] !== undefined) { - contents.PromotionTier = parseInt( - output["PromotionTier"]["#text"] !== undefined - ? output["PromotionTier"]["#text"] - : output["PromotionTier"] - ); + contents.PromotionTier = parseInt(output["PromotionTier"]); } if (output["PubliclyAccessible"] !== undefined) { - contents.PubliclyAccessible = - (output["PubliclyAccessible"]["#text"] !== undefined - ? output["PubliclyAccessible"]["#text"] - : output["PubliclyAccessible"]) == "true"; + contents.PubliclyAccessible = output["PubliclyAccessible"] == "true"; } if (output.ReadReplicaDBClusterIdentifiers === "") { contents.ReadReplicaDBClusterIdentifiers = []; @@ -26060,15 +25262,10 @@ const deserializeAws_queryDBInstance = ( } if (output["ReadReplicaSourceDBInstanceIdentifier"] !== undefined) { contents.ReadReplicaSourceDBInstanceIdentifier = - output["ReadReplicaSourceDBInstanceIdentifier"]["#text"] !== undefined - ? output["ReadReplicaSourceDBInstanceIdentifier"]["#text"] - : output["ReadReplicaSourceDBInstanceIdentifier"]; + output["ReadReplicaSourceDBInstanceIdentifier"]; } if (output["SecondaryAvailabilityZone"] !== undefined) { - contents.SecondaryAvailabilityZone = - output["SecondaryAvailabilityZone"]["#text"] !== undefined - ? output["SecondaryAvailabilityZone"]["#text"] - : output["SecondaryAvailabilityZone"]; + contents.SecondaryAvailabilityZone = output["SecondaryAvailabilityZone"]; } if (output.StatusInfos === "") { contents.StatusInfos = []; @@ -26083,28 +25280,16 @@ const deserializeAws_queryDBInstance = ( ); } if (output["StorageEncrypted"] !== undefined) { - contents.StorageEncrypted = - (output["StorageEncrypted"]["#text"] !== undefined - ? output["StorageEncrypted"]["#text"] - : output["StorageEncrypted"]) == "true"; + contents.StorageEncrypted = output["StorageEncrypted"] == "true"; } if (output["StorageType"] !== undefined) { - contents.StorageType = - output["StorageType"]["#text"] !== undefined - ? output["StorageType"]["#text"] - : output["StorageType"]; + contents.StorageType = output["StorageType"]; } if (output["TdeCredentialArn"] !== undefined) { - contents.TdeCredentialArn = - output["TdeCredentialArn"]["#text"] !== undefined - ? output["TdeCredentialArn"]["#text"] - : output["TdeCredentialArn"]; + contents.TdeCredentialArn = output["TdeCredentialArn"]; } if (output["Timezone"] !== undefined) { - contents.Timezone = - output["Timezone"]["#text"] !== undefined - ? output["Timezone"]["#text"] - : output["Timezone"]; + contents.Timezone = output["Timezone"]; } if (output.VpcSecurityGroups === "") { contents.VpcSecurityGroups = []; @@ -26154,106 +25339,56 @@ const deserializeAws_queryDBInstanceAutomatedBackup = ( VpcId: undefined }; if (output["AllocatedStorage"] !== undefined) { - contents.AllocatedStorage = parseInt( - output["AllocatedStorage"]["#text"] !== undefined - ? output["AllocatedStorage"]["#text"] - : output["AllocatedStorage"] - ); + contents.AllocatedStorage = parseInt(output["AllocatedStorage"]); } if (output["AvailabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["AvailabilityZone"]["#text"] !== undefined - ? output["AvailabilityZone"]["#text"] - : output["AvailabilityZone"]; + contents.AvailabilityZone = output["AvailabilityZone"]; } if (output["DBInstanceArn"] !== undefined) { - contents.DBInstanceArn = - output["DBInstanceArn"]["#text"] !== undefined - ? output["DBInstanceArn"]["#text"] - : output["DBInstanceArn"]; + contents.DBInstanceArn = output["DBInstanceArn"]; } if (output["DBInstanceIdentifier"] !== undefined) { - contents.DBInstanceIdentifier = - output["DBInstanceIdentifier"]["#text"] !== undefined - ? output["DBInstanceIdentifier"]["#text"] - : output["DBInstanceIdentifier"]; + contents.DBInstanceIdentifier = output["DBInstanceIdentifier"]; } if (output["DbiResourceId"] !== undefined) { - contents.DbiResourceId = - output["DbiResourceId"]["#text"] !== undefined - ? output["DbiResourceId"]["#text"] - : output["DbiResourceId"]; + contents.DbiResourceId = output["DbiResourceId"]; } if (output["Encrypted"] !== undefined) { - contents.Encrypted = - (output["Encrypted"]["#text"] !== undefined - ? output["Encrypted"]["#text"] - : output["Encrypted"]) == "true"; + contents.Encrypted = output["Encrypted"] == "true"; } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["IAMDatabaseAuthenticationEnabled"] !== undefined) { contents.IAMDatabaseAuthenticationEnabled = - (output["IAMDatabaseAuthenticationEnabled"]["#text"] !== undefined - ? output["IAMDatabaseAuthenticationEnabled"]["#text"] - : output["IAMDatabaseAuthenticationEnabled"]) == "true"; + output["IAMDatabaseAuthenticationEnabled"] == "true"; } if (output["InstanceCreateTime"] !== undefined) { contents.InstanceCreateTime = new Date(output["InstanceCreateTime"]); } if (output["Iops"] !== undefined) { - contents.Iops = parseInt( - output["Iops"]["#text"] !== undefined - ? output["Iops"]["#text"] - : output["Iops"] - ); + contents.Iops = parseInt(output["Iops"]); } if (output["KmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["KmsKeyId"]["#text"] !== undefined - ? output["KmsKeyId"]["#text"] - : output["KmsKeyId"]; + contents.KmsKeyId = output["KmsKeyId"]; } if (output["LicenseModel"] !== undefined) { - contents.LicenseModel = - output["LicenseModel"]["#text"] !== undefined - ? output["LicenseModel"]["#text"] - : output["LicenseModel"]; + contents.LicenseModel = output["LicenseModel"]; } if (output["MasterUsername"] !== undefined) { - contents.MasterUsername = - output["MasterUsername"]["#text"] !== undefined - ? output["MasterUsername"]["#text"] - : output["MasterUsername"]; + contents.MasterUsername = output["MasterUsername"]; } if (output["OptionGroupName"] !== undefined) { - contents.OptionGroupName = - output["OptionGroupName"]["#text"] !== undefined - ? output["OptionGroupName"]["#text"] - : output["OptionGroupName"]; + contents.OptionGroupName = output["OptionGroupName"]; } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } if (output["Region"] !== undefined) { - contents.Region = - output["Region"]["#text"] !== undefined - ? output["Region"]["#text"] - : output["Region"]; + contents.Region = output["Region"]; } if (output["RestoreWindow"] !== undefined) { contents.RestoreWindow = deserializeAws_queryRestoreWindow( @@ -26262,34 +25397,19 @@ const deserializeAws_queryDBInstanceAutomatedBackup = ( ); } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["StorageType"] !== undefined) { - contents.StorageType = - output["StorageType"]["#text"] !== undefined - ? output["StorageType"]["#text"] - : output["StorageType"]; + contents.StorageType = output["StorageType"]; } if (output["TdeCredentialArn"] !== undefined) { - contents.TdeCredentialArn = - output["TdeCredentialArn"]["#text"] !== undefined - ? output["TdeCredentialArn"]["#text"] - : output["TdeCredentialArn"]; + contents.TdeCredentialArn = output["TdeCredentialArn"]; } if (output["Timezone"] !== undefined) { - contents.Timezone = - output["Timezone"]["#text"] !== undefined - ? output["Timezone"]["#text"] - : output["Timezone"]; + contents.Timezone = output["Timezone"]; } if (output["VpcId"] !== undefined) { - contents.VpcId = - output["VpcId"]["#text"] !== undefined - ? output["VpcId"]["#text"] - : output["VpcId"]; + contents.VpcId = output["VpcId"]; } return contents; }; @@ -26328,10 +25448,7 @@ const deserializeAws_queryDBInstanceAutomatedBackupMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -26367,10 +25484,7 @@ const deserializeAws_queryDBInstanceMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -26386,22 +25500,13 @@ const deserializeAws_queryDBInstanceRole = ( Status: undefined }; if (output["FeatureName"] !== undefined) { - contents.FeatureName = - output["FeatureName"]["#text"] !== undefined - ? output["FeatureName"]["#text"] - : output["FeatureName"]; + contents.FeatureName = output["FeatureName"]; } if (output["RoleArn"] !== undefined) { - contents.RoleArn = - output["RoleArn"]["#text"] !== undefined - ? output["RoleArn"]["#text"] - : output["RoleArn"]; + contents.RoleArn = output["RoleArn"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -26427,28 +25532,16 @@ const deserializeAws_queryDBInstanceStatusInfo = ( StatusType: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } if (output["Normal"] !== undefined) { - contents.Normal = - (output["Normal"]["#text"] !== undefined - ? output["Normal"]["#text"] - : output["Normal"]) == "true"; + contents.Normal = output["Normal"] == "true"; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["StatusType"] !== undefined) { - contents.StatusType = - output["StatusType"]["#text"] !== undefined - ? output["StatusType"]["#text"] - : output["StatusType"]; + contents.StatusType = output["StatusType"]; } return contents; }; @@ -26474,28 +25567,16 @@ const deserializeAws_queryDBParameterGroup = ( Description: undefined }; if (output["DBParameterGroupArn"] !== undefined) { - contents.DBParameterGroupArn = - output["DBParameterGroupArn"]["#text"] !== undefined - ? output["DBParameterGroupArn"]["#text"] - : output["DBParameterGroupArn"]; + contents.DBParameterGroupArn = output["DBParameterGroupArn"]; } if (output["DBParameterGroupFamily"] !== undefined) { - contents.DBParameterGroupFamily = - output["DBParameterGroupFamily"]["#text"] !== undefined - ? output["DBParameterGroupFamily"]["#text"] - : output["DBParameterGroupFamily"]; + contents.DBParameterGroupFamily = output["DBParameterGroupFamily"]; } if (output["DBParameterGroupName"] !== undefined) { - contents.DBParameterGroupName = - output["DBParameterGroupName"]["#text"] !== undefined - ? output["DBParameterGroupName"]["#text"] - : output["DBParameterGroupName"]; + contents.DBParameterGroupName = output["DBParameterGroupName"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } return contents; }; @@ -26510,10 +25591,7 @@ const deserializeAws_queryDBParameterGroupDetails = ( Parameters: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Parameters === "") { contents.Parameters = []; @@ -26548,10 +25626,7 @@ const deserializeAws_queryDBParameterGroupNameMessage = ( DBParameterGroupName: undefined }; if (output["DBParameterGroupName"] !== undefined) { - contents.DBParameterGroupName = - output["DBParameterGroupName"]["#text"] !== undefined - ? output["DBParameterGroupName"]["#text"] - : output["DBParameterGroupName"]; + contents.DBParameterGroupName = output["DBParameterGroupName"]; } return contents; }; @@ -26566,16 +25641,10 @@ const deserializeAws_queryDBParameterGroupStatus = ( ParameterApplyStatus: undefined }; if (output["DBParameterGroupName"] !== undefined) { - contents.DBParameterGroupName = - output["DBParameterGroupName"]["#text"] !== undefined - ? output["DBParameterGroupName"]["#text"] - : output["DBParameterGroupName"]; + contents.DBParameterGroupName = output["DBParameterGroupName"]; } if (output["ParameterApplyStatus"] !== undefined) { - contents.ParameterApplyStatus = - output["ParameterApplyStatus"]["#text"] !== undefined - ? output["ParameterApplyStatus"]["#text"] - : output["ParameterApplyStatus"]; + contents.ParameterApplyStatus = output["ParameterApplyStatus"]; } return contents; }; @@ -26611,10 +25680,7 @@ const deserializeAws_queryDBParameterGroupsMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -26653,59 +25719,31 @@ const deserializeAws_queryDBProxy = ( contents.CreatedDate = new Date(output["CreatedDate"]); } if (output["DBProxyArn"] !== undefined) { - contents.DBProxyArn = - output["DBProxyArn"]["#text"] !== undefined - ? output["DBProxyArn"]["#text"] - : output["DBProxyArn"]; + contents.DBProxyArn = output["DBProxyArn"]; } if (output["DBProxyName"] !== undefined) { - contents.DBProxyName = - output["DBProxyName"]["#text"] !== undefined - ? output["DBProxyName"]["#text"] - : output["DBProxyName"]; + contents.DBProxyName = output["DBProxyName"]; } if (output["DebugLogging"] !== undefined) { - contents.DebugLogging = - (output["DebugLogging"]["#text"] !== undefined - ? output["DebugLogging"]["#text"] - : output["DebugLogging"]) == "true"; + contents.DebugLogging = output["DebugLogging"] == "true"; } if (output["Endpoint"] !== undefined) { - contents.Endpoint = - output["Endpoint"]["#text"] !== undefined - ? output["Endpoint"]["#text"] - : output["Endpoint"]; + contents.Endpoint = output["Endpoint"]; } if (output["EngineFamily"] !== undefined) { - contents.EngineFamily = - output["EngineFamily"]["#text"] !== undefined - ? output["EngineFamily"]["#text"] - : output["EngineFamily"]; + contents.EngineFamily = output["EngineFamily"]; } if (output["IdleClientTimeout"] !== undefined) { - contents.IdleClientTimeout = parseInt( - output["IdleClientTimeout"]["#text"] !== undefined - ? output["IdleClientTimeout"]["#text"] - : output["IdleClientTimeout"] - ); + contents.IdleClientTimeout = parseInt(output["IdleClientTimeout"]); } if (output["RequireTLS"] !== undefined) { - contents.RequireTLS = - (output["RequireTLS"]["#text"] !== undefined - ? output["RequireTLS"]["#text"] - : output["RequireTLS"]) == "true"; + contents.RequireTLS = output["RequireTLS"] == "true"; } if (output["RoleArn"] !== undefined) { - contents.RoleArn = - output["RoleArn"]["#text"] !== undefined - ? output["RoleArn"]["#text"] - : output["RoleArn"]; + contents.RoleArn = output["RoleArn"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["UpdatedDate"] !== undefined) { contents.UpdatedDate = new Date(output["UpdatedDate"]); @@ -26760,41 +25798,22 @@ const deserializeAws_queryDBProxyTarget = ( Type: undefined }; if (output["Endpoint"] !== undefined) { - contents.Endpoint = - output["Endpoint"]["#text"] !== undefined - ? output["Endpoint"]["#text"] - : output["Endpoint"]; + contents.Endpoint = output["Endpoint"]; } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } if (output["RdsResourceId"] !== undefined) { - contents.RdsResourceId = - output["RdsResourceId"]["#text"] !== undefined - ? output["RdsResourceId"]["#text"] - : output["RdsResourceId"]; + contents.RdsResourceId = output["RdsResourceId"]; } if (output["TargetArn"] !== undefined) { - contents.TargetArn = - output["TargetArn"]["#text"] !== undefined - ? output["TargetArn"]["#text"] - : output["TargetArn"]; + contents.TargetArn = output["TargetArn"]; } if (output["TrackedClusterId"] !== undefined) { - contents.TrackedClusterId = - output["TrackedClusterId"]["#text"] !== undefined - ? output["TrackedClusterId"]["#text"] - : output["TrackedClusterId"]; + contents.TrackedClusterId = output["TrackedClusterId"]; } if (output["Type"] !== undefined) { - contents.Type = - output["Type"]["#text"] !== undefined - ? output["Type"]["#text"] - : output["Type"]; + contents.Type = output["Type"]; } return contents; }; @@ -26824,34 +25843,19 @@ const deserializeAws_queryDBProxyTargetGroup = ( contents.CreatedDate = new Date(output["CreatedDate"]); } if (output["DBProxyName"] !== undefined) { - contents.DBProxyName = - output["DBProxyName"]["#text"] !== undefined - ? output["DBProxyName"]["#text"] - : output["DBProxyName"]; + contents.DBProxyName = output["DBProxyName"]; } if (output["IsDefault"] !== undefined) { - contents.IsDefault = - (output["IsDefault"]["#text"] !== undefined - ? output["IsDefault"]["#text"] - : output["IsDefault"]) == "true"; + contents.IsDefault = output["IsDefault"] == "true"; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["TargetGroupArn"] !== undefined) { - contents.TargetGroupArn = - output["TargetGroupArn"]["#text"] !== undefined - ? output["TargetGroupArn"]["#text"] - : output["TargetGroupArn"]; + contents.TargetGroupArn = output["TargetGroupArn"]; } if (output["TargetGroupName"] !== undefined) { - contents.TargetGroupName = - output["TargetGroupName"]["#text"] !== undefined - ? output["TargetGroupName"]["#text"] - : output["TargetGroupName"]; + contents.TargetGroupName = output["TargetGroupName"]; } if (output["UpdatedDate"] !== undefined) { contents.UpdatedDate = new Date(output["UpdatedDate"]); @@ -26874,22 +25878,13 @@ const deserializeAws_queryDBSecurityGroup = ( VpcId: undefined }; if (output["DBSecurityGroupArn"] !== undefined) { - contents.DBSecurityGroupArn = - output["DBSecurityGroupArn"]["#text"] !== undefined - ? output["DBSecurityGroupArn"]["#text"] - : output["DBSecurityGroupArn"]; + contents.DBSecurityGroupArn = output["DBSecurityGroupArn"]; } if (output["DBSecurityGroupDescription"] !== undefined) { - contents.DBSecurityGroupDescription = - output["DBSecurityGroupDescription"]["#text"] !== undefined - ? output["DBSecurityGroupDescription"]["#text"] - : output["DBSecurityGroupDescription"]; + contents.DBSecurityGroupDescription = output["DBSecurityGroupDescription"]; } if (output["DBSecurityGroupName"] !== undefined) { - contents.DBSecurityGroupName = - output["DBSecurityGroupName"]["#text"] !== undefined - ? output["DBSecurityGroupName"]["#text"] - : output["DBSecurityGroupName"]; + contents.DBSecurityGroupName = output["DBSecurityGroupName"]; } if (output.EC2SecurityGroups === "") { contents.EC2SecurityGroups = []; @@ -26916,16 +25911,10 @@ const deserializeAws_queryDBSecurityGroup = ( ); } if (output["OwnerId"] !== undefined) { - contents.OwnerId = - output["OwnerId"]["#text"] !== undefined - ? output["OwnerId"]["#text"] - : output["OwnerId"]; + contents.OwnerId = output["OwnerId"]; } if (output["VpcId"] !== undefined) { - contents.VpcId = - output["VpcId"]["#text"] !== undefined - ? output["VpcId"]["#text"] - : output["VpcId"]; + contents.VpcId = output["VpcId"]; } return contents; }; @@ -26940,16 +25929,10 @@ const deserializeAws_queryDBSecurityGroupMembership = ( Status: undefined }; if (output["DBSecurityGroupName"] !== undefined) { - contents.DBSecurityGroupName = - output["DBSecurityGroupName"]["#text"] !== undefined - ? output["DBSecurityGroupName"]["#text"] - : output["DBSecurityGroupName"]; + contents.DBSecurityGroupName = output["DBSecurityGroupName"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -26985,10 +25968,7 @@ const deserializeAws_queryDBSecurityGroupMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -27038,113 +26018,59 @@ const deserializeAws_queryDBSnapshot = ( VpcId: undefined }; if (output["AllocatedStorage"] !== undefined) { - contents.AllocatedStorage = parseInt( - output["AllocatedStorage"]["#text"] !== undefined - ? output["AllocatedStorage"]["#text"] - : output["AllocatedStorage"] - ); + contents.AllocatedStorage = parseInt(output["AllocatedStorage"]); } if (output["AvailabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["AvailabilityZone"]["#text"] !== undefined - ? output["AvailabilityZone"]["#text"] - : output["AvailabilityZone"]; + contents.AvailabilityZone = output["AvailabilityZone"]; } if (output["DBInstanceIdentifier"] !== undefined) { - contents.DBInstanceIdentifier = - output["DBInstanceIdentifier"]["#text"] !== undefined - ? output["DBInstanceIdentifier"]["#text"] - : output["DBInstanceIdentifier"]; + contents.DBInstanceIdentifier = output["DBInstanceIdentifier"]; } if (output["DBSnapshotArn"] !== undefined) { - contents.DBSnapshotArn = - output["DBSnapshotArn"]["#text"] !== undefined - ? output["DBSnapshotArn"]["#text"] - : output["DBSnapshotArn"]; + contents.DBSnapshotArn = output["DBSnapshotArn"]; } if (output["DBSnapshotIdentifier"] !== undefined) { - contents.DBSnapshotIdentifier = - output["DBSnapshotIdentifier"]["#text"] !== undefined - ? output["DBSnapshotIdentifier"]["#text"] - : output["DBSnapshotIdentifier"]; + contents.DBSnapshotIdentifier = output["DBSnapshotIdentifier"]; } if (output["DbiResourceId"] !== undefined) { - contents.DbiResourceId = - output["DbiResourceId"]["#text"] !== undefined - ? output["DbiResourceId"]["#text"] - : output["DbiResourceId"]; + contents.DbiResourceId = output["DbiResourceId"]; } if (output["Encrypted"] !== undefined) { - contents.Encrypted = - (output["Encrypted"]["#text"] !== undefined - ? output["Encrypted"]["#text"] - : output["Encrypted"]) == "true"; + contents.Encrypted = output["Encrypted"] == "true"; } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["IAMDatabaseAuthenticationEnabled"] !== undefined) { contents.IAMDatabaseAuthenticationEnabled = - (output["IAMDatabaseAuthenticationEnabled"]["#text"] !== undefined - ? output["IAMDatabaseAuthenticationEnabled"]["#text"] - : output["IAMDatabaseAuthenticationEnabled"]) == "true"; + output["IAMDatabaseAuthenticationEnabled"] == "true"; } if (output["InstanceCreateTime"] !== undefined) { contents.InstanceCreateTime = new Date(output["InstanceCreateTime"]); } if (output["Iops"] !== undefined) { - contents.Iops = parseInt( - output["Iops"]["#text"] !== undefined - ? output["Iops"]["#text"] - : output["Iops"] - ); + contents.Iops = parseInt(output["Iops"]); } if (output["KmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["KmsKeyId"]["#text"] !== undefined - ? output["KmsKeyId"]["#text"] - : output["KmsKeyId"]; + contents.KmsKeyId = output["KmsKeyId"]; } if (output["LicenseModel"] !== undefined) { - contents.LicenseModel = - output["LicenseModel"]["#text"] !== undefined - ? output["LicenseModel"]["#text"] - : output["LicenseModel"]; + contents.LicenseModel = output["LicenseModel"]; } if (output["MasterUsername"] !== undefined) { - contents.MasterUsername = - output["MasterUsername"]["#text"] !== undefined - ? output["MasterUsername"]["#text"] - : output["MasterUsername"]; + contents.MasterUsername = output["MasterUsername"]; } if (output["OptionGroupName"] !== undefined) { - contents.OptionGroupName = - output["OptionGroupName"]["#text"] !== undefined - ? output["OptionGroupName"]["#text"] - : output["OptionGroupName"]; + contents.OptionGroupName = output["OptionGroupName"]; } if (output["PercentProgress"] !== undefined) { - contents.PercentProgress = parseInt( - output["PercentProgress"]["#text"] !== undefined - ? output["PercentProgress"]["#text"] - : output["PercentProgress"] - ); + contents.PercentProgress = parseInt(output["PercentProgress"]); } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } if (output.ProcessorFeatures === "") { contents.ProcessorFeatures = []; @@ -27162,52 +26088,28 @@ const deserializeAws_queryDBSnapshot = ( contents.SnapshotCreateTime = new Date(output["SnapshotCreateTime"]); } if (output["SnapshotType"] !== undefined) { - contents.SnapshotType = - output["SnapshotType"]["#text"] !== undefined - ? output["SnapshotType"]["#text"] - : output["SnapshotType"]; + contents.SnapshotType = output["SnapshotType"]; } if (output["SourceDBSnapshotIdentifier"] !== undefined) { - contents.SourceDBSnapshotIdentifier = - output["SourceDBSnapshotIdentifier"]["#text"] !== undefined - ? output["SourceDBSnapshotIdentifier"]["#text"] - : output["SourceDBSnapshotIdentifier"]; + contents.SourceDBSnapshotIdentifier = output["SourceDBSnapshotIdentifier"]; } if (output["SourceRegion"] !== undefined) { - contents.SourceRegion = - output["SourceRegion"]["#text"] !== undefined - ? output["SourceRegion"]["#text"] - : output["SourceRegion"]; + contents.SourceRegion = output["SourceRegion"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["StorageType"] !== undefined) { - contents.StorageType = - output["StorageType"]["#text"] !== undefined - ? output["StorageType"]["#text"] - : output["StorageType"]; + contents.StorageType = output["StorageType"]; } if (output["TdeCredentialArn"] !== undefined) { - contents.TdeCredentialArn = - output["TdeCredentialArn"]["#text"] !== undefined - ? output["TdeCredentialArn"]["#text"] - : output["TdeCredentialArn"]; + contents.TdeCredentialArn = output["TdeCredentialArn"]; } if (output["Timezone"] !== undefined) { - contents.Timezone = - output["Timezone"]["#text"] !== undefined - ? output["Timezone"]["#text"] - : output["Timezone"]; + contents.Timezone = output["Timezone"]; } if (output["VpcId"] !== undefined) { - contents.VpcId = - output["VpcId"]["#text"] !== undefined - ? output["VpcId"]["#text"] - : output["VpcId"]; + contents.VpcId = output["VpcId"]; } return contents; }; @@ -27222,10 +26124,7 @@ const deserializeAws_queryDBSnapshotAttribute = ( AttributeValues: undefined }; if (output["AttributeName"] !== undefined) { - contents.AttributeName = - output["AttributeName"]["#text"] !== undefined - ? output["AttributeName"]["#text"] - : output["AttributeName"]; + contents.AttributeName = output["AttributeName"]; } if (output.AttributeValues === "") { contents.AttributeValues = []; @@ -27275,10 +26174,7 @@ const deserializeAws_queryDBSnapshotAttributesResult = ( ); } if (output["DBSnapshotIdentifier"] !== undefined) { - contents.DBSnapshotIdentifier = - output["DBSnapshotIdentifier"]["#text"] !== undefined - ? output["DBSnapshotIdentifier"]["#text"] - : output["DBSnapshotIdentifier"]; + contents.DBSnapshotIdentifier = output["DBSnapshotIdentifier"]; } return contents; }; @@ -27314,10 +26210,7 @@ const deserializeAws_queryDBSnapshotMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -27336,28 +26229,16 @@ const deserializeAws_queryDBSubnetGroup = ( VpcId: undefined }; if (output["DBSubnetGroupArn"] !== undefined) { - contents.DBSubnetGroupArn = - output["DBSubnetGroupArn"]["#text"] !== undefined - ? output["DBSubnetGroupArn"]["#text"] - : output["DBSubnetGroupArn"]; + contents.DBSubnetGroupArn = output["DBSubnetGroupArn"]; } if (output["DBSubnetGroupDescription"] !== undefined) { - contents.DBSubnetGroupDescription = - output["DBSubnetGroupDescription"]["#text"] !== undefined - ? output["DBSubnetGroupDescription"]["#text"] - : output["DBSubnetGroupDescription"]; + contents.DBSubnetGroupDescription = output["DBSubnetGroupDescription"]; } if (output["DBSubnetGroupName"] !== undefined) { - contents.DBSubnetGroupName = - output["DBSubnetGroupName"]["#text"] !== undefined - ? output["DBSubnetGroupName"]["#text"] - : output["DBSubnetGroupName"]; + contents.DBSubnetGroupName = output["DBSubnetGroupName"]; } if (output["SubnetGroupStatus"] !== undefined) { - contents.SubnetGroupStatus = - output["SubnetGroupStatus"]["#text"] !== undefined - ? output["SubnetGroupStatus"]["#text"] - : output["SubnetGroupStatus"]; + contents.SubnetGroupStatus = output["SubnetGroupStatus"]; } if (output.Subnets === "") { contents.Subnets = []; @@ -27372,10 +26253,7 @@ const deserializeAws_queryDBSubnetGroup = ( ); } if (output["VpcId"] !== undefined) { - contents.VpcId = - output["VpcId"]["#text"] !== undefined - ? output["VpcId"]["#text"] - : output["VpcId"]; + contents.VpcId = output["VpcId"]; } return contents; }; @@ -27402,10 +26280,7 @@ const deserializeAws_queryDBSubnetGroupMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -27607,24 +26482,13 @@ const deserializeAws_queryDescribeDBLogFilesDetails = ( Size: undefined }; if (output["LastWritten"] !== undefined) { - contents.LastWritten = parseInt( - output["LastWritten"]["#text"] !== undefined - ? output["LastWritten"]["#text"] - : output["LastWritten"] - ); + contents.LastWritten = parseInt(output["LastWritten"]); } if (output["LogFileName"] !== undefined) { - contents.LogFileName = - output["LogFileName"]["#text"] !== undefined - ? output["LogFileName"]["#text"] - : output["LogFileName"]; + contents.LogFileName = output["LogFileName"]; } if (output["Size"] !== undefined) { - contents.Size = parseInt( - output["Size"]["#text"] !== undefined - ? output["Size"]["#text"] - : output["Size"] - ); + contents.Size = parseInt(output["Size"]); } return contents; }; @@ -27662,10 +26526,7 @@ const deserializeAws_queryDescribeDBLogFilesResponse = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -27692,10 +26553,7 @@ const deserializeAws_queryDescribeDBProxiesResponse = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -27710,10 +26568,7 @@ const deserializeAws_queryDescribeDBProxyTargetGroupsResponse = ( TargetGroups: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.TargetGroups === "") { contents.TargetGroups = []; @@ -27740,10 +26595,7 @@ const deserializeAws_queryDescribeDBProxyTargetsResponse = ( Targets: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Targets === "") { contents.Targets = []; @@ -27840,28 +26692,16 @@ const deserializeAws_queryDomainMembership = ( Status: undefined }; if (output["Domain"] !== undefined) { - contents.Domain = - output["Domain"]["#text"] !== undefined - ? output["Domain"]["#text"] - : output["Domain"]; + contents.Domain = output["Domain"]; } if (output["FQDN"] !== undefined) { - contents.FQDN = - output["FQDN"]["#text"] !== undefined - ? output["FQDN"]["#text"] - : output["FQDN"]; + contents.FQDN = output["FQDN"]; } if (output["IAMRoleName"] !== undefined) { - contents.IAMRoleName = - output["IAMRoleName"]["#text"] !== undefined - ? output["IAMRoleName"]["#text"] - : output["IAMRoleName"]; + contents.IAMRoleName = output["IAMRoleName"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -27885,16 +26725,10 @@ const deserializeAws_queryDoubleRange = ( To: undefined }; if (output["From"] !== undefined) { - contents.From = parseFloat( - output["From"]["#text"] !== undefined - ? output["From"]["#text"] - : output["From"] - ); + contents.From = parseFloat(output["From"]); } if (output["To"] !== undefined) { - contents.To = parseFloat( - output["To"]["#text"] !== undefined ? output["To"]["#text"] : output["To"] - ); + contents.To = parseFloat(output["To"]); } return contents; }; @@ -27919,22 +26753,13 @@ const deserializeAws_queryDownloadDBLogFilePortionDetails = ( Marker: undefined }; if (output["AdditionalDataPending"] !== undefined) { - contents.AdditionalDataPending = - (output["AdditionalDataPending"]["#text"] !== undefined - ? output["AdditionalDataPending"]["#text"] - : output["AdditionalDataPending"]) == "true"; + contents.AdditionalDataPending = output["AdditionalDataPending"] == "true"; } if (output["LogFileData"] !== undefined) { - contents.LogFileData = - output["LogFileData"]["#text"] !== undefined - ? output["LogFileData"]["#text"] - : output["LogFileData"]; + contents.LogFileData = output["LogFileData"]; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -27951,28 +26776,16 @@ const deserializeAws_queryEC2SecurityGroup = ( Status: undefined }; if (output["EC2SecurityGroupId"] !== undefined) { - contents.EC2SecurityGroupId = - output["EC2SecurityGroupId"]["#text"] !== undefined - ? output["EC2SecurityGroupId"]["#text"] - : output["EC2SecurityGroupId"]; + contents.EC2SecurityGroupId = output["EC2SecurityGroupId"]; } if (output["EC2SecurityGroupName"] !== undefined) { - contents.EC2SecurityGroupName = - output["EC2SecurityGroupName"]["#text"] !== undefined - ? output["EC2SecurityGroupName"]["#text"] - : output["EC2SecurityGroupName"]; + contents.EC2SecurityGroupName = output["EC2SecurityGroupName"]; } if (output["EC2SecurityGroupOwnerId"] !== undefined) { - contents.EC2SecurityGroupOwnerId = - output["EC2SecurityGroupOwnerId"]["#text"] !== undefined - ? output["EC2SecurityGroupOwnerId"]["#text"] - : output["EC2SecurityGroupOwnerId"]; + contents.EC2SecurityGroupOwnerId = output["EC2SecurityGroupOwnerId"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -27997,23 +26810,13 @@ const deserializeAws_queryEndpoint = ( Port: undefined }; if (output["Address"] !== undefined) { - contents.Address = - output["Address"]["#text"] !== undefined - ? output["Address"]["#text"] - : output["Address"]; + contents.Address = output["Address"]; } if (output["HostedZoneId"] !== undefined) { - contents.HostedZoneId = - output["HostedZoneId"]["#text"] !== undefined - ? output["HostedZoneId"]["#text"] - : output["HostedZoneId"]; + contents.HostedZoneId = output["HostedZoneId"]; } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } return contents; }; @@ -28029,16 +26832,10 @@ const deserializeAws_queryEngineDefaults = ( Parameters: undefined }; if (output["DBParameterGroupFamily"] !== undefined) { - contents.DBParameterGroupFamily = - output["DBParameterGroupFamily"]["#text"] !== undefined - ? output["DBParameterGroupFamily"]["#text"] - : output["DBParameterGroupFamily"]; + contents.DBParameterGroupFamily = output["DBParameterGroupFamily"]; } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Parameters === "") { contents.Parameters = []; @@ -28059,9 +26856,7 @@ const deserializeAws_queryEngineModeList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryEvent = ( @@ -28093,28 +26888,16 @@ const deserializeAws_queryEvent = ( ); } if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } if (output["SourceArn"] !== undefined) { - contents.SourceArn = - output["SourceArn"]["#text"] !== undefined - ? output["SourceArn"]["#text"] - : output["SourceArn"]; + contents.SourceArn = output["SourceArn"]; } if (output["SourceIdentifier"] !== undefined) { - contents.SourceIdentifier = - output["SourceIdentifier"]["#text"] !== undefined - ? output["SourceIdentifier"]["#text"] - : output["SourceIdentifier"]; + contents.SourceIdentifier = output["SourceIdentifier"]; } if (output["SourceType"] !== undefined) { - contents.SourceType = - output["SourceType"]["#text"] !== undefined - ? output["SourceType"]["#text"] - : output["SourceType"]; + contents.SourceType = output["SourceType"]; } return contents; }; @@ -28123,9 +26906,7 @@ const deserializeAws_queryEventCategoriesList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryEventCategoriesMap = ( @@ -28150,10 +26931,7 @@ const deserializeAws_queryEventCategoriesMap = ( ); } if (output["SourceType"] !== undefined) { - contents.SourceType = - output["SourceType"]["#text"] !== undefined - ? output["SourceType"]["#text"] - : output["SourceType"]; + contents.SourceType = output["SourceType"]; } return contents; }; @@ -28219,22 +26997,13 @@ const deserializeAws_queryEventSubscription = ( SubscriptionCreationTime: undefined }; if (output["CustSubscriptionId"] !== undefined) { - contents.CustSubscriptionId = - output["CustSubscriptionId"]["#text"] !== undefined - ? output["CustSubscriptionId"]["#text"] - : output["CustSubscriptionId"]; + contents.CustSubscriptionId = output["CustSubscriptionId"]; } if (output["CustomerAwsId"] !== undefined) { - contents.CustomerAwsId = - output["CustomerAwsId"]["#text"] !== undefined - ? output["CustomerAwsId"]["#text"] - : output["CustomerAwsId"]; + contents.CustomerAwsId = output["CustomerAwsId"]; } if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } if (output.EventCategoriesList === "") { contents.EventCategoriesList = []; @@ -28249,16 +27018,10 @@ const deserializeAws_queryEventSubscription = ( ); } if (output["EventSubscriptionArn"] !== undefined) { - contents.EventSubscriptionArn = - output["EventSubscriptionArn"]["#text"] !== undefined - ? output["EventSubscriptionArn"]["#text"] - : output["EventSubscriptionArn"]; + contents.EventSubscriptionArn = output["EventSubscriptionArn"]; } if (output["SnsTopicArn"] !== undefined) { - contents.SnsTopicArn = - output["SnsTopicArn"]["#text"] !== undefined - ? output["SnsTopicArn"]["#text"] - : output["SnsTopicArn"]; + contents.SnsTopicArn = output["SnsTopicArn"]; } if (output.SourceIdsList === "") { contents.SourceIdsList = []; @@ -28273,22 +27036,13 @@ const deserializeAws_queryEventSubscription = ( ); } if (output["SourceType"] !== undefined) { - contents.SourceType = - output["SourceType"]["#text"] !== undefined - ? output["SourceType"]["#text"] - : output["SourceType"]; + contents.SourceType = output["SourceType"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["SubscriptionCreationTime"] !== undefined) { - contents.SubscriptionCreationTime = - output["SubscriptionCreationTime"]["#text"] !== undefined - ? output["SubscriptionCreationTime"]["#text"] - : output["SubscriptionCreationTime"]; + contents.SubscriptionCreationTime = output["SubscriptionCreationTime"]; } return contents; }; @@ -28326,10 +27080,7 @@ const deserializeAws_queryEventSubscriptionsMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -28356,10 +27107,7 @@ const deserializeAws_queryEventsMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -28385,9 +27133,7 @@ const deserializeAws_queryFeatureNameList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryGlobalCluster = ( @@ -28408,40 +27154,22 @@ const deserializeAws_queryGlobalCluster = ( StorageEncrypted: undefined }; if (output["DatabaseName"] !== undefined) { - contents.DatabaseName = - output["DatabaseName"]["#text"] !== undefined - ? output["DatabaseName"]["#text"] - : output["DatabaseName"]; + contents.DatabaseName = output["DatabaseName"]; } if (output["DeletionProtection"] !== undefined) { - contents.DeletionProtection = - (output["DeletionProtection"]["#text"] !== undefined - ? output["DeletionProtection"]["#text"] - : output["DeletionProtection"]) == "true"; + contents.DeletionProtection = output["DeletionProtection"] == "true"; } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["GlobalClusterArn"] !== undefined) { - contents.GlobalClusterArn = - output["GlobalClusterArn"]["#text"] !== undefined - ? output["GlobalClusterArn"]["#text"] - : output["GlobalClusterArn"]; + contents.GlobalClusterArn = output["GlobalClusterArn"]; } if (output["GlobalClusterIdentifier"] !== undefined) { - contents.GlobalClusterIdentifier = - output["GlobalClusterIdentifier"]["#text"] !== undefined - ? output["GlobalClusterIdentifier"]["#text"] - : output["GlobalClusterIdentifier"]; + contents.GlobalClusterIdentifier = output["GlobalClusterIdentifier"]; } if (output.GlobalClusterMembers === "") { contents.GlobalClusterMembers = []; @@ -28458,22 +27186,13 @@ const deserializeAws_queryGlobalCluster = ( ); } if (output["GlobalClusterResourceId"] !== undefined) { - contents.GlobalClusterResourceId = - output["GlobalClusterResourceId"]["#text"] !== undefined - ? output["GlobalClusterResourceId"]["#text"] - : output["GlobalClusterResourceId"]; + contents.GlobalClusterResourceId = output["GlobalClusterResourceId"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["StorageEncrypted"] !== undefined) { - contents.StorageEncrypted = - (output["StorageEncrypted"]["#text"] !== undefined - ? output["StorageEncrypted"]["#text"] - : output["StorageEncrypted"]) == "true"; + contents.StorageEncrypted = output["StorageEncrypted"] == "true"; } return contents; }; @@ -28498,16 +27217,10 @@ const deserializeAws_queryGlobalClusterMember = ( Readers: undefined }; if (output["DBClusterArn"] !== undefined) { - contents.DBClusterArn = - output["DBClusterArn"]["#text"] !== undefined - ? output["DBClusterArn"]["#text"] - : output["DBClusterArn"]; + contents.DBClusterArn = output["DBClusterArn"]; } if (output["IsWriter"] !== undefined) { - contents.IsWriter = - (output["IsWriter"]["#text"] !== undefined - ? output["IsWriter"]["#text"] - : output["IsWriter"]) == "true"; + contents.IsWriter = output["IsWriter"] == "true"; } if (output.Readers === "") { contents.Readers = []; @@ -28555,10 +27268,7 @@ const deserializeAws_queryGlobalClustersMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -28573,16 +27283,10 @@ const deserializeAws_queryIPRange = ( Status: undefined }; if (output["CIDRIP"] !== undefined) { - contents.CIDRIP = - output["CIDRIP"]["#text"] !== undefined - ? output["CIDRIP"]["#text"] - : output["CIDRIP"]; + contents.CIDRIP = output["CIDRIP"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -28612,28 +27316,17 @@ const deserializeAws_queryInstallationMedia = ( Status: undefined }; if (output["CustomAvailabilityZoneId"] !== undefined) { - contents.CustomAvailabilityZoneId = - output["CustomAvailabilityZoneId"]["#text"] !== undefined - ? output["CustomAvailabilityZoneId"]["#text"] - : output["CustomAvailabilityZoneId"]; + contents.CustomAvailabilityZoneId = output["CustomAvailabilityZoneId"]; } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineInstallationMediaPath"] !== undefined) { contents.EngineInstallationMediaPath = - output["EngineInstallationMediaPath"]["#text"] !== undefined - ? output["EngineInstallationMediaPath"]["#text"] - : output["EngineInstallationMediaPath"]; + output["EngineInstallationMediaPath"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["FailureCause"] !== undefined) { contents.FailureCause = deserializeAws_queryInstallationMediaFailureCause( @@ -28642,22 +27335,13 @@ const deserializeAws_queryInstallationMedia = ( ); } if (output["InstallationMediaId"] !== undefined) { - contents.InstallationMediaId = - output["InstallationMediaId"]["#text"] !== undefined - ? output["InstallationMediaId"]["#text"] - : output["InstallationMediaId"]; + contents.InstallationMediaId = output["InstallationMediaId"]; } if (output["OSInstallationMediaPath"] !== undefined) { - contents.OSInstallationMediaPath = - output["OSInstallationMediaPath"]["#text"] !== undefined - ? output["OSInstallationMediaPath"]["#text"] - : output["OSInstallationMediaPath"]; + contents.OSInstallationMediaPath = output["OSInstallationMediaPath"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -28671,10 +27355,7 @@ const deserializeAws_queryInstallationMediaFailureCause = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -28710,10 +27391,7 @@ const deserializeAws_queryInstallationMediaMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -28722,9 +27400,7 @@ const deserializeAws_queryLogTypeList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryMinimumEngineVersionPerAllowedValue = ( @@ -28737,16 +27413,10 @@ const deserializeAws_queryMinimumEngineVersionPerAllowedValue = ( MinimumEngineVersion: undefined }; if (output["AllowedValue"] !== undefined) { - contents.AllowedValue = - output["AllowedValue"]["#text"] !== undefined - ? output["AllowedValue"]["#text"] - : output["AllowedValue"]; + contents.AllowedValue = output["AllowedValue"]; } if (output["MinimumEngineVersion"] !== undefined) { - contents.MinimumEngineVersion = - output["MinimumEngineVersion"]["#text"] !== undefined - ? output["MinimumEngineVersion"]["#text"] - : output["MinimumEngineVersion"]; + contents.MinimumEngineVersion = output["MinimumEngineVersion"]; } return contents; }; @@ -28992,16 +27662,10 @@ const deserializeAws_queryOption = ( ); } if (output["OptionDescription"] !== undefined) { - contents.OptionDescription = - output["OptionDescription"]["#text"] !== undefined - ? output["OptionDescription"]["#text"] - : output["OptionDescription"]; + contents.OptionDescription = output["OptionDescription"]; } if (output["OptionName"] !== undefined) { - contents.OptionName = - output["OptionName"]["#text"] !== undefined - ? output["OptionName"]["#text"] - : output["OptionName"]; + contents.OptionName = output["OptionName"]; } if (output.OptionSettings === "") { contents.OptionSettings = []; @@ -29016,29 +27680,16 @@ const deserializeAws_queryOption = ( ); } if (output["OptionVersion"] !== undefined) { - contents.OptionVersion = - output["OptionVersion"]["#text"] !== undefined - ? output["OptionVersion"]["#text"] - : output["OptionVersion"]; + contents.OptionVersion = output["OptionVersion"]; } if (output["Permanent"] !== undefined) { - contents.Permanent = - (output["Permanent"]["#text"] !== undefined - ? output["Permanent"]["#text"] - : output["Permanent"]) == "true"; + contents.Permanent = output["Permanent"] == "true"; } if (output["Persistent"] !== undefined) { - contents.Persistent = - (output["Persistent"]["#text"] !== undefined - ? output["Persistent"]["#text"] - : output["Persistent"]) == "true"; + contents.Persistent = output["Persistent"] == "true"; } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } if (output.VpcSecurityGroupMemberships === "") { contents.VpcSecurityGroupMemberships = []; @@ -29075,39 +27726,22 @@ const deserializeAws_queryOptionGroup = ( }; if (output["AllowsVpcAndNonVpcInstanceMemberships"] !== undefined) { contents.AllowsVpcAndNonVpcInstanceMemberships = - (output["AllowsVpcAndNonVpcInstanceMemberships"]["#text"] !== undefined - ? output["AllowsVpcAndNonVpcInstanceMemberships"]["#text"] - : output["AllowsVpcAndNonVpcInstanceMemberships"]) == "true"; + output["AllowsVpcAndNonVpcInstanceMemberships"] == "true"; } if (output["EngineName"] !== undefined) { - contents.EngineName = - output["EngineName"]["#text"] !== undefined - ? output["EngineName"]["#text"] - : output["EngineName"]; + contents.EngineName = output["EngineName"]; } if (output["MajorEngineVersion"] !== undefined) { - contents.MajorEngineVersion = - output["MajorEngineVersion"]["#text"] !== undefined - ? output["MajorEngineVersion"]["#text"] - : output["MajorEngineVersion"]; + contents.MajorEngineVersion = output["MajorEngineVersion"]; } if (output["OptionGroupArn"] !== undefined) { - contents.OptionGroupArn = - output["OptionGroupArn"]["#text"] !== undefined - ? output["OptionGroupArn"]["#text"] - : output["OptionGroupArn"]; + contents.OptionGroupArn = output["OptionGroupArn"]; } if (output["OptionGroupDescription"] !== undefined) { - contents.OptionGroupDescription = - output["OptionGroupDescription"]["#text"] !== undefined - ? output["OptionGroupDescription"]["#text"] - : output["OptionGroupDescription"]; + contents.OptionGroupDescription = output["OptionGroupDescription"]; } if (output["OptionGroupName"] !== undefined) { - contents.OptionGroupName = - output["OptionGroupName"]["#text"] !== undefined - ? output["OptionGroupName"]["#text"] - : output["OptionGroupName"]; + contents.OptionGroupName = output["OptionGroupName"]; } if (output.Options === "") { contents.Options = []; @@ -29122,10 +27756,7 @@ const deserializeAws_queryOptionGroup = ( ); } if (output["VpcId"] !== undefined) { - contents.VpcId = - output["VpcId"]["#text"] !== undefined - ? output["VpcId"]["#text"] - : output["VpcId"]; + contents.VpcId = output["VpcId"]; } return contents; }; @@ -29140,16 +27771,10 @@ const deserializeAws_queryOptionGroupMembership = ( Status: undefined }; if (output["OptionGroupName"] !== undefined) { - contents.OptionGroupName = - output["OptionGroupName"]["#text"] !== undefined - ? output["OptionGroupName"]["#text"] - : output["OptionGroupName"]; + contents.OptionGroupName = output["OptionGroupName"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -29187,41 +27812,23 @@ const deserializeAws_queryOptionGroupOption = ( VpcOnly: undefined }; if (output["DefaultPort"] !== undefined) { - contents.DefaultPort = parseInt( - output["DefaultPort"]["#text"] !== undefined - ? output["DefaultPort"]["#text"] - : output["DefaultPort"] - ); + contents.DefaultPort = parseInt(output["DefaultPort"]); } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["EngineName"] !== undefined) { - contents.EngineName = - output["EngineName"]["#text"] !== undefined - ? output["EngineName"]["#text"] - : output["EngineName"]; + contents.EngineName = output["EngineName"]; } if (output["MajorEngineVersion"] !== undefined) { - contents.MajorEngineVersion = - output["MajorEngineVersion"]["#text"] !== undefined - ? output["MajorEngineVersion"]["#text"] - : output["MajorEngineVersion"]; + contents.MajorEngineVersion = output["MajorEngineVersion"]; } if (output["MinimumRequiredMinorEngineVersion"] !== undefined) { contents.MinimumRequiredMinorEngineVersion = - output["MinimumRequiredMinorEngineVersion"]["#text"] !== undefined - ? output["MinimumRequiredMinorEngineVersion"]["#text"] - : output["MinimumRequiredMinorEngineVersion"]; + output["MinimumRequiredMinorEngineVersion"]; } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output.OptionGroupOptionSettings === "") { contents.OptionGroupOptionSettings = []; @@ -29279,40 +27886,24 @@ const deserializeAws_queryOptionGroupOption = ( ); } if (output["Permanent"] !== undefined) { - contents.Permanent = - (output["Permanent"]["#text"] !== undefined - ? output["Permanent"]["#text"] - : output["Permanent"]) == "true"; + contents.Permanent = output["Permanent"] == "true"; } if (output["Persistent"] !== undefined) { - contents.Persistent = - (output["Persistent"]["#text"] !== undefined - ? output["Persistent"]["#text"] - : output["Persistent"]) == "true"; + contents.Persistent = output["Persistent"] == "true"; } if (output["PortRequired"] !== undefined) { - contents.PortRequired = - (output["PortRequired"]["#text"] !== undefined - ? output["PortRequired"]["#text"] - : output["PortRequired"]) == "true"; + contents.PortRequired = output["PortRequired"] == "true"; } if (output["RequiresAutoMinorEngineVersionUpgrade"] !== undefined) { contents.RequiresAutoMinorEngineVersionUpgrade = - (output["RequiresAutoMinorEngineVersionUpgrade"]["#text"] !== undefined - ? output["RequiresAutoMinorEngineVersionUpgrade"]["#text"] - : output["RequiresAutoMinorEngineVersionUpgrade"]) == "true"; + output["RequiresAutoMinorEngineVersionUpgrade"] == "true"; } if (output["SupportsOptionVersionDowngrade"] !== undefined) { contents.SupportsOptionVersionDowngrade = - (output["SupportsOptionVersionDowngrade"]["#text"] !== undefined - ? output["SupportsOptionVersionDowngrade"]["#text"] - : output["SupportsOptionVersionDowngrade"]) == "true"; + output["SupportsOptionVersionDowngrade"] == "true"; } if (output["VpcOnly"] !== undefined) { - contents.VpcOnly = - (output["VpcOnly"]["#text"] !== undefined - ? output["VpcOnly"]["#text"] - : output["VpcOnly"]) == "true"; + contents.VpcOnly = output["VpcOnly"] == "true"; } return contents; }; @@ -29333,34 +27924,19 @@ const deserializeAws_queryOptionGroupOptionSetting = ( SettingName: undefined }; if (output["AllowedValues"] !== undefined) { - contents.AllowedValues = - output["AllowedValues"]["#text"] !== undefined - ? output["AllowedValues"]["#text"] - : output["AllowedValues"]; + contents.AllowedValues = output["AllowedValues"]; } if (output["ApplyType"] !== undefined) { - contents.ApplyType = - output["ApplyType"]["#text"] !== undefined - ? output["ApplyType"]["#text"] - : output["ApplyType"]; + contents.ApplyType = output["ApplyType"]; } if (output["DefaultValue"] !== undefined) { - contents.DefaultValue = - output["DefaultValue"]["#text"] !== undefined - ? output["DefaultValue"]["#text"] - : output["DefaultValue"]; + contents.DefaultValue = output["DefaultValue"]; } if (output["IsModifiable"] !== undefined) { - contents.IsModifiable = - (output["IsModifiable"]["#text"] !== undefined - ? output["IsModifiable"]["#text"] - : output["IsModifiable"]) == "true"; + contents.IsModifiable = output["IsModifiable"] == "true"; } if (output["IsRequired"] !== undefined) { - contents.IsRequired = - (output["IsRequired"]["#text"] !== undefined - ? output["IsRequired"]["#text"] - : output["IsRequired"]) == "true"; + contents.IsRequired = output["IsRequired"] == "true"; } if (output.MinimumEngineVersionPerAllowedValue === "") { contents.MinimumEngineVersionPerAllowedValue = []; @@ -29381,16 +27957,10 @@ const deserializeAws_queryOptionGroupOptionSetting = ( ); } if (output["SettingDescription"] !== undefined) { - contents.SettingDescription = - output["SettingDescription"]["#text"] !== undefined - ? output["SettingDescription"]["#text"] - : output["SettingDescription"]; + contents.SettingDescription = output["SettingDescription"]; } if (output["SettingName"] !== undefined) { - contents.SettingName = - output["SettingName"]["#text"] !== undefined - ? output["SettingName"]["#text"] - : output["SettingName"]; + contents.SettingName = output["SettingName"]; } return contents; }; @@ -29432,10 +28002,7 @@ const deserializeAws_queryOptionGroupOptionsMessage = ( OptionGroupOptions: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.OptionGroupOptions === "") { contents.OptionGroupOptions = []; @@ -29462,10 +28029,7 @@ const deserializeAws_queryOptionGroups = ( OptionGroupsList: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.OptionGroupsList === "") { contents.OptionGroupsList = []; @@ -29508,58 +28072,31 @@ const deserializeAws_queryOptionSetting = ( Value: undefined }; if (output["AllowedValues"] !== undefined) { - contents.AllowedValues = - output["AllowedValues"]["#text"] !== undefined - ? output["AllowedValues"]["#text"] - : output["AllowedValues"]; + contents.AllowedValues = output["AllowedValues"]; } if (output["ApplyType"] !== undefined) { - contents.ApplyType = - output["ApplyType"]["#text"] !== undefined - ? output["ApplyType"]["#text"] - : output["ApplyType"]; + contents.ApplyType = output["ApplyType"]; } if (output["DataType"] !== undefined) { - contents.DataType = - output["DataType"]["#text"] !== undefined - ? output["DataType"]["#text"] - : output["DataType"]; + contents.DataType = output["DataType"]; } if (output["DefaultValue"] !== undefined) { - contents.DefaultValue = - output["DefaultValue"]["#text"] !== undefined - ? output["DefaultValue"]["#text"] - : output["DefaultValue"]; + contents.DefaultValue = output["DefaultValue"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["IsCollection"] !== undefined) { - contents.IsCollection = - (output["IsCollection"]["#text"] !== undefined - ? output["IsCollection"]["#text"] - : output["IsCollection"]) == "true"; + contents.IsCollection = output["IsCollection"] == "true"; } if (output["IsModifiable"] !== undefined) { - contents.IsModifiable = - (output["IsModifiable"]["#text"] !== undefined - ? output["IsModifiable"]["#text"] - : output["IsModifiable"]) == "true"; + contents.IsModifiable = output["IsModifiable"] == "true"; } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -29583,16 +28120,10 @@ const deserializeAws_queryOptionVersion = ( Version: undefined }; if (output["IsDefault"] !== undefined) { - contents.IsDefault = - (output["IsDefault"]["#text"] !== undefined - ? output["IsDefault"]["#text"] - : output["IsDefault"]) == "true"; + contents.IsDefault = output["IsDefault"] == "true"; } if (output["Version"] !== undefined) { - contents.Version = - output["Version"]["#text"] !== undefined - ? output["Version"]["#text"] - : output["Version"]; + contents.Version = output["Version"]; } return contents; }; @@ -29601,18 +28132,14 @@ const deserializeAws_queryOptionsConflictsWith = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryOptionsDependedOn = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryOptionsList = ( @@ -29683,88 +28210,43 @@ const deserializeAws_queryOrderableDBInstanceOption = ( ); } if (output["DBInstanceClass"] !== undefined) { - contents.DBInstanceClass = - output["DBInstanceClass"]["#text"] !== undefined - ? output["DBInstanceClass"]["#text"] - : output["DBInstanceClass"]; + contents.DBInstanceClass = output["DBInstanceClass"]; } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["LicenseModel"] !== undefined) { - contents.LicenseModel = - output["LicenseModel"]["#text"] !== undefined - ? output["LicenseModel"]["#text"] - : output["LicenseModel"]; + contents.LicenseModel = output["LicenseModel"]; } if (output["MaxIopsPerDbInstance"] !== undefined) { - contents.MaxIopsPerDbInstance = parseInt( - output["MaxIopsPerDbInstance"]["#text"] !== undefined - ? output["MaxIopsPerDbInstance"]["#text"] - : output["MaxIopsPerDbInstance"] - ); + contents.MaxIopsPerDbInstance = parseInt(output["MaxIopsPerDbInstance"]); } if (output["MaxIopsPerGib"] !== undefined) { - contents.MaxIopsPerGib = parseFloat( - output["MaxIopsPerGib"]["#text"] !== undefined - ? output["MaxIopsPerGib"]["#text"] - : output["MaxIopsPerGib"] - ); + contents.MaxIopsPerGib = parseFloat(output["MaxIopsPerGib"]); } if (output["MaxStorageSize"] !== undefined) { - contents.MaxStorageSize = parseInt( - output["MaxStorageSize"]["#text"] !== undefined - ? output["MaxStorageSize"]["#text"] - : output["MaxStorageSize"] - ); + contents.MaxStorageSize = parseInt(output["MaxStorageSize"]); } if (output["MinIopsPerDbInstance"] !== undefined) { - contents.MinIopsPerDbInstance = parseInt( - output["MinIopsPerDbInstance"]["#text"] !== undefined - ? output["MinIopsPerDbInstance"]["#text"] - : output["MinIopsPerDbInstance"] - ); + contents.MinIopsPerDbInstance = parseInt(output["MinIopsPerDbInstance"]); } if (output["MinIopsPerGib"] !== undefined) { - contents.MinIopsPerGib = parseFloat( - output["MinIopsPerGib"]["#text"] !== undefined - ? output["MinIopsPerGib"]["#text"] - : output["MinIopsPerGib"] - ); + contents.MinIopsPerGib = parseFloat(output["MinIopsPerGib"]); } if (output["MinStorageSize"] !== undefined) { - contents.MinStorageSize = parseInt( - output["MinStorageSize"]["#text"] !== undefined - ? output["MinStorageSize"]["#text"] - : output["MinStorageSize"] - ); + contents.MinStorageSize = parseInt(output["MinStorageSize"]); } if (output["MultiAZCapable"] !== undefined) { - contents.MultiAZCapable = - (output["MultiAZCapable"]["#text"] !== undefined - ? output["MultiAZCapable"]["#text"] - : output["MultiAZCapable"]) == "true"; + contents.MultiAZCapable = output["MultiAZCapable"] == "true"; } if (output["ReadReplicaCapable"] !== undefined) { - contents.ReadReplicaCapable = - (output["ReadReplicaCapable"]["#text"] !== undefined - ? output["ReadReplicaCapable"]["#text"] - : output["ReadReplicaCapable"]) == "true"; + contents.ReadReplicaCapable = output["ReadReplicaCapable"] == "true"; } if (output["StorageType"] !== undefined) { - contents.StorageType = - output["StorageType"]["#text"] !== undefined - ? output["StorageType"]["#text"] - : output["StorageType"]; + contents.StorageType = output["StorageType"]; } if (output.SupportedEngineModes === "") { contents.SupportedEngineModes = []; @@ -29780,51 +28262,33 @@ const deserializeAws_queryOrderableDBInstanceOption = ( } if (output["SupportsEnhancedMonitoring"] !== undefined) { contents.SupportsEnhancedMonitoring = - (output["SupportsEnhancedMonitoring"]["#text"] !== undefined - ? output["SupportsEnhancedMonitoring"]["#text"] - : output["SupportsEnhancedMonitoring"]) == "true"; + output["SupportsEnhancedMonitoring"] == "true"; } if (output["SupportsIAMDatabaseAuthentication"] !== undefined) { contents.SupportsIAMDatabaseAuthentication = - (output["SupportsIAMDatabaseAuthentication"]["#text"] !== undefined - ? output["SupportsIAMDatabaseAuthentication"]["#text"] - : output["SupportsIAMDatabaseAuthentication"]) == "true"; + output["SupportsIAMDatabaseAuthentication"] == "true"; } if (output["SupportsIops"] !== undefined) { - contents.SupportsIops = - (output["SupportsIops"]["#text"] !== undefined - ? output["SupportsIops"]["#text"] - : output["SupportsIops"]) == "true"; + contents.SupportsIops = output["SupportsIops"] == "true"; } if (output["SupportsKerberosAuthentication"] !== undefined) { contents.SupportsKerberosAuthentication = - (output["SupportsKerberosAuthentication"]["#text"] !== undefined - ? output["SupportsKerberosAuthentication"]["#text"] - : output["SupportsKerberosAuthentication"]) == "true"; + output["SupportsKerberosAuthentication"] == "true"; } if (output["SupportsPerformanceInsights"] !== undefined) { contents.SupportsPerformanceInsights = - (output["SupportsPerformanceInsights"]["#text"] !== undefined - ? output["SupportsPerformanceInsights"]["#text"] - : output["SupportsPerformanceInsights"]) == "true"; + output["SupportsPerformanceInsights"] == "true"; } if (output["SupportsStorageAutoscaling"] !== undefined) { contents.SupportsStorageAutoscaling = - (output["SupportsStorageAutoscaling"]["#text"] !== undefined - ? output["SupportsStorageAutoscaling"]["#text"] - : output["SupportsStorageAutoscaling"]) == "true"; + output["SupportsStorageAutoscaling"] == "true"; } if (output["SupportsStorageEncryption"] !== undefined) { contents.SupportsStorageEncryption = - (output["SupportsStorageEncryption"]["#text"] !== undefined - ? output["SupportsStorageEncryption"]["#text"] - : output["SupportsStorageEncryption"]) == "true"; + output["SupportsStorageEncryption"] == "true"; } if (output["Vpc"] !== undefined) { - contents.Vpc = - (output["Vpc"]["#text"] !== undefined - ? output["Vpc"]["#text"] - : output["Vpc"]) == "true"; + contents.Vpc = output["Vpc"] == "true"; } return contents; }; @@ -29848,10 +28312,7 @@ const deserializeAws_queryOrderableDBInstanceOptionsMessage = ( OrderableDBInstanceOptions: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.OrderableDBInstanceOptions === "") { contents.OrderableDBInstanceOptions = []; @@ -29890,64 +28351,34 @@ const deserializeAws_queryParameter = ( SupportedEngineModes: undefined }; if (output["AllowedValues"] !== undefined) { - contents.AllowedValues = - output["AllowedValues"]["#text"] !== undefined - ? output["AllowedValues"]["#text"] - : output["AllowedValues"]; + contents.AllowedValues = output["AllowedValues"]; } if (output["ApplyMethod"] !== undefined) { - contents.ApplyMethod = - output["ApplyMethod"]["#text"] !== undefined - ? output["ApplyMethod"]["#text"] - : output["ApplyMethod"]; + contents.ApplyMethod = output["ApplyMethod"]; } if (output["ApplyType"] !== undefined) { - contents.ApplyType = - output["ApplyType"]["#text"] !== undefined - ? output["ApplyType"]["#text"] - : output["ApplyType"]; + contents.ApplyType = output["ApplyType"]; } if (output["DataType"] !== undefined) { - contents.DataType = - output["DataType"]["#text"] !== undefined - ? output["DataType"]["#text"] - : output["DataType"]; + contents.DataType = output["DataType"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["IsModifiable"] !== undefined) { - contents.IsModifiable = - (output["IsModifiable"]["#text"] !== undefined - ? output["IsModifiable"]["#text"] - : output["IsModifiable"]) == "true"; + contents.IsModifiable = output["IsModifiable"] == "true"; } if (output["MinimumEngineVersion"] !== undefined) { - contents.MinimumEngineVersion = - output["MinimumEngineVersion"]["#text"] !== undefined - ? output["MinimumEngineVersion"]["#text"] - : output["MinimumEngineVersion"]; + contents.MinimumEngineVersion = output["MinimumEngineVersion"]; } if (output["ParameterName"] !== undefined) { - contents.ParameterName = - output["ParameterName"]["#text"] !== undefined - ? output["ParameterName"]["#text"] - : output["ParameterName"]; + contents.ParameterName = output["ParameterName"]; } if (output["ParameterValue"] !== undefined) { - contents.ParameterValue = - output["ParameterValue"]["#text"] !== undefined - ? output["ParameterValue"]["#text"] - : output["ParameterValue"]; + contents.ParameterValue = output["ParameterValue"]; } if (output["Source"] !== undefined) { - contents.Source = - output["Source"]["#text"] !== undefined - ? output["Source"]["#text"] - : output["Source"]; + contents.Source = output["Source"]; } if (output.SupportedEngineModes === "") { contents.SupportedEngineModes = []; @@ -30023,10 +28454,7 @@ const deserializeAws_queryPendingMaintenanceAction = ( OptInStatus: undefined }; if (output["Action"] !== undefined) { - contents.Action = - output["Action"]["#text"] !== undefined - ? output["Action"]["#text"] - : output["Action"]; + contents.Action = output["Action"]; } if (output["AutoAppliedAfterDate"] !== undefined) { contents.AutoAppliedAfterDate = new Date(output["AutoAppliedAfterDate"]); @@ -30035,19 +28463,13 @@ const deserializeAws_queryPendingMaintenanceAction = ( contents.CurrentApplyDate = new Date(output["CurrentApplyDate"]); } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["ForcedApplyDate"] !== undefined) { contents.ForcedApplyDate = new Date(output["ForcedApplyDate"]); } if (output["OptInStatus"] !== undefined) { - contents.OptInStatus = - output["OptInStatus"]["#text"] !== undefined - ? output["OptInStatus"]["#text"] - : output["OptInStatus"]; + contents.OptInStatus = output["OptInStatus"]; } return contents; }; @@ -30080,10 +28502,7 @@ const deserializeAws_queryPendingMaintenanceActionsMessage = ( PendingMaintenanceActions: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.PendingMaintenanceActions === "") { contents.PendingMaintenanceActions = []; @@ -30126,73 +28545,37 @@ const deserializeAws_queryPendingModifiedValues = ( StorageType: undefined }; if (output["AllocatedStorage"] !== undefined) { - contents.AllocatedStorage = parseInt( - output["AllocatedStorage"]["#text"] !== undefined - ? output["AllocatedStorage"]["#text"] - : output["AllocatedStorage"] - ); + contents.AllocatedStorage = parseInt(output["AllocatedStorage"]); } if (output["BackupRetentionPeriod"] !== undefined) { - contents.BackupRetentionPeriod = parseInt( - output["BackupRetentionPeriod"]["#text"] !== undefined - ? output["BackupRetentionPeriod"]["#text"] - : output["BackupRetentionPeriod"] - ); + contents.BackupRetentionPeriod = parseInt(output["BackupRetentionPeriod"]); } if (output["CACertificateIdentifier"] !== undefined) { - contents.CACertificateIdentifier = - output["CACertificateIdentifier"]["#text"] !== undefined - ? output["CACertificateIdentifier"]["#text"] - : output["CACertificateIdentifier"]; + contents.CACertificateIdentifier = output["CACertificateIdentifier"]; } if (output["DBInstanceClass"] !== undefined) { - contents.DBInstanceClass = - output["DBInstanceClass"]["#text"] !== undefined - ? output["DBInstanceClass"]["#text"] - : output["DBInstanceClass"]; + contents.DBInstanceClass = output["DBInstanceClass"]; } if (output["DBInstanceIdentifier"] !== undefined) { - contents.DBInstanceIdentifier = - output["DBInstanceIdentifier"]["#text"] !== undefined - ? output["DBInstanceIdentifier"]["#text"] - : output["DBInstanceIdentifier"]; + contents.DBInstanceIdentifier = output["DBInstanceIdentifier"]; } if (output["DBSubnetGroupName"] !== undefined) { - contents.DBSubnetGroupName = - output["DBSubnetGroupName"]["#text"] !== undefined - ? output["DBSubnetGroupName"]["#text"] - : output["DBSubnetGroupName"]; + contents.DBSubnetGroupName = output["DBSubnetGroupName"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["Iops"] !== undefined) { - contents.Iops = parseInt( - output["Iops"]["#text"] !== undefined - ? output["Iops"]["#text"] - : output["Iops"] - ); + contents.Iops = parseInt(output["Iops"]); } if (output["LicenseModel"] !== undefined) { - contents.LicenseModel = - output["LicenseModel"]["#text"] !== undefined - ? output["LicenseModel"]["#text"] - : output["LicenseModel"]; + contents.LicenseModel = output["LicenseModel"]; } if (output["MasterUserPassword"] !== undefined) { - contents.MasterUserPassword = - output["MasterUserPassword"]["#text"] !== undefined - ? output["MasterUserPassword"]["#text"] - : output["MasterUserPassword"]; + contents.MasterUserPassword = output["MasterUserPassword"]; } if (output["MultiAZ"] !== undefined) { - contents.MultiAZ = - (output["MultiAZ"]["#text"] !== undefined - ? output["MultiAZ"]["#text"] - : output["MultiAZ"]) == "true"; + contents.MultiAZ = output["MultiAZ"] == "true"; } if (output["PendingCloudwatchLogsExports"] !== undefined) { contents.PendingCloudwatchLogsExports = deserializeAws_queryPendingCloudwatchLogsExports( @@ -30201,11 +28584,7 @@ const deserializeAws_queryPendingModifiedValues = ( ); } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } if (output.ProcessorFeatures === "") { contents.ProcessorFeatures = []; @@ -30220,10 +28599,7 @@ const deserializeAws_queryPendingModifiedValues = ( ); } if (output["StorageType"] !== undefined) { - contents.StorageType = - output["StorageType"]["#text"] !== undefined - ? output["StorageType"]["#text"] - : output["StorageType"]; + contents.StorageType = output["StorageType"]; } return contents; }; @@ -30238,16 +28614,10 @@ const deserializeAws_queryProcessorFeature = ( Value: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -30323,23 +28693,13 @@ const deserializeAws_queryRange = ( To: undefined }; if (output["From"] !== undefined) { - contents.From = parseInt( - output["From"]["#text"] !== undefined - ? output["From"]["#text"] - : output["From"] - ); + contents.From = parseInt(output["From"]); } if (output["Step"] !== undefined) { - contents.Step = parseInt( - output["Step"]["#text"] !== undefined - ? output["Step"]["#text"] - : output["Step"] - ); + contents.Step = parseInt(output["Step"]); } if (output["To"] !== undefined) { - contents.To = parseInt( - output["To"]["#text"] !== undefined ? output["To"]["#text"] : output["To"] - ); + contents.To = parseInt(output["To"]); } return contents; }; @@ -30357,36 +28717,28 @@ const deserializeAws_queryReadReplicaDBClusterIdentifierList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryReadReplicaDBInstanceIdentifierList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryReadReplicaIdentifierList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryReadersArnList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryRebootDBInstanceResult = ( @@ -30417,16 +28769,11 @@ const deserializeAws_queryRecurringCharge = ( }; if (output["RecurringChargeAmount"] !== undefined) { contents.RecurringChargeAmount = parseFloat( - output["RecurringChargeAmount"]["#text"] !== undefined - ? output["RecurringChargeAmount"]["#text"] - : output["RecurringChargeAmount"] + output["RecurringChargeAmount"] ); } if (output["RecurringChargeFrequency"] !== undefined) { - contents.RecurringChargeFrequency = - output["RecurringChargeFrequency"]["#text"] !== undefined - ? output["RecurringChargeFrequency"]["#text"] - : output["RecurringChargeFrequency"]; + contents.RecurringChargeFrequency = output["RecurringChargeFrequency"]; } return contents; }; @@ -30521,61 +28868,31 @@ const deserializeAws_queryReservedDBInstance = ( UsagePrice: undefined }; if (output["CurrencyCode"] !== undefined) { - contents.CurrencyCode = - output["CurrencyCode"]["#text"] !== undefined - ? output["CurrencyCode"]["#text"] - : output["CurrencyCode"]; + contents.CurrencyCode = output["CurrencyCode"]; } if (output["DBInstanceClass"] !== undefined) { - contents.DBInstanceClass = - output["DBInstanceClass"]["#text"] !== undefined - ? output["DBInstanceClass"]["#text"] - : output["DBInstanceClass"]; + contents.DBInstanceClass = output["DBInstanceClass"]; } if (output["DBInstanceCount"] !== undefined) { - contents.DBInstanceCount = parseInt( - output["DBInstanceCount"]["#text"] !== undefined - ? output["DBInstanceCount"]["#text"] - : output["DBInstanceCount"] - ); + contents.DBInstanceCount = parseInt(output["DBInstanceCount"]); } if (output["Duration"] !== undefined) { - contents.Duration = parseInt( - output["Duration"]["#text"] !== undefined - ? output["Duration"]["#text"] - : output["Duration"] - ); + contents.Duration = parseInt(output["Duration"]); } if (output["FixedPrice"] !== undefined) { - contents.FixedPrice = parseFloat( - output["FixedPrice"]["#text"] !== undefined - ? output["FixedPrice"]["#text"] - : output["FixedPrice"] - ); + contents.FixedPrice = parseFloat(output["FixedPrice"]); } if (output["LeaseId"] !== undefined) { - contents.LeaseId = - output["LeaseId"]["#text"] !== undefined - ? output["LeaseId"]["#text"] - : output["LeaseId"]; + contents.LeaseId = output["LeaseId"]; } if (output["MultiAZ"] !== undefined) { - contents.MultiAZ = - (output["MultiAZ"]["#text"] !== undefined - ? output["MultiAZ"]["#text"] - : output["MultiAZ"]) == "true"; + contents.MultiAZ = output["MultiAZ"] == "true"; } if (output["OfferingType"] !== undefined) { - contents.OfferingType = - output["OfferingType"]["#text"] !== undefined - ? output["OfferingType"]["#text"] - : output["OfferingType"]; + contents.OfferingType = output["OfferingType"]; } if (output["ProductDescription"] !== undefined) { - contents.ProductDescription = - output["ProductDescription"]["#text"] !== undefined - ? output["ProductDescription"]["#text"] - : output["ProductDescription"]; + contents.ProductDescription = output["ProductDescription"]; } if (output.RecurringCharges === "") { contents.RecurringCharges = []; @@ -30590,38 +28907,23 @@ const deserializeAws_queryReservedDBInstance = ( ); } if (output["ReservedDBInstanceArn"] !== undefined) { - contents.ReservedDBInstanceArn = - output["ReservedDBInstanceArn"]["#text"] !== undefined - ? output["ReservedDBInstanceArn"]["#text"] - : output["ReservedDBInstanceArn"]; + contents.ReservedDBInstanceArn = output["ReservedDBInstanceArn"]; } if (output["ReservedDBInstanceId"] !== undefined) { - contents.ReservedDBInstanceId = - output["ReservedDBInstanceId"]["#text"] !== undefined - ? output["ReservedDBInstanceId"]["#text"] - : output["ReservedDBInstanceId"]; + contents.ReservedDBInstanceId = output["ReservedDBInstanceId"]; } if (output["ReservedDBInstancesOfferingId"] !== undefined) { contents.ReservedDBInstancesOfferingId = - output["ReservedDBInstancesOfferingId"]["#text"] !== undefined - ? output["ReservedDBInstancesOfferingId"]["#text"] - : output["ReservedDBInstancesOfferingId"]; + output["ReservedDBInstancesOfferingId"]; } if (output["StartTime"] !== undefined) { contents.StartTime = new Date(output["StartTime"]); } if (output["State"] !== undefined) { - contents.State = - output["State"]["#text"] !== undefined - ? output["State"]["#text"] - : output["State"]; + contents.State = output["State"]; } if (output["UsagePrice"] !== undefined) { - contents.UsagePrice = parseFloat( - output["UsagePrice"]["#text"] !== undefined - ? output["UsagePrice"]["#text"] - : output["UsagePrice"] - ); + contents.UsagePrice = parseFloat(output["UsagePrice"]); } return contents; }; @@ -30645,10 +28947,7 @@ const deserializeAws_queryReservedDBInstanceMessage = ( ReservedDBInstances: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.ReservedDBInstances === "") { contents.ReservedDBInstances = []; @@ -30685,48 +28984,25 @@ const deserializeAws_queryReservedDBInstancesOffering = ( UsagePrice: undefined }; if (output["CurrencyCode"] !== undefined) { - contents.CurrencyCode = - output["CurrencyCode"]["#text"] !== undefined - ? output["CurrencyCode"]["#text"] - : output["CurrencyCode"]; + contents.CurrencyCode = output["CurrencyCode"]; } if (output["DBInstanceClass"] !== undefined) { - contents.DBInstanceClass = - output["DBInstanceClass"]["#text"] !== undefined - ? output["DBInstanceClass"]["#text"] - : output["DBInstanceClass"]; + contents.DBInstanceClass = output["DBInstanceClass"]; } if (output["Duration"] !== undefined) { - contents.Duration = parseInt( - output["Duration"]["#text"] !== undefined - ? output["Duration"]["#text"] - : output["Duration"] - ); + contents.Duration = parseInt(output["Duration"]); } if (output["FixedPrice"] !== undefined) { - contents.FixedPrice = parseFloat( - output["FixedPrice"]["#text"] !== undefined - ? output["FixedPrice"]["#text"] - : output["FixedPrice"] - ); + contents.FixedPrice = parseFloat(output["FixedPrice"]); } if (output["MultiAZ"] !== undefined) { - contents.MultiAZ = - (output["MultiAZ"]["#text"] !== undefined - ? output["MultiAZ"]["#text"] - : output["MultiAZ"]) == "true"; + contents.MultiAZ = output["MultiAZ"] == "true"; } if (output["OfferingType"] !== undefined) { - contents.OfferingType = - output["OfferingType"]["#text"] !== undefined - ? output["OfferingType"]["#text"] - : output["OfferingType"]; + contents.OfferingType = output["OfferingType"]; } if (output["ProductDescription"] !== undefined) { - contents.ProductDescription = - output["ProductDescription"]["#text"] !== undefined - ? output["ProductDescription"]["#text"] - : output["ProductDescription"]; + contents.ProductDescription = output["ProductDescription"]; } if (output.RecurringCharges === "") { contents.RecurringCharges = []; @@ -30742,16 +29018,10 @@ const deserializeAws_queryReservedDBInstancesOffering = ( } if (output["ReservedDBInstancesOfferingId"] !== undefined) { contents.ReservedDBInstancesOfferingId = - output["ReservedDBInstancesOfferingId"]["#text"] !== undefined - ? output["ReservedDBInstancesOfferingId"]["#text"] - : output["ReservedDBInstancesOfferingId"]; + output["ReservedDBInstancesOfferingId"]; } if (output["UsagePrice"] !== undefined) { - contents.UsagePrice = parseFloat( - output["UsagePrice"]["#text"] !== undefined - ? output["UsagePrice"]["#text"] - : output["UsagePrice"] - ); + contents.UsagePrice = parseFloat(output["UsagePrice"]); } return contents; }; @@ -30775,10 +29045,7 @@ const deserializeAws_queryReservedDBInstancesOfferingMessage = ( ReservedDBInstancesOfferings: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.ReservedDBInstancesOfferings === "") { contents.ReservedDBInstancesOfferings = []; @@ -30823,10 +29090,7 @@ const deserializeAws_queryResourcePendingMaintenanceActions = ( ); } if (output["ResourceIdentifier"] !== undefined) { - contents.ResourceIdentifier = - output["ResourceIdentifier"]["#text"] !== undefined - ? output["ResourceIdentifier"]["#text"] - : output["ResourceIdentifier"]; + contents.ResourceIdentifier = output["ResourceIdentifier"]; } return contents; }; @@ -30981,37 +29245,19 @@ const deserializeAws_queryScalingConfigurationInfo = ( TimeoutAction: undefined }; if (output["AutoPause"] !== undefined) { - contents.AutoPause = - (output["AutoPause"]["#text"] !== undefined - ? output["AutoPause"]["#text"] - : output["AutoPause"]) == "true"; + contents.AutoPause = output["AutoPause"] == "true"; } if (output["MaxCapacity"] !== undefined) { - contents.MaxCapacity = parseInt( - output["MaxCapacity"]["#text"] !== undefined - ? output["MaxCapacity"]["#text"] - : output["MaxCapacity"] - ); + contents.MaxCapacity = parseInt(output["MaxCapacity"]); } if (output["MinCapacity"] !== undefined) { - contents.MinCapacity = parseInt( - output["MinCapacity"]["#text"] !== undefined - ? output["MinCapacity"]["#text"] - : output["MinCapacity"] - ); + contents.MinCapacity = parseInt(output["MinCapacity"]); } if (output["SecondsUntilAutoPause"] !== undefined) { - contents.SecondsUntilAutoPause = parseInt( - output["SecondsUntilAutoPause"]["#text"] !== undefined - ? output["SecondsUntilAutoPause"]["#text"] - : output["SecondsUntilAutoPause"] - ); + contents.SecondsUntilAutoPause = parseInt(output["SecondsUntilAutoPause"]); } if (output["TimeoutAction"] !== undefined) { - contents.TimeoutAction = - output["TimeoutAction"]["#text"] !== undefined - ? output["TimeoutAction"]["#text"] - : output["TimeoutAction"]; + contents.TimeoutAction = output["TimeoutAction"]; } return contents; }; @@ -31020,9 +29266,7 @@ const deserializeAws_querySourceIdsList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_querySourceRegion = ( @@ -31036,22 +29280,13 @@ const deserializeAws_querySourceRegion = ( Status: undefined }; if (output["Endpoint"] !== undefined) { - contents.Endpoint = - output["Endpoint"]["#text"] !== undefined - ? output["Endpoint"]["#text"] - : output["Endpoint"]; + contents.Endpoint = output["Endpoint"]; } if (output["RegionName"] !== undefined) { - contents.RegionName = - output["RegionName"]["#text"] !== undefined - ? output["RegionName"]["#text"] - : output["RegionName"]; + contents.RegionName = output["RegionName"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -31075,10 +29310,7 @@ const deserializeAws_querySourceRegionMessage = ( SourceRegions: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.SourceRegions === "") { contents.SourceRegions = []; @@ -31108,34 +29340,19 @@ const deserializeAws_queryStartActivityStreamResponse = ( Status: undefined }; if (output["ApplyImmediately"] !== undefined) { - contents.ApplyImmediately = - (output["ApplyImmediately"]["#text"] !== undefined - ? output["ApplyImmediately"]["#text"] - : output["ApplyImmediately"]) == "true"; + contents.ApplyImmediately = output["ApplyImmediately"] == "true"; } if (output["KinesisStreamName"] !== undefined) { - contents.KinesisStreamName = - output["KinesisStreamName"]["#text"] !== undefined - ? output["KinesisStreamName"]["#text"] - : output["KinesisStreamName"]; + contents.KinesisStreamName = output["KinesisStreamName"]; } if (output["KmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["KmsKeyId"]["#text"] !== undefined - ? output["KmsKeyId"]["#text"] - : output["KmsKeyId"]; + contents.KmsKeyId = output["KmsKeyId"]; } if (output["Mode"] !== undefined) { - contents.Mode = - output["Mode"]["#text"] !== undefined - ? output["Mode"]["#text"] - : output["Mode"]; + contents.Mode = output["Mode"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -31185,22 +29402,13 @@ const deserializeAws_queryStopActivityStreamResponse = ( Status: undefined }; if (output["KinesisStreamName"] !== undefined) { - contents.KinesisStreamName = - output["KinesisStreamName"]["#text"] !== undefined - ? output["KinesisStreamName"]["#text"] - : output["KinesisStreamName"]; + contents.KinesisStreamName = output["KinesisStreamName"]; } if (output["KmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["KmsKeyId"]["#text"] !== undefined - ? output["KmsKeyId"]["#text"] - : output["KmsKeyId"]; + contents.KmsKeyId = output["KmsKeyId"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -31243,9 +29451,7 @@ const deserializeAws_queryStringList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_querySubnet = ( @@ -31265,16 +29471,10 @@ const deserializeAws_querySubnet = ( ); } if (output["SubnetIdentifier"] !== undefined) { - contents.SubnetIdentifier = - output["SubnetIdentifier"]["#text"] !== undefined - ? output["SubnetIdentifier"]["#text"] - : output["SubnetIdentifier"]; + contents.SubnetIdentifier = output["SubnetIdentifier"]; } if (output["SubnetStatus"] !== undefined) { - contents.SubnetStatus = - output["SubnetStatus"]["#text"] !== undefined - ? output["SubnetStatus"]["#text"] - : output["SubnetStatus"]; + contents.SubnetStatus = output["SubnetStatus"]; } return contents; }; @@ -31313,16 +29513,10 @@ const deserializeAws_queryTag = (output: any, context: __SerdeContext): Tag => { Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -31386,10 +29580,7 @@ const deserializeAws_queryTimezone = ( TimezoneName: undefined }; if (output["TimezoneName"] !== undefined) { - contents.TimezoneName = - output["TimezoneName"]["#text"] !== undefined - ? output["TimezoneName"]["#text"] - : output["TimezoneName"]; + contents.TimezoneName = output["TimezoneName"]; } return contents; }; @@ -31407,34 +29598,19 @@ const deserializeAws_queryUpgradeTarget = ( IsMajorVersionUpgrade: undefined }; if (output["AutoUpgrade"] !== undefined) { - contents.AutoUpgrade = - (output["AutoUpgrade"]["#text"] !== undefined - ? output["AutoUpgrade"]["#text"] - : output["AutoUpgrade"]) == "true"; + contents.AutoUpgrade = output["AutoUpgrade"] == "true"; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["Engine"] !== undefined) { - contents.Engine = - output["Engine"]["#text"] !== undefined - ? output["Engine"]["#text"] - : output["Engine"]; + contents.Engine = output["Engine"]; } if (output["EngineVersion"] !== undefined) { - contents.EngineVersion = - output["EngineVersion"]["#text"] !== undefined - ? output["EngineVersion"]["#text"] - : output["EngineVersion"]; + contents.EngineVersion = output["EngineVersion"]; } if (output["IsMajorVersionUpgrade"] !== undefined) { - contents.IsMajorVersionUpgrade = - (output["IsMajorVersionUpgrade"]["#text"] !== undefined - ? output["IsMajorVersionUpgrade"]["#text"] - : output["IsMajorVersionUpgrade"]) == "true"; + contents.IsMajorVersionUpgrade = output["IsMajorVersionUpgrade"] == "true"; } return contents; }; @@ -31452,34 +29628,19 @@ const deserializeAws_queryUserAuthConfigInfo = ( UserName: undefined }; if (output["AuthScheme"] !== undefined) { - contents.AuthScheme = - output["AuthScheme"]["#text"] !== undefined - ? output["AuthScheme"]["#text"] - : output["AuthScheme"]; + contents.AuthScheme = output["AuthScheme"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["IAMAuth"] !== undefined) { - contents.IAMAuth = - output["IAMAuth"]["#text"] !== undefined - ? output["IAMAuth"]["#text"] - : output["IAMAuth"]; + contents.IAMAuth = output["IAMAuth"]; } if (output["SecretArn"] !== undefined) { - contents.SecretArn = - output["SecretArn"]["#text"] !== undefined - ? output["SecretArn"]["#text"] - : output["SecretArn"]; + contents.SecretArn = output["SecretArn"]; } if (output["UserName"] !== undefined) { - contents.UserName = - output["UserName"]["#text"] !== undefined - ? output["UserName"]["#text"] - : output["UserName"]; + contents.UserName = output["UserName"]; } return contents; }; @@ -31580,16 +29741,11 @@ const deserializeAws_queryValidStorageOptions = ( ); } if (output["StorageType"] !== undefined) { - contents.StorageType = - output["StorageType"]["#text"] !== undefined - ? output["StorageType"]["#text"] - : output["StorageType"]; + contents.StorageType = output["StorageType"]; } if (output["SupportsStorageAutoscaling"] !== undefined) { contents.SupportsStorageAutoscaling = - (output["SupportsStorageAutoscaling"]["#text"] !== undefined - ? output["SupportsStorageAutoscaling"]["#text"] - : output["SupportsStorageAutoscaling"]) == "true"; + output["SupportsStorageAutoscaling"] == "true"; } return contents; }; @@ -31622,16 +29778,10 @@ const deserializeAws_queryVpcSecurityGroupMembership = ( VpcSecurityGroupId: undefined }; if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["VpcSecurityGroupId"] !== undefined) { - contents.VpcSecurityGroupId = - output["VpcSecurityGroupId"]["#text"] !== undefined - ? output["VpcSecurityGroupId"]["#text"] - : output["VpcSecurityGroupId"]; + contents.VpcSecurityGroupId = output["VpcSecurityGroupId"]; } return contents; }; @@ -31659,40 +29809,22 @@ const deserializeAws_queryVpnDetails = ( VpnTunnelOriginatorIP: undefined }; if (output["VpnGatewayIp"] !== undefined) { - contents.VpnGatewayIp = - output["VpnGatewayIp"]["#text"] !== undefined - ? output["VpnGatewayIp"]["#text"] - : output["VpnGatewayIp"]; + contents.VpnGatewayIp = output["VpnGatewayIp"]; } if (output["VpnId"] !== undefined) { - contents.VpnId = - output["VpnId"]["#text"] !== undefined - ? output["VpnId"]["#text"] - : output["VpnId"]; + contents.VpnId = output["VpnId"]; } if (output["VpnName"] !== undefined) { - contents.VpnName = - output["VpnName"]["#text"] !== undefined - ? output["VpnName"]["#text"] - : output["VpnName"]; + contents.VpnName = output["VpnName"]; } if (output["VpnPSK"] !== undefined) { - contents.VpnPSK = - output["VpnPSK"]["#text"] !== undefined - ? output["VpnPSK"]["#text"] - : output["VpnPSK"]; + contents.VpnPSK = output["VpnPSK"]; } if (output["VpnState"] !== undefined) { - contents.VpnState = - output["VpnState"]["#text"] !== undefined - ? output["VpnState"]["#text"] - : output["VpnState"]; + contents.VpnState = output["VpnState"]; } if (output["VpnTunnelOriginatorIP"] !== undefined) { - contents.VpnTunnelOriginatorIP = - output["VpnTunnelOriginatorIP"]["#text"] !== undefined - ? output["VpnTunnelOriginatorIP"]["#text"] - : output["VpnTunnelOriginatorIP"]; + contents.VpnTunnelOriginatorIP = output["VpnTunnelOriginatorIP"]; } return contents; }; @@ -31772,7 +29904,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/clients/client-redshift/protocols/Aws_query.ts b/clients/client-redshift/protocols/Aws_query.ts index 3cd2e7789fb6..f95a04a0ff5f 100644 --- a/clients/client-redshift/protocols/Aws_query.ts +++ b/clients/client-redshift/protocols/Aws_query.ts @@ -665,7 +665,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -14868,10 +14869,7 @@ const deserializeAws_queryAccessToSnapshotDeniedFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -14885,10 +14883,7 @@ const deserializeAws_queryAuthorizationAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -14902,10 +14897,7 @@ const deserializeAws_queryAuthorizationNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -14919,10 +14911,7 @@ const deserializeAws_queryAuthorizationQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -14936,10 +14925,7 @@ const deserializeAws_queryBatchDeleteRequestSizeExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -14953,10 +14939,7 @@ const deserializeAws_queryBatchModifyClusterSnapshotsLimitExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -14970,10 +14953,7 @@ const deserializeAws_queryBucketNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -14987,10 +14967,7 @@ const deserializeAws_queryClusterAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15004,10 +14981,7 @@ const deserializeAws_queryClusterNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15021,10 +14995,7 @@ const deserializeAws_queryClusterOnLatestRevisionFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15038,10 +15009,7 @@ const deserializeAws_queryClusterParameterGroupAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15055,10 +15023,7 @@ const deserializeAws_queryClusterParameterGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15072,10 +15037,7 @@ const deserializeAws_queryClusterParameterGroupQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15089,10 +15051,7 @@ const deserializeAws_queryClusterQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15106,10 +15065,7 @@ const deserializeAws_queryClusterSecurityGroupAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15123,10 +15079,7 @@ const deserializeAws_queryClusterSecurityGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15140,10 +15093,7 @@ const deserializeAws_queryClusterSecurityGroupQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15157,10 +15107,7 @@ const deserializeAws_queryClusterSnapshotAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15174,10 +15121,7 @@ const deserializeAws_queryClusterSnapshotNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15191,10 +15135,7 @@ const deserializeAws_queryClusterSnapshotQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15208,10 +15149,7 @@ const deserializeAws_queryClusterSubnetGroupAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15225,10 +15163,7 @@ const deserializeAws_queryClusterSubnetGroupNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15242,10 +15177,7 @@ const deserializeAws_queryClusterSubnetGroupQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15259,10 +15191,7 @@ const deserializeAws_queryClusterSubnetQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15276,10 +15205,7 @@ const deserializeAws_queryCopyToRegionDisabledFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15293,10 +15219,7 @@ const deserializeAws_queryDependentServiceRequestThrottlingFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15310,10 +15233,7 @@ const deserializeAws_queryDependentServiceUnavailableFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15327,10 +15247,7 @@ const deserializeAws_queryEventSubscriptionQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15344,10 +15261,7 @@ const deserializeAws_queryHsmClientCertificateAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15361,10 +15275,7 @@ const deserializeAws_queryHsmClientCertificateNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15378,10 +15289,7 @@ const deserializeAws_queryHsmClientCertificateQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15395,10 +15303,7 @@ const deserializeAws_queryHsmConfigurationAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15412,10 +15317,7 @@ const deserializeAws_queryHsmConfigurationNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15429,10 +15331,7 @@ const deserializeAws_queryHsmConfigurationQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15446,10 +15345,7 @@ const deserializeAws_queryInProgressTableRestoreQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15463,10 +15359,7 @@ const deserializeAws_queryIncompatibleOrderableOptions = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15480,10 +15373,7 @@ const deserializeAws_queryInsufficientClusterCapacityFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15497,10 +15387,7 @@ const deserializeAws_queryInsufficientS3BucketPolicyFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15514,10 +15401,7 @@ const deserializeAws_queryInvalidClusterParameterGroupStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15531,10 +15415,7 @@ const deserializeAws_queryInvalidClusterSecurityGroupStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15548,10 +15429,7 @@ const deserializeAws_queryInvalidClusterSnapshotScheduleStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15565,10 +15443,7 @@ const deserializeAws_queryInvalidClusterSnapshotStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15582,10 +15457,7 @@ const deserializeAws_queryInvalidClusterStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15599,10 +15471,7 @@ const deserializeAws_queryInvalidClusterSubnetGroupStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15616,10 +15485,7 @@ const deserializeAws_queryInvalidClusterSubnetStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15633,10 +15499,7 @@ const deserializeAws_queryInvalidClusterTrackFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15650,10 +15513,7 @@ const deserializeAws_queryInvalidElasticIpFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15667,10 +15527,7 @@ const deserializeAws_queryInvalidHsmClientCertificateStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15684,10 +15541,7 @@ const deserializeAws_queryInvalidHsmConfigurationStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15701,10 +15555,7 @@ const deserializeAws_queryInvalidReservedNodeStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15718,10 +15569,7 @@ const deserializeAws_queryInvalidRestoreFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15735,10 +15583,7 @@ const deserializeAws_queryInvalidRetentionPeriodFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15752,10 +15597,7 @@ const deserializeAws_queryInvalidS3BucketNameFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15769,10 +15611,7 @@ const deserializeAws_queryInvalidS3KeyPrefixFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15786,10 +15625,7 @@ const deserializeAws_queryInvalidScheduleFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15803,10 +15639,7 @@ const deserializeAws_queryInvalidScheduledActionFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15820,10 +15653,7 @@ const deserializeAws_queryInvalidSnapshotCopyGrantStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15837,10 +15667,7 @@ const deserializeAws_queryInvalidSubnet = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15854,10 +15681,7 @@ const deserializeAws_queryInvalidSubscriptionStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15871,10 +15695,7 @@ const deserializeAws_queryInvalidTableRestoreArgumentFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15888,10 +15709,7 @@ const deserializeAws_queryInvalidTagFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15905,10 +15723,7 @@ const deserializeAws_queryInvalidVPCNetworkStateFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15922,10 +15737,7 @@ const deserializeAws_queryLimitExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15939,10 +15751,7 @@ const deserializeAws_queryNumberOfNodesPerClusterLimitExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15956,10 +15765,7 @@ const deserializeAws_queryNumberOfNodesQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15973,10 +15779,7 @@ const deserializeAws_queryReservedNodeAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -15990,10 +15793,7 @@ const deserializeAws_queryReservedNodeAlreadyMigratedFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16007,10 +15807,7 @@ const deserializeAws_queryReservedNodeNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16024,10 +15821,7 @@ const deserializeAws_queryReservedNodeOfferingNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16041,10 +15835,7 @@ const deserializeAws_queryReservedNodeQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16058,10 +15849,7 @@ const deserializeAws_queryResizeNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16075,10 +15863,7 @@ const deserializeAws_queryResourceNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16092,10 +15877,7 @@ const deserializeAws_querySNSInvalidTopicFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16109,10 +15891,7 @@ const deserializeAws_querySNSNoAuthorizationFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16126,10 +15905,7 @@ const deserializeAws_querySNSTopicArnNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16143,10 +15919,7 @@ const deserializeAws_queryScheduleDefinitionTypeUnsupportedFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16160,10 +15933,7 @@ const deserializeAws_queryScheduledActionAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16177,10 +15947,7 @@ const deserializeAws_queryScheduledActionNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16194,10 +15961,7 @@ const deserializeAws_queryScheduledActionQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16211,10 +15975,7 @@ const deserializeAws_queryScheduledActionTypeUnsupportedFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16228,10 +15989,7 @@ const deserializeAws_querySnapshotCopyAlreadyDisabledFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16245,10 +16003,7 @@ const deserializeAws_querySnapshotCopyAlreadyEnabledFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16262,10 +16017,7 @@ const deserializeAws_querySnapshotCopyDisabledFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16279,10 +16031,7 @@ const deserializeAws_querySnapshotCopyGrantAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16296,10 +16045,7 @@ const deserializeAws_querySnapshotCopyGrantNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16313,10 +16059,7 @@ const deserializeAws_querySnapshotCopyGrantQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16330,10 +16073,7 @@ const deserializeAws_querySnapshotScheduleAlreadyExistsFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16347,10 +16087,7 @@ const deserializeAws_querySnapshotScheduleNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16364,10 +16101,7 @@ const deserializeAws_querySnapshotScheduleQuotaExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16381,10 +16115,7 @@ const deserializeAws_querySnapshotScheduleUpdateInProgressFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16398,10 +16129,7 @@ const deserializeAws_querySourceNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16415,10 +16143,7 @@ const deserializeAws_querySubnetAlreadyInUse = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16432,10 +16157,7 @@ const deserializeAws_querySubscriptionAlreadyExistFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16449,10 +16171,7 @@ const deserializeAws_querySubscriptionCategoryNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16466,10 +16185,7 @@ const deserializeAws_querySubscriptionEventIdNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16483,10 +16199,7 @@ const deserializeAws_querySubscriptionNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16500,10 +16213,7 @@ const deserializeAws_querySubscriptionSeverityNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16517,10 +16227,7 @@ const deserializeAws_queryTableLimitExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16534,10 +16241,7 @@ const deserializeAws_queryTableRestoreNotFoundFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16551,10 +16255,7 @@ const deserializeAws_queryTagLimitExceededFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16568,10 +16269,7 @@ const deserializeAws_queryUnauthorizedOperation = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16585,10 +16283,7 @@ const deserializeAws_queryUnknownSnapshotCopyRegionFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16602,10 +16297,7 @@ const deserializeAws_queryUnsupportedOperationFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16619,10 +16311,7 @@ const deserializeAws_queryUnsupportedOptionFault = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -16654,10 +16343,7 @@ const deserializeAws_queryAccountAttribute = ( AttributeValues: undefined }; if (output["AttributeName"] !== undefined) { - contents.AttributeName = - output["AttributeName"]["#text"] !== undefined - ? output["AttributeName"]["#text"] - : output["AttributeName"]; + contents.AttributeName = output["AttributeName"]; } if (output.AttributeValues === "") { contents.AttributeValues = []; @@ -16707,16 +16393,10 @@ const deserializeAws_queryAccountWithRestoreAccess = ( AccountId: undefined }; if (output["AccountAlias"] !== undefined) { - contents.AccountAlias = - output["AccountAlias"]["#text"] !== undefined - ? output["AccountAlias"]["#text"] - : output["AccountAlias"]; + contents.AccountAlias = output["AccountAlias"]; } if (output["AccountId"] !== undefined) { - contents.AccountId = - output["AccountId"]["#text"] !== undefined - ? output["AccountId"]["#text"] - : output["AccountId"]; + contents.AccountId = output["AccountId"]; } return contents; }; @@ -16766,10 +16446,7 @@ const deserializeAws_queryAttributeValueTarget = ( AttributeValue: undefined }; if (output["AttributeValue"] !== undefined) { - contents.AttributeValue = - output["AttributeValue"]["#text"] !== undefined - ? output["AttributeValue"]["#text"] - : output["AttributeValue"]; + contents.AttributeValue = output["AttributeValue"]; } return contents; }; @@ -16818,10 +16495,7 @@ const deserializeAws_queryAvailabilityZone = ( SupportedPlatforms: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output.SupportedPlatforms === "") { contents.SupportedPlatforms = []; @@ -16991,38 +16665,24 @@ const deserializeAws_queryCluster = ( VpcSecurityGroups: undefined }; if (output["AllowVersionUpgrade"] !== undefined) { - contents.AllowVersionUpgrade = - (output["AllowVersionUpgrade"]["#text"] !== undefined - ? output["AllowVersionUpgrade"]["#text"] - : output["AllowVersionUpgrade"]) == "true"; + contents.AllowVersionUpgrade = output["AllowVersionUpgrade"] == "true"; } if (output["AutomatedSnapshotRetentionPeriod"] !== undefined) { contents.AutomatedSnapshotRetentionPeriod = parseInt( - output["AutomatedSnapshotRetentionPeriod"]["#text"] !== undefined - ? output["AutomatedSnapshotRetentionPeriod"]["#text"] - : output["AutomatedSnapshotRetentionPeriod"] + output["AutomatedSnapshotRetentionPeriod"] ); } if (output["AvailabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["AvailabilityZone"]["#text"] !== undefined - ? output["AvailabilityZone"]["#text"] - : output["AvailabilityZone"]; + contents.AvailabilityZone = output["AvailabilityZone"]; } if (output["ClusterAvailabilityStatus"] !== undefined) { - contents.ClusterAvailabilityStatus = - output["ClusterAvailabilityStatus"]["#text"] !== undefined - ? output["ClusterAvailabilityStatus"]["#text"] - : output["ClusterAvailabilityStatus"]; + contents.ClusterAvailabilityStatus = output["ClusterAvailabilityStatus"]; } if (output["ClusterCreateTime"] !== undefined) { contents.ClusterCreateTime = new Date(output["ClusterCreateTime"]); } if (output["ClusterIdentifier"] !== undefined) { - contents.ClusterIdentifier = - output["ClusterIdentifier"]["#text"] !== undefined - ? output["ClusterIdentifier"]["#text"] - : output["ClusterIdentifier"]; + contents.ClusterIdentifier = output["ClusterIdentifier"]; } if (output.ClusterNodes === "") { contents.ClusterNodes = []; @@ -17051,16 +16711,10 @@ const deserializeAws_queryCluster = ( ); } if (output["ClusterPublicKey"] !== undefined) { - contents.ClusterPublicKey = - output["ClusterPublicKey"]["#text"] !== undefined - ? output["ClusterPublicKey"]["#text"] - : output["ClusterPublicKey"]; + contents.ClusterPublicKey = output["ClusterPublicKey"]; } if (output["ClusterRevisionNumber"] !== undefined) { - contents.ClusterRevisionNumber = - output["ClusterRevisionNumber"]["#text"] !== undefined - ? output["ClusterRevisionNumber"]["#text"] - : output["ClusterRevisionNumber"]; + contents.ClusterRevisionNumber = output["ClusterRevisionNumber"]; } if (output.ClusterSecurityGroups === "") { contents.ClusterSecurityGroups = []; @@ -17083,28 +16737,16 @@ const deserializeAws_queryCluster = ( ); } if (output["ClusterStatus"] !== undefined) { - contents.ClusterStatus = - output["ClusterStatus"]["#text"] !== undefined - ? output["ClusterStatus"]["#text"] - : output["ClusterStatus"]; + contents.ClusterStatus = output["ClusterStatus"]; } if (output["ClusterSubnetGroupName"] !== undefined) { - contents.ClusterSubnetGroupName = - output["ClusterSubnetGroupName"]["#text"] !== undefined - ? output["ClusterSubnetGroupName"]["#text"] - : output["ClusterSubnetGroupName"]; + contents.ClusterSubnetGroupName = output["ClusterSubnetGroupName"]; } if (output["ClusterVersion"] !== undefined) { - contents.ClusterVersion = - output["ClusterVersion"]["#text"] !== undefined - ? output["ClusterVersion"]["#text"] - : output["ClusterVersion"]; + contents.ClusterVersion = output["ClusterVersion"]; } if (output["DBName"] !== undefined) { - contents.DBName = - output["DBName"]["#text"] !== undefined - ? output["DBName"]["#text"] - : output["DBName"]; + contents.DBName = output["DBName"]; } if (output["DataTransferProgress"] !== undefined) { contents.DataTransferProgress = deserializeAws_queryDataTransferProgress( @@ -17135,15 +16777,10 @@ const deserializeAws_queryCluster = ( } if (output["ElasticResizeNumberOfNodeOptions"] !== undefined) { contents.ElasticResizeNumberOfNodeOptions = - output["ElasticResizeNumberOfNodeOptions"]["#text"] !== undefined - ? output["ElasticResizeNumberOfNodeOptions"]["#text"] - : output["ElasticResizeNumberOfNodeOptions"]; + output["ElasticResizeNumberOfNodeOptions"]; } if (output["Encrypted"] !== undefined) { - contents.Encrypted = - (output["Encrypted"]["#text"] !== undefined - ? output["Encrypted"]["#text"] - : output["Encrypted"]) == "true"; + contents.Encrypted = output["Encrypted"] == "true"; } if (output["Endpoint"] !== undefined) { contents.Endpoint = deserializeAws_queryEndpoint( @@ -17152,10 +16789,7 @@ const deserializeAws_queryCluster = ( ); } if (output["EnhancedVpcRouting"] !== undefined) { - contents.EnhancedVpcRouting = - (output["EnhancedVpcRouting"]["#text"] !== undefined - ? output["EnhancedVpcRouting"]["#text"] - : output["EnhancedVpcRouting"]) == "true"; + contents.EnhancedVpcRouting = output["EnhancedVpcRouting"] == "true"; } if (output["ExpectedNextSnapshotScheduleTime"] !== undefined) { contents.ExpectedNextSnapshotScheduleTime = new Date( @@ -17164,9 +16798,7 @@ const deserializeAws_queryCluster = ( } if (output["ExpectedNextSnapshotScheduleTimeStatus"] !== undefined) { contents.ExpectedNextSnapshotScheduleTimeStatus = - output["ExpectedNextSnapshotScheduleTimeStatus"]["#text"] !== undefined - ? output["ExpectedNextSnapshotScheduleTimeStatus"]["#text"] - : output["ExpectedNextSnapshotScheduleTimeStatus"]; + output["ExpectedNextSnapshotScheduleTimeStatus"]; } if (output["HsmStatus"] !== undefined) { contents.HsmStatus = deserializeAws_queryHsmStatus( @@ -17187,35 +16819,21 @@ const deserializeAws_queryCluster = ( ); } if (output["KmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["KmsKeyId"]["#text"] !== undefined - ? output["KmsKeyId"]["#text"] - : output["KmsKeyId"]; + contents.KmsKeyId = output["KmsKeyId"]; } if (output["MaintenanceTrackName"] !== undefined) { - contents.MaintenanceTrackName = - output["MaintenanceTrackName"]["#text"] !== undefined - ? output["MaintenanceTrackName"]["#text"] - : output["MaintenanceTrackName"]; + contents.MaintenanceTrackName = output["MaintenanceTrackName"]; } if (output["ManualSnapshotRetentionPeriod"] !== undefined) { contents.ManualSnapshotRetentionPeriod = parseInt( - output["ManualSnapshotRetentionPeriod"]["#text"] !== undefined - ? output["ManualSnapshotRetentionPeriod"]["#text"] - : output["ManualSnapshotRetentionPeriod"] + output["ManualSnapshotRetentionPeriod"] ); } if (output["MasterUsername"] !== undefined) { - contents.MasterUsername = - output["MasterUsername"]["#text"] !== undefined - ? output["MasterUsername"]["#text"] - : output["MasterUsername"]; + contents.MasterUsername = output["MasterUsername"]; } if (output["ModifyStatus"] !== undefined) { - contents.ModifyStatus = - output["ModifyStatus"]["#text"] !== undefined - ? output["ModifyStatus"]["#text"] - : output["ModifyStatus"]; + contents.ModifyStatus = output["ModifyStatus"]; } if (output["NextMaintenanceWindowStartTime"] !== undefined) { contents.NextMaintenanceWindowStartTime = new Date( @@ -17223,17 +16841,10 @@ const deserializeAws_queryCluster = ( ); } if (output["NodeType"] !== undefined) { - contents.NodeType = - output["NodeType"]["#text"] !== undefined - ? output["NodeType"]["#text"] - : output["NodeType"]; + contents.NodeType = output["NodeType"]; } if (output["NumberOfNodes"] !== undefined) { - contents.NumberOfNodes = parseInt( - output["NumberOfNodes"]["#text"] !== undefined - ? output["NumberOfNodes"]["#text"] - : output["NumberOfNodes"] - ); + contents.NumberOfNodes = parseInt(output["NumberOfNodes"]); } if (output.PendingActions === "") { contents.PendingActions = []; @@ -17254,16 +16865,10 @@ const deserializeAws_queryCluster = ( ); } if (output["PreferredMaintenanceWindow"] !== undefined) { - contents.PreferredMaintenanceWindow = - output["PreferredMaintenanceWindow"]["#text"] !== undefined - ? output["PreferredMaintenanceWindow"]["#text"] - : output["PreferredMaintenanceWindow"]; + contents.PreferredMaintenanceWindow = output["PreferredMaintenanceWindow"]; } if (output["PubliclyAccessible"] !== undefined) { - contents.PubliclyAccessible = - (output["PubliclyAccessible"]["#text"] !== undefined - ? output["PubliclyAccessible"]["#text"] - : output["PubliclyAccessible"]) == "true"; + contents.PubliclyAccessible = output["PubliclyAccessible"] == "true"; } if (output["ResizeInfo"] !== undefined) { contents.ResizeInfo = deserializeAws_queryResizeInfo( @@ -17278,16 +16883,10 @@ const deserializeAws_queryCluster = ( ); } if (output["SnapshotScheduleIdentifier"] !== undefined) { - contents.SnapshotScheduleIdentifier = - output["SnapshotScheduleIdentifier"]["#text"] !== undefined - ? output["SnapshotScheduleIdentifier"]["#text"] - : output["SnapshotScheduleIdentifier"]; + contents.SnapshotScheduleIdentifier = output["SnapshotScheduleIdentifier"]; } if (output["SnapshotScheduleState"] !== undefined) { - contents.SnapshotScheduleState = - output["SnapshotScheduleState"]["#text"] !== undefined - ? output["SnapshotScheduleState"]["#text"] - : output["SnapshotScheduleState"]; + contents.SnapshotScheduleState = output["SnapshotScheduleState"]; } if (output.Tags === "") { contents.Tags = []; @@ -17299,10 +16898,7 @@ const deserializeAws_queryCluster = ( ); } if (output["VpcId"] !== undefined) { - contents.VpcId = - output["VpcId"]["#text"] !== undefined - ? output["VpcId"]["#text"] - : output["VpcId"]; + contents.VpcId = output["VpcId"]; } if (output.VpcSecurityGroups === "") { contents.VpcSecurityGroups = []; @@ -17329,16 +16925,10 @@ const deserializeAws_queryClusterAssociatedToSchedule = ( ScheduleAssociationState: undefined }; if (output["ClusterIdentifier"] !== undefined) { - contents.ClusterIdentifier = - output["ClusterIdentifier"]["#text"] !== undefined - ? output["ClusterIdentifier"]["#text"] - : output["ClusterIdentifier"]; + contents.ClusterIdentifier = output["ClusterIdentifier"]; } if (output["ScheduleAssociationState"] !== undefined) { - contents.ScheduleAssociationState = - output["ScheduleAssociationState"]["#text"] !== undefined - ? output["ScheduleAssociationState"]["#text"] - : output["ScheduleAssociationState"]; + contents.ScheduleAssociationState = output["ScheduleAssociationState"]; } return contents; }; @@ -17354,16 +16944,10 @@ const deserializeAws_queryClusterCredentials = ( Expiration: undefined }; if (output["DbPassword"] !== undefined) { - contents.DbPassword = - output["DbPassword"]["#text"] !== undefined - ? output["DbPassword"]["#text"] - : output["DbPassword"]; + contents.DbPassword = output["DbPassword"]; } if (output["DbUser"] !== undefined) { - contents.DbUser = - output["DbUser"]["#text"] !== undefined - ? output["DbUser"]["#text"] - : output["DbUser"]; + contents.DbUser = output["DbUser"]; } if (output["Expiration"] !== undefined) { contents.Expiration = new Date(output["Expiration"]); @@ -17383,16 +16967,10 @@ const deserializeAws_queryClusterDbRevision = ( RevisionTargets: undefined }; if (output["ClusterIdentifier"] !== undefined) { - contents.ClusterIdentifier = - output["ClusterIdentifier"]["#text"] !== undefined - ? output["ClusterIdentifier"]["#text"] - : output["ClusterIdentifier"]; + contents.ClusterIdentifier = output["ClusterIdentifier"]; } if (output["CurrentDatabaseRevision"] !== undefined) { - contents.CurrentDatabaseRevision = - output["CurrentDatabaseRevision"]["#text"] !== undefined - ? output["CurrentDatabaseRevision"]["#text"] - : output["CurrentDatabaseRevision"]; + contents.CurrentDatabaseRevision = output["CurrentDatabaseRevision"]; } if (output["DatabaseRevisionReleaseDate"] !== undefined) { contents.DatabaseRevisionReleaseDate = new Date( @@ -17445,10 +17023,7 @@ const deserializeAws_queryClusterDbRevisionsMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -17463,16 +17038,10 @@ const deserializeAws_queryClusterIamRole = ( IamRoleArn: undefined }; if (output["ApplyStatus"] !== undefined) { - contents.ApplyStatus = - output["ApplyStatus"]["#text"] !== undefined - ? output["ApplyStatus"]["#text"] - : output["ApplyStatus"]; + contents.ApplyStatus = output["ApplyStatus"]; } if (output["IamRoleArn"] !== undefined) { - contents.IamRoleArn = - output["IamRoleArn"]["#text"] !== undefined - ? output["IamRoleArn"]["#text"] - : output["IamRoleArn"]; + contents.IamRoleArn = output["IamRoleArn"]; } return contents; }; @@ -17506,22 +17075,13 @@ const deserializeAws_queryClusterNode = ( PublicIPAddress: undefined }; if (output["NodeRole"] !== undefined) { - contents.NodeRole = - output["NodeRole"]["#text"] !== undefined - ? output["NodeRole"]["#text"] - : output["NodeRole"]; + contents.NodeRole = output["NodeRole"]; } if (output["PrivateIPAddress"] !== undefined) { - contents.PrivateIPAddress = - output["PrivateIPAddress"]["#text"] !== undefined - ? output["PrivateIPAddress"]["#text"] - : output["PrivateIPAddress"]; + contents.PrivateIPAddress = output["PrivateIPAddress"]; } if (output["PublicIPAddress"] !== undefined) { - contents.PublicIPAddress = - output["PublicIPAddress"]["#text"] !== undefined - ? output["PublicIPAddress"]["#text"] - : output["PublicIPAddress"]; + contents.PublicIPAddress = output["PublicIPAddress"]; } return contents; }; @@ -17547,22 +17107,13 @@ const deserializeAws_queryClusterParameterGroup = ( Tags: undefined }; if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["ParameterGroupFamily"] !== undefined) { - contents.ParameterGroupFamily = - output["ParameterGroupFamily"]["#text"] !== undefined - ? output["ParameterGroupFamily"]["#text"] - : output["ParameterGroupFamily"]; + contents.ParameterGroupFamily = output["ParameterGroupFamily"]; } if (output["ParameterGroupName"] !== undefined) { - contents.ParameterGroupName = - output["ParameterGroupName"]["#text"] !== undefined - ? output["ParameterGroupName"]["#text"] - : output["ParameterGroupName"]; + contents.ParameterGroupName = output["ParameterGroupName"]; } if (output.Tags === "") { contents.Tags = []; @@ -17586,10 +17137,7 @@ const deserializeAws_queryClusterParameterGroupDetails = ( Parameters: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Parameters === "") { contents.Parameters = []; @@ -17616,16 +17164,10 @@ const deserializeAws_queryClusterParameterGroupNameMessage = ( ParameterGroupStatus: undefined }; if (output["ParameterGroupName"] !== undefined) { - contents.ParameterGroupName = - output["ParameterGroupName"]["#text"] !== undefined - ? output["ParameterGroupName"]["#text"] - : output["ParameterGroupName"]; + contents.ParameterGroupName = output["ParameterGroupName"]; } if (output["ParameterGroupStatus"] !== undefined) { - contents.ParameterGroupStatus = - output["ParameterGroupStatus"]["#text"] !== undefined - ? output["ParameterGroupStatus"]["#text"] - : output["ParameterGroupStatus"]; + contents.ParameterGroupStatus = output["ParameterGroupStatus"]; } return contents; }; @@ -17653,16 +17195,10 @@ const deserializeAws_queryClusterParameterGroupStatus = ( ); } if (output["ParameterApplyStatus"] !== undefined) { - contents.ParameterApplyStatus = - output["ParameterApplyStatus"]["#text"] !== undefined - ? output["ParameterApplyStatus"]["#text"] - : output["ParameterApplyStatus"]; + contents.ParameterApplyStatus = output["ParameterApplyStatus"]; } if (output["ParameterGroupName"] !== undefined) { - contents.ParameterGroupName = - output["ParameterGroupName"]["#text"] !== undefined - ? output["ParameterGroupName"]["#text"] - : output["ParameterGroupName"]; + contents.ParameterGroupName = output["ParameterGroupName"]; } return contents; }; @@ -17686,10 +17222,7 @@ const deserializeAws_queryClusterParameterGroupsMessage = ( ParameterGroups: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.ParameterGroups === "") { contents.ParameterGroups = []; @@ -17720,21 +17253,13 @@ const deserializeAws_queryClusterParameterStatus = ( }; if (output["ParameterApplyErrorDescription"] !== undefined) { contents.ParameterApplyErrorDescription = - output["ParameterApplyErrorDescription"]["#text"] !== undefined - ? output["ParameterApplyErrorDescription"]["#text"] - : output["ParameterApplyErrorDescription"]; + output["ParameterApplyErrorDescription"]; } if (output["ParameterApplyStatus"] !== undefined) { - contents.ParameterApplyStatus = - output["ParameterApplyStatus"]["#text"] !== undefined - ? output["ParameterApplyStatus"]["#text"] - : output["ParameterApplyStatus"]; + contents.ParameterApplyStatus = output["ParameterApplyStatus"]; } if (output["ParameterName"] !== undefined) { - contents.ParameterName = - output["ParameterName"]["#text"] !== undefined - ? output["ParameterName"]["#text"] - : output["ParameterName"]; + contents.ParameterName = output["ParameterName"]; } return contents; }; @@ -17761,16 +17286,10 @@ const deserializeAws_queryClusterSecurityGroup = ( Tags: undefined }; if (output["ClusterSecurityGroupName"] !== undefined) { - contents.ClusterSecurityGroupName = - output["ClusterSecurityGroupName"]["#text"] !== undefined - ? output["ClusterSecurityGroupName"]["#text"] - : output["ClusterSecurityGroupName"]; + contents.ClusterSecurityGroupName = output["ClusterSecurityGroupName"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output.EC2SecurityGroups === "") { contents.EC2SecurityGroups = []; @@ -17818,16 +17337,10 @@ const deserializeAws_queryClusterSecurityGroupMembership = ( Status: undefined }; if (output["ClusterSecurityGroupName"] !== undefined) { - contents.ClusterSecurityGroupName = - output["ClusterSecurityGroupName"]["#text"] !== undefined - ? output["ClusterSecurityGroupName"]["#text"] - : output["ClusterSecurityGroupName"]; + contents.ClusterSecurityGroupName = output["ClusterSecurityGroupName"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -17865,10 +17378,7 @@ const deserializeAws_queryClusterSecurityGroupMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -17894,30 +17404,18 @@ const deserializeAws_queryClusterSnapshotCopyStatus = ( SnapshotCopyGrantName: undefined }; if (output["DestinationRegion"] !== undefined) { - contents.DestinationRegion = - output["DestinationRegion"]["#text"] !== undefined - ? output["DestinationRegion"]["#text"] - : output["DestinationRegion"]; + contents.DestinationRegion = output["DestinationRegion"]; } if (output["ManualSnapshotRetentionPeriod"] !== undefined) { contents.ManualSnapshotRetentionPeriod = parseInt( - output["ManualSnapshotRetentionPeriod"]["#text"] !== undefined - ? output["ManualSnapshotRetentionPeriod"]["#text"] - : output["ManualSnapshotRetentionPeriod"] + output["ManualSnapshotRetentionPeriod"] ); } if (output["RetentionPeriod"] !== undefined) { - contents.RetentionPeriod = parseInt( - output["RetentionPeriod"]["#text"] !== undefined - ? output["RetentionPeriod"]["#text"] - : output["RetentionPeriod"] - ); + contents.RetentionPeriod = parseInt(output["RetentionPeriod"]); } if (output["SnapshotCopyGrantName"] !== undefined) { - contents.SnapshotCopyGrantName = - output["SnapshotCopyGrantName"]["#text"] !== undefined - ? output["SnapshotCopyGrantName"]["#text"] - : output["SnapshotCopyGrantName"]; + contents.SnapshotCopyGrantName = output["SnapshotCopyGrantName"]; } return contents; }; @@ -17936,22 +17434,13 @@ const deserializeAws_queryClusterSubnetGroup = ( VpcId: undefined }; if (output["ClusterSubnetGroupName"] !== undefined) { - contents.ClusterSubnetGroupName = - output["ClusterSubnetGroupName"]["#text"] !== undefined - ? output["ClusterSubnetGroupName"]["#text"] - : output["ClusterSubnetGroupName"]; + contents.ClusterSubnetGroupName = output["ClusterSubnetGroupName"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["SubnetGroupStatus"] !== undefined) { - contents.SubnetGroupStatus = - output["SubnetGroupStatus"]["#text"] !== undefined - ? output["SubnetGroupStatus"]["#text"] - : output["SubnetGroupStatus"]; + contents.SubnetGroupStatus = output["SubnetGroupStatus"]; } if (output.Subnets === "") { contents.Subnets = []; @@ -17975,10 +17464,7 @@ const deserializeAws_queryClusterSubnetGroup = ( ); } if (output["VpcId"] !== undefined) { - contents.VpcId = - output["VpcId"]["#text"] !== undefined - ? output["VpcId"]["#text"] - : output["VpcId"]; + contents.VpcId = output["VpcId"]; } return contents; }; @@ -18007,10 +17493,7 @@ const deserializeAws_queryClusterSubnetGroupMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -18036,21 +17519,13 @@ const deserializeAws_queryClusterVersion = ( }; if (output["ClusterParameterGroupFamily"] !== undefined) { contents.ClusterParameterGroupFamily = - output["ClusterParameterGroupFamily"]["#text"] !== undefined - ? output["ClusterParameterGroupFamily"]["#text"] - : output["ClusterParameterGroupFamily"]; + output["ClusterParameterGroupFamily"]; } if (output["ClusterVersion"] !== undefined) { - contents.ClusterVersion = - output["ClusterVersion"]["#text"] !== undefined - ? output["ClusterVersion"]["#text"] - : output["ClusterVersion"]; + contents.ClusterVersion = output["ClusterVersion"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } return contents; }; @@ -18086,10 +17561,7 @@ const deserializeAws_queryClusterVersionsMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -18116,10 +17588,7 @@ const deserializeAws_queryClustersMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -18302,16 +17771,12 @@ const deserializeAws_queryCustomerStorageMessage = ( }; if (output["TotalBackupSizeInMegaBytes"] !== undefined) { contents.TotalBackupSizeInMegaBytes = parseFloat( - output["TotalBackupSizeInMegaBytes"]["#text"] !== undefined - ? output["TotalBackupSizeInMegaBytes"]["#text"] - : output["TotalBackupSizeInMegaBytes"] + output["TotalBackupSizeInMegaBytes"] ); } if (output["TotalProvisionedStorageInMegaBytes"] !== undefined) { contents.TotalProvisionedStorageInMegaBytes = parseFloat( - output["TotalProvisionedStorageInMegaBytes"]["#text"] !== undefined - ? output["TotalProvisionedStorageInMegaBytes"]["#text"] - : output["TotalProvisionedStorageInMegaBytes"] + output["TotalProvisionedStorageInMegaBytes"] ); } return contents; @@ -18332,44 +17797,27 @@ const deserializeAws_queryDataTransferProgress = ( }; if (output["CurrentRateInMegaBytesPerSecond"] !== undefined) { contents.CurrentRateInMegaBytesPerSecond = parseFloat( - output["CurrentRateInMegaBytesPerSecond"]["#text"] !== undefined - ? output["CurrentRateInMegaBytesPerSecond"]["#text"] - : output["CurrentRateInMegaBytesPerSecond"] + output["CurrentRateInMegaBytesPerSecond"] ); } if (output["DataTransferredInMegaBytes"] !== undefined) { contents.DataTransferredInMegaBytes = parseInt( - output["DataTransferredInMegaBytes"]["#text"] !== undefined - ? output["DataTransferredInMegaBytes"]["#text"] - : output["DataTransferredInMegaBytes"] + output["DataTransferredInMegaBytes"] ); } if (output["ElapsedTimeInSeconds"] !== undefined) { - contents.ElapsedTimeInSeconds = parseInt( - output["ElapsedTimeInSeconds"]["#text"] !== undefined - ? output["ElapsedTimeInSeconds"]["#text"] - : output["ElapsedTimeInSeconds"] - ); + contents.ElapsedTimeInSeconds = parseInt(output["ElapsedTimeInSeconds"]); } if (output["EstimatedTimeToCompletionInSeconds"] !== undefined) { contents.EstimatedTimeToCompletionInSeconds = parseInt( - output["EstimatedTimeToCompletionInSeconds"]["#text"] !== undefined - ? output["EstimatedTimeToCompletionInSeconds"]["#text"] - : output["EstimatedTimeToCompletionInSeconds"] + output["EstimatedTimeToCompletionInSeconds"] ); } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["TotalDataInMegaBytes"] !== undefined) { - contents.TotalDataInMegaBytes = parseInt( - output["TotalDataInMegaBytes"]["#text"] !== undefined - ? output["TotalDataInMegaBytes"]["#text"] - : output["TotalDataInMegaBytes"] - ); + contents.TotalDataInMegaBytes = parseInt(output["TotalDataInMegaBytes"]); } return contents; }; @@ -18385,16 +17833,10 @@ const deserializeAws_queryDefaultClusterParameters = ( Parameters: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output["ParameterGroupFamily"] !== undefined) { - contents.ParameterGroupFamily = - output["ParameterGroupFamily"]["#text"] !== undefined - ? output["ParameterGroupFamily"]["#text"] - : output["ParameterGroupFamily"]; + contents.ParameterGroupFamily = output["ParameterGroupFamily"]; } if (output.Parameters === "") { contents.Parameters = []; @@ -18427,10 +17869,7 @@ const deserializeAws_queryDeferredMaintenanceWindow = ( ); } if (output["DeferMaintenanceIdentifier"] !== undefined) { - contents.DeferMaintenanceIdentifier = - output["DeferMaintenanceIdentifier"]["#text"] !== undefined - ? output["DeferMaintenanceIdentifier"]["#text"] - : output["DeferMaintenanceIdentifier"]; + contents.DeferMaintenanceIdentifier = output["DeferMaintenanceIdentifier"]; } if (output["DeferMaintenanceStartTime"] !== undefined) { contents.DeferMaintenanceStartTime = new Date( @@ -18507,10 +17946,7 @@ const deserializeAws_queryDescribeSnapshotSchedulesOutputMessage = ( SnapshotSchedules: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.SnapshotSchedules === "") { contents.SnapshotSchedules = []; @@ -18553,22 +17989,13 @@ const deserializeAws_queryEC2SecurityGroup = ( Tags: undefined }; if (output["EC2SecurityGroupName"] !== undefined) { - contents.EC2SecurityGroupName = - output["EC2SecurityGroupName"]["#text"] !== undefined - ? output["EC2SecurityGroupName"]["#text"] - : output["EC2SecurityGroupName"]; + contents.EC2SecurityGroupName = output["EC2SecurityGroupName"]; } if (output["EC2SecurityGroupOwnerId"] !== undefined) { - contents.EC2SecurityGroupOwnerId = - output["EC2SecurityGroupOwnerId"]["#text"] !== undefined - ? output["EC2SecurityGroupOwnerId"]["#text"] - : output["EC2SecurityGroupOwnerId"]; + contents.EC2SecurityGroupOwnerId = output["EC2SecurityGroupOwnerId"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output.Tags === "") { contents.Tags = []; @@ -18601,16 +18028,10 @@ const deserializeAws_queryElasticIpStatus = ( Status: undefined }; if (output["ElasticIp"] !== undefined) { - contents.ElasticIp = - output["ElasticIp"]["#text"] !== undefined - ? output["ElasticIp"]["#text"] - : output["ElasticIp"]; + contents.ElasticIp = output["ElasticIp"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -18648,17 +18069,10 @@ const deserializeAws_queryEndpoint = ( Port: undefined }; if (output["Address"] !== undefined) { - contents.Address = - output["Address"]["#text"] !== undefined - ? output["Address"]["#text"] - : output["Address"]; + contents.Address = output["Address"]; } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } return contents; }; @@ -18693,34 +18107,19 @@ const deserializeAws_queryEvent = ( ); } if (output["EventId"] !== undefined) { - contents.EventId = - output["EventId"]["#text"] !== undefined - ? output["EventId"]["#text"] - : output["EventId"]; + contents.EventId = output["EventId"]; } if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } if (output["Severity"] !== undefined) { - contents.Severity = - output["Severity"]["#text"] !== undefined - ? output["Severity"]["#text"] - : output["Severity"]; + contents.Severity = output["Severity"]; } if (output["SourceIdentifier"] !== undefined) { - contents.SourceIdentifier = - output["SourceIdentifier"]["#text"] !== undefined - ? output["SourceIdentifier"]["#text"] - : output["SourceIdentifier"]; + contents.SourceIdentifier = output["SourceIdentifier"]; } if (output["SourceType"] !== undefined) { - contents.SourceType = - output["SourceType"]["#text"] !== undefined - ? output["SourceType"]["#text"] - : output["SourceType"]; + contents.SourceType = output["SourceType"]; } return contents; }; @@ -18729,9 +18128,7 @@ const deserializeAws_queryEventCategoriesList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryEventCategoriesMap = ( @@ -18756,10 +18153,7 @@ const deserializeAws_queryEventCategoriesMap = ( ); } if (output["SourceType"] !== undefined) { - contents.SourceType = - output["SourceType"]["#text"] !== undefined - ? output["SourceType"]["#text"] - : output["SourceType"]; + contents.SourceType = output["SourceType"]; } return contents; }; @@ -18822,22 +18216,13 @@ const deserializeAws_queryEventInfoMap = ( ); } if (output["EventDescription"] !== undefined) { - contents.EventDescription = - output["EventDescription"]["#text"] !== undefined - ? output["EventDescription"]["#text"] - : output["EventDescription"]; + contents.EventDescription = output["EventDescription"]; } if (output["EventId"] !== undefined) { - contents.EventId = - output["EventId"]["#text"] !== undefined - ? output["EventId"]["#text"] - : output["EventId"]; + contents.EventId = output["EventId"]; } if (output["Severity"] !== undefined) { - contents.Severity = - output["Severity"]["#text"] !== undefined - ? output["Severity"]["#text"] - : output["Severity"]; + contents.Severity = output["Severity"]; } return contents; }; @@ -18879,22 +18264,13 @@ const deserializeAws_queryEventSubscription = ( Tags: undefined }; if (output["CustSubscriptionId"] !== undefined) { - contents.CustSubscriptionId = - output["CustSubscriptionId"]["#text"] !== undefined - ? output["CustSubscriptionId"]["#text"] - : output["CustSubscriptionId"]; + contents.CustSubscriptionId = output["CustSubscriptionId"]; } if (output["CustomerAwsId"] !== undefined) { - contents.CustomerAwsId = - output["CustomerAwsId"]["#text"] !== undefined - ? output["CustomerAwsId"]["#text"] - : output["CustomerAwsId"]; + contents.CustomerAwsId = output["CustomerAwsId"]; } if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } if (output.EventCategoriesList === "") { contents.EventCategoriesList = []; @@ -18909,16 +18285,10 @@ const deserializeAws_queryEventSubscription = ( ); } if (output["Severity"] !== undefined) { - contents.Severity = - output["Severity"]["#text"] !== undefined - ? output["Severity"]["#text"] - : output["Severity"]; + contents.Severity = output["Severity"]; } if (output["SnsTopicArn"] !== undefined) { - contents.SnsTopicArn = - output["SnsTopicArn"]["#text"] !== undefined - ? output["SnsTopicArn"]["#text"] - : output["SnsTopicArn"]; + contents.SnsTopicArn = output["SnsTopicArn"]; } if (output.SourceIdsList === "") { contents.SourceIdsList = []; @@ -18933,16 +18303,10 @@ const deserializeAws_queryEventSubscription = ( ); } if (output["SourceType"] !== undefined) { - contents.SourceType = - output["SourceType"]["#text"] !== undefined - ? output["SourceType"]["#text"] - : output["SourceType"]; + contents.SourceType = output["SourceType"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["SubscriptionCreationTime"] !== undefined) { contents.SubscriptionCreationTime = new Date( @@ -18994,10 +18358,7 @@ const deserializeAws_queryEventSubscriptionsMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -19024,10 +18385,7 @@ const deserializeAws_queryEventsMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -19042,10 +18400,7 @@ const deserializeAws_queryGetReservedNodeExchangeOfferingsOutputMessage = ( ReservedNodeOfferings: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.ReservedNodeOfferings === "") { contents.ReservedNodeOfferings = []; @@ -19076,15 +18431,11 @@ const deserializeAws_queryHsmClientCertificate = ( }; if (output["HsmClientCertificateIdentifier"] !== undefined) { contents.HsmClientCertificateIdentifier = - output["HsmClientCertificateIdentifier"]["#text"] !== undefined - ? output["HsmClientCertificateIdentifier"]["#text"] - : output["HsmClientCertificateIdentifier"]; + output["HsmClientCertificateIdentifier"]; } if (output["HsmClientCertificatePublicKey"] !== undefined) { contents.HsmClientCertificatePublicKey = - output["HsmClientCertificatePublicKey"]["#text"] !== undefined - ? output["HsmClientCertificatePublicKey"]["#text"] - : output["HsmClientCertificatePublicKey"]; + output["HsmClientCertificatePublicKey"]; } if (output.Tags === "") { contents.Tags = []; @@ -19131,10 +18482,7 @@ const deserializeAws_queryHsmClientCertificateMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -19152,28 +18500,16 @@ const deserializeAws_queryHsmConfiguration = ( Tags: undefined }; if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["HsmConfigurationIdentifier"] !== undefined) { - contents.HsmConfigurationIdentifier = - output["HsmConfigurationIdentifier"]["#text"] !== undefined - ? output["HsmConfigurationIdentifier"]["#text"] - : output["HsmConfigurationIdentifier"]; + contents.HsmConfigurationIdentifier = output["HsmConfigurationIdentifier"]; } if (output["HsmIpAddress"] !== undefined) { - contents.HsmIpAddress = - output["HsmIpAddress"]["#text"] !== undefined - ? output["HsmIpAddress"]["#text"] - : output["HsmIpAddress"]; + contents.HsmIpAddress = output["HsmIpAddress"]; } if (output["HsmPartitionName"] !== undefined) { - contents.HsmPartitionName = - output["HsmPartitionName"]["#text"] !== undefined - ? output["HsmPartitionName"]["#text"] - : output["HsmPartitionName"]; + contents.HsmPartitionName = output["HsmPartitionName"]; } if (output.Tags === "") { contents.Tags = []; @@ -19218,10 +18554,7 @@ const deserializeAws_queryHsmConfigurationMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -19238,21 +18571,13 @@ const deserializeAws_queryHsmStatus = ( }; if (output["HsmClientCertificateIdentifier"] !== undefined) { contents.HsmClientCertificateIdentifier = - output["HsmClientCertificateIdentifier"]["#text"] !== undefined - ? output["HsmClientCertificateIdentifier"]["#text"] - : output["HsmClientCertificateIdentifier"]; + output["HsmClientCertificateIdentifier"]; } if (output["HsmConfigurationIdentifier"] !== undefined) { - contents.HsmConfigurationIdentifier = - output["HsmConfigurationIdentifier"]["#text"] !== undefined - ? output["HsmConfigurationIdentifier"]["#text"] - : output["HsmConfigurationIdentifier"]; + contents.HsmConfigurationIdentifier = output["HsmConfigurationIdentifier"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -19268,16 +18593,10 @@ const deserializeAws_queryIPRange = ( Tags: undefined }; if (output["CIDRIP"] !== undefined) { - contents.CIDRIP = - output["CIDRIP"]["#text"] !== undefined - ? output["CIDRIP"]["#text"] - : output["CIDRIP"]; + contents.CIDRIP = output["CIDRIP"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output.Tags === "") { contents.Tags = []; @@ -19304,27 +18623,21 @@ const deserializeAws_queryImportTablesCompleted = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryImportTablesInProgress = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryImportTablesNotStarted = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryLoggingStatus = ( @@ -19341,16 +18654,10 @@ const deserializeAws_queryLoggingStatus = ( S3KeyPrefix: undefined }; if (output["BucketName"] !== undefined) { - contents.BucketName = - output["BucketName"]["#text"] !== undefined - ? output["BucketName"]["#text"] - : output["BucketName"]; + contents.BucketName = output["BucketName"]; } if (output["LastFailureMessage"] !== undefined) { - contents.LastFailureMessage = - output["LastFailureMessage"]["#text"] !== undefined - ? output["LastFailureMessage"]["#text"] - : output["LastFailureMessage"]; + contents.LastFailureMessage = output["LastFailureMessage"]; } if (output["LastFailureTime"] !== undefined) { contents.LastFailureTime = new Date(output["LastFailureTime"]); @@ -19361,16 +18668,10 @@ const deserializeAws_queryLoggingStatus = ( ); } if (output["LoggingEnabled"] !== undefined) { - contents.LoggingEnabled = - (output["LoggingEnabled"]["#text"] !== undefined - ? output["LoggingEnabled"]["#text"] - : output["LoggingEnabled"]) == "true"; + contents.LoggingEnabled = output["LoggingEnabled"] == "true"; } if (output["S3KeyPrefix"] !== undefined) { - contents.S3KeyPrefix = - output["S3KeyPrefix"]["#text"] !== undefined - ? output["S3KeyPrefix"]["#text"] - : output["S3KeyPrefix"]; + contents.S3KeyPrefix = output["S3KeyPrefix"]; } return contents; }; @@ -19386,16 +18687,10 @@ const deserializeAws_queryMaintenanceTrack = ( UpdateTargets: undefined }; if (output["DatabaseVersion"] !== undefined) { - contents.DatabaseVersion = - output["DatabaseVersion"]["#text"] !== undefined - ? output["DatabaseVersion"]["#text"] - : output["DatabaseVersion"]; + contents.DatabaseVersion = output["DatabaseVersion"]; } if (output["MaintenanceTrackName"] !== undefined) { - contents.MaintenanceTrackName = - output["MaintenanceTrackName"]["#text"] !== undefined - ? output["MaintenanceTrackName"]["#text"] - : output["MaintenanceTrackName"]; + contents.MaintenanceTrackName = output["MaintenanceTrackName"]; } if (output.UpdateTargets === "") { contents.UpdateTargets = []; @@ -19546,29 +18841,17 @@ const deserializeAws_queryNodeConfigurationOption = ( }; if (output["EstimatedDiskUtilizationPercent"] !== undefined) { contents.EstimatedDiskUtilizationPercent = parseFloat( - output["EstimatedDiskUtilizationPercent"]["#text"] !== undefined - ? output["EstimatedDiskUtilizationPercent"]["#text"] - : output["EstimatedDiskUtilizationPercent"] + output["EstimatedDiskUtilizationPercent"] ); } if (output["Mode"] !== undefined) { - contents.Mode = - output["Mode"]["#text"] !== undefined - ? output["Mode"]["#text"] - : output["Mode"]; + contents.Mode = output["Mode"]; } if (output["NodeType"] !== undefined) { - contents.NodeType = - output["NodeType"]["#text"] !== undefined - ? output["NodeType"]["#text"] - : output["NodeType"]; + contents.NodeType = output["NodeType"]; } if (output["NumberOfNodes"] !== undefined) { - contents.NumberOfNodes = parseInt( - output["NumberOfNodes"]["#text"] !== undefined - ? output["NumberOfNodes"]["#text"] - : output["NumberOfNodes"] - ); + contents.NumberOfNodes = parseInt(output["NumberOfNodes"]); } return contents; }; @@ -19592,10 +18875,7 @@ const deserializeAws_queryNodeConfigurationOptionsMessage = ( NodeConfigurationOptionList: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.NodeConfigurationOptionList === "") { contents.NodeConfigurationOptionList = []; @@ -19639,22 +18919,13 @@ const deserializeAws_queryOrderableClusterOption = ( ); } if (output["ClusterType"] !== undefined) { - contents.ClusterType = - output["ClusterType"]["#text"] !== undefined - ? output["ClusterType"]["#text"] - : output["ClusterType"]; + contents.ClusterType = output["ClusterType"]; } if (output["ClusterVersion"] !== undefined) { - contents.ClusterVersion = - output["ClusterVersion"]["#text"] !== undefined - ? output["ClusterVersion"]["#text"] - : output["ClusterVersion"]; + contents.ClusterVersion = output["ClusterVersion"]; } if (output["NodeType"] !== undefined) { - contents.NodeType = - output["NodeType"]["#text"] !== undefined - ? output["NodeType"]["#text"] - : output["NodeType"]; + contents.NodeType = output["NodeType"]; } return contents; }; @@ -19678,10 +18949,7 @@ const deserializeAws_queryOrderableClusterOptionsMessage = ( OrderableClusterOptions: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.OrderableClusterOptions === "") { contents.OrderableClusterOptions = []; @@ -19717,58 +18985,31 @@ const deserializeAws_queryParameter = ( Source: undefined }; if (output["AllowedValues"] !== undefined) { - contents.AllowedValues = - output["AllowedValues"]["#text"] !== undefined - ? output["AllowedValues"]["#text"] - : output["AllowedValues"]; + contents.AllowedValues = output["AllowedValues"]; } if (output["ApplyType"] !== undefined) { - contents.ApplyType = - output["ApplyType"]["#text"] !== undefined - ? output["ApplyType"]["#text"] - : output["ApplyType"]; + contents.ApplyType = output["ApplyType"]; } if (output["DataType"] !== undefined) { - contents.DataType = - output["DataType"]["#text"] !== undefined - ? output["DataType"]["#text"] - : output["DataType"]; + contents.DataType = output["DataType"]; } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["IsModifiable"] !== undefined) { - contents.IsModifiable = - (output["IsModifiable"]["#text"] !== undefined - ? output["IsModifiable"]["#text"] - : output["IsModifiable"]) == "true"; + contents.IsModifiable = output["IsModifiable"] == "true"; } if (output["MinimumEngineVersion"] !== undefined) { - contents.MinimumEngineVersion = - output["MinimumEngineVersion"]["#text"] !== undefined - ? output["MinimumEngineVersion"]["#text"] - : output["MinimumEngineVersion"]; + contents.MinimumEngineVersion = output["MinimumEngineVersion"]; } if (output["ParameterName"] !== undefined) { - contents.ParameterName = - output["ParameterName"]["#text"] !== undefined - ? output["ParameterName"]["#text"] - : output["ParameterName"]; + contents.ParameterName = output["ParameterName"]; } if (output["ParameterValue"] !== undefined) { - contents.ParameterValue = - output["ParameterValue"]["#text"] !== undefined - ? output["ParameterValue"]["#text"] - : output["ParameterValue"]; + contents.ParameterValue = output["ParameterValue"]; } if (output["Source"] !== undefined) { - contents.Source = - output["Source"]["#text"] !== undefined - ? output["Source"]["#text"] - : output["Source"]; + contents.Source = output["Source"]; } return contents; }; @@ -19795,9 +19036,7 @@ const deserializeAws_queryPendingActionsList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryPendingModifiedValues = ( @@ -19820,71 +19059,38 @@ const deserializeAws_queryPendingModifiedValues = ( }; if (output["AutomatedSnapshotRetentionPeriod"] !== undefined) { contents.AutomatedSnapshotRetentionPeriod = parseInt( - output["AutomatedSnapshotRetentionPeriod"]["#text"] !== undefined - ? output["AutomatedSnapshotRetentionPeriod"]["#text"] - : output["AutomatedSnapshotRetentionPeriod"] + output["AutomatedSnapshotRetentionPeriod"] ); } if (output["ClusterIdentifier"] !== undefined) { - contents.ClusterIdentifier = - output["ClusterIdentifier"]["#text"] !== undefined - ? output["ClusterIdentifier"]["#text"] - : output["ClusterIdentifier"]; + contents.ClusterIdentifier = output["ClusterIdentifier"]; } if (output["ClusterType"] !== undefined) { - contents.ClusterType = - output["ClusterType"]["#text"] !== undefined - ? output["ClusterType"]["#text"] - : output["ClusterType"]; + contents.ClusterType = output["ClusterType"]; } if (output["ClusterVersion"] !== undefined) { - contents.ClusterVersion = - output["ClusterVersion"]["#text"] !== undefined - ? output["ClusterVersion"]["#text"] - : output["ClusterVersion"]; + contents.ClusterVersion = output["ClusterVersion"]; } if (output["EncryptionType"] !== undefined) { - contents.EncryptionType = - output["EncryptionType"]["#text"] !== undefined - ? output["EncryptionType"]["#text"] - : output["EncryptionType"]; + contents.EncryptionType = output["EncryptionType"]; } if (output["EnhancedVpcRouting"] !== undefined) { - contents.EnhancedVpcRouting = - (output["EnhancedVpcRouting"]["#text"] !== undefined - ? output["EnhancedVpcRouting"]["#text"] - : output["EnhancedVpcRouting"]) == "true"; + contents.EnhancedVpcRouting = output["EnhancedVpcRouting"] == "true"; } if (output["MaintenanceTrackName"] !== undefined) { - contents.MaintenanceTrackName = - output["MaintenanceTrackName"]["#text"] !== undefined - ? output["MaintenanceTrackName"]["#text"] - : output["MaintenanceTrackName"]; + contents.MaintenanceTrackName = output["MaintenanceTrackName"]; } if (output["MasterUserPassword"] !== undefined) { - contents.MasterUserPassword = - output["MasterUserPassword"]["#text"] !== undefined - ? output["MasterUserPassword"]["#text"] - : output["MasterUserPassword"]; + contents.MasterUserPassword = output["MasterUserPassword"]; } if (output["NodeType"] !== undefined) { - contents.NodeType = - output["NodeType"]["#text"] !== undefined - ? output["NodeType"]["#text"] - : output["NodeType"]; + contents.NodeType = output["NodeType"]; } if (output["NumberOfNodes"] !== undefined) { - contents.NumberOfNodes = parseInt( - output["NumberOfNodes"]["#text"] !== undefined - ? output["NumberOfNodes"]["#text"] - : output["NumberOfNodes"] - ); + contents.NumberOfNodes = parseInt(output["NumberOfNodes"]); } if (output["PubliclyAccessible"] !== undefined) { - contents.PubliclyAccessible = - (output["PubliclyAccessible"]["#text"] !== undefined - ? output["PubliclyAccessible"]["#text"] - : output["PubliclyAccessible"]) == "true"; + contents.PubliclyAccessible = output["PubliclyAccessible"] == "true"; } return contents; }; @@ -19931,16 +19137,11 @@ const deserializeAws_queryRecurringCharge = ( }; if (output["RecurringChargeAmount"] !== undefined) { contents.RecurringChargeAmount = parseFloat( - output["RecurringChargeAmount"]["#text"] !== undefined - ? output["RecurringChargeAmount"]["#text"] - : output["RecurringChargeAmount"] + output["RecurringChargeAmount"] ); } if (output["RecurringChargeFrequency"] !== undefined) { - contents.RecurringChargeFrequency = - output["RecurringChargeFrequency"]["#text"] !== undefined - ? output["RecurringChargeFrequency"]["#text"] - : output["RecurringChargeFrequency"]; + contents.RecurringChargeFrequency = output["RecurringChargeFrequency"]; } return contents; }; @@ -19975,43 +19176,22 @@ const deserializeAws_queryReservedNode = ( UsagePrice: undefined }; if (output["CurrencyCode"] !== undefined) { - contents.CurrencyCode = - output["CurrencyCode"]["#text"] !== undefined - ? output["CurrencyCode"]["#text"] - : output["CurrencyCode"]; + contents.CurrencyCode = output["CurrencyCode"]; } if (output["Duration"] !== undefined) { - contents.Duration = parseInt( - output["Duration"]["#text"] !== undefined - ? output["Duration"]["#text"] - : output["Duration"] - ); + contents.Duration = parseInt(output["Duration"]); } if (output["FixedPrice"] !== undefined) { - contents.FixedPrice = parseFloat( - output["FixedPrice"]["#text"] !== undefined - ? output["FixedPrice"]["#text"] - : output["FixedPrice"] - ); + contents.FixedPrice = parseFloat(output["FixedPrice"]); } if (output["NodeCount"] !== undefined) { - contents.NodeCount = parseInt( - output["NodeCount"]["#text"] !== undefined - ? output["NodeCount"]["#text"] - : output["NodeCount"] - ); + contents.NodeCount = parseInt(output["NodeCount"]); } if (output["NodeType"] !== undefined) { - contents.NodeType = - output["NodeType"]["#text"] !== undefined - ? output["NodeType"]["#text"] - : output["NodeType"]; + contents.NodeType = output["NodeType"]; } if (output["OfferingType"] !== undefined) { - contents.OfferingType = - output["OfferingType"]["#text"] !== undefined - ? output["OfferingType"]["#text"] - : output["OfferingType"]; + contents.OfferingType = output["OfferingType"]; } if (output.RecurringCharges === "") { contents.RecurringCharges = []; @@ -20026,38 +19206,22 @@ const deserializeAws_queryReservedNode = ( ); } if (output["ReservedNodeId"] !== undefined) { - contents.ReservedNodeId = - output["ReservedNodeId"]["#text"] !== undefined - ? output["ReservedNodeId"]["#text"] - : output["ReservedNodeId"]; + contents.ReservedNodeId = output["ReservedNodeId"]; } if (output["ReservedNodeOfferingId"] !== undefined) { - contents.ReservedNodeOfferingId = - output["ReservedNodeOfferingId"]["#text"] !== undefined - ? output["ReservedNodeOfferingId"]["#text"] - : output["ReservedNodeOfferingId"]; + contents.ReservedNodeOfferingId = output["ReservedNodeOfferingId"]; } if (output["ReservedNodeOfferingType"] !== undefined) { - contents.ReservedNodeOfferingType = - output["ReservedNodeOfferingType"]["#text"] !== undefined - ? output["ReservedNodeOfferingType"]["#text"] - : output["ReservedNodeOfferingType"]; + contents.ReservedNodeOfferingType = output["ReservedNodeOfferingType"]; } if (output["StartTime"] !== undefined) { contents.StartTime = new Date(output["StartTime"]); } if (output["State"] !== undefined) { - contents.State = - output["State"]["#text"] !== undefined - ? output["State"]["#text"] - : output["State"]; + contents.State = output["State"]; } if (output["UsagePrice"] !== undefined) { - contents.UsagePrice = parseFloat( - output["UsagePrice"]["#text"] !== undefined - ? output["UsagePrice"]["#text"] - : output["UsagePrice"] - ); + contents.UsagePrice = parseFloat(output["UsagePrice"]); } return contents; }; @@ -20088,36 +19252,19 @@ const deserializeAws_queryReservedNodeOffering = ( UsagePrice: undefined }; if (output["CurrencyCode"] !== undefined) { - contents.CurrencyCode = - output["CurrencyCode"]["#text"] !== undefined - ? output["CurrencyCode"]["#text"] - : output["CurrencyCode"]; + contents.CurrencyCode = output["CurrencyCode"]; } if (output["Duration"] !== undefined) { - contents.Duration = parseInt( - output["Duration"]["#text"] !== undefined - ? output["Duration"]["#text"] - : output["Duration"] - ); + contents.Duration = parseInt(output["Duration"]); } if (output["FixedPrice"] !== undefined) { - contents.FixedPrice = parseFloat( - output["FixedPrice"]["#text"] !== undefined - ? output["FixedPrice"]["#text"] - : output["FixedPrice"] - ); + contents.FixedPrice = parseFloat(output["FixedPrice"]); } if (output["NodeType"] !== undefined) { - contents.NodeType = - output["NodeType"]["#text"] !== undefined - ? output["NodeType"]["#text"] - : output["NodeType"]; + contents.NodeType = output["NodeType"]; } if (output["OfferingType"] !== undefined) { - contents.OfferingType = - output["OfferingType"]["#text"] !== undefined - ? output["OfferingType"]["#text"] - : output["OfferingType"]; + contents.OfferingType = output["OfferingType"]; } if (output.RecurringCharges === "") { contents.RecurringCharges = []; @@ -20132,23 +19279,13 @@ const deserializeAws_queryReservedNodeOffering = ( ); } if (output["ReservedNodeOfferingId"] !== undefined) { - contents.ReservedNodeOfferingId = - output["ReservedNodeOfferingId"]["#text"] !== undefined - ? output["ReservedNodeOfferingId"]["#text"] - : output["ReservedNodeOfferingId"]; + contents.ReservedNodeOfferingId = output["ReservedNodeOfferingId"]; } if (output["ReservedNodeOfferingType"] !== undefined) { - contents.ReservedNodeOfferingType = - output["ReservedNodeOfferingType"]["#text"] !== undefined - ? output["ReservedNodeOfferingType"]["#text"] - : output["ReservedNodeOfferingType"]; + contents.ReservedNodeOfferingType = output["ReservedNodeOfferingType"]; } if (output["UsagePrice"] !== undefined) { - contents.UsagePrice = parseFloat( - output["UsagePrice"]["#text"] !== undefined - ? output["UsagePrice"]["#text"] - : output["UsagePrice"] - ); + contents.UsagePrice = parseFloat(output["UsagePrice"]); } return contents; }; @@ -20172,10 +19309,7 @@ const deserializeAws_queryReservedNodeOfferingsMessage = ( ReservedNodeOfferings: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.ReservedNodeOfferings === "") { contents.ReservedNodeOfferings = []; @@ -20204,10 +19338,7 @@ const deserializeAws_queryReservedNodesMessage = ( ReservedNodes: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.ReservedNodes === "") { contents.ReservedNodes = []; @@ -20237,35 +19368,19 @@ const deserializeAws_queryResizeClusterMessage = ( NumberOfNodes: undefined }; if (output["Classic"] !== undefined) { - contents.Classic = - (output["Classic"]["#text"] !== undefined - ? output["Classic"]["#text"] - : output["Classic"]) == "true"; + contents.Classic = output["Classic"] == "true"; } if (output["ClusterIdentifier"] !== undefined) { - contents.ClusterIdentifier = - output["ClusterIdentifier"]["#text"] !== undefined - ? output["ClusterIdentifier"]["#text"] - : output["ClusterIdentifier"]; + contents.ClusterIdentifier = output["ClusterIdentifier"]; } if (output["ClusterType"] !== undefined) { - contents.ClusterType = - output["ClusterType"]["#text"] !== undefined - ? output["ClusterType"]["#text"] - : output["ClusterType"]; + contents.ClusterType = output["ClusterType"]; } if (output["NodeType"] !== undefined) { - contents.NodeType = - output["NodeType"]["#text"] !== undefined - ? output["NodeType"]["#text"] - : output["NodeType"]; + contents.NodeType = output["NodeType"]; } if (output["NumberOfNodes"] !== undefined) { - contents.NumberOfNodes = parseInt( - output["NumberOfNodes"]["#text"] !== undefined - ? output["NumberOfNodes"]["#text"] - : output["NumberOfNodes"] - ); + contents.NumberOfNodes = parseInt(output["NumberOfNodes"]); } return contents; }; @@ -20294,16 +19409,10 @@ const deserializeAws_queryResizeInfo = ( ResizeType: undefined }; if (output["AllowCancelResize"] !== undefined) { - contents.AllowCancelResize = - (output["AllowCancelResize"]["#text"] !== undefined - ? output["AllowCancelResize"]["#text"] - : output["AllowCancelResize"]) == "true"; + contents.AllowCancelResize = output["AllowCancelResize"] == "true"; } if (output["ResizeType"] !== undefined) { - contents.ResizeType = - output["ResizeType"]["#text"] !== undefined - ? output["ResizeType"]["#text"] - : output["ResizeType"]; + contents.ResizeType = output["ResizeType"]; } return contents; }; @@ -20333,30 +19442,20 @@ const deserializeAws_queryResizeProgressMessage = ( }; if (output["AvgResizeRateInMegaBytesPerSecond"] !== undefined) { contents.AvgResizeRateInMegaBytesPerSecond = parseFloat( - output["AvgResizeRateInMegaBytesPerSecond"]["#text"] !== undefined - ? output["AvgResizeRateInMegaBytesPerSecond"]["#text"] - : output["AvgResizeRateInMegaBytesPerSecond"] + output["AvgResizeRateInMegaBytesPerSecond"] ); } if (output["DataTransferProgressPercent"] !== undefined) { contents.DataTransferProgressPercent = parseFloat( - output["DataTransferProgressPercent"]["#text"] !== undefined - ? output["DataTransferProgressPercent"]["#text"] - : output["DataTransferProgressPercent"] + output["DataTransferProgressPercent"] ); } if (output["ElapsedTimeInSeconds"] !== undefined) { - contents.ElapsedTimeInSeconds = parseInt( - output["ElapsedTimeInSeconds"]["#text"] !== undefined - ? output["ElapsedTimeInSeconds"]["#text"] - : output["ElapsedTimeInSeconds"] - ); + contents.ElapsedTimeInSeconds = parseInt(output["ElapsedTimeInSeconds"]); } if (output["EstimatedTimeToCompletionInSeconds"] !== undefined) { contents.EstimatedTimeToCompletionInSeconds = parseInt( - output["EstimatedTimeToCompletionInSeconds"]["#text"] !== undefined - ? output["EstimatedTimeToCompletionInSeconds"]["#text"] - : output["EstimatedTimeToCompletionInSeconds"] + output["EstimatedTimeToCompletionInSeconds"] ); } if (output.ImportTablesCompleted === "") { @@ -20396,60 +19495,32 @@ const deserializeAws_queryResizeProgressMessage = ( ); } if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } if (output["ProgressInMegaBytes"] !== undefined) { - contents.ProgressInMegaBytes = parseInt( - output["ProgressInMegaBytes"]["#text"] !== undefined - ? output["ProgressInMegaBytes"]["#text"] - : output["ProgressInMegaBytes"] - ); + contents.ProgressInMegaBytes = parseInt(output["ProgressInMegaBytes"]); } if (output["ResizeType"] !== undefined) { - contents.ResizeType = - output["ResizeType"]["#text"] !== undefined - ? output["ResizeType"]["#text"] - : output["ResizeType"]; + contents.ResizeType = output["ResizeType"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["TargetClusterType"] !== undefined) { - contents.TargetClusterType = - output["TargetClusterType"]["#text"] !== undefined - ? output["TargetClusterType"]["#text"] - : output["TargetClusterType"]; + contents.TargetClusterType = output["TargetClusterType"]; } if (output["TargetEncryptionType"] !== undefined) { - contents.TargetEncryptionType = - output["TargetEncryptionType"]["#text"] !== undefined - ? output["TargetEncryptionType"]["#text"] - : output["TargetEncryptionType"]; + contents.TargetEncryptionType = output["TargetEncryptionType"]; } if (output["TargetNodeType"] !== undefined) { - contents.TargetNodeType = - output["TargetNodeType"]["#text"] !== undefined - ? output["TargetNodeType"]["#text"] - : output["TargetNodeType"]; + contents.TargetNodeType = output["TargetNodeType"]; } if (output["TargetNumberOfNodes"] !== undefined) { - contents.TargetNumberOfNodes = parseInt( - output["TargetNumberOfNodes"]["#text"] !== undefined - ? output["TargetNumberOfNodes"]["#text"] - : output["TargetNumberOfNodes"] - ); + contents.TargetNumberOfNodes = parseInt(output["TargetNumberOfNodes"]); } if (output["TotalResizeDataInMegaBytes"] !== undefined) { contents.TotalResizeDataInMegaBytes = parseInt( - output["TotalResizeDataInMegaBytes"]["#text"] !== undefined - ? output["TotalResizeDataInMegaBytes"]["#text"] - : output["TotalResizeDataInMegaBytes"] + output["TotalResizeDataInMegaBytes"] ); } return contents; @@ -20459,9 +19530,7 @@ const deserializeAws_queryRestorableNodeTypeList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryRestoreFromClusterSnapshotResult = ( @@ -20493,44 +19562,27 @@ const deserializeAws_queryRestoreStatus = ( }; if (output["CurrentRestoreRateInMegaBytesPerSecond"] !== undefined) { contents.CurrentRestoreRateInMegaBytesPerSecond = parseFloat( - output["CurrentRestoreRateInMegaBytesPerSecond"]["#text"] !== undefined - ? output["CurrentRestoreRateInMegaBytesPerSecond"]["#text"] - : output["CurrentRestoreRateInMegaBytesPerSecond"] + output["CurrentRestoreRateInMegaBytesPerSecond"] ); } if (output["ElapsedTimeInSeconds"] !== undefined) { - contents.ElapsedTimeInSeconds = parseInt( - output["ElapsedTimeInSeconds"]["#text"] !== undefined - ? output["ElapsedTimeInSeconds"]["#text"] - : output["ElapsedTimeInSeconds"] - ); + contents.ElapsedTimeInSeconds = parseInt(output["ElapsedTimeInSeconds"]); } if (output["EstimatedTimeToCompletionInSeconds"] !== undefined) { contents.EstimatedTimeToCompletionInSeconds = parseInt( - output["EstimatedTimeToCompletionInSeconds"]["#text"] !== undefined - ? output["EstimatedTimeToCompletionInSeconds"]["#text"] - : output["EstimatedTimeToCompletionInSeconds"] + output["EstimatedTimeToCompletionInSeconds"] ); } if (output["ProgressInMegaBytes"] !== undefined) { - contents.ProgressInMegaBytes = parseInt( - output["ProgressInMegaBytes"]["#text"] !== undefined - ? output["ProgressInMegaBytes"]["#text"] - : output["ProgressInMegaBytes"] - ); + contents.ProgressInMegaBytes = parseInt(output["ProgressInMegaBytes"]); } if (output["SnapshotSizeInMegaBytes"] !== undefined) { contents.SnapshotSizeInMegaBytes = parseInt( - output["SnapshotSizeInMegaBytes"]["#text"] !== undefined - ? output["SnapshotSizeInMegaBytes"]["#text"] - : output["SnapshotSizeInMegaBytes"] + output["SnapshotSizeInMegaBytes"] ); } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -20563,10 +19615,7 @@ const deserializeAws_queryRevisionTarget = ( Description: undefined }; if (output["DatabaseRevision"] !== undefined) { - contents.DatabaseRevision = - output["DatabaseRevision"]["#text"] !== undefined - ? output["DatabaseRevision"]["#text"] - : output["DatabaseRevision"]; + contents.DatabaseRevision = output["DatabaseRevision"]; } if (output["DatabaseRevisionReleaseDate"] !== undefined) { contents.DatabaseRevisionReleaseDate = new Date( @@ -20574,10 +19623,7 @@ const deserializeAws_queryRevisionTarget = ( ); } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } return contents; }; @@ -20643,9 +19689,7 @@ const deserializeAws_queryScheduleDefinitionList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryScheduledAction = ( @@ -20668,10 +19712,7 @@ const deserializeAws_queryScheduledAction = ( contents.EndTime = new Date(output["EndTime"]); } if (output["IamRole"] !== undefined) { - contents.IamRole = - output["IamRole"]["#text"] !== undefined - ? output["IamRole"]["#text"] - : output["IamRole"]; + contents.IamRole = output["IamRole"]; } if (output.NextInvocations === "") { contents.NextInvocations = []; @@ -20686,31 +19727,19 @@ const deserializeAws_queryScheduledAction = ( ); } if (output["Schedule"] !== undefined) { - contents.Schedule = - output["Schedule"]["#text"] !== undefined - ? output["Schedule"]["#text"] - : output["Schedule"]; + contents.Schedule = output["Schedule"]; } if (output["ScheduledActionDescription"] !== undefined) { - contents.ScheduledActionDescription = - output["ScheduledActionDescription"]["#text"] !== undefined - ? output["ScheduledActionDescription"]["#text"] - : output["ScheduledActionDescription"]; + contents.ScheduledActionDescription = output["ScheduledActionDescription"]; } if (output["ScheduledActionName"] !== undefined) { - contents.ScheduledActionName = - output["ScheduledActionName"]["#text"] !== undefined - ? output["ScheduledActionName"]["#text"] - : output["ScheduledActionName"]; + contents.ScheduledActionName = output["ScheduledActionName"]; } if (output["StartTime"] !== undefined) { contents.StartTime = new Date(output["StartTime"]); } if (output["State"] !== undefined) { - contents.State = - output["State"]["#text"] !== undefined - ? output["State"]["#text"] - : output["State"]; + contents.State = output["State"]; } if (output["TargetAction"] !== undefined) { contents.TargetAction = deserializeAws_queryScheduledActionType( @@ -20764,10 +19793,7 @@ const deserializeAws_queryScheduledActionsMessage = ( ScheduledActions: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.ScheduledActions === "") { contents.ScheduledActions = []; @@ -20848,141 +19874,81 @@ const deserializeAws_querySnapshot = ( } if (output["ActualIncrementalBackupSizeInMegaBytes"] !== undefined) { contents.ActualIncrementalBackupSizeInMegaBytes = parseFloat( - output["ActualIncrementalBackupSizeInMegaBytes"]["#text"] !== undefined - ? output["ActualIncrementalBackupSizeInMegaBytes"]["#text"] - : output["ActualIncrementalBackupSizeInMegaBytes"] + output["ActualIncrementalBackupSizeInMegaBytes"] ); } if (output["AvailabilityZone"] !== undefined) { - contents.AvailabilityZone = - output["AvailabilityZone"]["#text"] !== undefined - ? output["AvailabilityZone"]["#text"] - : output["AvailabilityZone"]; + contents.AvailabilityZone = output["AvailabilityZone"]; } if (output["BackupProgressInMegaBytes"] !== undefined) { contents.BackupProgressInMegaBytes = parseFloat( - output["BackupProgressInMegaBytes"]["#text"] !== undefined - ? output["BackupProgressInMegaBytes"]["#text"] - : output["BackupProgressInMegaBytes"] + output["BackupProgressInMegaBytes"] ); } if (output["ClusterCreateTime"] !== undefined) { contents.ClusterCreateTime = new Date(output["ClusterCreateTime"]); } if (output["ClusterIdentifier"] !== undefined) { - contents.ClusterIdentifier = - output["ClusterIdentifier"]["#text"] !== undefined - ? output["ClusterIdentifier"]["#text"] - : output["ClusterIdentifier"]; + contents.ClusterIdentifier = output["ClusterIdentifier"]; } if (output["ClusterVersion"] !== undefined) { - contents.ClusterVersion = - output["ClusterVersion"]["#text"] !== undefined - ? output["ClusterVersion"]["#text"] - : output["ClusterVersion"]; + contents.ClusterVersion = output["ClusterVersion"]; } if (output["CurrentBackupRateInMegaBytesPerSecond"] !== undefined) { contents.CurrentBackupRateInMegaBytesPerSecond = parseFloat( - output["CurrentBackupRateInMegaBytesPerSecond"]["#text"] !== undefined - ? output["CurrentBackupRateInMegaBytesPerSecond"]["#text"] - : output["CurrentBackupRateInMegaBytesPerSecond"] + output["CurrentBackupRateInMegaBytesPerSecond"] ); } if (output["DBName"] !== undefined) { - contents.DBName = - output["DBName"]["#text"] !== undefined - ? output["DBName"]["#text"] - : output["DBName"]; + contents.DBName = output["DBName"]; } if (output["ElapsedTimeInSeconds"] !== undefined) { - contents.ElapsedTimeInSeconds = parseInt( - output["ElapsedTimeInSeconds"]["#text"] !== undefined - ? output["ElapsedTimeInSeconds"]["#text"] - : output["ElapsedTimeInSeconds"] - ); + contents.ElapsedTimeInSeconds = parseInt(output["ElapsedTimeInSeconds"]); } if (output["Encrypted"] !== undefined) { - contents.Encrypted = - (output["Encrypted"]["#text"] !== undefined - ? output["Encrypted"]["#text"] - : output["Encrypted"]) == "true"; + contents.Encrypted = output["Encrypted"] == "true"; } if (output["EncryptedWithHSM"] !== undefined) { - contents.EncryptedWithHSM = - (output["EncryptedWithHSM"]["#text"] !== undefined - ? output["EncryptedWithHSM"]["#text"] - : output["EncryptedWithHSM"]) == "true"; + contents.EncryptedWithHSM = output["EncryptedWithHSM"] == "true"; } if (output["EnhancedVpcRouting"] !== undefined) { - contents.EnhancedVpcRouting = - (output["EnhancedVpcRouting"]["#text"] !== undefined - ? output["EnhancedVpcRouting"]["#text"] - : output["EnhancedVpcRouting"]) == "true"; + contents.EnhancedVpcRouting = output["EnhancedVpcRouting"] == "true"; } if (output["EstimatedSecondsToCompletion"] !== undefined) { contents.EstimatedSecondsToCompletion = parseInt( - output["EstimatedSecondsToCompletion"]["#text"] !== undefined - ? output["EstimatedSecondsToCompletion"]["#text"] - : output["EstimatedSecondsToCompletion"] + output["EstimatedSecondsToCompletion"] ); } if (output["KmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["KmsKeyId"]["#text"] !== undefined - ? output["KmsKeyId"]["#text"] - : output["KmsKeyId"]; + contents.KmsKeyId = output["KmsKeyId"]; } if (output["MaintenanceTrackName"] !== undefined) { - contents.MaintenanceTrackName = - output["MaintenanceTrackName"]["#text"] !== undefined - ? output["MaintenanceTrackName"]["#text"] - : output["MaintenanceTrackName"]; + contents.MaintenanceTrackName = output["MaintenanceTrackName"]; } if (output["ManualSnapshotRemainingDays"] !== undefined) { contents.ManualSnapshotRemainingDays = parseInt( - output["ManualSnapshotRemainingDays"]["#text"] !== undefined - ? output["ManualSnapshotRemainingDays"]["#text"] - : output["ManualSnapshotRemainingDays"] + output["ManualSnapshotRemainingDays"] ); } if (output["ManualSnapshotRetentionPeriod"] !== undefined) { contents.ManualSnapshotRetentionPeriod = parseInt( - output["ManualSnapshotRetentionPeriod"]["#text"] !== undefined - ? output["ManualSnapshotRetentionPeriod"]["#text"] - : output["ManualSnapshotRetentionPeriod"] + output["ManualSnapshotRetentionPeriod"] ); } if (output["MasterUsername"] !== undefined) { - contents.MasterUsername = - output["MasterUsername"]["#text"] !== undefined - ? output["MasterUsername"]["#text"] - : output["MasterUsername"]; + contents.MasterUsername = output["MasterUsername"]; } if (output["NodeType"] !== undefined) { - contents.NodeType = - output["NodeType"]["#text"] !== undefined - ? output["NodeType"]["#text"] - : output["NodeType"]; + contents.NodeType = output["NodeType"]; } if (output["NumberOfNodes"] !== undefined) { - contents.NumberOfNodes = parseInt( - output["NumberOfNodes"]["#text"] !== undefined - ? output["NumberOfNodes"]["#text"] - : output["NumberOfNodes"] - ); + contents.NumberOfNodes = parseInt(output["NumberOfNodes"]); } if (output["OwnerAccount"] !== undefined) { - contents.OwnerAccount = - output["OwnerAccount"]["#text"] !== undefined - ? output["OwnerAccount"]["#text"] - : output["OwnerAccount"]; + contents.OwnerAccount = output["OwnerAccount"]; } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } if (output.RestorableNodeTypes === "") { contents.RestorableNodeTypes = []; @@ -21000,10 +19966,7 @@ const deserializeAws_querySnapshot = ( contents.SnapshotCreateTime = new Date(output["SnapshotCreateTime"]); } if (output["SnapshotIdentifier"] !== undefined) { - contents.SnapshotIdentifier = - output["SnapshotIdentifier"]["#text"] !== undefined - ? output["SnapshotIdentifier"]["#text"] - : output["SnapshotIdentifier"]; + contents.SnapshotIdentifier = output["SnapshotIdentifier"]; } if (output["SnapshotRetentionStartTime"] !== undefined) { contents.SnapshotRetentionStartTime = new Date( @@ -21011,22 +19974,13 @@ const deserializeAws_querySnapshot = ( ); } if (output["SnapshotType"] !== undefined) { - contents.SnapshotType = - output["SnapshotType"]["#text"] !== undefined - ? output["SnapshotType"]["#text"] - : output["SnapshotType"]; + contents.SnapshotType = output["SnapshotType"]; } if (output["SourceRegion"] !== undefined) { - contents.SourceRegion = - output["SourceRegion"]["#text"] !== undefined - ? output["SourceRegion"]["#text"] - : output["SourceRegion"]; + contents.SourceRegion = output["SourceRegion"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output.Tags === "") { contents.Tags = []; @@ -21039,16 +19993,11 @@ const deserializeAws_querySnapshot = ( } if (output["TotalBackupSizeInMegaBytes"] !== undefined) { contents.TotalBackupSizeInMegaBytes = parseFloat( - output["TotalBackupSizeInMegaBytes"]["#text"] !== undefined - ? output["TotalBackupSizeInMegaBytes"]["#text"] - : output["TotalBackupSizeInMegaBytes"] + output["TotalBackupSizeInMegaBytes"] ); } if (output["VpcId"] !== undefined) { - contents.VpcId = - output["VpcId"]["#text"] !== undefined - ? output["VpcId"]["#text"] - : output["VpcId"]; + contents.VpcId = output["VpcId"]; } return contents; }; @@ -21064,16 +20013,10 @@ const deserializeAws_querySnapshotCopyGrant = ( Tags: undefined }; if (output["KmsKeyId"] !== undefined) { - contents.KmsKeyId = - output["KmsKeyId"]["#text"] !== undefined - ? output["KmsKeyId"]["#text"] - : output["KmsKeyId"]; + contents.KmsKeyId = output["KmsKeyId"]; } if (output["SnapshotCopyGrantName"] !== undefined) { - contents.SnapshotCopyGrantName = - output["SnapshotCopyGrantName"]["#text"] !== undefined - ? output["SnapshotCopyGrantName"]["#text"] - : output["SnapshotCopyGrantName"]; + contents.SnapshotCopyGrantName = output["SnapshotCopyGrantName"]; } if (output.Tags === "") { contents.Tags = []; @@ -21106,10 +20049,7 @@ const deserializeAws_querySnapshotCopyGrantMessage = ( SnapshotCopyGrants: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.SnapshotCopyGrants === "") { contents.SnapshotCopyGrants = []; @@ -21138,28 +20078,16 @@ const deserializeAws_querySnapshotErrorMessage = ( SnapshotIdentifier: undefined }; if (output["FailureCode"] !== undefined) { - contents.FailureCode = - output["FailureCode"]["#text"] !== undefined - ? output["FailureCode"]["#text"] - : output["FailureCode"]; + contents.FailureCode = output["FailureCode"]; } if (output["FailureReason"] !== undefined) { - contents.FailureReason = - output["FailureReason"]["#text"] !== undefined - ? output["FailureReason"]["#text"] - : output["FailureReason"]; + contents.FailureReason = output["FailureReason"]; } if (output["SnapshotClusterIdentifier"] !== undefined) { - contents.SnapshotClusterIdentifier = - output["SnapshotClusterIdentifier"]["#text"] !== undefined - ? output["SnapshotClusterIdentifier"]["#text"] - : output["SnapshotClusterIdentifier"]; + contents.SnapshotClusterIdentifier = output["SnapshotClusterIdentifier"]; } if (output["SnapshotIdentifier"] !== undefined) { - contents.SnapshotIdentifier = - output["SnapshotIdentifier"]["#text"] !== undefined - ? output["SnapshotIdentifier"]["#text"] - : output["SnapshotIdentifier"]; + contents.SnapshotIdentifier = output["SnapshotIdentifier"]; } return contents; }; @@ -21168,9 +20096,7 @@ const deserializeAws_querySnapshotIdentifierList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_querySnapshotList = ( @@ -21192,10 +20118,7 @@ const deserializeAws_querySnapshotMessage = ( Snapshots: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.Snapshots === "") { contents.Snapshots = []; @@ -21228,9 +20151,7 @@ const deserializeAws_querySnapshotSchedule = ( }; if (output["AssociatedClusterCount"] !== undefined) { contents.AssociatedClusterCount = parseInt( - output["AssociatedClusterCount"]["#text"] !== undefined - ? output["AssociatedClusterCount"]["#text"] - : output["AssociatedClusterCount"] + output["AssociatedClusterCount"] ); } if (output.AssociatedClusters === "") { @@ -21274,16 +20195,10 @@ const deserializeAws_querySnapshotSchedule = ( ); } if (output["ScheduleDescription"] !== undefined) { - contents.ScheduleDescription = - output["ScheduleDescription"]["#text"] !== undefined - ? output["ScheduleDescription"]["#text"] - : output["ScheduleDescription"]; + contents.ScheduleDescription = output["ScheduleDescription"]; } if (output["ScheduleIdentifier"] !== undefined) { - contents.ScheduleIdentifier = - output["ScheduleIdentifier"]["#text"] !== undefined - ? output["ScheduleIdentifier"]["#text"] - : output["ScheduleIdentifier"]; + contents.ScheduleIdentifier = output["ScheduleIdentifier"]; } if (output.Tags === "") { contents.Tags = []; @@ -21310,9 +20225,7 @@ const deserializeAws_querySourceIdsList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_querySubnet = ( @@ -21332,16 +20245,10 @@ const deserializeAws_querySubnet = ( ); } if (output["SubnetIdentifier"] !== undefined) { - contents.SubnetIdentifier = - output["SubnetIdentifier"]["#text"] !== undefined - ? output["SubnetIdentifier"]["#text"] - : output["SubnetIdentifier"]; + contents.SubnetIdentifier = output["SubnetIdentifier"]; } if (output["SubnetStatus"] !== undefined) { - contents.SubnetStatus = - output["SubnetStatus"]["#text"] !== undefined - ? output["SubnetStatus"]["#text"] - : output["SubnetStatus"]; + contents.SubnetStatus = output["SubnetStatus"]; } return contents; }; @@ -21364,10 +20271,7 @@ const deserializeAws_querySupportedOperation = ( OperationName: undefined }; if (output["OperationName"] !== undefined) { - contents.OperationName = - output["OperationName"]["#text"] !== undefined - ? output["OperationName"]["#text"] - : output["OperationName"]; + contents.OperationName = output["OperationName"]; } return contents; }; @@ -21390,10 +20294,7 @@ const deserializeAws_querySupportedPlatform = ( Name: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } return contents; }; @@ -21429,87 +20330,46 @@ const deserializeAws_queryTableRestoreStatus = ( TotalDataInMegaBytes: undefined }; if (output["ClusterIdentifier"] !== undefined) { - contents.ClusterIdentifier = - output["ClusterIdentifier"]["#text"] !== undefined - ? output["ClusterIdentifier"]["#text"] - : output["ClusterIdentifier"]; + contents.ClusterIdentifier = output["ClusterIdentifier"]; } if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } if (output["NewTableName"] !== undefined) { - contents.NewTableName = - output["NewTableName"]["#text"] !== undefined - ? output["NewTableName"]["#text"] - : output["NewTableName"]; + contents.NewTableName = output["NewTableName"]; } if (output["ProgressInMegaBytes"] !== undefined) { - contents.ProgressInMegaBytes = parseInt( - output["ProgressInMegaBytes"]["#text"] !== undefined - ? output["ProgressInMegaBytes"]["#text"] - : output["ProgressInMegaBytes"] - ); + contents.ProgressInMegaBytes = parseInt(output["ProgressInMegaBytes"]); } if (output["RequestTime"] !== undefined) { contents.RequestTime = new Date(output["RequestTime"]); } if (output["SnapshotIdentifier"] !== undefined) { - contents.SnapshotIdentifier = - output["SnapshotIdentifier"]["#text"] !== undefined - ? output["SnapshotIdentifier"]["#text"] - : output["SnapshotIdentifier"]; + contents.SnapshotIdentifier = output["SnapshotIdentifier"]; } if (output["SourceDatabaseName"] !== undefined) { - contents.SourceDatabaseName = - output["SourceDatabaseName"]["#text"] !== undefined - ? output["SourceDatabaseName"]["#text"] - : output["SourceDatabaseName"]; + contents.SourceDatabaseName = output["SourceDatabaseName"]; } if (output["SourceSchemaName"] !== undefined) { - contents.SourceSchemaName = - output["SourceSchemaName"]["#text"] !== undefined - ? output["SourceSchemaName"]["#text"] - : output["SourceSchemaName"]; + contents.SourceSchemaName = output["SourceSchemaName"]; } if (output["SourceTableName"] !== undefined) { - contents.SourceTableName = - output["SourceTableName"]["#text"] !== undefined - ? output["SourceTableName"]["#text"] - : output["SourceTableName"]; + contents.SourceTableName = output["SourceTableName"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["TableRestoreRequestId"] !== undefined) { - contents.TableRestoreRequestId = - output["TableRestoreRequestId"]["#text"] !== undefined - ? output["TableRestoreRequestId"]["#text"] - : output["TableRestoreRequestId"]; + contents.TableRestoreRequestId = output["TableRestoreRequestId"]; } if (output["TargetDatabaseName"] !== undefined) { - contents.TargetDatabaseName = - output["TargetDatabaseName"]["#text"] !== undefined - ? output["TargetDatabaseName"]["#text"] - : output["TargetDatabaseName"]; + contents.TargetDatabaseName = output["TargetDatabaseName"]; } if (output["TargetSchemaName"] !== undefined) { - contents.TargetSchemaName = - output["TargetSchemaName"]["#text"] !== undefined - ? output["TargetSchemaName"]["#text"] - : output["TargetSchemaName"]; + contents.TargetSchemaName = output["TargetSchemaName"]; } if (output["TotalDataInMegaBytes"] !== undefined) { - contents.TotalDataInMegaBytes = parseInt( - output["TotalDataInMegaBytes"]["#text"] !== undefined - ? output["TotalDataInMegaBytes"]["#text"] - : output["TotalDataInMegaBytes"] - ); + contents.TotalDataInMegaBytes = parseInt(output["TotalDataInMegaBytes"]); } return contents; }; @@ -21533,10 +20393,7 @@ const deserializeAws_queryTableRestoreStatusMessage = ( TableRestoreStatusDetails: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.TableRestoreStatusDetails === "") { contents.TableRestoreStatusDetails = []; @@ -21562,16 +20419,10 @@ const deserializeAws_queryTag = (output: any, context: __SerdeContext): Tag => { Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -21596,16 +20447,10 @@ const deserializeAws_queryTaggedResource = ( Tag: undefined }; if (output["ResourceName"] !== undefined) { - contents.ResourceName = - output["ResourceName"]["#text"] !== undefined - ? output["ResourceName"]["#text"] - : output["ResourceName"]; + contents.ResourceName = output["ResourceName"]; } if (output["ResourceType"] !== undefined) { - contents.ResourceType = - output["ResourceType"]["#text"] !== undefined - ? output["ResourceType"]["#text"] - : output["ResourceType"]; + contents.ResourceType = output["ResourceType"]; } if (output["Tag"] !== undefined) { contents.Tag = deserializeAws_queryTag(output["Tag"], context); @@ -21632,10 +20477,7 @@ const deserializeAws_queryTaggedResourceListMessage = ( TaggedResources: undefined }; if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } if (output.TaggedResources === "") { contents.TaggedResources = []; @@ -21683,10 +20525,7 @@ const deserializeAws_queryTrackListMessage = ( ); } if (output["Marker"] !== undefined) { - contents.Marker = - output["Marker"]["#text"] !== undefined - ? output["Marker"]["#text"] - : output["Marker"]; + contents.Marker = output["Marker"]; } return contents; }; @@ -21702,16 +20541,10 @@ const deserializeAws_queryUpdateTarget = ( SupportedOperations: undefined }; if (output["DatabaseVersion"] !== undefined) { - contents.DatabaseVersion = - output["DatabaseVersion"]["#text"] !== undefined - ? output["DatabaseVersion"]["#text"] - : output["DatabaseVersion"]; + contents.DatabaseVersion = output["DatabaseVersion"]; } if (output["MaintenanceTrackName"] !== undefined) { - contents.MaintenanceTrackName = - output["MaintenanceTrackName"]["#text"] !== undefined - ? output["MaintenanceTrackName"]["#text"] - : output["MaintenanceTrackName"]; + contents.MaintenanceTrackName = output["MaintenanceTrackName"]; } if (output.SupportedOperations === "") { contents.SupportedOperations = []; @@ -21740,16 +20573,10 @@ const deserializeAws_queryVpcSecurityGroupMembership = ( VpcSecurityGroupId: undefined }; if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["VpcSecurityGroupId"] !== undefined) { - contents.VpcSecurityGroupId = - output["VpcSecurityGroupId"]["#text"] !== undefined - ? output["VpcSecurityGroupId"]["#text"] - : output["VpcSecurityGroupId"]; + contents.VpcSecurityGroupId = output["VpcSecurityGroupId"]; } return contents; }; @@ -21838,7 +20665,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/clients/client-route-53/protocols/Aws_restXml.ts b/clients/client-route-53/protocols/Aws_restXml.ts index 69bc90239200..65c06661b1a4 100644 --- a/clients/client-route-53/protocols/Aws_restXml.ts +++ b/clients/client-route-53/protocols/Aws_restXml.ts @@ -313,7 +313,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -3835,10 +3836,7 @@ export const deserializeAws_restXmlCreateVPCAssociationAuthorizationCommand = as }; const data: any = await parseBody(output.body, context); if (data["HostedZoneId"] !== undefined) { - contents.HostedZoneId = - data["HostedZoneId"]["#text"] !== undefined - ? data["HostedZoneId"]["#text"] - : data["HostedZoneId"]; + contents.HostedZoneId = data["HostedZoneId"]; } if (data["VPC"] !== undefined) { contents.VPC = deserializeAws_restXmlVPC(data["VPC"], context); @@ -4690,11 +4688,7 @@ export const deserializeAws_restXmlGetAccountLimitCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["Count"] !== undefined) { - contents.Count = parseInt( - data["Count"]["#text"] !== undefined - ? data["Count"]["#text"] - : data["Count"] - ); + contents.Count = parseInt(data["Count"]); } if (data["Limit"] !== undefined) { contents.Limit = deserializeAws_restXmlAccountLimit(data["Limit"], context); @@ -5054,11 +5048,7 @@ export const deserializeAws_restXmlGetHealthCheckCountCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["HealthCheckCount"] !== undefined) { - contents.HealthCheckCount = parseInt( - data["HealthCheckCount"]["#text"] !== undefined - ? data["HealthCheckCount"]["#text"] - : data["HealthCheckCount"] - ); + contents.HealthCheckCount = parseInt(data["HealthCheckCount"]); } return Promise.resolve(contents); }; @@ -5371,11 +5361,7 @@ export const deserializeAws_restXmlGetHostedZoneCountCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["HostedZoneCount"] !== undefined) { - contents.HostedZoneCount = parseInt( - data["HostedZoneCount"]["#text"] !== undefined - ? data["HostedZoneCount"]["#text"] - : data["HostedZoneCount"] - ); + contents.HostedZoneCount = parseInt(data["HostedZoneCount"]); } return Promise.resolve(contents); }; @@ -5439,11 +5425,7 @@ export const deserializeAws_restXmlGetHostedZoneLimitCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["Count"] !== undefined) { - contents.Count = parseInt( - data["Count"]["#text"] !== undefined - ? data["Count"]["#text"] - : data["Count"] - ); + contents.Count = parseInt(data["Count"]); } if (data["Limit"] !== undefined) { contents.Limit = deserializeAws_restXmlHostedZoneLimit( @@ -5700,11 +5682,7 @@ export const deserializeAws_restXmlGetReusableDelegationSetLimitCommand = async }; const data: any = await parseBody(output.body, context); if (data["Count"] !== undefined) { - contents.Count = parseInt( - data["Count"]["#text"] !== undefined - ? data["Count"]["#text"] - : data["Count"] - ); + contents.Count = parseInt(data["Count"]); } if (data["Limit"] !== undefined) { contents.Limit = deserializeAws_restXmlReusableDelegationSetLimit( @@ -5936,9 +5914,7 @@ export const deserializeAws_restXmlGetTrafficPolicyInstanceCountCommand = async const data: any = await parseBody(output.body, context); if (data["TrafficPolicyInstanceCount"] !== undefined) { contents.TrafficPolicyInstanceCount = parseInt( - data["TrafficPolicyInstanceCount"]["#text"] !== undefined - ? data["TrafficPolicyInstanceCount"]["#text"] - : data["TrafficPolicyInstanceCount"] + data["TrafficPolicyInstanceCount"] ); } return Promise.resolve(contents); @@ -6007,34 +5983,19 @@ export const deserializeAws_restXmlListGeoLocationsCommand = async ( ); } if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = - (data["IsTruncated"]["#text"] !== undefined - ? data["IsTruncated"]["#text"] - : data["IsTruncated"]) == "true"; + contents.IsTruncated = data["IsTruncated"] == "true"; } if (data["MaxItems"] !== undefined) { - contents.MaxItems = - data["MaxItems"]["#text"] !== undefined - ? data["MaxItems"]["#text"] - : data["MaxItems"]; + contents.MaxItems = data["MaxItems"]; } if (data["NextContinentCode"] !== undefined) { - contents.NextContinentCode = - data["NextContinentCode"]["#text"] !== undefined - ? data["NextContinentCode"]["#text"] - : data["NextContinentCode"]; + contents.NextContinentCode = data["NextContinentCode"]; } if (data["NextCountryCode"] !== undefined) { - contents.NextCountryCode = - data["NextCountryCode"]["#text"] !== undefined - ? data["NextCountryCode"]["#text"] - : data["NextCountryCode"]; + contents.NextCountryCode = data["NextCountryCode"]; } if (data["NextSubdivisionCode"] !== undefined) { - contents.NextSubdivisionCode = - data["NextSubdivisionCode"]["#text"] !== undefined - ? data["NextSubdivisionCode"]["#text"] - : data["NextSubdivisionCode"]; + contents.NextSubdivisionCode = data["NextSubdivisionCode"]; } return Promise.resolve(contents); }; @@ -6110,28 +6071,16 @@ export const deserializeAws_restXmlListHealthChecksCommand = async ( ); } if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = - (data["IsTruncated"]["#text"] !== undefined - ? data["IsTruncated"]["#text"] - : data["IsTruncated"]) == "true"; + contents.IsTruncated = data["IsTruncated"] == "true"; } if (data["Marker"] !== undefined) { - contents.Marker = - data["Marker"]["#text"] !== undefined - ? data["Marker"]["#text"] - : data["Marker"]; + contents.Marker = data["Marker"]; } if (data["MaxItems"] !== undefined) { - contents.MaxItems = - data["MaxItems"]["#text"] !== undefined - ? data["MaxItems"]["#text"] - : data["MaxItems"]; + contents.MaxItems = data["MaxItems"]; } if (data["NextMarker"] !== undefined) { - contents.NextMarker = - data["NextMarker"]["#text"] !== undefined - ? data["NextMarker"]["#text"] - : data["NextMarker"]; + contents.NextMarker = data["NextMarker"]; } return Promise.resolve(contents); }; @@ -6218,28 +6167,16 @@ export const deserializeAws_restXmlListHostedZonesCommand = async ( ); } if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = - (data["IsTruncated"]["#text"] !== undefined - ? data["IsTruncated"]["#text"] - : data["IsTruncated"]) == "true"; + contents.IsTruncated = data["IsTruncated"] == "true"; } if (data["Marker"] !== undefined) { - contents.Marker = - data["Marker"]["#text"] !== undefined - ? data["Marker"]["#text"] - : data["Marker"]; + contents.Marker = data["Marker"]; } if (data["MaxItems"] !== undefined) { - contents.MaxItems = - data["MaxItems"]["#text"] !== undefined - ? data["MaxItems"]["#text"] - : data["MaxItems"]; + contents.MaxItems = data["MaxItems"]; } if (data["NextMarker"] !== undefined) { - contents.NextMarker = - data["NextMarker"]["#text"] !== undefined - ? data["NextMarker"]["#text"] - : data["NextMarker"]; + contents.NextMarker = data["NextMarker"]; } return Promise.resolve(contents); }; @@ -6330,16 +6267,10 @@ export const deserializeAws_restXmlListHostedZonesByNameCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["DNSName"] !== undefined) { - contents.DNSName = - data["DNSName"]["#text"] !== undefined - ? data["DNSName"]["#text"] - : data["DNSName"]; + contents.DNSName = data["DNSName"]; } if (data["HostedZoneId"] !== undefined) { - contents.HostedZoneId = - data["HostedZoneId"]["#text"] !== undefined - ? data["HostedZoneId"]["#text"] - : data["HostedZoneId"]; + contents.HostedZoneId = data["HostedZoneId"]; } if (data.HostedZones === "") { contents.HostedZones = []; @@ -6354,28 +6285,16 @@ export const deserializeAws_restXmlListHostedZonesByNameCommand = async ( ); } if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = - (data["IsTruncated"]["#text"] !== undefined - ? data["IsTruncated"]["#text"] - : data["IsTruncated"]) == "true"; + contents.IsTruncated = data["IsTruncated"] == "true"; } if (data["MaxItems"] !== undefined) { - contents.MaxItems = - data["MaxItems"]["#text"] !== undefined - ? data["MaxItems"]["#text"] - : data["MaxItems"]; + contents.MaxItems = data["MaxItems"]; } if (data["NextDNSName"] !== undefined) { - contents.NextDNSName = - data["NextDNSName"]["#text"] !== undefined - ? data["NextDNSName"]["#text"] - : data["NextDNSName"]; + contents.NextDNSName = data["NextDNSName"]; } if (data["NextHostedZoneId"] !== undefined) { - contents.NextHostedZoneId = - data["NextHostedZoneId"]["#text"] !== undefined - ? data["NextHostedZoneId"]["#text"] - : data["NextHostedZoneId"]; + contents.NextHostedZoneId = data["NextHostedZoneId"]; } return Promise.resolve(contents); }; @@ -6450,10 +6369,7 @@ export const deserializeAws_restXmlListQueryLoggingConfigsCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["NextToken"] !== undefined) { - contents.NextToken = - data["NextToken"]["#text"] !== undefined - ? data["NextToken"]["#text"] - : data["NextToken"]; + contents.NextToken = data["NextToken"]; } if (data.QueryLoggingConfigs === "") { contents.QueryLoggingConfigs = []; @@ -6555,34 +6471,19 @@ export const deserializeAws_restXmlListResourceRecordSetsCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = - (data["IsTruncated"]["#text"] !== undefined - ? data["IsTruncated"]["#text"] - : data["IsTruncated"]) == "true"; + contents.IsTruncated = data["IsTruncated"] == "true"; } if (data["MaxItems"] !== undefined) { - contents.MaxItems = - data["MaxItems"]["#text"] !== undefined - ? data["MaxItems"]["#text"] - : data["MaxItems"]; + contents.MaxItems = data["MaxItems"]; } if (data["NextRecordIdentifier"] !== undefined) { - contents.NextRecordIdentifier = - data["NextRecordIdentifier"]["#text"] !== undefined - ? data["NextRecordIdentifier"]["#text"] - : data["NextRecordIdentifier"]; + contents.NextRecordIdentifier = data["NextRecordIdentifier"]; } if (data["NextRecordName"] !== undefined) { - contents.NextRecordName = - data["NextRecordName"]["#text"] !== undefined - ? data["NextRecordName"]["#text"] - : data["NextRecordName"]; + contents.NextRecordName = data["NextRecordName"]; } if (data["NextRecordType"] !== undefined) { - contents.NextRecordType = - data["NextRecordType"]["#text"] !== undefined - ? data["NextRecordType"]["#text"] - : data["NextRecordType"]; + contents.NextRecordType = data["NextRecordType"]; } if (data.ResourceRecordSets === "") { contents.ResourceRecordSets = []; @@ -6684,28 +6585,16 @@ export const deserializeAws_restXmlListReusableDelegationSetsCommand = async ( ); } if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = - (data["IsTruncated"]["#text"] !== undefined - ? data["IsTruncated"]["#text"] - : data["IsTruncated"]) == "true"; + contents.IsTruncated = data["IsTruncated"] == "true"; } if (data["Marker"] !== undefined) { - contents.Marker = - data["Marker"]["#text"] !== undefined - ? data["Marker"]["#text"] - : data["Marker"]; + contents.Marker = data["Marker"]; } if (data["MaxItems"] !== undefined) { - contents.MaxItems = - data["MaxItems"]["#text"] !== undefined - ? data["MaxItems"]["#text"] - : data["MaxItems"]; + contents.MaxItems = data["MaxItems"]; } if (data["NextMarker"] !== undefined) { - contents.NextMarker = - data["NextMarker"]["#text"] !== undefined - ? data["NextMarker"]["#text"] - : data["NextMarker"]; + contents.NextMarker = data["NextMarker"]; } return Promise.resolve(contents); }; @@ -6997,22 +6886,13 @@ export const deserializeAws_restXmlListTrafficPoliciesCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = - (data["IsTruncated"]["#text"] !== undefined - ? data["IsTruncated"]["#text"] - : data["IsTruncated"]) == "true"; + contents.IsTruncated = data["IsTruncated"] == "true"; } if (data["MaxItems"] !== undefined) { - contents.MaxItems = - data["MaxItems"]["#text"] !== undefined - ? data["MaxItems"]["#text"] - : data["MaxItems"]; + contents.MaxItems = data["MaxItems"]; } if (data["TrafficPolicyIdMarker"] !== undefined) { - contents.TrafficPolicyIdMarker = - data["TrafficPolicyIdMarker"]["#text"] !== undefined - ? data["TrafficPolicyIdMarker"]["#text"] - : data["TrafficPolicyIdMarker"]; + contents.TrafficPolicyIdMarker = data["TrafficPolicyIdMarker"]; } if (data.TrafficPolicySummaries === "") { contents.TrafficPolicySummaries = []; @@ -7094,34 +6974,21 @@ export const deserializeAws_restXmlListTrafficPolicyInstancesCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["HostedZoneIdMarker"] !== undefined) { - contents.HostedZoneIdMarker = - data["HostedZoneIdMarker"]["#text"] !== undefined - ? data["HostedZoneIdMarker"]["#text"] - : data["HostedZoneIdMarker"]; + contents.HostedZoneIdMarker = data["HostedZoneIdMarker"]; } if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = - (data["IsTruncated"]["#text"] !== undefined - ? data["IsTruncated"]["#text"] - : data["IsTruncated"]) == "true"; + contents.IsTruncated = data["IsTruncated"] == "true"; } if (data["MaxItems"] !== undefined) { - contents.MaxItems = - data["MaxItems"]["#text"] !== undefined - ? data["MaxItems"]["#text"] - : data["MaxItems"]; + contents.MaxItems = data["MaxItems"]; } if (data["TrafficPolicyInstanceNameMarker"] !== undefined) { contents.TrafficPolicyInstanceNameMarker = - data["TrafficPolicyInstanceNameMarker"]["#text"] !== undefined - ? data["TrafficPolicyInstanceNameMarker"]["#text"] - : data["TrafficPolicyInstanceNameMarker"]; + data["TrafficPolicyInstanceNameMarker"]; } if (data["TrafficPolicyInstanceTypeMarker"] !== undefined) { contents.TrafficPolicyInstanceTypeMarker = - data["TrafficPolicyInstanceTypeMarker"]["#text"] !== undefined - ? data["TrafficPolicyInstanceTypeMarker"]["#text"] - : data["TrafficPolicyInstanceTypeMarker"]; + data["TrafficPolicyInstanceTypeMarker"]; } if (data.TrafficPolicyInstances === "") { contents.TrafficPolicyInstances = []; @@ -7213,28 +7080,18 @@ export const deserializeAws_restXmlListTrafficPolicyInstancesByHostedZoneCommand }; const data: any = await parseBody(output.body, context); if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = - (data["IsTruncated"]["#text"] !== undefined - ? data["IsTruncated"]["#text"] - : data["IsTruncated"]) == "true"; + contents.IsTruncated = data["IsTruncated"] == "true"; } if (data["MaxItems"] !== undefined) { - contents.MaxItems = - data["MaxItems"]["#text"] !== undefined - ? data["MaxItems"]["#text"] - : data["MaxItems"]; + contents.MaxItems = data["MaxItems"]; } if (data["TrafficPolicyInstanceNameMarker"] !== undefined) { contents.TrafficPolicyInstanceNameMarker = - data["TrafficPolicyInstanceNameMarker"]["#text"] !== undefined - ? data["TrafficPolicyInstanceNameMarker"]["#text"] - : data["TrafficPolicyInstanceNameMarker"]; + data["TrafficPolicyInstanceNameMarker"]; } if (data["TrafficPolicyInstanceTypeMarker"] !== undefined) { contents.TrafficPolicyInstanceTypeMarker = - data["TrafficPolicyInstanceTypeMarker"]["#text"] !== undefined - ? data["TrafficPolicyInstanceTypeMarker"]["#text"] - : data["TrafficPolicyInstanceTypeMarker"]; + data["TrafficPolicyInstanceTypeMarker"]; } if (data.TrafficPolicyInstances === "") { contents.TrafficPolicyInstances = []; @@ -7338,34 +7195,21 @@ export const deserializeAws_restXmlListTrafficPolicyInstancesByPolicyCommand = a }; const data: any = await parseBody(output.body, context); if (data["HostedZoneIdMarker"] !== undefined) { - contents.HostedZoneIdMarker = - data["HostedZoneIdMarker"]["#text"] !== undefined - ? data["HostedZoneIdMarker"]["#text"] - : data["HostedZoneIdMarker"]; + contents.HostedZoneIdMarker = data["HostedZoneIdMarker"]; } if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = - (data["IsTruncated"]["#text"] !== undefined - ? data["IsTruncated"]["#text"] - : data["IsTruncated"]) == "true"; + contents.IsTruncated = data["IsTruncated"] == "true"; } if (data["MaxItems"] !== undefined) { - contents.MaxItems = - data["MaxItems"]["#text"] !== undefined - ? data["MaxItems"]["#text"] - : data["MaxItems"]; + contents.MaxItems = data["MaxItems"]; } if (data["TrafficPolicyInstanceNameMarker"] !== undefined) { contents.TrafficPolicyInstanceNameMarker = - data["TrafficPolicyInstanceNameMarker"]["#text"] !== undefined - ? data["TrafficPolicyInstanceNameMarker"]["#text"] - : data["TrafficPolicyInstanceNameMarker"]; + data["TrafficPolicyInstanceNameMarker"]; } if (data["TrafficPolicyInstanceTypeMarker"] !== undefined) { contents.TrafficPolicyInstanceTypeMarker = - data["TrafficPolicyInstanceTypeMarker"]["#text"] !== undefined - ? data["TrafficPolicyInstanceTypeMarker"]["#text"] - : data["TrafficPolicyInstanceTypeMarker"]; + data["TrafficPolicyInstanceTypeMarker"]; } if (data.TrafficPolicyInstances === "") { contents.TrafficPolicyInstances = []; @@ -7467,16 +7311,10 @@ export const deserializeAws_restXmlListTrafficPolicyVersionsCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = - (data["IsTruncated"]["#text"] !== undefined - ? data["IsTruncated"]["#text"] - : data["IsTruncated"]) == "true"; + contents.IsTruncated = data["IsTruncated"] == "true"; } if (data["MaxItems"] !== undefined) { - contents.MaxItems = - data["MaxItems"]["#text"] !== undefined - ? data["MaxItems"]["#text"] - : data["MaxItems"]; + contents.MaxItems = data["MaxItems"]; } if (data.TrafficPolicies === "") { contents.TrafficPolicies = []; @@ -7491,10 +7329,7 @@ export const deserializeAws_restXmlListTrafficPolicyVersionsCommand = async ( ); } if (data["TrafficPolicyVersionMarker"] !== undefined) { - contents.TrafficPolicyVersionMarker = - data["TrafficPolicyVersionMarker"]["#text"] !== undefined - ? data["TrafficPolicyVersionMarker"]["#text"] - : data["TrafficPolicyVersionMarker"]; + contents.TrafficPolicyVersionMarker = data["TrafficPolicyVersionMarker"]; } return Promise.resolve(contents); }; @@ -7570,16 +7405,10 @@ export const deserializeAws_restXmlListVPCAssociationAuthorizationsCommand = asy }; const data: any = await parseBody(output.body, context); if (data["HostedZoneId"] !== undefined) { - contents.HostedZoneId = - data["HostedZoneId"]["#text"] !== undefined - ? data["HostedZoneId"]["#text"] - : data["HostedZoneId"]; + contents.HostedZoneId = data["HostedZoneId"]; } if (data["NextToken"] !== undefined) { - contents.NextToken = - data["NextToken"]["#text"] !== undefined - ? data["NextToken"]["#text"] - : data["NextToken"]; + contents.NextToken = data["NextToken"]; } if (data.VPCs === "") { contents.VPCs = []; @@ -7675,16 +7504,10 @@ export const deserializeAws_restXmlTestDNSAnswerCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["Nameserver"] !== undefined) { - contents.Nameserver = - data["Nameserver"]["#text"] !== undefined - ? data["Nameserver"]["#text"] - : data["Nameserver"]; + contents.Nameserver = data["Nameserver"]; } if (data["Protocol"] !== undefined) { - contents.Protocol = - data["Protocol"]["#text"] !== undefined - ? data["Protocol"]["#text"] - : data["Protocol"]; + contents.Protocol = data["Protocol"]; } if (data.RecordData === "") { contents.RecordData = []; @@ -7699,22 +7522,13 @@ export const deserializeAws_restXmlTestDNSAnswerCommand = async ( ); } if (data["RecordName"] !== undefined) { - contents.RecordName = - data["RecordName"]["#text"] !== undefined - ? data["RecordName"]["#text"] - : data["RecordName"]; + contents.RecordName = data["RecordName"]; } if (data["RecordType"] !== undefined) { - contents.RecordType = - data["RecordType"]["#text"] !== undefined - ? data["RecordType"]["#text"] - : data["RecordType"]; + contents.RecordType = data["RecordType"]; } if (data["ResponseCode"] !== undefined) { - contents.ResponseCode = - data["ResponseCode"]["#text"] !== undefined - ? data["ResponseCode"]["#text"] - : data["ResponseCode"]; + contents.ResponseCode = data["ResponseCode"]; } return Promise.resolve(contents); }; @@ -8143,10 +7957,7 @@ const deserializeAws_restXmlConcurrentModificationResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8163,10 +7974,7 @@ const deserializeAws_restXmlConflictingDomainExistsResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8183,10 +7991,7 @@ const deserializeAws_restXmlConflictingTypesResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8203,10 +8008,7 @@ const deserializeAws_restXmlDelegationSetAlreadyCreatedResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8223,10 +8025,7 @@ const deserializeAws_restXmlDelegationSetAlreadyReusableResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8243,10 +8042,7 @@ const deserializeAws_restXmlDelegationSetInUseResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8263,10 +8059,7 @@ const deserializeAws_restXmlDelegationSetNotAvailableResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8283,10 +8076,7 @@ const deserializeAws_restXmlDelegationSetNotReusableResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8303,10 +8093,7 @@ const deserializeAws_restXmlHealthCheckAlreadyExistsResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8323,10 +8110,7 @@ const deserializeAws_restXmlHealthCheckInUseResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8343,10 +8127,7 @@ const deserializeAws_restXmlHealthCheckVersionMismatchResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8363,10 +8144,7 @@ const deserializeAws_restXmlHostedZoneAlreadyExistsResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8383,10 +8161,7 @@ const deserializeAws_restXmlHostedZoneNotEmptyResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8403,10 +8178,7 @@ const deserializeAws_restXmlHostedZoneNotFoundResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8423,10 +8195,7 @@ const deserializeAws_restXmlHostedZoneNotPrivateResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8443,10 +8212,7 @@ const deserializeAws_restXmlIncompatibleVersionResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8463,10 +8229,7 @@ const deserializeAws_restXmlInsufficientCloudWatchLogsResourcePolicyResponse = a }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8483,10 +8246,7 @@ const deserializeAws_restXmlInvalidArgumentResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8504,10 +8264,7 @@ const deserializeAws_restXmlInvalidChangeBatchResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } if (data.messages === "") { contents.messages = []; @@ -8536,10 +8293,7 @@ const deserializeAws_restXmlInvalidDomainNameResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8556,10 +8310,7 @@ const deserializeAws_restXmlInvalidInputResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8576,10 +8327,7 @@ const deserializeAws_restXmlInvalidPaginationTokenResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8596,10 +8344,7 @@ const deserializeAws_restXmlInvalidTrafficPolicyDocumentResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8616,10 +8361,7 @@ const deserializeAws_restXmlInvalidVPCIdResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8636,10 +8378,7 @@ const deserializeAws_restXmlLastVPCAssociationResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8656,10 +8395,7 @@ const deserializeAws_restXmlLimitsExceededResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8676,10 +8412,7 @@ const deserializeAws_restXmlNoSuchChangeResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8696,10 +8429,7 @@ const deserializeAws_restXmlNoSuchCloudWatchLogsLogGroupResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8716,10 +8446,7 @@ const deserializeAws_restXmlNoSuchDelegationSetResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8736,10 +8463,7 @@ const deserializeAws_restXmlNoSuchGeoLocationResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8756,10 +8480,7 @@ const deserializeAws_restXmlNoSuchHealthCheckResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8776,10 +8497,7 @@ const deserializeAws_restXmlNoSuchHostedZoneResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8796,10 +8514,7 @@ const deserializeAws_restXmlNoSuchQueryLoggingConfigResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8816,10 +8531,7 @@ const deserializeAws_restXmlNoSuchTrafficPolicyResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8836,10 +8548,7 @@ const deserializeAws_restXmlNoSuchTrafficPolicyInstanceResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8856,10 +8565,7 @@ const deserializeAws_restXmlNotAuthorizedExceptionResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8876,10 +8582,7 @@ const deserializeAws_restXmlPriorRequestNotCompleteResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8896,10 +8599,7 @@ const deserializeAws_restXmlPublicZoneVPCAssociationResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8916,10 +8616,7 @@ const deserializeAws_restXmlQueryLoggingConfigAlreadyExistsResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8936,10 +8633,7 @@ const deserializeAws_restXmlThrottlingExceptionResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8956,10 +8650,7 @@ const deserializeAws_restXmlTooManyHealthChecksResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8976,10 +8667,7 @@ const deserializeAws_restXmlTooManyHostedZonesResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -8996,10 +8684,7 @@ const deserializeAws_restXmlTooManyTrafficPoliciesResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -9016,10 +8701,7 @@ const deserializeAws_restXmlTooManyTrafficPolicyInstancesResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -9036,10 +8718,7 @@ const deserializeAws_restXmlTooManyTrafficPolicyVersionsForCurrentPolicyResponse }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -9056,10 +8735,7 @@ const deserializeAws_restXmlTooManyVPCAssociationAuthorizationsResponse = async }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -9076,10 +8752,7 @@ const deserializeAws_restXmlTrafficPolicyAlreadyExistsResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -9096,10 +8769,7 @@ const deserializeAws_restXmlTrafficPolicyInUseResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -9116,10 +8786,7 @@ const deserializeAws_restXmlTrafficPolicyInstanceAlreadyExistsResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -9136,10 +8803,7 @@ const deserializeAws_restXmlVPCAssociationAuthorizationNotFoundResponse = async }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -9156,10 +8820,7 @@ const deserializeAws_restXmlVPCAssociationNotFoundResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["message"] !== undefined) { - contents.message = - data["message"]["#text"] !== undefined - ? data["message"]["#text"] - : data["message"]; + contents.message = data["message"]; } return contents; }; @@ -9675,17 +9336,10 @@ const deserializeAws_restXmlAccountLimit = ( Value: undefined }; if (output["Type"] !== undefined) { - contents.Type = - output["Type"]["#text"] !== undefined - ? output["Type"]["#text"] - : output["Type"]; + contents.Type = output["Type"]; } if (output["Value"] !== undefined) { - contents.Value = parseInt( - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"] - ); + contents.Value = parseInt(output["Value"]); } return contents; }; @@ -9700,16 +9354,10 @@ const deserializeAws_restXmlAlarmIdentifier = ( Region: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["Region"] !== undefined) { - contents.Region = - output["Region"]["#text"] !== undefined - ? output["Region"]["#text"] - : output["Region"]; + contents.Region = output["Region"]; } return contents; }; @@ -9725,22 +9373,13 @@ const deserializeAws_restXmlAliasTarget = ( HostedZoneId: undefined }; if (output["DNSName"] !== undefined) { - contents.DNSName = - output["DNSName"]["#text"] !== undefined - ? output["DNSName"]["#text"] - : output["DNSName"]; + contents.DNSName = output["DNSName"]; } if (output["EvaluateTargetHealth"] !== undefined) { - contents.EvaluateTargetHealth = - (output["EvaluateTargetHealth"]["#text"] !== undefined - ? output["EvaluateTargetHealth"]["#text"] - : output["EvaluateTargetHealth"]) == "true"; + contents.EvaluateTargetHealth = output["EvaluateTargetHealth"] == "true"; } if (output["HostedZoneId"] !== undefined) { - contents.HostedZoneId = - output["HostedZoneId"]["#text"] !== undefined - ? output["HostedZoneId"]["#text"] - : output["HostedZoneId"]; + contents.HostedZoneId = output["HostedZoneId"]; } return contents; }; @@ -9757,22 +9396,13 @@ const deserializeAws_restXmlChangeInfo = ( SubmittedAt: undefined }; if (output["Comment"] !== undefined) { - contents.Comment = - output["Comment"]["#text"] !== undefined - ? output["Comment"]["#text"] - : output["Comment"]; + contents.Comment = output["Comment"]; } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["SubmittedAt"] !== undefined) { contents.SubmittedAt = new Date(output["SubmittedAt"]); @@ -9784,18 +9414,14 @@ const deserializeAws_restXmlCheckerIpRanges = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlChildHealthCheckList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlCloudWatchAlarmConfiguration = ( @@ -9814,10 +9440,7 @@ const deserializeAws_restXmlCloudWatchAlarmConfiguration = ( Threshold: undefined }; if (output["ComparisonOperator"] !== undefined) { - contents.ComparisonOperator = - output["ComparisonOperator"]["#text"] !== undefined - ? output["ComparisonOperator"]["#text"] - : output["ComparisonOperator"]; + contents.ComparisonOperator = output["ComparisonOperator"]; } if (output.Dimensions === "") { contents.Dimensions = []; @@ -9832,43 +9455,22 @@ const deserializeAws_restXmlCloudWatchAlarmConfiguration = ( ); } if (output["EvaluationPeriods"] !== undefined) { - contents.EvaluationPeriods = parseInt( - output["EvaluationPeriods"]["#text"] !== undefined - ? output["EvaluationPeriods"]["#text"] - : output["EvaluationPeriods"] - ); + contents.EvaluationPeriods = parseInt(output["EvaluationPeriods"]); } if (output["MetricName"] !== undefined) { - contents.MetricName = - output["MetricName"]["#text"] !== undefined - ? output["MetricName"]["#text"] - : output["MetricName"]; + contents.MetricName = output["MetricName"]; } if (output["Namespace"] !== undefined) { - contents.Namespace = - output["Namespace"]["#text"] !== undefined - ? output["Namespace"]["#text"] - : output["Namespace"]; + contents.Namespace = output["Namespace"]; } if (output["Period"] !== undefined) { - contents.Period = parseInt( - output["Period"]["#text"] !== undefined - ? output["Period"]["#text"] - : output["Period"] - ); + contents.Period = parseInt(output["Period"]); } if (output["Statistic"] !== undefined) { - contents.Statistic = - output["Statistic"]["#text"] !== undefined - ? output["Statistic"]["#text"] - : output["Statistic"]; + contents.Statistic = output["Statistic"]; } if (output["Threshold"] !== undefined) { - contents.Threshold = parseFloat( - output["Threshold"]["#text"] !== undefined - ? output["Threshold"]["#text"] - : output["Threshold"] - ); + contents.Threshold = parseFloat(output["Threshold"]); } return contents; }; @@ -9884,16 +9486,10 @@ const deserializeAws_restXmlDelegationSet = ( NameServers: undefined }; if (output["CallerReference"] !== undefined) { - contents.CallerReference = - output["CallerReference"]["#text"] !== undefined - ? output["CallerReference"]["#text"] - : output["CallerReference"]; + contents.CallerReference = output["CallerReference"]; } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output.NameServers === "") { contents.NameServers = []; @@ -9914,9 +9510,7 @@ const deserializeAws_restXmlDelegationSetNameServers = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlDelegationSets = ( @@ -9938,16 +9532,10 @@ const deserializeAws_restXmlDimension = ( Value: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -9965,9 +9553,7 @@ const deserializeAws_restXmlErrorMessages = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlGeoLocation = ( @@ -9981,22 +9567,13 @@ const deserializeAws_restXmlGeoLocation = ( SubdivisionCode: undefined }; if (output["ContinentCode"] !== undefined) { - contents.ContinentCode = - output["ContinentCode"]["#text"] !== undefined - ? output["ContinentCode"]["#text"] - : output["ContinentCode"]; + contents.ContinentCode = output["ContinentCode"]; } if (output["CountryCode"] !== undefined) { - contents.CountryCode = - output["CountryCode"]["#text"] !== undefined - ? output["CountryCode"]["#text"] - : output["CountryCode"]; + contents.CountryCode = output["CountryCode"]; } if (output["SubdivisionCode"] !== undefined) { - contents.SubdivisionCode = - output["SubdivisionCode"]["#text"] !== undefined - ? output["SubdivisionCode"]["#text"] - : output["SubdivisionCode"]; + contents.SubdivisionCode = output["SubdivisionCode"]; } return contents; }; @@ -10015,40 +9592,22 @@ const deserializeAws_restXmlGeoLocationDetails = ( SubdivisionName: undefined }; if (output["ContinentCode"] !== undefined) { - contents.ContinentCode = - output["ContinentCode"]["#text"] !== undefined - ? output["ContinentCode"]["#text"] - : output["ContinentCode"]; + contents.ContinentCode = output["ContinentCode"]; } if (output["ContinentName"] !== undefined) { - contents.ContinentName = - output["ContinentName"]["#text"] !== undefined - ? output["ContinentName"]["#text"] - : output["ContinentName"]; + contents.ContinentName = output["ContinentName"]; } if (output["CountryCode"] !== undefined) { - contents.CountryCode = - output["CountryCode"]["#text"] !== undefined - ? output["CountryCode"]["#text"] - : output["CountryCode"]; + contents.CountryCode = output["CountryCode"]; } if (output["CountryName"] !== undefined) { - contents.CountryName = - output["CountryName"]["#text"] !== undefined - ? output["CountryName"]["#text"] - : output["CountryName"]; + contents.CountryName = output["CountryName"]; } if (output["SubdivisionCode"] !== undefined) { - contents.SubdivisionCode = - output["SubdivisionCode"]["#text"] !== undefined - ? output["SubdivisionCode"]["#text"] - : output["SubdivisionCode"]; + contents.SubdivisionCode = output["SubdivisionCode"]; } if (output["SubdivisionName"] !== undefined) { - contents.SubdivisionName = - output["SubdivisionName"]["#text"] !== undefined - ? output["SubdivisionName"]["#text"] - : output["SubdivisionName"]; + contents.SubdivisionName = output["SubdivisionName"]; } return contents; }; @@ -10076,10 +9635,7 @@ const deserializeAws_restXmlHealthCheck = ( LinkedService: undefined }; if (output["CallerReference"] !== undefined) { - contents.CallerReference = - output["CallerReference"]["#text"] !== undefined - ? output["CallerReference"]["#text"] - : output["CallerReference"]; + contents.CallerReference = output["CallerReference"]; } if (output["CloudWatchAlarmConfiguration"] !== undefined) { contents.CloudWatchAlarmConfiguration = deserializeAws_restXmlCloudWatchAlarmConfiguration( @@ -10094,17 +9650,10 @@ const deserializeAws_restXmlHealthCheck = ( ); } if (output["HealthCheckVersion"] !== undefined) { - contents.HealthCheckVersion = parseInt( - output["HealthCheckVersion"]["#text"] !== undefined - ? output["HealthCheckVersion"]["#text"] - : output["HealthCheckVersion"] - ); + contents.HealthCheckVersion = parseInt(output["HealthCheckVersion"]); } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["LinkedService"] !== undefined) { contents.LinkedService = deserializeAws_restXmlLinkedService( @@ -10158,67 +9707,35 @@ const deserializeAws_restXmlHealthCheckConfig = ( ); } if (output["Disabled"] !== undefined) { - contents.Disabled = - (output["Disabled"]["#text"] !== undefined - ? output["Disabled"]["#text"] - : output["Disabled"]) == "true"; + contents.Disabled = output["Disabled"] == "true"; } if (output["EnableSNI"] !== undefined) { - contents.EnableSNI = - (output["EnableSNI"]["#text"] !== undefined - ? output["EnableSNI"]["#text"] - : output["EnableSNI"]) == "true"; + contents.EnableSNI = output["EnableSNI"] == "true"; } if (output["FailureThreshold"] !== undefined) { - contents.FailureThreshold = parseInt( - output["FailureThreshold"]["#text"] !== undefined - ? output["FailureThreshold"]["#text"] - : output["FailureThreshold"] - ); + contents.FailureThreshold = parseInt(output["FailureThreshold"]); } if (output["FullyQualifiedDomainName"] !== undefined) { - contents.FullyQualifiedDomainName = - output["FullyQualifiedDomainName"]["#text"] !== undefined - ? output["FullyQualifiedDomainName"]["#text"] - : output["FullyQualifiedDomainName"]; + contents.FullyQualifiedDomainName = output["FullyQualifiedDomainName"]; } if (output["HealthThreshold"] !== undefined) { - contents.HealthThreshold = parseInt( - output["HealthThreshold"]["#text"] !== undefined - ? output["HealthThreshold"]["#text"] - : output["HealthThreshold"] - ); + contents.HealthThreshold = parseInt(output["HealthThreshold"]); } if (output["IPAddress"] !== undefined) { - contents.IPAddress = - output["IPAddress"]["#text"] !== undefined - ? output["IPAddress"]["#text"] - : output["IPAddress"]; + contents.IPAddress = output["IPAddress"]; } if (output["InsufficientDataHealthStatus"] !== undefined) { contents.InsufficientDataHealthStatus = - output["InsufficientDataHealthStatus"]["#text"] !== undefined - ? output["InsufficientDataHealthStatus"]["#text"] - : output["InsufficientDataHealthStatus"]; + output["InsufficientDataHealthStatus"]; } if (output["Inverted"] !== undefined) { - contents.Inverted = - (output["Inverted"]["#text"] !== undefined - ? output["Inverted"]["#text"] - : output["Inverted"]) == "true"; + contents.Inverted = output["Inverted"] == "true"; } if (output["MeasureLatency"] !== undefined) { - contents.MeasureLatency = - (output["MeasureLatency"]["#text"] !== undefined - ? output["MeasureLatency"]["#text"] - : output["MeasureLatency"]) == "true"; + contents.MeasureLatency = output["MeasureLatency"] == "true"; } if (output["Port"] !== undefined) { - contents.Port = parseInt( - output["Port"]["#text"] !== undefined - ? output["Port"]["#text"] - : output["Port"] - ); + contents.Port = parseInt(output["Port"]); } if (output.Regions === "") { contents.Regions = []; @@ -10233,29 +9750,16 @@ const deserializeAws_restXmlHealthCheckConfig = ( ); } if (output["RequestInterval"] !== undefined) { - contents.RequestInterval = parseInt( - output["RequestInterval"]["#text"] !== undefined - ? output["RequestInterval"]["#text"] - : output["RequestInterval"] - ); + contents.RequestInterval = parseInt(output["RequestInterval"]); } if (output["ResourcePath"] !== undefined) { - contents.ResourcePath = - output["ResourcePath"]["#text"] !== undefined - ? output["ResourcePath"]["#text"] - : output["ResourcePath"]; + contents.ResourcePath = output["ResourcePath"]; } if (output["SearchString"] !== undefined) { - contents.SearchString = - output["SearchString"]["#text"] !== undefined - ? output["SearchString"]["#text"] - : output["SearchString"]; + contents.SearchString = output["SearchString"]; } if (output["Type"] !== undefined) { - contents.Type = - output["Type"]["#text"] !== undefined - ? output["Type"]["#text"] - : output["Type"]; + contents.Type = output["Type"]; } return contents; }; @@ -10271,16 +9775,10 @@ const deserializeAws_restXmlHealthCheckObservation = ( StatusReport: undefined }; if (output["IPAddress"] !== undefined) { - contents.IPAddress = - output["IPAddress"]["#text"] !== undefined - ? output["IPAddress"]["#text"] - : output["IPAddress"]; + contents.IPAddress = output["IPAddress"]; } if (output["Region"] !== undefined) { - contents.Region = - output["Region"]["#text"] !== undefined - ? output["Region"]["#text"] - : output["Region"]; + contents.Region = output["Region"]; } if (output["StatusReport"] !== undefined) { contents.StatusReport = deserializeAws_restXmlStatusReport( @@ -10304,9 +9802,7 @@ const deserializeAws_restXmlHealthCheckRegionList = ( output: any, context: __SerdeContext ): (HealthCheckRegion | string)[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlHealthChecks = ( @@ -10332,10 +9828,7 @@ const deserializeAws_restXmlHostedZone = ( ResourceRecordSetCount: undefined }; if (output["CallerReference"] !== undefined) { - contents.CallerReference = - output["CallerReference"]["#text"] !== undefined - ? output["CallerReference"]["#text"] - : output["CallerReference"]; + contents.CallerReference = output["CallerReference"]; } if (output["Config"] !== undefined) { contents.Config = deserializeAws_restXmlHostedZoneConfig( @@ -10344,10 +9837,7 @@ const deserializeAws_restXmlHostedZone = ( ); } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["LinkedService"] !== undefined) { contents.LinkedService = deserializeAws_restXmlLinkedService( @@ -10356,16 +9846,11 @@ const deserializeAws_restXmlHostedZone = ( ); } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["ResourceRecordSetCount"] !== undefined) { contents.ResourceRecordSetCount = parseInt( - output["ResourceRecordSetCount"]["#text"] !== undefined - ? output["ResourceRecordSetCount"]["#text"] - : output["ResourceRecordSetCount"] + output["ResourceRecordSetCount"] ); } return contents; @@ -10381,16 +9866,10 @@ const deserializeAws_restXmlHostedZoneConfig = ( PrivateZone: undefined }; if (output["Comment"] !== undefined) { - contents.Comment = - output["Comment"]["#text"] !== undefined - ? output["Comment"]["#text"] - : output["Comment"]; + contents.Comment = output["Comment"]; } if (output["PrivateZone"] !== undefined) { - contents.PrivateZone = - (output["PrivateZone"]["#text"] !== undefined - ? output["PrivateZone"]["#text"] - : output["PrivateZone"]) == "true"; + contents.PrivateZone = output["PrivateZone"] == "true"; } return contents; }; @@ -10405,17 +9884,10 @@ const deserializeAws_restXmlHostedZoneLimit = ( Value: undefined }; if (output["Type"] !== undefined) { - contents.Type = - output["Type"]["#text"] !== undefined - ? output["Type"]["#text"] - : output["Type"]; + contents.Type = output["Type"]; } if (output["Value"] !== undefined) { - contents.Value = parseInt( - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"] - ); + contents.Value = parseInt(output["Value"]); } return contents; }; @@ -10439,16 +9911,10 @@ const deserializeAws_restXmlLinkedService = ( ServicePrincipal: undefined }; if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["ServicePrincipal"] !== undefined) { - contents.ServicePrincipal = - output["ServicePrincipal"]["#text"] !== undefined - ? output["ServicePrincipal"]["#text"] - : output["ServicePrincipal"]; + contents.ServicePrincipal = output["ServicePrincipal"]; } return contents; }; @@ -10464,22 +9930,13 @@ const deserializeAws_restXmlQueryLoggingConfig = ( Id: undefined }; if (output["CloudWatchLogsLogGroupArn"] !== undefined) { - contents.CloudWatchLogsLogGroupArn = - output["CloudWatchLogsLogGroupArn"]["#text"] !== undefined - ? output["CloudWatchLogsLogGroupArn"]["#text"] - : output["CloudWatchLogsLogGroupArn"]; + contents.CloudWatchLogsLogGroupArn = output["CloudWatchLogsLogGroupArn"]; } if (output["HostedZoneId"] !== undefined) { - contents.HostedZoneId = - output["HostedZoneId"]["#text"] !== undefined - ? output["HostedZoneId"]["#text"] - : output["HostedZoneId"]; + contents.HostedZoneId = output["HostedZoneId"]; } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } return contents; }; @@ -10497,9 +9954,7 @@ const deserializeAws_restXmlRecordData = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlResourceRecord = ( @@ -10511,10 +9966,7 @@ const deserializeAws_restXmlResourceRecord = ( Value: undefined }; if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -10546,10 +9998,7 @@ const deserializeAws_restXmlResourceRecordSet = ( ); } if (output["Failover"] !== undefined) { - contents.Failover = - output["Failover"]["#text"] !== undefined - ? output["Failover"]["#text"] - : output["Failover"]; + contents.Failover = output["Failover"]; } if (output["GeoLocation"] !== undefined) { contents.GeoLocation = deserializeAws_restXmlGeoLocation( @@ -10558,28 +10007,16 @@ const deserializeAws_restXmlResourceRecordSet = ( ); } if (output["HealthCheckId"] !== undefined) { - contents.HealthCheckId = - output["HealthCheckId"]["#text"] !== undefined - ? output["HealthCheckId"]["#text"] - : output["HealthCheckId"]; + contents.HealthCheckId = output["HealthCheckId"]; } if (output["MultiValueAnswer"] !== undefined) { - contents.MultiValueAnswer = - (output["MultiValueAnswer"]["#text"] !== undefined - ? output["MultiValueAnswer"]["#text"] - : output["MultiValueAnswer"]) == "true"; + contents.MultiValueAnswer = output["MultiValueAnswer"] == "true"; } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["Region"] !== undefined) { - contents.Region = - output["Region"]["#text"] !== undefined - ? output["Region"]["#text"] - : output["Region"]; + contents.Region = output["Region"]; } if (output.ResourceRecords === "") { contents.ResourceRecords = []; @@ -10594,36 +10031,19 @@ const deserializeAws_restXmlResourceRecordSet = ( ); } if (output["SetIdentifier"] !== undefined) { - contents.SetIdentifier = - output["SetIdentifier"]["#text"] !== undefined - ? output["SetIdentifier"]["#text"] - : output["SetIdentifier"]; + contents.SetIdentifier = output["SetIdentifier"]; } if (output["TTL"] !== undefined) { - contents.TTL = parseInt( - output["TTL"]["#text"] !== undefined - ? output["TTL"]["#text"] - : output["TTL"] - ); + contents.TTL = parseInt(output["TTL"]); } if (output["TrafficPolicyInstanceId"] !== undefined) { - contents.TrafficPolicyInstanceId = - output["TrafficPolicyInstanceId"]["#text"] !== undefined - ? output["TrafficPolicyInstanceId"]["#text"] - : output["TrafficPolicyInstanceId"]; + contents.TrafficPolicyInstanceId = output["TrafficPolicyInstanceId"]; } if (output["Type"] !== undefined) { - contents.Type = - output["Type"]["#text"] !== undefined - ? output["Type"]["#text"] - : output["Type"]; + contents.Type = output["Type"]; } if (output["Weight"] !== undefined) { - contents.Weight = parseInt( - output["Weight"]["#text"] !== undefined - ? output["Weight"]["#text"] - : output["Weight"] - ); + contents.Weight = parseInt(output["Weight"]); } return contents; }; @@ -10657,16 +10077,10 @@ const deserializeAws_restXmlResourceTagSet = ( Tags: undefined }; if (output["ResourceId"] !== undefined) { - contents.ResourceId = - output["ResourceId"]["#text"] !== undefined - ? output["ResourceId"]["#text"] - : output["ResourceId"]; + contents.ResourceId = output["ResourceId"]; } if (output["ResourceType"] !== undefined) { - contents.ResourceType = - output["ResourceType"]["#text"] !== undefined - ? output["ResourceType"]["#text"] - : output["ResourceType"]; + contents.ResourceType = output["ResourceType"]; } if (output.Tags === "") { contents.Tags = []; @@ -10699,17 +10113,10 @@ const deserializeAws_restXmlReusableDelegationSetLimit = ( Value: undefined }; if (output["Type"] !== undefined) { - contents.Type = - output["Type"]["#text"] !== undefined - ? output["Type"]["#text"] - : output["Type"]; + contents.Type = output["Type"]; } if (output["Value"] !== undefined) { - contents.Value = parseInt( - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"] - ); + contents.Value = parseInt(output["Value"]); } return contents; }; @@ -10727,10 +10134,7 @@ const deserializeAws_restXmlStatusReport = ( contents.CheckedTime = new Date(output["CheckedTime"]); } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -10745,16 +10149,10 @@ const deserializeAws_restXmlTag = ( Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -10791,41 +10189,22 @@ const deserializeAws_restXmlTrafficPolicy = ( Version: undefined }; if (output["Comment"] !== undefined) { - contents.Comment = - output["Comment"]["#text"] !== undefined - ? output["Comment"]["#text"] - : output["Comment"]; + contents.Comment = output["Comment"]; } if (output["Document"] !== undefined) { - contents.Document = - output["Document"]["#text"] !== undefined - ? output["Document"]["#text"] - : output["Document"]; + contents.Document = output["Document"]; } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["Type"] !== undefined) { - contents.Type = - output["Type"]["#text"] !== undefined - ? output["Type"]["#text"] - : output["Type"]; + contents.Type = output["Type"]; } if (output["Version"] !== undefined) { - contents.Version = parseInt( - output["Version"]["#text"] !== undefined - ? output["Version"]["#text"] - : output["Version"] - ); + contents.Version = parseInt(output["Version"]); } return contents; }; @@ -10847,60 +10226,31 @@ const deserializeAws_restXmlTrafficPolicyInstance = ( TrafficPolicyVersion: undefined }; if (output["HostedZoneId"] !== undefined) { - contents.HostedZoneId = - output["HostedZoneId"]["#text"] !== undefined - ? output["HostedZoneId"]["#text"] - : output["HostedZoneId"]; + contents.HostedZoneId = output["HostedZoneId"]; } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["State"] !== undefined) { - contents.State = - output["State"]["#text"] !== undefined - ? output["State"]["#text"] - : output["State"]; + contents.State = output["State"]; } if (output["TTL"] !== undefined) { - contents.TTL = parseInt( - output["TTL"]["#text"] !== undefined - ? output["TTL"]["#text"] - : output["TTL"] - ); + contents.TTL = parseInt(output["TTL"]); } if (output["TrafficPolicyId"] !== undefined) { - contents.TrafficPolicyId = - output["TrafficPolicyId"]["#text"] !== undefined - ? output["TrafficPolicyId"]["#text"] - : output["TrafficPolicyId"]; + contents.TrafficPolicyId = output["TrafficPolicyId"]; } if (output["TrafficPolicyType"] !== undefined) { - contents.TrafficPolicyType = - output["TrafficPolicyType"]["#text"] !== undefined - ? output["TrafficPolicyType"]["#text"] - : output["TrafficPolicyType"]; + contents.TrafficPolicyType = output["TrafficPolicyType"]; } if (output["TrafficPolicyVersion"] !== undefined) { - contents.TrafficPolicyVersion = parseInt( - output["TrafficPolicyVersion"]["#text"] !== undefined - ? output["TrafficPolicyVersion"]["#text"] - : output["TrafficPolicyVersion"] - ); + contents.TrafficPolicyVersion = parseInt(output["TrafficPolicyVersion"]); } return contents; }; @@ -10936,36 +10286,19 @@ const deserializeAws_restXmlTrafficPolicySummary = ( Type: undefined }; if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["LatestVersion"] !== undefined) { - contents.LatestVersion = parseInt( - output["LatestVersion"]["#text"] !== undefined - ? output["LatestVersion"]["#text"] - : output["LatestVersion"] - ); + contents.LatestVersion = parseInt(output["LatestVersion"]); } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["TrafficPolicyCount"] !== undefined) { - contents.TrafficPolicyCount = parseInt( - output["TrafficPolicyCount"]["#text"] !== undefined - ? output["TrafficPolicyCount"]["#text"] - : output["TrafficPolicyCount"] - ); + contents.TrafficPolicyCount = parseInt(output["TrafficPolicyCount"]); } if (output["Type"] !== undefined) { - contents.Type = - output["Type"]["#text"] !== undefined - ? output["Type"]["#text"] - : output["Type"]; + contents.Type = output["Type"]; } return contents; }; @@ -10980,16 +10313,10 @@ const deserializeAws_restXmlVPC = ( VPCRegion: undefined }; if (output["VPCId"] !== undefined) { - contents.VPCId = - output["VPCId"]["#text"] !== undefined - ? output["VPCId"]["#text"] - : output["VPCId"]; + contents.VPCId = output["VPCId"]; } if (output["VPCRegion"] !== undefined) { - contents.VPCRegion = - output["VPCRegion"]["#text"] !== undefined - ? output["VPCRegion"]["#text"] - : output["VPCRegion"]; + contents.VPCRegion = output["VPCRegion"]; } return contents; }; @@ -11060,7 +10387,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/clients/client-s3-control/protocols/Aws_restXml.ts b/clients/client-s3-control/protocols/Aws_restXml.ts index 882c75925f0e..369754f654cb 100644 --- a/clients/client-s3-control/protocols/Aws_restXml.ts +++ b/clients/client-s3-control/protocols/Aws_restXml.ts @@ -106,7 +106,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -815,10 +816,7 @@ export const deserializeAws_restXmlCreateJobCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["JobId"] !== undefined) { - contents.JobId = - data["JobId"]["#text"] !== undefined - ? data["JobId"]["#text"] - : data["JobId"]; + contents.JobId = data["JobId"]; } return Promise.resolve(contents); }; @@ -1147,25 +1145,16 @@ export const deserializeAws_restXmlGetAccessPointCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["Bucket"] !== undefined) { - contents.Bucket = - data["Bucket"]["#text"] !== undefined - ? data["Bucket"]["#text"] - : data["Bucket"]; + contents.Bucket = data["Bucket"]; } if (data["CreationDate"] !== undefined) { contents.CreationDate = new Date(data["CreationDate"]); } if (data["Name"] !== undefined) { - contents.Name = - data["Name"]["#text"] !== undefined - ? data["Name"]["#text"] - : data["Name"]; + contents.Name = data["Name"]; } if (data["NetworkOrigin"] !== undefined) { - contents.NetworkOrigin = - data["NetworkOrigin"]["#text"] !== undefined - ? data["NetworkOrigin"]["#text"] - : data["NetworkOrigin"]; + contents.NetworkOrigin = data["NetworkOrigin"]; } if (data["PublicAccessBlockConfiguration"] !== undefined) { contents.PublicAccessBlockConfiguration = deserializeAws_restXmlPublicAccessBlockConfiguration( @@ -1229,10 +1218,7 @@ export const deserializeAws_restXmlGetAccessPointPolicyCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["Policy"] !== undefined) { - contents.Policy = - data["Policy"]["#text"] !== undefined - ? data["Policy"]["#text"] - : data["Policy"]; + contents.Policy = data["Policy"]; } return Promise.resolve(contents); }; @@ -1413,10 +1399,7 @@ export const deserializeAws_restXmlListAccessPointsCommand = async ( ); } if (data["NextToken"] !== undefined) { - contents.NextToken = - data["NextToken"]["#text"] !== undefined - ? data["NextToken"]["#text"] - : data["NextToken"]; + contents.NextToken = data["NextToken"]; } return Promise.resolve(contents); }; @@ -1475,10 +1458,7 @@ export const deserializeAws_restXmlListJobsCommand = async ( ); } if (data["NextToken"] !== undefined) { - contents.NextToken = - data["NextToken"]["#text"] !== undefined - ? data["NextToken"]["#text"] - : data["NextToken"]; + contents.NextToken = data["NextToken"]; } return Promise.resolve(contents); }; @@ -1655,17 +1635,10 @@ export const deserializeAws_restXmlUpdateJobPriorityCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["JobId"] !== undefined) { - contents.JobId = - data["JobId"]["#text"] !== undefined - ? data["JobId"]["#text"] - : data["JobId"]; + contents.JobId = data["JobId"]; } if (data["Priority"] !== undefined) { - contents.Priority = parseInt( - data["Priority"]["#text"] !== undefined - ? data["Priority"]["#text"] - : data["Priority"] - ); + contents.Priority = parseInt(data["Priority"]); } return Promise.resolve(contents); }; @@ -1760,22 +1733,13 @@ export const deserializeAws_restXmlUpdateJobStatusCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["JobId"] !== undefined) { - contents.JobId = - data["JobId"]["#text"] !== undefined - ? data["JobId"]["#text"] - : data["JobId"]; + contents.JobId = data["JobId"]; } if (data["Status"] !== undefined) { - contents.Status = - data["Status"]["#text"] !== undefined - ? data["Status"]["#text"] - : data["Status"]; + contents.Status = data["Status"]; } if (data["StatusUpdateReason"] !== undefined) { - contents.StatusUpdateReason = - data["StatusUpdateReason"]["#text"] !== undefined - ? data["StatusUpdateReason"]["#text"] - : data["StatusUpdateReason"]; + contents.StatusUpdateReason = data["StatusUpdateReason"]; } return Promise.resolve(contents); }; @@ -1877,10 +1841,7 @@ const deserializeAws_restXmlBadRequestExceptionResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -1897,10 +1858,7 @@ const deserializeAws_restXmlIdempotencyExceptionResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -1917,10 +1875,7 @@ const deserializeAws_restXmlInternalServiceExceptionResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -1937,10 +1892,7 @@ const deserializeAws_restXmlInvalidNextTokenExceptionResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -1957,10 +1909,7 @@ const deserializeAws_restXmlInvalidRequestExceptionResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -1977,10 +1926,7 @@ const deserializeAws_restXmlJobStatusExceptionResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -1997,10 +1943,7 @@ const deserializeAws_restXmlNoSuchPublicAccessBlockConfigurationResponse = async }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -2017,10 +1960,7 @@ const deserializeAws_restXmlNotFoundExceptionResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -2037,10 +1977,7 @@ const deserializeAws_restXmlTooManyRequestsExceptionResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -2715,22 +2652,13 @@ const deserializeAws_restXmlAccessPoint = ( VpcConfiguration: undefined }; if (output["Bucket"] !== undefined) { - contents.Bucket = - output["Bucket"]["#text"] !== undefined - ? output["Bucket"]["#text"] - : output["Bucket"]; + contents.Bucket = output["Bucket"]; } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["NetworkOrigin"] !== undefined) { - contents.NetworkOrigin = - output["NetworkOrigin"]["#text"] !== undefined - ? output["NetworkOrigin"]["#text"] - : output["NetworkOrigin"]; + contents.NetworkOrigin = output["NetworkOrigin"]; } if (output["VpcConfiguration"] !== undefined) { contents.VpcConfiguration = deserializeAws_restXmlVpcConfiguration( @@ -2775,19 +2703,13 @@ const deserializeAws_restXmlJobDescriptor = ( TerminationDate: undefined }; if (output["ConfirmationRequired"] !== undefined) { - contents.ConfirmationRequired = - (output["ConfirmationRequired"]["#text"] !== undefined - ? output["ConfirmationRequired"]["#text"] - : output["ConfirmationRequired"]) == "true"; + contents.ConfirmationRequired = output["ConfirmationRequired"] == "true"; } if (output["CreationTime"] !== undefined) { contents.CreationTime = new Date(output["CreationTime"]); } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output.FailureReasons === "") { contents.FailureReasons = []; @@ -2802,16 +2724,10 @@ const deserializeAws_restXmlJobDescriptor = ( ); } if (output["JobArn"] !== undefined) { - contents.JobArn = - output["JobArn"]["#text"] !== undefined - ? output["JobArn"]["#text"] - : output["JobArn"]; + contents.JobArn = output["JobArn"]; } if (output["JobId"] !== undefined) { - contents.JobId = - output["JobId"]["#text"] !== undefined - ? output["JobId"]["#text"] - : output["JobId"]; + contents.JobId = output["JobId"]; } if (output["Manifest"] !== undefined) { contents.Manifest = deserializeAws_restXmlJobManifest( @@ -2826,11 +2742,7 @@ const deserializeAws_restXmlJobDescriptor = ( ); } if (output["Priority"] !== undefined) { - contents.Priority = parseInt( - output["Priority"]["#text"] !== undefined - ? output["Priority"]["#text"] - : output["Priority"] - ); + contents.Priority = parseInt(output["Priority"]); } if (output["ProgressSummary"] !== undefined) { contents.ProgressSummary = deserializeAws_restXmlJobProgressSummary( @@ -2845,28 +2757,16 @@ const deserializeAws_restXmlJobDescriptor = ( ); } if (output["RoleArn"] !== undefined) { - contents.RoleArn = - output["RoleArn"]["#text"] !== undefined - ? output["RoleArn"]["#text"] - : output["RoleArn"]; + contents.RoleArn = output["RoleArn"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["StatusUpdateReason"] !== undefined) { - contents.StatusUpdateReason = - output["StatusUpdateReason"]["#text"] !== undefined - ? output["StatusUpdateReason"]["#text"] - : output["StatusUpdateReason"]; + contents.StatusUpdateReason = output["StatusUpdateReason"]; } if (output["SuspendedCause"] !== undefined) { - contents.SuspendedCause = - output["SuspendedCause"]["#text"] !== undefined - ? output["SuspendedCause"]["#text"] - : output["SuspendedCause"]; + contents.SuspendedCause = output["SuspendedCause"]; } if (output["SuspendedDate"] !== undefined) { contents.SuspendedDate = new Date(output["SuspendedDate"]); @@ -2887,16 +2787,10 @@ const deserializeAws_restXmlJobFailure = ( FailureReason: undefined }; if (output["FailureCode"] !== undefined) { - contents.FailureCode = - output["FailureCode"]["#text"] !== undefined - ? output["FailureCode"]["#text"] - : output["FailureCode"]; + contents.FailureCode = output["FailureCode"]; } if (output["FailureReason"] !== undefined) { - contents.FailureReason = - output["FailureReason"]["#text"] !== undefined - ? output["FailureReason"]["#text"] - : output["FailureReason"]; + contents.FailureReason = output["FailureReason"]; } return contents; }; @@ -2929,29 +2823,16 @@ const deserializeAws_restXmlJobListDescriptor = ( contents.CreationTime = new Date(output["CreationTime"]); } if (output["Description"] !== undefined) { - contents.Description = - output["Description"]["#text"] !== undefined - ? output["Description"]["#text"] - : output["Description"]; + contents.Description = output["Description"]; } if (output["JobId"] !== undefined) { - contents.JobId = - output["JobId"]["#text"] !== undefined - ? output["JobId"]["#text"] - : output["JobId"]; + contents.JobId = output["JobId"]; } if (output["Operation"] !== undefined) { - contents.Operation = - output["Operation"]["#text"] !== undefined - ? output["Operation"]["#text"] - : output["Operation"]; + contents.Operation = output["Operation"]; } if (output["Priority"] !== undefined) { - contents.Priority = parseInt( - output["Priority"]["#text"] !== undefined - ? output["Priority"]["#text"] - : output["Priority"] - ); + contents.Priority = parseInt(output["Priority"]); } if (output["ProgressSummary"] !== undefined) { contents.ProgressSummary = deserializeAws_restXmlJobProgressSummary( @@ -2960,10 +2841,7 @@ const deserializeAws_restXmlJobListDescriptor = ( ); } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["TerminationDate"] !== undefined) { contents.TerminationDate = new Date(output["TerminationDate"]); @@ -3008,9 +2886,7 @@ const deserializeAws_restXmlJobManifestFieldList = ( output: any, context: __SerdeContext ): (JobManifestFieldName | string)[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlJobManifestLocation = ( @@ -3024,22 +2900,13 @@ const deserializeAws_restXmlJobManifestLocation = ( ObjectVersionId: undefined }; if (output["ETag"] !== undefined) { - contents.ETag = - output["ETag"]["#text"] !== undefined - ? output["ETag"]["#text"] - : output["ETag"]; + contents.ETag = output["ETag"]; } if (output["ObjectArn"] !== undefined) { - contents.ObjectArn = - output["ObjectArn"]["#text"] !== undefined - ? output["ObjectArn"]["#text"] - : output["ObjectArn"]; + contents.ObjectArn = output["ObjectArn"]; } if (output["ObjectVersionId"] !== undefined) { - contents.ObjectVersionId = - output["ObjectVersionId"]["#text"] !== undefined - ? output["ObjectVersionId"]["#text"] - : output["ObjectVersionId"]; + contents.ObjectVersionId = output["ObjectVersionId"]; } return contents; }; @@ -3066,10 +2933,7 @@ const deserializeAws_restXmlJobManifestSpec = ( ); } if (output["Format"] !== undefined) { - contents.Format = - output["Format"]["#text"] !== undefined - ? output["Format"]["#text"] - : output["Format"]; + contents.Format = output["Format"]; } return contents; }; @@ -3130,25 +2994,15 @@ const deserializeAws_restXmlJobProgressSummary = ( TotalNumberOfTasks: undefined }; if (output["NumberOfTasksFailed"] !== undefined) { - contents.NumberOfTasksFailed = parseInt( - output["NumberOfTasksFailed"]["#text"] !== undefined - ? output["NumberOfTasksFailed"]["#text"] - : output["NumberOfTasksFailed"] - ); + contents.NumberOfTasksFailed = parseInt(output["NumberOfTasksFailed"]); } if (output["NumberOfTasksSucceeded"] !== undefined) { contents.NumberOfTasksSucceeded = parseInt( - output["NumberOfTasksSucceeded"]["#text"] !== undefined - ? output["NumberOfTasksSucceeded"]["#text"] - : output["NumberOfTasksSucceeded"] + output["NumberOfTasksSucceeded"] ); } if (output["TotalNumberOfTasks"] !== undefined) { - contents.TotalNumberOfTasks = parseInt( - output["TotalNumberOfTasks"]["#text"] !== undefined - ? output["TotalNumberOfTasks"]["#text"] - : output["TotalNumberOfTasks"] - ); + contents.TotalNumberOfTasks = parseInt(output["TotalNumberOfTasks"]); } return contents; }; @@ -3166,34 +3020,19 @@ const deserializeAws_restXmlJobReport = ( ReportScope: undefined }; if (output["Bucket"] !== undefined) { - contents.Bucket = - output["Bucket"]["#text"] !== undefined - ? output["Bucket"]["#text"] - : output["Bucket"]; + contents.Bucket = output["Bucket"]; } if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } if (output["Format"] !== undefined) { - contents.Format = - output["Format"]["#text"] !== undefined - ? output["Format"]["#text"] - : output["Format"]; + contents.Format = output["Format"]; } if (output["Prefix"] !== undefined) { - contents.Prefix = - output["Prefix"]["#text"] !== undefined - ? output["Prefix"]["#text"] - : output["Prefix"]; + contents.Prefix = output["Prefix"]; } if (output["ReportScope"] !== undefined) { - contents.ReportScope = - output["ReportScope"]["#text"] !== undefined - ? output["ReportScope"]["#text"] - : output["ReportScope"]; + contents.ReportScope = output["ReportScope"]; } return contents; }; @@ -3207,10 +3046,7 @@ const deserializeAws_restXmlLambdaInvokeOperation = ( FunctionArn: undefined }; if (output["FunctionArn"] !== undefined) { - contents.FunctionArn = - output["FunctionArn"]["#text"] !== undefined - ? output["FunctionArn"]["#text"] - : output["FunctionArn"]; + contents.FunctionArn = output["FunctionArn"]; } return contents; }; @@ -3224,10 +3060,7 @@ const deserializeAws_restXmlPolicyStatus = ( IsPublic: undefined }; if (output["IsPublic"] !== undefined) { - contents.IsPublic = - (output["IsPublic"]["#text"] !== undefined - ? output["IsPublic"]["#text"] - : output["IsPublic"]) == "true"; + contents.IsPublic = output["IsPublic"] == "true"; } return contents; }; @@ -3244,28 +3077,16 @@ const deserializeAws_restXmlPublicAccessBlockConfiguration = ( RestrictPublicBuckets: undefined }; if (output["BlockPublicAcls"] !== undefined) { - contents.BlockPublicAcls = - (output["BlockPublicAcls"]["#text"] !== undefined - ? output["BlockPublicAcls"]["#text"] - : output["BlockPublicAcls"]) == "true"; + contents.BlockPublicAcls = output["BlockPublicAcls"] == "true"; } if (output["BlockPublicPolicy"] !== undefined) { - contents.BlockPublicPolicy = - (output["BlockPublicPolicy"]["#text"] !== undefined - ? output["BlockPublicPolicy"]["#text"] - : output["BlockPublicPolicy"]) == "true"; + contents.BlockPublicPolicy = output["BlockPublicPolicy"] == "true"; } if (output["IgnorePublicAcls"] !== undefined) { - contents.IgnorePublicAcls = - (output["IgnorePublicAcls"]["#text"] !== undefined - ? output["IgnorePublicAcls"]["#text"] - : output["IgnorePublicAcls"]) == "true"; + contents.IgnorePublicAcls = output["IgnorePublicAcls"] == "true"; } if (output["RestrictPublicBuckets"] !== undefined) { - contents.RestrictPublicBuckets = - (output["RestrictPublicBuckets"]["#text"] !== undefined - ? output["RestrictPublicBuckets"]["#text"] - : output["RestrictPublicBuckets"]) == "true"; + contents.RestrictPublicBuckets = output["RestrictPublicBuckets"] == "true"; } return contents; }; @@ -3316,10 +3137,7 @@ const deserializeAws_restXmlS3AccessControlPolicy = ( ); } if (output["CannedAccessControlList"] !== undefined) { - contents.CannedAccessControlList = - output["CannedAccessControlList"]["#text"] !== undefined - ? output["CannedAccessControlList"]["#text"] - : output["CannedAccessControlList"]; + contents.CannedAccessControlList = output["CannedAccessControlList"]; } return contents; }; @@ -3360,16 +3178,10 @@ const deserializeAws_restXmlS3CopyObjectOperation = ( ); } if (output["CannedAccessControlList"] !== undefined) { - contents.CannedAccessControlList = - output["CannedAccessControlList"]["#text"] !== undefined - ? output["CannedAccessControlList"]["#text"] - : output["CannedAccessControlList"]; + contents.CannedAccessControlList = output["CannedAccessControlList"]; } if (output["MetadataDirective"] !== undefined) { - contents.MetadataDirective = - output["MetadataDirective"]["#text"] !== undefined - ? output["MetadataDirective"]["#text"] - : output["MetadataDirective"]; + contents.MetadataDirective = output["MetadataDirective"]; } if (output["ModifiedSinceConstraint"] !== undefined) { contents.ModifiedSinceConstraint = new Date( @@ -3395,16 +3207,10 @@ const deserializeAws_restXmlS3CopyObjectOperation = ( ); } if (output["ObjectLockLegalHoldStatus"] !== undefined) { - contents.ObjectLockLegalHoldStatus = - output["ObjectLockLegalHoldStatus"]["#text"] !== undefined - ? output["ObjectLockLegalHoldStatus"]["#text"] - : output["ObjectLockLegalHoldStatus"]; + contents.ObjectLockLegalHoldStatus = output["ObjectLockLegalHoldStatus"]; } if (output["ObjectLockMode"] !== undefined) { - contents.ObjectLockMode = - output["ObjectLockMode"]["#text"] !== undefined - ? output["ObjectLockMode"]["#text"] - : output["ObjectLockMode"]; + contents.ObjectLockMode = output["ObjectLockMode"]; } if (output["ObjectLockRetainUntilDate"] !== undefined) { contents.ObjectLockRetainUntilDate = new Date( @@ -3412,40 +3218,22 @@ const deserializeAws_restXmlS3CopyObjectOperation = ( ); } if (output["RedirectLocation"] !== undefined) { - contents.RedirectLocation = - output["RedirectLocation"]["#text"] !== undefined - ? output["RedirectLocation"]["#text"] - : output["RedirectLocation"]; + contents.RedirectLocation = output["RedirectLocation"]; } if (output["RequesterPays"] !== undefined) { - contents.RequesterPays = - (output["RequesterPays"]["#text"] !== undefined - ? output["RequesterPays"]["#text"] - : output["RequesterPays"]) == "true"; + contents.RequesterPays = output["RequesterPays"] == "true"; } if (output["SSEAwsKmsKeyId"] !== undefined) { - contents.SSEAwsKmsKeyId = - output["SSEAwsKmsKeyId"]["#text"] !== undefined - ? output["SSEAwsKmsKeyId"]["#text"] - : output["SSEAwsKmsKeyId"]; + contents.SSEAwsKmsKeyId = output["SSEAwsKmsKeyId"]; } if (output["StorageClass"] !== undefined) { - contents.StorageClass = - output["StorageClass"]["#text"] !== undefined - ? output["StorageClass"]["#text"] - : output["StorageClass"]; + contents.StorageClass = output["StorageClass"]; } if (output["TargetKeyPrefix"] !== undefined) { - contents.TargetKeyPrefix = - output["TargetKeyPrefix"]["#text"] !== undefined - ? output["TargetKeyPrefix"]["#text"] - : output["TargetKeyPrefix"]; + contents.TargetKeyPrefix = output["TargetKeyPrefix"]; } if (output["TargetResource"] !== undefined) { - contents.TargetResource = - output["TargetResource"]["#text"] !== undefined - ? output["TargetResource"]["#text"] - : output["TargetResource"]; + contents.TargetResource = output["TargetResource"]; } if (output["UnModifiedSinceConstraint"] !== undefined) { contents.UnModifiedSinceConstraint = new Date( @@ -3471,10 +3259,7 @@ const deserializeAws_restXmlS3Grant = ( ); } if (output["Permission"] !== undefined) { - contents.Permission = - output["Permission"]["#text"] !== undefined - ? output["Permission"]["#text"] - : output["Permission"]; + contents.Permission = output["Permission"]; } return contents; }; @@ -3499,22 +3284,13 @@ const deserializeAws_restXmlS3Grantee = ( TypeIdentifier: undefined }; if (output["DisplayName"] !== undefined) { - contents.DisplayName = - output["DisplayName"]["#text"] !== undefined - ? output["DisplayName"]["#text"] - : output["DisplayName"]; + contents.DisplayName = output["DisplayName"]; } if (output["Identifier"] !== undefined) { - contents.Identifier = - output["Identifier"]["#text"] !== undefined - ? output["Identifier"]["#text"] - : output["Identifier"]; + contents.Identifier = output["Identifier"]; } if (output["TypeIdentifier"] !== undefined) { - contents.TypeIdentifier = - output["TypeIdentifier"]["#text"] !== undefined - ? output["TypeIdentifier"]["#text"] - : output["TypeIdentifier"]; + contents.TypeIdentifier = output["TypeIdentifier"]; } return contents; }; @@ -3529,17 +3305,10 @@ const deserializeAws_restXmlS3InitiateRestoreObjectOperation = ( GlacierJobTier: undefined }; if (output["ExpirationInDays"] !== undefined) { - contents.ExpirationInDays = parseInt( - output["ExpirationInDays"]["#text"] !== undefined - ? output["ExpirationInDays"]["#text"] - : output["ExpirationInDays"] - ); + contents.ExpirationInDays = parseInt(output["ExpirationInDays"]); } if (output["GlacierJobTier"] !== undefined) { - contents.GlacierJobTier = - output["GlacierJobTier"]["#text"] !== undefined - ? output["GlacierJobTier"]["#text"] - : output["GlacierJobTier"]; + contents.GlacierJobTier = output["GlacierJobTier"]; } return contents; }; @@ -3563,62 +3332,34 @@ const deserializeAws_restXmlS3ObjectMetadata = ( UserMetadata: undefined }; if (output["CacheControl"] !== undefined) { - contents.CacheControl = - output["CacheControl"]["#text"] !== undefined - ? output["CacheControl"]["#text"] - : output["CacheControl"]; + contents.CacheControl = output["CacheControl"]; } if (output["ContentDisposition"] !== undefined) { - contents.ContentDisposition = - output["ContentDisposition"]["#text"] !== undefined - ? output["ContentDisposition"]["#text"] - : output["ContentDisposition"]; + contents.ContentDisposition = output["ContentDisposition"]; } if (output["ContentEncoding"] !== undefined) { - contents.ContentEncoding = - output["ContentEncoding"]["#text"] !== undefined - ? output["ContentEncoding"]["#text"] - : output["ContentEncoding"]; + contents.ContentEncoding = output["ContentEncoding"]; } if (output["ContentLanguage"] !== undefined) { - contents.ContentLanguage = - output["ContentLanguage"]["#text"] !== undefined - ? output["ContentLanguage"]["#text"] - : output["ContentLanguage"]; + contents.ContentLanguage = output["ContentLanguage"]; } if (output["ContentLength"] !== undefined) { - contents.ContentLength = parseInt( - output["ContentLength"]["#text"] !== undefined - ? output["ContentLength"]["#text"] - : output["ContentLength"] - ); + contents.ContentLength = parseInt(output["ContentLength"]); } if (output["ContentMD5"] !== undefined) { - contents.ContentMD5 = - output["ContentMD5"]["#text"] !== undefined - ? output["ContentMD5"]["#text"] - : output["ContentMD5"]; + contents.ContentMD5 = output["ContentMD5"]; } if (output["ContentType"] !== undefined) { - contents.ContentType = - output["ContentType"]["#text"] !== undefined - ? output["ContentType"]["#text"] - : output["ContentType"]; + contents.ContentType = output["ContentType"]; } if (output["HttpExpiresDate"] !== undefined) { contents.HttpExpiresDate = new Date(output["HttpExpiresDate"]); } if (output["RequesterCharged"] !== undefined) { - contents.RequesterCharged = - (output["RequesterCharged"]["#text"] !== undefined - ? output["RequesterCharged"]["#text"] - : output["RequesterCharged"]) == "true"; + contents.RequesterCharged = output["RequesterCharged"] == "true"; } if (output["SSEAlgorithm"] !== undefined) { - contents.SSEAlgorithm = - output["SSEAlgorithm"]["#text"] !== undefined - ? output["SSEAlgorithm"]["#text"] - : output["SSEAlgorithm"]; + contents.SSEAlgorithm = output["SSEAlgorithm"]; } if (output.UserMetadata === "") { contents.UserMetadata = {}; @@ -3645,16 +3386,10 @@ const deserializeAws_restXmlS3ObjectOwner = ( ID: undefined }; if (output["DisplayName"] !== undefined) { - contents.DisplayName = - output["DisplayName"]["#text"] !== undefined - ? output["DisplayName"]["#text"] - : output["DisplayName"]; + contents.DisplayName = output["DisplayName"]; } if (output["ID"] !== undefined) { - contents.ID = - output["ID"]["#text"] !== undefined - ? output["ID"]["#text"] - : output["ID"]; + contents.ID = output["ID"]; } return contents; }; @@ -3709,16 +3444,10 @@ const deserializeAws_restXmlS3Tag = ( Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -3737,10 +3466,7 @@ const deserializeAws_restXmlS3UserMetadata = ( context: __SerdeContext ): { [key: string]: string } => { return output.reduce((acc: any, pair: any) => { - acc[pair["key"]] = - pair["value"]["#text"] !== undefined - ? pair["value"]["#text"] - : pair["value"]; + acc[pair["key"]] = pair["value"]; return acc; }, {}); }; @@ -3754,10 +3480,7 @@ const deserializeAws_restXmlVpcConfiguration = ( VpcId: undefined }; if (output["VpcId"] !== undefined) { - contents.VpcId = - output["VpcId"]["#text"] !== undefined - ? output["VpcId"]["#text"] - : output["VpcId"]; + contents.VpcId = output["VpcId"]; } return contents; }; @@ -3819,7 +3542,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/clients/client-s3/protocols/Aws_restXml.ts b/clients/client-s3/protocols/Aws_restXml.ts index 5e83120e2b75..a5a1ca4692fb 100644 --- a/clients/client-s3/protocols/Aws_restXml.ts +++ b/clients/client-s3/protocols/Aws_restXml.ts @@ -471,7 +471,8 @@ import { SmithyException as __SmithyException, dateToUtcString as __dateToUtcString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -5105,26 +5106,16 @@ export const deserializeAws_restXmlCompleteMultipartUploadCommand = async ( } const data: any = await parseBody(output.body, context); if (data["Bucket"] !== undefined) { - contents.Bucket = - data["Bucket"]["#text"] !== undefined - ? data["Bucket"]["#text"] - : data["Bucket"]; + contents.Bucket = data["Bucket"]; } if (data["ETag"] !== undefined) { - contents.ETag = - data["ETag"]["#text"] !== undefined - ? data["ETag"]["#text"] - : data["ETag"]; + contents.ETag = data["ETag"]; } if (data["Key"] !== undefined) { - contents.Key = - data["Key"]["#text"] !== undefined ? data["Key"]["#text"] : data["Key"]; + contents.Key = data["Key"]; } if (data["Location"] !== undefined) { - contents.Location = - data["Location"]["#text"] !== undefined - ? data["Location"]["#text"] - : data["Location"]; + contents.Location = data["Location"]; } return Promise.resolve(contents); }; @@ -5402,20 +5393,13 @@ export const deserializeAws_restXmlCreateMultipartUploadCommand = async ( } const data: any = await parseBody(output.body, context); if (data["Bucket"] !== undefined) { - contents.Bucket = - data["Bucket"]["#text"] !== undefined - ? data["Bucket"]["#text"] - : data["Bucket"]; + contents.Bucket = data["Bucket"]; } if (data["Key"] !== undefined) { - contents.Key = - data["Key"]["#text"] !== undefined ? data["Key"]["#text"] : data["Key"]; + contents.Key = data["Key"]; } if (data["UploadId"] !== undefined) { - contents.UploadId = - data["UploadId"]["#text"] !== undefined - ? data["UploadId"]["#text"] - : data["UploadId"]; + contents.UploadId = data["UploadId"]; } return Promise.resolve(contents); }; @@ -6187,10 +6171,7 @@ export const deserializeAws_restXmlGetBucketAccelerateConfigurationCommand = asy }; const data: any = await parseBody(output.body, context); if (data["Status"] !== undefined) { - contents.Status = - data["Status"]["#text"] !== undefined - ? data["Status"]["#text"] - : data["Status"]; + contents.Status = data["Status"]; } return Promise.resolve(contents); }; @@ -6566,10 +6547,7 @@ export const deserializeAws_restXmlGetBucketLocationCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["LocationConstraint"] !== undefined) { - contents.LocationConstraint = - data["LocationConstraint"]["#text"] !== undefined - ? data["LocationConstraint"]["#text"] - : data["LocationConstraint"]; + contents.LocationConstraint = data["LocationConstraint"]; } return Promise.resolve(contents); }; @@ -6797,10 +6775,7 @@ export const deserializeAws_restXmlGetBucketPolicyCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["Policy"] !== undefined) { - contents.Policy = - data["Policy"]["#text"] !== undefined - ? data["Policy"]["#text"] - : data["Policy"]; + contents.Policy = data["Policy"]; } return Promise.resolve(contents); }; @@ -6952,10 +6927,7 @@ export const deserializeAws_restXmlGetBucketRequestPaymentCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["Payer"] !== undefined) { - contents.Payer = - data["Payer"]["#text"] !== undefined - ? data["Payer"]["#text"] - : data["Payer"]; + contents.Payer = data["Payer"]; } return Promise.resolve(contents); }; @@ -7061,16 +7033,10 @@ export const deserializeAws_restXmlGetBucketVersioningCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["MfaDelete"] !== undefined) { - contents.MFADelete = - data["MfaDelete"]["#text"] !== undefined - ? data["MfaDelete"]["#text"] - : data["MfaDelete"]; + contents.MFADelete = data["MfaDelete"]; } if (data["Status"] !== undefined) { - contents.Status = - data["Status"]["#text"] !== undefined - ? data["Status"]["#text"] - : data["Status"]; + contents.Status = data["Status"]; } return Promise.resolve(contents); }; @@ -8037,22 +8003,13 @@ export const deserializeAws_restXmlListBucketAnalyticsConfigurationsCommand = as ); } if (data["ContinuationToken"] !== undefined) { - contents.ContinuationToken = - data["ContinuationToken"]["#text"] !== undefined - ? data["ContinuationToken"]["#text"] - : data["ContinuationToken"]; + contents.ContinuationToken = data["ContinuationToken"]; } if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = - (data["IsTruncated"]["#text"] !== undefined - ? data["IsTruncated"]["#text"] - : data["IsTruncated"]) == "true"; + contents.IsTruncated = data["IsTruncated"] == "true"; } if (data["NextContinuationToken"] !== undefined) { - contents.NextContinuationToken = - data["NextContinuationToken"]["#text"] !== undefined - ? data["NextContinuationToken"]["#text"] - : data["NextContinuationToken"]; + contents.NextContinuationToken = data["NextContinuationToken"]; } return Promise.resolve(contents); }; @@ -8106,10 +8063,7 @@ export const deserializeAws_restXmlListBucketInventoryConfigurationsCommand = as }; const data: any = await parseBody(output.body, context); if (data["ContinuationToken"] !== undefined) { - contents.ContinuationToken = - data["ContinuationToken"]["#text"] !== undefined - ? data["ContinuationToken"]["#text"] - : data["ContinuationToken"]; + contents.ContinuationToken = data["ContinuationToken"]; } if (data.InventoryConfiguration === "") { contents.InventoryConfigurationList = []; @@ -8121,16 +8075,10 @@ export const deserializeAws_restXmlListBucketInventoryConfigurationsCommand = as ); } if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = - (data["IsTruncated"]["#text"] !== undefined - ? data["IsTruncated"]["#text"] - : data["IsTruncated"]) == "true"; + contents.IsTruncated = data["IsTruncated"] == "true"; } if (data["NextContinuationToken"] !== undefined) { - contents.NextContinuationToken = - data["NextContinuationToken"]["#text"] !== undefined - ? data["NextContinuationToken"]["#text"] - : data["NextContinuationToken"]; + contents.NextContinuationToken = data["NextContinuationToken"]; } return Promise.resolve(contents); }; @@ -8184,16 +8132,10 @@ export const deserializeAws_restXmlListBucketMetricsConfigurationsCommand = asyn }; const data: any = await parseBody(output.body, context); if (data["ContinuationToken"] !== undefined) { - contents.ContinuationToken = - data["ContinuationToken"]["#text"] !== undefined - ? data["ContinuationToken"]["#text"] - : data["ContinuationToken"]; + contents.ContinuationToken = data["ContinuationToken"]; } if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = - (data["IsTruncated"]["#text"] !== undefined - ? data["IsTruncated"]["#text"] - : data["IsTruncated"]) == "true"; + contents.IsTruncated = data["IsTruncated"] == "true"; } if (data.MetricsConfiguration === "") { contents.MetricsConfigurationList = []; @@ -8205,10 +8147,7 @@ export const deserializeAws_restXmlListBucketMetricsConfigurationsCommand = asyn ); } if (data["NextContinuationToken"] !== undefined) { - contents.NextContinuationToken = - data["NextContinuationToken"]["#text"] !== undefined - ? data["NextContinuationToken"]["#text"] - : data["NextContinuationToken"]; + contents.NextContinuationToken = data["NextContinuationToken"]; } return Promise.resolve(contents); }; @@ -8331,10 +8270,7 @@ export const deserializeAws_restXmlListMultipartUploadsCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["Bucket"] !== undefined) { - contents.Bucket = - data["Bucket"]["#text"] !== undefined - ? data["Bucket"]["#text"] - : data["Bucket"]; + contents.Bucket = data["Bucket"]; } if (data.CommonPrefixes === "") { contents.CommonPrefixes = []; @@ -8346,59 +8282,31 @@ export const deserializeAws_restXmlListMultipartUploadsCommand = async ( ); } if (data["Delimiter"] !== undefined) { - contents.Delimiter = - data["Delimiter"]["#text"] !== undefined - ? data["Delimiter"]["#text"] - : data["Delimiter"]; + contents.Delimiter = data["Delimiter"]; } if (data["EncodingType"] !== undefined) { - contents.EncodingType = - data["EncodingType"]["#text"] !== undefined - ? data["EncodingType"]["#text"] - : data["EncodingType"]; + contents.EncodingType = data["EncodingType"]; } if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = - (data["IsTruncated"]["#text"] !== undefined - ? data["IsTruncated"]["#text"] - : data["IsTruncated"]) == "true"; + contents.IsTruncated = data["IsTruncated"] == "true"; } if (data["KeyMarker"] !== undefined) { - contents.KeyMarker = - data["KeyMarker"]["#text"] !== undefined - ? data["KeyMarker"]["#text"] - : data["KeyMarker"]; + contents.KeyMarker = data["KeyMarker"]; } if (data["MaxUploads"] !== undefined) { - contents.MaxUploads = parseInt( - data["MaxUploads"]["#text"] !== undefined - ? data["MaxUploads"]["#text"] - : data["MaxUploads"] - ); + contents.MaxUploads = parseInt(data["MaxUploads"]); } if (data["NextKeyMarker"] !== undefined) { - contents.NextKeyMarker = - data["NextKeyMarker"]["#text"] !== undefined - ? data["NextKeyMarker"]["#text"] - : data["NextKeyMarker"]; + contents.NextKeyMarker = data["NextKeyMarker"]; } if (data["NextUploadIdMarker"] !== undefined) { - contents.NextUploadIdMarker = - data["NextUploadIdMarker"]["#text"] !== undefined - ? data["NextUploadIdMarker"]["#text"] - : data["NextUploadIdMarker"]; + contents.NextUploadIdMarker = data["NextUploadIdMarker"]; } if (data["Prefix"] !== undefined) { - contents.Prefix = - data["Prefix"]["#text"] !== undefined - ? data["Prefix"]["#text"] - : data["Prefix"]; + contents.Prefix = data["Prefix"]; } if (data["UploadIdMarker"] !== undefined) { - contents.UploadIdMarker = - data["UploadIdMarker"]["#text"] !== undefined - ? data["UploadIdMarker"]["#text"] - : data["UploadIdMarker"]; + contents.UploadIdMarker = data["UploadIdMarker"]; } if (data.Upload === "") { contents.Uploads = []; @@ -8488,65 +8396,34 @@ export const deserializeAws_restXmlListObjectVersionsCommand = async ( ); } if (data["Delimiter"] !== undefined) { - contents.Delimiter = - data["Delimiter"]["#text"] !== undefined - ? data["Delimiter"]["#text"] - : data["Delimiter"]; + contents.Delimiter = data["Delimiter"]; } if (data["EncodingType"] !== undefined) { - contents.EncodingType = - data["EncodingType"]["#text"] !== undefined - ? data["EncodingType"]["#text"] - : data["EncodingType"]; + contents.EncodingType = data["EncodingType"]; } if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = - (data["IsTruncated"]["#text"] !== undefined - ? data["IsTruncated"]["#text"] - : data["IsTruncated"]) == "true"; + contents.IsTruncated = data["IsTruncated"] == "true"; } if (data["KeyMarker"] !== undefined) { - contents.KeyMarker = - data["KeyMarker"]["#text"] !== undefined - ? data["KeyMarker"]["#text"] - : data["KeyMarker"]; + contents.KeyMarker = data["KeyMarker"]; } if (data["MaxKeys"] !== undefined) { - contents.MaxKeys = parseInt( - data["MaxKeys"]["#text"] !== undefined - ? data["MaxKeys"]["#text"] - : data["MaxKeys"] - ); + contents.MaxKeys = parseInt(data["MaxKeys"]); } if (data["Name"] !== undefined) { - contents.Name = - data["Name"]["#text"] !== undefined - ? data["Name"]["#text"] - : data["Name"]; + contents.Name = data["Name"]; } if (data["NextKeyMarker"] !== undefined) { - contents.NextKeyMarker = - data["NextKeyMarker"]["#text"] !== undefined - ? data["NextKeyMarker"]["#text"] - : data["NextKeyMarker"]; + contents.NextKeyMarker = data["NextKeyMarker"]; } if (data["NextVersionIdMarker"] !== undefined) { - contents.NextVersionIdMarker = - data["NextVersionIdMarker"]["#text"] !== undefined - ? data["NextVersionIdMarker"]["#text"] - : data["NextVersionIdMarker"]; + contents.NextVersionIdMarker = data["NextVersionIdMarker"]; } if (data["Prefix"] !== undefined) { - contents.Prefix = - data["Prefix"]["#text"] !== undefined - ? data["Prefix"]["#text"] - : data["Prefix"]; + contents.Prefix = data["Prefix"]; } if (data["VersionIdMarker"] !== undefined) { - contents.VersionIdMarker = - data["VersionIdMarker"]["#text"] !== undefined - ? data["VersionIdMarker"]["#text"] - : data["VersionIdMarker"]; + contents.VersionIdMarker = data["VersionIdMarker"]; } if (data.Version === "") { contents.Versions = []; @@ -8630,53 +8507,28 @@ export const deserializeAws_restXmlListObjectsCommand = async ( ); } if (data["Delimiter"] !== undefined) { - contents.Delimiter = - data["Delimiter"]["#text"] !== undefined - ? data["Delimiter"]["#text"] - : data["Delimiter"]; + contents.Delimiter = data["Delimiter"]; } if (data["EncodingType"] !== undefined) { - contents.EncodingType = - data["EncodingType"]["#text"] !== undefined - ? data["EncodingType"]["#text"] - : data["EncodingType"]; + contents.EncodingType = data["EncodingType"]; } if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = - (data["IsTruncated"]["#text"] !== undefined - ? data["IsTruncated"]["#text"] - : data["IsTruncated"]) == "true"; + contents.IsTruncated = data["IsTruncated"] == "true"; } if (data["Marker"] !== undefined) { - contents.Marker = - data["Marker"]["#text"] !== undefined - ? data["Marker"]["#text"] - : data["Marker"]; + contents.Marker = data["Marker"]; } if (data["MaxKeys"] !== undefined) { - contents.MaxKeys = parseInt( - data["MaxKeys"]["#text"] !== undefined - ? data["MaxKeys"]["#text"] - : data["MaxKeys"] - ); + contents.MaxKeys = parseInt(data["MaxKeys"]); } if (data["Name"] !== undefined) { - contents.Name = - data["Name"]["#text"] !== undefined - ? data["Name"]["#text"] - : data["Name"]; + contents.Name = data["Name"]; } if (data["NextMarker"] !== undefined) { - contents.NextMarker = - data["NextMarker"]["#text"] !== undefined - ? data["NextMarker"]["#text"] - : data["NextMarker"]; + contents.NextMarker = data["NextMarker"]; } if (data["Prefix"] !== undefined) { - contents.Prefix = - data["Prefix"]["#text"] !== undefined - ? data["Prefix"]["#text"] - : data["Prefix"]; + contents.Prefix = data["Prefix"]; } return Promise.resolve(contents); }; @@ -8764,66 +8616,34 @@ export const deserializeAws_restXmlListObjectsV2Command = async ( ); } if (data["ContinuationToken"] !== undefined) { - contents.ContinuationToken = - data["ContinuationToken"]["#text"] !== undefined - ? data["ContinuationToken"]["#text"] - : data["ContinuationToken"]; + contents.ContinuationToken = data["ContinuationToken"]; } if (data["Delimiter"] !== undefined) { - contents.Delimiter = - data["Delimiter"]["#text"] !== undefined - ? data["Delimiter"]["#text"] - : data["Delimiter"]; + contents.Delimiter = data["Delimiter"]; } if (data["EncodingType"] !== undefined) { - contents.EncodingType = - data["EncodingType"]["#text"] !== undefined - ? data["EncodingType"]["#text"] - : data["EncodingType"]; + contents.EncodingType = data["EncodingType"]; } if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = - (data["IsTruncated"]["#text"] !== undefined - ? data["IsTruncated"]["#text"] - : data["IsTruncated"]) == "true"; + contents.IsTruncated = data["IsTruncated"] == "true"; } if (data["KeyCount"] !== undefined) { - contents.KeyCount = parseInt( - data["KeyCount"]["#text"] !== undefined - ? data["KeyCount"]["#text"] - : data["KeyCount"] - ); + contents.KeyCount = parseInt(data["KeyCount"]); } if (data["MaxKeys"] !== undefined) { - contents.MaxKeys = parseInt( - data["MaxKeys"]["#text"] !== undefined - ? data["MaxKeys"]["#text"] - : data["MaxKeys"] - ); + contents.MaxKeys = parseInt(data["MaxKeys"]); } if (data["Name"] !== undefined) { - contents.Name = - data["Name"]["#text"] !== undefined - ? data["Name"]["#text"] - : data["Name"]; + contents.Name = data["Name"]; } if (data["NextContinuationToken"] !== undefined) { - contents.NextContinuationToken = - data["NextContinuationToken"]["#text"] !== undefined - ? data["NextContinuationToken"]["#text"] - : data["NextContinuationToken"]; + contents.NextContinuationToken = data["NextContinuationToken"]; } if (data["Prefix"] !== undefined) { - contents.Prefix = - data["Prefix"]["#text"] !== undefined - ? data["Prefix"]["#text"] - : data["Prefix"]; + contents.Prefix = data["Prefix"]; } if (data["StartAfter"] !== undefined) { - contents.StartAfter = - data["StartAfter"]["#text"] !== undefined - ? data["StartAfter"]["#text"] - : data["StartAfter"]; + contents.StartAfter = data["StartAfter"]; } return Promise.resolve(contents); }; @@ -8904,10 +8724,7 @@ export const deserializeAws_restXmlListPartsCommand = async ( } const data: any = await parseBody(output.body, context); if (data["Bucket"] !== undefined) { - contents.Bucket = - data["Bucket"]["#text"] !== undefined - ? data["Bucket"]["#text"] - : data["Bucket"]; + contents.Bucket = data["Bucket"]; } if (data["Initiator"] !== undefined) { contents.Initiator = deserializeAws_restXmlInitiator( @@ -8916,38 +8733,22 @@ export const deserializeAws_restXmlListPartsCommand = async ( ); } if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = - (data["IsTruncated"]["#text"] !== undefined - ? data["IsTruncated"]["#text"] - : data["IsTruncated"]) == "true"; + contents.IsTruncated = data["IsTruncated"] == "true"; } if (data["Key"] !== undefined) { - contents.Key = - data["Key"]["#text"] !== undefined ? data["Key"]["#text"] : data["Key"]; + contents.Key = data["Key"]; } if (data["MaxParts"] !== undefined) { - contents.MaxParts = parseInt( - data["MaxParts"]["#text"] !== undefined - ? data["MaxParts"]["#text"] - : data["MaxParts"] - ); + contents.MaxParts = parseInt(data["MaxParts"]); } if (data["NextPartNumberMarker"] !== undefined) { - contents.NextPartNumberMarker = parseInt( - data["NextPartNumberMarker"]["#text"] !== undefined - ? data["NextPartNumberMarker"]["#text"] - : data["NextPartNumberMarker"] - ); + contents.NextPartNumberMarker = parseInt(data["NextPartNumberMarker"]); } if (data["Owner"] !== undefined) { contents.Owner = deserializeAws_restXmlOwner(data["Owner"], context); } if (data["PartNumberMarker"] !== undefined) { - contents.PartNumberMarker = parseInt( - data["PartNumberMarker"]["#text"] !== undefined - ? data["PartNumberMarker"]["#text"] - : data["PartNumberMarker"] - ); + contents.PartNumberMarker = parseInt(data["PartNumberMarker"]); } if (data.Part === "") { contents.Parts = []; @@ -8959,16 +8760,10 @@ export const deserializeAws_restXmlListPartsCommand = async ( ); } if (data["StorageClass"] !== undefined) { - contents.StorageClass = - data["StorageClass"]["#text"] !== undefined - ? data["StorageClass"]["#text"] - : data["StorageClass"]; + contents.StorageClass = data["StorageClass"]; } if (data["UploadId"] !== undefined) { - contents.UploadId = - data["UploadId"]["#text"] !== undefined - ? data["UploadId"]["#text"] - : data["UploadId"]; + contents.UploadId = data["UploadId"]; } return Promise.resolve(contents); }; @@ -13240,11 +13035,7 @@ const deserializeAws_restXmlAbortIncompleteMultipartUpload = ( DaysAfterInitiation: undefined }; if (output["DaysAfterInitiation"] !== undefined) { - contents.DaysAfterInitiation = parseInt( - output["DaysAfterInitiation"]["#text"] !== undefined - ? output["DaysAfterInitiation"]["#text"] - : output["DaysAfterInitiation"] - ); + contents.DaysAfterInitiation = parseInt(output["DaysAfterInitiation"]); } return contents; }; @@ -13258,10 +13049,7 @@ const deserializeAws_restXmlAccessControlTranslation = ( Owner: undefined }; if (output["Owner"] !== undefined) { - contents.Owner = - output["Owner"]["#text"] !== undefined - ? output["Owner"]["#text"] - : output["Owner"]; + contents.Owner = output["Owner"]; } return contents; }; @@ -13270,27 +13058,21 @@ const deserializeAws_restXmlAllowedHeaders = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlAllowedMethods = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlAllowedOrigins = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlAnalyticsAndOperator = ( @@ -13303,10 +13085,7 @@ const deserializeAws_restXmlAnalyticsAndOperator = ( Tags: undefined }; if (output["Prefix"] !== undefined) { - contents.Prefix = - output["Prefix"]["#text"] !== undefined - ? output["Prefix"]["#text"] - : output["Prefix"]; + contents.Prefix = output["Prefix"]; } if (output.Tag === "") { contents.Tags = []; @@ -13337,10 +13116,7 @@ const deserializeAws_restXmlAnalyticsConfiguration = ( ); } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["StorageClassAnalysis"] !== undefined) { contents.StorageClassAnalysis = deserializeAws_restXmlStorageClassAnalysis( @@ -13394,10 +13170,7 @@ const deserializeAws_restXmlAnalyticsFilter = ( ); } if (output["Prefix"] !== undefined) { - contents.Prefix = - output["Prefix"]["#text"] !== undefined - ? output["Prefix"]["#text"] - : output["Prefix"]; + contents.Prefix = output["Prefix"]; } if (output["Tag"] !== undefined) { contents.Tag = deserializeAws_restXmlTag(output["Tag"], context); @@ -13417,28 +13190,16 @@ const deserializeAws_restXmlAnalyticsS3BucketDestination = ( Prefix: undefined }; if (output["Bucket"] !== undefined) { - contents.Bucket = - output["Bucket"]["#text"] !== undefined - ? output["Bucket"]["#text"] - : output["Bucket"]; + contents.Bucket = output["Bucket"]; } if (output["BucketAccountId"] !== undefined) { - contents.BucketAccountId = - output["BucketAccountId"]["#text"] !== undefined - ? output["BucketAccountId"]["#text"] - : output["BucketAccountId"]; + contents.BucketAccountId = output["BucketAccountId"]; } if (output["Format"] !== undefined) { - contents.Format = - output["Format"]["#text"] !== undefined - ? output["Format"]["#text"] - : output["Format"]; + contents.Format = output["Format"]; } if (output["Prefix"] !== undefined) { - contents.Prefix = - output["Prefix"]["#text"] !== undefined - ? output["Prefix"]["#text"] - : output["Prefix"]; + contents.Prefix = output["Prefix"]; } return contents; }; @@ -13456,10 +13217,7 @@ const deserializeAws_restXmlBucket = ( contents.CreationDate = new Date(output["CreationDate"]); } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } return contents; }; @@ -13522,11 +13280,7 @@ const deserializeAws_restXmlCORSRule = ( ); } if (output["MaxAgeSeconds"] !== undefined) { - contents.MaxAgeSeconds = parseInt( - output["MaxAgeSeconds"]["#text"] !== undefined - ? output["MaxAgeSeconds"]["#text"] - : output["MaxAgeSeconds"] - ); + contents.MaxAgeSeconds = parseInt(output["MaxAgeSeconds"]); } return contents; }; @@ -13549,10 +13303,7 @@ const deserializeAws_restXmlCommonPrefix = ( Prefix: undefined }; if (output["Prefix"] !== undefined) { - contents.Prefix = - output["Prefix"]["#text"] !== undefined - ? output["Prefix"]["#text"] - : output["Prefix"]; + contents.Prefix = output["Prefix"]; } return contents; }; @@ -13577,15 +13328,10 @@ const deserializeAws_restXmlCondition = ( }; if (output["HttpErrorCodeReturnedEquals"] !== undefined) { contents.HttpErrorCodeReturnedEquals = - output["HttpErrorCodeReturnedEquals"]["#text"] !== undefined - ? output["HttpErrorCodeReturnedEquals"]["#text"] - : output["HttpErrorCodeReturnedEquals"]; + output["HttpErrorCodeReturnedEquals"]; } if (output["KeyPrefixEquals"] !== undefined) { - contents.KeyPrefixEquals = - output["KeyPrefixEquals"]["#text"] !== undefined - ? output["KeyPrefixEquals"]["#text"] - : output["KeyPrefixEquals"]; + contents.KeyPrefixEquals = output["KeyPrefixEquals"]; } return contents; }; @@ -13600,10 +13346,7 @@ const deserializeAws_restXmlCopyObjectResult = ( LastModified: undefined }; if (output["ETag"] !== undefined) { - contents.ETag = - output["ETag"]["#text"] !== undefined - ? output["ETag"]["#text"] - : output["ETag"]; + contents.ETag = output["ETag"]; } if (output["LastModified"] !== undefined) { contents.LastModified = new Date(output["LastModified"]); @@ -13621,10 +13364,7 @@ const deserializeAws_restXmlCopyPartResult = ( LastModified: undefined }; if (output["ETag"] !== undefined) { - contents.ETag = - output["ETag"]["#text"] !== undefined - ? output["ETag"]["#text"] - : output["ETag"]; + contents.ETag = output["ETag"]; } if (output["LastModified"] !== undefined) { contents.LastModified = new Date(output["LastModified"]); @@ -13643,24 +13383,13 @@ const deserializeAws_restXmlDefaultRetention = ( Years: undefined }; if (output["Days"] !== undefined) { - contents.Days = parseInt( - output["Days"]["#text"] !== undefined - ? output["Days"]["#text"] - : output["Days"] - ); + contents.Days = parseInt(output["Days"]); } if (output["Mode"] !== undefined) { - contents.Mode = - output["Mode"]["#text"] !== undefined - ? output["Mode"]["#text"] - : output["Mode"]; + contents.Mode = output["Mode"]; } if (output["Years"] !== undefined) { - contents.Years = parseInt( - output["Years"]["#text"] !== undefined - ? output["Years"]["#text"] - : output["Years"] - ); + contents.Years = parseInt(output["Years"]); } return contents; }; @@ -13678,16 +13407,10 @@ const deserializeAws_restXmlDeleteMarkerEntry = ( VersionId: undefined }; if (output["IsLatest"] !== undefined) { - contents.IsLatest = - (output["IsLatest"]["#text"] !== undefined - ? output["IsLatest"]["#text"] - : output["IsLatest"]) == "true"; + contents.IsLatest = output["IsLatest"] == "true"; } if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["LastModified"] !== undefined) { contents.LastModified = new Date(output["LastModified"]); @@ -13696,10 +13419,7 @@ const deserializeAws_restXmlDeleteMarkerEntry = ( contents.Owner = deserializeAws_restXmlOwner(output["Owner"], context); } if (output["VersionId"] !== undefined) { - contents.VersionId = - output["VersionId"]["#text"] !== undefined - ? output["VersionId"]["#text"] - : output["VersionId"]; + contents.VersionId = output["VersionId"]; } return contents; }; @@ -13713,10 +13433,7 @@ const deserializeAws_restXmlDeleteMarkerReplication = ( Status: undefined }; if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -13742,28 +13459,16 @@ const deserializeAws_restXmlDeletedObject = ( VersionId: undefined }; if (output["DeleteMarker"] !== undefined) { - contents.DeleteMarker = - (output["DeleteMarker"]["#text"] !== undefined - ? output["DeleteMarker"]["#text"] - : output["DeleteMarker"]) == "true"; + contents.DeleteMarker = output["DeleteMarker"] == "true"; } if (output["DeleteMarkerVersionId"] !== undefined) { - contents.DeleteMarkerVersionId = - output["DeleteMarkerVersionId"]["#text"] !== undefined - ? output["DeleteMarkerVersionId"]["#text"] - : output["DeleteMarkerVersionId"]; + contents.DeleteMarkerVersionId = output["DeleteMarkerVersionId"]; } if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["VersionId"] !== undefined) { - contents.VersionId = - output["VersionId"]["#text"] !== undefined - ? output["VersionId"]["#text"] - : output["VersionId"]; + contents.VersionId = output["VersionId"]; } return contents; }; @@ -13798,16 +13503,10 @@ const deserializeAws_restXmlDestination = ( ); } if (output["Account"] !== undefined) { - contents.Account = - output["Account"]["#text"] !== undefined - ? output["Account"]["#text"] - : output["Account"]; + contents.Account = output["Account"]; } if (output["Bucket"] !== undefined) { - contents.Bucket = - output["Bucket"]["#text"] !== undefined - ? output["Bucket"]["#text"] - : output["Bucket"]; + contents.Bucket = output["Bucket"]; } if (output["EncryptionConfiguration"] !== undefined) { contents.EncryptionConfiguration = deserializeAws_restXmlEncryptionConfiguration( @@ -13828,10 +13527,7 @@ const deserializeAws_restXmlDestination = ( ); } if (output["StorageClass"] !== undefined) { - contents.StorageClass = - output["StorageClass"]["#text"] !== undefined - ? output["StorageClass"]["#text"] - : output["StorageClass"]; + contents.StorageClass = output["StorageClass"]; } return contents; }; @@ -13845,10 +13541,7 @@ const deserializeAws_restXmlEncryptionConfiguration = ( ReplicaKmsKeyID: undefined }; if (output["ReplicaKmsKeyID"] !== undefined) { - contents.ReplicaKmsKeyID = - output["ReplicaKmsKeyID"]["#text"] !== undefined - ? output["ReplicaKmsKeyID"]["#text"] - : output["ReplicaKmsKeyID"]; + contents.ReplicaKmsKeyID = output["ReplicaKmsKeyID"]; } return contents; }; @@ -13865,28 +13558,16 @@ const deserializeAws_restXml_Error = ( VersionId: undefined }; if (output["Code"] !== undefined) { - contents.Code = - output["Code"]["#text"] !== undefined - ? output["Code"]["#text"] - : output["Code"]; + contents.Code = output["Code"]; } if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } if (output["VersionId"] !== undefined) { - contents.VersionId = - output["VersionId"]["#text"] !== undefined - ? output["VersionId"]["#text"] - : output["VersionId"]; + contents.VersionId = output["VersionId"]; } return contents; }; @@ -13900,10 +13581,7 @@ const deserializeAws_restXmlErrorDocument = ( Key: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } return contents; }; @@ -13921,9 +13599,7 @@ const deserializeAws_restXmlEventList = ( output: any, context: __SerdeContext ): (Event | string)[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlExistingObjectReplication = ( @@ -13935,10 +13611,7 @@ const deserializeAws_restXmlExistingObjectReplication = ( Status: undefined }; if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -13947,9 +13620,7 @@ const deserializeAws_restXmlExposeHeaders = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlFilterRule = ( @@ -13962,16 +13633,10 @@ const deserializeAws_restXmlFilterRule = ( Value: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -14001,10 +13666,7 @@ const deserializeAws_restXmlGrant = ( ); } if (output["Permission"] !== undefined) { - contents.Permission = - output["Permission"]["#text"] !== undefined - ? output["Permission"]["#text"] - : output["Permission"]; + contents.Permission = output["Permission"]; } return contents; }; @@ -14022,34 +13684,19 @@ const deserializeAws_restXmlGrantee = ( URI: undefined }; if (output["DisplayName"] !== undefined) { - contents.DisplayName = - output["DisplayName"]["#text"] !== undefined - ? output["DisplayName"]["#text"] - : output["DisplayName"]; + contents.DisplayName = output["DisplayName"]; } if (output["EmailAddress"] !== undefined) { - contents.EmailAddress = - output["EmailAddress"]["#text"] !== undefined - ? output["EmailAddress"]["#text"] - : output["EmailAddress"]; + contents.EmailAddress = output["EmailAddress"]; } if (output["ID"] !== undefined) { - contents.ID = - output["ID"]["#text"] !== undefined - ? output["ID"]["#text"] - : output["ID"]; + contents.ID = output["ID"]; } if (output["xsi:type"] !== undefined) { - contents.Type = - output["xsi:type"]["#text"] !== undefined - ? output["xsi:type"]["#text"] - : output["xsi:type"]; + contents.Type = output["xsi:type"]; } if (output["URI"] !== undefined) { - contents.URI = - output["URI"]["#text"] !== undefined - ? output["URI"]["#text"] - : output["URI"]; + contents.URI = output["URI"]; } return contents; }; @@ -14072,10 +13719,7 @@ const deserializeAws_restXmlIndexDocument = ( Suffix: undefined }; if (output["Suffix"] !== undefined) { - contents.Suffix = - output["Suffix"]["#text"] !== undefined - ? output["Suffix"]["#text"] - : output["Suffix"]; + contents.Suffix = output["Suffix"]; } return contents; }; @@ -14090,16 +13734,10 @@ const deserializeAws_restXmlInitiator = ( ID: undefined }; if (output["DisplayName"] !== undefined) { - contents.DisplayName = - output["DisplayName"]["#text"] !== undefined - ? output["DisplayName"]["#text"] - : output["DisplayName"]; + contents.DisplayName = output["DisplayName"]; } if (output["ID"] !== undefined) { - contents.ID = - output["ID"]["#text"] !== undefined - ? output["ID"]["#text"] - : output["ID"]; + contents.ID = output["ID"]; } return contents; }; @@ -14131,22 +13769,13 @@ const deserializeAws_restXmlInventoryConfiguration = ( ); } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["IncludedObjectVersions"] !== undefined) { - contents.IncludedObjectVersions = - output["IncludedObjectVersions"]["#text"] !== undefined - ? output["IncludedObjectVersions"]["#text"] - : output["IncludedObjectVersions"]; + contents.IncludedObjectVersions = output["IncludedObjectVersions"]; } if (output["IsEnabled"] !== undefined) { - contents.IsEnabled = - (output["IsEnabled"]["#text"] !== undefined - ? output["IsEnabled"]["#text"] - : output["IsEnabled"]) == "true"; + contents.IsEnabled = output["IsEnabled"] == "true"; } if (output.OptionalFields === "") { contents.OptionalFields = []; @@ -14222,10 +13851,7 @@ const deserializeAws_restXmlInventoryFilter = ( Prefix: undefined }; if (output["Prefix"] !== undefined) { - contents.Prefix = - output["Prefix"]["#text"] !== undefined - ? output["Prefix"]["#text"] - : output["Prefix"]; + contents.Prefix = output["Prefix"]; } return contents; }; @@ -14234,9 +13860,7 @@ const deserializeAws_restXmlInventoryOptionalFields = ( output: any, context: __SerdeContext ): (InventoryOptionalField | string)[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlInventoryS3BucketDestination = ( @@ -14252,16 +13876,10 @@ const deserializeAws_restXmlInventoryS3BucketDestination = ( Prefix: undefined }; if (output["AccountId"] !== undefined) { - contents.AccountId = - output["AccountId"]["#text"] !== undefined - ? output["AccountId"]["#text"] - : output["AccountId"]; + contents.AccountId = output["AccountId"]; } if (output["Bucket"] !== undefined) { - contents.Bucket = - output["Bucket"]["#text"] !== undefined - ? output["Bucket"]["#text"] - : output["Bucket"]; + contents.Bucket = output["Bucket"]; } if (output["Encryption"] !== undefined) { contents.Encryption = deserializeAws_restXmlInventoryEncryption( @@ -14270,16 +13888,10 @@ const deserializeAws_restXmlInventoryS3BucketDestination = ( ); } if (output["Format"] !== undefined) { - contents.Format = - output["Format"]["#text"] !== undefined - ? output["Format"]["#text"] - : output["Format"]; + contents.Format = output["Format"]; } if (output["Prefix"] !== undefined) { - contents.Prefix = - output["Prefix"]["#text"] !== undefined - ? output["Prefix"]["#text"] - : output["Prefix"]; + contents.Prefix = output["Prefix"]; } return contents; }; @@ -14293,10 +13905,7 @@ const deserializeAws_restXmlInventorySchedule = ( Frequency: undefined }; if (output["Frequency"] !== undefined) { - contents.Frequency = - output["Frequency"]["#text"] !== undefined - ? output["Frequency"]["#text"] - : output["Frequency"]; + contents.Frequency = output["Frequency"]; } return contents; }; @@ -14328,16 +13937,10 @@ const deserializeAws_restXmlLambdaFunctionConfiguration = ( ); } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["CloudFunction"] !== undefined) { - contents.LambdaFunctionArn = - output["CloudFunction"]["#text"] !== undefined - ? output["CloudFunction"]["#text"] - : output["CloudFunction"]; + contents.LambdaFunctionArn = output["CloudFunction"]; } return contents; }; @@ -14365,17 +13968,11 @@ const deserializeAws_restXmlLifecycleExpiration = ( contents.Date = new Date(output["Date"]); } if (output["Days"] !== undefined) { - contents.Days = parseInt( - output["Days"]["#text"] !== undefined - ? output["Days"]["#text"] - : output["Days"] - ); + contents.Days = parseInt(output["Days"]); } if (output["ExpiredObjectDeleteMarker"] !== undefined) { contents.ExpiredObjectDeleteMarker = - (output["ExpiredObjectDeleteMarker"]["#text"] !== undefined - ? output["ExpiredObjectDeleteMarker"]["#text"] - : output["ExpiredObjectDeleteMarker"]) == "true"; + output["ExpiredObjectDeleteMarker"] == "true"; } return contents; }; @@ -14415,10 +14012,7 @@ const deserializeAws_restXmlLifecycleRule = ( ); } if (output["ID"] !== undefined) { - contents.ID = - output["ID"]["#text"] !== undefined - ? output["ID"]["#text"] - : output["ID"]; + contents.ID = output["ID"]; } if (output["NoncurrentVersionExpiration"] !== undefined) { contents.NoncurrentVersionExpiration = deserializeAws_restXmlNoncurrentVersionExpiration( @@ -14436,16 +14030,10 @@ const deserializeAws_restXmlLifecycleRule = ( ); } if (output["Prefix"] !== undefined) { - contents.Prefix = - output["Prefix"]["#text"] !== undefined - ? output["Prefix"]["#text"] - : output["Prefix"]; + contents.Prefix = output["Prefix"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output.Transition === "") { contents.Transitions = []; @@ -14469,10 +14057,7 @@ const deserializeAws_restXmlLifecycleRuleAndOperator = ( Tags: undefined }; if (output["Prefix"] !== undefined) { - contents.Prefix = - output["Prefix"]["#text"] !== undefined - ? output["Prefix"]["#text"] - : output["Prefix"]; + contents.Prefix = output["Prefix"]; } if (output.Tag === "") { contents.Tags = []; @@ -14503,10 +14088,7 @@ const deserializeAws_restXmlLifecycleRuleFilter = ( ); } if (output["Prefix"] !== undefined) { - contents.Prefix = - output["Prefix"]["#text"] !== undefined - ? output["Prefix"]["#text"] - : output["Prefix"]; + contents.Prefix = output["Prefix"]; } if (output["Tag"] !== undefined) { contents.Tag = deserializeAws_restXmlTag(output["Tag"], context); @@ -14534,10 +14116,7 @@ const deserializeAws_restXmlLoggingEnabled = ( TargetPrefix: undefined }; if (output["TargetBucket"] !== undefined) { - contents.TargetBucket = - output["TargetBucket"]["#text"] !== undefined - ? output["TargetBucket"]["#text"] - : output["TargetBucket"]; + contents.TargetBucket = output["TargetBucket"]; } if (output.TargetGrants === "") { contents.TargetGrants = []; @@ -14552,10 +14131,7 @@ const deserializeAws_restXmlLoggingEnabled = ( ); } if (output["TargetPrefix"] !== undefined) { - contents.TargetPrefix = - output["TargetPrefix"]["#text"] !== undefined - ? output["TargetPrefix"]["#text"] - : output["TargetPrefix"]; + contents.TargetPrefix = output["TargetPrefix"]; } return contents; }; @@ -14576,10 +14152,7 @@ const deserializeAws_restXmlMetrics = ( ); } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -14594,10 +14167,7 @@ const deserializeAws_restXmlMetricsAndOperator = ( Tags: undefined }; if (output["Prefix"] !== undefined) { - contents.Prefix = - output["Prefix"]["#text"] !== undefined - ? output["Prefix"]["#text"] - : output["Prefix"]; + contents.Prefix = output["Prefix"]; } if (output.Tag === "") { contents.Tags = []; @@ -14627,10 +14197,7 @@ const deserializeAws_restXmlMetricsConfiguration = ( ); } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } return contents; }; @@ -14661,10 +14228,7 @@ const deserializeAws_restXmlMetricsFilter = ( ); } if (output["Prefix"] !== undefined) { - contents.Prefix = - output["Prefix"]["#text"] !== undefined - ? output["Prefix"]["#text"] - : output["Prefix"]; + contents.Prefix = output["Prefix"]; } if (output["Tag"] !== undefined) { contents.Tag = deserializeAws_restXmlTag(output["Tag"], context); @@ -14695,25 +14259,16 @@ const deserializeAws_restXmlMultipartUpload = ( ); } if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Owner"] !== undefined) { contents.Owner = deserializeAws_restXmlOwner(output["Owner"], context); } if (output["StorageClass"] !== undefined) { - contents.StorageClass = - output["StorageClass"]["#text"] !== undefined - ? output["StorageClass"]["#text"] - : output["StorageClass"]; + contents.StorageClass = output["StorageClass"]; } if (output["UploadId"] !== undefined) { - contents.UploadId = - output["UploadId"]["#text"] !== undefined - ? output["UploadId"]["#text"] - : output["UploadId"]; + contents.UploadId = output["UploadId"]; } return contents; }; @@ -14736,11 +14291,7 @@ const deserializeAws_restXmlNoncurrentVersionExpiration = ( NoncurrentDays: undefined }; if (output["NoncurrentDays"] !== undefined) { - contents.NoncurrentDays = parseInt( - output["NoncurrentDays"]["#text"] !== undefined - ? output["NoncurrentDays"]["#text"] - : output["NoncurrentDays"] - ); + contents.NoncurrentDays = parseInt(output["NoncurrentDays"]); } return contents; }; @@ -14755,17 +14306,10 @@ const deserializeAws_restXmlNoncurrentVersionTransition = ( StorageClass: undefined }; if (output["NoncurrentDays"] !== undefined) { - contents.NoncurrentDays = parseInt( - output["NoncurrentDays"]["#text"] !== undefined - ? output["NoncurrentDays"]["#text"] - : output["NoncurrentDays"] - ); + contents.NoncurrentDays = parseInt(output["NoncurrentDays"]); } if (output["StorageClass"] !== undefined) { - contents.StorageClass = - output["StorageClass"]["#text"] !== undefined - ? output["StorageClass"]["#text"] - : output["StorageClass"]; + contents.StorageClass = output["StorageClass"]; } return contents; }; @@ -14807,16 +14351,10 @@ const deserializeAws_restXml_Object = ( StorageClass: undefined }; if (output["ETag"] !== undefined) { - contents.ETag = - output["ETag"]["#text"] !== undefined - ? output["ETag"]["#text"] - : output["ETag"]; + contents.ETag = output["ETag"]; } if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["LastModified"] !== undefined) { contents.LastModified = new Date(output["LastModified"]); @@ -14825,17 +14363,10 @@ const deserializeAws_restXml_Object = ( contents.Owner = deserializeAws_restXmlOwner(output["Owner"], context); } if (output["Size"] !== undefined) { - contents.Size = parseInt( - output["Size"]["#text"] !== undefined - ? output["Size"]["#text"] - : output["Size"] - ); + contents.Size = parseInt(output["Size"]); } if (output["StorageClass"] !== undefined) { - contents.StorageClass = - output["StorageClass"]["#text"] !== undefined - ? output["StorageClass"]["#text"] - : output["StorageClass"]; + contents.StorageClass = output["StorageClass"]; } return contents; }; @@ -14859,10 +14390,7 @@ const deserializeAws_restXmlObjectLockConfiguration = ( Rule: undefined }; if (output["ObjectLockEnabled"] !== undefined) { - contents.ObjectLockEnabled = - output["ObjectLockEnabled"]["#text"] !== undefined - ? output["ObjectLockEnabled"]["#text"] - : output["ObjectLockEnabled"]; + contents.ObjectLockEnabled = output["ObjectLockEnabled"]; } if (output["Rule"] !== undefined) { contents.Rule = deserializeAws_restXmlObjectLockRule( @@ -14882,10 +14410,7 @@ const deserializeAws_restXmlObjectLockLegalHold = ( Status: undefined }; if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -14900,10 +14425,7 @@ const deserializeAws_restXmlObjectLockRetention = ( RetainUntilDate: undefined }; if (output["Mode"] !== undefined) { - contents.Mode = - output["Mode"]["#text"] !== undefined - ? output["Mode"]["#text"] - : output["Mode"]; + contents.Mode = output["Mode"]; } if (output["RetainUntilDate"] !== undefined) { contents.RetainUntilDate = new Date(output["RetainUntilDate"]); @@ -14944,22 +14466,13 @@ const deserializeAws_restXmlObjectVersion = ( VersionId: undefined }; if (output["ETag"] !== undefined) { - contents.ETag = - output["ETag"]["#text"] !== undefined - ? output["ETag"]["#text"] - : output["ETag"]; + contents.ETag = output["ETag"]; } if (output["IsLatest"] !== undefined) { - contents.IsLatest = - (output["IsLatest"]["#text"] !== undefined - ? output["IsLatest"]["#text"] - : output["IsLatest"]) == "true"; + contents.IsLatest = output["IsLatest"] == "true"; } if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["LastModified"] !== undefined) { contents.LastModified = new Date(output["LastModified"]); @@ -14968,23 +14481,13 @@ const deserializeAws_restXmlObjectVersion = ( contents.Owner = deserializeAws_restXmlOwner(output["Owner"], context); } if (output["Size"] !== undefined) { - contents.Size = parseInt( - output["Size"]["#text"] !== undefined - ? output["Size"]["#text"] - : output["Size"] - ); + contents.Size = parseInt(output["Size"]); } if (output["StorageClass"] !== undefined) { - contents.StorageClass = - output["StorageClass"]["#text"] !== undefined - ? output["StorageClass"]["#text"] - : output["StorageClass"]; + contents.StorageClass = output["StorageClass"]; } if (output["VersionId"] !== undefined) { - contents.VersionId = - output["VersionId"]["#text"] !== undefined - ? output["VersionId"]["#text"] - : output["VersionId"]; + contents.VersionId = output["VersionId"]; } return contents; }; @@ -15008,16 +14511,10 @@ const deserializeAws_restXmlOwner = ( ID: undefined }; if (output["DisplayName"] !== undefined) { - contents.DisplayName = - output["DisplayName"]["#text"] !== undefined - ? output["DisplayName"]["#text"] - : output["DisplayName"]; + contents.DisplayName = output["DisplayName"]; } if (output["ID"] !== undefined) { - contents.ID = - output["ID"]["#text"] !== undefined - ? output["ID"]["#text"] - : output["ID"]; + contents.ID = output["ID"]; } return contents; }; @@ -15034,27 +14531,16 @@ const deserializeAws_restXmlPart = ( Size: undefined }; if (output["ETag"] !== undefined) { - contents.ETag = - output["ETag"]["#text"] !== undefined - ? output["ETag"]["#text"] - : output["ETag"]; + contents.ETag = output["ETag"]; } if (output["LastModified"] !== undefined) { contents.LastModified = new Date(output["LastModified"]); } if (output["PartNumber"] !== undefined) { - contents.PartNumber = parseInt( - output["PartNumber"]["#text"] !== undefined - ? output["PartNumber"]["#text"] - : output["PartNumber"] - ); + contents.PartNumber = parseInt(output["PartNumber"]); } if (output["Size"] !== undefined) { - contents.Size = parseInt( - output["Size"]["#text"] !== undefined - ? output["Size"]["#text"] - : output["Size"] - ); + contents.Size = parseInt(output["Size"]); } return contents; }; @@ -15077,10 +14563,7 @@ const deserializeAws_restXmlPolicyStatus = ( IsPublic: undefined }; if (output["IsPublic"] !== undefined) { - contents.IsPublic = - (output["IsPublic"]["#text"] !== undefined - ? output["IsPublic"]["#text"] - : output["IsPublic"]) == "true"; + contents.IsPublic = output["IsPublic"] == "true"; } return contents; }; @@ -15097,28 +14580,16 @@ const deserializeAws_restXmlPublicAccessBlockConfiguration = ( RestrictPublicBuckets: undefined }; if (output["BlockPublicAcls"] !== undefined) { - contents.BlockPublicAcls = - (output["BlockPublicAcls"]["#text"] !== undefined - ? output["BlockPublicAcls"]["#text"] - : output["BlockPublicAcls"]) == "true"; + contents.BlockPublicAcls = output["BlockPublicAcls"] == "true"; } if (output["BlockPublicPolicy"] !== undefined) { - contents.BlockPublicPolicy = - (output["BlockPublicPolicy"]["#text"] !== undefined - ? output["BlockPublicPolicy"]["#text"] - : output["BlockPublicPolicy"]) == "true"; + contents.BlockPublicPolicy = output["BlockPublicPolicy"] == "true"; } if (output["IgnorePublicAcls"] !== undefined) { - contents.IgnorePublicAcls = - (output["IgnorePublicAcls"]["#text"] !== undefined - ? output["IgnorePublicAcls"]["#text"] - : output["IgnorePublicAcls"]) == "true"; + contents.IgnorePublicAcls = output["IgnorePublicAcls"] == "true"; } if (output["RestrictPublicBuckets"] !== undefined) { - contents.RestrictPublicBuckets = - (output["RestrictPublicBuckets"]["#text"] !== undefined - ? output["RestrictPublicBuckets"]["#text"] - : output["RestrictPublicBuckets"]) == "true"; + contents.RestrictPublicBuckets = output["RestrictPublicBuckets"] == "true"; } return contents; }; @@ -15150,16 +14621,10 @@ const deserializeAws_restXmlQueueConfiguration = ( ); } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["Queue"] !== undefined) { - contents.QueueArn = - output["Queue"]["#text"] !== undefined - ? output["Queue"]["#text"] - : output["Queue"]; + contents.QueueArn = output["Queue"]; } return contents; }; @@ -15186,34 +14651,19 @@ const deserializeAws_restXmlRedirect = ( ReplaceKeyWith: undefined }; if (output["HostName"] !== undefined) { - contents.HostName = - output["HostName"]["#text"] !== undefined - ? output["HostName"]["#text"] - : output["HostName"]; + contents.HostName = output["HostName"]; } if (output["HttpRedirectCode"] !== undefined) { - contents.HttpRedirectCode = - output["HttpRedirectCode"]["#text"] !== undefined - ? output["HttpRedirectCode"]["#text"] - : output["HttpRedirectCode"]; + contents.HttpRedirectCode = output["HttpRedirectCode"]; } if (output["Protocol"] !== undefined) { - contents.Protocol = - output["Protocol"]["#text"] !== undefined - ? output["Protocol"]["#text"] - : output["Protocol"]; + contents.Protocol = output["Protocol"]; } if (output["ReplaceKeyPrefixWith"] !== undefined) { - contents.ReplaceKeyPrefixWith = - output["ReplaceKeyPrefixWith"]["#text"] !== undefined - ? output["ReplaceKeyPrefixWith"]["#text"] - : output["ReplaceKeyPrefixWith"]; + contents.ReplaceKeyPrefixWith = output["ReplaceKeyPrefixWith"]; } if (output["ReplaceKeyWith"] !== undefined) { - contents.ReplaceKeyWith = - output["ReplaceKeyWith"]["#text"] !== undefined - ? output["ReplaceKeyWith"]["#text"] - : output["ReplaceKeyWith"]; + contents.ReplaceKeyWith = output["ReplaceKeyWith"]; } return contents; }; @@ -15228,16 +14678,10 @@ const deserializeAws_restXmlRedirectAllRequestsTo = ( Protocol: undefined }; if (output["HostName"] !== undefined) { - contents.HostName = - output["HostName"]["#text"] !== undefined - ? output["HostName"]["#text"] - : output["HostName"]; + contents.HostName = output["HostName"]; } if (output["Protocol"] !== undefined) { - contents.Protocol = - output["Protocol"]["#text"] !== undefined - ? output["Protocol"]["#text"] - : output["Protocol"]; + contents.Protocol = output["Protocol"]; } return contents; }; @@ -15252,10 +14696,7 @@ const deserializeAws_restXmlReplicationConfiguration = ( Rules: undefined }; if (output["Role"] !== undefined) { - contents.Role = - output["Role"]["#text"] !== undefined - ? output["Role"]["#text"] - : output["Role"]; + contents.Role = output["Role"]; } if (output.Rule === "") { contents.Rules = []; @@ -15310,23 +14751,13 @@ const deserializeAws_restXmlReplicationRule = ( ); } if (output["ID"] !== undefined) { - contents.ID = - output["ID"]["#text"] !== undefined - ? output["ID"]["#text"] - : output["ID"]; + contents.ID = output["ID"]; } if (output["Prefix"] !== undefined) { - contents.Prefix = - output["Prefix"]["#text"] !== undefined - ? output["Prefix"]["#text"] - : output["Prefix"]; + contents.Prefix = output["Prefix"]; } if (output["Priority"] !== undefined) { - contents.Priority = parseInt( - output["Priority"]["#text"] !== undefined - ? output["Priority"]["#text"] - : output["Priority"] - ); + contents.Priority = parseInt(output["Priority"]); } if (output["SourceSelectionCriteria"] !== undefined) { contents.SourceSelectionCriteria = deserializeAws_restXmlSourceSelectionCriteria( @@ -15335,10 +14766,7 @@ const deserializeAws_restXmlReplicationRule = ( ); } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -15353,10 +14781,7 @@ const deserializeAws_restXmlReplicationRuleAndOperator = ( Tags: undefined }; if (output["Prefix"] !== undefined) { - contents.Prefix = - output["Prefix"]["#text"] !== undefined - ? output["Prefix"]["#text"] - : output["Prefix"]; + contents.Prefix = output["Prefix"]; } if (output.Tag === "") { contents.Tags = []; @@ -15387,10 +14812,7 @@ const deserializeAws_restXmlReplicationRuleFilter = ( ); } if (output["Prefix"] !== undefined) { - contents.Prefix = - output["Prefix"]["#text"] !== undefined - ? output["Prefix"]["#text"] - : output["Prefix"]; + contents.Prefix = output["Prefix"]; } if (output["Tag"] !== undefined) { contents.Tag = deserializeAws_restXmlTag(output["Tag"], context); @@ -15417,10 +14839,7 @@ const deserializeAws_restXmlReplicationTime = ( Time: undefined }; if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } if (output["Time"] !== undefined) { contents.Time = deserializeAws_restXmlReplicationTimeValue( @@ -15440,11 +14859,7 @@ const deserializeAws_restXmlReplicationTimeValue = ( Minutes: undefined }; if (output["Minutes"] !== undefined) { - contents.Minutes = parseInt( - output["Minutes"]["#text"] !== undefined - ? output["Minutes"]["#text"] - : output["Minutes"] - ); + contents.Minutes = parseInt(output["Minutes"]); } return contents; }; @@ -15511,10 +14926,7 @@ const deserializeAws_restXmlSSEKMS = ( KeyId: undefined }; if (output["KeyId"] !== undefined) { - contents.KeyId = - output["KeyId"]["#text"] !== undefined - ? output["KeyId"]["#text"] - : output["KeyId"]; + contents.KeyId = output["KeyId"]; } return contents; }; @@ -15539,16 +14951,10 @@ const deserializeAws_restXmlServerSideEncryptionByDefault = ( SSEAlgorithm: undefined }; if (output["KMSMasterKeyID"] !== undefined) { - contents.KMSMasterKeyID = - output["KMSMasterKeyID"]["#text"] !== undefined - ? output["KMSMasterKeyID"]["#text"] - : output["KMSMasterKeyID"]; + contents.KMSMasterKeyID = output["KMSMasterKeyID"]; } if (output["SSEAlgorithm"] !== undefined) { - contents.SSEAlgorithm = - output["SSEAlgorithm"]["#text"] !== undefined - ? output["SSEAlgorithm"]["#text"] - : output["SSEAlgorithm"]; + contents.SSEAlgorithm = output["SSEAlgorithm"]; } return contents; }; @@ -15625,10 +15031,7 @@ const deserializeAws_restXmlSseKmsEncryptedObjects = ( Status: undefined }; if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -15666,10 +15069,7 @@ const deserializeAws_restXmlStorageClassAnalysisDataExport = ( ); } if (output["OutputSchemaVersion"] !== undefined) { - contents.OutputSchemaVersion = - output["OutputSchemaVersion"]["#text"] !== undefined - ? output["OutputSchemaVersion"]["#text"] - : output["OutputSchemaVersion"]; + contents.OutputSchemaVersion = output["OutputSchemaVersion"]; } return contents; }; @@ -15684,16 +15084,10 @@ const deserializeAws_restXmlTag = ( Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -15723,10 +15117,7 @@ const deserializeAws_restXmlTargetGrant = ( ); } if (output["Permission"] !== undefined) { - contents.Permission = - output["Permission"]["#text"] !== undefined - ? output["Permission"]["#text"] - : output["Permission"]; + contents.Permission = output["Permission"]; } return contents; }; @@ -15767,16 +15158,10 @@ const deserializeAws_restXmlTopicConfiguration = ( ); } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["Topic"] !== undefined) { - contents.TopicArn = - output["Topic"]["#text"] !== undefined - ? output["Topic"]["#text"] - : output["Topic"]; + contents.TopicArn = output["Topic"]; } return contents; }; @@ -15804,17 +15189,10 @@ const deserializeAws_restXmlTransition = ( contents.Date = new Date(output["Date"]); } if (output["Days"] !== undefined) { - contents.Days = parseInt( - output["Days"]["#text"] !== undefined - ? output["Days"]["#text"] - : output["Days"] - ); + contents.Days = parseInt(output["Days"]); } if (output["StorageClass"] !== undefined) { - contents.StorageClass = - output["StorageClass"]["#text"] !== undefined - ? output["StorageClass"]["#text"] - : output["StorageClass"]; + contents.StorageClass = output["StorageClass"]; } return contents; }; @@ -15885,7 +15263,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/clients/client-ses/protocols/Aws_query.ts b/clients/client-ses/protocols/Aws_query.ts index f09fd98ed52a..bcc1c1fd98b4 100644 --- a/clients/client-ses/protocols/Aws_query.ts +++ b/clients/client-ses/protocols/Aws_query.ts @@ -498,7 +498,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -9302,10 +9303,7 @@ const deserializeAws_queryAccountSendingPausedException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9320,16 +9318,10 @@ const deserializeAws_queryAddHeaderAction = ( HeaderValue: undefined }; if (output["HeaderName"] !== undefined) { - contents.HeaderName = - output["HeaderName"]["#text"] !== undefined - ? output["HeaderName"]["#text"] - : output["HeaderName"]; + contents.HeaderName = output["HeaderName"]; } if (output["HeaderValue"] !== undefined) { - contents.HeaderValue = - output["HeaderValue"]["#text"] !== undefined - ? output["HeaderValue"]["#text"] - : output["HeaderValue"]; + contents.HeaderValue = output["HeaderValue"]; } return contents; }; @@ -9338,9 +9330,7 @@ const deserializeAws_queryAddressList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryAlreadyExistsException = ( @@ -9353,16 +9343,10 @@ const deserializeAws_queryAlreadyExistsException = ( message: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9380,34 +9364,19 @@ const deserializeAws_queryBounceAction = ( TopicArn: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } if (output["Sender"] !== undefined) { - contents.Sender = - output["Sender"]["#text"] !== undefined - ? output["Sender"]["#text"] - : output["Sender"]; + contents.Sender = output["Sender"]; } if (output["SmtpReplyCode"] !== undefined) { - contents.SmtpReplyCode = - output["SmtpReplyCode"]["#text"] !== undefined - ? output["SmtpReplyCode"]["#text"] - : output["SmtpReplyCode"]; + contents.SmtpReplyCode = output["SmtpReplyCode"]; } if (output["StatusCode"] !== undefined) { - contents.StatusCode = - output["StatusCode"]["#text"] !== undefined - ? output["StatusCode"]["#text"] - : output["StatusCode"]; + contents.StatusCode = output["StatusCode"]; } if (output["TopicArn"] !== undefined) { - contents.TopicArn = - output["TopicArn"]["#text"] !== undefined - ? output["TopicArn"]["#text"] - : output["TopicArn"]; + contents.TopicArn = output["TopicArn"]; } return contents; }; @@ -9423,22 +9392,13 @@ const deserializeAws_queryBulkEmailDestinationStatus = ( Status: undefined }; if (output["Error"] !== undefined) { - contents.Error = - output["Error"]["#text"] !== undefined - ? output["Error"]["#text"] - : output["Error"]; + contents.Error = output["Error"]; } if (output["MessageId"] !== undefined) { - contents.MessageId = - output["MessageId"]["#text"] !== undefined - ? output["MessageId"]["#text"] - : output["MessageId"]; + contents.MessageId = output["MessageId"]; } if (output["Status"] !== undefined) { - contents.Status = - output["Status"]["#text"] !== undefined - ? output["Status"]["#text"] - : output["Status"]; + contents.Status = output["Status"]; } return contents; }; @@ -9462,16 +9422,10 @@ const deserializeAws_queryCannotDeleteException = ( message: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9520,22 +9474,13 @@ const deserializeAws_queryCloudWatchDimensionConfiguration = ( DimensionValueSource: undefined }; if (output["DefaultDimensionValue"] !== undefined) { - contents.DefaultDimensionValue = - output["DefaultDimensionValue"]["#text"] !== undefined - ? output["DefaultDimensionValue"]["#text"] - : output["DefaultDimensionValue"]; + contents.DefaultDimensionValue = output["DefaultDimensionValue"]; } if (output["DimensionName"] !== undefined) { - contents.DimensionName = - output["DimensionName"]["#text"] !== undefined - ? output["DimensionName"]["#text"] - : output["DimensionName"]; + contents.DimensionName = output["DimensionName"]; } if (output["DimensionValueSource"] !== undefined) { - contents.DimensionValueSource = - output["DimensionValueSource"]["#text"] !== undefined - ? output["DimensionValueSource"]["#text"] - : output["DimensionValueSource"]; + contents.DimensionValueSource = output["DimensionValueSource"]; } return contents; }; @@ -9558,10 +9503,7 @@ const deserializeAws_queryConfigurationSet = ( Name: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } return contents; }; @@ -9576,16 +9518,10 @@ const deserializeAws_queryConfigurationSetAlreadyExistsException = ( message: undefined }; if (output["ConfigurationSetName"] !== undefined) { - contents.ConfigurationSetName = - output["ConfigurationSetName"]["#text"] !== undefined - ? output["ConfigurationSetName"]["#text"] - : output["ConfigurationSetName"]; + contents.ConfigurationSetName = output["ConfigurationSetName"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9600,16 +9536,10 @@ const deserializeAws_queryConfigurationSetDoesNotExistException = ( message: undefined }; if (output["ConfigurationSetName"] !== undefined) { - contents.ConfigurationSetName = - output["ConfigurationSetName"]["#text"] !== undefined - ? output["ConfigurationSetName"]["#text"] - : output["ConfigurationSetName"]; + contents.ConfigurationSetName = output["ConfigurationSetName"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9624,16 +9554,10 @@ const deserializeAws_queryConfigurationSetSendingPausedException = ( message: undefined }; if (output["ConfigurationSetName"] !== undefined) { - contents.ConfigurationSetName = - output["ConfigurationSetName"]["#text"] !== undefined - ? output["ConfigurationSetName"]["#text"] - : output["ConfigurationSetName"]; + contents.ConfigurationSetName = output["ConfigurationSetName"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9726,10 +9650,7 @@ const deserializeAws_queryCustomVerificationEmailInvalidContentException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9747,34 +9668,19 @@ const deserializeAws_queryCustomVerificationEmailTemplate = ( TemplateSubject: undefined }; if (output["FailureRedirectionURL"] !== undefined) { - contents.FailureRedirectionURL = - output["FailureRedirectionURL"]["#text"] !== undefined - ? output["FailureRedirectionURL"]["#text"] - : output["FailureRedirectionURL"]; + contents.FailureRedirectionURL = output["FailureRedirectionURL"]; } if (output["FromEmailAddress"] !== undefined) { - contents.FromEmailAddress = - output["FromEmailAddress"]["#text"] !== undefined - ? output["FromEmailAddress"]["#text"] - : output["FromEmailAddress"]; + contents.FromEmailAddress = output["FromEmailAddress"]; } if (output["SuccessRedirectionURL"] !== undefined) { - contents.SuccessRedirectionURL = - output["SuccessRedirectionURL"]["#text"] !== undefined - ? output["SuccessRedirectionURL"]["#text"] - : output["SuccessRedirectionURL"]; + contents.SuccessRedirectionURL = output["SuccessRedirectionURL"]; } if (output["TemplateName"] !== undefined) { - contents.TemplateName = - output["TemplateName"]["#text"] !== undefined - ? output["TemplateName"]["#text"] - : output["TemplateName"]; + contents.TemplateName = output["TemplateName"]; } if (output["TemplateSubject"] !== undefined) { - contents.TemplateSubject = - output["TemplateSubject"]["#text"] !== undefined - ? output["TemplateSubject"]["#text"] - : output["TemplateSubject"]; + contents.TemplateSubject = output["TemplateSubject"]; } return contents; }; @@ -9790,15 +9696,10 @@ const deserializeAws_queryCustomVerificationEmailTemplateAlreadyExistsException }; if (output["CustomVerificationEmailTemplateName"] !== undefined) { contents.CustomVerificationEmailTemplateName = - output["CustomVerificationEmailTemplateName"]["#text"] !== undefined - ? output["CustomVerificationEmailTemplateName"]["#text"] - : output["CustomVerificationEmailTemplateName"]; + output["CustomVerificationEmailTemplateName"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9814,15 +9715,10 @@ const deserializeAws_queryCustomVerificationEmailTemplateDoesNotExistException = }; if (output["CustomVerificationEmailTemplateName"] !== undefined) { contents.CustomVerificationEmailTemplateName = - output["CustomVerificationEmailTemplateName"]["#text"] !== undefined - ? output["CustomVerificationEmailTemplateName"]["#text"] - : output["CustomVerificationEmailTemplateName"]; + output["CustomVerificationEmailTemplateName"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -9935,10 +9831,7 @@ const deserializeAws_queryDeliveryOptions = ( TlsPolicy: undefined }; if (output["TlsPolicy"] !== undefined) { - contents.TlsPolicy = - output["TlsPolicy"]["#text"] !== undefined - ? output["TlsPolicy"]["#text"] - : output["TlsPolicy"]; + contents.TlsPolicy = output["TlsPolicy"]; } return contents; }; @@ -10101,10 +9994,7 @@ const deserializeAws_queryEventDestination = ( ); } if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } if (output["KinesisFirehoseDestination"] !== undefined) { contents.KinesisFirehoseDestination = deserializeAws_queryKinesisFirehoseDestination( @@ -10125,10 +10015,7 @@ const deserializeAws_queryEventDestination = ( ); } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["SNSDestination"] !== undefined) { contents.SNSDestination = deserializeAws_querySNSDestination( @@ -10150,22 +10037,13 @@ const deserializeAws_queryEventDestinationAlreadyExistsException = ( message: undefined }; if (output["ConfigurationSetName"] !== undefined) { - contents.ConfigurationSetName = - output["ConfigurationSetName"]["#text"] !== undefined - ? output["ConfigurationSetName"]["#text"] - : output["ConfigurationSetName"]; + contents.ConfigurationSetName = output["ConfigurationSetName"]; } if (output["EventDestinationName"] !== undefined) { - contents.EventDestinationName = - output["EventDestinationName"]["#text"] !== undefined - ? output["EventDestinationName"]["#text"] - : output["EventDestinationName"]; + contents.EventDestinationName = output["EventDestinationName"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10181,22 +10059,13 @@ const deserializeAws_queryEventDestinationDoesNotExistException = ( message: undefined }; if (output["ConfigurationSetName"] !== undefined) { - contents.ConfigurationSetName = - output["ConfigurationSetName"]["#text"] !== undefined - ? output["ConfigurationSetName"]["#text"] - : output["ConfigurationSetName"]; + contents.ConfigurationSetName = output["ConfigurationSetName"]; } if (output["EventDestinationName"] !== undefined) { - contents.EventDestinationName = - output["EventDestinationName"]["#text"] !== undefined - ? output["EventDestinationName"]["#text"] - : output["EventDestinationName"]; + contents.EventDestinationName = output["EventDestinationName"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10214,9 +10083,7 @@ const deserializeAws_queryEventTypes = ( output: any, context: __SerdeContext ): (EventType | string)[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryFromEmailAddressNotVerifiedException = ( @@ -10229,16 +10096,10 @@ const deserializeAws_queryFromEmailAddressNotVerifiedException = ( message: undefined }; if (output["FromEmailAddress"] !== undefined) { - contents.FromEmailAddress = - output["FromEmailAddress"]["#text"] !== undefined - ? output["FromEmailAddress"]["#text"] - : output["FromEmailAddress"]; + contents.FromEmailAddress = output["FromEmailAddress"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10252,10 +10113,7 @@ const deserializeAws_queryGetAccountSendingEnabledResponse = ( Enabled: undefined }; if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } return contents; }; @@ -10274,40 +10132,22 @@ const deserializeAws_queryGetCustomVerificationEmailTemplateResponse = ( TemplateSubject: undefined }; if (output["FailureRedirectionURL"] !== undefined) { - contents.FailureRedirectionURL = - output["FailureRedirectionURL"]["#text"] !== undefined - ? output["FailureRedirectionURL"]["#text"] - : output["FailureRedirectionURL"]; + contents.FailureRedirectionURL = output["FailureRedirectionURL"]; } if (output["FromEmailAddress"] !== undefined) { - contents.FromEmailAddress = - output["FromEmailAddress"]["#text"] !== undefined - ? output["FromEmailAddress"]["#text"] - : output["FromEmailAddress"]; + contents.FromEmailAddress = output["FromEmailAddress"]; } if (output["SuccessRedirectionURL"] !== undefined) { - contents.SuccessRedirectionURL = - output["SuccessRedirectionURL"]["#text"] !== undefined - ? output["SuccessRedirectionURL"]["#text"] - : output["SuccessRedirectionURL"]; + contents.SuccessRedirectionURL = output["SuccessRedirectionURL"]; } if (output["TemplateContent"] !== undefined) { - contents.TemplateContent = - output["TemplateContent"]["#text"] !== undefined - ? output["TemplateContent"]["#text"] - : output["TemplateContent"]; + contents.TemplateContent = output["TemplateContent"]; } if (output["TemplateName"] !== undefined) { - contents.TemplateName = - output["TemplateName"]["#text"] !== undefined - ? output["TemplateName"]["#text"] - : output["TemplateName"]; + contents.TemplateName = output["TemplateName"]; } if (output["TemplateSubject"] !== undefined) { - contents.TemplateSubject = - output["TemplateSubject"]["#text"] !== undefined - ? output["TemplateSubject"]["#text"] - : output["TemplateSubject"]; + contents.TemplateSubject = output["TemplateSubject"]; } return contents; }; @@ -10438,25 +10278,13 @@ const deserializeAws_queryGetSendQuotaResponse = ( SentLast24Hours: undefined }; if (output["Max24HourSend"] !== undefined) { - contents.Max24HourSend = parseFloat( - output["Max24HourSend"]["#text"] !== undefined - ? output["Max24HourSend"]["#text"] - : output["Max24HourSend"] - ); + contents.Max24HourSend = parseFloat(output["Max24HourSend"]); } if (output["MaxSendRate"] !== undefined) { - contents.MaxSendRate = parseFloat( - output["MaxSendRate"]["#text"] !== undefined - ? output["MaxSendRate"]["#text"] - : output["MaxSendRate"] - ); + contents.MaxSendRate = parseFloat(output["MaxSendRate"]); } if (output["SentLast24Hours"] !== undefined) { - contents.SentLast24Hours = parseFloat( - output["SentLast24Hours"]["#text"] !== undefined - ? output["SentLast24Hours"]["#text"] - : output["SentLast24Hours"] - ); + contents.SentLast24Hours = parseFloat(output["SentLast24Hours"]); } return contents; }; @@ -10512,10 +10340,7 @@ const deserializeAws_queryIdentityDkimAttributes = ( DkimVerificationStatus: undefined }; if (output["DkimEnabled"] !== undefined) { - contents.DkimEnabled = - (output["DkimEnabled"]["#text"] !== undefined - ? output["DkimEnabled"]["#text"] - : output["DkimEnabled"]) == "true"; + contents.DkimEnabled = output["DkimEnabled"] == "true"; } if (output.DkimTokens === "") { contents.DkimTokens = []; @@ -10530,10 +10355,7 @@ const deserializeAws_queryIdentityDkimAttributes = ( ); } if (output["DkimVerificationStatus"] !== undefined) { - contents.DkimVerificationStatus = - output["DkimVerificationStatus"]["#text"] !== undefined - ? output["DkimVerificationStatus"]["#text"] - : output["DkimVerificationStatus"]; + contents.DkimVerificationStatus = output["DkimVerificationStatus"]; } return contents; }; @@ -10542,9 +10364,7 @@ const deserializeAws_queryIdentityList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryIdentityMailFromDomainAttributes = ( @@ -10558,22 +10378,13 @@ const deserializeAws_queryIdentityMailFromDomainAttributes = ( MailFromDomainStatus: undefined }; if (output["BehaviorOnMXFailure"] !== undefined) { - contents.BehaviorOnMXFailure = - output["BehaviorOnMXFailure"]["#text"] !== undefined - ? output["BehaviorOnMXFailure"]["#text"] - : output["BehaviorOnMXFailure"]; + contents.BehaviorOnMXFailure = output["BehaviorOnMXFailure"]; } if (output["MailFromDomain"] !== undefined) { - contents.MailFromDomain = - output["MailFromDomain"]["#text"] !== undefined - ? output["MailFromDomain"]["#text"] - : output["MailFromDomain"]; + contents.MailFromDomain = output["MailFromDomain"]; } if (output["MailFromDomainStatus"] !== undefined) { - contents.MailFromDomainStatus = - output["MailFromDomainStatus"]["#text"] !== undefined - ? output["MailFromDomainStatus"]["#text"] - : output["MailFromDomainStatus"]; + contents.MailFromDomainStatus = output["MailFromDomainStatus"]; } return contents; }; @@ -10593,46 +10404,28 @@ const deserializeAws_queryIdentityNotificationAttributes = ( HeadersInDeliveryNotificationsEnabled: undefined }; if (output["BounceTopic"] !== undefined) { - contents.BounceTopic = - output["BounceTopic"]["#text"] !== undefined - ? output["BounceTopic"]["#text"] - : output["BounceTopic"]; + contents.BounceTopic = output["BounceTopic"]; } if (output["ComplaintTopic"] !== undefined) { - contents.ComplaintTopic = - output["ComplaintTopic"]["#text"] !== undefined - ? output["ComplaintTopic"]["#text"] - : output["ComplaintTopic"]; + contents.ComplaintTopic = output["ComplaintTopic"]; } if (output["DeliveryTopic"] !== undefined) { - contents.DeliveryTopic = - output["DeliveryTopic"]["#text"] !== undefined - ? output["DeliveryTopic"]["#text"] - : output["DeliveryTopic"]; + contents.DeliveryTopic = output["DeliveryTopic"]; } if (output["ForwardingEnabled"] !== undefined) { - contents.ForwardingEnabled = - (output["ForwardingEnabled"]["#text"] !== undefined - ? output["ForwardingEnabled"]["#text"] - : output["ForwardingEnabled"]) == "true"; + contents.ForwardingEnabled = output["ForwardingEnabled"] == "true"; } if (output["HeadersInBounceNotificationsEnabled"] !== undefined) { contents.HeadersInBounceNotificationsEnabled = - (output["HeadersInBounceNotificationsEnabled"]["#text"] !== undefined - ? output["HeadersInBounceNotificationsEnabled"]["#text"] - : output["HeadersInBounceNotificationsEnabled"]) == "true"; + output["HeadersInBounceNotificationsEnabled"] == "true"; } if (output["HeadersInComplaintNotificationsEnabled"] !== undefined) { contents.HeadersInComplaintNotificationsEnabled = - (output["HeadersInComplaintNotificationsEnabled"]["#text"] !== undefined - ? output["HeadersInComplaintNotificationsEnabled"]["#text"] - : output["HeadersInComplaintNotificationsEnabled"]) == "true"; + output["HeadersInComplaintNotificationsEnabled"] == "true"; } if (output["HeadersInDeliveryNotificationsEnabled"] !== undefined) { contents.HeadersInDeliveryNotificationsEnabled = - (output["HeadersInDeliveryNotificationsEnabled"]["#text"] !== undefined - ? output["HeadersInDeliveryNotificationsEnabled"]["#text"] - : output["HeadersInDeliveryNotificationsEnabled"]) == "true"; + output["HeadersInDeliveryNotificationsEnabled"] == "true"; } return contents; }; @@ -10647,16 +10440,10 @@ const deserializeAws_queryIdentityVerificationAttributes = ( VerificationToken: undefined }; if (output["VerificationStatus"] !== undefined) { - contents.VerificationStatus = - output["VerificationStatus"]["#text"] !== undefined - ? output["VerificationStatus"]["#text"] - : output["VerificationStatus"]; + contents.VerificationStatus = output["VerificationStatus"]; } if (output["VerificationToken"] !== undefined) { - contents.VerificationToken = - output["VerificationToken"]["#text"] !== undefined - ? output["VerificationToken"]["#text"] - : output["VerificationToken"]; + contents.VerificationToken = output["VerificationToken"]; } return contents; }; @@ -10672,22 +10459,13 @@ const deserializeAws_queryInvalidCloudWatchDestinationException = ( message: undefined }; if (output["ConfigurationSetName"] !== undefined) { - contents.ConfigurationSetName = - output["ConfigurationSetName"]["#text"] !== undefined - ? output["ConfigurationSetName"]["#text"] - : output["ConfigurationSetName"]; + contents.ConfigurationSetName = output["ConfigurationSetName"]; } if (output["EventDestinationName"] !== undefined) { - contents.EventDestinationName = - output["EventDestinationName"]["#text"] !== undefined - ? output["EventDestinationName"]["#text"] - : output["EventDestinationName"]; + contents.EventDestinationName = output["EventDestinationName"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10701,10 +10479,7 @@ const deserializeAws_queryInvalidConfigurationSetException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10718,10 +10493,7 @@ const deserializeAws_queryInvalidDeliveryOptionsException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10737,22 +10509,13 @@ const deserializeAws_queryInvalidFirehoseDestinationException = ( message: undefined }; if (output["ConfigurationSetName"] !== undefined) { - contents.ConfigurationSetName = - output["ConfigurationSetName"]["#text"] !== undefined - ? output["ConfigurationSetName"]["#text"] - : output["ConfigurationSetName"]; + contents.ConfigurationSetName = output["ConfigurationSetName"]; } if (output["EventDestinationName"] !== undefined) { - contents.EventDestinationName = - output["EventDestinationName"]["#text"] !== undefined - ? output["EventDestinationName"]["#text"] - : output["EventDestinationName"]; + contents.EventDestinationName = output["EventDestinationName"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10767,16 +10530,10 @@ const deserializeAws_queryInvalidLambdaFunctionException = ( message: undefined }; if (output["FunctionArn"] !== undefined) { - contents.FunctionArn = - output["FunctionArn"]["#text"] !== undefined - ? output["FunctionArn"]["#text"] - : output["FunctionArn"]; + contents.FunctionArn = output["FunctionArn"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10790,10 +10547,7 @@ const deserializeAws_queryInvalidPolicyException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10808,16 +10562,10 @@ const deserializeAws_queryInvalidRenderingParameterException = ( message: undefined }; if (output["TemplateName"] !== undefined) { - contents.TemplateName = - output["TemplateName"]["#text"] !== undefined - ? output["TemplateName"]["#text"] - : output["TemplateName"]; + contents.TemplateName = output["TemplateName"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10832,16 +10580,10 @@ const deserializeAws_queryInvalidS3ConfigurationException = ( message: undefined }; if (output["Bucket"] !== undefined) { - contents.Bucket = - output["Bucket"]["#text"] !== undefined - ? output["Bucket"]["#text"] - : output["Bucket"]; + contents.Bucket = output["Bucket"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10857,22 +10599,13 @@ const deserializeAws_queryInvalidSNSDestinationException = ( message: undefined }; if (output["ConfigurationSetName"] !== undefined) { - contents.ConfigurationSetName = - output["ConfigurationSetName"]["#text"] !== undefined - ? output["ConfigurationSetName"]["#text"] - : output["ConfigurationSetName"]; + contents.ConfigurationSetName = output["ConfigurationSetName"]; } if (output["EventDestinationName"] !== undefined) { - contents.EventDestinationName = - output["EventDestinationName"]["#text"] !== undefined - ? output["EventDestinationName"]["#text"] - : output["EventDestinationName"]; + contents.EventDestinationName = output["EventDestinationName"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10887,16 +10620,10 @@ const deserializeAws_queryInvalidSnsTopicException = ( message: undefined }; if (output["Topic"] !== undefined) { - contents.Topic = - output["Topic"]["#text"] !== undefined - ? output["Topic"]["#text"] - : output["Topic"]; + contents.Topic = output["Topic"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10911,16 +10638,10 @@ const deserializeAws_queryInvalidTemplateException = ( message: undefined }; if (output["TemplateName"] !== undefined) { - contents.TemplateName = - output["TemplateName"]["#text"] !== undefined - ? output["TemplateName"]["#text"] - : output["TemplateName"]; + contents.TemplateName = output["TemplateName"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10934,10 +10655,7 @@ const deserializeAws_queryInvalidTrackingOptionsException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -10952,16 +10670,10 @@ const deserializeAws_queryKinesisFirehoseDestination = ( IAMRoleARN: undefined }; if (output["DeliveryStreamARN"] !== undefined) { - contents.DeliveryStreamARN = - output["DeliveryStreamARN"]["#text"] !== undefined - ? output["DeliveryStreamARN"]["#text"] - : output["DeliveryStreamARN"]; + contents.DeliveryStreamARN = output["DeliveryStreamARN"]; } if (output["IAMRoleARN"] !== undefined) { - contents.IAMRoleARN = - output["IAMRoleARN"]["#text"] !== undefined - ? output["IAMRoleARN"]["#text"] - : output["IAMRoleARN"]; + contents.IAMRoleARN = output["IAMRoleARN"]; } return contents; }; @@ -10977,22 +10689,13 @@ const deserializeAws_queryLambdaAction = ( TopicArn: undefined }; if (output["FunctionArn"] !== undefined) { - contents.FunctionArn = - output["FunctionArn"]["#text"] !== undefined - ? output["FunctionArn"]["#text"] - : output["FunctionArn"]; + contents.FunctionArn = output["FunctionArn"]; } if (output["InvocationType"] !== undefined) { - contents.InvocationType = - output["InvocationType"]["#text"] !== undefined - ? output["InvocationType"]["#text"] - : output["InvocationType"]; + contents.InvocationType = output["InvocationType"]; } if (output["TopicArn"] !== undefined) { - contents.TopicArn = - output["TopicArn"]["#text"] !== undefined - ? output["TopicArn"]["#text"] - : output["TopicArn"]; + contents.TopicArn = output["TopicArn"]; } return contents; }; @@ -11006,10 +10709,7 @@ const deserializeAws_queryLimitExceededException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -11036,10 +10736,7 @@ const deserializeAws_queryListConfigurationSetsResponse = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -11068,10 +10765,7 @@ const deserializeAws_queryListCustomVerificationEmailTemplatesResponse = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -11098,10 +10792,7 @@ const deserializeAws_queryListIdentitiesResponse = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -11162,10 +10853,7 @@ const deserializeAws_queryListReceiptRuleSetsResponse = ( RuleSets: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.RuleSets === "") { contents.RuleSets = []; @@ -11192,10 +10880,7 @@ const deserializeAws_queryListTemplatesResponse = ( TemplatesMetadata: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.TemplatesMetadata === "") { contents.TemplatesMetadata = []; @@ -11257,10 +10942,7 @@ const deserializeAws_queryMailFromDomainNotVerifiedException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -11274,10 +10956,7 @@ const deserializeAws_queryMessageRejected = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -11292,16 +10971,10 @@ const deserializeAws_queryMissingRenderingAttributeException = ( message: undefined }; if (output["TemplateName"] !== undefined) { - contents.TemplateName = - output["TemplateName"]["#text"] !== undefined - ? output["TemplateName"]["#text"] - : output["TemplateName"]; + contents.TemplateName = output["TemplateName"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -11324,10 +10997,7 @@ const deserializeAws_queryPolicyMap = ( context: __SerdeContext ): { [key: string]: string } => { return output.reduce((acc: any, pair: any) => { - acc[pair["key"]] = - pair["value"]["#text"] !== undefined - ? pair["value"]["#text"] - : pair["value"]; + acc[pair["key"]] = pair["value"]; return acc; }, {}); }; @@ -11336,9 +11006,7 @@ const deserializeAws_queryPolicyNameList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryProductionAccessNotGrantedException = ( @@ -11350,10 +11018,7 @@ const deserializeAws_queryProductionAccessNotGrantedException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -11462,10 +11127,7 @@ const deserializeAws_queryReceiptFilter = ( ); } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } return contents; }; @@ -11489,16 +11151,10 @@ const deserializeAws_queryReceiptIpFilter = ( Policy: undefined }; if (output["Cidr"] !== undefined) { - contents.Cidr = - output["Cidr"]["#text"] !== undefined - ? output["Cidr"]["#text"] - : output["Cidr"]; + contents.Cidr = output["Cidr"]; } if (output["Policy"] !== undefined) { - contents.Policy = - output["Policy"]["#text"] !== undefined - ? output["Policy"]["#text"] - : output["Policy"]; + contents.Policy = output["Policy"]; } return contents; }; @@ -11529,16 +11185,10 @@ const deserializeAws_queryReceiptRule = ( ); } if (output["Enabled"] !== undefined) { - contents.Enabled = - (output["Enabled"]["#text"] !== undefined - ? output["Enabled"]["#text"] - : output["Enabled"]) == "true"; + contents.Enabled = output["Enabled"] == "true"; } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output.Recipients === "") { contents.Recipients = []; @@ -11553,16 +11203,10 @@ const deserializeAws_queryReceiptRule = ( ); } if (output["ScanEnabled"] !== undefined) { - contents.ScanEnabled = - (output["ScanEnabled"]["#text"] !== undefined - ? output["ScanEnabled"]["#text"] - : output["ScanEnabled"]) == "true"; + contents.ScanEnabled = output["ScanEnabled"] == "true"; } if (output["TlsPolicy"] !== undefined) { - contents.TlsPolicy = - output["TlsPolicy"]["#text"] !== undefined - ? output["TlsPolicy"]["#text"] - : output["TlsPolicy"]; + contents.TlsPolicy = output["TlsPolicy"]; } return contents; }; @@ -11580,10 +11224,7 @@ const deserializeAws_queryReceiptRuleSetMetadata = ( contents.CreatedTimestamp = new Date(output["CreatedTimestamp"]); } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } return contents; }; @@ -11610,9 +11251,7 @@ const deserializeAws_queryRecipientsList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryReorderReceiptRuleSetResponse = ( @@ -11640,15 +11279,10 @@ const deserializeAws_queryReputationOptions = ( } if (output["ReputationMetricsEnabled"] !== undefined) { contents.ReputationMetricsEnabled = - (output["ReputationMetricsEnabled"]["#text"] !== undefined - ? output["ReputationMetricsEnabled"]["#text"] - : output["ReputationMetricsEnabled"]) == "true"; + output["ReputationMetricsEnabled"] == "true"; } if (output["SendingEnabled"] !== undefined) { - contents.SendingEnabled = - (output["SendingEnabled"]["#text"] !== undefined - ? output["SendingEnabled"]["#text"] - : output["SendingEnabled"]) == "true"; + contents.SendingEnabled = output["SendingEnabled"] == "true"; } return contents; }; @@ -11663,16 +11297,10 @@ const deserializeAws_queryRuleDoesNotExistException = ( message: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -11687,16 +11315,10 @@ const deserializeAws_queryRuleSetDoesNotExistException = ( message: undefined }; if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -11713,28 +11335,16 @@ const deserializeAws_queryS3Action = ( TopicArn: undefined }; if (output["BucketName"] !== undefined) { - contents.BucketName = - output["BucketName"]["#text"] !== undefined - ? output["BucketName"]["#text"] - : output["BucketName"]; + contents.BucketName = output["BucketName"]; } if (output["KmsKeyArn"] !== undefined) { - contents.KmsKeyArn = - output["KmsKeyArn"]["#text"] !== undefined - ? output["KmsKeyArn"]["#text"] - : output["KmsKeyArn"]; + contents.KmsKeyArn = output["KmsKeyArn"]; } if (output["ObjectKeyPrefix"] !== undefined) { - contents.ObjectKeyPrefix = - output["ObjectKeyPrefix"]["#text"] !== undefined - ? output["ObjectKeyPrefix"]["#text"] - : output["ObjectKeyPrefix"]; + contents.ObjectKeyPrefix = output["ObjectKeyPrefix"]; } if (output["TopicArn"] !== undefined) { - contents.TopicArn = - output["TopicArn"]["#text"] !== undefined - ? output["TopicArn"]["#text"] - : output["TopicArn"]; + contents.TopicArn = output["TopicArn"]; } return contents; }; @@ -11749,16 +11359,10 @@ const deserializeAws_querySNSAction = ( TopicArn: undefined }; if (output["Encoding"] !== undefined) { - contents.Encoding = - output["Encoding"]["#text"] !== undefined - ? output["Encoding"]["#text"] - : output["Encoding"]; + contents.Encoding = output["Encoding"]; } if (output["TopicArn"] !== undefined) { - contents.TopicArn = - output["TopicArn"]["#text"] !== undefined - ? output["TopicArn"]["#text"] - : output["TopicArn"]; + contents.TopicArn = output["TopicArn"]; } return contents; }; @@ -11772,10 +11376,7 @@ const deserializeAws_querySNSDestination = ( TopicARN: undefined }; if (output["TopicARN"] !== undefined) { - contents.TopicARN = - output["TopicARN"]["#text"] !== undefined - ? output["TopicARN"]["#text"] - : output["TopicARN"]; + contents.TopicARN = output["TopicARN"]; } return contents; }; @@ -11789,10 +11390,7 @@ const deserializeAws_querySendBounceResponse = ( MessageId: undefined }; if (output["MessageId"] !== undefined) { - contents.MessageId = - output["MessageId"]["#text"] !== undefined - ? output["MessageId"]["#text"] - : output["MessageId"]; + contents.MessageId = output["MessageId"]; } return contents; }; @@ -11829,10 +11427,7 @@ const deserializeAws_querySendCustomVerificationEmailResponse = ( MessageId: undefined }; if (output["MessageId"] !== undefined) { - contents.MessageId = - output["MessageId"]["#text"] !== undefined - ? output["MessageId"]["#text"] - : output["MessageId"]; + contents.MessageId = output["MessageId"]; } return contents; }; @@ -11850,32 +11445,16 @@ const deserializeAws_querySendDataPoint = ( Timestamp: undefined }; if (output["Bounces"] !== undefined) { - contents.Bounces = parseInt( - output["Bounces"]["#text"] !== undefined - ? output["Bounces"]["#text"] - : output["Bounces"] - ); + contents.Bounces = parseInt(output["Bounces"]); } if (output["Complaints"] !== undefined) { - contents.Complaints = parseInt( - output["Complaints"]["#text"] !== undefined - ? output["Complaints"]["#text"] - : output["Complaints"] - ); + contents.Complaints = parseInt(output["Complaints"]); } if (output["DeliveryAttempts"] !== undefined) { - contents.DeliveryAttempts = parseInt( - output["DeliveryAttempts"]["#text"] !== undefined - ? output["DeliveryAttempts"]["#text"] - : output["DeliveryAttempts"] - ); + contents.DeliveryAttempts = parseInt(output["DeliveryAttempts"]); } if (output["Rejects"] !== undefined) { - contents.Rejects = parseInt( - output["Rejects"]["#text"] !== undefined - ? output["Rejects"]["#text"] - : output["Rejects"] - ); + contents.Rejects = parseInt(output["Rejects"]); } if (output["Timestamp"] !== undefined) { contents.Timestamp = new Date(output["Timestamp"]); @@ -11901,10 +11480,7 @@ const deserializeAws_querySendEmailResponse = ( MessageId: undefined }; if (output["MessageId"] !== undefined) { - contents.MessageId = - output["MessageId"]["#text"] !== undefined - ? output["MessageId"]["#text"] - : output["MessageId"]; + contents.MessageId = output["MessageId"]; } return contents; }; @@ -11918,10 +11494,7 @@ const deserializeAws_querySendRawEmailResponse = ( MessageId: undefined }; if (output["MessageId"] !== undefined) { - contents.MessageId = - output["MessageId"]["#text"] !== undefined - ? output["MessageId"]["#text"] - : output["MessageId"]; + contents.MessageId = output["MessageId"]; } return contents; }; @@ -11935,10 +11508,7 @@ const deserializeAws_querySendTemplatedEmailResponse = ( MessageId: undefined }; if (output["MessageId"] !== undefined) { - contents.MessageId = - output["MessageId"]["#text"] !== undefined - ? output["MessageId"]["#text"] - : output["MessageId"]; + contents.MessageId = output["MessageId"]; } return contents; }; @@ -12023,16 +11593,10 @@ const deserializeAws_queryStopAction = ( TopicArn: undefined }; if (output["Scope"] !== undefined) { - contents.Scope = - output["Scope"]["#text"] !== undefined - ? output["Scope"]["#text"] - : output["Scope"]; + contents.Scope = output["Scope"]; } if (output["TopicArn"] !== undefined) { - contents.TopicArn = - output["TopicArn"]["#text"] !== undefined - ? output["TopicArn"]["#text"] - : output["TopicArn"]; + contents.TopicArn = output["TopicArn"]; } return contents; }; @@ -12049,28 +11613,16 @@ const deserializeAws_queryTemplate = ( TextPart: undefined }; if (output["HtmlPart"] !== undefined) { - contents.HtmlPart = - output["HtmlPart"]["#text"] !== undefined - ? output["HtmlPart"]["#text"] - : output["HtmlPart"]; + contents.HtmlPart = output["HtmlPart"]; } if (output["SubjectPart"] !== undefined) { - contents.SubjectPart = - output["SubjectPart"]["#text"] !== undefined - ? output["SubjectPart"]["#text"] - : output["SubjectPart"]; + contents.SubjectPart = output["SubjectPart"]; } if (output["TemplateName"] !== undefined) { - contents.TemplateName = - output["TemplateName"]["#text"] !== undefined - ? output["TemplateName"]["#text"] - : output["TemplateName"]; + contents.TemplateName = output["TemplateName"]; } if (output["TextPart"] !== undefined) { - contents.TextPart = - output["TextPart"]["#text"] !== undefined - ? output["TextPart"]["#text"] - : output["TextPart"]; + contents.TextPart = output["TextPart"]; } return contents; }; @@ -12085,16 +11637,10 @@ const deserializeAws_queryTemplateDoesNotExistException = ( message: undefined }; if (output["TemplateName"] !== undefined) { - contents.TemplateName = - output["TemplateName"]["#text"] !== undefined - ? output["TemplateName"]["#text"] - : output["TemplateName"]; + contents.TemplateName = output["TemplateName"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -12112,10 +11658,7 @@ const deserializeAws_queryTemplateMetadata = ( contents.CreatedTimestamp = new Date(output["CreatedTimestamp"]); } if (output["Name"] !== undefined) { - contents.Name = - output["Name"]["#text"] !== undefined - ? output["Name"]["#text"] - : output["Name"]; + contents.Name = output["Name"]; } return contents; }; @@ -12138,10 +11681,7 @@ const deserializeAws_queryTestRenderTemplateResponse = ( RenderedTemplate: undefined }; if (output["RenderedTemplate"] !== undefined) { - contents.RenderedTemplate = - output["RenderedTemplate"]["#text"] !== undefined - ? output["RenderedTemplate"]["#text"] - : output["RenderedTemplate"]; + contents.RenderedTemplate = output["RenderedTemplate"]; } return contents; }; @@ -12155,10 +11695,7 @@ const deserializeAws_queryTrackingOptions = ( CustomRedirectDomain: undefined }; if (output["CustomRedirectDomain"] !== undefined) { - contents.CustomRedirectDomain = - output["CustomRedirectDomain"]["#text"] !== undefined - ? output["CustomRedirectDomain"]["#text"] - : output["CustomRedirectDomain"]; + contents.CustomRedirectDomain = output["CustomRedirectDomain"]; } return contents; }; @@ -12173,16 +11710,10 @@ const deserializeAws_queryTrackingOptionsAlreadyExistsException = ( message: undefined }; if (output["ConfigurationSetName"] !== undefined) { - contents.ConfigurationSetName = - output["ConfigurationSetName"]["#text"] !== undefined - ? output["ConfigurationSetName"]["#text"] - : output["ConfigurationSetName"]; + contents.ConfigurationSetName = output["ConfigurationSetName"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -12197,16 +11728,10 @@ const deserializeAws_queryTrackingOptionsDoesNotExistException = ( message: undefined }; if (output["ConfigurationSetName"] !== undefined) { - contents.ConfigurationSetName = - output["ConfigurationSetName"]["#text"] !== undefined - ? output["ConfigurationSetName"]["#text"] - : output["ConfigurationSetName"]; + contents.ConfigurationSetName = output["ConfigurationSetName"]; } if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -12268,9 +11793,7 @@ const deserializeAws_queryVerificationTokenList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryVerifyDomainDkimResponse = ( @@ -12305,10 +11828,7 @@ const deserializeAws_queryVerifyDomainIdentityResponse = ( VerificationToken: undefined }; if (output["VerificationToken"] !== undefined) { - contents.VerificationToken = - output["VerificationToken"]["#text"] !== undefined - ? output["VerificationToken"]["#text"] - : output["VerificationToken"]; + contents.VerificationToken = output["VerificationToken"]; } return contents; }; @@ -12333,16 +11853,10 @@ const deserializeAws_queryWorkmailAction = ( TopicArn: undefined }; if (output["OrganizationArn"] !== undefined) { - contents.OrganizationArn = - output["OrganizationArn"]["#text"] !== undefined - ? output["OrganizationArn"]["#text"] - : output["OrganizationArn"]; + contents.OrganizationArn = output["OrganizationArn"]; } if (output["TopicArn"] !== undefined) { - contents.TopicArn = - output["TopicArn"]["#text"] !== undefined - ? output["TopicArn"]["#text"] - : output["TopicArn"]; + contents.TopicArn = output["TopicArn"]; } return contents; }; @@ -12422,7 +11936,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/clients/client-sns/protocols/Aws_query.ts b/clients/client-sns/protocols/Aws_query.ts index 50fc6454ac02..9b229a34da9b 100644 --- a/clients/client-sns/protocols/Aws_query.ts +++ b/clients/client-sns/protocols/Aws_query.ts @@ -224,7 +224,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -5340,10 +5341,7 @@ const deserializeAws_queryAuthorizationErrorException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -5357,10 +5355,7 @@ const deserializeAws_queryCheckIfPhoneNumberIsOptedOutResponse = ( isOptedOut: undefined }; if (output["isOptedOut"] !== undefined) { - contents.isOptedOut = - (output["isOptedOut"]["#text"] !== undefined - ? output["isOptedOut"]["#text"] - : output["isOptedOut"]) == "true"; + contents.isOptedOut = output["isOptedOut"] == "true"; } return contents; }; @@ -5374,10 +5369,7 @@ const deserializeAws_queryConcurrentAccessException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -5391,10 +5383,7 @@ const deserializeAws_queryConfirmSubscriptionResponse = ( SubscriptionArn: undefined }; if (output["SubscriptionArn"] !== undefined) { - contents.SubscriptionArn = - output["SubscriptionArn"]["#text"] !== undefined - ? output["SubscriptionArn"]["#text"] - : output["SubscriptionArn"]; + contents.SubscriptionArn = output["SubscriptionArn"]; } return contents; }; @@ -5408,10 +5397,7 @@ const deserializeAws_queryCreateEndpointResponse = ( EndpointArn: undefined }; if (output["EndpointArn"] !== undefined) { - contents.EndpointArn = - output["EndpointArn"]["#text"] !== undefined - ? output["EndpointArn"]["#text"] - : output["EndpointArn"]; + contents.EndpointArn = output["EndpointArn"]; } return contents; }; @@ -5425,10 +5411,7 @@ const deserializeAws_queryCreatePlatformApplicationResponse = ( PlatformApplicationArn: undefined }; if (output["PlatformApplicationArn"] !== undefined) { - contents.PlatformApplicationArn = - output["PlatformApplicationArn"]["#text"] !== undefined - ? output["PlatformApplicationArn"]["#text"] - : output["PlatformApplicationArn"]; + contents.PlatformApplicationArn = output["PlatformApplicationArn"]; } return contents; }; @@ -5442,10 +5425,7 @@ const deserializeAws_queryCreateTopicResponse = ( TopicArn: undefined }; if (output["TopicArn"] !== undefined) { - contents.TopicArn = - output["TopicArn"]["#text"] !== undefined - ? output["TopicArn"]["#text"] - : output["TopicArn"]; + contents.TopicArn = output["TopicArn"]; } return contents; }; @@ -5472,10 +5452,7 @@ const deserializeAws_queryEndpoint = ( ); } if (output["EndpointArn"] !== undefined) { - contents.EndpointArn = - output["EndpointArn"]["#text"] !== undefined - ? output["EndpointArn"]["#text"] - : output["EndpointArn"]; + contents.EndpointArn = output["EndpointArn"]; } return contents; }; @@ -5489,10 +5466,7 @@ const deserializeAws_queryEndpointDisabledException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -5506,10 +5480,7 @@ const deserializeAws_queryFilterPolicyLimitExceededException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -5638,10 +5609,7 @@ const deserializeAws_queryInternalErrorException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -5655,10 +5623,7 @@ const deserializeAws_queryInvalidParameterException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -5672,10 +5637,7 @@ const deserializeAws_queryInvalidParameterValueException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -5689,10 +5651,7 @@ const deserializeAws_queryInvalidSecurityException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -5706,10 +5665,7 @@ const deserializeAws_queryKMSAccessDeniedException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -5723,10 +5679,7 @@ const deserializeAws_queryKMSDisabledException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -5740,10 +5693,7 @@ const deserializeAws_queryKMSInvalidStateException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -5757,10 +5707,7 @@ const deserializeAws_queryKMSNotFoundException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -5774,10 +5721,7 @@ const deserializeAws_queryKMSOptInRequired = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -5791,10 +5735,7 @@ const deserializeAws_queryKMSThrottlingException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -5821,10 +5762,7 @@ const deserializeAws_queryListEndpointsByPlatformApplicationResponse = ( ); } if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } return contents; }; @@ -5857,10 +5795,7 @@ const deserializeAws_queryListPhoneNumbersOptedOutResponse = ( phoneNumbers: undefined }; if (output["nextToken"] !== undefined) { - contents.nextToken = - output["nextToken"]["#text"] !== undefined - ? output["nextToken"]["#text"] - : output["nextToken"]; + contents.nextToken = output["nextToken"]; } if (output.phoneNumbers === "") { contents.phoneNumbers = []; @@ -5887,10 +5822,7 @@ const deserializeAws_queryListPlatformApplicationsResponse = ( PlatformApplications: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.PlatformApplications === "") { contents.PlatformApplications = []; @@ -5917,10 +5849,7 @@ const deserializeAws_queryListSubscriptionsByTopicResponse = ( Subscriptions: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.Subscriptions === "") { contents.Subscriptions = []; @@ -5947,10 +5876,7 @@ const deserializeAws_queryListSubscriptionsResponse = ( Subscriptions: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.Subscriptions === "") { contents.Subscriptions = []; @@ -5997,10 +5923,7 @@ const deserializeAws_queryListTopicsResponse = ( Topics: undefined }; if (output["NextToken"] !== undefined) { - contents.NextToken = - output["NextToken"]["#text"] !== undefined - ? output["NextToken"]["#text"] - : output["NextToken"]; + contents.NextToken = output["NextToken"]; } if (output.Topics === "") { contents.Topics = []; @@ -6022,10 +5945,7 @@ const deserializeAws_queryMapStringToString = ( context: __SerdeContext ): { [key: string]: string } => { return output.reduce((acc: any, pair: any) => { - acc[pair["key"]] = - pair["value"]["#text"] !== undefined - ? pair["value"]["#text"] - : pair["value"]; + acc[pair["key"]] = pair["value"]; return acc; }, {}); }; @@ -6039,10 +5959,7 @@ const deserializeAws_queryNotFoundException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -6061,9 +5978,7 @@ const deserializeAws_queryPhoneNumberList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryPlatformApplication = ( @@ -6088,10 +6003,7 @@ const deserializeAws_queryPlatformApplication = ( ); } if (output["PlatformApplicationArn"] !== undefined) { - contents.PlatformApplicationArn = - output["PlatformApplicationArn"]["#text"] !== undefined - ? output["PlatformApplicationArn"]["#text"] - : output["PlatformApplicationArn"]; + contents.PlatformApplicationArn = output["PlatformApplicationArn"]; } return contents; }; @@ -6105,10 +6017,7 @@ const deserializeAws_queryPlatformApplicationDisabledException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -6122,10 +6031,7 @@ const deserializeAws_queryPublishResponse = ( MessageId: undefined }; if (output["MessageId"] !== undefined) { - contents.MessageId = - output["MessageId"]["#text"] !== undefined - ? output["MessageId"]["#text"] - : output["MessageId"]; + contents.MessageId = output["MessageId"]; } return contents; }; @@ -6139,10 +6045,7 @@ const deserializeAws_queryResourceNotFoundException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -6166,10 +6069,7 @@ const deserializeAws_queryStaleTagException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -6183,10 +6083,7 @@ const deserializeAws_querySubscribeResponse = ( SubscriptionArn: undefined }; if (output["SubscriptionArn"] !== undefined) { - contents.SubscriptionArn = - output["SubscriptionArn"]["#text"] !== undefined - ? output["SubscriptionArn"]["#text"] - : output["SubscriptionArn"]; + contents.SubscriptionArn = output["SubscriptionArn"]; } return contents; }; @@ -6204,34 +6101,19 @@ const deserializeAws_querySubscription = ( TopicArn: undefined }; if (output["Endpoint"] !== undefined) { - contents.Endpoint = - output["Endpoint"]["#text"] !== undefined - ? output["Endpoint"]["#text"] - : output["Endpoint"]; + contents.Endpoint = output["Endpoint"]; } if (output["Owner"] !== undefined) { - contents.Owner = - output["Owner"]["#text"] !== undefined - ? output["Owner"]["#text"] - : output["Owner"]; + contents.Owner = output["Owner"]; } if (output["Protocol"] !== undefined) { - contents.Protocol = - output["Protocol"]["#text"] !== undefined - ? output["Protocol"]["#text"] - : output["Protocol"]; + contents.Protocol = output["Protocol"]; } if (output["SubscriptionArn"] !== undefined) { - contents.SubscriptionArn = - output["SubscriptionArn"]["#text"] !== undefined - ? output["SubscriptionArn"]["#text"] - : output["SubscriptionArn"]; + contents.SubscriptionArn = output["SubscriptionArn"]; } if (output["TopicArn"] !== undefined) { - contents.TopicArn = - output["TopicArn"]["#text"] !== undefined - ? output["TopicArn"]["#text"] - : output["TopicArn"]; + contents.TopicArn = output["TopicArn"]; } return contents; }; @@ -6241,10 +6123,7 @@ const deserializeAws_querySubscriptionAttributesMap = ( context: __SerdeContext ): { [key: string]: string } => { return output.reduce((acc: any, pair: any) => { - acc[pair["key"]] = - pair["value"]["#text"] !== undefined - ? pair["value"]["#text"] - : pair["value"]; + acc[pair["key"]] = pair["value"]; return acc; }, {}); }; @@ -6258,10 +6137,7 @@ const deserializeAws_querySubscriptionLimitExceededException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -6282,16 +6158,10 @@ const deserializeAws_queryTag = (output: any, context: __SerdeContext): Tag => { Value: undefined }; if (output["Key"] !== undefined) { - contents.Key = - output["Key"]["#text"] !== undefined - ? output["Key"]["#text"] - : output["Key"]; + contents.Key = output["Key"]; } if (output["Value"] !== undefined) { - contents.Value = - output["Value"]["#text"] !== undefined - ? output["Value"]["#text"] - : output["Value"]; + contents.Value = output["Value"]; } return contents; }; @@ -6305,10 +6175,7 @@ const deserializeAws_queryTagLimitExceededException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -6331,10 +6198,7 @@ const deserializeAws_queryTagPolicyException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -6358,10 +6222,7 @@ const deserializeAws_queryThrottledException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -6375,10 +6236,7 @@ const deserializeAws_queryTopic = ( TopicArn: undefined }; if (output["TopicArn"] !== undefined) { - contents.TopicArn = - output["TopicArn"]["#text"] !== undefined - ? output["TopicArn"]["#text"] - : output["TopicArn"]; + contents.TopicArn = output["TopicArn"]; } return contents; }; @@ -6388,10 +6246,7 @@ const deserializeAws_queryTopicAttributesMap = ( context: __SerdeContext ): { [key: string]: string } => { return output.reduce((acc: any, pair: any) => { - acc[pair["key"]] = - pair["value"]["#text"] !== undefined - ? pair["value"]["#text"] - : pair["value"]; + acc[pair["key"]] = pair["value"]; return acc; }, {}); }; @@ -6405,10 +6260,7 @@ const deserializeAws_queryTopicLimitExceededException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -6507,7 +6359,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/clients/client-sqs/protocols/Aws_query.ts b/clients/client-sqs/protocols/Aws_query.ts index 63c0326cac29..d377dbf4479b 100644 --- a/clients/client-sqs/protocols/Aws_query.ts +++ b/clients/client-sqs/protocols/Aws_query.ts @@ -145,7 +145,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -2869,28 +2870,16 @@ const deserializeAws_queryBatchResultErrorEntry = ( SenderFault: undefined }; if (output["Code"] !== undefined) { - contents.Code = - output["Code"]["#text"] !== undefined - ? output["Code"]["#text"] - : output["Code"]; + contents.Code = output["Code"]; } if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } if (output["SenderFault"] !== undefined) { - contents.SenderFault = - (output["SenderFault"]["#text"] !== undefined - ? output["SenderFault"]["#text"] - : output["SenderFault"]) == "true"; + contents.SenderFault = output["SenderFault"] == "true"; } return contents; }; @@ -2908,9 +2897,7 @@ const deserializeAws_queryBinaryList = ( output: any, context: __SerdeContext ): Uint8Array[] => { - return (output || []).map((entry: any) => - context.base64Decoder(entry["#text"] !== undefined ? entry["#text"] : entry) - ); + return (output || []).map((entry: any) => context.base64Decoder(entry)); }; const deserializeAws_queryChangeMessageVisibilityBatchResult = ( @@ -2952,10 +2939,7 @@ const deserializeAws_queryChangeMessageVisibilityBatchResultEntry = ( Id: undefined }; if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } return contents; }; @@ -2978,10 +2962,7 @@ const deserializeAws_queryCreateQueueResult = ( QueueUrl: undefined }; if (output["QueueUrl"] !== undefined) { - contents.QueueUrl = - output["QueueUrl"]["#text"] !== undefined - ? output["QueueUrl"]["#text"] - : output["QueueUrl"]; + contents.QueueUrl = output["QueueUrl"]; } return contents; }; @@ -3025,10 +3006,7 @@ const deserializeAws_queryDeleteMessageBatchResultEntry = ( Id: undefined }; if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } return contents; }; @@ -3081,10 +3059,7 @@ const deserializeAws_queryGetQueueUrlResult = ( QueueUrl: undefined }; if (output["QueueUrl"] !== undefined) { - contents.QueueUrl = - output["QueueUrl"]["#text"] !== undefined - ? output["QueueUrl"]["#text"] - : output["QueueUrl"]; + contents.QueueUrl = output["QueueUrl"]; } return contents; }; @@ -3213,22 +3188,13 @@ const deserializeAws_queryMessage = ( ); } if (output["Body"] !== undefined) { - contents.Body = - output["Body"]["#text"] !== undefined - ? output["Body"]["#text"] - : output["Body"]; + contents.Body = output["Body"]; } if (output["MD5OfBody"] !== undefined) { - contents.MD5OfBody = - output["MD5OfBody"]["#text"] !== undefined - ? output["MD5OfBody"]["#text"] - : output["MD5OfBody"]; + contents.MD5OfBody = output["MD5OfBody"]; } if (output["MD5OfMessageAttributes"] !== undefined) { - contents.MD5OfMessageAttributes = - output["MD5OfMessageAttributes"]["#text"] !== undefined - ? output["MD5OfMessageAttributes"]["#text"] - : output["MD5OfMessageAttributes"]; + contents.MD5OfMessageAttributes = output["MD5OfMessageAttributes"]; } if (output.MessageAttribute === "") { contents.MessageAttributes = {}; @@ -3240,16 +3206,10 @@ const deserializeAws_queryMessage = ( ); } if (output["MessageId"] !== undefined) { - contents.MessageId = - output["MessageId"]["#text"] !== undefined - ? output["MessageId"]["#text"] - : output["MessageId"]; + contents.MessageId = output["MessageId"]; } if (output["ReceiptHandle"] !== undefined) { - contents.ReceiptHandle = - output["ReceiptHandle"]["#text"] !== undefined - ? output["ReceiptHandle"]["#text"] - : output["ReceiptHandle"]; + contents.ReceiptHandle = output["ReceiptHandle"]; } return contents; }; @@ -3276,17 +3236,10 @@ const deserializeAws_queryMessageAttributeValue = ( ); } if (output["BinaryValue"] !== undefined) { - contents.BinaryValue = context.base64Decoder( - output["BinaryValue"]["#text"] !== undefined - ? output["BinaryValue"]["#text"] - : output["BinaryValue"] - ); + contents.BinaryValue = context.base64Decoder(output["BinaryValue"]); } if (output["DataType"] !== undefined) { - contents.DataType = - output["DataType"]["#text"] !== undefined - ? output["DataType"]["#text"] - : output["DataType"]; + contents.DataType = output["DataType"]; } if (output.StringListValue === "") { contents.StringListValues = []; @@ -3298,10 +3251,7 @@ const deserializeAws_queryMessageAttributeValue = ( ); } if (output["StringValue"] !== undefined) { - contents.StringValue = - output["StringValue"]["#text"] !== undefined - ? output["StringValue"]["#text"] - : output["StringValue"]; + contents.StringValue = output["StringValue"]; } return contents; }; @@ -3343,10 +3293,7 @@ const deserializeAws_queryMessageSystemAttributeMap = ( context: __SerdeContext ): { [key: string]: string } => { return output.reduce((acc: any, pair: any) => { - acc[pair["Name"]] = - pair["Value"]["#text"] !== undefined - ? pair["Value"]["#text"] - : pair["Value"]; + acc[pair["Name"]] = pair["Value"]; return acc; }, {}); }; @@ -3376,10 +3323,7 @@ const deserializeAws_queryQueueAttributeMap = ( context: __SerdeContext ): { [key: string]: string } => { return output.reduce((acc: any, pair: any) => { - acc[pair["Name"]] = - pair["Value"]["#text"] !== undefined - ? pair["Value"]["#text"] - : pair["Value"]; + acc[pair["Name"]] = pair["Value"]; return acc; }, {}); }; @@ -3418,9 +3362,7 @@ const deserializeAws_queryQueueUrlList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryReceiptHandleIsInvalid = ( @@ -3497,40 +3439,23 @@ const deserializeAws_querySendMessageBatchResultEntry = ( SequenceNumber: undefined }; if (output["Id"] !== undefined) { - contents.Id = - output["Id"]["#text"] !== undefined - ? output["Id"]["#text"] - : output["Id"]; + contents.Id = output["Id"]; } if (output["MD5OfMessageAttributes"] !== undefined) { - contents.MD5OfMessageAttributes = - output["MD5OfMessageAttributes"]["#text"] !== undefined - ? output["MD5OfMessageAttributes"]["#text"] - : output["MD5OfMessageAttributes"]; + contents.MD5OfMessageAttributes = output["MD5OfMessageAttributes"]; } if (output["MD5OfMessageBody"] !== undefined) { - contents.MD5OfMessageBody = - output["MD5OfMessageBody"]["#text"] !== undefined - ? output["MD5OfMessageBody"]["#text"] - : output["MD5OfMessageBody"]; + contents.MD5OfMessageBody = output["MD5OfMessageBody"]; } if (output["MD5OfMessageSystemAttributes"] !== undefined) { contents.MD5OfMessageSystemAttributes = - output["MD5OfMessageSystemAttributes"]["#text"] !== undefined - ? output["MD5OfMessageSystemAttributes"]["#text"] - : output["MD5OfMessageSystemAttributes"]; + output["MD5OfMessageSystemAttributes"]; } if (output["MessageId"] !== undefined) { - contents.MessageId = - output["MessageId"]["#text"] !== undefined - ? output["MessageId"]["#text"] - : output["MessageId"]; + contents.MessageId = output["MessageId"]; } if (output["SequenceNumber"] !== undefined) { - contents.SequenceNumber = - output["SequenceNumber"]["#text"] !== undefined - ? output["SequenceNumber"]["#text"] - : output["SequenceNumber"]; + contents.SequenceNumber = output["SequenceNumber"]; } return contents; }; @@ -3557,34 +3482,20 @@ const deserializeAws_querySendMessageResult = ( SequenceNumber: undefined }; if (output["MD5OfMessageAttributes"] !== undefined) { - contents.MD5OfMessageAttributes = - output["MD5OfMessageAttributes"]["#text"] !== undefined - ? output["MD5OfMessageAttributes"]["#text"] - : output["MD5OfMessageAttributes"]; + contents.MD5OfMessageAttributes = output["MD5OfMessageAttributes"]; } if (output["MD5OfMessageBody"] !== undefined) { - contents.MD5OfMessageBody = - output["MD5OfMessageBody"]["#text"] !== undefined - ? output["MD5OfMessageBody"]["#text"] - : output["MD5OfMessageBody"]; + contents.MD5OfMessageBody = output["MD5OfMessageBody"]; } if (output["MD5OfMessageSystemAttributes"] !== undefined) { contents.MD5OfMessageSystemAttributes = - output["MD5OfMessageSystemAttributes"]["#text"] !== undefined - ? output["MD5OfMessageSystemAttributes"]["#text"] - : output["MD5OfMessageSystemAttributes"]; + output["MD5OfMessageSystemAttributes"]; } if (output["MessageId"] !== undefined) { - contents.MessageId = - output["MessageId"]["#text"] !== undefined - ? output["MessageId"]["#text"] - : output["MessageId"]; + contents.MessageId = output["MessageId"]; } if (output["SequenceNumber"] !== undefined) { - contents.SequenceNumber = - output["SequenceNumber"]["#text"] !== undefined - ? output["SequenceNumber"]["#text"] - : output["SequenceNumber"]; + contents.SequenceNumber = output["SequenceNumber"]; } return contents; }; @@ -3593,9 +3504,7 @@ const deserializeAws_queryStringList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryTagMap = ( @@ -3603,10 +3512,7 @@ const deserializeAws_queryTagMap = ( context: __SerdeContext ): { [key: string]: string } => { return output.reduce((acc: any, pair: any) => { - acc[pair["Key"]] = - pair["Value"]["#text"] !== undefined - ? pair["Value"]["#text"] - : pair["Value"]; + acc[pair["Key"]] = pair["Value"]; return acc; }, {}); }; @@ -3706,7 +3612,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/clients/client-sts/protocols/Aws_query.ts b/clients/client-sts/protocols/Aws_query.ts index 1561397313d4..048770d63297 100644 --- a/clients/client-sts/protocols/Aws_query.ts +++ b/clients/client-sts/protocols/Aws_query.ts @@ -67,7 +67,8 @@ import { } from "@aws-sdk/protocol-http"; import { SmithyException as __SmithyException, - extendedEncodeURIComponent as __extendedEncodeURIComponent + extendedEncodeURIComponent as __extendedEncodeURIComponent, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -1300,11 +1301,7 @@ const deserializeAws_queryAssumeRoleResponse = ( ); } if (output["PackedPolicySize"] !== undefined) { - contents.PackedPolicySize = parseInt( - output["PackedPolicySize"]["#text"] !== undefined - ? output["PackedPolicySize"]["#text"] - : output["PackedPolicySize"] - ); + contents.PackedPolicySize = parseInt(output["PackedPolicySize"]); } return contents; }; @@ -1331,10 +1328,7 @@ const deserializeAws_queryAssumeRoleWithSAMLResponse = ( ); } if (output["Audience"] !== undefined) { - contents.Audience = - output["Audience"]["#text"] !== undefined - ? output["Audience"]["#text"] - : output["Audience"]; + contents.Audience = output["Audience"]; } if (output["Credentials"] !== undefined) { contents.Credentials = deserializeAws_queryCredentials( @@ -1343,35 +1337,19 @@ const deserializeAws_queryAssumeRoleWithSAMLResponse = ( ); } if (output["Issuer"] !== undefined) { - contents.Issuer = - output["Issuer"]["#text"] !== undefined - ? output["Issuer"]["#text"] - : output["Issuer"]; + contents.Issuer = output["Issuer"]; } if (output["NameQualifier"] !== undefined) { - contents.NameQualifier = - output["NameQualifier"]["#text"] !== undefined - ? output["NameQualifier"]["#text"] - : output["NameQualifier"]; + contents.NameQualifier = output["NameQualifier"]; } if (output["PackedPolicySize"] !== undefined) { - contents.PackedPolicySize = parseInt( - output["PackedPolicySize"]["#text"] !== undefined - ? output["PackedPolicySize"]["#text"] - : output["PackedPolicySize"] - ); + contents.PackedPolicySize = parseInt(output["PackedPolicySize"]); } if (output["Subject"] !== undefined) { - contents.Subject = - output["Subject"]["#text"] !== undefined - ? output["Subject"]["#text"] - : output["Subject"]; + contents.Subject = output["Subject"]; } if (output["SubjectType"] !== undefined) { - contents.SubjectType = - output["SubjectType"]["#text"] !== undefined - ? output["SubjectType"]["#text"] - : output["SubjectType"]; + contents.SubjectType = output["SubjectType"]; } return contents; }; @@ -1396,10 +1374,7 @@ const deserializeAws_queryAssumeRoleWithWebIdentityResponse = ( ); } if (output["Audience"] !== undefined) { - contents.Audience = - output["Audience"]["#text"] !== undefined - ? output["Audience"]["#text"] - : output["Audience"]; + contents.Audience = output["Audience"]; } if (output["Credentials"] !== undefined) { contents.Credentials = deserializeAws_queryCredentials( @@ -1408,23 +1383,14 @@ const deserializeAws_queryAssumeRoleWithWebIdentityResponse = ( ); } if (output["PackedPolicySize"] !== undefined) { - contents.PackedPolicySize = parseInt( - output["PackedPolicySize"]["#text"] !== undefined - ? output["PackedPolicySize"]["#text"] - : output["PackedPolicySize"] - ); + contents.PackedPolicySize = parseInt(output["PackedPolicySize"]); } if (output["Provider"] !== undefined) { - contents.Provider = - output["Provider"]["#text"] !== undefined - ? output["Provider"]["#text"] - : output["Provider"]; + contents.Provider = output["Provider"]; } if (output["SubjectFromWebIdentityToken"] !== undefined) { contents.SubjectFromWebIdentityToken = - output["SubjectFromWebIdentityToken"]["#text"] !== undefined - ? output["SubjectFromWebIdentityToken"]["#text"] - : output["SubjectFromWebIdentityToken"]; + output["SubjectFromWebIdentityToken"]; } return contents; }; @@ -1439,16 +1405,10 @@ const deserializeAws_queryAssumedRoleUser = ( AssumedRoleId: undefined }; if (output["Arn"] !== undefined) { - contents.Arn = - output["Arn"]["#text"] !== undefined - ? output["Arn"]["#text"] - : output["Arn"]; + contents.Arn = output["Arn"]; } if (output["AssumedRoleId"] !== undefined) { - contents.AssumedRoleId = - output["AssumedRoleId"]["#text"] !== undefined - ? output["AssumedRoleId"]["#text"] - : output["AssumedRoleId"]; + contents.AssumedRoleId = output["AssumedRoleId"]; } return contents; }; @@ -1465,25 +1425,16 @@ const deserializeAws_queryCredentials = ( SessionToken: undefined }; if (output["AccessKeyId"] !== undefined) { - contents.AccessKeyId = - output["AccessKeyId"]["#text"] !== undefined - ? output["AccessKeyId"]["#text"] - : output["AccessKeyId"]; + contents.AccessKeyId = output["AccessKeyId"]; } if (output["Expiration"] !== undefined) { contents.Expiration = new Date(output["Expiration"]); } if (output["SecretAccessKey"] !== undefined) { - contents.SecretAccessKey = - output["SecretAccessKey"]["#text"] !== undefined - ? output["SecretAccessKey"]["#text"] - : output["SecretAccessKey"]; + contents.SecretAccessKey = output["SecretAccessKey"]; } if (output["SessionToken"] !== undefined) { - contents.SessionToken = - output["SessionToken"]["#text"] !== undefined - ? output["SessionToken"]["#text"] - : output["SessionToken"]; + contents.SessionToken = output["SessionToken"]; } return contents; }; @@ -1497,10 +1448,7 @@ const deserializeAws_queryDecodeAuthorizationMessageResponse = ( DecodedMessage: undefined }; if (output["DecodedMessage"] !== undefined) { - contents.DecodedMessage = - output["DecodedMessage"]["#text"] !== undefined - ? output["DecodedMessage"]["#text"] - : output["DecodedMessage"]; + contents.DecodedMessage = output["DecodedMessage"]; } return contents; }; @@ -1514,10 +1462,7 @@ const deserializeAws_queryExpiredTokenException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -1532,16 +1477,10 @@ const deserializeAws_queryFederatedUser = ( FederatedUserId: undefined }; if (output["Arn"] !== undefined) { - contents.Arn = - output["Arn"]["#text"] !== undefined - ? output["Arn"]["#text"] - : output["Arn"]; + contents.Arn = output["Arn"]; } if (output["FederatedUserId"] !== undefined) { - contents.FederatedUserId = - output["FederatedUserId"]["#text"] !== undefined - ? output["FederatedUserId"]["#text"] - : output["FederatedUserId"]; + contents.FederatedUserId = output["FederatedUserId"]; } return contents; }; @@ -1555,10 +1494,7 @@ const deserializeAws_queryGetAccessKeyInfoResponse = ( Account: undefined }; if (output["Account"] !== undefined) { - contents.Account = - output["Account"]["#text"] !== undefined - ? output["Account"]["#text"] - : output["Account"]; + contents.Account = output["Account"]; } return contents; }; @@ -1574,22 +1510,13 @@ const deserializeAws_queryGetCallerIdentityResponse = ( UserId: undefined }; if (output["Account"] !== undefined) { - contents.Account = - output["Account"]["#text"] !== undefined - ? output["Account"]["#text"] - : output["Account"]; + contents.Account = output["Account"]; } if (output["Arn"] !== undefined) { - contents.Arn = - output["Arn"]["#text"] !== undefined - ? output["Arn"]["#text"] - : output["Arn"]; + contents.Arn = output["Arn"]; } if (output["UserId"] !== undefined) { - contents.UserId = - output["UserId"]["#text"] !== undefined - ? output["UserId"]["#text"] - : output["UserId"]; + contents.UserId = output["UserId"]; } return contents; }; @@ -1617,11 +1544,7 @@ const deserializeAws_queryGetFederationTokenResponse = ( ); } if (output["PackedPolicySize"] !== undefined) { - contents.PackedPolicySize = parseInt( - output["PackedPolicySize"]["#text"] !== undefined - ? output["PackedPolicySize"]["#text"] - : output["PackedPolicySize"] - ); + contents.PackedPolicySize = parseInt(output["PackedPolicySize"]); } return contents; }; @@ -1652,10 +1575,7 @@ const deserializeAws_queryIDPCommunicationErrorException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -1669,10 +1589,7 @@ const deserializeAws_queryIDPRejectedClaimException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -1686,10 +1603,7 @@ const deserializeAws_queryInvalidAuthorizationMessageException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -1703,10 +1617,7 @@ const deserializeAws_queryInvalidIdentityTokenException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -1720,10 +1631,7 @@ const deserializeAws_queryMalformedPolicyDocumentException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -1737,10 +1645,7 @@ const deserializeAws_queryPackedPolicyTooLargeException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -1754,10 +1659,7 @@ const deserializeAws_queryRegionDisabledException = ( message: undefined }; if (output["message"] !== undefined) { - contents.message = - output["message"]["#text"] !== undefined - ? output["message"]["#text"] - : output["message"]; + contents.message = output["message"]; } return contents; }; @@ -1837,7 +1739,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AwsProtocolUtils.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AwsProtocolUtils.java index c66d1a8ae294..5b32c05a3dff 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AwsProtocolUtils.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AwsProtocolUtils.java @@ -125,6 +125,7 @@ static void generateXmlParseBody(GenerationContext context) { // Include an XML body parser used to deserialize documents from HTTP responses. writer.addImport("SerdeContext", "__SerdeContext", "@aws-sdk/types"); + writer.addImport("getValueFromTextNode", "__getValueFromTextNode", "@aws-sdk/smithy-client"); writer.addDependency(AwsDependency.XML_PARSER); writer.addImport("parse", "xmlParse", "fast-xml-parser"); writer.openBlock("const parseBody = (streamBody: any, context: __SerdeContext): any => collectBodyString(streamBody, context).then(encoded => {", @@ -141,7 +142,7 @@ static void generateXmlParseBody(GenerationContext context) { writer.write("parsedObjToReturn[key] = parsedObjToReturn[textNodeName];"); writer.write("delete parsedObjToReturn[textNodeName];"); }); - writer.write("return parsedObjToReturn;"); + writer.write("return __getValueFromTextNode(parsedObjToReturn);"); }); writer.write("return {};"); } diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/XmlMemberDeserVisitor.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/XmlMemberDeserVisitor.java index b4b6937d2334..ae7dccc7938a 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/XmlMemberDeserVisitor.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/XmlMemberDeserVisitor.java @@ -51,31 +51,9 @@ final class XmlMemberDeserVisitor extends DocumentMemberDeserVisitor { super(context, dataSource, defaultTimestampFormat); } - @Override - public String stringShape(StringShape shape) { - return getSafeDataSource(); - } - - /** - * Provides a data source safety mechanism to handle nodes that are - * expected to have only a value but were loaded from a node with - * a namespace. - * - * @return The node's value having handled a potential namespace. - */ - private String getSafeDataSource() { - String dataSource = getDataSource(); - return "((" + dataSource + "['#text'] !== undefined) ? " + dataSource + "['#text'] : " + dataSource + ")"; - } - - @Override - public String blobShape(BlobShape shape) { - return "context.base64Decoder(" + getSafeDataSource() + ")"; - } - @Override public String booleanShape(BooleanShape shape) { - return getSafeDataSource() + " == 'true'"; + return getDataSource() + " == 'true'"; } @Override @@ -99,7 +77,7 @@ public String longShape(LongShape shape) { } private String deserializeInt() { - return "parseInt(" + getSafeDataSource() + ")"; + return "parseInt(" + getDataSource() + ")"; } @Override @@ -113,7 +91,7 @@ public String doubleShape(DoubleShape shape) { } private String deserializeFloat() { - return "parseFloat(" + getSafeDataSource() + ")"; + return "parseFloat(" + getDataSource() + ")"; } @Override diff --git a/packages/smithy-client/src/get-value-from-text-node.spec.ts b/packages/smithy-client/src/get-value-from-text-node.spec.ts new file mode 100644 index 000000000000..f1899e4091e9 --- /dev/null +++ b/packages/smithy-client/src/get-value-from-text-node.spec.ts @@ -0,0 +1,56 @@ +import { getValueFromTextNode } from "./get-value-from-text-node"; + +describe("getValueFromTextNode", () => { + const valueInsideTextNode = "valueInsideTextNode"; + + it("doesn't modify object if #text is absent", () => { + const input = { + key: "value", + keyObj: { + keyInsideObj: "valueInsideObj" + } + }; + const output = getValueFromTextNode(input); + expect(output).toBe(input); + }); + + it("populates key with value in #text at first level", () => { + const input = { + key: "value", + keyWithoutTextNode: { + key: "value" + }, + keyWithTextNode: { + "#text": valueInsideTextNode + } + }; + const output = getValueFromTextNode(input); + expect(output.key).toBe(input.key); + expect(output.keyWithoutTextNode).toBe(input.keyWithoutTextNode); + expect(output.keyWithTextNode).toBe(valueInsideTextNode); + }); + + it("populates key with value in #text at second level", () => { + const input = { + key: "value", + keyWithoutTextNodeAtAnyLevel: { + keyObj: { + key: "value" + } + }, + keyWithTextNodeAtLevel2: { + keyWithTextNode: { + "#text": valueInsideTextNode + } + } + }; + const output = getValueFromTextNode(input); + expect(output.key).toBe(input.key); + expect(output.keyWithoutTextNodeAtAnyLevel).toBe( + input.keyWithoutTextNodeAtAnyLevel + ); + expect(output.keyWithTextNodeAtLevel2.keyWithTextNode).toBe( + valueInsideTextNode + ); + }); +}); diff --git a/packages/smithy-client/src/get-value-from-text-node.ts b/packages/smithy-client/src/get-value-from-text-node.ts new file mode 100644 index 000000000000..e306e1964aba --- /dev/null +++ b/packages/smithy-client/src/get-value-from-text-node.ts @@ -0,0 +1,15 @@ +/** + * Recursively parses object and populates value is node from + * "#text" key if it's available + */ +export const getValueFromTextNode = (obj: any) => { + const textNodeName = "#text"; + for (const key in obj) { + if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== undefined) { + obj[key] = obj[key][textNodeName]; + } else if (typeof obj[key] === "object" && obj[key] !== null) { + obj[key] = getValueFromTextNode(obj[key]); + } + } + return obj; +}; diff --git a/packages/smithy-client/src/index.ts b/packages/smithy-client/src/index.ts index 40be6396aca6..5ba60c52bea3 100644 --- a/packages/smithy-client/src/index.ts +++ b/packages/smithy-client/src/index.ts @@ -4,6 +4,7 @@ export * from "./document-type"; export * from "./exception"; export * from "./extended-encode-uri-component"; export * from "./get-array-if-single-item"; +export * from "./get-value-from-text-node"; export * from "./isa"; export * from "./lazy-json"; export * from "./date-utils"; diff --git a/protocol_tests/aws-ec2/protocols/Aws_ec2.ts b/protocol_tests/aws-ec2/protocols/Aws_ec2.ts index 69be1420902d..658d6ffd1177 100644 --- a/protocol_tests/aws-ec2/protocols/Aws_ec2.ts +++ b/protocol_tests/aws-ec2/protocols/Aws_ec2.ts @@ -98,7 +98,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -1470,10 +1471,7 @@ const deserializeAws_ec2ComplexError = ( ); } if (output["TopLevel"] !== undefined) { - contents.TopLevel = - output["TopLevel"]["#text"] !== undefined - ? output["TopLevel"]["#text"] - : output["TopLevel"]; + contents.TopLevel = output["TopLevel"]; } return contents; }; @@ -1487,10 +1485,7 @@ const deserializeAws_ec2ComplexNestedErrorData = ( Foo: undefined }; if (output["Foo"] !== undefined) { - contents.Foo = - output["Foo"]["#text"] !== undefined - ? output["Foo"]["#text"] - : output["Foo"]; + contents.Foo = output["Foo"]; } return contents; }; @@ -1514,10 +1509,7 @@ const deserializeAws_ec2GreetingWithErrorsOutput = ( greeting: undefined }; if (output["greeting"] !== undefined) { - contents.greeting = - output["greeting"]["#text"] !== undefined - ? output["greeting"]["#text"] - : output["greeting"]; + contents.greeting = output["greeting"]; } return contents; }; @@ -1531,10 +1523,7 @@ const deserializeAws_ec2IgnoresWrappingXmlNameOutput = ( foo: undefined }; if (output["foo"] !== undefined) { - contents.foo = - output["foo"]["#text"] !== undefined - ? output["foo"]["#text"] - : output["foo"]; + contents.foo = output["foo"]; } return contents; }; @@ -1548,10 +1537,7 @@ const deserializeAws_ec2InvalidGreeting = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -1593,10 +1579,7 @@ const deserializeAws_ec2RecursiveXmlShapesOutputNested1 = ( nested: undefined }; if (output["foo"] !== undefined) { - contents.foo = - output["foo"]["#text"] !== undefined - ? output["foo"]["#text"] - : output["foo"]; + contents.foo = output["foo"]; } if (output["nested"] !== undefined) { contents.nested = deserializeAws_ec2RecursiveXmlShapesOutputNested2( @@ -1617,10 +1600,7 @@ const deserializeAws_ec2RecursiveXmlShapesOutputNested2 = ( recursiveMember: undefined }; if (output["bar"] !== undefined) { - contents.bar = - output["bar"]["#text"] !== undefined - ? output["bar"]["#text"] - : output["bar"]; + contents.bar = output["bar"]; } if (output["recursiveMember"] !== undefined) { contents.recursiveMember = deserializeAws_ec2RecursiveXmlShapesOutputNested1( @@ -1635,9 +1615,7 @@ const deserializeAws_ec2RenamedListMembers = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2SimpleScalarXmlPropertiesOutput = ( @@ -1658,70 +1636,34 @@ const deserializeAws_ec2SimpleScalarXmlPropertiesOutput = ( trueBooleanValue: undefined }; if (output["byteValue"] !== undefined) { - contents.byteValue = parseInt( - output["byteValue"]["#text"] !== undefined - ? output["byteValue"]["#text"] - : output["byteValue"] - ); + contents.byteValue = parseInt(output["byteValue"]); } if (output["DoubleDribble"] !== undefined) { - contents.doubleValue = parseFloat( - output["DoubleDribble"]["#text"] !== undefined - ? output["DoubleDribble"]["#text"] - : output["DoubleDribble"] - ); + contents.doubleValue = parseFloat(output["DoubleDribble"]); } if (output["emptyStringValue"] !== undefined) { - contents.emptyStringValue = - output["emptyStringValue"]["#text"] !== undefined - ? output["emptyStringValue"]["#text"] - : output["emptyStringValue"]; + contents.emptyStringValue = output["emptyStringValue"]; } if (output["falseBooleanValue"] !== undefined) { - contents.falseBooleanValue = - (output["falseBooleanValue"]["#text"] !== undefined - ? output["falseBooleanValue"]["#text"] - : output["falseBooleanValue"]) == "true"; + contents.falseBooleanValue = output["falseBooleanValue"] == "true"; } if (output["floatValue"] !== undefined) { - contents.floatValue = parseFloat( - output["floatValue"]["#text"] !== undefined - ? output["floatValue"]["#text"] - : output["floatValue"] - ); + contents.floatValue = parseFloat(output["floatValue"]); } if (output["integerValue"] !== undefined) { - contents.integerValue = parseInt( - output["integerValue"]["#text"] !== undefined - ? output["integerValue"]["#text"] - : output["integerValue"] - ); + contents.integerValue = parseInt(output["integerValue"]); } if (output["longValue"] !== undefined) { - contents.longValue = parseInt( - output["longValue"]["#text"] !== undefined - ? output["longValue"]["#text"] - : output["longValue"] - ); + contents.longValue = parseInt(output["longValue"]); } if (output["shortValue"] !== undefined) { - contents.shortValue = parseInt( - output["shortValue"]["#text"] !== undefined - ? output["shortValue"]["#text"] - : output["shortValue"] - ); + contents.shortValue = parseInt(output["shortValue"]); } if (output["stringValue"] !== undefined) { - contents.stringValue = - output["stringValue"]["#text"] !== undefined - ? output["stringValue"]["#text"] - : output["stringValue"]; + contents.stringValue = output["stringValue"]; } if (output["trueBooleanValue"] !== undefined) { - contents.trueBooleanValue = - (output["trueBooleanValue"]["#text"] !== undefined - ? output["trueBooleanValue"]["#text"] - : output["trueBooleanValue"]) == "true"; + contents.trueBooleanValue = output["trueBooleanValue"] == "true"; } return contents; }; @@ -1745,16 +1687,10 @@ const deserializeAws_ec2StructureListMember = ( b: undefined }; if (output["value"] !== undefined) { - contents.a = - output["value"]["#text"] !== undefined - ? output["value"]["#text"] - : output["value"]; + contents.a = output["value"]; } if (output["other"] !== undefined) { - contents.b = - output["other"]["#text"] !== undefined - ? output["other"]["#text"] - : output["other"]; + contents.b = output["other"]; } return contents; }; @@ -1768,11 +1704,7 @@ const deserializeAws_ec2XmlBlobsOutput = ( data: undefined }; if (output["data"] !== undefined) { - contents.data = context.base64Decoder( - output["data"]["#text"] !== undefined - ? output["data"]["#text"] - : output["data"] - ); + contents.data = context.base64Decoder(output["data"]); } return contents; }; @@ -1791,22 +1723,13 @@ const deserializeAws_ec2XmlEnumsOutput = ( fooEnumSet: undefined }; if (output["fooEnum1"] !== undefined) { - contents.fooEnum1 = - output["fooEnum1"]["#text"] !== undefined - ? output["fooEnum1"]["#text"] - : output["fooEnum1"]; + contents.fooEnum1 = output["fooEnum1"]; } if (output["fooEnum2"] !== undefined) { - contents.fooEnum2 = - output["fooEnum2"]["#text"] !== undefined - ? output["fooEnum2"]["#text"] - : output["fooEnum2"]; + contents.fooEnum2 = output["fooEnum2"]; } if (output["fooEnum3"] !== undefined) { - contents.fooEnum3 = - output["fooEnum3"]["#text"] !== undefined - ? output["fooEnum3"]["#text"] - : output["fooEnum3"]; + contents.fooEnum3 = output["fooEnum3"]; } if (output.fooEnumList === "") { contents.fooEnumList = []; @@ -2004,10 +1927,7 @@ const deserializeAws_ec2XmlNamespaceNested = ( values: undefined }; if (output["foo"] !== undefined) { - contents.foo = - output["foo"]["#text"] !== undefined - ? output["foo"]["#text"] - : output["foo"]; + contents.foo = output["foo"]; } if (output.values === "") { contents.values = []; @@ -2028,9 +1948,7 @@ const deserializeAws_ec2XmlNamespacedList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2XmlNamespacesOutput = ( @@ -2080,19 +1998,14 @@ const deserializeAws_ec2BooleanList = ( output: any, context: __SerdeContext ): boolean[] => { - return (output || []).map( - (entry: any) => - (entry["#text"] !== undefined ? entry["#text"] : entry) == "true" - ); + return (output || []).map((entry: any) => entry == "true"); }; const deserializeAws_ec2FooEnumList = ( output: any, context: __SerdeContext ): (FooEnum | string)[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2FooEnumMap = ( @@ -2100,10 +2013,7 @@ const deserializeAws_ec2FooEnumMap = ( context: __SerdeContext ): { [key: string]: FooEnum | string } => { return output.reduce((acc: any, pair: any) => { - acc[pair["key"]] = - pair["value"]["#text"] !== undefined - ? pair["value"]["#text"] - : pair["value"]; + acc[pair["key"]] = pair["value"]; return acc; }, {}); }; @@ -2112,18 +2022,14 @@ const deserializeAws_ec2FooEnumSet = ( output: any, context: __SerdeContext ): Set => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2IntegerList = ( output: any, context: __SerdeContext ): number[] => { - return (output || []).map((entry: any) => - parseInt(entry["#text"] !== undefined ? entry["#text"] : entry) - ); + return (output || []).map((entry: any) => parseInt(entry)); }; const deserializeAws_ec2NestedStringList = ( @@ -2142,18 +2048,14 @@ const deserializeAws_ec2StringList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2StringSet = ( output: any, context: __SerdeContext ): Set => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_ec2TimestampList = ( @@ -2238,7 +2140,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/protocol_tests/aws-query/protocols/Aws_query.ts b/protocol_tests/aws-query/protocols/Aws_query.ts index 95f77be67e9d..56df03912159 100644 --- a/protocol_tests/aws-query/protocols/Aws_query.ts +++ b/protocol_tests/aws-query/protocols/Aws_query.ts @@ -127,7 +127,8 @@ import { import { SmithyException as __SmithyException, extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -1959,10 +1960,7 @@ const deserializeAws_queryComplexError = ( ); } if (output["TopLevel"] !== undefined) { - contents.TopLevel = - output["TopLevel"]["#text"] !== undefined - ? output["TopLevel"]["#text"] - : output["TopLevel"]; + contents.TopLevel = output["TopLevel"]; } return contents; }; @@ -1976,10 +1974,7 @@ const deserializeAws_queryComplexNestedErrorData = ( Foo: undefined }; if (output["Foo"] !== undefined) { - contents.Foo = - output["Foo"]["#text"] !== undefined - ? output["Foo"]["#text"] - : output["Foo"]; + contents.Foo = output["Foo"]; } return contents; }; @@ -2039,8 +2034,7 @@ const deserializeAws_queryFlattenedXmlMapWithXmlNameOutputMap = ( context: __SerdeContext ): { [key: string]: string } => { return output.reduce((acc: any, pair: any) => { - acc[pair["K"]] = - pair["V"]["#text"] !== undefined ? pair["V"]["#text"] : pair["V"]; + acc[pair["K"]] = pair["V"]; return acc; }, {}); }; @@ -2054,10 +2048,7 @@ const deserializeAws_queryGreetingWithErrorsOutput = ( greeting: undefined }; if (output["greeting"] !== undefined) { - contents.greeting = - output["greeting"]["#text"] !== undefined - ? output["greeting"]["#text"] - : output["greeting"]; + contents.greeting = output["greeting"]; } return contents; }; @@ -2071,10 +2062,7 @@ const deserializeAws_queryIgnoresWrappingXmlNameOutput = ( foo: undefined }; if (output["foo"] !== undefined) { - contents.foo = - output["foo"]["#text"] !== undefined - ? output["foo"]["#text"] - : output["foo"]; + contents.foo = output["foo"]; } return contents; }; @@ -2088,10 +2076,7 @@ const deserializeAws_queryInvalidGreeting = ( Message: undefined }; if (output["Message"] !== undefined) { - contents.Message = - output["Message"]["#text"] !== undefined - ? output["Message"]["#text"] - : output["Message"]; + contents.Message = output["Message"]; } return contents; }; @@ -2123,10 +2108,7 @@ const deserializeAws_queryRecursiveXmlShapesOutputNested1 = ( nested: undefined }; if (output["foo"] !== undefined) { - contents.foo = - output["foo"]["#text"] !== undefined - ? output["foo"]["#text"] - : output["foo"]; + contents.foo = output["foo"]; } if (output["nested"] !== undefined) { contents.nested = deserializeAws_queryRecursiveXmlShapesOutputNested2( @@ -2147,10 +2129,7 @@ const deserializeAws_queryRecursiveXmlShapesOutputNested2 = ( recursiveMember: undefined }; if (output["bar"] !== undefined) { - contents.bar = - output["bar"]["#text"] !== undefined - ? output["bar"]["#text"] - : output["bar"]; + contents.bar = output["bar"]; } if (output["recursiveMember"] !== undefined) { contents.recursiveMember = deserializeAws_queryRecursiveXmlShapesOutputNested1( @@ -2165,9 +2144,7 @@ const deserializeAws_queryRenamedListMembers = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_querySimpleScalarXmlPropertiesOutput = ( @@ -2188,70 +2165,34 @@ const deserializeAws_querySimpleScalarXmlPropertiesOutput = ( trueBooleanValue: undefined }; if (output["byteValue"] !== undefined) { - contents.byteValue = parseInt( - output["byteValue"]["#text"] !== undefined - ? output["byteValue"]["#text"] - : output["byteValue"] - ); + contents.byteValue = parseInt(output["byteValue"]); } if (output["DoubleDribble"] !== undefined) { - contents.doubleValue = parseFloat( - output["DoubleDribble"]["#text"] !== undefined - ? output["DoubleDribble"]["#text"] - : output["DoubleDribble"] - ); + contents.doubleValue = parseFloat(output["DoubleDribble"]); } if (output["emptyStringValue"] !== undefined) { - contents.emptyStringValue = - output["emptyStringValue"]["#text"] !== undefined - ? output["emptyStringValue"]["#text"] - : output["emptyStringValue"]; + contents.emptyStringValue = output["emptyStringValue"]; } if (output["falseBooleanValue"] !== undefined) { - contents.falseBooleanValue = - (output["falseBooleanValue"]["#text"] !== undefined - ? output["falseBooleanValue"]["#text"] - : output["falseBooleanValue"]) == "true"; + contents.falseBooleanValue = output["falseBooleanValue"] == "true"; } if (output["floatValue"] !== undefined) { - contents.floatValue = parseFloat( - output["floatValue"]["#text"] !== undefined - ? output["floatValue"]["#text"] - : output["floatValue"] - ); + contents.floatValue = parseFloat(output["floatValue"]); } if (output["integerValue"] !== undefined) { - contents.integerValue = parseInt( - output["integerValue"]["#text"] !== undefined - ? output["integerValue"]["#text"] - : output["integerValue"] - ); + contents.integerValue = parseInt(output["integerValue"]); } if (output["longValue"] !== undefined) { - contents.longValue = parseInt( - output["longValue"]["#text"] !== undefined - ? output["longValue"]["#text"] - : output["longValue"] - ); + contents.longValue = parseInt(output["longValue"]); } if (output["shortValue"] !== undefined) { - contents.shortValue = parseInt( - output["shortValue"]["#text"] !== undefined - ? output["shortValue"]["#text"] - : output["shortValue"] - ); + contents.shortValue = parseInt(output["shortValue"]); } if (output["stringValue"] !== undefined) { - contents.stringValue = - output["stringValue"]["#text"] !== undefined - ? output["stringValue"]["#text"] - : output["stringValue"]; + contents.stringValue = output["stringValue"]; } if (output["trueBooleanValue"] !== undefined) { - contents.trueBooleanValue = - (output["trueBooleanValue"]["#text"] !== undefined - ? output["trueBooleanValue"]["#text"] - : output["trueBooleanValue"]) == "true"; + contents.trueBooleanValue = output["trueBooleanValue"] == "true"; } return contents; }; @@ -2275,16 +2216,10 @@ const deserializeAws_queryStructureListMember = ( b: undefined }; if (output["value"] !== undefined) { - contents.a = - output["value"]["#text"] !== undefined - ? output["value"]["#text"] - : output["value"]; + contents.a = output["value"]; } if (output["other"] !== undefined) { - contents.b = - output["other"]["#text"] !== undefined - ? output["other"]["#text"] - : output["other"]; + contents.b = output["other"]; } return contents; }; @@ -2298,11 +2233,7 @@ const deserializeAws_queryXmlBlobsOutput = ( data: undefined }; if (output["data"] !== undefined) { - contents.data = context.base64Decoder( - output["data"]["#text"] !== undefined - ? output["data"]["#text"] - : output["data"] - ); + contents.data = context.base64Decoder(output["data"]); } return contents; }; @@ -2321,22 +2252,13 @@ const deserializeAws_queryXmlEnumsOutput = ( fooEnumSet: undefined }; if (output["fooEnum1"] !== undefined) { - contents.fooEnum1 = - output["fooEnum1"]["#text"] !== undefined - ? output["fooEnum1"]["#text"] - : output["fooEnum1"]; + contents.fooEnum1 = output["fooEnum1"]; } if (output["fooEnum2"] !== undefined) { - contents.fooEnum2 = - output["fooEnum2"]["#text"] !== undefined - ? output["fooEnum2"]["#text"] - : output["fooEnum2"]; + contents.fooEnum2 = output["fooEnum2"]; } if (output["fooEnum3"] !== undefined) { - contents.fooEnum3 = - output["fooEnum3"]["#text"] !== undefined - ? output["fooEnum3"]["#text"] - : output["fooEnum3"]; + contents.fooEnum3 = output["fooEnum3"]; } if (output.fooEnumList === "") { contents.fooEnumList = []; @@ -2600,10 +2522,7 @@ const deserializeAws_queryXmlNamespaceNested = ( values: undefined }; if (output["foo"] !== undefined) { - contents.foo = - output["foo"]["#text"] !== undefined - ? output["foo"]["#text"] - : output["foo"]; + contents.foo = output["foo"]; } if (output.values === "") { contents.values = []; @@ -2624,9 +2543,7 @@ const deserializeAws_queryXmlNamespacedList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryXmlNamespacesOutput = ( @@ -2676,19 +2593,14 @@ const deserializeAws_queryBooleanList = ( output: any, context: __SerdeContext ): boolean[] => { - return (output || []).map( - (entry: any) => - (entry["#text"] !== undefined ? entry["#text"] : entry) == "true" - ); + return (output || []).map((entry: any) => entry == "true"); }; const deserializeAws_queryFooEnumList = ( output: any, context: __SerdeContext ): (FooEnum | string)[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryFooEnumMap = ( @@ -2696,10 +2608,7 @@ const deserializeAws_queryFooEnumMap = ( context: __SerdeContext ): { [key: string]: FooEnum | string } => { return output.reduce((acc: any, pair: any) => { - acc[pair["key"]] = - pair["value"]["#text"] !== undefined - ? pair["value"]["#text"] - : pair["value"]; + acc[pair["key"]] = pair["value"]; return acc; }, {}); }; @@ -2708,9 +2617,7 @@ const deserializeAws_queryFooEnumSet = ( output: any, context: __SerdeContext ): Set => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryGreetingStruct = ( @@ -2722,10 +2629,7 @@ const deserializeAws_queryGreetingStruct = ( hi: undefined }; if (output["hi"] !== undefined) { - contents.hi = - output["hi"]["#text"] !== undefined - ? output["hi"]["#text"] - : output["hi"]; + contents.hi = output["hi"]; } return contents; }; @@ -2734,9 +2638,7 @@ const deserializeAws_queryIntegerList = ( output: any, context: __SerdeContext ): number[] => { - return (output || []).map((entry: any) => - parseInt(entry["#text"] !== undefined ? entry["#text"] : entry) - ); + return (output || []).map((entry: any) => parseInt(entry)); }; const deserializeAws_queryNestedStringList = ( @@ -2755,18 +2657,14 @@ const deserializeAws_queryStringList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryStringSet = ( output: any, context: __SerdeContext ): Set => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_queryTimestampList = ( @@ -2851,7 +2749,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; }); diff --git a/protocol_tests/aws-restxml/protocols/Aws_restXml.ts b/protocol_tests/aws-restxml/protocols/Aws_restXml.ts index 153d61c88955..8287c57a4683 100644 --- a/protocol_tests/aws-restxml/protocols/Aws_restXml.ts +++ b/protocol_tests/aws-restxml/protocols/Aws_restXml.ts @@ -171,6 +171,7 @@ import { dateToUtcString as __dateToUtcString, extendedEncodeURIComponent as __extendedEncodeURIComponent, getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode, splitEvery as __splitEvery } from "@aws-sdk/smithy-client"; import { @@ -2721,8 +2722,7 @@ export const deserializeAws_restXmlIgnoreQueryParamsInResponseCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["baz"] !== undefined) { - contents.baz = - data["baz"]["#text"] !== undefined ? data["baz"]["#text"] : data["baz"]; + contents.baz = data["baz"]; } return Promise.resolve(contents); }; @@ -3276,64 +3276,31 @@ export const deserializeAws_restXmlSimpleScalarPropertiesCommand = async ( } const data: any = await parseBody(output.body, context); if (data["byteValue"] !== undefined) { - contents.byteValue = parseInt( - data["byteValue"]["#text"] !== undefined - ? data["byteValue"]["#text"] - : data["byteValue"] - ); + contents.byteValue = parseInt(data["byteValue"]); } if (data["DoubleDribble"] !== undefined) { - contents.doubleValue = parseFloat( - data["DoubleDribble"]["#text"] !== undefined - ? data["DoubleDribble"]["#text"] - : data["DoubleDribble"] - ); + contents.doubleValue = parseFloat(data["DoubleDribble"]); } if (data["falseBooleanValue"] !== undefined) { - contents.falseBooleanValue = - (data["falseBooleanValue"]["#text"] !== undefined - ? data["falseBooleanValue"]["#text"] - : data["falseBooleanValue"]) == "true"; + contents.falseBooleanValue = data["falseBooleanValue"] == "true"; } if (data["floatValue"] !== undefined) { - contents.floatValue = parseFloat( - data["floatValue"]["#text"] !== undefined - ? data["floatValue"]["#text"] - : data["floatValue"] - ); + contents.floatValue = parseFloat(data["floatValue"]); } if (data["integerValue"] !== undefined) { - contents.integerValue = parseInt( - data["integerValue"]["#text"] !== undefined - ? data["integerValue"]["#text"] - : data["integerValue"] - ); + contents.integerValue = parseInt(data["integerValue"]); } if (data["longValue"] !== undefined) { - contents.longValue = parseInt( - data["longValue"]["#text"] !== undefined - ? data["longValue"]["#text"] - : data["longValue"] - ); + contents.longValue = parseInt(data["longValue"]); } if (data["shortValue"] !== undefined) { - contents.shortValue = parseInt( - data["shortValue"]["#text"] !== undefined - ? data["shortValue"]["#text"] - : data["shortValue"] - ); + contents.shortValue = parseInt(data["shortValue"]); } if (data["stringValue"] !== undefined) { - contents.stringValue = - data["stringValue"]["#text"] !== undefined - ? data["stringValue"]["#text"] - : data["stringValue"]; + contents.stringValue = data["stringValue"]; } if (data["trueBooleanValue"] !== undefined) { - contents.trueBooleanValue = - (data["trueBooleanValue"]["#text"] !== undefined - ? data["trueBooleanValue"]["#text"] - : data["trueBooleanValue"]) == "true"; + contents.trueBooleanValue = data["trueBooleanValue"] == "true"; } return Promise.resolve(contents); }; @@ -3463,14 +3430,10 @@ export const deserializeAws_restXmlXmlAttributesCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["test"] !== undefined) { - contents.attr = - data["test"]["#text"] !== undefined - ? data["test"]["#text"] - : data["test"]; + contents.attr = data["test"]; } if (data["foo"] !== undefined) { - contents.foo = - data["foo"]["#text"] !== undefined ? data["foo"]["#text"] : data["foo"]; + contents.foo = data["foo"]; } return Promise.resolve(contents); }; @@ -3572,9 +3535,7 @@ export const deserializeAws_restXmlXmlBlobsCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["data"] !== undefined) { - contents.data = context.base64Decoder( - data["data"]["#text"] !== undefined ? data["data"]["#text"] : data["data"] - ); + contents.data = context.base64Decoder(data["data"]); } return Promise.resolve(contents); }; @@ -3628,22 +3589,13 @@ export const deserializeAws_restXmlXmlEnumsCommand = async ( }; const data: any = await parseBody(output.body, context); if (data["fooEnum1"] !== undefined) { - contents.fooEnum1 = - data["fooEnum1"]["#text"] !== undefined - ? data["fooEnum1"]["#text"] - : data["fooEnum1"]; + contents.fooEnum1 = data["fooEnum1"]; } if (data["fooEnum2"] !== undefined) { - contents.fooEnum2 = - data["fooEnum2"]["#text"] !== undefined - ? data["fooEnum2"]["#text"] - : data["fooEnum2"]; + contents.fooEnum2 = data["fooEnum2"]; } if (data["fooEnum3"] !== undefined) { - contents.fooEnum3 = - data["fooEnum3"]["#text"] !== undefined - ? data["fooEnum3"]["#text"] - : data["fooEnum3"]; + contents.fooEnum3 = data["fooEnum3"]; } if (data.fooEnumList === "") { contents.fooEnumList = []; @@ -4139,10 +4091,7 @@ const deserializeAws_restXmlComplexErrorResponse = async ( ); } if (data["TopLevel"] !== undefined) { - contents.TopLevel = - data["TopLevel"]["#text"] !== undefined - ? data["TopLevel"]["#text"] - : data["TopLevel"]; + contents.TopLevel = data["TopLevel"]; } return contents; }; @@ -4159,10 +4108,7 @@ const deserializeAws_restXmlInvalidGreetingResponse = async ( }; const data: any = parsedOutput.body.Error; if (data["Message"] !== undefined) { - contents.Message = - data["Message"]["#text"] !== undefined - ? data["Message"]["#text"] - : data["Message"]; + contents.Message = data["Message"]; } return contents; }; @@ -4575,10 +4521,7 @@ const deserializeAws_restXmlComplexNestedErrorData = ( Foo: undefined }; if (output["Foo"] !== undefined) { - contents.Foo = - output["Foo"]["#text"] !== undefined - ? output["Foo"]["#text"] - : output["Foo"]; + contents.Foo = output["Foo"]; } return contents; }; @@ -4588,8 +4531,7 @@ const deserializeAws_restXmlFlattenedXmlMapWithXmlNameInputOutputMap = ( context: __SerdeContext ): { [key: string]: string } => { return output.reduce((acc: any, pair: any) => { - acc[pair["K"]] = - pair["V"]["#text"] !== undefined ? pair["V"]["#text"] : pair["V"]; + acc[pair["K"]] = pair["V"]; return acc; }, {}); }; @@ -4604,16 +4546,10 @@ const deserializeAws_restXmlNestedPayload = ( name: undefined }; if (output["greeting"] !== undefined) { - contents.greeting = - output["greeting"]["#text"] !== undefined - ? output["greeting"]["#text"] - : output["greeting"]; + contents.greeting = output["greeting"]; } if (output["name"] !== undefined) { - contents.name = - output["name"]["#text"] !== undefined - ? output["name"]["#text"] - : output["name"]; + contents.name = output["name"]; } return contents; }; @@ -4627,10 +4563,7 @@ const deserializeAws_restXmlPayloadWithXmlName = ( name: undefined }; if (output["name"] !== undefined) { - contents.name = - output["name"]["#text"] !== undefined - ? output["name"]["#text"] - : output["name"]; + contents.name = output["name"]; } return contents; }; @@ -4644,10 +4577,7 @@ const deserializeAws_restXmlPayloadWithXmlNamespace = ( name: undefined }; if (output["name"] !== undefined) { - contents.name = - output["name"]["#text"] !== undefined - ? output["name"]["#text"] - : output["name"]; + contents.name = output["name"]; } return contents; }; @@ -4661,10 +4591,7 @@ const deserializeAws_restXmlPayloadWithXmlNamespaceAndPrefix = ( name: undefined }; if (output["name"] !== undefined) { - contents.name = - output["name"]["#text"] !== undefined - ? output["name"]["#text"] - : output["name"]; + contents.name = output["name"]; } return contents; }; @@ -4679,10 +4606,7 @@ const deserializeAws_restXmlRecursiveShapesInputOutputNested1 = ( nested: undefined }; if (output["foo"] !== undefined) { - contents.foo = - output["foo"]["#text"] !== undefined - ? output["foo"]["#text"] - : output["foo"]; + contents.foo = output["foo"]; } if (output["nested"] !== undefined) { contents.nested = deserializeAws_restXmlRecursiveShapesInputOutputNested2( @@ -4703,10 +4627,7 @@ const deserializeAws_restXmlRecursiveShapesInputOutputNested2 = ( recursiveMember: undefined }; if (output["bar"] !== undefined) { - contents.bar = - output["bar"]["#text"] !== undefined - ? output["bar"]["#text"] - : output["bar"]; + contents.bar = output["bar"]; } if (output["recursiveMember"] !== undefined) { contents.recursiveMember = deserializeAws_restXmlRecursiveShapesInputOutputNested1( @@ -4721,9 +4642,7 @@ const deserializeAws_restXmlRenamedListMembers = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlStructureList = ( @@ -4745,16 +4664,10 @@ const deserializeAws_restXmlStructureListMember = ( b: undefined }; if (output["value"] !== undefined) { - contents.a = - output["value"]["#text"] !== undefined - ? output["value"]["#text"] - : output["value"]; + contents.a = output["value"]; } if (output["other"] !== undefined) { - contents.b = - output["other"]["#text"] !== undefined - ? output["other"]["#text"] - : output["other"]; + contents.b = output["other"]; } return contents; }; @@ -4769,16 +4682,10 @@ const deserializeAws_restXmlXmlAttributesInputOutput = ( foo: undefined }; if (output["test"] !== undefined) { - contents.attr = - output["test"]["#text"] !== undefined - ? output["test"]["#text"] - : output["test"]; + contents.attr = output["test"]; } if (output["foo"] !== undefined) { - contents.foo = - output["foo"]["#text"] !== undefined - ? output["foo"]["#text"] - : output["foo"]; + contents.foo = output["foo"]; } return contents; }; @@ -4819,10 +4726,7 @@ const deserializeAws_restXmlXmlNamespaceNested = ( values: undefined }; if (output["foo"] !== undefined) { - contents.foo = - output["foo"]["#text"] !== undefined - ? output["foo"]["#text"] - : output["foo"]; + contents.foo = output["foo"]; } if (output.values === "") { contents.values = []; @@ -4843,28 +4747,21 @@ const deserializeAws_restXmlXmlNamespacedList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlBooleanList = ( output: any, context: __SerdeContext ): boolean[] => { - return (output || []).map( - (entry: any) => - (entry["#text"] !== undefined ? entry["#text"] : entry) == "true" - ); + return (output || []).map((entry: any) => entry == "true"); }; const deserializeAws_restXmlFooEnumList = ( output: any, context: __SerdeContext ): (FooEnum | string)[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlFooEnumMap = ( @@ -4872,10 +4769,7 @@ const deserializeAws_restXmlFooEnumMap = ( context: __SerdeContext ): { [key: string]: FooEnum | string } => { return output.reduce((acc: any, pair: any) => { - acc[pair["key"]] = - pair["value"]["#text"] !== undefined - ? pair["value"]["#text"] - : pair["value"]; + acc[pair["key"]] = pair["value"]; return acc; }, {}); }; @@ -4884,9 +4778,7 @@ const deserializeAws_restXmlFooEnumSet = ( output: any, context: __SerdeContext ): Set => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlGreetingStruct = ( @@ -4898,10 +4790,7 @@ const deserializeAws_restXmlGreetingStruct = ( hi: undefined }; if (output["hi"] !== undefined) { - contents.hi = - output["hi"]["#text"] !== undefined - ? output["hi"]["#text"] - : output["hi"]; + contents.hi = output["hi"]; } return contents; }; @@ -4910,9 +4799,7 @@ const deserializeAws_restXmlIntegerList = ( output: any, context: __SerdeContext ): number[] => { - return (output || []).map((entry: any) => - parseInt(entry["#text"] !== undefined ? entry["#text"] : entry) - ); + return (output || []).map((entry: any) => parseInt(entry)); }; const deserializeAws_restXmlNestedStringList = ( @@ -4931,18 +4818,14 @@ const deserializeAws_restXmlStringList = ( output: any, context: __SerdeContext ): string[] => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlStringSet = ( output: any, context: __SerdeContext ): Set => { - return (output || []).map((entry: any) => - entry["#text"] !== undefined ? entry["#text"] : entry - ); + return (output || []).map((entry: any) => entry); }; const deserializeAws_restXmlTimestampList = ( @@ -5009,7 +4892,7 @@ const parseBody = (streamBody: any, context: __SerdeContext): any => parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return parsedObjToReturn; + return __getValueFromTextNode(parsedObjToReturn); } return {}; });